Skip to content

Commit

Permalink
Revert to pre-nerf WJC
Browse files Browse the repository at this point in the history
For the SA thread.
  • Loading branch information
Floodkiller committed Mar 21, 2017
1 parent 7e3609c commit db086f9
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 133 deletions.
14 changes: 4 additions & 10 deletions crawl-ref/source/ability.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3122,16 +3122,10 @@ static spret_type _do_ability(const ability_def& abil, bool fail)

case ABIL_WU_JIAN_HEAVEN_ON_EARTH:
fail_check();
mprf(MSGCH_GOD, "The air is filled with shimmering golden clouds!");
wu_jian_sifu_message(" says: The storm will not cease as long as you "
"keep fighting, disciple!");

for (radius_iterator ai(you.pos(), 2, C_SQUARE, LOS_SOLID); ai; ++ai)
{
if (!cell_is_solid(*ai))
place_cloud(CLOUD_GOLD_DUST, *ai, 5 + random2(5), &you);
}

mprf(MSGCH_GOD, "The air is filled with shimmering golden clouds! You feel the urge to strike!");
wu_jian_sifu_message(" says: The storm will not ease as long as you keep fighting, disciple!");
for (radius_iterator ai(you.pos(), 2, C_SQUARE); ai; ++ai)
big_cloud(CLOUD_GOLD_DUST, &you, *ai, 10 + random2(5), 50 + random2(30), 4);
you.attribute[ATTR_HEAVEN_ON_EARTH] = 12;
you.duration[DUR_HEAVEN_ON_EARTH] = WU_JIAN_HEAVEN_TICK_TIME;
invalidate_agrid(true);
Expand Down
16 changes: 8 additions & 8 deletions crawl-ref/source/dat/descript/gods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -315,17 +315,17 @@ below. They will also be taught to move at unfathomable speeds for short
distances, and become able to summon a storm of golden clouds to increase their
precision and damage for as long as they keep using martial attacks.

....... ...<lightred>@</lightred>... (*) <lightred>Whirlwind</lightred>: Move between two tiles adjacent to
...<lightred>@</lightred>O.. --> ....O.. an enemy to strike them and attempt to cause slowing.
....... ...<lightred>@</lightred>... (*) <lightred>Whirlwind</lightred>: Strike by moving between two tiles
...<lightred>@</lightred>O.. --> ....O.. adjacent to an enemy. May slow down foes.
....... .......

..x.... ..x.... (**) <lightred>Wall Jump</lightred>: Move into a wall to vault towards
..x<lightred>@</lightred>O.. --> ..x.O<lightred>@</lightred>. enemies, striking all enemies adjacent to the landing
..x.... ..x.... spot. May distract any witnessing foes.
..x.... ..x.... (**) <lightred>Wall Jump</lightred>: Move into a wall to jump away from
..x<lightred>@</lightred>... --> ..x..<lightred>@</lightred>. it, striking all enemies adjacent to the landing spot.
..x.... ..x.... May distract any witnessing foes.

....... ....... (***) <lightred>Lunge</lightred>: Move directly towards an enemy to deal
..<lightred>@</lightred>.O.. --> ...<lightred>@</lightred>O.. extra damage, and even more if they are distracted.
....... .......
....... ....... (***) <lightred>Lunge</lightred>: Move towards enemies in one of the eight
..<lightred>@</lightred>.O.. --> ...<lightred>@</lightred>O.. cardinal directions to deal extra damage, and even more
....... ....... if they are slowed or distracted.
%%%%
Kikubaaqudgha powers

Expand Down
4 changes: 2 additions & 2 deletions crawl-ref/source/describe-god.cc
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,8 @@ static void _describe_god_powers(god_type which_god)
else
textcolour(DARKGREY);
cprintf("You gain nutrition%s when your fellow slimes consume items.\n",
have_passive(passive_t::slime_hp) ? ", magic and health" :
have_passive(passive_t::slime_mp) ? " and magic" :
have_passive(passive_t::slime_hp) ? ", power and health" :
have_passive(passive_t::slime_mp) ? " and power" :
"");
break;

Expand Down
7 changes: 5 additions & 2 deletions crawl-ref/source/duration-data.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@ static const duration_def duration_data[] =
"can't hop", "",
"", D_NO_FLAGS,
{{ "You are ready to hop once more." }}},
{ DUR_HEAVEN_ON_EARTH,
0, "", "", "", "", D_NO_FLAGS,
{{ "", []() {
wu_jian_heaven_tick();
}}}},

