summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-27 11:50:19 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-27 11:50:19 +0000
commit0e6ace1ac92fe52e8a23335ccf68b69056407bbc (patch)
tree207b3f218d1c213f7fefbbbec2c6bf425bc1f7b5
parent7a5efda30e5d565558b2df4fd7e28db62f757308 (diff)
downloadcrawl-ref-0e6ace1ac92fe52e8a23335ccf68b69056407bbc.tar.gz
crawl-ref-0e6ace1ac92fe52e8a23335ccf68b69056407bbc.zip
Axe some more obsolete functions as well as the rotting ability that
isn't used anywhere. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9256 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/abl-show.cc11
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/spells2.cc47
-rw-r--r--crawl-ref/source/spells2.h4
-rw-r--r--crawl-ref/source/spells4.cc387
-rw-r--r--crawl-ref/source/spells4.h5
6 files changed, 0 insertions, 455 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index d75f9a66b7..22b491ac8a 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -300,7 +300,6 @@ static const ability_def Ability_List[] =
{ ABIL_CHARM_SNAKE, "Charm Snake", 6, 0, 200, 5, ABFLAG_NONE },
{ ABIL_BREATHE_HELLFIRE, "Breathe Hellfire", 0, 8, 200, 0, ABFLAG_BREATH },
- { ABIL_ROTTING, "Rotting", 4, 4, 0, 2, ABFLAG_NONE },
{ ABIL_TORMENT_II, "Call Torment", 9, 0, 0, 3, ABFLAG_PAIN },
{ ABIL_HARM_PROTECTION, "Protection From Harm", 0, 0, 0, 0, ABFLAG_NONE },
@@ -759,11 +758,6 @@ static talent _get_talent(ability_type ability, bool check_confused)
failure = 40 - (you.piety / 20) - (3 * you.skills[SK_INVOCATIONS]);
break;
- case ABIL_ROTTING:
- invoc = true;
- failure = 60 - (you.piety / 20) - (5 * you.skills[SK_INVOCATIONS]);
- break;
-
case ABIL_TORMENT_II:
invoc = true;
failure = 70 - (you.piety / 25) - (you.skills[SK_INVOCATIONS] * 4);
@@ -1893,11 +1887,6 @@ static bool _do_ability(const ability_def& abil)
3 + random2(5) + random2(30 - you.experience_level);
break;
- case ABIL_ROTTING:
- cast_rotting(you.experience_level * 2 + you.skills[SK_INVOCATIONS] * 3);
- exercise(SK_INVOCATIONS, 2 + random2(4));
- break;
-
case ABIL_TORMENT_II:
if (you.is_undead)
{
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 9a43428ade..b1318981aa 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -104,7 +104,6 @@ enum ability_type
ABIL_BEOGH_RECALL_ORCISH_FOLLOWERS,
ABIL_CHARM_SNAKE, // 237
- ABIL_ROTTING,
ABIL_TORMENT_II,
ABIL_TRAN_BAT,
ABIL_HARM_PROTECTION, // 240
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 7e46afc98d..9c8ab0459b 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -454,45 +454,6 @@ bool restore_stat(unsigned char which_stat, unsigned char stat_gain,
return (stat_restored);
}
-void turn_undead(int pow)
-{
- mpr("You attempt to repel the undead.");
-
- for (int i = 0; i < MAX_MONSTERS; i++)
- {
- monsters* const monster = &menv[i];
-
- if (monster->type == -1 || !mons_near(monster))
- continue;
-
- // Used to inflict random2(5) + (random2(pow) / 20) damage,
- // in addition. {dlb}
- if (mons_holiness(monster) == MH_UNDEAD)
- {
- if (check_mons_resist_magic( monster, pow ))
- {
- simple_monster_message( monster, mons_immune_magic(monster) ?
- " is unaffected." : " resists." );
- continue;
- }
-
- if (!monster->add_ench(ENCH_FEAR))
- continue;
-
- simple_monster_message( monster, " is repelled!" );
-
- //mv: Must be here to work.
- behaviour_event( monster, ME_SCARE, MHITYOU );
-
- // Reduce power based on monster turned.
- pow -= monster->hit_dice * 3;
- if (pow <= 0)
- break;
-
- }
- }
-}
-
typedef std::pair<const monsters*,int> counted_monster;
typedef std::vector<counted_monster> counted_monster_list;
static void _record_monster_by_name(counted_monster_list &list,
@@ -1620,14 +1581,6 @@ bool summon_holy_warrior(int pow, god_type god, int spell,
!force_hostile, quiet);
}
-bool summon_holy_being_type(monster_type mon, int pow,
- god_type god, int spell)
-{
- return _summon_holy_being_wrapper(pow, god, spell, mon,
- std::min(2 + (random2(pow) / 4), 6),
- true, false);
-}
-
bool cast_tukimas_dance(int pow, god_type god,
bool force_hostile)
{
diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h
index c678e0b0d0..30536a72b4 100644
--- a/crawl-ref/source/spells2.h
+++ b/crawl-ref/source/spells2.h
@@ -51,12 +51,8 @@ bool summon_berserker(int pow, god_type god = GOD_NO_GOD, int spell = 0,
bool summon_holy_warrior(int pow, god_type god = GOD_NO_GOD, int spell = 0,
bool force_hostile = false, bool permanent = false,
bool quiet = false);
-bool summon_holy_being_type(monster_type mon, int pow,
- god_type god = GOD_NO_GOD, int spell = 0);
bool cast_tukimas_dance(int pow, god_type god = GOD_NO_GOD,
bool force_hostile = false);
bool cast_conjure_ball_lightning(int pow, god_type god = GOD_NO_GOD);
-void turn_undead(int pow); // what should I use for pow?
-
#endif
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 715bfc9564..c8f4db1e45 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -67,8 +67,6 @@ enum DEBRIS // jmf: add for shatter, dig, and Giants to throw
static int _make_a_rot_cloud(const coord_def& where, int pow, cloud_type ctype);
-void do_monster_rot(int mon);
-
// Just to avoid typing this over and over.
// Returns true if monster died. -- bwr
static bool _player_hurt_monster(monsters& m, int damage)
@@ -846,96 +844,6 @@ void cast_discharge(int pow)
}
}
-// NB: this must be checked against the same effects
-// in fight.cc for all forms of attack !!! {dlb}
-// This function should be currently unused (the effect is too powerful).
-static int _distortion_monsters(coord_def where, int pow, int, actor *)
-{
- if (pow > 100)
- pow = 100;
-
- if (where == you.pos())
- {
- if (you.skills[SK_TRANSLOCATIONS] < random2(8))
- {
- MiscastEffect( &you, NON_MONSTER, SPTYP_TRANSLOCATION,
- pow / 9 + 1, pow, "cast bend on self" );
- }
- else
- {
- MiscastEffect( &you, NON_MONSTER, SPTYP_TRANSLOCATION, 1, 1,
- "cast bend on self" );
- }
-
- return (1);
- }
-
- monsters *defender = monster_at(where);
- if (defender == NULL)
- return (0);
-
- int specdam = 0;
-
- if (defender->type == MONS_BLINK_FROG
- || defender->type == MONS_PRINCE_RIBBIT) // any others resist?
- {
- int hp = defender->hit_points;
- int max_hp = defender->max_hit_points;
-
- mpr("The blink frog basks in the translocular energy.");
-
- if (hp < max_hp)
- hp += 1 + random2(1 + pow / 4) + random2(1 + pow / 7);
-
- if (hp > max_hp)
- hp = max_hp;
-
- defender->hit_points = hp;
- return 1;
- }
- else if (coinflip())
- {
- mprf("Space bends around %s.",
- defender->name(DESC_NOCAP_THE).c_str());
- specdam += 1 + random2avg( 7, 2 ) + random2(pow) / 40;
- }
- else if (coinflip())
- {
- mprf("Space warps horribly around %s!",
- defender->name(DESC_NOCAP_THE).c_str());
- specdam += 3 + random2avg( 12, 2 ) + random2(pow) / 25;
- }
- else if (one_chance_in(3))
- {
- monster_blink(defender);
- return 1;
- }
- else if (one_chance_in(3))
- {
- monster_teleport(defender, coinflip());
- return 1;
- }
- else if (one_chance_in(3))
- {
- defender->banish();
- return 1;
- }
- else
- {
- canned_msg(MSG_NOTHING_HAPPENS);
- return 1;
- }
-
- _player_hurt_monster(*defender, specdam);
-
- return (specdam);
-}
-
-void cast_bend(int pow)
-{
- apply_one_neighbouring_square( _distortion_monsters, pow );
-}
-
// Really this is just applying the best of Band/Warp weapon/Warp field
// into a spell that gives the "make monsters go away" benefit without
// the insane damage potential. -- bwr
@@ -979,42 +887,6 @@ void cast_dispersal(int pow)
mpr("The air shimmers briefly around you.");
}
-static int _spell_swap_func(coord_def where, int pow, int, actor *)
-{
- monsters *defender = monster_at(where);
- if (defender == NULL)
- return (0);
-
- if (defender->type == MONS_BLINK_FROG
- || defender->type == MONS_PRINCE_RIBBIT
- || check_mons_resist_magic( defender, pow ))
- {
- simple_monster_message( defender, mons_immune_magic(defender) ?
- " is unaffected." : " resists." );
- }
- else
- {
- // Swap doesn't seem to actually swap, but just sets the
- // monster's location equal to the players... this being because
- // the acr.cc call is going to move the player afterwards (for
- // the regular friendly monster swap). So we'll go through
- // standard swap procedure here... since we really want to apply
- // the same swap_places function as with friendly monsters...
- // see note over there. -- bwr
- coord_def old_pos = defender->pos();
-
- if (swap_places( defender ))
- you.moveto(old_pos);
- }
-
- return 1;
-}
-
-void cast_swap(int pow)
-{
- apply_one_neighbouring_square(_spell_swap_func, pow);
-}
-
static int _make_a_rot_cloud(const coord_def& where, int pow, cloud_type ctype)
{
for (stack_iterator si(where); si; ++si)
@@ -1502,107 +1374,6 @@ void cast_fulsome_distillation( int powc )
mpr( "Unfortunately, you can't carry it right now!" );
}
-static int _rot_living(coord_def where, int pow, int, actor *)
-{
- monsters *monster = monster_at(where);
- if (monster == NULL)
- return (0);
-
- if (mons_holiness(monster) != MH_NATURAL)
- return (0);
-
- if (check_mons_resist_magic(monster, pow))
- return (0);
-
- int ench = ((random2(pow) + random2(pow) + random2(pow) + random2(pow))/4);
- ench = 1 + (ench >= 20) + (ench >= 35) + (ench >= 50);
-
- monster->add_ench(mon_enchant(ENCH_ROT, ench, KC_YOU));
-
- return (1);
-}
-
-static int _rot_undead(coord_def where, int pow, int, actor *)
-{
- monsters *monster = monster_at(where);
-
- if (monster == NULL)
- return (0);
-
- if (mons_holiness(monster) != MH_UNDEAD)
- return (0);
-
- if (check_mons_resist_magic(monster, pow))
- return (0);
-
- // This does not make sense -- player mummies are
- // immune to rotting (or have been) -- so what is
- // the schema in use here to determine rotting??? {dlb}
-
- //jmf: Up for discussion. it is clearly unfair to
- // rot player mummies.
- // the `schema' here is: corporeal non-player undead
- // rot, discorporeal undead don't rot. if you wanna
- // insist that monsters get the same treatment as
- // players, I demand my player mummies get to worship
- // the evil mummy & orc gods.
- switch (monster->type)
- {
- case MONS_ZOMBIE_SMALL:
- case MONS_ZOMBIE_LARGE:
- case MONS_MUMMY:
- case MONS_GUARDIAN_MUMMY:
- case MONS_GREATER_MUMMY:
- case MONS_MUMMY_PRIEST:
- case MONS_GHOUL:
- case MONS_NECROPHAGE:
- case MONS_VAMPIRE:
- case MONS_VAMPIRE_KNIGHT:
- case MONS_VAMPIRE_MAGE:
- case MONS_LICH:
- case MONS_ANCIENT_LICH:
- case MONS_WIGHT:
- case MONS_BORIS:
- break;
- case MONS_ROTTING_HULK:
- default:
- return 0; // Immune (no flesh) or already rotting.
- }
-
- int ench = ((random2(pow) + random2(pow) + random2(pow) + random2(pow))/4);
- ench = 1 + (ench >= 20) + (ench >= 35) + (ench >= 50);
-
- monster->add_ench(mon_enchant(ENCH_ROT, ench, KC_YOU));
-
- return (1);
-}
-
-static int _rot_corpses(coord_def where, int pow, int, actor *)
-{
- return _make_a_rot_cloud(where, pow, CLOUD_MIASMA);
-}
-
-void cast_rotting(int pow)
-{
- apply_area_visible(_rot_living, pow);
- apply_area_visible(_rot_undead, pow);
- apply_area_visible(_rot_corpses, pow);
- return;
-}
-
-void do_monster_rot(int mon)
-{
- int damage = 1 + random2(3);
-
- if (mons_holiness(&menv[mon]) == MH_UNDEAD && !one_chance_in(5))
- {
- apply_area_cloud(make_a_normal_cloud, menv[mon].pos(),
- 10, 1, CLOUD_MIASMA, KC_YOU, KILL_YOU_MISSILE);
- }
-
- _player_hurt_monster( mon, damage );
-}
-
static int _snake_charm_monsters(coord_def where, int pow, int, actor *)
{
monsters* monster = monster_at(where);
@@ -1980,44 +1751,6 @@ bool cast_fragmentation(int pow, const dist& spd)
return (true);
}
-bool cast_twist(int pow, const coord_def& where)
-{
- monsters *monster = monster_at(where);
-
- // Anything there?
- if (monster == NULL)
- {
- mpr("There is no monster there!");
- // This counts as a real cast, in order not to leak invisible
- // monster locations, and to allow victory-dancing.
- return (true);
- }
-
- // Identify mimics, if necessary.
- if (mons_is_mimic(monster->type))
- monster->flags |= MF_KNOWN_MIMIC;
-
- // Monster can magically save vs attack.
- if (check_mons_resist_magic(monster, pow * 2))
- {
- simple_monster_message(monster, mons_resist_string(monster));
- return (true);
- }
-
- // Roll the damage... this spell is pretty low on damage, because
- // it can target any monster in LOS (high utility). This is
- // similar to the damage done by Magic Dart (although, the
- // distribution is much more uniform). -- bwr
- const int damage = 1 + random2(3 + pow / 5);
-
- // Inflict the damage.
- if (!_player_hurt_monster(*monster, damage))
- if (mons_is_mimic(monster->type))
- mimic_alert(monster);
-
- return (true);
-}
-
bool cast_portal_projectile(int pow)
{
dist target;
@@ -2047,126 +1780,6 @@ bool cast_portal_projectile(int pow)
return (true);
}
-//
-// This version of far strike is a bit too creative for level one, in
-// order to make it work we needed to put a lot of restrictions on it
-// (like the damage limitation), which wouldn't be necessary if it were
-// a higher level spell. This code might come back as a high level
-// translocation spell later (maybe even with special effects if it's
-// using some of Josh's ideas about occasionally losing the weapon).
-// Would potentially make a good high-level, second book Warper spell
-// (since Translocations is a utility school, it should be higher level
-// that usual... especially if it turns into a flavoured smiting spell).
-// This can all wait until after the next release (as it would be better
-// to have a proper way to do a single weapon strike here (you_attack
-// does far more than we need or want here)). --bwr
-//
-void cast_far_strike(int pow)
-{
- dist targ;
- bolt tmp; // used, but ignored
-
- // Get target, using DIR_TARGET for targetting only,
- // since we don't use fire_beam() for this spell.
- if (!spell_direction(targ, tmp, DIR_TARGET))
- return;
-
- // Get the target monster...
- if (monster_at(targ.target) == NULL)
- {
- mpr("There is no monster there!");
- return;
- }
-
- if (trans_wall_blocking( targ.target ))
- {
- mpr("A translucent wall is in the way.");
- return;
- }
-
- // Start with weapon base damage...
-
- int damage = 3; // default unarmed damage
- int speed = 10; // default unarmed time
-
- if (you.weapon()) // if not unarmed
- {
- const item_def& wpn(*you.weapon());
- // Look up the base damage.
- if (wpn.base_type == OBJ_WEAPONS)
- {
- damage = property( wpn, PWPN_DAMAGE );
- speed = property( wpn, PWPN_SPEED );
-
- if (get_weapon_brand(wpn) == SPWPN_SPEED)
- speed /= 2;
- }
- else if (item_is_staff(wpn))
- {
- damage = property(wpn, PWPN_DAMAGE );
- speed = property(wpn, PWPN_SPEED );
- }
- }
-
- // Because we're casting a spell (and don't want to make this level
- // one spell too good), we're not applying skill speed bonuses and at
- // the very least guaranteeing one full turn (speed == 10) like the
- // other spells (if any thing else related to speed is changed, at
- // least leave this right before the application to you.time_taken).
- // Leaving skill out of the speed bonus is an important part of
- // keeping this spell from becoming a "better than actual melee"
- // spell... although, it's fine if that's the case for early Warpers,
- // Fighter types, and such that pick up this trivial first level spell,
- // shouldn't be using it instead of melee (but rather as an accessory
- // long range plinker). Therefore, we tone things down to try and
- // guarantee that the spell is never begins to approach real combat
- // (although the magic resistance check might end up with a higher
- // hit rate than attacking against EV for high level Warpers). -- bwr
- if (speed < 10)
- speed = 10;
-
- you.time_taken *= speed;
- you.time_taken /= 10;
-
- // Apply strength only to damage (since we're only interested in
- // force here, not finesse... the dex/to-hit part of combat is
- // instead handled via magical ability). This part could probably
- // just be removed, as it's unlikely to make any real difference...
- // if it is, the Warper stats in newgame.cc should be changed back
- // to the standard 6 int-4 dex of spellcasters. -- bwr
- int dammod = 78;
- const int dam_stat_val = you.strength;
-
- if (dam_stat_val > 11)
- dammod += (random2(dam_stat_val - 11) * 2);
- else if (dam_stat_val < 9)
- dammod -= (random2(9 - dam_stat_val) * 3);
-
- damage *= dammod;
- damage /= 78;
-
- monsters *monster = monster_at(targ.target);
-
- // Apply monster's AC.
- if (monster->ac > 0)
- damage -= random2( 1 + monster->ac );
-
- // Roll the damage...
- damage = 1 + random2( damage );
-
- // Monster can magically save vs attack (this could be replaced or
- // augmented with an EV check).
- if (check_mons_resist_magic( monster, pow * 2 ))
- {
- simple_monster_message( monster, mons_immune_magic(monster) ?
- " is unaffected." : " resists." );
- return;
- }
-
- // Inflict the damage.
- _player_hurt_monster(*monster, damage);
-}
-
bool cast_apportation(int pow, const coord_def& where)
{
// Protect the player from destroying the item.
diff --git a/crawl-ref/source/spells4.h b/crawl-ref/source/spells4.h
index c508003df2..be50386c13 100644
--- a/crawl-ref/source/spells4.h
+++ b/crawl-ref/source/spells4.h
@@ -21,7 +21,6 @@ int make_a_normal_cloud(coord_def where, int pow, int spread_rate,
killer_type killer = KILL_NONE);
int disperse_monsters(coord_def where, int pow);
-void cast_bend(int pow);
void remove_condensation_shield();
void cast_condensation_shield(int pow);
void remove_divine_shield();
@@ -32,15 +31,11 @@ bool cast_evaporate(int pow, bolt& beem, int potion);
void cast_fulsome_distillation(int powc);
void cast_forescry(int pow);
bool cast_fragmentation(int powc, const dist& spd);
-bool cast_twist(int powc, const coord_def& where);
-void cast_far_strike(int powc);
-void cast_swap(int powc);
bool cast_apportation(int powc, const coord_def& where);
void cast_ignite_poison(int pow);
void cast_intoxicate(int pow);
void cast_mass_sleep(int pow);
void cast_passwall(int pow);
-void cast_rotting(int pow);
bool wielding_rocks();
bool cast_sandblast(int powc, bolt &beam);
void cast_see_invisible(int pow);