Skip to content

Commit

Permalink
Remove sacks of spiders
Browse files Browse the repository at this point in the history
Between boxes of beasts, sacks of spiders and phantom mirrors there were a
large number of consumable summon-based evokers, resulting in increased
inventory load for most characters. Although the sack does have the web effect,
overall it's a much less interesting set of summoned creatures than the others.
  • Loading branch information
semitonal committed Mar 30, 2020
1 parent 2a2dd08 commit a6edddd
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 149 deletions.
14 changes: 5 additions & 9 deletions crawl-ref/source/acquire.cc
Original file line number Diff line number Diff line change
Expand Up @@ -672,21 +672,17 @@ static int _acquirement_misc_subtype(bool /*divine*/, int & quantity,
const vector<pair<int, int> > choices =
{
// These have charges, so give them a constant weight.
{MISC_BOX_OF_BEASTS,
(NO_LOVE ? 0 : 7)},
{MISC_SACK_OF_SPIDERS,
(NO_LOVE ? 0 : 7)},
{MISC_PHANTOM_MIRROR,
(NO_LOVE ? 0 : 7)},
{MISC_BOX_OF_BEASTS, (NO_LOVE ? 0 : 10)},
{MISC_PHANTOM_MIRROR, (NO_LOVE ? 0 : 10)},
// Tremorstones are better for heavily armoured characters.
{MISC_TIN_OF_TREMORSTONES, 3 + _skill_rdiv(SK_ARMOUR) / 3 },
// The player never needs more than one.
{MISC_LIGHTNING_ROD,
(you.seen_misc[MISC_LIGHTNING_ROD] ? 0 : 17)},
(you.seen_misc[MISC_LIGHTNING_ROD] ? 0 : 17)},
{MISC_LAMP_OF_FIRE,
(you.seen_misc[MISC_LAMP_OF_FIRE] ? 0 : 17)},
(you.seen_misc[MISC_LAMP_OF_FIRE] ? 0 : 17)},
{MISC_PHIAL_OF_FLOODS,
(you.seen_misc[MISC_PHIAL_OF_FLOODS] ? 0 : 17)},
(you.seen_misc[MISC_PHIAL_OF_FLOODS] ? 0 : 17)},

};

Expand Down
15 changes: 7 additions & 8 deletions crawl-ref/source/dat/des/builder/alphashops.des
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,13 @@
elseif s == "S" then i = { "scarf", "scimitar", "short sword",
"sling bullet", "scale mail", "book of summonings", "book of the sky",
"ring of see invisible", "ring of slaying", "spear", "ring of stealth",
"ring of strength", "manual of stealth", "sack of spiders",
"scroll of summoning", "scythe", "book of spatial translocations",
"scroll of silence", "shortbow", "manual of staves",
"steam dragon scales", "shadow dragon scales", "storm dragon scales",
"swamp dragon scales", "manual of short blades", "staff of summoning",
"manual of slings", "manual of shields", "manual of spellcasting",
"manual of summonings", "stone", "wand of scattershot",
"potion of stabbing" }
"ring of strength", "manual of stealth", "scroll of summoning",
"scythe", "book of spatial translocations", "scroll of silence",
"shortbow", "manual of staves", "steam dragon scales",
"shadow dragon scales", "storm dragon scales", "swamp dragon scales",
"manual of short blades", "staff of summoning", "manual of slings",
"manual of shields", "manual of spellcasting", "manual of summonings",
"stone", "wand of scattershot", "potion of stabbing" }

