Пример #1
0
        private void PlayCommonSounds()
        {
            switch (LibraryWeaponShape)
            {
            case 100:
                DXSoundManager.Play(SoundIndex.WandSwing);
                break;

            case 9:
            case 101:
                DXSoundManager.Play(SoundIndex.WoodSwing);
                break;

            case 102:
                DXSoundManager.Play(SoundIndex.AxeSwing);
                break;

            case 103:
                DXSoundManager.Play(SoundIndex.DaggerSwing);
                break;

            case 104:
                DXSoundManager.Play(SoundIndex.ShortSwordSwing);
                break;

            case 26:
            case 105:
                DXSoundManager.Play(SoundIndex.IronSwordSwing);
                break;

            default:
                DXSoundManager.Play(SoundIndex.FistSwing);
                break;
            }
        }
Пример #2
0
        public override void FrameIndexChanged()
        {
            base.FrameIndexChanged();

            switch (CurrentAction)
            {
            case MirAction.Moving:
                switch (CurrentAnimation)
                {
                case MirAnimation.HorseWalking:
                    if (FrameIndex == 1)
                    {
                        DXSoundManager.Play(SoundIndex.HorseWalk1);
                    }
                    if (FrameIndex == 4)
                    {
                        DXSoundManager.Play(SoundIndex.HorseWalk2);
                    }
                    break;

                case MirAnimation.HorseRunning:
                    if (FrameIndex != 1)
                    {
                        return;
                    }
                    DXSoundManager.Play(SoundIndex.HorseRun);
                    break;

                default:
                    if (FrameIndex != 1 && FrameIndex != 4)
                    {
                        return;
                    }
                    DXSoundManager.Play((SoundIndex)((int)SoundIndex.Foot1 + CEnvir.Random.Next((int)SoundIndex.Foot4 - (int)SoundIndex.Foot1) + 1));
                    break;
                }
                break;

            case MirAction.Spell:
                switch (MagicType)
                {
                case MagicType.SeismicSlam:
                    if (FrameIndex == 4)
                    {
                        ShakeScreenCount = 10F;
                    }
                    break;
                }
                break;
            }
        }
Пример #3
0
 public override void OnRemoved()
 {
     switch (Effect)
     {
     case SpellEffect.SwordOfVengeance:
         new MirEffect(1100, 10, TimeSpan.FromMilliseconds(100), LibraryFile.MagicEx6, 10, 35, Globals.FireColour)
         {
             Blend     = true,
             MapTarget = CurrentLocation,
         };
         DXSoundManager.Play(SoundIndex.FireStormEnd);
         break;
     }
 }
Пример #4
0
 private void PlayAssassinSounds()
 {
     if (LibraryWeaponShape >= 1200)
     {
         DXSoundManager.Play(SoundIndex.ClawAttack);
     }
     else if (LibraryWeaponShape >= 1100)
     {
         DXSoundManager.Play(SoundIndex.GlaiveAttack);
     }
     else
     {
         PlayCommonSounds(); //?
     }
 }
Пример #5
0
        public override void SetAction(ObjectAction action)
        {
            base.SetAction(action);

            switch (CurrentAction)
            {
            case MirAction.Attack:
                switch (MagicType)
                {
                    #region Sweet Brier and Karma (Karma should have different attack will do later if can be bothered)
                case MagicType.SweetBrier:
                case MagicType.Karma:
                    if (LibraryWeaponShape >= 1200)
                    {
                        Effects.Add(new MirEffect(300, 6, TimeSpan.FromMilliseconds(100), LibraryFile.MagicEx4, 20, 70, Globals.NoneColour)         //Element style?
                        {
                            Blend      = true,
                            Target     = this,
                            DrawColour = Globals.NoneColour,
                            Direction  = Direction,
                        });
                    }
                    else if (LibraryWeaponShape >= 1100)
                    {
                        Effects.Add(new MirEffect(100, 6, TimeSpan.FromMilliseconds(100), LibraryFile.MagicEx4, 20, 70, Globals.NoneColour)         //Element style?
                        {
                            Blend      = true,
                            Target     = this,
                            DrawColour = Globals.NoneColour,
                            Direction  = Direction,
                        });
                    }

                    if (Gender == MirGender.Male)
                    {
                        DXSoundManager.Play(SoundIndex.SweetBrierMale);
                    }
                    else
                    {
                        DXSoundManager.Play(SoundIndex.SweetBrierFemale);
                    }
                    break;
                    #endregion
                }
                break;
            }
        }
