- Fixed one effect of Lich to be a triggered ability.

- Added Treacherous Link.
This commit is contained in:
jendave
2011-08-06 14:51:31 +00:00
parent db8d67a902
commit 1d09bc5d56
7 changed files with 46 additions and 16 deletions

1
.gitattributes vendored
View File

@@ -5322,6 +5322,7 @@ res/cardsfolder/traproot_kami.txt -text svneol=native#text/plain
res/cardsfolder/trash_for_treasure.txt -text svneol=native#text/plain res/cardsfolder/trash_for_treasure.txt -text svneol=native#text/plain
res/cardsfolder/traumatic_visions.txt -text svneol=native#text/plain res/cardsfolder/traumatic_visions.txt -text svneol=native#text/plain
res/cardsfolder/traumatize.txt -text svneol=native#text/plain res/cardsfolder/traumatize.txt -text svneol=native#text/plain
res/cardsfolder/treacherous_link.txt -text svneol=native#text/plain
res/cardsfolder/treachery.txt -text svneol=native#text/plain res/cardsfolder/treachery.txt -text svneol=native#text/plain
res/cardsfolder/treasure_hunter.txt -text svneol=native#text/plain res/cardsfolder/treasure_hunter.txt -text svneol=native#text/plain
res/cardsfolder/treasure_trove.txt -text svneol=native#text/plain res/cardsfolder/treasure_trove.txt -text svneol=native#text/plain

View File

@@ -3,7 +3,7 @@ ManaCost:B
Types:Enchantment Aura Types:Enchantment Aura
Text:no text Text:no text
K:Enchant creature K:Enchant creature
K:enPump:+0/+0 K:enPumpCurse:+0/+0
A:AB$PutCounter | Cost$ 1 B | Defined$ Enchanted | CounterType$ M1M1 | CounterNum$ 1 | SpellDescription$ Put a -1/-1 counter on enchanted creature. A:AB$PutCounter | Cost$ 1 B | Defined$ Enchanted | CounterType$ M1M1 | CounterNum$ 1 | SpellDescription$ Put a -1/-1 counter on enchanted creature.
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Rarity:Common SVar:Rarity:Common

View File

@@ -0,0 +1,10 @@
Name:Treacherous Link
ManaCost:1 B
Types:Enchantment Aura
Text:All damage that would be dealt to enchanted creature is dealt to its controller instead.
K:Enchant creature
K:enPumpCurse:+0/+0
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/treacherous_link.jpg
End

View File

@@ -227,10 +227,7 @@ public class AIPlayer extends Player{
public void sacrificePermanent(String prompt, CardList choices) { public void sacrificePermanent(String prompt, CardList choices) {
if(choices.size() > 0) { if(choices.size() > 0) {
//TODO - this could probably use better AI //TODO - this could probably use better AI
CardListUtil.sortDefense(choices); Card c = CardFactoryUtil.AI_getWorstPermanent(choices,false,false,false,false);
choices.reverse();
CardListUtil.sortAttackLowFirst(choices);
Card c = choices.get(0);
AllZone.GameAction.sacrificeDestroy(c); AllZone.GameAction.sacrificeDestroy(c);
} }
} }

View File

@@ -3005,7 +3005,7 @@ public class Card extends MyObservable {
restDamage -= 1; restDamage -= 1;
} }
if( AllZoneUtil.isCardInPlay("Divine Presence") && restDamage > 3) { if( AllZoneUtil.isCardInPlay("Divine Presence") && isCreature() && restDamage > 3) {
restDamage = 3; restDamage = 3;
} }
@@ -3020,12 +3020,18 @@ public class Card extends MyObservable {
public int replaceDamage(final int damage, Card source, boolean isCombat) { public int replaceDamage(final int damage, Card source, boolean isCombat) {
int restDamage = damage; int restDamage = damage;
CardList auras = new CardList(getEnchantedBy().toArray());
if(getName().equals("Phytohydra")) { if(getName().equals("Phytohydra")) {
addCounter(Counters.P1P1, restDamage); addCounter(Counters.P1P1, restDamage);
return 0; return 0;
} }
if(auras.containsName("Treacherous Link")) {
getController().addDamage(restDamage, source);
return 0;
}
restDamage = staticReplaceDamage(restDamage, source, isCombat); restDamage = staticReplaceDamage(restDamage, source, isCombat);
if(getName().equals("Lichenthrope")) { if(getName().equals("Lichenthrope")) {

View File

@@ -5942,6 +5942,32 @@ public class GameActionUtil {
playerDamage_Farsight_Mask(player, c, crd); playerDamage_Farsight_Mask(player, c, crd);
} }
if(AllZoneUtil.isCardInPlay("Lich", player)) {
CardList lichs = playerPerms.getName("Lich");
for(Card crd:lichs) {
final Card lich = crd;
SpellAbility ability = new Ability(lich, "0") {
public void resolve() {
for(int i = 0; i < damage; i++) {
CardList nonTokens = AllZoneUtil.getPlayerCardsInPlay(player);
nonTokens = nonTokens.filter(AllZoneUtil.nonToken);
if(nonTokens.size() == 0) {
player.altLoseConditionMet("Lich");
}
else player.sacrificePermanent("Select a permanent to sacrifice", nonTokens);
}
}
};
StringBuilder sb = new StringBuilder();
sb.append(lich.getName()).append(" - ").append(lich.getController());
sb.append(" sacrifices ").append(damage).append(" nontoken Permanents.");
ability.setStackDescription(sb.toString());
AllZone.Stack.add(ability);
}
}
if(c.getKeyword().contains("Whenever this creature deals damage to a player, that player gets a poison counter.")) if(c.getKeyword().contains("Whenever this creature deals damage to a player, that player gets a poison counter."))
playerCombatDamage_PoisonCounter(c, 1); playerCombatDamage_PoisonCounter(c, 1);

View File

@@ -229,16 +229,6 @@ public abstract class Player extends MyObservable{
if(PlayerUtil.worshipFlag(this) && life <= damageToDo) { if(PlayerUtil.worshipFlag(this) && life <= damageToDo) {
damageToDo = Math.min(damageToDo, life - 1); damageToDo = Math.min(damageToDo, life - 1);
} }
if(AllZoneUtil.isCardInPlay("Lich", this)) {
for(int i = 0; i < damageToDo; i++) {
CardList nonTokens = AllZoneUtil.getPlayerCardsInPlay(this);
nonTokens = nonTokens.filter(AllZoneUtil.nonToken);
if(nonTokens.size() == 0) {
this.altLoseConditionMet("Lich");
}
else sacrificePermanent("Select a permanent to sacrifice", nonTokens);
}
}
//rule 118.2. Damage dealt to a player normally causes that player to lose that much life. //rule 118.2. Damage dealt to a player normally causes that player to lose that much life.
loseLife(damageToDo, source); loseLife(damageToDo, source);
} }