Skip to content

Commit

Permalink
Remove potions of restore abilities
Browse files Browse the repository at this point in the history
In cases where severe stat drain does occur, the XP timer should force players
to press on and cure it by killing things rather than allowing them to just
quaff a common consumable to heal it, as with draining.

The potion's weight is split equally between flight, lignification and
degeneration.
  • Loading branch information
Chris Campbell committed Apr 22, 2015
1 parent 27d2a07 commit ea7ae5b
Show file tree
Hide file tree
Showing 21 changed files with 56 additions and 67 deletions.
3 changes: 1 addition & 2 deletions crawl-ref/source/dat/des/altar/overflow.des
Expand Up @@ -2368,8 +2368,7 @@ DEPTH: D:2-9, Orc, !Orc:$
KFEAT: _ = altar_zin
KFEAT: v = general shop name:Zin type:Purification suffix:Station count:1 \
greed:30 ; \
potion of curing | potion of restore abilities w:1 | \
potion of cure mutation w:1
potion of curing | potion of cure mutation w:1
COLOUR: c = white
COLOUR: ' = white
TILE: c = wall_church
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/dat/des/branches/depths_encompass.des
Expand Up @@ -133,7 +133,7 @@ ITEM: any scroll
KITEM: e = any / any good_item w:4
KITEM: 8B = potion of experience ident:type q:1 / any good_item
KITEM: 9 = |
KITEM: 0 = potion of restore abilities ident:type
KITEM: 0 = potion of brilliance ident:type
KFEAT: 8e = >
KFEAT: W = w
NSUBST: h = 1:+ / *:x, H = 1:+ / *:x
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/dat/des/branches/pan.des
Expand Up @@ -3482,7 +3482,7 @@ ITEM: w:5 any / potion of curing
ITEM: any / potion of heal wounds
ITEM: acquire any
ITEM: potion of cure mutation
ITEM: potion of restore abilities
ITEM: potion of might / potion of brilliance / potion of agility
ITEM: any
NSUBST: i = 2=ghh / 3=ghhiii / *:i
MONS: angel
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/dat/des/builder/alphashops.des
Expand Up @@ -147,7 +147,7 @@
"rapier | amulet of resist corrosion | amulet of resist mutation | " ..
"royal jelly | potion of resistance | scroll of recharging | robe | " ..
"ring mail | scroll of random uselessness | scroll of remove curse | " ..
"wand of random effects | potion of restore abilities"
"wand of random effects"

