1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
… | |
… | |
397 | follower_remove_similar_item (this, tr->item); |
397 | follower_remove_similar_item (this, tr->item); |
398 | |
398 | |
399 | if (!new_god) |
399 | if (!new_god) |
400 | return; |
400 | return; |
401 | |
401 | |
402 | if (new_god->slaying && race.contains (new_god->slaying)) |
402 | if (new_god->slaying && new_god->slaying.contains (race)) |
403 | { |
403 | { |
404 | failmsgf ("Fool! %s detests your kind! H<This god does not accept followers of your race.>", &new_god->name); |
404 | failmsgf ("Fool! %s detests your kind! H<This god does not accept followers of your race.>", &new_god->name); |
405 | |
405 | |
406 | if (random_roll (0, level - 1, this, PREFER_LOW) - 5 > 0) |
406 | if (random_roll (0, level - 1, this, PREFER_LOW) - 5 > 0) |
407 | { |
407 | { |
… | |
… | |
656 | if (!op->contr) |
656 | if (!op->contr) |
657 | return 0; |
657 | return 0; |
658 | |
658 | |
659 | object *weapon = op->contr->combat_ob; |
659 | object *weapon = op->contr->combat_ob; |
660 | |
660 | |
|
|
661 | if (!weapon) |
|
|
662 | return 0; |
|
|
663 | |
661 | if (weapon->type != WEAPON && weapon->type != BOW) |
664 | if (weapon->type != WEAPON && weapon->type != BOW) |
662 | return 0; |
665 | return 0; |
663 | |
666 | |
664 | if (god_examines_item (god, weapon) <= 0) |
667 | if (god_examines_item (god, weapon) <= 0) |
665 | return 0; |
668 | return 0; |