예제 #1
0
 public void SendToBattle( RPGCharacter character )
 {
     if( character.IsBeserker )
     Console.WriteLine("{0} diggs down deep and starts hacking and slashing everyone everywhere. {1}", character.Name, character.Weapon );
      else
     Console.WriteLine("{0} uses a {1} to attack opponents.", character.Name, character.Weapon);
 }
예제 #2
0
 public void CheckHealth( RPGCharacter character )
 {
     if( character.IsDead )
     Console.WriteLine("{0} is dead and needs to be revived.", character.Name);
      else
     Console.WriteLine("{0} is ready willing and able.", character.Name);
 }
예제 #3
0
        public RPGCharacter GetNewPartyMember( string name )
        {
            int typeLength = Enum.GetNames(typeof (CharacterType)).Length;
             int weaponLength = Enum.GetNames(typeof (WeaponType)).Length;

             bool berserker = rand.Next( 2 ) == 1;
             bool leader = rand.Next( 2 ) == 1;
             int typeIndex = rand.Next( typeLength );
             int weaponIndex = rand.Next( weaponLength );

             RPGCharacter character = new RPGCharacter((CharacterType)typeIndex, name, leader, berserker );
             character.Weapon = (WeaponType)weaponIndex;

             return character;
        }
예제 #4
0
 public void AddMember( RPGCharacter character )
 {
     party.Add(character);
 }