Esempio n. 1
0
void do_done(CHAR_DATA * ch, char * thedir)
{
CHAR_DATA *rch;
if(!ch->infight)
{
printf_to_char(ch,"You're not in a fight.");
return;
}

if(!TURN(ch))
{
printf_to_char(ch,"It's not your turn.");
return;
}
   
    check_winner(ch->in_room);
    
    for (rch = ch->in_room->people; rch != NULL; rch = rch->next_in_room)
    {  
         printf_to_char(rch,"%s ends %s turn.\n",fcn(ch), ch->sex ? "his" : "her");
         do_map(rch,"forced");
         rch->AT++;
    }
       ch->AT = 0;

advance_turn(ch); 
}
Esempio n. 2
0
void leave_fight(CHAR_DATA *ch) 
{ 
ch->infight = FALSE; 

  if(TURN(ch))
  advance_turn(ch);
  ch->mposx = 0; ch->jump = 0; ch->base_move = 0; ch->in_room->map.closed = TRUE;
}
Esempio n. 3
0
void Board::move_unit(uint8_t col, uint8_t row)
{
        if (game_tiles[row][col].has_unit)
                return;
        game_tiles[selected_unit->row][selected_unit->col].remove_unit();
        game_tiles[row][col].add_unit(selected_unit);
        selected_unit->col = col;
        selected_unit->row = row;
        deselect_unit();
        advance_turn();
}
Esempio n. 4
0
void refresh(ROOM_INDEX_DATA *r)
{
CHAR_DATA *rch;    
int y;
int x;
for(y=0;y<16;y++)
for(x=0;x<26;x++)
for (rch = r->people; rch != NULL; rch = rch->next_in_room)
    {
        if(rch->mposx == x && rch->mposy == y && rch->infight)
        r->map.index[y][x].occupied = TRUE;
        else
        r->map.index[y][x].occupied = FALSE;
    }
if(r->turn == NULL)
advance_turn( r->people);
}