Skip to content

Rage mechanic#166

Open
rayrobdod wants to merge 22 commits into
HamaIndustries:masterfrom
rayrobdod:skill-charge
Open

Rage mechanic#166
rayrobdod wants to merge 22 commits into
HamaIndustries:masterfrom
rayrobdod:skill-charge

Conversation

@rayrobdod
Copy link
Copy Markdown
Collaborator

@rayrobdod rayrobdod commented May 4, 2018

#165

  • Add a stat to each unit called "skillCharge" in the code and "Rage" in the UI.
  • A unit's maximum skillCharge is 50. The value is implemented as the Unit.MAX_SKILL_CHARGE constant.
  • A unit's skill charge increases when it takes damage from battle. This is implemented as the "ChargeSkillFromDamageRecieved" combat trigger. Swordmasters and Assassins gain 2 rage per damage dealt; everyone else gains 1 rage per damage dealt.
  • A unit's skill charge increases by 5 for every round of combat in which it is equipped with a Killer weapon or Wo Dao. Despite the following weapons having a crit value over 15, I did not touch Aura, Arbalest, Falchion or Sol Katti.
  • A unit's skill charge increases by 2 for every start-of-phase in which it is equipped with a Killer weapon or Wo Dao.
  • Add a "Rage" combat trigger to every unit that, on enemy phase and if the unit has the skillCharge to spend, involuntarily spends a full rage meter to triple damage. The combat trigger is checked individually for each strike.
  • Add a FieldSkill to every unit that is available if the unit has a full skillCharge; if selected the unit performs an attack with an additional "Rage" Combat Trigger that spends a full rage meter to triple damage. The default attack doesn't have the combat trigger, and thus doesn't spend skillCharge. Like the other "Rage", the combat trigger is checked for each strike individually.
  • Add "Olivi Grass" item that increases the user's rage by 10. Price, uses, name, potency, icon and existence are open to re-evaluation.
  • Shoving or Smiting an enemy will increase the target's skillCharge by 5 or 15, respectively.

Notes/Known Issues:

  • I accidentally left a "Blessed Bow" in the raws.
  • The rage depletion from a lord death is not implemented. I'm not even sure how to go about implementing that.
  • This does break binary compatibility of the network protocol - the client has to tell the server whether "rage" field skill was activated and the server has to tell the clients about skillCharge changes. It was just adding fields to existing structs, so I see little risk of intra-version breakage, however.
  • The Battle Preview does not account for either rage skill. Rage is predictable enough that the preview should be able to predict a Rage, but nothing else that can cause a follow-up strike to have a different damage than the first strike is reported.
  • The "Rage" Field Skill is currently at the bottom of the list, below Shove and Smite. It might make more sense for it to appear directly under "Attack" but putting Rage and Shove in different places would be tricky.
  • Rage can stack with %-chance skills, missing, or even normal criticals. I didn't make any special cases to deal with these. Good thing we have our "nullified" RNG settings now. Although it does make me want for the resource modding sprint.
  • When I tried it, Eclipse overrode Rage (still spent the skill charge), but since order of items in a HashMap is unpredictable, I make no promises that Rage+Eclipse won't change to dealing (enemy's remaining HP) * 3 - 3 for little-to-no reason.
  • If, in the future, there are other skills linked to the 'skillCharge' value (be it giving a certain class a Sol or Luna effect instead of a Crit effect, or tying a Laguz-like form shift to that value) then referring to "skillCharge" as "rage" in the UI doesn't make sense. MP, maybe? Or refer to the points as Rage, but not the crit-like effect?
  • Skill charge changes are not shown during battles. It is only shown during overworld interactions (shoving and item use)
  • All start-of-turn effects happen concurrently and with no focus-on-effect camera movement. This is also true for throne healing. An example of it's odd, but there's precedence.

The amount is constant per hit. The amount was set based on the class's
current inate critical ratio - 1 charge for 0 inate crit, 2 charge for 10
inate crit, and 3 charge for 20 inate crit. If a killer weapon is equipped,
then charge is increased by an additional one under the same condition.

I detail this, even though I have made no attempts to balance anything and
assume the numbers will be tweaked.
"Rage" is a skill that will reduce skill charge by 3 and triple
damage whenever the attacker's skill charge is greater than 3.
It is completely involuntary, however. I hear the ideal is
involuntary on enemy phase an voluntary on player phase.

The rage skill's animation doesn't use the unit's critical
animations, but does use the critical hit effect, and has a
displayed name.
Named "Rage". Added to every class.
* Maximum skill charge changed from 9 to 50
* Cost of Rage skills changed from 3 to 50
* Skill charge when taking damage changed from `if damage != 0 then
  (1 * multiplier)` to `damage * multiplier`
* Skill charge when holding a killer weapon changed from `if damage
  != 0 then 1` during an enemy's attack round to `5` during both
  attack rounds
The int return value wasn't used anywhere. It seemed to be 'amount
of HP healed', but everywhere that wants to know that measures side
effects rather than using the return value. Besides, using an item
will soon have more possible side effects than 'heal HP'
Includes a sample start-of-phase effect and a debug weapon that has that effect.
Specifically, the `Debug Blessed Bow`, which will restore 5 HP to the wielder
when equipped.

The application of StartOfPhaseEffects more-or-less copies the application of
TerrainTriggers, while the storage more-or-less copies the storage of
CombatTriggers.
@rayrobdod rayrobdod added the wip label May 4, 2018
@rayrobdod
Copy link
Copy Markdown
Collaborator Author

This is what I mean by start of turn effects happen concurrently, BTW. (In this case, everyone has a Wo Dao equipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant