Bug Fix for Dauntless Escort

This commit is contained in:
jendave
2011-08-06 04:42:00 +00:00
parent 6aed54158b
commit 5bb12364a1
2 changed files with 48 additions and 28 deletions

View File

@@ -5929,14 +5929,28 @@ public class CardFactory_Creatures {
private static final long serialVersionUID = 2701248867610L; private static final long serialVersionUID = 2701248867610L;
public void execute() { public void execute() {
if(card.getController() == "Human") Phase.Sac_Dauntless_Escort = false; if(card.getController() == "Human") {
else Phase.Sac_Dauntless_Escort_Comp = false; Phase.Sac_Dauntless_Escort = false;
} else {
Phase.Sac_Dauntless_Escort_Comp = false;
}
PlayerZone PlayerPlayZone = AllZone.getZone(Constant.Zone.Play, card.getController());
CardList PlayerCreatureList = new CardList(PlayerPlayZone.getCards());
PlayerCreatureList = PlayerCreatureList.getType("Creature");
if(PlayerCreatureList.size() != 0) {
for(int i = 0; i < PlayerCreatureList.size(); i++) {
Card c = PlayerCreatureList.get(i);
c.removeExtrinsicKeyword("Indestructible");
}
}
} }
}; };
@Override @Override
public void resolve() { public void resolve() {
AllZone.GameAction.sacrifice(card); AllZone.GameAction.sacrifice(card);
if(card.getController() == "Human") Phase.Sac_Dauntless_Escort = true; if(card.getController() == "Human") {
Phase.Sac_Dauntless_Escort = true;
}
else Phase.Sac_Dauntless_Escort_Comp = true; else Phase.Sac_Dauntless_Escort_Comp = true;
AllZone.EndOfTurn.addUntil(untilEOT); AllZone.EndOfTurn.addUntil(untilEOT);

View File

@@ -12253,8 +12253,9 @@ public class GameActionUtil {
public static Command Dauntless_Escort = new Command() { public static Command Dauntless_Escort = new Command() {
private static final long serialVersionUID = -2201201455269804L; private static final long serialVersionUID = -2201201455269804L;
CardList old = new CardList();
public void execute() { public void execute() {
// Human Activates Dauntless Escort // Human Activates Dauntless Escort
PlayerZone PlayerPlayZone = AllZone.getZone(Constant.Zone.Play,"Human"); PlayerZone PlayerPlayZone = AllZone.getZone(Constant.Zone.Play,"Human");
CardList PlayerCreatureList = new CardList(PlayerPlayZone.getCards()); CardList PlayerCreatureList = new CardList(PlayerPlayZone.getCards());
@@ -12274,18 +12275,22 @@ public class GameActionUtil {
for(int i = 0; i < opponentCreatureList.size(); i++) { for(int i = 0; i < opponentCreatureList.size(); i++) {
Card c = opponentCreatureList.get(i); Card c = opponentCreatureList.get(i);
if(c.getOwner() == "Human") { if(c.getOwner() == "Human") {
c.removeExtrinsicKeyword("Indestructible"); if(old.size() == 0) {
c.removeExtrinsicKeyword("Indestructible");
old.add(c);
}
for(int x = 0; x < old.size(); x++) {
if(old.get(x) == c) break;
c.removeExtrinsicKeyword("Indestructible");
old.add(c);
}
}
} }
} }
} }
} else {
if(PlayerCreatureList.size() != 0) {
for(int i = 0; i < PlayerCreatureList.size(); i++) {
Card c = PlayerCreatureList.get(i);
c.removeExtrinsicKeyword("Indestructible");
}
}
}
// Computer Activates Dauntless Escort // Computer Activates Dauntless Escort
PlayerPlayZone = AllZone.getZone(Constant.Zone.Play,"Computer"); PlayerPlayZone = AllZone.getZone(Constant.Zone.Play,"Computer");
PlayerCreatureList = new CardList(PlayerPlayZone.getCards()); PlayerCreatureList = new CardList(PlayerPlayZone.getCards());
@@ -12302,21 +12307,22 @@ public class GameActionUtil {
} }
} }
if(opponentCreatureList.size() != 0) { if(opponentCreatureList.size() != 0) {
for(int i = 0; i < opponentCreatureList.size(); i++) { for(int i = 0; i < opponentCreatureList.size(); i++) {
Card c = opponentCreatureList.get(i); Card c = opponentCreatureList.get(i);
if(c.getOwner() == "Computer") { if(c.getOwner() == "Computer") {
c.removeExtrinsicKeyword("Indestructible"); if(old.size() == 0) {
} c.removeExtrinsicKeyword("Indestructible");
} old.add(c);
} }
} else { for(int x = 0; x < old.size(); x++) {
if(PlayerCreatureList.size() != 0) { if(old.get(x) == c) break;
for(int i = 0; i < PlayerCreatureList.size(); i++) { c.removeExtrinsicKeyword("Indestructible");
Card c = PlayerCreatureList.get(i); old.add(c);
c.removeExtrinsicKeyword("Indestructible"); }
} }
} }
} }
}
}// execute() }// execute()
}; };