public CommandQuit(GameWorld world, ICommandSender sender) : base(world, sender) { Name = "quit"; Aliases.Add("exit"); RequiredPermission = CommandPermission.Admin; }
public Command(GameWorld world, ICommandSender sender) { Aliases = new List<string>(); RequiredPermission = CommandPermission.User; World = world; Sender = sender; }
public RemotePlayer(GameWorld world, UdpClient client, IPEndPoint endPoint) : base(world) { Client = client; EndPoint = endPoint; MessageBuffer = new StringBuilder(); }
public EntityNPC(GameWorld world, int hp) : base(world, hp) { Behaviors = new List<Behavior>(); AttackedEntity += Entity_AttackedEntity; Death += Entity_Death; }
public CommandDie(GameWorld world, ICommandSender sender) : base(world, sender) { Name = "die"; Aliases.Add("suicide"); Description = "Kill yourself."; Usage = "die"; Hidden = true; }
public Entity(GameWorld world) { World = world; Article = Article.Indefinite; BaseAttributes = CombatAttributes.Default; Equipment = new Equipment(); Inventory = new List<Item>(); TimeSinceAttack = TimeSpan.FromSeconds(30); Hp = BaseAttributes.MaxHp; Observers = new List<IObserver>(); }
public EntityRat(GameWorld world) : base(world, 4) { Name = "rat"; BaseAttributes.Strength = 1; BaseAttributes.Defense = 0; BaseAttributes.Dodge = 5; BaseAttributes.Speed = .4; Experience = 20; Behaviors.Add(new BehaviorRetaliate(this)); }
public static GameWorld Generate(Random random) { IGameMap map = GridMap.Generate(random); map.EntryNode.Add(new Item("compass")); GameWorld world = new GameWorld(map); world.Random = new Random(random.Next()); world.GenerateItems(random); world.GenerateEntities(random); return world; }
public EntityCat(GameWorld world) : base(world, 6) { Name = "cat"; BaseAttributes.CritChance = .2; BaseAttributes.Strength = 1; BaseAttributes.Speed = .8; BaseAttributes.Accuracy = 15; Experience = 30; Behaviors.Add(new BehaviorRetaliate(this)); Behaviors.Add(new BehaviorHostileByName(this, "rat")); Behaviors.Add(new BehaviorWander(this, 3)); Behaviors.Add(new BehaviorRant(this, Meows)); }
public EntityBat(GameWorld world) : base(world, 4) { Name = "bat"; BaseAttributes.Strength = .6; BaseAttributes.Defense = 0; BaseAttributes.Accuracy = 5; BaseAttributes.Dodge = 20; BaseAttributes.Speed = 1; Experience = 20; Behaviors.Add(new BehaviorHostileToPlayers(this)); Death += OnDeath; }
public EntityBatman(GameWorld world) : base(world, 20) { Name = "Batman"; Article = Article.None; Gender = Gender.Male; BaseAttributes.CritChance = .2; BaseAttributes.Strength = 12; BaseAttributes.Speed = 1; BaseAttributes.Accuracy = 30; BaseAttributes.Defense = 15; BaseAttributes.Dodge = 14; Experience = 550; Behaviors.Add(new BehaviorRetaliate(this)); Behaviors.Add(new BehaviorWander(this, 4)); }
public EntityBam(GameWorld world) : base(world, 16) { Name = "Bam"; Article = Article.None; Gender = Gender.Male; BaseAttributes.Strength = 3; BaseAttributes.Speed = 1.1; BaseAttributes.Dodge = 14; Behaviors.Add(new BehaviorRetaliate(this)); Behaviors.Add(new BehaviorWander(this, 1.4)); Behaviors.Add(new BehaviorRant(this, new List<string> { "Is this your card?", "Bam!", "This staff is dimensional!" })); var weapon = new ItemBattleStaff(); Inventory.Add(weapon); Equipment.Add(weapon); }
public Player(GameWorld world) : base(world, 10) { Article = Article.None; Name = "You"; Gender = Gender.Male; Permission = CommandPermission.User; Level = 1; Race = Race.GetRandom(World.Random); BaseAttributes = Race.BaseAttributes; DamageTaken += OnDamageTaken; Death += OnDeath; AttackedEntity += OnAttackedEntity; AttackMissed += OnAttackMissed; KilledEntity += OnKilledEntity; Equipment.ItemEquipped += OnItemEquipped; Equipment.ItemUnequipped += OnItemUnequipped; LevelUp += OnLevelUp; }
public Entity(GameWorld world, int hp) : this(world) { Hp = BaseAttributes.MaxHp = hp; }
public EntityNPC(GameWorld world) : this(world, (int)CombatAttributes.Default.MaxHp) { }