예제 #1
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);
     }));
 }
예제 #2
0
 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);
     }));
 }
예제 #3
0
    public override void OnEndAttack(int damages, CharacterBhv opponentBhv)
    {
        CharacterBhv.Instantiator.NewEffect(InventoryItemType.Skill, CharacterBhv.transform.position, null, EffectId, Constants.GridMax - CharacterBhv.Y);
        float damagesToSteal = damages * Helper.MultiplierFromPercent(0, _percentToSteal);

        CharacterBhv.GainHp((int)damagesToSteal);
        //CharacterBhv.GainHp((int)damagesToSteal);
        //CharacterBhv.GainHp((int)damagesToSteal);
        //CharacterBhv.GainHp((int)damagesToSteal);
        //CharacterBhv.GainHp((int)damagesToSteal);
        //CharacterBhv.GainHp((int)damagesToSteal);
        //CharacterBhv.GainHp((int)damagesToSteal);
    }