I was in the middle of looking over and reviewing New Pikachu's coding when I ran into this:
[State 6900, 4]
type = HitDef
trigger1 = Time >=0
attr = S, NA
animtype = Medium
damage = 20,0
guardflag = MA
pausetime = 0,0
sparkxy = -10,0
hitsound = S2401,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime = 15
ground.velocity = -5,0
air.velocity = -2.2,-3.2
persistent = 20
palfx.time = 45
palfx.add = 0,15,75
palfx.color = 0
palfx.invertall = 1
palfx.sinadd=255,255,255,4
It's the Hitdef for the Pikachu's Lighting Shield helper. I was curious: what is exactly preventing the shield from inflicting damage every millisecond? The shield inflicts damage every 3/4 second or so, based on my estimate, which is a far-cry from a damage-every-millisecond that I would expect from the trigger that was used for the coding, so there is something hidden in the background that slows down the damage pulses.
[Statedef -2]
;Used as a counter
[State -2, 1]
type = varadd
trigger1 = var(1) > 0
v = 1
value = 1
;Activated the shield explode effect every 8 ticks
[State -2, 2]
type = varadd
trigger1 = var(1) = 8
v = 2
value = 1
;read above
[State -2, 4]
type = varset
trigger1 = var(1) > 8
v = 2
value = 0
;Counter 'til shield expires
[State -2, 4]
type = varadd
trigger1 = var(1) > 8
v = 3
value = 1
;resets var(1)
[State -2, 3]
type = varset
trigger1 = var(1) > 8
v = 1
value = 1
My similar confusion on how and why the coding is not getting finished at a lighting pace also applies to this piece of coding the whole Pikachu's Lighting Shield setup seems to rely on. I am curious on what is preventing variable 3 to shoot up to 1000 or so in a blink of an eye. The whole thing is a counter, sure, but there is nothing in the coding that seems to prevent the program from running the cycles so many times in a blink of an eye...