fix AEther Flash when AI has it in play. It was damaging human, not the creature that entered play. It was using WheneverKeyword, and this specific section of code makes no sense to me. It's the only card using this branch of code, so I changed this to card-specific code.

This commit is contained in:
jendave
2011-08-06 11:17:11 +00:00
parent d42e9c7d20
commit b73a3f6b4e
2 changed files with 20 additions and 1 deletions

View File

@@ -2,7 +2,8 @@ Name:AEther Flash
ManaCost:2 R R ManaCost:2 R R
Types:Enchantment Types:Enchantment
Text:no text Text:no text
K:WheneverKeyword:EntersBattleField:Type/Creature:Play:Damage/2:Initiating_Card:ASAP:No_Condition:No Special Condition:Whenever a creature enters the battlefield, AEther Flash deals 2 damage to it. #WheneverKeyword was dealing damage to player
#K:WheneverKeyword:EntersBattleField:Type/Creature:Play:Damage/2:Initiating_Card:ASAP:No_Condition:No Special Condition:Whenever a creature enters the battlefield, AEther Flash deals 2 damage to it.
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/aether_flash.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/aether_flash.jpg

View File

@@ -99,6 +99,24 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone {
} }
} }
if(c.isCreature()) {
CardList flashes = AllZoneUtil.getCardsInPlay("AEther Flash");
final Card enteringCard = c;
for(final Card flash:flashes){
SpellAbility ability = new Ability(flash, "") {
@Override
public void resolve() {
enteringCard.addDamage(2, flash);
}
};
StringBuilder sb = new StringBuilder();
sb.append(flash).append(" - deals 2 damage to ").append(enteringCard.getName());
ability.setStackDescription(sb.toString());
AllZone.Stack.add(ability);
}
}
if(c.isCreature() && AllZoneUtil.isCardInPlay("Intruder Alarm")) { if(c.isCreature() && AllZoneUtil.isCardInPlay("Intruder Alarm")) {
CardList alarms = AllZoneUtil.getCardsInPlay("Intruder Alarm"); CardList alarms = AllZoneUtil.getCardsInPlay("Intruder Alarm");
for(Card alarm:alarms) { for(Card alarm:alarms) {