Пример #6
0
 public override void PlayDieSound()
 {
     DXSoundManager.Play(Gender == MirGender.Male ? SoundIndex.MaleDie : SoundIndex.FemaleDie);
 }
Пример #7
0
 public override void PlayStruckSound()
 {
     DXSoundManager.Play(Gender == MirGender.Male ? SoundIndex.MaleStruck : SoundIndex.FemaleStruck);
     DXSoundManager.Play(SoundIndex.GenericStruckPlayer);
 }
Пример #8
0
        public void UpdateLibraries()
        {
            Frames = new Dictionary <MirAnimation, Frame>();
            switch (Effect)
            {
            case SpellEffect.SafeZone:
                CEnvir.LibraryList.TryGetValue(LibraryFile.Magic, out BodyLibrary);
                Frames[MirAnimation.Standing] = new Frame(649, 1, 0, TimeSpan.FromDays(365));
                Blended   = true;
                BlendRate = 0.3f;
                break;

            case SpellEffect.FireWall:
            case SpellEffect.MonsterFireWall:
                CEnvir.LibraryList.TryGetValue(LibraryFile.Magic, out BodyLibrary);
                Frames[MirAnimation.Standing] = new Frame(920, 3, 0, TimeSpan.FromMilliseconds(150));
                Blended     = true;
                LightColour = Color.LightSalmon;
                BlendRate   = 0.55f;
                Light       = 15;
                break;

            case SpellEffect.Tempest:
                CEnvir.LibraryList.TryGetValue(LibraryFile.MagicEx2, out BodyLibrary);
                Frames[MirAnimation.Standing] = new Frame(920, 10, 0, TimeSpan.FromMilliseconds(150));
                Blended     = true;
                LightColour = Globals.WindColour;
                BlendRate   = 0.55f;
                Light       = 15;
                break;

            case SpellEffect.TrapOctagon:
                CEnvir.LibraryList.TryGetValue(LibraryFile.Magic, out BodyLibrary);
                Frames[MirAnimation.Standing] = new Frame(640, 10, 0, TimeSpan.FromMilliseconds(100));
                Blended   = true;
                BlendRate = 0.8f;
                break;

            case SpellEffect.PoisonousCloud:
                CEnvir.LibraryList.TryGetValue(LibraryFile.MagicEx4, out BodyLibrary);
                Frames[MirAnimation.Standing] = new Frame(400, 15, 0, TimeSpan.FromMilliseconds(100));
                DefaultColour = Color.SaddleBrown;
                Blended       = true;
                Light         = 0;
                DXSoundManager.Play(SoundIndex.PoisonousCloudStart);
                break;

            case SpellEffect.DarkSoulPrison:
                CEnvir.LibraryList.TryGetValue(LibraryFile.MagicEx6, out BodyLibrary);
                Frames[MirAnimation.Standing] = new Frame(700, 10, 0, TimeSpan.FromMilliseconds(100));
                Blended = true;
                Light   = 0;
                DXSoundManager.Play(SoundIndex.DarkSoulPrison);
                break;

            case SpellEffect.SwordOfVengeance:
                CEnvir.LibraryList.TryGetValue(LibraryFile.MagicEx6, out BodyLibrary);
                Frames[MirAnimation.Standing] = new Frame(1000, 8, 0, TimeSpan.FromMilliseconds(100));
                Frames[MirAnimation.Die]      = new Frame(1100, 10, 0, TimeSpan.FromMilliseconds(100));
                Blended = true;
                Light   = 0;
                //DXSoundManager.Play(SoundIndex.DarkSoulPrison);
                break;

            case SpellEffect.MonsterDeathCloud:
                CEnvir.LibraryList.TryGetValue(LibraryFile.MonMagicEx2, out BodyLibrary);
                Frames[MirAnimation.Standing] = new Frame(850, 10, 0, TimeSpan.FromMilliseconds(100));
                Blended   = true;
                Light     = 0;
                BlendRate = 1F;
                DXSoundManager.Play(SoundIndex.JinchonDevilAttack3);
                break;

            case SpellEffect.Rubble:
                CEnvir.LibraryList.TryGetValue(LibraryFile.ProgUse, out BodyLibrary);
                int index;

                if (Power > 20)
                {
                    index = 234;
                }
                else if (Power > 15)
                {
                    index = 233;
                }
                else if (Power > 10)
                {
                    index = 232;
                }
                else if (Power > 5)
                {
                    index = 231;
                }
                else
                {
                    index = 230;
                }

                Frames[MirAnimation.Standing] = new Frame(index, 1, 0, TimeSpan.FromMilliseconds(100));

                Light = 0;
                break;
            }
        }