From f8721d89f46e960676695497e7e5d0fb99e9580c Mon Sep 17 00:00:00 2001 From: gammafunk Date: Mon, 9 Sep 2019 21:49:15 -0500 Subject: [PATCH] Fedhas rework part 4: remove Growth Fedhas will use summons to create all allies instead of creating permanent ones using actual plant monsters as intermediaries. Hence Growth, also referred to as using the descriptor `RING_OF_PLANTS` in the source, is no longer necessary. --- crawl-ref/source/ability-type.h | 1 - crawl-ref/source/ability.cc | 8 - crawl-ref/source/dat/descript/ability.txt | 7 - crawl-ref/source/god-abil.cc | 142 ------------------ crawl-ref/source/god-abil.h | 1 - crawl-ref/source/religion.cc | 1 - crawl-ref/source/rltiles/dc-invocations.txt | 1 - .../gui/invocations/fedhas_plant_ring.png | Bin 329 -> 0 bytes crawl-ref/source/tilepick.cc | 2 - 9 files changed, 163 deletions(-) delete mode 100644 crawl-ref/source/rltiles/gui/invocations/fedhas_plant_ring.png diff --git a/crawl-ref/source/ability-type.h b/crawl-ref/source/ability-type.h index 2969342edf2..68953c1ee1b 100644 --- a/crawl-ref/source/ability-type.h +++ b/crawl-ref/source/ability-type.h @@ -175,7 +175,6 @@ enum ability_type // Fedhas ABIL_FEDHAS_WALL_OF_BRIARS = 1140, ABIL_FEDHAS_RAIN, - ABIL_FEDHAS_PLANT_RING, ABIL_FEDHAS_SPAWN_SPORES, ABIL_FEDHAS_EVOLUTION, // Cheibriados diff --git a/crawl-ref/source/ability.cc b/crawl-ref/source/ability.cc index f681cec0e7a..cb1dbd1b3a7 100644 --- a/crawl-ref/source/ability.cc +++ b/crawl-ref/source/ability.cc @@ -516,8 +516,6 @@ static const ability_def Ability_List[] = // Fedhas { ABIL_FEDHAS_EVOLUTION, "Evolution", 2, 0, 0, 0, {fail_basis::invo, 30, 6, 20}, abflag::rations_or_piety }, - { ABIL_FEDHAS_PLANT_RING, "Growth", - 2, 0, 0, 0, {fail_basis::invo, 40, 5, 20}, abflag::rations }, { ABIL_FEDHAS_SPAWN_SPORES, "Reproduction", 4, 0, 100, 1, {fail_basis::invo, 60, 4, 25}, abflag::none }, { ABIL_FEDHAS_RAIN, "Rain", @@ -2862,12 +2860,6 @@ static spret _do_ability(const ability_def& abil, bool fail) end_recall(); break; - case ABIL_FEDHAS_PLANT_RING: - fail_check(); - if (!fedhas_plant_ring_from_rations()) - return spret::abort; - break; - case ABIL_FEDHAS_WALL_OF_BRIARS: fail_check(); if (!fedhas_wall_of_briars()) diff --git a/crawl-ref/source/dat/descript/ability.txt b/crawl-ref/source/dat/descript/ability.txt index 294a4b3243c..d4c4b695fca 100644 --- a/crawl-ref/source/dat/descript/ability.txt +++ b/crawl-ref/source/dat/descript/ability.txt @@ -486,13 +486,6 @@ Wall of Briars ability Grow short-lived briar patches around you. Monsters attacking these briars will be damaged by sharp thorns. Invocations skill increases the briars' health. %%%% -Growth ability - -Uses food to grow a ring of plants around yourself. If a complete ring cannot -be formed (because you do not have enough food), plants will grow on squares -adjacent to you that are close to monsters. The plants you create gain bonus -health proportional to your Invocations skill. -%%%% Rain ability Causes rain to fall around you, turning the dungeon floor into shallow water diff --git a/crawl-ref/source/god-abil.cc b/crawl-ref/source/god-abil.cc index 8d040ebfac3..08e43723516 100644 --- a/crawl-ref/source/god-abil.cc +++ b/crawl-ref/source/god-abil.cc @@ -2173,43 +2173,6 @@ void collect_radius_points(vector > &radius_points, } } -static bool _create_plant(coord_def& target, int hp_adjust = 0) -{ - if (actor_at(target) || !mons_class_can_pass(MONS_PLANT, grd(target))) - return 0; - - if (monster *plant = create_monster(mgen_data(MONS_PLANT, - BEH_FRIENDLY, - target, - MHITNOT, - MG_FORCE_PLACE, - GOD_FEDHAS) - .set_summoned(&you, 0, 0))) - { - plant->flags |= MF_NO_REWARD; - plant->flags |= MF_ATT_CHANGE_ATTEMPT; - - mons_make_god_gift(*plant, GOD_FEDHAS); - - plant->max_hit_points += hp_adjust; - plant->hit_points += hp_adjust; - - if (you.see_cell(target)) - { - if (hp_adjust) - { - mprf("A plant, strengthened by %s, grows up from the ground.", - god_name(GOD_FEDHAS).c_str()); - } - else - mpr("A plant grows up from the ground."); - } - return true; - } - - return false; -} - template static bool less_second(const T & left, const T & right) { @@ -2416,111 +2379,6 @@ static void _decrease_amount(vector >& available, int amount) mpr("A ration is consumed!"); } -// Create a ring or partial ring around the caster. The user is -// prompted to select a stack of rations, and then plants are placed on open -// squares adjacent to the user. Of course, two rations are -// consumed per plant, so a complete ring may not be formed. -bool fedhas_plant_ring_from_rations() -{ - // How many rations is available? - vector > collected_rations; - int total_rations = _collect_rations(collected_rations); - - // How many adjacent open spaces are there? - vector adjacent; - for (adjacent_iterator adj_it(you.pos()); adj_it; ++adj_it) - { - if (monster_habitable_grid(MONS_PLANT, env.grid(*adj_it)) - && !actor_at(*adj_it)) - { - adjacent.push_back(*adj_it); - } - } - - const int max_use = min(total_rations/2, static_cast(adjacent.size())); - - // Don't prompt if we can't do anything (due to having no rations or - // no squares to place plants on). - if (max_use == 0) - { - if (adjacent.empty()) - mpr("No empty adjacent squares."); - else - mpr("Not enough rations available."); - - return false; - } - - prioritise_adjacent(you.pos(), adjacent); - - // Screwing around with display code I don't really understand. -cao - targeter_smite range(&you, 1); - range_view_annotator show_range(&range); - - for (int i = 0; i < max_use; ++i) - { -#ifndef USE_TILE_LOCAL - coord_def temp = grid2view(adjacent[i]); - cgotoxy(temp.x, temp.y, GOTO_DNGN); - put_colour_ch(GREEN, '1' + i); -#endif -#ifdef USE_TILE - tiles.add_overlay(adjacent[i], TILE_INDICATOR + i); -#endif - } - - // And how many plants does the user want to create? - int target_count; - if (!_prompt_amount(max_use, target_count, - "How many plants will you create?")) - { - // User cancelled at the prompt. - return false; - } - - const int hp_adjust = you.skill(SK_INVOCATIONS, 10); - - // The user entered a number, remove all number overlays which - // are higher than that number. -#ifndef USE_TILE_LOCAL - unsigned not_used = adjacent.size() - unsigned(target_count); - for (unsigned i = adjacent.size() - not_used; i < adjacent.size(); i++) - view_update_at(adjacent[i]); -#endif -#ifdef USE_TILE - // For tiles we have to clear all overlays and redraw the ones - // we want. - tiles.clear_overlays(); - for (int i = 0; i < target_count; ++i) - tiles.add_overlay(adjacent[i], TILE_INDICATOR + i); -#endif - - int created_count = 0; - for (int i = 0; i < target_count; ++i) - { - if (_create_plant(adjacent[i], hp_adjust)) - created_count++; - - // Clear the overlay and draw the plant we just placed. - // This is somewhat more complicated in tiles. - view_update_at(adjacent[i]); -#ifdef USE_TILE - tiles.clear_overlays(); - for (int j = i + 1; j < target_count; ++j) - tiles.add_overlay(adjacent[j], TILE_INDICATOR + j); - viewwindow(false); -#endif - scaled_delay(200); - } - - if (created_count) - _decrease_amount(collected_rations, 2 * created_count); - else - canned_msg(MSG_NOTHING_HAPPENS); - - return created_count; -} - // Create a circle of water around the target, with a radius of // approximately 2. This turns normal floor tiles into shallow water // and turns (unoccupied) shallow water into deep water. There is a diff --git a/crawl-ref/source/god-abil.h b/crawl-ref/source/god-abil.h index b1bb58ae87c..0914bd7dfdf 100644 --- a/crawl-ref/source/god-abil.h +++ b/crawl-ref/source/god-abil.h @@ -118,7 +118,6 @@ int place_ring(vector& ring_points, void collect_radius_points(vector > &radius_points, const coord_def &origin, los_type los); bool prioritise_adjacent(const coord_def& target, vector& candidates); -bool fedhas_plant_ring_from_rations(); int fedhas_rain(const coord_def &target); int count_corpses_in_los(vector *positions); int fedhas_check_corpse_spores(bool quiet = false); diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index fd6d54344d1..16a29377f78 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -265,7 +265,6 @@ const vector god_powers[NUM_GODS] = { { 2, ABIL_FEDHAS_WALL_OF_BRIARS, "encircle yourself with summoned briar patches"}, { 2, ABIL_FEDHAS_EVOLUTION, "induce evolution" }, - { 3, ABIL_FEDHAS_PLANT_RING, "cause a ring of plants to grow" }, { 4, ABIL_FEDHAS_SPAWN_SPORES, "spawn explosive spores" }, { 5, ABIL_FEDHAS_RAIN, "control the weather" }, }, diff --git a/crawl-ref/source/rltiles/dc-invocations.txt b/crawl-ref/source/rltiles/dc-invocations.txt index 395b54b2adb..0fd015b5bd3 100644 --- a/crawl-ref/source/rltiles/dc-invocations.txt +++ b/crawl-ref/source/rltiles/dc-invocations.txt @@ -21,7 +21,6 @@ elyvilon_lesser_healing ABILITY_ELYVILON_LESSER_HEALING elyvilon_purification ABILITY_ELYVILON_PURIFICATION elyvilon_heal_other ABILITY_ELYVILON_HEAL_OTHER fedhas_evolution ABILITY_FEDHAS_EVOLUTION -fedhas_plant_ring ABILITY_FEDHAS_PLANT_RING fedhas_rain ABILITY_FEDHAS_RAIN fedhas_spawn_spores ABILITY_FEDHAS_SPAWN_SPORES fedhas_wall_of_briars ABILITY_FEDHAS_WALL_OF_BRIARS diff --git a/crawl-ref/source/rltiles/gui/invocations/fedhas_plant_ring.png b/crawl-ref/source/rltiles/gui/invocations/fedhas_plant_ring.png deleted file mode 100644 index ef367f50a4110b1884c2e4fdad66580eea7f6f36..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyiUB?$u0R?Hcua+4(nJgl3>+LB z61w;%Oqj6kr0`^|3cYKixm_3g25?K`XY4mno;c(-g9TD6~J5zGApGgl=Q?_?C+ z+#spYvLrFz!N)%-Kw2T-t74c>HA7@@l59xRlZuIJm{|5OvBicb6xK(s-8?nH)8;oz zhu4G!%RQa0JFHN