… | |
… | |
1998 | int atnr_winner[NROFATTACKS]; /* winning candidates for resistance improvement */ |
1998 | int atnr_winner[NROFATTACKS]; /* winning candidates for resistance improvement */ |
1999 | int winners = 0; /* number of winners */ |
1999 | int winners = 0; /* number of winners */ |
2000 | int i; /* index */ |
2000 | int i; /* index */ |
2001 | |
2001 | |
2002 | /* let's make sure and doublecheck the parameters */ |
2002 | /* let's make sure and doublecheck the parameters */ |
2003 | if (meal->type != FLESH || !is_dragon_pl (op)) |
2003 | if (meal->type != FLESH || !op->is_dragon ()) |
2004 | return 0; |
2004 | return 0; |
2005 | |
2005 | |
2006 | /* now grab the 'dragon_skin'- and 'dragon_ability'-forces |
2006 | /* now grab the 'dragon_skin'- and 'dragon_ability'-forces |
2007 | from the player's inventory */ |
2007 | from the player's inventory */ |
2008 | for (tmp = op->inv; tmp; tmp = tmp->below) |
2008 | for (tmp = op->inv; tmp; tmp = tmp->below) |
… | |
… | |
2146 | if (op->type != PLAYER) |
2146 | if (op->type != PLAYER) |
2147 | op->stats.hp = op->stats.maxhp; |
2147 | op->stats.hp = op->stats.maxhp; |
2148 | else |
2148 | else |
2149 | { |
2149 | { |
2150 | /* check if this is a dragon (player), eating some flesh */ |
2150 | /* check if this is a dragon (player), eating some flesh */ |
2151 | if (tmp->type == FLESH && is_dragon_pl (op) && dragon_eat_flesh (op, tmp)) |
2151 | if (tmp->type == FLESH && op->is_dragon () && dragon_eat_flesh (op, tmp)) |
2152 | ; |
2152 | ; |
2153 | else |
2153 | else |
2154 | { |
2154 | { |
2155 | /* usual case - no dragon meal: */ |
2155 | /* usual case - no dragon meal: */ |
2156 | if (op->stats.food + tmp->stats.food > 999) |
2156 | if (op->stats.food + tmp->stats.food > 999) |
… | |
… | |
2171 | |
2171 | |
2172 | if (!QUERY_FLAG (tmp, FLAG_CURSED)) |
2172 | if (!QUERY_FLAG (tmp, FLAG_CURSED)) |
2173 | { |
2173 | { |
2174 | const char *buf; |
2174 | const char *buf; |
2175 | |
2175 | |
2176 | if (!is_dragon_pl (op)) |
2176 | if (!op->is_dragon ()) |
2177 | { |
2177 | { |
2178 | /* eating message for normal players */ |
2178 | /* eating message for normal players */ |
2179 | if (tmp->type == DRINK) |
2179 | if (tmp->type == DRINK) |
2180 | buf = format ("Ahhh...that %s tasted good.", &tmp->name); |
2180 | buf = format ("Ahhh...that %s tasted good.", &tmp->name); |
2181 | else |
2181 | else |