… | |
… | |
795 | godname = "Your spirit"; |
795 | godname = "Your spirit"; |
796 | |
796 | |
797 | if (failure <= -20 && failure > -40) /* wonder */ |
797 | if (failure <= -20 && failure > -40) /* wonder */ |
798 | { |
798 | { |
799 | op->failmsgf ("%s gives a sign to renew your faith." HINT_GRACE, godname); |
799 | op->failmsgf ("%s gives a sign to renew your faith." HINT_GRACE, godname); |
800 | tmp = get_archetype (SPELL_WONDER); |
800 | tmp = archetype::get (SPELL_WONDER); |
801 | cast_cone (op, op, 0, tmp); |
801 | cast_cone (op, op, 0, tmp); |
802 | tmp->destroy (); |
802 | tmp->destroy (); |
803 | } |
803 | } |
804 | |
804 | |
805 | else if (failure <= -40 && failure > -60) /* confusion */ |
805 | else if (failure <= -40 && failure > -60) /* confusion */ |
… | |
… | |
814 | godname); |
814 | godname); |
815 | paralyze_player (op, op, 99); |
815 | paralyze_player (op, op, 99); |
816 | } |
816 | } |
817 | else if (failure <= -150) /* blast the immediate area */ |
817 | else if (failure <= -150) /* blast the immediate area */ |
818 | { |
818 | { |
819 | tmp = get_archetype (GOD_POWER); |
819 | tmp = archetype::get (GOD_POWER); |
820 | op->failmsgf ("%s smites you!" HINT_GRACE, godname); |
820 | op->failmsgf ("%s smites you!" HINT_GRACE, godname); |
821 | cast_magic_storm (op, tmp, power); |
821 | cast_magic_storm (op, tmp, power); |
822 | } |
822 | } |
823 | } |
823 | } |
824 | |
824 | |
… | |
… | |
840 | return; |
840 | return; |
841 | |
841 | |
842 | if (failure <= -20 && failure > -40) /* wonder */ |
842 | if (failure <= -20 && failure > -40) /* wonder */ |
843 | { |
843 | { |
844 | op->failmsg ("Your spell causes an unexpected effect."); |
844 | op->failmsg ("Your spell causes an unexpected effect."); |
845 | tmp = get_archetype (SPELL_WONDER); |
845 | tmp = archetype::get (SPELL_WONDER); |
846 | cast_cone (op, op, 0, tmp); |
846 | cast_cone (op, op, 0, tmp); |
847 | tmp->destroy (); |
847 | tmp->destroy (); |
848 | } |
848 | } |
849 | |
849 | |
850 | else if (failure <= -40 && failure > -60) /* confusion */ |
850 | else if (failure <= -40 && failure > -60) /* confusion */ |
… | |
… | |
869 | |
869 | |
870 | } |
870 | } |
871 | else |
871 | else |
872 | { |
872 | { |
873 | op->failmsg ("You lose control of the mana! The uncontrolled magic blasts you!"); |
873 | op->failmsg ("You lose control of the mana! The uncontrolled magic blasts you!"); |
874 | tmp = get_archetype (LOOSE_MANA); |
874 | tmp = archetype::get (LOOSE_MANA); |
875 | tmp->level = skill->level; |
875 | tmp->level = skill->level; |
876 | |
876 | |
877 | /* increase the area of destruction a little for more powerful spells */ |
877 | /* increase the area of destruction a little for more powerful spells */ |
878 | tmp->range += isqrt (power); |
878 | tmp->range += isqrt (power); |
879 | |
879 | |
… | |
… | |
1504 | * the victim with a specific maximum level. |
1504 | * the victim with a specific maximum level. |
1505 | */ |
1505 | */ |
1506 | void |
1506 | void |
1507 | create_exploding_ball_at (object *victim, int level) |
1507 | create_exploding_ball_at (object *victim, int level) |
1508 | { |
1508 | { |
1509 | object *ball = get_archetype (EXPLODING_FIREBALL); |
1509 | object *ball = archetype::get (EXPLODING_FIREBALL); |
1510 | ball->dam_modifier = random_roll (1, level, victim, PREFER_LOW) / 5 + 1; |
1510 | ball->dam_modifier = random_roll (1, level, victim, PREFER_LOW) / 5 + 1; |
1511 | ball->stats.maxhp = random_roll (1, level, victim, PREFER_LOW) / 10 + 2; |
1511 | ball->stats.maxhp = random_roll (1, level, victim, PREFER_LOW) / 10 + 2; |
1512 | ball->insert_at (victim); |
1512 | ball->insert_at (victim); |
1513 | } |
1513 | } |