Пример #1
0
 void RegularCloseRangeDecisions()
 {
     DecisionMade(5, 4);
     if (decision <= 20)
     {
         AIcontrols.AICrouch();
         sharedProperties.CharacterNeutralState();
         character.SetBackPressed(true);
     }
     else if (decision <= 27)
     {
         AIcontrols.AILowForward();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 30)
     {
         AIcontrols.AISweep();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 33)
     {
         AIcontrols.AIShort(15);
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 43)
     {
         AIcontrols.AIStrong(50);
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 53)
     {
         AIcontrols.AIJab(2);
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 59)
     {
         if (character.GetSuper >= 100f)
         {
             AIShunGokuSatsus();
         }
         else
         {
             AIcontrols.AIThrow();
         }
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 64)
     {
         AIHadoukenLimitsWithAttack(AIcontrols.AILowForward);
         decisionTimer = 0f;
     }
     else if (decision <= 69)
     {
         AIcontrols.AIPressedForward();
         character.SetBackPressed(false);
     }
     else if (decision <= 73)
     {
         AIcontrols.AIPressedForward();
         AIcontrols.AIJump();
         character.SetBackPressed(false);
         decisionTimer = 0f;
     }
     else if (decision <= 79)
     {
         sharedProperties.CharacterNeutralState();
         AIcontrols.AIJump();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 82)
     {
         AIcontrols.AIPressedBackward();
         character.SetBackPressed(true);
     }
     else if (decision <= 87 && !animator.GetBool("isAttacking"))
     {
         AIJabShoryuken();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else
     {
         AIHyakkishus(0, 2);
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
 }
Пример #2
0
 void RegularDecisionTree(List <string> decisionBox, int minDiv, int maxDiv)
 {
     DecisionMade(minDiv, maxDiv);
     if (decisionBox[decision] == "WalkForward" && !animator.GetBool("isAttacking"))
     {
         AIcontrols.AIStand();
         AIcontrols.AIPressedForward();
         character.SetBackPressed(false);
     }
     else if (decisionBox[decision] == "WalkBackward")
     {
         AIcontrols.AIStand();
         AIcontrols.AIPressedBackward();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "Crouch")
     {
         AIcontrols.AICrouch();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "NeutralJump" && !animator.GetBool("isAttacking"))
     {
         sharedProperties.CharacterNeutralState();
         AIcontrols.AIJump();
         character.SetBackPressed(false);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "ForwardJump" && !animator.GetBool("isAttacking"))
     {
         AIcontrols.AIPressedForward();
         AIcontrols.AIJump();
         character.SetBackPressed(false);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Roundhouse")
     {
         AIcontrols.AIRoundhouse(2, 0);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Fierce")
     {
         AIcontrols.AIFierce(2, 0);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Forward")
     {
         AIcontrols.AIForward(2);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Strong")
     {
         AIcontrols.AIStrong(10);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Short")
     {
         AIcontrols.AIShort(40);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Jab")
     {
         AIcontrols.AIJab(50);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "LowForward")
     {
         AIcontrols.AILowForward();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Sweep")
     {
         AIcontrols.AISweep();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "ScissorKick")
     {
         if (chargeSystem.GetBackCharged() && !animator.GetBool("isAttacking"))
         {
             AIScissorKicks();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AIForward(2);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "PsychoCrusher")
     {
         if (chargeSystem.GetDownCharged() && !animator.GetBool("isAttacking"))
         {
             AIPsychoCrushers();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 1);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "HeadStomp")
     {
         if (chargeSystem.GetDownCharged() && !animator.GetBool("isAttacking"))
         {
             AIHeadStomps();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 1);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "DevilsReverse")
     {
         if (chargeSystem.GetDownCharged() && !animator.GetBool("isAttacking"))
         {
             AIDevilsReverses();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 0);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "SpecialCancelScissorKick")
     {
         if (chargeSystem.GetBackCharged())
         {
             AIScissorKicks();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AIForward(2);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "SpecialCancelPsychoCrusher")
     {
         if (chargeSystem.GetBackCharged())
         {
             AIPsychoCrushers();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 1);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "SpecialCancelHeadStomp")
     {
         if (chargeSystem.GetDownCharged())
         {
             AIHeadStomps();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 1);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "SpecialCancelDevilsReverse")
     {
         if (chargeSystem.GetDownCharged())
         {
             AIDevilsReverses();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 0);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Super")
     {
         if (character.GetSuper >= 100f)
         {
             AIKneePressNightmares();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AICrouch();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
     }
     else if (decisionBox[decision] == "SuperOnBlock")
     {
         if (character.GetSuper >= 100f)
         {
             AIKneePressNightmares();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AIForward(3);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
     }
     else if (decisionBox[decision] == "SuperOnHit")
     {
         if (character.GetSuper >= 100f)
         {
             AIKneePressNightmares();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AIForward(10);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
     }
     else if (decisionBox[decision] == "Throw")
     {
         AIcontrols.AIThrow();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "AirStrong")
     {
         AIcontrols.AIJumpStrong();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "AirForward")
     {
         AIcontrols.AIJumpForwardAttack();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "AirFierce")
     {
         AIcontrols.AIJumpFierce();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "AirRoundhouse")
     {
         AIcontrols.AIJumpRoundhouse();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
 }
 void RegularCloseRangeDecisions()
 {
     DecisionMade(5, 3);
     if (decision <= 25)
     {
         AIcontrols.AICrouch();
         sharedProperties.CharacterNeutralState();
         character.SetBackPressed(true);
     }
     else if (decision <= 30 && !animator.GetBool("isAttacking"))
     {
         AIHurricaneKicks();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 36)
     {
         AIcontrols.AILowForward();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 41)
     {
         AIcontrols.AIStrong(10);
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 46)
     {
         AIcontrols.AIJab(2);
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 52)
     {
         if (character.GetSuper >= 100f)
         {
             AIShinryukens();
         }
         else
         {
             AIcontrols.AIShort(10);
         }
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 62 && !animator.GetBool("isAttacking"))
     {
         AIJabShoryuken();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 66)
     {
         AIcontrols.AIThrow();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 71)
     {
         if (playerController != null)
         {
             if (playerController.GetProjectileP1Parent().transform.childCount <= 0 && !animator.GetBool("isAttacking"))
             {
                 AIHadoukens();
                 sharedProperties.CharacterNeutralState();
                 AIcontrols.DoesAIBlock();
                 decisionTimer = 0f;
             }
             else
             {
                 AIcontrols.AIShort(10);
                 sharedProperties.CharacterNeutralState();
                 AIcontrols.DoesAIBlock();
                 decisionTimer = 0f;
             }
         }
         else if (opponentController != null)
         {
             if (opponentController.GetProjectileP2Parent().transform.childCount <= 0 && !animator.GetBool("isAttacking"))
             {
                 AIHadoukens();
                 sharedProperties.CharacterNeutralState();
                 AIcontrols.DoesAIBlock();
                 decisionTimer = 0f;
             }
             else
             {
                 AIcontrols.AIShort(10);
                 sharedProperties.CharacterNeutralState();
                 AIcontrols.DoesAIBlock();
                 decisionTimer = 0f;
             }
         }
     }
     else if (decision <= 81)
     {
         AIcontrols.AIPressedForward();
         character.SetBackPressed(false);
     }
     else if (decision <= 88)
     {
         AIcontrols.AIPressedForward();
         AIcontrols.AIJump();
         character.SetBackPressed(false);
         decisionTimer = 0f;
     }
     else if (decision <= 90)
     {
         sharedProperties.CharacterNeutralState();
         AIcontrols.AIJump();
         AIcontrols.DoesAIBlock();
     }
     else
     {
         AIcontrols.AIPressedBackward();
         character.SetBackPressed(true);
     }
 }
Пример #4
0
 void RegularMidRangeDecisions()
 {
     DecisionMade(5, 2);
     if (decision <= 30)
     {
         AIcontrols.AIStand();
         AIcontrols.AIPressedForward();
         AIcontrols.DoesAIBlock();
     }
     else if (decision <= 34 && decision > 30)
     {
         AIcontrols.AIFierce(2, 0);
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 37 && decision > 34)
     {
         AIcontrols.AIStrong(2);
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 39 && decision > 37)
     {
         AIcontrols.AIJab(2);
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 40 && decision > 39)
     {
         AIcontrols.AIShort(2);
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 50 && decision > 40)
     {
         AIcontrols.AIPressedForward();
         AIcontrols.AIJump();
         character.SetBackPressed(false);
     }
     else if (decision <= 55 && decision > 50)
     {
         sharedProperties.CharacterNeutralState();
         AIcontrols.AIJump();
         character.SetBackPressed(false);
     }
     else if (decision <= 65 && decision > 55 && !animator.GetBool("isAttacking"))
     {
         AIRekkaKens();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 75 && decision > 65 && !animator.GetBool("isAttacking"))
     {
         AIRekkaKuns();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 80 && decision > 75)
     {
         AIcontrols.AIStand();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
     }
     else
     {
         AIcontrols.AICrouch();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
     }
 }
Пример #5
0
 void RegularFarRangeDecisions()
 {
     DecisionMade(5, 1);
     if (decision <= 10)
     {
         AIcontrols.AIPressedForward();
         character.SetBackPressed(false);
     }
     else if (decision <= 15 && decision > 10)
     {
         AIcontrols.AIPressedBackward();
         character.SetBackPressed(true);
     }
     else if (decision <= 25 && decision > 15)
     {
         AITigerKnees();
         sharedProperties.CharacterNeutralState();
         AIcontrols.DoesAIBlock();
         decisionTimer = 0f;
     }
     else if (decision <= 45 && decision > 25)
     {
         if (playerController != null)
         {
             if (playerController.GetProjectileP1Parent().transform.childCount <= 0)
             {
                 AITigerShots("Upper", 6);
                 AIcontrols.DoesAIBlock();
                 sharedProperties.CharacterNeutralState();
                 decisionTimer = 0f;
             }
             else
             {
                 AIcontrols.AIJab(2);
                 sharedProperties.CharacterNeutralState();
                 AIcontrols.DoesAIBlock();
             }
         }
         else if (opponentController != null)
         {
             if (opponentController.GetProjectileP2Parent().transform.childCount <= 0)
             {
                 AITigerShots("Upper", 6);
                 AIcontrols.DoesAIBlock();
                 sharedProperties.CharacterNeutralState();
                 decisionTimer = 0f;
             }
             else
             {
                 AIcontrols.AIJab(2);
                 sharedProperties.CharacterNeutralState();
                 AIcontrols.DoesAIBlock();
             }
         }
     }
     else
     {
         if (playerController != null)
         {
             if (playerController.GetProjectileP1Parent().transform.childCount <= 0)
             {
                 AITigerShots("Lower", 10);
                 AIcontrols.DoesAIBlock();
                 sharedProperties.CharacterNeutralState();
                 decisionTimer = 0f;
             }
             else
             {
                 AIcontrols.AICrouch();
                 AIcontrols.AIPressedBackward();
                 character.SetBackPressed(true);
             }
         }
         else if (opponentController != null)
         {
             if (opponentController.GetProjectileP2Parent().transform.childCount <= 0)
             {
                 AITigerShots("Lower", 10);
                 AIcontrols.DoesAIBlock();
                 sharedProperties.CharacterNeutralState();
                 decisionTimer = 0f;
             }
             else
             {
                 AIcontrols.AICrouch();
                 AIcontrols.AIPressedBackward();
                 character.SetBackPressed(true);
             }
         }
     }
 }
Пример #6
0
 void RegularCloseRangeDecisions()
 {
     DecisionMade(5, 3);
     if (decision <= 10)
     {
         AIcontrols.AIStand();
         AIcontrols.AIPressedForward();
         character.SetBackPressed(false);
     }
     else if (decision <= 13 && decision > 10)
     {
         AIcontrols.AIPressedForward();
         AIcontrols.AIJump();
         character.SetBackPressed(false);
     }
     else if (decision <= 50 && decision > 13)
     {
         AIcontrols.AICrouch();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decision <= 60 && decision > 50)
     {
         if (chargeSystem.GetBackCharged() && !animator.GetBool("isAttacking"))
         {
             AIKickRushesShortOrForward();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             int strongVsForward = Random.Range(0, 3);
             if (strongVsForward == 0)
             {
                 AIcontrols.AILowForward();
             }
             else
             {
                 AIcontrols.AIStrong(20);
             }
             AIcontrols.AICharges();
             character.SetBackPressed(true);
             decisionTimer = 0f;
         }
     }
     else if (decision <= 75 && decision > 60)
     {
         if (chargeSystem.GetBackCharged() && !animator.GetBool("isAttacking"))
         {
             AIDashLowJabOrStrong();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             int jabVsStrong = Random.Range(0, 5);
             if (jabVsStrong == 0)
             {
                 AIcontrols.AIStrong(20);
             }
             else
             {
                 AIcontrols.AIJab(10);
             }
             AIcontrols.AICharges();
             character.SetBackPressed(true);
             decisionTimer = 0f;
         }
     }
     else if (decision <= 80 && decision > 75)
     {
         if (character.GetSuper >= 100f)
         {
             AIGigatonPunches();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else if (chargeSystem.GetDownCharged() && !animator.GetBool("isAttacking"))
         {
             AIHeadButt();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AIShort(2);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
     }
     else if (decision <= 83 && decision > 80)
     {
         AIcontrols.AIJab(20);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decision <= 86 && decision > 83)
     {
         AIcontrols.AIStrong(20);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decision <= 89 && decision > 86)
     {
         AIcontrols.AISweep();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decision <= 95 && decision > 89)
     {
         AIcontrols.AIThrow();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else
     {
         AITurnPunches();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
 }