예제 #1
0
 //modifies the players stats
 public void ModifyStats(Item item, float multiplier)
 {
     for (int i = 0; i < item.getStats().Length; i++)
     {
         playerStats.BuffPlayer(item.getStat(i).stat, item.getStat(i).modifier *multiplier);
     }
 }
예제 #2
0
 //what happens when the player makes a sacrifice
 public void Sacrifice()
 {
     if (playerStats.getStat(currentChoice.sacrifice) >= currentChoice.sacrificeAmount)
     {
         playerStats.BuffPlayer(currentChoice.sacrifice, currentChoice.sacrificeAmount * -1);
         playerStats.BuffPlayer(currentChoice.reward, currentChoice.rewardAmount);
         shrineController.UseShrine();
         LeaveShrine();
     }
     else
     {
         offer.text = "You don't have enough " + currentChoice.sacrifice + ", come back later...";
     }
 }