Exemplo n.º 1
0
 public override int OnTakeDamage(int damages)
 {
     if (IsApplyingEffect())
     {
         EffectDuration = 0;
         CharacterBhv.Instantiator.NewEffect(InventoryItemType.Skill, CharacterBhv.transform.position, null, EffectId, Constants.GridMax - CharacterBhv.Y);
         CharacterBhv.LoseSkillEffect(Effect);
         return(0);
     }
     return(damages);
 }
Exemplo n.º 2
0
 public override int OnTakeDamage(int damages)
 {
     if (IsApplyingEffect())
     {
         if (Helper.IsPosValid(_currentTargetX, _currentTargetX) && !GridBhv.IsOpponentOnCell(_currentTargetX, _currentTargetY, true, true))
         {
             CharacterBhv.MoveToPosition(_currentTargetX, _currentTargetY, false);
             CharacterBhv.Instantiator.NewEffect(InventoryItemType.Skill, GridBhv.Cells[_currentTargetX, _currentTargetY].transform.position, null, EffectId, Constants.GridMax - _currentTargetY);
         }
         EffectDuration = 0;
         CharacterBhv.LoseSkillEffect(Effect);
         return(0);
     }
     return(damages);
 }
Exemplo n.º 3
0
 public virtual void OnStartTurn()
 {
     if ((CooldownType == CooldownType.Normal && IsUnderCooldown()) ||
         (CooldownType == CooldownType.OnceAFight && IsUnderCooldown()))
     {
         --Cooldown;
     }
     if (Effect != SkillEffect.None)
     {
         --EffectDuration;
         if (ShouldLoseSkillEffect())
         {
             CharacterBhv.LoseSkillEffect(Effect);
         }
     }
 }