예제 #1
0
 private void ApplyConsumableItemEffect(BaseStats target)
 {
     if (item.GetIsPercentage())
     {
         int value = Mathf.FloorToInt((target.GetStat(item.GetAttributeToModify()) * item.GetAdditiveModifiers()) / 100);
         target.ModifyStatPermanent(item.GetAttributeToModify(), value);
     }
     else
     {
         target.ModifyStatPermanent(item.GetAttributeToModify(), item.GetAdditiveModifiers());
     }
 }
예제 #2
0
 private void ApplyConsumableItemEffect(BaseStats target)
 {
     if (isPercentage)
     {
         int value = Mathf.FloorToInt((target.GetStat(attributteToModify) * modifier) / 100);
         target.ModifyStatPermanent(attributteToModify, value);
     }
     else
     {
         if (attributteToModify == StatsAtributte.Health || attributteToModify == StatsAtributte.SkillPoints)
         {
             target.HealStat(attributteToModify, modifier);
         }
         else
         {
             target.ModifyStatPermanent(attributteToModify, modifier);
         }
     }
 }
예제 #3
0
 private void ApplyBattleItemEffect(BaseStats target)
 {
     if (itemEffect == ItemEffect.HealStat)
     {
         target.ModifyStatPermanent(attributteToModify, modifier);
     }
     else if (itemEffect == ItemEffect.IncreaseStatTemporarily)
     {
         target.ModifyStatOnBattle(attributteToModify, modifier);
     }
     else if (itemEffect == ItemEffect.MoreDamageNextTurn)
     {
         //turn some variable on combat class to true
         //subscribe to some coroutine or action to turn that variable to false
     }
 }