Ejemplo n.º 1
0
        private Entity Magician()
        {
            var weakness = new EffectWeakness();

            weakness.AddOrUpdateWeaknesses(AttackEffect.Tearing, 0.1f);
            weakness.AddOrUpdateWeaknesses(AttackEffect.Piercing, 0.1f);
            var hitbox = new Hitbox(15, weakness);
            var sm     = (EntityStateMachine)Binder.Inject(new HealingStateMachine());

            return(new Magician(hitbox, sm)
            {
                Name = "Magician",
                Weapon = new MagicWand(),
                MovementType = MovementType.Walk
            });
        }
Ejemplo n.º 2
0
        private Entity Knight(Weapon weapon, MovementType movement)
        {
            var weakness = new EffectWeakness();

            weakness.AddOrUpdateWeaknesses(AttackEffect.Tearing, 0.15f);
            weakness.AddOrUpdateWeaknesses(AttackEffect.Shock, 0.1f);
            var hitbox = new Hitbox(15, weakness);
            var sm     = (EntityStateMachine)Binder.Inject(new DefaultStateMachine());

            return(new Knight(hitbox, sm)
            {
                Name = $"Knight-{weapon.ToString().Split('.').Last()}-{movement}",
                Weapon = weapon,
                MovementType = movement
            });
        }
Ejemplo n.º 3
0
        private Entity Healer()
        {
            var weakness = new EffectWeakness();

            weakness.AddOrUpdateWeaknesses(AttackEffect.Tearing, 0.3f);
            weakness.AddOrUpdateWeaknesses(AttackEffect.Piercing, 0.3f);
            var hitbox = new Hitbox(15, weakness);
            var sm     = (EntityStateMachine)Binder.Inject(new HealingStateMachine());

            return(new Healer(hitbox, sm)
            {
                Name = "Healer",
                MovementType = MovementType.Walk,
                Healing = 5
            });
        }
Ejemplo n.º 4
0
        private Entity Orc(Weapon weapon)
        {
            var weakness = new EffectWeakness();

            weakness.AddOrUpdateWeaknesses(AttackEffect.Fire, 0.15f);
            weakness.AddOrUpdateWeaknesses(AttackEffect.Shock, 0.1f);
            weakness.AddOrUpdateWeaknesses(AttackEffect.Freeze, 0.05f);
            var hitbox = new Hitbox(15, weakness);
            var sm     = (EntityStateMachine)Binder.Inject(new DefaultStateMachine());

            return(new Orc(hitbox, sm)
            {
                Name = $"Orc-{weapon.ToString().Split('.').Last()}",
                Weapon = weapon,
                MovementType = MovementType.Walk
            });
        }