|
From: <gi...@cr...> - 2011-08-30 22:40:18
|
via 6f51713edefd6916a668328f836397de334ddb17 (commit)
via 582189167f228e93ef2adce21a1f8887754f39e2 (commit)
via 5a1222b911b5cb529e652b8a347776589df142b6 (commit)
via cd8171188d3e1c09ccef6a73553af8433b015c63 (commit)
via 8fb3aca69b0e48e1089f344fcfa2455f95d2058e (commit)
via 8bd967e333dc0d5050f4d643d32a2ff810a9ef06 (commit)
from ed032a34e5d2e1e9e2a115bbeb2d21618dd87d98 (commit)
-----------------------------------------------------------------------
commit 6f51713edefd6916a668328f836397de334ddb17
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 00:37:43 2011 +0200
Don't use SK_POISON_MAGIC in loops as "last magic school".
commit 582189167f228e93ef2adce21a1f8887754f39e2
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 00:25:36 2011 +0200
Fix Healers not getting one of their potions.
Of course, we may use this as an opportunity for a nerf instead, making the
results of this bug permanent.
commit 5a1222b911b5cb529e652b8a347776589df142b6
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 00:22:46 2011 +0200
Don't put food into inventory slot 'y' if this can be avoided.
If butchering fails, mindlessly pressing 'e' 'y' made you waste permafood.
commit cd8171188d3e1c09ccef6a73553af8433b015c63
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 00:04:48 2011 +0200
Let felids weapon-swap stones for Sandblast or arrows for Sticks to Snakes.
(there's no check for useless missiles, but other races don't check for
large rocks on non-Og non-Tr or javelins on Sp Ha Ko either)
commit 8fb3aca69b0e48e1089f344fcfa2455f95d2058e
Author: Pete Hurst <pe...@do...>
Date: Tue Aug 30 22:43:27 2011 +0100
Fix misleading comment in mgen_data.h
commit 8bd967e333dc0d5050f4d643d32a2ff810a9ef06
Author: Adam Borowski <kil...@an...>
Date: Tue Aug 30 23:58:17 2011 +0200
Whitespace fixes.
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/dat/des/entry/simple.des | 26 +++++++++++++-------------
crawl-ref/source/describe.cc | 2 +-
crawl-ref/source/enum.h | 1 +
crawl-ref/source/godpassive.cc | 2 +-
crawl-ref/source/item_use.cc | 10 +++++-----
crawl-ref/source/items.cc | 23 ++++++++++++-----------
crawl-ref/source/mgen_data.h | 2 +-
crawl-ref/source/ng-setup.cc | 2 +-
crawl-ref/source/ng-wanderer.cc | 6 +++---
crawl-ref/source/skills.cc | 4 ++--
crawl-ref/source/spl-book.cc | 2 +-
11 files changed, 41 insertions(+), 39 deletions(-)
diff --git a/crawl-ref/source/dat/des/entry/simple.des b/crawl-ref/source/dat/des/entry/simple.des
index 8d9b7b0..045257a 100644
--- a/crawl-ref/source/dat/des/entry/simple.des
+++ b/crawl-ref/source/dat/des/entry/simple.des
@@ -1217,22 +1217,22 @@ ORIENT: float
WEIGHT: 6
MONS: plant
SHUFFLE: {[
-MAP
+MAP
......
- ..xx==xx..
+ ..xx==xx..
...xx1~~1xx...
..xxxxt11txxxx..
..xxccccccccccxx..
- .xxcc1tt1t111ccxx.
- .xxc11..{[..t1cxx.
- .xxc..........cxx.
- .xxc+cc...1cc+cxx.
- ..xcc..cc++cc1.ccx..
- ..xxct.1c....c.t1cxx..
- ..xxxccccc...1cccccxxx..
- .xxx11..............xxx.
- .xt....t..1t...1t.....x.
- .....1.........t........
+ .xxcc1tt1t111ccxx.
+ .xxc11..{[..t1cxx.
+ .xxc..........cxx.
+ .xxc+cc...1cc+cxx.
+ ..xcc..cc++cc1.ccx..
+ ..xxct.1c....c.t1cxx..
+ ..xxxccccc...1cccccxxx..
+ .xxx11..............xxx.
+ .xt....t..1t...1t.....x.
+ .....1.........t........
...tt...1t.....t1.
.......1........
... ...
@@ -1263,7 +1263,7 @@ MAP
..W.. ..WWW..xxWWx...W...
... .Wxx....WW... ...
..... .Wxx.
- .....
+ .....
ENDMAP
NAME: denvon_entry_hothouse
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 4aecee1..0a0118e 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -4140,7 +4140,7 @@ static std::string _describe_ash_skill_boost()
// No need to list all of them since we boost all or none.
while (it != boosted_skills.end())
{
- if (it->first > SK_CONJURATIONS && it->first <= SK_POISON_MAGIC)
+ if (it->first > SK_CONJURATIONS && it->first <= SK_LAST_MAGIC)
{
boosted_skills.erase(it);
it = boosted_skills.begin();
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 5f57be0..75f073e 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2848,6 +2848,7 @@ enum skill_type
SK_LAST_MUNDANE = SK_UNARMED_COMBAT,
SK_SPELLCASTING,
SK_CONJURATIONS,
+ SK_FIRST_MAGIC_SCHOOL = SK_CONJURATIONS, // not SK_FIRST_MAGIC as no Spc
SK_HEXES,
SK_CHARMS,
SK_SUMMONINGS,
diff --git a/crawl-ref/source/godpassive.cc b/crawl-ref/source/godpassive.cc
index 2ce4ff9..c712240 100644
--- a/crawl-ref/source/godpassive.cc
+++ b/crawl-ref/source/godpassive.cc
@@ -763,7 +763,7 @@ std::map<skill_type, char> ash_get_boosted_skills(eq_type type)
// Boost all spell schools and evoc (to give some appeal to melee).
case (ET_JEWELS):
- for (int i = SK_CONJURATIONS; i <= SK_POISON_MAGIC; ++i)
+ for (int i = SK_FIRST_MAGIC_SCHOOL; i <= SK_LAST_MAGIC; ++i)
boost[skill_type(i)] = bondage;
boost[SK_EVOCATIONS] = bondage;
break;
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 00e43b5..ea8b167 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -244,12 +244,12 @@ bool can_wield(item_def *weapon, bool say_reason,
static bool _valid_weapon_swap(const item_def &item)
{
// Weapons and staves are valid weapons.
- // Also allow missiles to enchant them.
- if (item.base_type == OBJ_WEAPONS || item.base_type == OBJ_STAVES
- || item.base_type == OBJ_MISSILES)
- {
+ if (item.base_type == OBJ_WEAPONS || item.base_type == OBJ_STAVES)
return (you.species != SP_FELID);
- }
+
+ // Also allow missiles to enchant them.
+ if (item.base_type == OBJ_MISSILES)
+ return (true);
// Some misc. items need to be wielded to be evoked.
if (is_deck(item) || item.base_type == OBJ_MISCELLANY
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 47e491f..dd0b565 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1514,11 +1514,11 @@ int find_free_slot(const item_def &i)
if (slotisfree(slot))
return slot;
- int disliked = -1;
+ FixedBitArray<ENDOFPACK> disliked;
if (i.base_type == OBJ_FOOD)
- disliked = 'e' - 'a';
+ disliked.set('e' - 'a'), disliked.set('y' - 'a');
else if (i.base_type == OBJ_POTIONS)
- disliked = 'y' - 'a';
+ disliked.set('y' - 'a');
if (!searchforward)
{
@@ -1529,7 +1529,7 @@ int find_free_slot(const item_def &i)
if (you.inv[slot].defined())
{
if (slot + 1 < ENDOFPACK && !you.inv[slot + 1].defined()
- && slot + 1 != disliked)
+ && !disliked[slot + 1])
{
return (slot + 1);
}
@@ -1537,7 +1537,7 @@ int find_free_slot(const item_def &i)
else
{
if (slot + 1 < ENDOFPACK && you.inv[slot + 1].defined()
- && slot != disliked)
+ && !disliked[slot])
{
return (slot);
}
@@ -1548,16 +1548,17 @@ int find_free_slot(const item_def &i)
// Either searchforward is true, or search backwards failed and
// we re-try searching the oposite direction.
+ int badslot = -1;
// Return first free slot
for (slot = 0; slot < ENDOFPACK; ++slot)
- if (slot != disliked && !you.inv[slot].defined())
- return slot;
+ if (!you.inv[slot].defined())
+ if (disliked[slot])
+ badslot = slot;
+ else
+ return slot;
// If the least preferred slot is the only choice, so be it.
- if (disliked != -1 && !you.inv[disliked].defined())
- return disliked;
-
- return (-1);
+ return (badslot);
#undef slotisfree
}
diff --git a/crawl-ref/source/mgen_data.h b/crawl-ref/source/mgen_data.h
index 16089dc..6e82b63 100644
--- a/crawl-ref/source/mgen_data.h
+++ b/crawl-ref/source/mgen_data.h
@@ -36,7 +36,7 @@ struct mgen_data
// For summoned monsters this is their type of summoning, either the
// spell which summoned them or one of the values of the enumeration
- // mon_summon_type in mon-util.h.
+ // mon_summon_type in mon-enum.h.
int summon_type;
// Where the monster will be created.
diff --git a/crawl-ref/source/ng-setup.cc b/crawl-ref/source/ng-setup.cc
index 7f756c7..e875499 100644
--- a/crawl-ref/source/ng-setup.cc
+++ b/crawl-ref/source/ng-setup.cc
@@ -683,7 +683,7 @@ static void _give_items_skills(const newgame_def& ng)
you.equip[EQ_WEAPON] = -1;
newgame_make_item(0, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE, -1, 1, 1);
- newgame_make_item(2, EQ_NONE, OBJ_POTIONS, POT_HEALING);
+ newgame_make_item(1, EQ_NONE, OBJ_POTIONS, POT_HEALING);
newgame_make_item(2, EQ_NONE, OBJ_POTIONS, POT_HEAL_WOUNDS);
you.skills[SK_FIGHTING] = 2;
diff --git a/crawl-ref/source/ng-wanderer.cc b/crawl-ref/source/ng-wanderer.cc
index 54a69ec..2c45d53 100644
--- a/crawl-ref/source/ng-wanderer.cc
+++ b/crawl-ref/source/ng-wanderer.cc
@@ -610,8 +610,8 @@ static void _give_wanderer_spell(skill_type skill)
// Doing a rejection loop for this because I am lazy.
while (skill == SK_SPELLCASTING || skill == SK_CHARMS)
{
- int value = SK_POISON_MAGIC-SK_CONJURATIONS + 1;
- skill = skill_type(SK_CONJURATIONS + random2(value));
+ int value = SK_LAST_MAGIC - SK_FIRST_MAGIC_SCHOOL + 1;
+ skill = skill_type(SK_FIRST_MAGIC_SCHOOL + random2(value));
}
switch ((int)skill)
@@ -684,7 +684,7 @@ static void _wanderer_decent_equipment(skill_type & skill,
}
// Give the player knowledge of only one spell.
- if (skill >= SK_SPELLCASTING && skill <= SK_POISON_MAGIC)
+ if (skill >= SK_SPELLCASTING && skill <= SK_LAST_MAGIC)
{
for (unsigned i = 0; i < you.spells.size(); ++i)
{
diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc
index 1f2c838..87571ba 100644
--- a/crawl-ref/source/skills.cc
+++ b/crawl-ref/source/skills.cc
@@ -299,7 +299,7 @@ static void _change_skill_level(skill_type exsk, int n)
}
const skill_type best_spell = best_skill(SK_SPELLCASTING,
- SK_POISON_MAGIC);
+ SK_LAST_MAGIC);
if (exsk == SK_SPELLCASTING && you.skills[exsk] == 1
&& best_spell == SK_SPELLCASTING && n > 0)
{
@@ -782,7 +782,7 @@ static int _stat_mult(skill_type exsk, int skill_inc)
// Note: Armour is handled above.
stat = you.dex();
}
- else if (exsk >= SK_SPELLCASTING && exsk <= SK_POISON_MAGIC)
+ else if (exsk >= SK_SPELLCASTING && exsk <= SK_LAST_MAGIC)
{
// These skills are easier for the smart.
stat = you.intel();
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index 1ab73a8..5cef0a6 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -87,7 +87,7 @@ spell_type which_spell_in_book(int sbook_type, int spl)
int player_spell_skills()
{
int sum = 0;
- for (int i = SK_SPELLCASTING; i <= SK_POISON_MAGIC; i++)
+ for (int i = SK_SPELLCASTING; i <= SK_LAST_MAGIC; i++)
sum += you.skills[i];
return (sum);
--
Dungeon Crawl Stone Soup
|