Skip to content

Commit

Permalink
Remove staves of enchantment
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Campbell committed Sep 15, 2012
1 parent 1ef2bfe commit 618c8d0
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 38 deletions.
11 changes: 8 additions & 3 deletions crawl-ref/source/acquire.cc
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,14 @@ static int _acquirement_staff_subtype(const has_vector& already_has)
// Try to pick an enhancer staff matching the player's best skill.
skill_type best_spell_skill = best_skill(SK_SPELLCASTING, SK_EVOCATIONS);
bool found_enhancer = false;
int result = random2(NUM_STAVES);
int result = 0;
#if TAG_MAJOR_VERSION == 34
do
result = random2(NUM_STAVES);
while (result == STAFF_ENCHANTMENT);
#else
result = random2(NUM_STAVES);
#endif

#define TRY_GIVE(x) { if (you.type_ids[OBJ_STAVES][x] != ID_KNOWN_TYPE) \
{result = x; found_enhancer = true;} }
Expand All @@ -665,8 +672,6 @@ static int _acquirement_staff_subtype(const has_vector& already_has)
case SK_POISON_MAGIC: TRY_GIVE(STAFF_POISON); break;
case SK_NECROMANCY: TRY_GIVE(STAFF_DEATH); break;
case SK_CONJURATIONS: TRY_GIVE(STAFF_CONJURATION); break;
case SK_CHARMS: TRY_GIVE(STAFF_ENCHANTMENT); break;
case SK_HEXES: TRY_GIVE(STAFF_ENCHANTMENT); break;
case SK_SUMMONINGS: TRY_GIVE(STAFF_SUMMONING); break;
default: break;
}
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/dat/des/portals/wizlab.des
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,7 @@ TAGS: no_item_gen no_monster_gen no_rotate allow_dup
SUBST: T = t.
KMONS: 8 = orange crystal statue name:Statue_of_Wucad_Mu n_rpl n_the \
hd:20 hp:300 tile:mons_wucad_mu_statue
KITEM: 8 = staff of enchantment unrand:staff_of_wucad_mu, book of enchantments
KITEM: 8 = staff of channeling unrand:staff_of_wucad_mu, book of enchantments
COLOUR: =c = darkgrey
COLOUR: t = lightred / red w:3
TILE: t = dngn_tree_lightred / dngn_tree_red w:4 / dngn_tree_yellow w:4
Expand Down
5 changes: 2 additions & 3 deletions crawl-ref/source/dat/des/sprint/arena_sprint.des
Original file line number Diff line number Diff line change
Expand Up @@ -1087,11 +1087,10 @@ KFEAT: L = armour shop count:17 greed:12 type:Basic suffix:Armour use_all ; \
mundane not_cursed buckler | mundane not_cursed pair of gloves |\
mundane not_cursed helmet
KFEAT: M = food shop count:17 type:Bee suffix:Food greed:4 ; royal jelly q:3
KFEAT: N = weapon shop type:Staff suffix:Store count:10 use_all greed:30 ; \
KFEAT: N = weapon shop type:Staff suffix:Store count:9 use_all greed:30 ; \
staff of summoning | staff of wizardry |\
staff of fire | staff of air | staff of earth | staff of cold |\
staff of poison | staff of death | staff of enchantment |\
staff of conjuration
staff of poison | staff of death | staff of conjuration
KFEAT: Q = weapon shop type:Weapon suffix:Rack count:17 use_all greed:30 ; \
mundane not_cursed quick blade | mundane not_cursed demon blade |\
mundane not_cursed triple sword | mundane not_cursed broad axe |\
Expand Down
6 changes: 0 additions & 6 deletions crawl-ref/source/dat/descript/items.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1589,12 +1589,6 @@ This staff increases the power of earth spells cast by its wielder. If the
wielder is skilled in evocations, it can crush those struck by it, dealing even
greater damage if they are also skilled in earth magic.
%%%%
staff of enchantment

This staff increases the power of charm and hex spells cast by its wielder. In
the hands of a skilled person, it also increases resistance to hostile
enchantments.
%%%%
staff of energy

