public override void Use(GameCharacter character)
 {
     //We can adjust the values to achieve a better balance. AH
     character.GetAttributes()._health += 50.0;
     //Test text
     AddMessage("The potion healed 50 health!");
 }
Beispiel #2
0
 internal void HandleCharacterDeath(GameCharacter deadPlayer)
 {
     try
     {
         _Characters.Remove(deadPlayer);
     }
     catch
     {
     }
 }
 public GameEngine()
 {
     _Maps      = new List <Map>();
     _messaging = new Messaging();
     GameCharacter.SetMessaging(_messaging);
     Party.SetMessaging(_messaging);
     GameItem.SetMessaging(_messaging);
     // create the maps
     for (int i = 0; i < noLevels; ++i)
     {
         _Maps.Add(new Map(CSCD349Project.Properties.Resources.level0));
     }
 }
Beispiel #4
0
 public override void Use(GameCharacter character)
 {
     character.GetAttributes()._energy += 20;
     AddMessage("The potion restored 20 energy points!");
 }
Beispiel #5
0
 public bool removePlayer(GameCharacter character)
 {
     return(_Characters.Remove(character));
 }
Beispiel #6
0
 public int AddPlayer(GameCharacter newCharacter)
 {
     _characters.Add(newCharacter);
     return(_characters.Count);
 }
Beispiel #7
0
 public int AddCharacter(GameCharacter character)
 {
     _Characters.Add(character);
     return(_Characters.Count);
 }