// The following are visible in wizmode only, or are handled
// specially in the status lights and/or the % or @ screens.
Expand Down Expand Up @@ -594,8 +599,6 @@ static const duration_def duration_data[] =
{ DUR_ANCESTOR_DELAY, 0, "", "", "ancestor delay", "", D_NO_FLAGS, {{""}}},
{ DUR_NO_CAST, 0, "", "", "no cast", "", D_NO_FLAGS,
{{ "You regain access to your magic." }, {}, true }},
{ DUR_HEAVEN_ON_EARTH, 0, "", "", "", "", D_NO_FLAGS,
{{ "", wu_jian_heaven_tick }}},

#if TAG_MAJOR_VERSION == 34
// And removed ones
Expand Down
184 changes: 107 additions & 77 deletions crawl-ref/source/god-passive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static const vector<god_passive> god_passives[] =
// Vehumet
{
{ -1, passive_t::mp_on_kill,
"have a chance to gain magical power from killing" },
"have a chance to gain mana when you kill" },
{ 3, passive_t::spells_success,
"are NOW less likely to miscast destructive spells" },
{ 4, passive_t::spells_range,
Expand Down Expand Up @@ -284,7 +284,7 @@ static const vector<god_passive> god_passives[] =
"GOD NOW protects you from corrosion" },
{ 4, passive_t::slime_mp,
"Items consumed by your fellow slimes NOW restore"
" your magical power"
" your mana reserve"
},
{ 5, passive_t::slime_hp,
"Items consumed by your fellow slimes NOW restore"
Expand Down Expand Up @@ -392,9 +392,8 @@ static const vector<god_passive> god_passives[] =
// Pakellas
{
{ -1, passive_t::no_mp_regen,
"GOD NOW prevents you from regenerating your magical power" },
{ -1, passive_t::mp_on_kill, "have a chance to gain magical power from"
" killing" },
"GOD NOW prevents you from regenerating your mana reserve" },
{ -1, passive_t::mp_on_kill, "have a chance to gain mana when you kill" },
{ 0, passive_t::identify_devices, "GOD NOW identifies your wands" },
{ 1, passive_t::bottle_mp,
"GOD NOW collects and distills excess magic from your kills"
Expand All @@ -414,9 +413,9 @@ static const vector<god_passive> god_passives[] =

// Wu Jian
{
{ 1, passive_t::wu_jian_whirlwind, "attack monsters by moving around them." },
{ 1, passive_t::wu_jian_whirlwind, "attack and slow monsters by moving around them." },
{ 2, passive_t::wu_jian_wall_jump, "perform distracting airborne attacks by moving against a solid obstacle." },
{ 3, passive_t::wu_jian_lunge, "strike by moving towards foes, devastating them if distracted." },
{ 3, passive_t::wu_jian_lunge, "strike by moving towards foes, devastating them if slowed or distracted." },
},
};
COMPILE_CHECK(ARRAYSZ(god_passives) == NUM_GODS);
Expand Down Expand Up @@ -1544,11 +1543,8 @@ void wu_jian_heaven_tick()
else
you.attribute[ATTR_HEAVEN_ON_EARTH] -= 10;

for (radius_iterator ai(you.pos(), 2, C_SQUARE, LOS_SOLID); ai; ++ai)
{
if (!cell_is_solid(*ai))
place_cloud(CLOUD_GOLD_DUST, *ai, 5 + random2(5), &you);
}
for (radius_iterator ai(you.pos(), 2, C_SQUARE); ai; ++ai)
big_cloud(CLOUD_GOLD_DUST, &you, *ai, 10 + random2(5), 50 + random2(30), 4);

noisy(15, you.pos());

Expand All @@ -1566,9 +1562,16 @@ void end_heaven_on_earth()

bool wu_jian_has_momentum(wu_jian_attack_type attack_type)
{
return you.attribute[ATTR_SERPENTS_LASH]
&& attack_type != WU_JIAN_ATTACK_NONE
&& attack_type != WU_JIAN_ATTACK_TRIGGERED_AUX;
if (attack_type == WU_JIAN_ATTACK_NONE ||
attack_type == WU_JIAN_ATTACK_TRIGGERED_AUX)
{
return false;
}

if (you.attribute[ATTR_SERPENTS_LASH] > 0)
return true;

return false;
}

static bool _dont_attack_martial(const monster* mons)
Expand Down Expand Up @@ -1606,26 +1609,32 @@ static void _wu_jian_lunge(const coord_def& old_pos)

if (you.attribute[ATTR_HEAVEN_ON_EARTH] > 0)
you.attribute[ATTR_HEAVEN_ON_EARTH] += 2;

you.apply_berserk_penalty = false;

const int number_of_attacks = _wu_jian_number_of_attacks();

if (number_of_attacks == 0)
{
mprf("You lunge at %s, but your attack speed is too slow for a blow "
"to land.", mons->name(DESC_THE).c_str());
mprf("You lunge at %s, but your attack speed is too slow for a blow to land.",
mons->name(DESC_THE).c_str());
return;
}
else if (number_of_attacks > 1)
{
if (wu_jian_has_momentum(WU_JIAN_ATTACK_LUNGE))
mprf("You lunge at %s in a momentous flurry of attacks!", mons->name(DESC_THE).c_str());
else
mprf("You lunge at %s in a flurry of attacks!", mons->name(DESC_THE).c_str());
}
else
{
mprf("You lunge%s at %s%s.",
wu_jian_has_momentum(WU_JIAN_ATTACK_LUNGE) ?
" with incredible momentum" : "",
mons->name(DESC_THE).c_str(),
number_of_attacks > 1 ? " in a flurry of attacks" : "");
if (wu_jian_has_momentum(WU_JIAN_ATTACK_LUNGE))
mprf("You lunge at %s with incredible momentum!", mons->name(DESC_THE).c_str());
else
mprf("You lunge at %s.", mons->name(DESC_THE).c_str());
}


for (int i = 0; i < number_of_attacks; i++)
{
if (!mons->alive())
Expand Down Expand Up @@ -1666,7 +1675,6 @@ static void _wu_jian_whirlwind(const coord_def& old_pos)

if (you.attribute[ATTR_HEAVEN_ON_EARTH] > 0)
you.attribute[ATTR_HEAVEN_ON_EARTH] += 2;

you.apply_berserk_penalty = false;

const int number_of_attacks = _wu_jian_number_of_attacks();
Expand All @@ -1676,19 +1684,32 @@ static void _wu_jian_whirlwind(const coord_def& old_pos)
"a blow to land.", mons->name(DESC_THE).c_str());
continue;
}

