Beispiel #1
0
            // Trigger a random seed effect.
            public static void MysterySeed(Monster monster, Entity sender, EventArgs args)
            {
                // Random: burn, stun, damage, gale
                int        rand = GRandom.NextInt(4);
                SeedEntity seed = (SeedEntity)sender;

                if (rand == 0)
                {
                    seed.SeedType = SeedType.Ember;
                }
                else if (rand == 1)
                {
                    seed.SeedType = SeedType.Scent;
                }
                else if (rand == 2)
                {
                    seed.SeedType = SeedType.Pegasus;
                }
                else
                {
                    seed.SeedType = SeedType.Gale;
                }

                monster.TriggerInteraction(Monster.GetSeedInteractionType(seed.SeedType), sender, args);
            }
        public override void OnHitMonster(Monster monster)
        {
            InteractionType interactionType = InteractionType.Sword;
            if (Player.CurrentState == Player.SwingBigSwordState)
                interactionType = InteractionType.BiggoronSword;
            else if (Player.CurrentState == Player.SpinSwordState)
                interactionType = InteractionType.SwordSpin;

            // Trigger the monster's sword reaction.
            monster.TriggerInteraction(interactionType, unit, new WeaponInteractionEventArgs() {
                Weapon = itemSword
            });

            // Stab if holding sword.
            if (Player.CurrentState == Player.HoldSwordState)
                Player.HoldSwordState.Stab(false);
            else if (Player.CurrentState == Player.SwingSwordState)
                Player.SwingSwordState.AllowSwordHold = false;
        }
Beispiel #3
0
 public override void OnCollideMonster(Monster monster)
 {
     monster.TriggerInteraction(InteractionType.SwordBeam, this);
 }
 public override void OnCollideMonster(Monster monster)
 {
     monster.TriggerInteraction(InteractionType.RodFire, this);
 }
 public override void OnCollideMonster(Monster monster)
 {
     monster.TriggerInteraction(InteractionType.Boomerang, this);
 }
 public override void OnCollideMonster(Monster monster)
 {
     if (!isReturning && !isHooked && !isLifting)
         monster.TriggerInteraction(InteractionType.SwitchHook, this);
 }
            // Trigger a random seed effect.
            public static void MysterySeed(Monster monster, Entity sender, EventArgs args)
            {
                // Random: burn, stun, damage, gale
                int rand = GRandom.NextInt(4);
                SeedEntity seed = (SeedEntity) sender;

                if (rand == 0)
                    seed.SeedType = SeedType.Ember;
                else if (rand == 1)
                    seed.SeedType = SeedType.Scent;
                else if (rand == 2)
                    seed.SeedType = SeedType.Pegasus;
                else
                    seed.SeedType = SeedType.Gale;

                monster.TriggerInteraction(Monster.GetSeedInteractionType(seed.SeedType), sender, args);
            }
 public override void OnHitMonster(Monster monster)
 {
     monster.TriggerInteraction(InteractionType.Shield, unit, new WeaponInteractionEventArgs() {
         Weapon = itemShield
     });
 }
        public void TriggerMonsterReaction(Monster monster)
        {
            // Destroy the seed and create the effect.
            Entity effect = DestroyWithEffect();

            // Trigger the immediate seed effect actions.
            if (type == SeedType.Scent)
                monster.TriggerInteraction(InteractionType.ScentSeed, effect);
            else if (type == SeedType.Pegasus)
                monster.TriggerInteraction(InteractionType.PegasusSeed, effect);
            else if (type == SeedType.Mystery)
                monster.TriggerInteraction(InteractionType.MysterySeed, effect);
        }