Beispiel #1
0
 public virtual void Activate(int x, int y)
 {
     Debug.Log("Activate:" + Name);
     CharacterBhv.Instantiator.PopIcon(Helper.GetSpriteFromSpriteSheet("Sprites/IconsSkill_" + IconId), CharacterBhv.transform.position);
     CharacterBhv.StartCoroutine(Helper.ExecuteAfterDelay(PlayerPrefsHelper.GetSpeed(), () =>
     {
         CharacterBhv.LosePa(PaNeeded);
         return(true);
     }));
     _isDebuffed = false;
     if (CooldownType == CooldownType.Normal)
     {
         Cooldown       = CooldownMax + 1;
         EffectDuration = EffectDurationMax;
         if (Effect != SkillEffect.None)
         {
             CharacterBhv.GainSkillEffect(Effect);
         }
     }
     else if (CooldownType == CooldownType.OnceAFight)
     {
         Cooldown       = -1;
         EffectDuration = EffectDurationMax;
         if (Effect != SkillEffect.None)
         {
             CharacterBhv.GainSkillEffect(Effect);
         }
     }
     CharacterBhv.SkinContainer.OrientToTarget(CharacterBhv.X - x);
     GameObject.Find(Constants.GoSceneBhvName).GetComponent <FightSceneBhv>().ManagePlayerButtons();
 }
Beispiel #2
0
 public override void Activate(int x, int y)
 {
     base.Activate(x, y);
     CharacterBhv.StartCoroutine(Helper.ExecuteAfterDelay(PlayerPrefsHelper.GetSpeed(), () =>
     {
         AfterActivation();
         return(true);
     }));
 }
Beispiel #3
0
 public override void Activate(int x, int y)
 {
     base.Activate(x, y);
     CharacterBhv.StartCoroutine(Helper.ExecuteAfterDelay(PlayerPrefsHelper.GetSpeed(), () =>
     {
         CharacterBhv.Instantiator.NewEffect(InventoryItemType.Skill, GridBhv.Cells[x, y].transform.position, null, EffectId, Constants.GridMax - y);
         CharacterBhv.MoveToPosition(x, y, false);
         return(true);
     }));
 }
Beispiel #4
0
 public override void Activate(int x, int y)
 {
     base.Activate(x, y);
     CharacterBhv.StartCoroutine(Helper.ExecuteAfterDelay(PlayerPrefsHelper.GetSpeed(), () =>
     {
         CharacterBhv.Instantiator.NewEffect(InventoryItemType.Skill, CharacterBhv.transform.position, null, EffectId, Constants.GridMax - CharacterBhv.Y);
         _floatHealAmount = 50.0f * Helper.MultiplierFromPercent(1, 10 * (CharacterBhv.Character.Level - 1));
         CharacterBhv.GainHp((int)_floatHealAmount);
         AfterActivation();
         return(true);
     }));
 }
 public override void OnStartTurn()
 {
     CharacterBhv.Instantiator.PopIcon(Helper.GetSpriteFromSpriteSheet("Sprites/IconsSkill_" + IconId), CharacterBhv.transform.position);
     CharacterBhv.StartCoroutine(Helper.ExecuteAfterDelay(PlayerPrefsHelper.GetSpeed(), () =>
     {
         CharacterBhv.Instantiator.NewEffect(InventoryItemType.Skill, CharacterBhv.transform.position, null, EffectId, Constants.GridMax - CharacterBhv.Y);
         float hpToRestore = (CharacterBhv.Character.HpMax * 0.05f);
         //hpToRestore *= Helper.MultiplierFromPercent(1.0f, Random.Range(0, 51));
         CharacterBhv.GainHp((int)hpToRestore);
         return(true);
     }));
 }
Beispiel #6
0
 public override void Activate(int x, int y)
 {
     base.Activate(x, y);
     _currentTargetX = x;
     _currentTargetY = y;
     //CharacterBhv.GainSkillEffect(SkillEffect.Immuned);
     CharacterBhv.StartCoroutine(Helper.ExecuteAfterDelay(PlayerPrefsHelper.GetSpeed(), () =>
     {
         CharacterBhv.LosePm(CharacterBhv.Character.PmMax);
         AfterActivation();
         return(true);
     }));
 }
Beispiel #7
0
 public override void Activate(int x, int y)
 {
     base.Activate(x, y);
     CharacterBhv.StartCoroutine(Helper.ExecuteAfterDelay(PlayerPrefsHelper.GetSpeed(), () =>
     {
         var result = Grap(GridBhv.IsOpponentOnCell(x, y));
         if (result == false)
         {
             AfterGrap();
         }
         return(true);
     }));
 }