From 77620b7075494d78dda86ab8f69fd777d2e9eb37 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Fri, 23 Oct 2009 19:47:56 -0400 Subject: Preliminarily add a new fungus species to replace fungus w.r.t. spores Add a fungus species ('ballistomycete') to use in place of fungus in spores explosions etc. Fix a couple message leaks (wrong version of see_cell used in monaters::apply_enchantment) --- crawl-ref/source/beam.cc | 4 ++-- crawl-ref/source/enum.h | 3 ++- crawl-ref/source/mon-data.h | 11 +++++++++++ crawl-ref/source/mon-util.cc | 4 ++-- crawl-ref/source/monplace.cc | 5 ++--- crawl-ref/source/spells2.cc | 9 ++++++--- crawl-ref/source/tilepick.cc | 2 ++ 7 files changed, 27 insertions(+), 11 deletions(-) diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index b7afe1e897..0c84604bf6 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3042,14 +3042,14 @@ void bolt::affect_ground() // produced is the x in x_chance_in_y() in the conditional below. if (is_explosion && this->flavour == BEAM_SPORE && x_chance_in_y(2, 21) - && mons_class_can_pass(MONS_FUNGUS, env.grid(pos())) + && mons_class_can_pass(MONS_BALLISTOMYCETE, env.grid(pos())) && !actor_at(pos())) { // Half the fungi in arena mode are friendly. beh_type beh = (crawl_state.arena && coinflip()) ? BEH_FRIENDLY : BEH_HOSTILE; - int rc = create_monster(mgen_data(MONS_FUNGUS, + int rc = create_monster(mgen_data(MONS_BALLISTOMYCETE, beh, 0, 0, diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 888f492272..645633bdf8 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1853,8 +1853,9 @@ enum monster_type // (int) menv[].type MONS_SIREN, // 195 MONS_FLAMING_CORPSE, MONS_HARPY, - MONS_TOADSTOOL, // 198 + MONS_TOADSTOOL, MONS_BUSH, + MONS_BALLISTOMYCETE, // 200 //jmf: end new monsters MONS_WHITE_IMP = 220, // 220 MONS_LEMURE, diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 73177f6ec0..2fb915bdbe 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -674,6 +674,17 @@ static monsterentry mondata[] = { HT_LAND, 0, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_TINY }, +{ + MONS_BALLISTOMYCETE, 'f', LIGHTRED, "ballistomycete", + M_NO_EXP_GAIN | M_STATIONARY, + MR_RES_POISON, + 0, 10, MONS_FUNGUS, MONS_FUNGUS, MH_PLANT, MAG_IMMUNE, + { AT_NO_ATK, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + { 4, 5, 3, 0 }, + 1, 0, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_PLANT, + HT_LAND, 0, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_TINY +}, + { MONS_WANDERING_MUSHROOM, 'f', RED, "wandering mushroom", M_NO_FLAGS, diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 053ac96a28..617d8a1bd5 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -7664,7 +7664,7 @@ void monsters::apply_enchantment(const mon_enchant &me) // If you are no longer dying, you must be dead. if (decay_enchantment(me)) { - if (see_cell(this->position)) + if (::see_cell(this->position)) { mprf("A nearby %s withers and dies.", this->name(DESC_PLAIN, false).c_str()); @@ -7704,7 +7704,7 @@ void monsters::apply_enchantment(const mon_enchant &me) { env.mons[rc].behaviour = BEH_WANDER; - if (see_cell(adjacent) && see_cell(pos())) + if (::see_cell(adjacent) && ::see_cell(pos())) mpr("A nearby fungus spawns a giant spore."); } break; diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 10d64b8dc7..6cbc5c20e5 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -1155,10 +1155,9 @@ static int _place_monster_aux(const mgen_data &mg, menv[id].add_ench(ENCH_SLOWLY_DYING); } - if (mg.cls == MONS_FUNGUS && you.your_level > 0) + if (mg.cls == MONS_BALLISTOMYCETE) { - // This enchantment causes rare production of giant spores. - // It's disabled on D:1 to avoid issues with entry vaults. + // This enchantment causes giant spore production. menv[id].add_ench(ENCH_SPORE_PRODUCTION); } diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index c3e553e950..e04e780531 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -2045,7 +2045,8 @@ void path_distance(coord_def & origin, if (!temp || (temp->attitude == ATT_HOSTILE && temp->mons_species() != MONS_PLANT && temp->mons_species() != MONS_TOADSTOOL - && temp->mons_species() != MONS_FUNGUS)) + && temp->mons_species() != MONS_FUNGUS + && temp->mons_species() != MONS_BALLISTOMYCETE)) { fringe.push(point_distance(*adj_it, current.second+1)); } @@ -2416,13 +2417,14 @@ bool _possible_evolution(monsters * input, break; case MONS_FUNGUS: + case MONS_BALLISTOMYCETE: possible_monster.cost = fungus_cost; possible_monster.new_type = MONS_WANDERING_MUSHROOM; break; case MONS_TOADSTOOL: possible_monster.cost = toadstool_cost; - possible_monster.new_type = MONS_FUNGUS; + possible_monster.new_type = MONS_BALLISTOMYCETE; break; default: @@ -2503,6 +2505,7 @@ bool evolve_flora() break; case MONS_FUNGUS: + case MONS_BALLISTOMYCETE: fungi_evolved++; break; @@ -2523,7 +2526,7 @@ bool evolve_flora() current_plant->del_ench(ENCH_SLOWLY_DYING); current_plant->del_ench(ENCH_SPORE_PRODUCTION); - if (current_plant->mons_species() == MONS_FUNGUS) + if (current_plant->mons_species() == MONS_BALLISTOMYCETE) current_plant->add_ench(ENCH_SPORE_PRODUCTION); // Maybe we can upgrade it again? diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 3b0d459215..85e553361c 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -185,6 +185,8 @@ int tileidx_monster_base(const monsters *mon, bool detected) return TILEP_MONS_DEEP_ELF_MASTER_ARCHER; // fungi ('f') + case MONS_BALLISTOMYCETE: + return TILEP_MONS_FUNGUS; case MONS_TOADSTOOL: return TILEP_MONS_TOADSTOOL; case MONS_FUNGUS: -- cgit v1.2.3-54-g00ecf