elseif s == "S" then i = "scimitar | amulet of stasis | short sword | " ..
"sling bullet | scale mail | book of summonings | book of the sky | " ..
Expand Down
3 changes: 1 addition & 2 deletions crawl-ref/source/dat/des/builder/food.des
Expand Up @@ -125,8 +125,7 @@ WEIGHT: 15
TAGS: uniq_second_food extra chance_second_food
SUBVAULT: X : fruiting_plant
SUBVAULT: W : fruiting_plant
KITEM: p = potion of restore abilities w:2 / potion of poison w:3 / \
potion of ambrosia w:1 / nothing
KITEM: p = potion of poison w:5 / potion of ambrosia w:1 / nothing
MONS: big kobold ; wand of magic darts ident:type . short sword
MAP
XXXXX..WWWWW
Expand Down
6 changes: 3 additions & 3 deletions crawl-ref/source/dat/des/builder/shops.des
Expand Up @@ -426,9 +426,9 @@ DEPTH: D:6-, Depths
TAGS: no_monster_gen no_trap_gen
SHUFFLE: _s
KFEAT: s = general shop type:Hallowed suffix:Reliquary ; \
potion of heal wounds | potion of curing | potion of restore abilities | \
wand of heal wounds | tomahawk ego:silver w:2 | javelin ego:silver w:2 | \
bolt ego:silver w:2 | any weapon ego:holy_wrath | scroll of holy word | \
potion of heal wounds | potion of curing | wand of heal wounds | \
tomahawk ego:silver w:2 | javelin ego:silver w:2 | bolt ego:silver w:2 |\
any weapon ego:holy_wrath | scroll of holy word |\
sling bullet ego:silver w:2 | amulet of faith w:2 | potion of cure mutation | \
ring of positive energy w:5 | any armour ego:positive_energy w:5
KFEAT: _ = altar_the_shining_one / altar_zin / altar_elyvilon
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/dat/des/portals/ossuary.des
Expand Up @@ -489,7 +489,7 @@ ITEM: scroll of random uselessness w:20 / scroll of immolation / \
scroll of identify / scroll of remove curse / \
potion of mutation w:5 / potion of ambrosia w:5 / \
potion of degeneration / potion of lignification / \
potion of restore abilities / potion of curing w:15
potion of flight / potion of curing w:15
# and sometimes mostly useless ones
ITEM: scroll of noise / scroll of random uselessness w:20 / \
scroll of immolation / potion of mutation w:5 / \
Expand Down
9 changes: 4 additions & 5 deletions crawl-ref/source/dat/des/portals/sewer.des
Expand Up @@ -289,7 +289,7 @@ KFEAT: E = altar_zin / altar_elyvilon w:30
MONS: jackal / w:3 nothing, kobold / w:5 nothing, big kobold
SHUFFLE: de
ITEM: potion of curing / potion of heal wounds
ITEM: potion of flight / potion of restore abilities
ITEM: potion of flight
MONS: rat w:15 / river rat w:7 / nothing w:3
MAP
ccc
Expand Down Expand Up @@ -1355,10 +1355,9 @@ SUBST: W = WWWw.
COLOUR: - = lightgreen
SUBST: - = wwwW-
ITEM: potion of curing / potion of heal wounds / \
potion of restore abilities / potion of might w:2 / \
potion of brilliance w:2 / potion of agility w:2 / \
potion of flight w:4 / any scroll w:7 / any armour w:2 / \
any weapon w:2
potion of might w:2 / potion of brilliance w:2 / \
potion of agility w:2 / potion of flight w:14 / \
any scroll w:7 / any armour w:2 / any weapon w:2
NSUBST: d = 1:*
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Expand Down
3 changes: 1 addition & 2 deletions crawl-ref/source/dat/des/portals/wizlab.des
Expand Up @@ -1188,8 +1188,7 @@ KMONS: 8 = orange crystal statue name:Statue_of_Wucad_Mu n_rpl n_the \
draining_gaze.40.natural;\
mass_confusion.40.natural;\
shadow_creatures.80.natural
KITEM: 8 = staff of energy unrand:staff_of_wucad_mu, \
potion of restore abilities ident:type
KITEM: 8 = staff of energy unrand:staff_of_wucad_mu
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
3 changes: 1 addition & 2 deletions crawl-ref/source/dat/des/sprint/arena_sprint.des
Expand Up @@ -1049,8 +1049,7 @@ KFEAT: FS = distillery shop use_all count:17 greed:7 ; \
potion of agility q:6 | potion of might q:6 | potion of brilliance q:6 |\
potion of cure mutation | potion of cure mutation q:2 | potion of cure mutation q:3 |\
potion of resistance q:6 | potion of resistance q:6 | potion of magic q:6 |\
potion of magic q:6 | potion of berserk rage q:5 | potion of berserk rage q:5 |\
potion of restore abilities q:10 | potion of restore abilities q:10
potion of magic q:6 | potion of berserk rage q:5 | potion of berserk rage q:5
KFEAT: O = distillery shop type:Do-It-Yourself suffix:Clinic count:17 use_all greed:7 ; \
potion of heal wounds q:3 | potion of heal wounds q:3 | potion of heal wounds q:3 |\
potion of heal wounds q:3 | potion of heal wounds q:3 | potion of heal wounds q:3 |\
Expand Down
1 change: 0 additions & 1 deletion crawl-ref/source/dat/des/sprint/linesprint.des
Expand Up @@ -30,7 +30,6 @@ function general_item_setup(e)
potion of curing ident:all w:20 /\
potion of might ident:all / potion of agility ident:all /\
potion of haste ident:all /\
potion of restore abilities ident:all w:5 /\
potion of resistance ident:all w:5 / potion of brilliance ident:all /\
potion of berserk rage ident:all /\
potion of cure mutation ident:all")
Expand Down
1 change: 0 additions & 1 deletion crawl-ref/source/dat/des/sprint/pitsprint.des
Expand Up @@ -183,7 +183,6 @@ function general_item_setup(e)
potion of curing ident:all w:20 /\
potion of might ident:all / potion of agility ident:all /\
potion of haste ident:all /\
potion of restore abilities ident:all w:5 /\
potion of resistance ident:all w:5 / potion of brilliance ident:all /\
potion of berserk rage ident:all /\
potion of cure mutation ident:all")
Expand Down
1 change: 0 additions & 1 deletion crawl-ref/source/dat/des/sprint/zigsprint.des
Expand Up @@ -760,7 +760,6 @@ KITEM: K = potion of curing q:9 ident:all, \
potion of experience q:1 ident:all, \
potion of resistance q:4 ident:all, \
potion of haste q:5 ident:all, \
potion of restore abilities q:2 ident:all, \
potion of invisibility q:2 ident:all, \
potion of brilliance q:2 ident:all
KITEM: L = scroll of blinking q:3 ident:all, \
Expand Down
5 changes: 0 additions & 5 deletions crawl-ref/source/dat/descript/items.txt
Expand Up @@ -941,11 +941,6 @@ potion of resistance
A potion which grants you temporary resistance to a variety of harmful effects:
fire, cold, electricity, poison, and acid.
%%%%
potion of restore abilities

