Inheritance: CombatEntity
Example #1
0
 public IEnumerator<object> Execute (Player p, string[] words) {
     foreach (PlayerCheckDelegate check in PlayerChecks) {
         if (check.Invoke(p) == false)
             return null;
     }
     return Handler.Invoke(p, words);
 }
Example #2
0
        static IEnumerator<object> HandleNewClients () {
            while (true) {
                IFuture f = Server.AcceptNewClient();
                using (f)
                    yield return f;

                TelnetClient client = f.Result as TelnetClient;
                Player player = new Player(client, World.PlayerStartLocation);
            }
        }
Example #3
0
 private static bool CheckPlayerIsAlive(Player p)
 {
     if (p.CurrentHealth <= 0) {
         p.SendMessage("You can't do that while dead.");
         p.SendPrompt();
         return false;
     }
     return true;
 }