if (number_of_attacks > 1)
{
if (wu_jian_has_momentum(WU_JIAN_ATTACK_WHIRLWIND))
{
mprf("You spin and attack %s repeatedly with incredible momentum!",
mons->name(DESC_THE).c_str());
}
else
mprf("You spin and attack %s repeatedly!", mons->name(DESC_THE).c_str());
}
else
{
mprf("You spin and attack %s%s%s.",
mons->name(DESC_THE).c_str(),
number_of_attacks > 1 ? " repeatedly" : "",
wu_jian_has_momentum(WU_JIAN_ATTACK_WHIRLWIND) ?
" with incredible momentum" : "");
if (wu_jian_has_momentum(WU_JIAN_ATTACK_WHIRLWIND))
{
mprf("You spin and attack %s with incredible momentum!",
mons->name(DESC_THE).c_str());
}
else
mprf("You spin and attack %s.", mons->name(DESC_THE).c_str());
}

for (int i = 0; i < number_of_attacks; i++)
{
if (!mons->alive())
break;
break;
melee_attack whirlwind(&you, mons);
whirlwind.wu_jian_attack = WU_JIAN_ATTACK_WHIRLWIND;
whirlwind.wu_jian_number_of_targets = common_targets.size();
Expand Down Expand Up @@ -1729,23 +1750,11 @@ bool wu_jian_can_wall_jump(const coord_def& target)
|| !you.is_habitable(wall_jump_landing_spot)
|| landing_actor)
{
mpr("You have no room to wall jump.");
mprf("You have no room to wall jump.");
return false;
}

for (adjacent_iterator ai(wall_jump_landing_spot, true); ai; ++ai)
{
monster* mon = monster_at(*ai);
if (mon && !_dont_attack_martial(mon) && mon->alive())
return true;
}

mpr("There is no target in range.");
targeter_walljump range;
range.set_aim(wall_jump_landing_spot);
flash_view_delay(UA_RANGE, DARKGREY, 100, &range);

return false;
return true;
}