A potion which restores the abilities of one who drinks it. It may also be used
to restore breath after using a breath weapon.
%%%%
potion of slowing

A potion which slows your actions.
Expand Down
3 changes: 1 addition & 2 deletions crawl-ref/source/dat/dlua/ziggurat.lua
Expand Up @@ -444,8 +444,7 @@ local function ziggurat_create_loot_at(c)
end

-- dgn.good_scrolls is a list of items with total weight 1000
local good_loot = dgn.item_spec("* no_pickup no_mimic w:6960 /" ..
"potion of restore abilities no_pickup no_mimic w:40 /" ..
local good_loot = dgn.item_spec("* no_pickup no_mimic w:7000 /" ..
dgn.good_scrolls)
local super_loot = dgn.item_spec("| no_pickup no_mimic w:7000 /" ..
"potion of experience no_pickup no_mimic w:190 /" ..
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/enum.h
Expand Up @@ -3777,8 +3777,8 @@ enum potion_type
#endif
POT_EXPERIENCE,
POT_MAGIC,
POT_RESTORE_ABILITIES,
#if TAG_MAJOR_VERSION == 34
POT_RESTORE_ABILITIES,
POT_STRONG_POISON,
#endif
POT_BERSERK_RAGE,
Expand Down
2 changes: 2 additions & 0 deletions crawl-ref/source/itemname.cc
Expand Up @@ -685,7 +685,9 @@ const char* potion_type_name(int potiontype)
#endif
case POT_EXPERIENCE: return "experience";
case POT_MAGIC: return "magic";
#if TAG_MAJOR_VERSION == 34
case POT_RESTORE_ABILITIES: return "restore abilities";
#endif
case POT_BERSERK_RAGE: return "berserk rage";
case POT_CURE_MUTATION: return "cure mutation";
case POT_MUTATION: return "mutation";
Expand Down
7 changes: 3 additions & 4 deletions crawl-ref/source/makeitem.cc
Expand Up @@ -1415,22 +1415,21 @@ static void _generate_potion_item(item_def& item, int force_type,
// total weight is 1065
stype = random_choose_weighted(191, POT_CURING,
95, POT_HEAL_WOUNDS,
75, POT_RESTORE_ABILITIES,
66, POT_POISON,
66, POT_MIGHT,
66, POT_AGILITY,
66, POT_BRILLIANCE,
63, POT_HASTE,
60, POT_FLIGHT,
60, POT_LIGNIFY,
52, POT_DEGENERATION,
35, POT_INVISIBILITY,
35, POT_FLIGHT,
35, POT_RESISTANCE,
35, POT_MAGIC,
35, POT_BERSERK_RAGE,
35, POT_MUTATION,
35, POT_LIGNIFY,
34, POT_CANCELLATION,
34, POT_AMBROSIA,
27, POT_DEGENERATION,
23, POT_CURE_MUTATION,
12, POT_BENEFICIAL_MUTATION,
2, POT_EXPERIENCE,
Expand Down
58 changes: 29 additions & 29 deletions crawl-ref/source/potion.cc
Expand Up @@ -622,34 +622,6 @@ class PotionMagic : public PotionEffect
}
};

class PotionRestoreAbilities : public PotionEffect
{
private:
PotionRestoreAbilities() : PotionEffect(POT_RESTORE_ABILITIES) { }
DISALLOW_COPY_AND_ASSIGN(PotionRestoreAbilities);
public:
static const PotionRestoreAbilities &instance()
{
static PotionRestoreAbilities inst; return inst;
}

bool effect(bool=true, int=40) const
{
bool nothing_happens = true;
if (you.duration[DUR_BREATH_WEAPON])
{
mprf(MSGCH_RECOVERY, "You have got your breath back.");
you.duration[DUR_BREATH_WEAPON] = 0;
nothing_happens = false;
}

// Give a message if no message otherwise.
if (!restore_stat(STAT_ALL, 0, false) && nothing_happens)
mpr("You feel refreshed.");
return nothing_happens;
}
};

class PotionBerserk : public PotionEffect
{
private:
Expand Down Expand Up @@ -1124,6 +1096,34 @@ class PotionSlowing : public PotionEffect
return slow_player(10 + random2(pow));
}
};

class PotionRestoreAbilities : public PotionEffect
{
private:
PotionRestoreAbilities() : PotionEffect(POT_RESTORE_ABILITIES) { }
DISALLOW_COPY_AND_ASSIGN(PotionRestoreAbilities);
public:
static const PotionRestoreAbilities &instance()
{
static PotionRestoreAbilities inst; return inst;
}

bool effect(bool=true, int=40) const
{
bool nothing_happens = true;
if (you.duration[DUR_BREATH_WEAPON])
{
mprf(MSGCH_RECOVERY, "You have got your breath back.");
you.duration[DUR_BREATH_WEAPON] = 0;
nothing_happens = false;
}

// Give a message if no message otherwise.
if (!restore_stat(STAT_ALL, 0, false) && nothing_happens)
mpr("You feel refreshed.");
return nothing_happens;
}
};
#endif

// placeholder 'buggy' potion
Expand Down Expand Up @@ -1175,8 +1175,8 @@ static const PotionEffect* potion_effects[] =
#endif
&PotionExperience::instance(),
&PotionMagic::instance(),
&PotionRestoreAbilities::instance(),
#if TAG_MAJOR_VERSION == 34
&PotionRestoreAbilities::instance(),
&PotionPoison::instance(),
#endif
&PotionBerserk::instance(),
Expand Down
6 changes: 3 additions & 3 deletions crawl-ref/source/rltiles/dc-item.txt
Expand Up @@ -838,9 +838,9 @@ i-decay POT_REMOVEME5
i-confusion POT_REMOVE_ME
i-experience POT_EXPERIENCE
i-magic POT_MAGIC
i-restore-abilities POT_RESTORE_ABILITIES
# please remove when TAG_MAJOR_VERSION is bumped
i-strong-poison POT_STRONG_POISON
# remove these 2 when TAG_MAJOR_VERSION is bumped
i-restore-abilities POT_REMOVEME6
i-strong-poison POT_REMOVEME7
i-berserk-rage POT_BERSERK_RAGE
i-cure-mutation POT_CURE_MUTATION
i-mutation POT_MUTATION
Expand Down
2 changes: 2 additions & 0 deletions crawl-ref/source/shopping.cc
Expand Up @@ -1520,7 +1520,9 @@ unsigned int item_value(item_def item, bool ident)

case POT_BERSERK_RAGE:
case POT_HEAL_WOUNDS:
#if TAG_MAJOR_VERSION == 34
case POT_RESTORE_ABILITIES:
#endif
valued += 50;
break;

Expand Down

0 comments on commit ea7ae5b

Please sign in to comment.