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(); }
public static void ElementOverrideInteractionUT1() { BattleMario mario = new BattleMario(new MarioStats(1, 5, 50, 0, 0, EquipmentGlobals.BootLevels.Normal, EquipmentGlobals.HammerLevels.Normal)); Goomba goomba = new Goomba(); IcePowerBadge icePower = new IcePowerBadge(); icePower.Equip(mario); IcePowerBadge icePower2 = new IcePowerBadge(); icePower2.Equip(mario); goomba.EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Fiery); goomba.EntityProperties.AddWeakness(Enumerations.Elements.Ice, new WeaknessHolder(WeaknessTypes.PlusDamage, 1)); Debug.Assert(goomba.EntityProperties.HasPhysAttributes(true, Enumerations.PhysicalAttributes.Fiery)); Debug.Assert(goomba.EntityProperties.HasWeakness(Enumerations.Elements.Ice)); ElementOverrideHolder overrideHolder = mario.EntityProperties.GetTotalElementOverride(goomba); Debug.Assert(overrideHolder.Element == Enumerations.Elements.Ice); Debug.Assert(overrideHolder.OverrideCount == 2); InteractionParamHolder param = new InteractionParamHolder(mario, goomba, 1, Enumerations.Elements.Ice, true, Enumerations.ContactTypes.TopDirect, null, Enumerations.DamageEffects.None, false, Enumerations.DefensiveMoveOverrides.None); InteractionResult interaction = Interactions.GetDamageInteraction(param); Debug.Assert(interaction.VictimResult.TotalDamage == 4); PrintInteractionResult(interaction); icePower.UnEquip(); icePower2.UnEquip(); ElementOverrideHolder overrideHolder2 = mario.EntityProperties.GetTotalElementOverride(goomba); Debug.Assert(overrideHolder2.Element == Enumerations.Elements.Invalid); }