Ejemplo n.º 1
0
            public static void NewInteractionUT9()
            {
                BattleMario mario  = new BattleMario(new MarioStats(1, 5, 50, 0, 0, EquipmentGlobals.BootLevels.Normal, EquipmentGlobals.HammerLevels.Normal));
                Goomba      goomba = new Goomba();

                //Update HealthState for Last Stand to kick in on Danger
                mario.TakeDamage(Enumerations.Elements.Normal, 0, false);

                Badge badge = new LastStandBadge();

                badge?.Equip(mario);

                InteractionParamHolder param = new InteractionParamHolder(goomba, mario, 80, Enumerations.Elements.Water, false,
                                                                          Enumerations.ContactTypes.TopDirect, null, Enumerations.DamageEffects.None, false, Enumerations.DefensiveMoveOverrides.None);

                InteractionResult oldInteraction = Interactions.GetDamageInteractionOld(param);
                InteractionResult newInteraction = Interactions.GetDamageInteraction(param);

                Debug.Log("Old: ");
                PrintInteractionResult(oldInteraction);
                Debug.Log("New: ");
                PrintInteractionResult(newInteraction);

                badge?.UnEquip();
            }
Ejemplo n.º 2
0
            public static void NewInteractionUT8()
            {
                BattleMario mario  = new BattleMario(new MarioStats(1, 5, 50, 0, 0, EquipmentGlobals.BootLevels.Normal, EquipmentGlobals.HammerLevels.Normal));
                Goomba      goomba = new Goomba();

                mario.EntityProperties.AddWeakness(Enumerations.Elements.Normal, new WeaknessHolder(WeaknessTypes.KO, 4));
                goomba.EntityProperties.AfflictStatus(new PaybackStatus(5), true);

                Badge badge = new DoublePainBadge();

                goomba.SetHeldCollectible(badge);
                goomba.OnBattleStart();

                InteractionParamHolder param = new InteractionParamHolder(mario, goomba, 4, Enumerations.Elements.Water, false,
                                                                          Enumerations.ContactTypes.TopDirect, null, Enumerations.DamageEffects.None, false, Enumerations.DefensiveMoveOverrides.None);

                InteractionResult oldInteraction = Interactions.GetDamageInteractionOld(param);
                InteractionResult newInteraction = Interactions.GetDamageInteraction(param);

                Debug.Log("Old: ");
                PrintInteractionResult(oldInteraction);
                Debug.Log("New: ");
                PrintInteractionResult(newInteraction);

                badge?.UnEquip();
                goomba.SetHeldCollectible(null);
            }
Ejemplo n.º 3
0
            public static void NewInteractionUT7()
            {
                BattleMario mario  = new BattleMario(new MarioStats(1, 50, 50, 0, 0, EquipmentGlobals.BootLevels.Normal, EquipmentGlobals.HammerLevels.Normal));
                Goomba      goomba = new Goomba();

                goomba.EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Fiery);
                goomba.EntityProperties.AddWeakness(Enumerations.Elements.Ice, new WeaknessHolder(WeaknessTypes.PlusDamage, 2));

                Badge badge = new IcePowerBadge();

                badge?.Equip(mario);

                InteractionParamHolder param = new InteractionParamHolder(mario, goomba, 3, Enumerations.Elements.Normal, false,
                                                                          Enumerations.ContactTypes.TopDirect, null, Enumerations.DamageEffects.None, false, Enumerations.DefensiveMoveOverrides.None);

                InteractionResult oldInteraction = Interactions.GetDamageInteractionOld(param);
                InteractionResult newInteraction = Interactions.GetDamageInteraction(param);

                Debug.Log("Old: ");
                PrintInteractionResult(oldInteraction);
                Debug.Log("New: ");
                PrintInteractionResult(newInteraction);

                badge?.UnEquip();
            }
Ejemplo n.º 4
0
            public static void NewInteractionUT2()
            {
                BattleMario  mario        = new BattleMario(new MarioStats(1, 50, 50, 0, 0, EquipmentGlobals.BootLevels.Normal, EquipmentGlobals.HammerLevels.Normal));
                SpikedGoomba spikedGoomba = new SpikedGoomba();

                InteractionParamHolder param = new InteractionParamHolder(mario, spikedGoomba, 5, Enumerations.Elements.Normal, false,
                                                                          Enumerations.ContactTypes.TopDirect, null, Enumerations.DamageEffects.None, false, Enumerations.DefensiveMoveOverrides.None);

                InteractionResult oldInteraction = Interactions.GetDamageInteractionOld(param);
                InteractionResult newInteraction = Interactions.GetDamageInteraction(param);

                Debug.Log("Old: ");
                PrintInteractionResult(oldInteraction);
                Debug.Log("New: ");
                PrintInteractionResult(newInteraction);
            }