elseif s == "T" then i = { "book of the tempests", "scroll of torment",
"book of transfigurations", "ring of teleportation",
Expand Down
7 changes: 0 additions & 7 deletions crawl-ref/source/dat/descript/items.txt
Original file line number Diff line number Diff line change
Expand Up @@ -877,13 +877,6 @@ rune of zot

A talisman which allows entry into the Realm of Zot.
%%%%
sack of spiders

A woven silk bag. Opening it will release a number of spiders and other
insects, as well as creating webs nearby. Evocations skill increases its
effectiveness. There is a one in three chance of accidentally destroying the
sack when using it.
%%%%
sacred scourge

A blessed weapon, woven by the saints in Heaven and hated by the unholy. It is
Expand Down
121 changes: 4 additions & 117 deletions crawl-ref/source/evoke.cc
Original file line number Diff line number Diff line change
Expand Up @@ -590,20 +590,6 @@ string manual_skill_names(bool short_text)
return skill_names(skills);
}

static const pop_entry pop_spiders[] =
{ // Sack of Spiders
{ 0, 13, 40, FALL, MONS_WORKER_ANT },
{ 0, 13, 80, FALL, MONS_SOLDIER_ANT },
{ 6, 19, 80, PEAK, MONS_REDBACK},
{ 8, 27, 90, PEAK, MONS_REDBACK },
{ 10, 27, 10, SEMI, MONS_ORB_SPIDER },
{ 12, 29, 100, PEAK, MONS_JUMPING_SPIDER },
{ 13, 29, 110, PEAK, MONS_TARANTELLA },
{ 15, 29, 120, PEAK, MONS_WOLF_SPIDER },
{ 21, 27, 18, RISE, MONS_GHOST_MOTH },
{ 0,0,0,FLAT,MONS_0 }
};

static bool _box_of_beasts(item_def &box)
{
#if TAG_MAJOR_VERSION == 34
Expand Down Expand Up @@ -654,106 +640,6 @@ static bool _box_of_beasts(item_def &box)
return true;
}

static bool _sack_of_spiders_veto_mon(monster_type mon)
{
// Don't summon any beast that would anger your god.
return player_will_anger_monster(mon);
}


static bool _sack_of_spiders(item_def &sack)
{
#if TAG_MAJOR_VERSION == 34
const int surge = pakellas_surge_devices();
surge_power(you.spec_evoke() + surge);
#else
const int surge = 0;
#endif
mpr("You reach into the bag...");

const int evo_skill = you.skill(SK_EVOCATIONS);
int rnd_factor = 1 + random2(2);
int count = player_adjust_evoc_power(
rnd_factor + random2(div_rand_round(evo_skill * 10, 30)), surge);
const int power = player_adjust_evoc_power(evo_skill, surge);

if (x_chance_in_y(5, 10 + power))
{
mpr("...but nothing happens.");
return false;
}

bool success = false;

for (int n = 0; n < count; n++)
{
// Invoke mon-pick with our custom list
monster_type mon = pick_monster_from(pop_spiders,
max(1, min(27,
player_adjust_evoc_power(
you.skill(SK_EVOCATIONS),
surge))),
_sack_of_spiders_veto_mon);
mgen_data mg(mon, BEH_FRIENDLY, you.pos(), MHITYOU, MG_AUTOFOE);
mg.set_summoned(&you, 3 + random2(4), 0);
if (create_monster(mg))
success = true;
}

if (success)
{
mpr("...and things crawl out!");
// Also generate webs on hostile monsters and trap them.
const int rad = LOS_DEFAULT_RANGE / 2 + 2;
for (monster_near_iterator mi(you.pos(), LOS_SOLID); mi; ++mi)
{
trap_def *trap = trap_at((*mi)->pos());
// Don't destroy non-web traps or try to trap monsters
// currently caught by something.
if (you.pos().distance_from((*mi)->pos()) > rad
|| (!trap && grd((*mi)->pos()) != DNGN_FLOOR)
|| (trap && trap->type != TRAP_WEB)
|| (*mi)->friendly()
|| (*mi)->caught())
{
continue;
}

// web chance increases with proximity & evo skill
// code here uses double negatives; sorry! i blame the other guy
// don't try to make surge affect web chance; too messy.
const int web_dist_factor
= 100 * (you.pos().distance_from((*mi)->pos()) - 1) / rad;
const int web_skill_factor = 2 * (27 - you.skill(SK_EVOCATIONS));
const int web_chance = 100 - web_dist_factor - web_skill_factor;
if (x_chance_in_y(web_chance, 100))
{
if (trap && trap->type == TRAP_WEB)
destroy_trap((*mi)->pos());

place_specific_trap((*mi)->pos(), TRAP_WEB, 1); // 1 ammo = temp
// Reveal the trap
grd((*mi)->pos()) = DNGN_TRAP_WEB;
trap = trap_at((*mi)->pos());
trap->trigger(**mi);
}

}
// After gettin' some bugs, check for destruction.
if (one_chance_in(3))
{
mpr("The now-empty bag unravels in your hand.");
ASSERT(in_inventory(sack));
dec_inv_item_quantity(sack.link, 1);
}
}
else
// Failed to create monster for some reason
mpr("...but nothing happens.");

return success;
}

