Beispiel #1
0
 /// <summary>
 /// Occurs when the spike pit trap is triggered.
 /// </summary>
 /// <param name="sender">The sender</param>
 /// <param name="e">Trap event arguments.</param>
 void TrapSpikePit_TriggerEvent(object sender, Trap.TrapEventArgs e)
 {
     string strMessage = string.Format("You stepped into a {0} trap!", this);
     if (Dice.D(e.TrapTarget.Stats.Agility) || Dice.D(e.TrapTarget.Stats.Luck))
         strMessage += " You were agile enough to avoid it!";
     else
     {
         e.TrapTarget.Stats.Health -= 10;
     }
     UI.Graphics.Display.ShowMessage(strMessage);
     Disable();
 }
Beispiel #2
0
 /// <summary>
 /// Occurs when the falling rock trap is triggered.
 /// </summary>
 /// <param name="sender">The event sender</param>
 /// <param name="e">The event argument(s)</param>
 void TrapFallingRock_TriggerEvent(object sender, Trap.TrapEventArgs e)
 {
 }