/// Percent chance for an WJC walljump to distract a target of the given HD.
Expand All @@ -1766,7 +1775,7 @@ void wu_jian_wall_jump_effects(const coord_def& old_pos)
{
monster* target = monster_at(*ai);
if (target && !_dont_attack_martial(target) && target->alive())
targets.push_back(target);
targets.push_back(target);

if (!cell_is_solid(*ai))
check_place_cloud(CLOUD_DUST, *ai, 1 + random2(3) , &you, 0, -1);
Expand All @@ -1777,37 +1786,55 @@ void wu_jian_wall_jump_effects(const coord_def& old_pos)
if (!target->alive())
continue;

if (you.attribute[ATTR_HEAVEN_ON_EARTH] > 0)
you.attribute[ATTR_HEAVEN_ON_EARTH] += 2;

if (you.attribute[ATTR_HEAVEN_ON_EARTH] > 0)
you.attribute[ATTR_HEAVEN_ON_EARTH] += 2;
you.apply_berserk_penalty = false;

const int number_of_attacks = _wu_jian_number_of_attacks();
if (number_of_attacks == 0)
{
mprf("You attack %s from above, but your attack speed is too slow"
" for a blow to land.", target->name(DESC_THE).c_str());
continue;
}
else
{
mprf("You %sattack %s from above%s.",
number_of_attacks > 1 ? "repeatedly " : "",
target->name(DESC_THE).c_str(),
wu_jian_has_momentum(WU_JIAN_ATTACK_WALL_JUMP) ?
" with incredible momentum" : "");
}

for (int i = 0; i < number_of_attacks; i++)
{
if (!target->alive())
const int number_of_attacks = _wu_jian_number_of_attacks();
if (number_of_attacks == 0)
{
mprf("You attack %s from above, but your attack speed is too slow"
" for a blow to land.", target->name(DESC_THE).c_str());
continue;
}

if (number_of_attacks > 1)
{
if (wu_jian_has_momentum(WU_JIAN_ATTACK_WALL_JUMP))
{
mprf("You repeatedly attack %s from above with incredible momentum!",
target->name(DESC_THE).c_str());
}
else
{
mprf("You repeatedly attack %s from above!",
target->name(DESC_THE).c_str());
}
}
else
{
if (wu_jian_has_momentum(WU_JIAN_ATTACK_WALL_JUMP))
{
mprf("You attack %s from above with incredible momentum!",
target->name(DESC_THE).c_str());
}
else
{
mprf("You attack %s from above.",
target->name(DESC_THE).c_str());
}
}

for (int i = 0; i < number_of_attacks; i++)
{
if (!target->alive())
break;

melee_attack aerial(&you, target);
aerial.wu_jian_attack = WU_JIAN_ATTACK_WALL_JUMP;
aerial.wu_jian_number_of_targets = targets.size();
aerial.attack();
}
melee_attack aerial(&you, target);
aerial.wu_jian_attack = WU_JIAN_ATTACK_WALL_JUMP;
aerial.wu_jian_number_of_targets = targets.size();
aerial.attack();
}
}

for (radius_iterator ri(you.pos(), LOS_NO_TRANS); ri; ++ri)
Expand All @@ -1817,8 +1844,7 @@ void wu_jian_wall_jump_effects(const coord_def& old_pos)
if (mon && mon->alive()
&& you.can_see(*mon)
&& mon->behaviour != BEH_SLEEP
&& !_dont_attack_martial(mon)
&& !mon->has_ench(ENCH_DISTRACTED_ACROBATICS))
&& !_dont_attack_martial(mon))
{
const int distract_chance
= _walljump_distract_chance(mon->get_hit_dice());
Expand All @@ -1830,15 +1856,19 @@ void wu_jian_wall_jump_effects(const coord_def& old_pos)
continue;

if (mon->holiness() == MH_NONLIVING)
simple_monster_message(*mon, " loses track of your position.");
simple_monster_message(*mon, " loses track of your position.");
else
simple_monster_message(*mon, " is distracted by your jump.");
simple_monster_message(*mon, " is distracted by your jump.");

mon->add_ench(
mon_enchant(ENCH_DISTRACTED_ACROBATICS, 1, nullptr,
random_range(3, 5) * BASELINE_DELAY));
random_range(2, 4) * BASELINE_DELAY));
mon->foe = MHITNOT;
mon->target = mon->pos();
const int non_move_energy = min(entry->energy_usage.move,
entry->energy_usage.swim);

mon->speed_increment -= non_move_energy;
}
}
}
Expand Down

0 comments on commit db086f9

Please sign in to comment.