This staff greatly reduces the hunger cost of the wielder's magical spells.
Expand Down
1 change: 0 additions & 1 deletion crawl-ref/source/godpassive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,6 @@ map<skill_type, int8_t> ash_get_boosted_skills(eq_type type)
if (wpn->base_type == OBJ_STAVES
&& (wpn->sub_type == STAFF_POWER
|| wpn->sub_type == STAFF_CONJURATION
|| wpn->sub_type == STAFF_ENCHANTMENT
|| wpn->sub_type == STAFF_ENERGY
|| wpn->sub_type == STAFF_WIZARDRY))
{
Expand Down
2 changes: 2 additions & 0 deletions crawl-ref/source/itemname.cc
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,9 @@ static const char* staff_type_name(int stafftype)
case STAFF_ENERGY: return "energy";
case STAFF_DEATH: return "death";
case STAFF_CONJURATION: return "conjuration";
#if TAG_MAJOR_VERSION == 34
case STAFF_ENCHANTMENT: return "enchantment";
#endif
case STAFF_AIR: return "air";
case STAFF_EARTH: return "earth";
case STAFF_SUMMONING: return "summoning";
Expand Down
2 changes: 2 additions & 0 deletions crawl-ref/source/itemprop-enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,9 @@ enum stave_type
STAFF_ENERGY,
STAFF_DEATH,
STAFF_CONJURATION,
#if TAG_MAJOR_VERSION == 34
STAFF_ENCHANTMENT,
#endif
STAFF_SUMMONING,
STAFF_AIR,
STAFF_EARTH,
Expand Down
6 changes: 6 additions & 0 deletions crawl-ref/source/makeitem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2840,7 +2840,13 @@ static void _generate_staff_item(item_def& item, int force_type, int item_level)
{
if (force_type == OBJ_RANDOM)
{
#if TAG_MAJOR_VERSION == 34
do
item.sub_type = random2(NUM_STAVES);
while (item.sub_type == STAFF_ENCHANTMENT);
#else
item.sub_type = random2(NUM_STAVES);
#endif

// staves of energy/channeling are 25% less common, wizardry/power
// are more common
Expand Down
2 changes: 2 additions & 0 deletions crawl-ref/source/melee_attack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3439,7 +3439,9 @@ void melee_attack::apply_staff_damage()
case STAFF_POWER:
case STAFF_CHANNELING:
case STAFF_CONJURATION:
#if TAG_MAJOR_VERSION == 34
case STAFF_ENCHANTMENT:
#endif
case STAFF_ENERGY:
case STAFF_WIZARDRY:
break;
Expand Down
4 changes: 0 additions & 4 deletions crawl-ref/source/monster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3956,10 +3956,6 @@ int monster::res_magic() const
if (jewellery != NON_ITEM && mitm[jewellery].base_type == OBJ_JEWELLERY)
u += get_jewellery_res_magic(mitm[jewellery], false);

const item_def *w = primary_weapon();
if (w && w->base_type == OBJ_STAVES && w->sub_type == STAFF_ENCHANTMENT)
u += 9 + hit_dice * 2; // assume skill of 2/3 HD

if (has_ench(ENCH_LOWERED_MR))
u /= 2;

Expand Down
17 changes: 0 additions & 17 deletions crawl-ref/source/player.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2022,19 +2022,6 @@ int player_spec_conj()
return sc;
}

int player_spec_ench()
{
int se = 0;

// All effects negated by magical suppression should go in here.
if (!you.suppressed())
{
// Staves
se += player_equip(EQ_STAFF, STAFF_ENCHANTMENT);
}

return se;
}

int player_spec_summ()
{
Expand Down Expand Up @@ -6668,10 +6655,6 @@ int player_res_magic(bool calc_unid, bool temp)

// rings of magic resistance
rm += 40 * player_equip(EQ_RINGS, RING_PROTECTION_FROM_MAGIC, calc_unid);

// Enchantment skill through staff of enchantment (up to 90).
if (player_equip(EQ_STAFF, STAFF_ENCHANTMENT, calc_unid))
rm += 9 + max(you.skill(SK_CHARMS, 3), you.skill(SK_HEXES, 3));
}

// Mutations
Expand Down
1 change: 0 additions & 1 deletion crawl-ref/source/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,6 @@ int player_spec_cold(void);
int player_spec_conj(void);
int player_spec_death(void);
int player_spec_earth(void);
int player_spec_ench(void);
int player_spec_fire(void);
int player_spec_holy(void);
int player_spec_poison(void);
Expand Down
2 changes: 0 additions & 2 deletions crawl-ref/source/spl-cast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,6 @@ static int _spell_enhancement(unsigned int typeflags)
if (typeflags & SPTYP_CONJURATION)
enhanced += player_spec_conj();

if (typeflags & (SPTYP_HEXES|SPTYP_CHARMS))
enhanced += player_spec_ench();

if (typeflags & SPTYP_SUMMONING)
enhanced += player_spec_summ();
Expand Down

0 comments on commit 618c8d0

Please sign in to comment.