From 55a41c2778d8b5d6b9595774ca605cce210a2f6d Mon Sep 17 00:00:00 2001 From: axpendix Date: Fri, 19 Jun 2020 01:23:15 +0200 Subject: [PATCH] Fix DP and SWSH Promos a little --- .../logic/impl/gen4/DiamondPearl.groovy | 39 +++++++++++-------- .../logic/impl/gen8/SwordShieldPromos.groovy | 9 ++--- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/tcgwars/logic/impl/gen4/DiamondPearl.groovy b/src/tcgwars/logic/impl/gen4/DiamondPearl.groovy index 562c514f5c..97d3a8f8cd 100644 --- a/src/tcgwars/logic/impl/gen4/DiamondPearl.groovy +++ b/src/tcgwars/logic/impl/gen4/DiamondPearl.groovy @@ -1,5 +1,6 @@ -package tcgwars.logic.impl.gen4; +package tcgwars.logic.impl.gen4 +import tcgwars.logic.impl.gen1.BaseSet; import tcgwars.logic.impl.gen3.FireRedLeafGreen; import tcgwars.logic.impl.gen5.PlasmaStorm; import tcgwars.logic.impl.gen5.BlackWhite; @@ -651,6 +652,7 @@ public enum DiamondPearl implements LogicCardInfo { damage 30 flip { //TODO: preventAllDamageNextTurn() won't cut it here sadly. + preventAllDamageNextTurn() } } } @@ -1300,14 +1302,16 @@ public enum DiamondPearl implements LogicCardInfo { move "Countercharge", { text "Flip a coin. If heads, move all damage counters from Wobbuffet to the Defending Pokémon." energyCost P, C - attackRequirement {} + attackRequirement { + assert self.numberOfDamageCounters + } onAttack { flip { targeted (defending) { //TODO: Solve this not being blocked by stuff like Metal Goggles (blockers of "putting damage counters"). Problem also affects Xerneas-GX. defending.damage += self.damage - self.damage -= self.damage - bc "Moved $dc damage counters from $self to $defending." + self.damage = hp(0) + bc "Moved damage counters from $self to $defending." } } } @@ -2339,12 +2343,13 @@ public enum DiamondPearl implements LogicCardInfo { move "Pain Payback", { text "Move 1 damage counter from Gastly to 1 of your opponent’s Pokémon." energyCost P - attackRequirement {} + attackRequirement { + assert self.numberOfDamageCounters + } onAttack { //TODO. Won't work properly, see Wobbuffet. - if (self.damage) - self.damage -= 10 - opp.all.select().damage += 10 + self.damage -= hp(10) + opp.all.select().damage += hp(10) } } @@ -2869,14 +2874,16 @@ public enum DiamondPearl implements LogicCardInfo { } }; case PLUSPOWER_109: - return basicTrainer (this) { - text "Attach PlusPower to 1 of your Pokémon. Discard this card at the end of your turn.\nIf the Pokémon PlusPower is attached to attacks, the attack does 10 more damage to the Active Pokémon (before applying Weakness and Resistance)." - onPlay { - //TODO - } - playRequirement{ - } - }; + return copy(BaseSet.PLUSPOWER, this) + // TODO this has to be implemented here again because base set version has a multiplying bug +// return basicTrainer (this) { +// text "Attach PlusPower to 1 of your Pokémon. Discard this card at the end of your turn.\nIf the Pokémon PlusPower is attached to attacks, the attack does 10 more damage to the Active Pokémon (before applying Weakness and Resistance)." +// onPlay { +// //TODO +// } +// playRequirement{ +// } +// }; case POKE_BALL_110: return itemCard (this) { text "Flip a coin. If heads, search your deck for a Pokémon, show it to your opponent, and put it into your hand. Shuffle your deck afterward." diff --git a/src/tcgwars/logic/impl/gen8/SwordShieldPromos.groovy b/src/tcgwars/logic/impl/gen8/SwordShieldPromos.groovy index 6495e02abe..34c5cbd2be 100644 --- a/src/tcgwars/logic/impl/gen8/SwordShieldPromos.groovy +++ b/src/tcgwars/logic/impl/gen8/SwordShieldPromos.groovy @@ -24,7 +24,6 @@ import tcgwars.logic.card.pokemon.*; import tcgwars.logic.card.trainer.*; import tcgwars.logic.effect.*; import tcgwars.logic.effect.ability.*; -import tcgwars.logic.effect.ability.Ability.*; import tcgwars.logic.effect.advanced.*; import tcgwars.logic.effect.basic.*; import tcgwars.logic.effect.blocking.*; @@ -37,7 +36,7 @@ import tcgwars.logic.util.*; * @author thezipcompany@gmail.com */ public enum SwordShieldPromos implements LogicCardInfo { - + GROOKEY_SWSH01 ("Grookey", 1, Rarity.PROMO, [POKEMON, BASIC, _GRASS_]), SCORBUNNY_SWSH02 ("Scorbunny", 2, Rarity.PROMO, [POKEMON, BASIC, _FIRE_]), SOBBLE_SWSH03 ("Sobble", 3, Rarity.PROMO, [POKEMON, BASIC, _WATER_]), @@ -70,9 +69,9 @@ public enum SwordShieldPromos implements LogicCardInfo { COPPERAJAH_V_SWSH30 ("Copperajah V", 30, Rarity.PROMO, [POKEMON, BASIC, POKEMON_V, _METAL_]), MORPEKO_SWSH31 ("Morpeko", 31, Rarity.PROMO, [POKEMON, BASIC, _LIGHTNING_]), SNORLAX_SWSH32 ("Snorlax", 32, Rarity.PROMO, [POKEMON, BASIC, _COLORLESS_]); - + static Type C = COLORLESS, R = FIRE, F = FIGHTING, G = GRASS, W = WATER, P = PSYCHIC, L = LIGHTNING, M = METAL, D = DARKNESS, Y = FAIRY, N = DRAGON; - + protected CardTypeSet cardTypes; protected String name; protected Rarity rarity; @@ -204,7 +203,7 @@ public enum SwordShieldPromos implements LogicCardInfo { text "Your opponent's Active Pokémon is now Asleep." energyCost C onAttack { - apply SLEEP + apply ASLEEP } } };