read mepdf v3_0_08_damagingcontrol
TRANSCRIPT
Damaging Control
Last Updated in 2.5
UnitStatus, DestroyableObject, and anything that can be dealt damage to share Interface DealDamage_Interface
Anything that can receive
damage
Send Attack Data
Anything that can deal Damage Receive Feedback
What the Defender do with Attack Data is dependent on their own class
Damage Calculation
Last Updated in 2.5
Damage Calculation for Unit is done in DamageControl_CustomClasses.cs , DamageAngleHitData ,CalcTotalDamage()
By Default, it does the following
Get Attacker Damage Value and Element
Calculate final Damage Value
YES
Compare to Resistance of related Element
See if Guarding was successful or not
Hit Direction
Last Updated in 2.5
Ignoring Y-Axis, If a Unit got Attacked, it will find out where the Attack originated based from its horizontal orientation.
Front = 315-360, 0- 45 Right = 45-135 Back = 135-225 Left = 225-315 These were then used to determine which
Damaging Motion to blend to
Successful Guarding
Last Updated in 2.5
If the Unit is Guarding, depending from where the attack originated, Guard Range determine whether Guarding is successful or not
90degree, 45to the right and 45to the left = Success
315-360, 0-45 = Success
120degree, 60to the right and 60to the left = Success
300-360, 0-60 = Success
If Guarding is Successful, the Damage is reduced by the Percentage in
GuardDamageCutPercentage
Power Defence Level
Last Updated in 2.5
Power Level represent how powerful the Attack is, For example, a Sword might have a base Power of 0. While an Axe would be 1. And The Powerful Cannon is 5. From the Attacker, it is equal to Weapon’s Power + Motion’s Power
For the Defender, it is determined by UnitStatus’ PowerDefenceLevel This value will be +1 when successful guarding is also made
Got Hit Motion
Last Updated in 2.5
Which Motion will the Unit blend to, is determined by Power Difference of the Attacker and Defender
ATK < DEF, Stick ATK0, Guarding DEF1, Attacker lost stance, Attacker Cancel Attack Stick ATK0, Armor DEF1,motion will not get affected.
ATK == DEF, Sword ATK1, Guarding DEF1, Nothing Happen Sword ATK1, Armor DEF1, Unit will blend to got hit motion. Defender Cancel Attack
ATK > DEF by 1, Hammer ATK2, Guarding DEF1, blend to Guard Break Motion Hammer ATK2, Armor DEF1, Unit will got blown away.
ATK > DEF by 2 or more, Cannon ATK3, Guarding DEF1, Unit will got blown away. Cannon ATK3, Armor DEF1, Unit will got blown away.
Force
Last Updated in 2.5
Force is the value that the Defender will got pushed away from the Attacker. Total value is determined by Weapon’s Force * Motion’s Force **WARNING** If either value is 0, the Defender will never be push away
AddForce
Attack
Getup input
Last Updated in 2.5
If the Attack is really Powerful, thus that Defender got blown away, the Unit will enter “Downing” State after reaching Ground. Inside Input, anything that return
true in GetUp() will make the Unit stand up.
Getup Attack
Last Updated in 2.5
While in Downing State, if GetUpAttack() input was made instead, The Unit will do GetUp Attack
Getup Attack
Last Updated in 2.5
Element0 is reserved for when Unit is facing upward Element1 is reserved for when Unit is facing downward
To be precise, this is determined by which direction spineBone is facing