- Added Loxodon Peacekeeper

This commit is contained in:
swordshine
2013-03-18 01:51:55 +00:00
parent c3172c6aba
commit 84cdfcc107
5 changed files with 35 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -6181,6 +6181,7 @@ res/cardsfolder/l/loxodon_hierarch_avatar.txt -text
res/cardsfolder/l/loxodon_mender.txt svneol=native#text/plain
res/cardsfolder/l/loxodon_mystic.txt svneol=native#text/plain
res/cardsfolder/l/loxodon_partisan.txt svneol=native#text/plain
res/cardsfolder/l/loxodon_peacekeeper.txt -text
res/cardsfolder/l/loxodon_punisher.txt svneol=native#text/plain
res/cardsfolder/l/loxodon_smiter.txt -text
res/cardsfolder/l/loxodon_stalwart.txt svneol=native#text/plain

View File

@@ -0,0 +1,12 @@
Name:Loxodon Peacekeeper
ManaCost:1 W
Types:Creature Elephant Soldier
PT:4/4
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGainControl | TriggerDescription$ At the beginning of your upkeep, the player with the lowest life total gains control of CARDNAME. If two or more players are tied for lowest life total, you choose one of them, and that player gains control of CARDNAME.
SVar:TrigGainControl:AB$ ChoosePlayer | Cost$ 0 | Defined$ You | Choices$ Player.withLowestLife | ChoiceTitle$ Choose an player with lowest life total | AILogic$ Pump | SubAbility$ DBGainControl
SVar:DBGainControl:DB$ GainControl | Defined$ Self | NewController$ Player.Chosen
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/loxodon_peacekeeper.jpg
Oracle:At the beginning of your upkeep, the player with the lowest life total gains control of Loxodon Peacekeeper. If two or more players are tied for lowest life total, you choose one of them, and that player gains control of Loxodon Peacekeeper.
SetInfo:MRD Rare

View File

@@ -11,4 +11,6 @@ S:Mode$ CantBeCast | ValidCard$ Card.IsRemembered | Description$ The named card
S:Mode$ CantPlayLand | ValidCard$ Land.IsRemembered
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Execute$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/null_chamber.jpg
SVar:Picture:http://www.wizards.com/global/images/magic/general/null_chamber.jpg
Oracle:As Null Chamber enters the battlefield, you and an opponent each name a card other than a basic land card.\nThe named cards can't be played.
SetInfo:MIR Rare

View File

@@ -63,6 +63,8 @@ public class ChoosePlayerEffect extends SpellAbilityEffect {
System.out.println("No good curse choices. Picking first available: " + choices.get(0));
card.setChosenPlayer(choices.get(0));
}
} else if ("Pump".equals(sa.getParam("AILogic"))) {
card.setChosenPlayer(choices.contains(p) ? p : choices.get(0));
} else {
card.setChosenPlayer(p);
}

View File

@@ -2521,6 +2521,23 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
return false;
}
}
} else if (property.startsWith("withLowest")) {
if (property.substring(10).equals("Life")) {
int lowestLife = 1000;
List<Player> lowestlifep = new ArrayList<Player>();
for (final Player p : Singletons.getModel().getGame().getPlayers()) {
if (p.getLife() == lowestLife) {
lowestlifep.add(p);
} else if (p.getLife() < lowestLife) {
lowestLife = p.getLife();
lowestlifep.clear();
lowestlifep.add(p);
}
}
if (!lowestlifep.contains(this)) {
return false;
}
}
}
return true;