static bool _make_zig(item_def &zig)
{
if (feat_is_critical(grd(you.pos())))
Expand Down Expand Up @@ -1784,10 +1670,11 @@ bool evoke_item(int slot)
practise_evoking(1);
break;

#if TAG_MAJOR_VERSION == 34
case MISC_SACK_OF_SPIDERS:
if (_sack_of_spiders(item))
practise_evoking(1);
break;
canned_msg(MSG_NOTHING_HAPPENS);
return false;
#endif

case MISC_CRYSTAL_BALL_OF_ENERGY:
if (!_check_crystal_ball())
Expand Down
1 change: 0 additions & 1 deletion crawl-ref/source/invent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2066,7 +2066,6 @@ static bool _item_ally_only(const item_def &item)
case MISC_PHANTOM_MIRROR:
case MISC_HORN_OF_GERYON:
case MISC_BOX_OF_BEASTS:
case MISC_SACK_OF_SPIDERS:
return true;
default:
return false;
Expand Down
5 changes: 3 additions & 2 deletions crawl-ref/source/item-name.cc
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,9 @@ static string misc_type_name(int type)
#endif
case MISC_QUAD_DAMAGE: return "quad damage";
case MISC_PHIAL_OF_FLOODS: return "phial of floods";
case MISC_SACK_OF_SPIDERS: return "sack of spiders";
#if TAG_MAJOR_VERSION == 34
case MISC_SACK_OF_SPIDERS: return "removed sack of spiders";
#endif
case MISC_PHANTOM_MIRROR: return "phantom mirror";
case MISC_ZIGGURAT: return "figurine of a ziggurat";
#if TAG_MAJOR_VERSION == 34
Expand Down Expand Up @@ -3241,7 +3243,6 @@ bool is_useless_item(const item_def &item, bool temp)
return false;

// Purely summoning misc items don't work w/ sac love
case MISC_SACK_OF_SPIDERS:
case MISC_BOX_OF_BEASTS:
case MISC_HORN_OF_GERYON:
case MISC_PHANTOM_MIRROR:
Expand Down
8 changes: 7 additions & 1 deletion crawl-ref/source/item-prop-enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ enum misc_item_type
MISC_QUAD_DAMAGE, // Sprint only

MISC_PHIAL_OF_FLOODS,
#if TAG_MAJOR_VERSION == 34
MISC_SACK_OF_SPIDERS,
#endif
MISC_ZIGGURAT,

MISC_PHANTOM_MIRROR,
Expand All @@ -317,7 +319,11 @@ const vector<misc_item_type> misc_types =
#endif
MISC_HORN_OF_GERYON, MISC_BOX_OF_BEASTS,
MISC_CRYSTAL_BALL_OF_ENERGY, MISC_LIGHTNING_ROD, MISC_PHIAL_OF_FLOODS,
MISC_QUAD_DAMAGE, MISC_SACK_OF_SPIDERS, MISC_PHANTOM_MIRROR,
MISC_QUAD_DAMAGE,
#if TAG_MAJOR_VERSION == 34
MISC_SACK_OF_SPIDERS,
#endif
MISC_PHANTOM_MIRROR,
#if TAG_MAJOR_VERSION == 34
MISC_XOMS_CHESSBOARD,
#endif
Expand Down
4 changes: 3 additions & 1 deletion crawl-ref/source/items.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,9 @@ bool is_stackable_item(const item_def &item)
{
case MISC_PHANTOM_MIRROR:
case MISC_ZIGGURAT:
#if TAG_MAJOR_VERSION == 34
case MISC_SACK_OF_SPIDERS:
#endif
case MISC_BOX_OF_BEASTS:
case MISC_TIN_OF_TREMORSTONES:
return true;
Expand Down Expand Up @@ -3957,9 +3959,9 @@ colour_t item_def::miscellany_colour() const
return LIGHTRED;
case MISC_LAMP_OF_FIRE:
return YELLOW;
#if TAG_MAJOR_VERSION == 34
case MISC_SACK_OF_SPIDERS:
return WHITE;
#if TAG_MAJOR_VERSION == 34
case MISC_BUGGY_LANTERN_OF_SHADOWS:
case MISC_BUGGY_EBONY_CASKET:
case MISC_XOMS_CHESSBOARD:
Expand Down
1 change: 1 addition & 0 deletions crawl-ref/source/known-items.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ void check_item_knowledge(bool unknown_items)
|| i == MISC_STONE_OF_TREMORS
|| i == MISC_XOMS_CHESSBOARD
|| i == MISC_FAN_OF_GALES
|| i == MISC_SACK_OF_SPIDERS
#endif
|| (i == MISC_QUAD_DAMAGE && !crawl_state.game_is_sprint()))
{
Expand Down
1 change: 0 additions & 1 deletion crawl-ref/source/makeitem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,6 @@ static void _generate_misc_item(item_def& item, int force_type)
MISC_PHIAL_OF_FLOODS,
MISC_LIGHTNING_ROD,
MISC_BOX_OF_BEASTS,
MISC_SACK_OF_SPIDERS,
MISC_CRYSTAL_BALL_OF_ENERGY,
MISC_PHANTOM_MIRROR,
MISC_TIN_OF_TREMORSTONES);
Expand Down
1 change: 0 additions & 1 deletion crawl-ref/source/religion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,6 @@ static int _pakellas_low_misc()
{
// Limited uses, so any of these are fine even if they've been seen before.
return random_choose(MISC_BOX_OF_BEASTS,
MISC_SACK_OF_SPIDERS,
MISC_PHANTOM_MIRROR);
}

Expand Down
1 change: 1 addition & 0 deletions crawl-ref/source/rltiles/dc-item.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,7 @@ misc_lantern MISC_LANTERN_OF_SHADOWS
misc_horn MISC_HORN_OF_GERYON
misc_box MISC_BOX_OF_BEASTS
%rim 0
# Remove when TAG_MAJOR_VERSION > 34
misc_sack MISC_SACK_OF_SPIDERS
misc_phantom_mirror MISC_PHANTOM_MIRROR
misc_zigfig MISC_ZIGGURAT
Expand Down
1 change: 0 additions & 1 deletion crawl-ref/source/shopping.cc
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,6 @@ unsigned int item_value(item_def item, bool ident)
break;

case MISC_BOX_OF_BEASTS:
case MISC_SACK_OF_SPIDERS:
valued += 200;
break;

Expand Down
2 changes: 2 additions & 0 deletions crawl-ref/source/tilepick.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2574,8 +2574,10 @@ static tileidx_t _tileidx_misc(const item_def &item)
return evoker_charges(item.sub_type) ? TILE_MISC_LIGHTNING_ROD
: TILE_MISC_LIGHTNING_ROD_INERT;

#if TAG_MAJOR_VERSION == 34
case MISC_SACK_OF_SPIDERS:
return TILE_MISC_SACK_OF_SPIDERS;
#endif

case MISC_PHANTOM_MIRROR:
return TILE_MISC_PHANTOM_MIRROR;
Expand Down

0 comments on commit a6edddd

Please sign in to comment.