public static void CrouchGetupState(AbstractFighter actor) { if (actor.KeyBuffered("Shield")) { //TODO forward backward roll } if (actor.KeyBuffered("Attack")) { if (actor.CheckSmash("DownSmash")) { actor.doAction("DownSmash"); } else { actor.doAction("DownAttack"); } } if (actor.KeyBuffered("Special")) { actor.doAction("DownSpecial"); } if (actor.KeyBuffered("Jump")) { actor.doAction("Jump"); } }
public static void AirState(AbstractFighter actor) { StateTransitions.AirControl(actor); if (actor.KeyBuffered("Shield") && actor.GetIntVar(TussleConstants.FighterVariableNames.AIR_DODGES_REMAINING) >= 1) { //actor.doAction("AirDodge"); } if (actor.KeyBuffered("Attack")) { actor.doAirAttack(); } if (actor.KeyBuffered("Special")) { actor.doAirSpecial(); } if (actor.KeyBuffered("Jump") && actor.GetIntVar(TussleConstants.FighterVariableNames.JUMPS_REMAINING) > 0) { actor.doAction("AirJump"); } actor.SendMessage("CheckForGround"); if (actor.GetBoolVar(TussleConstants.FighterVariableNames.IS_GROUNDED) && actor.ground_elasticity == 0 && actor.GetIntVar("tech_window") == 0) { actor.BroadcastMessage("ChangeXPreferred", 0.0f, SendMessageOptions.RequireReceiver); actor.BroadcastMessage("ChangeYPreferred", actor.GetFloatVar(TussleConstants.FighterAttributes.MAX_FALL_SPEED)); actor.doAction("Land"); } //TODO fastfal }
public static void MoveState(AbstractFighter actor) { if (actor.CheckSmash("ForwardSmash")) { actor.doAction("Dash"); } //float direction = actor.GetControllerAxis("Horizontal") * actor.facing; //shield if (actor.KeyBuffered("Attack")) { actor.doGroundAttack(); } if (actor.KeyBuffered("Special")) { actor.doGroundSpecial(); } if (actor.KeyBuffered("Jump")) { actor.doAction("Jump"); } // else if (actor.DirectionHeld("Down")) // actor.doAction("Crouch"); else if (actor.GetAxis("Horizontal") == 0.0f) { actor.doAction("Stop"); } if (actor.KeyBuffered(InputTypeUtil.GetBackward(actor.getBattleObject()))) { actor.SendMessage("flip"); //TODO PIVOT } //Two other kinds of stop? Not sure if these are needed }
public static void DashState(AbstractFighter actor) { /* * (key,invkey) = _actor.getForwardBackwardKeys() * if _actor.keyHeld('attack'): * if _actor.keysContain('shield'): * _actor.doAction('DashGrab') * elif _actor.checkSmash(key): * print("Dash cancelled into forward smash") * _actor.doAction('ForwardSmash') * else: * _actor.doAction('DashAttack') * elif _actor.keyHeld('special'): * _actor.doGroundSpecial() * elif _actor.keysContain('down', 0.5): * _actor.doAction('RunStop') * elif not _actor.keysContain('left') and not _actor.keysContain('right') and not _actor.keysContain('down'): * _actor.doAction('RunStop') * elif _actor.preferred_xspeed < 0 and not _actor.keysContain('left',1) and _actor.keysContain('right',1): * _actor.doAction('RunStop') * elif _actor.preferred_xspeed > 0 and not _actor.keysContain('right',1) and _actor.keysContain('left',1): * _actor.doAction('RunStop') */ //float direction = actor.GetControllerAxis("Horizontal") * actor.facing; //shield if (actor.KeyBuffered("Attack")) { actor.doGroundAttack(); } if (actor.KeyBuffered("Special")) { actor.doGroundSpecial(); } if (actor.KeyBuffered("Jump")) { actor.doAction("Jump"); } else if (actor.GetAxis("Horizontal") == 0.0f) { actor.doAction("Stop"); } if (actor.KeyBuffered(InputTypeUtil.GetBackward(actor.getBattleObject()))) { actor.SendMessage("flip"); //TODO PIVOT } }
public static void StopState(AbstractFighter actor) { //shield //attack //special if (actor.KeyBuffered("Jump")) { actor.doAction("Jump"); } //if repeated, dash //pivot }
public static void NeutralState(AbstractFighter actor) { //shield if (actor.KeyBuffered("Attack")) { actor.doGroundAttack(); } if (actor.KeyBuffered("Special")) { actor.doGroundSpecial(); } if (actor.KeyBuffered("Jump")) { actor.doAction("Jump"); } //if (actor.KeyBuffered("Shield")) // actor.doAction("Shield"); // if (actor.DirectionHeld("Down")) // actor.doAction("Crouch"); if (actor.DirectionHeld("Forward")) { actor.doAction("Move"); } if (actor.DirectionHeld("Backward")) { actor.SendMessage("flip"); //TODO PIVOT actor.doAction("Move"); } /* * if (actor.GetControllerAxis("Horizontal") != 0.0f) * { * float direction = actor.GetControllerAxis("Horizontal"); * if (direction * actor.facing < 0.0f) //If the movement and facing do not match * actor.flip(); * actor.doAction("Move"); * } */ }
public static void LedgeState(AbstractFighter actor) { /* * (key,invkey) = _actor.getForwardBackwardKeys() * _actor.setSpeed(0, _actor.getFacingDirection()) * if _actor.keyHeld('shield'): * _actor.ledge_lock = True * _actor.doAction('LedgeRoll') * elif _actor.keyHeld('attack'): * _actor.ledge_lock = True * _actor.doAction('LedgeAttack') * elif _actor.keyHeld('jump'): * _actor.ledge_lock = True * apply_invuln = statusEffect.TemporaryHitFilter(_actor,hurtbox.Intangibility(_actor),6) * apply_invuln.activate() * _actor.doAction('Jump') * elif _actor.keyHeld(key): * _actor.ledge_lock = True * _actor.doAction('LedgeGetup') * elif _actor.keyHeld(invkey): * _actor.ledge_lock = True * apply_invuln = statusEffect.TemporaryHitFilter(_actor,hurtbox.Intangibility(_actor),6) * apply_invuln.activate() * _actor.doAction('Fall') * elif _actor.keyHeld('down'): * _actor.ledge_lock = True * apply_invuln = statusEffect.TemporaryHitFilter(_actor,hurtbox.Intangibility(_actor),6) * apply_invuln.activate() * _actor.doAction('Fall') */ if (actor.KeyBuffered("Jump")) { actor.doAction("Jump"); } else if (actor.DirectionHeld("Backward")) { actor.doAction("Fall"); } }