Attached Files:
|
0001-Let-elemental-staves-enable-training-Evocations.patch [^] (1,747 bytes) 2013-08-15 20:31 [Show Content] [Hide Content]From b8c77da3bf31aca1583253ff5903a4f4f97fa929 Mon Sep 17 00:00:00 2001
From: BlackSheep <chris.terenzi@gmail.com>
Date: Thu, 15 Aug 2013 14:27:36 -0400
Subject: [PATCH] Let elemental staves enable training Evocations
---
crawl-ref/source/itemprop.cc | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index f21dc08..e8236b1 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -1684,6 +1684,28 @@ skill_type range_skill(object_class_type wclass, int wtype)
return range_skill(wpn);
}
+//True if item is a staff that deals extra damage based on Evocations skill.
+static bool _staff_uses_evocations(const item_def &item)
+{
+ if (!item_type_known(item))
+ return false;
+
+ switch (item.sub_type)
+ {
+ case STAFF_FIRE:
+ case STAFF_COLD:
+ case STAFF_POISON:
+ case STAFF_ENERGY:
+ case STAFF_DEATH:
+ case STAFF_SUMMONING:
+ case STAFF_AIR:
+ case STAFF_EARTH:
+ return true;
+ default:
+ return false;
+ }
+}
+
// Check whether an item can be easily and quickly equipped. This needs to
// know which slot we're considering for cases like where we're already
// wielding a cursed non-weapon.
@@ -1774,7 +1796,7 @@ bool item_skills(const item_def &item, set<skill_type> &skills)
}
// Evokables that don't need to be equipped.
- if (item_is_evokable(item, false, false, false, false, true))
+ if (item_is_evokable(item, false, false, false, false, true) || _staff_uses_evocations(item))
skills.insert(SK_EVOCATIONS);
// Item doesn't have to be equipped, but if it isn't, it needs to be easy
--
1.8.1.2
0001-Don-t-let-unknown-staves-allow-training-Evocations.patch [^] (1,406 bytes) 2013-10-01 20:45 [Show Content] [Hide Content]From c234ca96fa940a427b5c94f4934250709766e003 Mon Sep 17 00:00:00 2001
From: BlackSheep <chris.terenzi@gmail.com>
Date: Tue, 1 Oct 2013 14:43:23 -0400
Subject: [PATCH] Don't let unknown staves allow training Evocations
---
crawl-ref/source/invent.cc | 2 +-
crawl-ref/source/itemprop.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 6c401bd..8371cd2 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -2123,7 +2123,7 @@ bool item_is_evokable(const item_def &item, bool reach, bool known,
return true;
case OBJ_STAVES:
- if (!known && !item_type_known(item)
+ if (known && !item_type_known(item)
|| item.sub_type == STAFF_ENERGY
&& item_type_known(item))
{
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 57bb74d..02e7929 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -1690,7 +1690,7 @@ skill_type range_skill(object_class_type wclass, int wtype)
//True if item is a staff that deals extra damage based on Evocations skill.
static bool _staff_uses_evocations(const item_def &item)
{
- if (!item_type_known(item))
+ if (!item_type_known(item) || item.base_type != OBJ_STAVES)
return false;
switch (item.sub_type)
--
1.8.1.2
|