Attached Files |
spriggan-druid.patch [^] (10,996 bytes) 2014-02-23 09:38 [Show Content] [Hide Content]From 9eaec2353ef24278d5116f69f4ee3d515489862b Mon Sep 17 00:00:00 2001
From: Sage <SageBasilMint@gmail.com>
Date: Sun, 23 Feb 2014 00:06:48 -0800
Subject: [PATCH] Changes to spriggan druids.
Remove Sunray, remove might from Druid's Call and make it take 3 turns,
and give spriggan druids Might Other.
Sunray was strange and inconsistent with other spells in ways that
didn't make gameplay more interesting.
Mightdra at the drop of a hat seems a little excessive, and plays out
poorly on Swamp:$. While the druids' summoning changes make
them resemble ironbrand convokers to a degree, I think that they remain
sufficiently distinct: druids convoke creatures that are able to abuse
the terrain, and in order to keep from floundering in shallow water,
you very often have to take not-insignificant damage from awakened
trees. Additionally, druids can might beasts more rapidly than
convokers, and are difficult to run away from.
---
crawl-ref/source/dat/descript/spells.txt | 2 +-
crawl-ref/source/enum.h | 3 +++
crawl-ref/source/mon-cast.cc | 29 ++++++++++++++++++++--------
crawl-ref/source/mon-cast.h | 1 +
crawl-ref/source/mon-ench.cc | 31 ++++++++++++++++++++++++++++--
crawl-ref/source/mon-info.cc | 4 ++++
crawl-ref/source/mon-info.h | 1 +
crawl-ref/source/mon-spll.h | 4 ++--
crawl-ref/source/spl-data.h | 2 ++
9 files changed, 64 insertions(+), 13 deletions(-)
diff --git a/crawl-ref/source/dat/descript/spells.txt b/crawl-ref/source/dat/descript/spells.txt
index 8e79912..6fd45d5 100644
--- a/crawl-ref/source/dat/descript/spells.txt
+++ b/crawl-ref/source/dat/descript/spells.txt
@@ -423,7 +423,7 @@ Drain Life spell
Druid's Call spell
This spell allows a druid to recall a woodland creature or two from a location
-on the same dungeon level.
+on the same dungeon level. The casting time is longer than usual.
%%%%
Energy Bolt spell
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 3c332a8..12fdbdf 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1761,6 +1761,7 @@ enum enchant_type
ENCH_GRAND_AVATAR,
ENCH_SAP_MAGIC,
ENCH_SHROUD,
+ ENCH_DRUIDS_CALL,
// Update enchantment names in mon-ench.cc when adding or removing
// enchantments.
NUM_ENCHANTMENTS
@@ -3762,7 +3763,9 @@ enum spell_type
SPELL_IOOD,
SPELL_INK_CLOUD,
SPELL_MIGHT,
+#if TAG_MAJOR_VERSION == 34
SPELL_SUNRAY,
+#endif
SPELL_AWAKEN_FOREST,
SPELL_DRUIDS_CALL,
SPELL_IRON_ELEMENTALS,
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc
index 4732d64..558baf6 100644
--- a/crawl-ref/source/mon-cast.cc
+++ b/crawl-ref/source/mon-cast.cc
@@ -72,6 +72,7 @@ static int _mons_cause_fear(monster* mons, bool actual = true);
static int _mons_mass_confuse(monster* mons, bool actual = true);
static int _mons_available_tentacles(monster* head);
static coord_def _mons_fragment_target(monster *mons);
+static bool _valid_druid_spell_target(const monster* caller, const monster* callee, bool can_see);
void init_mons_spells()
{
@@ -199,8 +200,13 @@ static bool _set_allied_target(monster* caster, bolt& pbolt, bool ignore_genus)
bool got_target = false;
+ if (caster->type == MONS_SPRIGGAN_DRUID
+ && _valid_druid_spell_target(caster, *targ, true)
+ && _flavour_benefits_monster(pbolt.flavour, **targ))
+ got_target = true;
+
// Shedu only heal each other.
- if (mons_is_shedu(caster))
+ else if (mons_is_shedu(caster))
{
if (mons_is_shedu(*targ) && caster->mid == targ->number
&& caster->number == targ->mid
@@ -1475,11 +1481,11 @@ static bool _valid_blink_away_ally(const monster* caster, const monster* target,
&& target->pos().distance_from(foepos) < 3;
}
-static bool _valid_druids_call_target(const monster* caller, const monster* callee)
+static bool _valid_druid_spell_target(const monster* caller, const monster* callee, bool can_see)
{
return mons_aligned(caller, callee) && mons_is_beast(callee->type)
&& !callee->is_shapeshifter()
- && !caller->see_cell(callee->pos())
+ && (can_see == caller->see_cell(callee->pos()))
&& mons_habitat(callee) != HT_WATER
&& mons_habitat(callee) != HT_LAVA;
}
@@ -1906,9 +1912,11 @@ static bool _ms_waste_of_time(const monster* mon, spell_type monspell)
case SPELL_DRUIDS_CALL:
// Don't cast unless there's at least one valid target
+ if (mon->has_ench(ENCH_BREATH_WEAPON))
+ return true;
for (monster_iterator mi; mi; ++mi)
{
- if (_valid_druids_call_target(mon, *mi))
+ if (_valid_druid_spell_target(mon, *mi, false))
return false;
}
return true;
@@ -2346,12 +2354,12 @@ static bool _awaken_vines(monster* mon, bool test_only = false)
}
}
-static void _cast_druids_call(const monster* mon)
+void cast_druids_call(const monster* mon)
{
vector<monster*> mon_list;
for (monster_iterator mi; mi; ++mi)
{
- if (_valid_druids_call_target(mon, *mi))
+ if (_valid_druid_spell_target(mon, *mi, false))
mon_list.push_back(*mi);
}
@@ -2372,7 +2380,6 @@ static void _cast_druids_call(const monster* mon)
{
mon_list[i]->behaviour = BEH_SEEK;
mon_list[i]->foe = mon->foe;
- mon_list[i]->add_ench(ENCH_MIGHT);
mon_list[i]->flags |= MF_WAS_IN_VIEW;
simple_monster_message(mon_list[i], " answers the druid's call!");
@@ -5109,8 +5116,14 @@ void mons_cast(monster* mons, bolt &pbolt, spell_type spell_cast,
return;
case SPELL_DRUIDS_CALL:
- _cast_druids_call(mons);
+ {
+ mon_enchant recall_timer =
+ mon_enchant(ENCH_DRUIDS_CALL, 1, mons, 30);
+ mons->add_ench(recall_timer);
+ mons->speed_increment -= 48; // spriggan druids are speed 16
+
return;
+ }
case SPELL_BATTLESPHERE:
cast_battlesphere(mons, min(6 * mons->spell_hd(spell_cast), 200), mons->god, false);
diff --git a/crawl-ref/source/mon-cast.h b/crawl-ref/source/mon-cast.h
index d01b02e..35bfaa6 100644
--- a/crawl-ref/source/mon-cast.h
+++ b/crawl-ref/source/mon-cast.h
@@ -27,6 +27,7 @@ bool setup_mons_cast(monster* mons, bolt &pbolt, spell_type spell_cast,
void mons_cast_haunt(monster* mons);
unsigned short mons_word_of_recall(monster* mons, unsigned short recall_target);
+void cast_druids_call(const monster* mons);
void mons_cast_spectral_orcs(monster* mons);
void setup_breath_timeout(monster* mons);
#endif
diff --git a/crawl-ref/source/mon-ench.cc b/crawl-ref/source/mon-ench.cc
index c216095..be77243 100644
--- a/crawl-ref/source/mon-ench.cc
+++ b/crawl-ref/source/mon-ench.cc
@@ -1056,7 +1056,7 @@ void monster::timeout_enchantments(int levels)
case ENCH_BLIND: case ENCH_WORD_OF_RECALL: case ENCH_INJURY_BOND:
case ENCH_FLAYED: case ENCH_BARBS: case ENCH_BUILDING_CHARGE:
case ENCH_AGILE: case ENCH_FROZEN: case ENCH_EPHEMERAL_INFUSION:
- case ENCH_BLACK_MARK: case ENCH_SAP_MAGIC:
+ case ENCH_BLACK_MARK: case ENCH_SAP_MAGIC: case ENCH_DRUIDS_CALL:
lose_ench_levels(i->second, levels);
break;
@@ -1892,6 +1892,33 @@ void monster::apply_enchantment(const mon_enchant &me)
}
break;
+ case ENCH_DRUIDS_CALL:
+ // Nearly identical to ENCH_WORD_OF_RECALL, separated in case
+ // it is changed in the future.
+ if (silenced(pos()) || paralysed() || petrified()
+ || confused() || asleep() || has_ench(ENCH_FEAR)
+ || has_ench(ENCH_BREATH_WEAPON))
+ {
+ this->speed_increment += me.duration;
+ del_ench(ENCH_DRUIDS_CALL, true, false);
+ if (you.can_see(this))
+ {
+ mprf("%s convocation of nature is interrupted.",
+ name(DESC_ITS).c_str());
+ }
+ break;
+ }
+
+ if (decay_enchantment(en))
+ {
+ cast_druids_call(this);
+ mon_enchant breath_timeout =
+ mon_enchant(ENCH_BREATH_WEAPON, 1, this,
+ (4 + random2(9)) * BASELINE_DELAY);
+ add_ench(breath_timeout);
+ }
+ break;
+
case ENCH_INJURY_BOND:
// It's hard to absorb someone else's injuries when you're dead
if (!me.agent() || !me.agent()->alive()
@@ -2176,7 +2203,7 @@ static const char *enchant_names[] =
"iood_charged", "fire_vuln", "tornado_cooldown", "siren_song",
"barbs", "building_charge", "poison_vuln", "icemail", "agile",
"frozen", "ephemeral_infusion", "black_mark", "grand_avatar",
- "sap magic", "shroud", "buggy",
+ "sap magic", "shroud", "druids_call", "buggy",
};
static const char *_mons_enchantment_name(enchant_type ench)
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc
index 00fa84d..710025a 100644
--- a/crawl-ref/source/mon-info.cc
+++ b/crawl-ref/source/mon-info.cc
@@ -202,6 +202,8 @@ static monster_info_flags ench_to_mb(const monster& mons, enchant_type ench)
return MB_SAP_MAGIC;
case ENCH_SHROUD:
return MB_SHROUD;
+ case ENCH_DRUIDS_CALL:
+ return MB_DRUIDS_CALL;
default:
return NUM_MB_FLAGS;
}
@@ -1603,6 +1605,8 @@ vector<string> monster_info::attributes() const
v.push_back("magic-sapped");
if (is(MB_SHROUD))
v.push_back("shrouded");
+ if (is(MB_DRUIDS_CALL))
+ v.push_back("convoking nature");
return v;
}
diff --git a/crawl-ref/source/mon-info.h b/crawl-ref/source/mon-info.h
index 3671526..1abfce6 100644
--- a/crawl-ref/source/mon-info.h
+++ b/crawl-ref/source/mon-info.h
@@ -115,6 +115,7 @@ enum monster_info_flags
MB_BLACK_MARK,
MB_SAP_MAGIC,
MB_SHROUD,
+ MB_DRUIDS_CALL,
NUM_MB_FLAGS
};
diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h
index 2d86d3f..147297f 100644
--- a/crawl-ref/source/mon-spll.h
+++ b/crawl-ref/source/mon-spll.h
@@ -1478,9 +1478,9 @@
{ MST_SPRIGGAN_DRUID,
{
- SPELL_SUNRAY,
SPELL_AWAKEN_FOREST,
- SPELL_NO_SPELL,
+ SPELL_MIGHT_OTHER,
+ SPELL_MIGHT_OTHER,
SPELL_DRUIDS_CALL,
SPELL_NO_SPELL,
SPELL_MINOR_HEALING
diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h
index f425b4d..7033ed0 100644
--- a/crawl-ref/source/spl-data.h
+++ b/crawl-ref/source/spl-data.h
@@ -2580,6 +2580,7 @@ struct spell_desc
true
},
+#if TAG_MAJOR_VERSION == 34
{
SPELL_SUNRAY, "Sunray",
SPTYP_CONJURATION,
@@ -2592,6 +2593,7 @@ struct spell_desc
true,
false
},
+#endif
{
SPELL_AWAKEN_FOREST, "Awaken Forest",
--
1.7.9.5
|