From d34d969d0119c35b20bf4fd003a3607d2d8e3068 Mon Sep 17 00:00:00 2001 From: K4thos Date: Tue, 14 Jun 2022 21:18:51 +0200 Subject: [PATCH] Dizzy changes part3 #561 - added notHitBy to dizzy states - new constant: Super.LifeToDizzyPointsMul (works like Default.LifeToDizzyPointsMul, but for super moves) --- data/common.const | 3 ++- data/dizzy.zss | 14 ++++++++++---- src/char.go | 12 +++++++++--- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/data/common.const b/data/common.const index 8146a03d6..c4807f899 100644 --- a/data/common.const +++ b/data/common.const @@ -12,7 +12,8 @@ Default.Attack.LifeToPowerMul = 0.7 ; multiplier for power the attacker gets whe Default.GetHit.LifeToPowerMul = 0.6 ; multiplier for power the receiver gets when an attack successfully hits (overridden by givepower HitDef option) Super.TargetDefenceMul = 1.5 ; multiplier for how much damage a super does when you combo into it (ignored if SuperPause p2defmul option is set) Default.LifeToGuardPointsMul = -1.5 ; multiplier for guard points the receiver gets when an attack is blocked (overridden by guardpoints HitDef option) -Default.LifeToDizzyPointsMul = -1.8 ; multiplier for dizzy points the receiver gets when an attack successfully hits (overridden by dizzypoints HitDef option) +Default.LifeToDizzyPointsMul = -1.8 ; multiplier for dizzy points the receiver gets when a normal/special attack successfully hits (overridden by dizzypoints HitDef option) +Super.LifeToDizzyPointsMul = 0 ; multiplier for dizzy points the receiver gets when a super attack successfully hits (overridden by dizzypoints HitDef option) Default.LifeToRedLifeMul = 0.25 ; multiplier for red life the receiver gets when an attack successfully hits (overridden by redlife HitDef option) Default.IgnoreDefeatedEnemies = 1 ; prevents EnemyNear from redirecting defeated enemies (toggle) Input.PauseOnHitPause = 1 ; controls if inputs should be retained during hit pause diff --git a/data/dizzy.zss b/data/dizzy.zss index a92bcf0d5..ba3266314 100644 --- a/data/dizzy.zss +++ b/data/dizzy.zss @@ -115,6 +115,8 @@ if !dizzy { dizzySet{value: 1} } +notHitBy{value: SCA} + if time = 0 { if stateType = S { if anim > const(AnimStandOrAirHitLow_light) { @@ -149,6 +151,7 @@ if !dizzy { if time = 0 { afterImageTime{time: 0} + notHitBy{value: SCA; time: 1} if selfAnimExist(const(AnimAirFall_hitUpDiagonal)) { changeAnim{value: const(AnimAirFall_hitUpDiagonal)} } @@ -162,6 +165,11 @@ if anim = [const(AnimAirFall), const(AnimAirFall_hitUpDiagonal)] { } } +# AnimHitGround + AnimGetUp +if anim != [const(AnimAirFall), const(AnimAirFall_hitUpDiagonal)] { + notHitBy{value: SCA} +} + persistent(0) if animTime = 0 && anim = const(AnimHittingGroundFromFall) { changeAnim{value: const(AnimBounceIntoAir)} } @@ -222,6 +230,8 @@ if (animTime = 0 && anim = [const(AnimGetUpFromLieDown), const(AnimGetUpFromLieD changeState{value: const(StateDizzy)} } +notHitBy{value: SCA; time: 1} + #=============================================================================== # StateDizzy #=============================================================================== @@ -269,10 +279,6 @@ if !const(Default.Enable.Dizzy) || isHelper || teamSide = 0 { dizzyPointsSet{value: dizzyPointsMax} mapSet{map: "_iksys_dizzyPointsCounter"; value: 0} } else if roundState = 2 && alive { - # Hyper attacks don't affect dizzy points - ignoreHitPause if hitDefAttr = SCA, HA { - assertSpecial{flag: nodizzypointsdamage} - } # Upon hit ignoreHitPause if moveType = H { mapSet{map: "_iksys_dizzyPointsCounter"; value: 120} diff --git a/src/char.go b/src/char.go index 1439db4d3..7891a5a4f 100644 --- a/src/char.go +++ b/src/char.go @@ -1957,7 +1957,8 @@ func (c *Char) load(def string) error { gi.constants["default.gethit.lifetopowermul"] = 0.6 gi.constants["super.targetdefencemul"] = 1.5 gi.constants["default.lifetoguardpointsmul"] = -1.5 - gi.constants["default.lifetodizzypointsmul"] = 0 + gi.constants["default.lifetodizzypointsmul"] = -1.8 + gi.constants["super.lifetodizzypointsmul"] = 0 gi.constants["default.lifetoredlifemul"] = 0.25 gi.constants["default.ignoredefeatedenemies"] = 1 gi.constants["input.pauseonhitpause"] = 1 @@ -3766,8 +3767,13 @@ func (c *Char) setHitdefDefault(hd *HitDef, proj bool) { int32(c.gi().constants["default.gethit.lifetopowermul"]*float32(hd.hitdamage))) ifierrset(&hd.guardgivepower, int32(c.gi().constants["default.gethit.lifetopowermul"]*float32(hd.hitdamage)*0.5)) - ifierrset(&hd.dizzypoints, - int32(c.gi().constants["default.lifetodizzypointsmul"]*float32(hd.hitdamage)*c.attackMul)) + if hd.attr&int32(AT_AH) != 0 { + ifierrset(&hd.dizzypoints, + int32(c.gi().constants["super.lifetodizzypointsmul"]*float32(hd.hitdamage)*c.attackMul)) + } else { + ifierrset(&hd.dizzypoints, + int32(c.gi().constants["default.lifetodizzypointsmul"]*float32(hd.hitdamage)*c.attackMul)) + } ifierrset(&hd.guardpoints, int32(c.gi().constants["default.lifetoguardpointsmul"]*float32(hd.hitdamage)*c.attackMul)) ifierrset(&hd.redlife,