Skip to content

Commit

Permalink
Fix DP and SWSH Promos a little
Browse files Browse the repository at this point in the history
  • Loading branch information
axpendix committed Jun 18, 2020
1 parent 879c0ce commit 55a41c2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
39 changes: 23 additions & 16 deletions src/tcgwars/logic/impl/gen4/DiamondPearl.groovy
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -651,6 +652,7 @@ public enum DiamondPearl implements LogicCardInfo {
damage 30
flip {
//TODO: preventAllDamageNextTurn() won't cut it here sadly.
preventAllDamageNextTurn()
}
}
}
Expand Down Expand Up @@ -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."
}
}
}
Expand Down Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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."
Expand Down
9 changes: 4 additions & 5 deletions src/tcgwars/logic/impl/gen8/SwordShieldPromos.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand All @@ -37,7 +36,7 @@ import tcgwars.logic.util.*;
* @author [email protected]
*/
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_]),
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
}
}
};
Expand Down

0 comments on commit 55a41c2

Please sign in to comment.