Example #1
0
 public bool AttemptQuest(HeroManager hero, out int reward, out string message)
 {
     if (completed)
     {
         message = "Quest already completed!";
         reward  = 0;
         return(true);
     }
     if (hero.GetOffense() < attackNeeded || hero.GetDefense() < defenseNeeded)
     {
         if (hero.GetOffense() < attackNeeded)
         {
             message = failMsgSword;
         }
         else
         {
             message = failMsgArmor;
         }
         hero.DecreaseHealth(-1);
         reward = questReward / 2;
         return(false);
     }
     message = successMsg;
     reward  = questReward;
     return(true);
 }