mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Fixed one effect of Lich to be a triggered ability.
- Added Treacherous Link.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -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/traumatic_visions.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/treasure_hunter.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/treasure_trove.txt -text svneol=native#text/plain
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:B
|
||||
Types:Enchantment Aura
|
||||
Text:no text
|
||||
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.
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Common
|
||||
|
||||
10
res/cardsfolder/treacherous_link.txt
Normal file
10
res/cardsfolder/treacherous_link.txt
Normal 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
|
||||
@@ -227,10 +227,7 @@ public class AIPlayer extends Player{
|
||||
public void sacrificePermanent(String prompt, CardList choices) {
|
||||
if(choices.size() > 0) {
|
||||
//TODO - this could probably use better AI
|
||||
CardListUtil.sortDefense(choices);
|
||||
choices.reverse();
|
||||
CardListUtil.sortAttackLowFirst(choices);
|
||||
Card c = choices.get(0);
|
||||
Card c = CardFactoryUtil.AI_getWorstPermanent(choices,false,false,false,false);
|
||||
AllZone.GameAction.sacrificeDestroy(c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3005,7 +3005,7 @@ public class Card extends MyObservable {
|
||||
restDamage -= 1;
|
||||
}
|
||||
|
||||
if( AllZoneUtil.isCardInPlay("Divine Presence") && restDamage > 3) {
|
||||
if( AllZoneUtil.isCardInPlay("Divine Presence") && isCreature() && restDamage > 3) {
|
||||
|
||||
restDamage = 3;
|
||||
}
|
||||
@@ -3020,12 +3020,18 @@ public class Card extends MyObservable {
|
||||
public int replaceDamage(final int damage, Card source, boolean isCombat) {
|
||||
|
||||
int restDamage = damage;
|
||||
CardList auras = new CardList(getEnchantedBy().toArray());
|
||||
|
||||
if(getName().equals("Phytohydra")) {
|
||||
addCounter(Counters.P1P1, restDamage);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(auras.containsName("Treacherous Link")) {
|
||||
getController().addDamage(restDamage, source);
|
||||
return 0;
|
||||
}
|
||||
|
||||
restDamage = staticReplaceDamage(restDamage, source, isCombat);
|
||||
|
||||
if(getName().equals("Lichenthrope")) {
|
||||
|
||||
@@ -5942,6 +5942,32 @@ public class GameActionUtil {
|
||||
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."))
|
||||
playerCombatDamage_PoisonCounter(c, 1);
|
||||
|
||||
|
||||
@@ -229,16 +229,6 @@ public abstract class Player extends MyObservable{
|
||||
if(PlayerUtil.worshipFlag(this) && life <= damageToDo) {
|
||||
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.
|
||||
loseLife(damageToDo, source);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user