Non-Variable/Copy&Paste Super Armor
From M.U.G.E.N Wiki
Seravy's comment : This is a partial Superarmor. It works against all A and all P type attacks (generally most projectiles and attacks), while it has no effect against T type attacks at all. (throws, fullscren AOE attacks, etc...) If you want a full superarmor that works against every kind of attack, you have to change the code accordingly.
This is a code I created from scratch ever since 2 hours ago on Feb 15, 2010. If one like this exists, I wouldnt know about it.
This code is COPY AND PASTE (yaaay!) considering if you do not have any state in your character with the following state numbers.
Of course you'd have to do all the sound effects and graphical effects yourself.
This code uses no variables. It will be in my code archive too whenever I decide to organize it better when i put it back up: www.shinra-enterprise.webs.com
DO NOT copy and paste all at once. Positive state coding goes with the positive states and negatives with negatives.
Please be honorable and give credit if you use. Adding effects or making tweaks doesn't mean that you made it. You just edited. Still give credit. Common sense states that since it's Elecbyte's engine, then of course it's really their code. It's all about EFFORT. Ask yourself would this have been figured out in this particular way if it wasnt for the author of the code and/or author's certain positionings of elecbyte's codings. Thanx.
If there are any problems/suggestions (ABOUT THIS CODE ONLY), feel free to speak up. [Not tested in 1.0]
add this in the cmd file as a trigger for parry and just defend cmds: !NumHelper(9393) && !NumHelper(9394)
;POSITIVE STATES (where ever negative state coding is not): ; ;Non-Intrusive Armor_ShinRa358 [Statedef 9393] type = U movetype = I ;<---idle status physics = N ctrl = 0 [State 9393, ] type = BindToRoot ;<---binds this helper to the player. YES Cyanide, you can bind helpers to players if the x and y parameters are omitted. As far as this code goes anyway. Don't believe? Null this, turn on debug mode/clsn mode, and see... trigger1 = 1 ignorehitpause = 1 [State 9393, ChangeAnim] ;<---copycat's YOU, the player's, animation. Root = YOU, Parent = Helper that spawns another helper. type = ChangeAnim trigger1 = selfanimexist(root,anim) elem = root,animelemno(0) value = root,anim [State 9393, ] type = HitBy ;<----This helper can only be hit by the below parameters trigger1 = 1 value = SCA,AA,AP [State 9393, ] type = AssertSpecial trigger1 = 1 flag = invisible flag2 = noshadow ;<----shadows don't appear when something is invisble but i put this trigger here anyway. [State 9393, ] type = HitOverride ;<----Changes Helper state 9393 to 9394 if hit by the below parameters. When this occurs, this state (9393) will not exist anymore. trigger1 = 1 attr = SCA,AA,AP stateno = 9394 time = -1 slot = 0 [State 9393, ] type = null;DestroySelf trigger1 = root,var(30)!=1 ;<----Mode variable goes here. If Armor is active all the time or if you do not have a mode var, keep this sctrl nulled. ;------- ;Excel Armor End ;<----Effects go here [Statedef 9394] type = U movetype = H ;<---getting hit status physics = N ctrl = 0 [State 9394, ] type = BindToRoot trigger1 = 1 ignorehitpause = 1 [State 9394, ChangeAnim] type = ChangeAnim trigger1 = selfanimexist(root,anim) elem = root,animelemno(0) value = root,anim [State 9394, ] type = NotHitBy trigger1 = 1 value = SCA [State 9394, ] type = AssertSpecial trigger1 = 1 flag = invisible flag2 = noshadow [State 9394, ] type = ChangeState ;Solidifies single hit attacks from doing multiple hits trigger1 = 1 value = 9393 [State 9394, ] type = DestroySelf trigger1 = !(enemynear,movehit) ;<---gets rid of this helper state after enemy attack lands with some space in between to prevent a single hit from happening more than once. Should be fine as is. Thanx to Cyanide for this portion. ;trigger2 = (root,var(30)!=1) ;<----Mode variable goes here. If Armor is active all the time or if you do not have a mode var, keep this trigger nulled.
;======================================= ;NEGATIVE STATES (in this instance, the cmd file): ; [State -1, ] type = assertspecial trigger1 = 1 ;<----Mode variable goes here. If Armor is active all the time or if you do not have a mode var, keep this trigger as is. flag = noairguard flag2 = nostandguard flag3 = nocrouchguard [State -1, Player_NotHit_During_Armor] type = HitBy trigger1 = NumHelper(9393) || NumHelper(9394) ;<---Player (YOU) are only hitby the below parameters when these helpers (the actual armor) is active. ;trigger2 = var(30)=1 ;<----Mode variable goes here. If Armor is active all the time or if you do not have a mode var, keep this trigger as nulled. value = SCA,AT [State -1, SprPriority_During_Armor_When_Idle] type = SprPriority trigger1 = movetype=I ;<----YOUR sprite priority is the below parameter if your movetype is idle ;trigger2 = var(30)=1 ;<----Mode variable goes here. If Armor is active all the time or if you do not have a mode var, keep this trigger as nulled. value = -1 [State -1, Attack_Taker] type = Helper ;<-----acts as the bodyguard of YOU. The actual armor.....a helper. triggerall = !NumHelper(9393) ;&& var(30)=1 ;<----Mode variable goes here. If Armor is active all the time or if you do not have a mode var, keep this portion of this trigger nulled. trigger1 = MoveType != H stateno = 9393 ;<----stateno of helper definitions id = 9393 [State -1, damage_during_armor] type = LifeAdd trigger1 = NumHelper(9393) trigger1 = Helper(9393),gethitvar(hitcount)=1 ;<----cannot be on the same line as the 1st trigger1 for some odd reason... value = -Helper(9393),GetHitVar(Damage) ;<----gives damage that the helper bodyguard takes to YOU kill = 1 ;<----controls whether you can be killed when above helper is active