123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- using System;
- using ExtensionMethods;
- using I2.Loc;
- public class PlayerSkillAbility : CharacterState
- {
- public void ShadeAtk()
- {
- if (R.Player.Enhancement.ShadeAttack == 0)
- {
- return;
- }
- if (this.stateMachine.currentState.IsInArray(this._shadeAtkSta))
- {
- if (this.pAttr.currentHP > this.pAttr.maxHP / 10)
- {
- this.pAttr.currentHP -= this.pAttr.maxHP / 10;
- this.weapon.HandleShadeAttack();
- }
- else
- {
- R.Ui.Toast.Show(ScriptLocalization.ui.energyMatrixNotEnough, 2f, true);
- }
- }
- }
- public void BladeStorm()
- {
- if (R.Player.Enhancement.BladeStorm == 0)
- {
- return;
- }
- if (!this.pAttr.isOnGround)
- {
- return;
- }
- if (this.stateMachine.currentState.IsInArray(this._bladeStormSta))
- {
- if (this.pAttr.currentHP > this.pAttr.maxHP / 10)
- {
- this.pAttr.currentHP -= this.pAttr.maxHP / 10;
- this.weapon.HandleBladeStorm();
- }
- else
- {
- R.Ui.Toast.Show(ScriptLocalization.ui.energyMatrixNotEnough, 2f, true);
- }
- }
- }
- private readonly string[] _shadeAtkSta = new string[]
- {
- "EndAtk",
- "GetUp",
- "Idle",
- "Ready",
- "Run",
- "RunSlow",
- "Atk1",
- "Atk2",
- "Atk3",
- "Atk4",
- "Atk5",
- "Atk6",
- "Atk7",
- "Atk8",
- "Atk11",
- "Atk12",
- "Atk13",
- "Atk14",
- "Atk23",
- "Atk15",
- "AtkHv1",
- "AtkHv2",
- "AtkHv3",
- "Atk16",
- "AtkHv1Push",
- "AtkRollReady",
- "AtkRollEnd",
- "AirAtk1",
- "AirAtk2",
- "AirAtk3",
- "AirAtk4",
- "AirAtk6",
- "AirAtkHv1",
- "AirAtkHv2",
- "AirAtkHv3",
- "AirAtkHv4",
- "AirAtkHv5",
- "AirAtkHv1Push",
- "AirAtkRollReady",
- "AirAtkRoll",
- "Fall1",
- "Fall2",
- "Flash2",
- "FlashDown2",
- "FlashUp2",
- "Jump",
- "Jump2",
- "RollJump"
- };
- private readonly string[] _bladeStormSta = new string[]
- {
- "EndAtk",
- "GetUp",
- "Idle",
- "Ready",
- "Run",
- "RunSlow",
- "Atk1",
- "Atk2",
- "Atk3",
- "Atk4",
- "Atk5",
- "Atk6",
- "Atk7",
- "Atk8",
- "Atk11",
- "Atk12",
- "Atk13",
- "Atk14",
- "Atk23",
- "Atk15",
- "AtkHv1",
- "AtkHv2",
- "AtkHv3",
- "Atk16",
- "AtkHv1Push",
- "AtkRollReady",
- "AtkRollEnd",
- "AirAtk1",
- "AirAtk2",
- "AirAtk3",
- "AirAtk4",
- "AirAtk6",
- "AirAtkHv1",
- "AirAtkHv2",
- "AirAtkHv3",
- "AirAtkHv4",
- "AirAtkHv5",
- "AirAtkHv1Push",
- "AirAtkRollReady",
- "AirAtkRoll",
- "Fall1",
- "Fall2",
- "Flash2",
- "FlashDown2",
- "FlashUp2",
- "Jump",
- "Jump2",
- "RollJump"
- };
- }
|