Ejemplo n.º 5
0
            public static void NewInteractionUT5()
            {
                BattleMario mario  = new BattleMario(new MarioStats(1, 50, 50, 0, 0, EquipmentGlobals.BootLevels.Normal, EquipmentGlobals.HammerLevels.Normal));
                Goomba      goomba = new Goomba();

                goomba.EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Electrified);
                goomba.EntityProperties.AddPayback(new StatusGlobals.PaybackHolder(StatusGlobals.PaybackTypes.Half, Enumerations.Elements.Poison, new StatusChanceHolder(100d, new PoisonStatus(5))));

                InteractionParamHolder param = new InteractionParamHolder(mario, goomba, 10, Enumerations.Elements.Normal, false,
                                                                          Enumerations.ContactTypes.TopDirect, null, Enumerations.DamageEffects.None, false, Enumerations.DefensiveMoveOverrides.None);

                InteractionResult oldInteraction = Interactions.GetDamageInteractionOld(param);
                InteractionResult newInteraction = Interactions.GetDamageInteraction(param);

                Debug.Log("Old: ");
                PrintInteractionResult(oldInteraction);
                Debug.Log("New: ");
                PrintInteractionResult(newInteraction);
            }
Ejemplo n.º 6
0
            public static void NewInteractionUT6()
            {
                BattleMario mario  = new BattleMario(new MarioStats(1, 50, 50, 0, 0, EquipmentGlobals.BootLevels.Normal, EquipmentGlobals.HammerLevels.Normal));
                Goomba      goomba = new Goomba();

                mario.EntityProperties.AddPayback(new StatusGlobals.PaybackHolder(StatusGlobals.PaybackTypes.Full, Enumerations.Elements.Star));
                goomba.EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Electrified);
                goomba.EntityProperties.AddPayback(new StatusGlobals.PaybackHolder(StatusGlobals.PaybackTypes.Half, Enumerations.Elements.Poison, new StatusChanceHolder(100d, new PoisonStatus(5))));

                Badge dd1 = new DamageDodgeBadge();

                dd1?.Equip(mario);
                Badge dd2 = new DamageDodgeBadge();

                dd2?.Equip(mario);

                //For defensive actions; add flags in their code to make them always succeed
                //We'll need to implement the debug badge that automatically completes action commands as well as
                //make it easier to start input for action commands for debugging
                mario.OnTurnEnd();
                mario.Update();

                InteractionParamHolder param = new InteractionParamHolder(goomba, mario, 10, Enumerations.Elements.Normal, false,
                                                                          Enumerations.ContactTypes.TopDirect, null, Enumerations.DamageEffects.None, false, Enumerations.DefensiveMoveOverrides.None);

                InteractionResult oldInteraction = Interactions.GetDamageInteractionOld(param);
                InteractionResult newInteraction = Interactions.GetDamageInteraction(param);

                Debug.Log("Old: ");
                PrintInteractionResult(oldInteraction);
                Debug.Log("New: ");
                PrintInteractionResult(newInteraction);

                if (BattleManager.Instance.EntityTurn.PreviousAction?.MoveSequence.InSequence == false)
                {
                    BattleManager.Instance.EntityTurn.OnTurnStart();
                }

                dd1?.UnEquip();
                dd2?.UnEquip();
            }
Ejemplo n.º 7
0
            public static void NewInteractionUT10()
            {
                BattleMario mario  = new BattleMario(new MarioStats(1, 5, 50, 0, 0, EquipmentGlobals.BootLevels.Normal, EquipmentGlobals.HammerLevels.Normal));
                Goomba      goomba = new Goomba();

                mario.EntityProperties.AddResistance(Enumerations.Elements.Electric, new ResistanceHolder(ResistanceTypes.Heal, 0));

                goomba.EntityProperties.AddPayback(new StatusGlobals.PaybackHolder(StatusGlobals.PaybackTypes.Half, Enumerations.Elements.Electric));
                goomba.EntityProperties.AfflictStatus(new ElectrifiedStatus(5), true);

                InteractionParamHolder param = new InteractionParamHolder(mario, goomba, 90, Enumerations.Elements.Normal, false,
                                                                          Enumerations.ContactTypes.TopDirect, null, Enumerations.DamageEffects.None, false, Enumerations.DefensiveMoveOverrides.None);

                InteractionResult oldInteraction = Interactions.GetDamageInteractionOld(param);
                InteractionResult newInteraction = Interactions.GetDamageInteraction(param);

                Debug.Log("Old: ");
                PrintInteractionResult(oldInteraction);
                Debug.Log("New: ");
                PrintInteractionResult(newInteraction);
            }