Magus420
Smash Master
Shield Stuff
____________________________________________________________
Variable Shield Input
Digital/Max Analog = 1 (140/140)
Z Shield = 0.35 (49/140)
Min Analog = 0.30714 (43/140)
-- Range of analog 0.00-1.00 is analog increments 0-140. 0-42 (0.00-0.30) are ignored
-- If dip under 0.30 while shield remains up, use last > 0.30 amount
____________________________________________________________
Shield Size
Shield Size = {[(Shield Health * Analog Effect) / 60] * 0.85 + 0.15} * Shield Size Attribute * Model Scale
-- Analog Effect = 1 - {0.5 * [(Analog Shield - 0.3) / 0.7]}
Max Shield Health = 60
Shield Break Health = 30 (does not regen while dazed)
Max Shield Health Scale = 1
Min Shield Health Scale = 0.15
Powershield Reflect Collision Scale = 0.75
____________________________________________________________
Shield Degeneration/Regeneration
Shield Degeneration = (Analog Effect + 0.1) * 0.14
-- Analog Effect = 1.9 * [(Analog Shield - 0.3) / 0.7]
Shield Regeneration = 0.07
____________________________________________________________
Shield Damage
Shield Damage = [(floor(Damage) + Shield Damage Param) * (Analog Effect + 0.7)] * X
-- Analog Effect = 0.2 * {1 - [(Analog Shield - 0.3) / 0.7]}
-- X = 1 for Normal, 0 for Powershield
____________________________________________________________
Shield Stun
Shield Stun = {[floor(Damage) * (Analog Effect + 0.3)] * 1.5} + 2
-- Analog Effect = 0.65 * {1 - [(Analog Shield - 0.3) / 0.7]}
--- Yoshi is unaffected by shield stun
--- NOTE: Due to the way the game calculates the animation speed for the 20 frame stun animation [(Animation Frames + 0.1) / ShieldStun], it causes the actual resulting stun time to be 1 less than calculated shieldstun if:
20.1 / ShieldStun * floor{ShieldStun} >= 20
On full 1.00 shield input that happens with damages of 20,29,40, 49, 58, and 60 for example.
____________________________________________________________
Shield Knockback
Defender Shield KB = {[floor(Damage) * (Defender Analog Effect + 0.09)] + 0.4} * X
-- Defender Analog Effect = 0.195 * {1 - [(Analog Shield - 0.3) / 0.7]}
-- X = 0.6 for Normal, 1 for Powershield
--- Maximum = 2
Defender (Yoshi) Shield KB = (floor(Damage) * Defender Analog Effect) + 0.4
-- Defender Analog Effect = 0.3 * {1 - [(Analog Shield - 0.3) / 0.7]}
--- Maximum = n/a
Attacker Shield KB = (floor(Damage) * Attacker Analog Effect) + 0.02
-- Attacker Analog Effect = (Analog Shield - 0.3) * 0.1]
--- Maximum = n/a
____________________________________________________________
____________________________________________________________
Variable Shield Input
Digital/Max Analog = 1 (140/140)
Z Shield = 0.35 (49/140)
Min Analog = 0.30714 (43/140)
-- Range of analog 0.00-1.00 is analog increments 0-140. 0-42 (0.00-0.30) are ignored
-- If dip under 0.30 while shield remains up, use last > 0.30 amount
____________________________________________________________
Shield Size
Shield Size = {[(Shield Health * Analog Effect) / 60] * 0.85 + 0.15} * Shield Size Attribute * Model Scale
-- Analog Effect = 1 - {0.5 * [(Analog Shield - 0.3) / 0.7]}
Max Shield Health = 60
Shield Break Health = 30 (does not regen while dazed)
Max Shield Health Scale = 1
Min Shield Health Scale = 0.15
Powershield Reflect Collision Scale = 0.75
-- Mario Shield Size: 10.75
-- Mario Model Scale: 1.1
Full Health (60)
30 Health
15 Health
0 Health
-- Mario Model Scale: 1.1
Full Health (60)
Code:
Analog Size Actual
------------------------
0.30 10.75 11.825
0.30714 10.7034 11.7737
0.35 10.4237 11.466
0.50 9.44464 10.3891
0.65 8.46563 9.31219
1.00 6.18125 6.79938
30 Health
Code:
Analog Size
-----------------
0.30 6.18125
0.30714 6.15795
0.35 6.01808
0.50 5.52857
0.65 5.03906
1.00 3.89688
15 Health
Code:
Analog Size
-----------------
0.30 3.89688
0.30714 3.88523
0.35 3.81529
0.50 3.57054
0.65 3.32578
1.00 2.75469
0 Health
Code:
Analog Size
-----------------
0.30 1.6125
0.30714 1.6125
0.35 1.6125
0.50 1.6125
0.65 1.6125
1.00 1.6125
____________________________________________________________
Shield Degeneration/Regeneration
Shield Degeneration = (Analog Effect + 0.1) * 0.14
-- Analog Effect = 1.9 * [(Analog Shield - 0.3) / 0.7]
Shield Regeneration = 0.07
Code:
Analog Degen
-----------------
0.30714 0.01672
0.35 0.03300
0.50 0.09000
0.65 0.14700
1.00 0.28000
____________________________________________________________
Shield Damage
Shield Damage = [(floor(Damage) + Shield Damage Param) * (Analog Effect + 0.7)] * X
-- Analog Effect = 0.2 * {1 - [(Analog Shield - 0.3) / 0.7]}
-- X = 1 for Normal, 0 for Powershield
Min Shield (0.307143)
Shield Damage = (Damage + Shield Damage Param) * 0.89796
Z Shield (0.35)
Shield Damage = (Damage + Shield Damage Param) * 0.885714
Half Shield (0.65)
Shield Damage = (Damage + Shield Damage Param) * 0.8
Hard Shield (1.0)
Shield Damage = (Damage + Shield Damage Param) * 0.7
Code:
Damage S.Damage
-----------------
01 0.898
02 1.7959
03 2.6939
04 3.5918
...
50 44.898
Z Shield (0.35)
Code:
Damage S.Damage
-----------------
01 0.8857
02 1.7714
03 2.6571
04 3.5429
...
50 44.2857
Half Shield (0.65)
Code:
Damage S.Damage
-----------------
01 0.8
02 1.6
03 2.4
04 3.2
...
50 40.0
Hard Shield (1.0)
Code:
Damage S.Damage
-----------------
01 0.7
02 1.4
03 2.1
04 2.8
...
50 35.0
____________________________________________________________
Shield Stun
Shield Stun = {[floor(Damage) * (Analog Effect + 0.3)] * 1.5} + 2
-- Analog Effect = 0.65 * {1 - [(Analog Shield - 0.3) / 0.7]}
--- Yoshi is unaffected by shield stun
--- NOTE: Due to the way the game calculates the animation speed for the 20 frame stun animation [(Animation Frames + 0.1) / ShieldStun], it causes the actual resulting stun time to be 1 less than calculated shieldstun if:
20.1 / ShieldStun * floor{ShieldStun} >= 20
On full 1.00 shield input that happens with damages of 20,29,40, 49, 58, and 60 for example.
Code:
80092DA0: C084028C lfs f4,652(r4) # f4=1.5
80092DA4: EC421828 fsubs f2,f2,f3 # f2=Damage (floored). last step of an int->float cast
80092DA8: C0040290 lfs f0,656(r4) # f0=2
80092DAC: 807D0028 lwz r3,40(r29)
80092DB0: EC220072 fmuls f1,f2,f1 # f1=0.3 on hard shield
80092DB4: EFE4007A fmadds f31,f4,f1,f0
Code:
Analog f1 (Analog effect + 0.3)
-----------------
0.30714 0.943367
0.35 0.903571
0.50 0.764285
0.65 0.625
1.00 0.300
____________________________________________________________
Shield Knockback
Defender Shield KB = {[floor(Damage) * (Defender Analog Effect + 0.09)] + 0.4} * X
-- Defender Analog Effect = 0.195 * {1 - [(Analog Shield - 0.3) / 0.7]}
-- X = 0.6 for Normal, 1 for Powershield
--- Maximum = 2
Defender (Yoshi) Shield KB = (floor(Damage) * Defender Analog Effect) + 0.4
-- Defender Analog Effect = 0.3 * {1 - [(Analog Shield - 0.3) / 0.7]}
--- Maximum = n/a
Attacker Shield KB = (floor(Damage) * Attacker Analog Effect) + 0.02
-- Attacker Analog Effect = (Analog Shield - 0.3) * 0.1]
--- Maximum = n/a
Min Shield (0.307143)
Defender Shield KB = (Damage * 0.169806) + 0.24
Attacker Shield KB = (Damage * 0.0007143) + 0.02
Z Shield (0.35)
Defender Shield KB = (Damage * 0.162644) + 0.24
Attacker Shield KB = (Damage * 0.005) + 0.02
Lightish Shield (0.50)
Defender Shield KB = (Damage * 0.137571) + 0.24
Attacker Shield KB = (Damage * 0.02) + 0.02
Half Shield (0.65)
Defender Shield KB = (Damage * 0.1125) + 0.24
Attacker Shield KB = (Damage * 0.035) + 0.02
Hard Shield (1.0)
Defender Shield KB = (Damage * 0.054) + 0.24
Attacker Shield KB = (Damage * 0.07) + 0.02
Power Shield (1.0)
Defender Shield KB = (Damage * 0.09) + 0.4
Attacker Shield KB = (Damage * 0.07) + 0.02
Yoshi (0.307143)
Defender (Yoshi) Shield KB = (Damage * 0.296939) + 0.4
Attacker Shield KB = (Damage * 0.0007143) + 0.02
Yoshi (1.0)
Defender (Yoshi) Shield KB = (Damage * 0) + 0.4
Attacker Shield KB = (Damage * 0.07) + 0.02
Code:
Damage Defendr Attackr
-------------------------
01 0.40981 0.0207143
02 0.57961 0.0214286
03 0.74942 0.0221429
Attacker Shield KB = (Damage * 0.0007143) + 0.02
Z Shield (0.35)
Code:
Damage Defendr Attackr
-------------------------
01 0.40264 0.025
02 0.56529 0.030
03 0.72793 0.035
04 0.89057 0.040
05 1.05321 0.045
Attacker Shield KB = (Damage * 0.005) + 0.02
Lightish Shield (0.50)
Code:
Damage Defendr Attackr
-------------------------
01 0.37757 0.04
02 0.51514 0.06
03 0.65271 0.08
Attacker Shield KB = (Damage * 0.02) + 0.02
Half Shield (0.65)
Code:
Damage Defendr Attackr
-------------------------
01 0.3525 0.055
02 0.4650 0.09
03 0.5775 0.125
Attacker Shield KB = (Damage * 0.035) + 0.02
Hard Shield (1.0)
Code:
Damage Defendr Attackr
-------------------------
01 0.294 0.090
02 0.348 0.160
03 0.402 0.230
04 0.456 0.300
05 0.510 0.370
06 0.564 0.440
07 0.618 0.510
08 0.672 0.580
09 0.726 0.650
10 0.780 0.720
11 0.834 0.790
12 0.888 0.860
13 0.942 0.930
14 0.996 1.000
15 1.050 1.070
16 1.104 1.140
17 1.158 1.210
18 1.212 1.280
19 1.266 1.350
20 1.320 1.420
21 1.374 1.490
22 1.428 1.560
23 1.482 1.630
24 1.536 1.700
...
50 2.000 3.520
Attacker Shield KB = (Damage * 0.07) + 0.02
Power Shield (1.0)
Code:
Damage Defendr Attackr
-------------------------
01 0.490 0.090
02 0.580 0.160
03 0.670 0.230
04 0.760 0.300
05 0.850 0.370
06 0.940 0.440
07 1.030 0.510
08 1.120 0.580
09 1.210 0.650
10 1.300 0.720
11 1.390 0.790
12 1.480 0.860
13 1.570 0.930
14 1.660 1.000
15 1.750 1.070
16 1.840 1.140
17 1.930 1.210
18 2.000 1.280
19 2.000 1.350
20 2.000 1.420
21 2.000 1.490
22 2.000 1.560
23 2.000 1.630
24 2.000 1.700
...
50 2.000 3.520
Attacker Shield KB = (Damage * 0.07) + 0.02
Yoshi (0.307143)
Code:
Damage Defendr Attackr
-------------------------
01 0.69694 0.0207143
02 0.99388 0.0214286
03 1.29082 0.0221429
...
50 15.2469 0.0557142
Attacker Shield KB = (Damage * 0.0007143) + 0.02
Yoshi (1.0)
Code:
Damage Defendr Attackr
-------------------------
01 0.400 0.090
02 0.400 0.160
03 0.400 0.230
...
50 0.400 3.520
Attacker Shield KB = (Damage * 0.07) + 0.02
____________________________________________________________
Last edited: