Exemplo n.º 1
0
 public void UseItem(Consumable item)
 {
     this.nextAction = CombatAction.UseItem;
     this.nextActionItem = item;
     this.Wait(1000 / (player.Speed + item.Speed));
 }
Exemplo n.º 2
0
 public void performItemEffect(Consumable item)
 {
     switch (item.ConsumableType)
     {
         case ConsumableType.HealthPotion:
             player.HP += item.Effectiveness;
             break;
         case ConsumableType.StrengthPotion:
             player.TemporaryDamageBonus = item.Effectiveness;
             break;
         case ConsumableType.SpeedPotion:
             break;
         default:
             break;
     }
     item.Count -= 1;
     if (item.Count <= 0)
     {
         player.Inventory.Remove(item);
     }
 }