- Cleanup of getLKICopy functions.

- Fixed Starlit Sanctum.
This commit is contained in:
Sloth
2012-11-20 23:24:17 +00:00
parent a88e814a67
commit 033d0c9abf
4 changed files with 12 additions and 54 deletions

View File

@@ -11,5 +11,6 @@ SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered |
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/riths_charm.jpg
SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/122.jpg
Oracle:Choose one - Destroy target nonbasic land; or put three 1/1 green Saproling creature tokens onto the battlefield; or prevent all damage a source of your choice would deal this turn.
End

View File

@@ -2,10 +2,10 @@ Name:Starlit Sanctum
ManaCost:no cost
Types:Land
A:AB$ Mana | Cost$ T | Produced$ 1 | SpellDescription$ Add 1 to your mana pool.
A:AB$ GainLife | Cost$ W T Sac<1/Creature.cleric> | LifeAmount$ X | CostDesc$ W, T, Sacrifice a Cleric creature: | SpellDescription$ You gain life equal to the sacrificed creature's toughness.
A:AB$ GainLife | Cost$ W T Sac<1/Creature.Cleric/Cleric creature> | LifeAmount$ X | References$ X | SpellDescription$ You gain life equal to the sacrificed creature's toughness.
SVar:X:Sacrificed$CardToughness
A:AB$ LoseLife | Cost$ B T Sac<1/Creature.cleric> | ValidTgts$ Player | LifeAmount$ X | TgtPrompt$ Select a player | CostDesc$ B, T, Sacrifice a Cleric creature: | SpellDescription$ Target player loses life equal to the sacrificed creature's power.
SVar:X:Sacrificed$CardPower
A:AB$ LoseLife | Cost$ B T Sac<1/Creature.Cleric/Cleric creature> | ValidTgts$ Player | LifeAmount$ Y | References$ Y | TgtPrompt$ Select a player | SpellDescription$ Target player loses life equal to the sacrificed creature's power.
SVar:Y:Sacrificed$CardPower
SVar:RemRandomDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/starlit_sanctum.jpg

View File

@@ -680,48 +680,6 @@ public final class CardUtil {
return res;
}
/**
* getLKICopyOld.
*
* @param c
* a Card.
* @return a copy of C with LastKnownInfo stuff retained.
*/
public static Card getLKICopyOld(final Card c) {
if (c.isToken()) {
return c;
}
final CardCharacteristicName state = c.getCurState();
if (c.isInAlternateState()) {
c.setState(CardCharacteristicName.Original);
}
final Card res = Singletons.getModel().getCardFactory().copyCard(c);
c.setState(state);
res.setState(state);
res.setControllerObjects(c.getControllerObjects());
res.addTempAttackBoost(c.getTempAttackBoost());
res.addSemiPermanentAttackBoost(c.getSemiPermanentAttackBoost());
res.addTempDefenseBoost(c.getTempDefenseBoost());
res.addSemiPermanentDefenseBoost(c.getSemiPermanentDefenseBoost());
res.setCounters(c.getCounters());
res.setExtrinsicKeyword(c.getExtrinsicKeyword());
res.setColor(c.getColor());
res.setChangedCardTypes(c.getChangedCardTypes());
res.setNewPT(new ArrayList<CardPowerToughness>(c.getNewPT()));
res.setReceivedDamageFromThisTurn(c.getReceivedDamageFromThisTurn());
res.getDamageHistory().setCreatureGotBlockedThisTurn(c.getDamageHistory().getCreatureGotBlockedThisTurn());
res.setEnchanting(c.getEnchanting());
res.setEnchantedBy(c.getEnchantedBy());
res.setEquipping(c.getEquipping());
res.setEquippedBy(c.getEquippedBy());
res.setHaunting(c.getHaunting());
for (final Card haunter : c.getHauntedBy()) {
res.addHauntedBy(haunter);
}
return res;
}
/**
* getLKICopy.
*
@@ -741,21 +699,18 @@ public final class CardUtil {
newCopy.setFlipCard(in.isFlipCard());
newCopy.setDoubleFaced(in.isDoubleFaced());
newCopy.getCharacteristics().copy(in.getState(in.getCurState()));
newCopy.setBaseAttack(in.getNetAttack());
newCopy.setBaseDefense(in.getNetDefense());
newCopy.setType(new ArrayList<String>(in.getType()));
newCopy.setTriggers(in.getTriggers());
for (SpellAbility sa : in.getManaAbility()) {
newCopy.addSpellAbility(sa);
}
newCopy.setControllerObjects(in.getControllerObjects());
newCopy.addTempAttackBoost(in.getTempAttackBoost());
newCopy.addSemiPermanentAttackBoost(in.getSemiPermanentAttackBoost());
newCopy.addTempDefenseBoost(in.getTempDefenseBoost());
newCopy.addSemiPermanentDefenseBoost(in.getSemiPermanentDefenseBoost());
newCopy.setCounters(in.getCounters());
newCopy.setExtrinsicKeyword(in.getExtrinsicKeyword());
newCopy.setColor(in.getColor());
newCopy.setChangedCardTypes(in.getChangedCardTypes());
newCopy.setNewPT(new ArrayList<CardPowerToughness>(in.getNewPT()));
newCopy.setReceivedDamageFromThisTurn(in.getReceivedDamageFromThisTurn());
newCopy.getDamageHistory().setCreatureGotBlockedThisTurn(in.getDamageHistory().getCreatureGotBlockedThisTurn());
newCopy.setEnchanting(in.getEnchanting());

View File

@@ -43,12 +43,14 @@ public class LifeGainEffect extends SpellEffect {
final Target tgt = sa.getTarget();
ArrayList<Player> tgtPlayers = new ArrayList<Player>();
if (tgt != null) {
tgtPlayers = tgt.getTargetPlayers();
}
if (sa.hasParam("Defined")) {
tgtPlayers = AbilityFactory.getDefinedPlayers(sa.getSourceCard(), sa.getParam("Defined"), sa);
} else if (tgt != null) {
tgtPlayers = tgt.getTargetPlayers();
} else {
tgtPlayers.add(sa.getActivatingPlayer());
}
for (final Player p : tgtPlayers) {
if ((tgt == null) || p.canBeTargetedBy(sa)) {
p.gainLife(lifeAmount, sa.getSourceCard());