mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added Paralyze and Reverse the sands
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -7648,6 +7648,7 @@ res/cardsfolder/p/parallax_wave.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/parallectric_feedback.txt -text
|
||||
res/cardsfolder/p/parallel_evolution.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/parallel_lives.txt -text
|
||||
res/cardsfolder/p/paralyze.txt -text
|
||||
res/cardsfolder/p/paralyzing_grasp.txt svneol=native#text/plain
|
||||
res/cardsfolder/p/paranoid_delusions.txt -text
|
||||
res/cardsfolder/p/parapet.txt -text
|
||||
@@ -8632,6 +8633,7 @@ res/cardsfolder/r/reverent_mantra.txt -text
|
||||
res/cardsfolder/r/reverent_silence.txt -text
|
||||
res/cardsfolder/r/reverse_damage.txt -text
|
||||
res/cardsfolder/r/reverse_polarity.txt -text
|
||||
res/cardsfolder/r/reverse_the_sands.txt -text
|
||||
res/cardsfolder/r/revive.txt svneol=native#text/plain
|
||||
res/cardsfolder/r/revive_the_fallen.txt svneol=native#text/plain
|
||||
res/cardsfolder/r/reviving_dose.txt svneol=native#text/plain
|
||||
|
||||
18
res/cardsfolder/p/paralyze.txt
Normal file
18
res/cardsfolder/p/paralyze.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
Name:Paralyze
|
||||
ManaCost:B
|
||||
Types:Enchantment Aura
|
||||
K:Enchant creature
|
||||
A:SP$ Attach | Cost$ B | ValidTgts$ Creature | AILogic$ Curse
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters the battlefield, tap enchanted creature.
|
||||
SVar:TrigTap:AB$ Tap | Cost$ 0 | Defined$ Enchanted
|
||||
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step.
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ EnchantedController | TriggerZones$ Battlefield | Execute$ TrigUntap | TriggerDescription$ At the beginning of the upkeep of enchanted creature's controller, that player may pay {4}. If he or she does, untap the creature.
|
||||
SVar:TrigUntap:AB$ Untap | Cost$ 0 | Defined$ Enchanted | UnlessCost$ 4 | UnlessPayer$ EnchantedController | UnlessSwitched$ True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/paralyze.jpg
|
||||
Oracle:Enchant creature\nWhen Paralyze enters the battlefield, tap enchanted creature.\nEnchanted creature doesn't untap during its controller's untap step.\nAt the beginning of the upkeep of enchanted creature's controller, that player may pay {4}. If he or she does, untap the creature.
|
||||
SetInfo:2ED Common
|
||||
SetInfo:LEB Common
|
||||
SetInfo:LEA Common
|
||||
SetInfo:5ED Common
|
||||
SetInfo:4ED Common
|
||||
SetInfo:3ED Common
|
||||
9
res/cardsfolder/r/reverse_the_sands.txt
Normal file
9
res/cardsfolder/r/reverse_the_sands.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Reverse the Sands
|
||||
ManaCost:6 W W
|
||||
Types:Sorcery
|
||||
A:SP$ SetLife | Cost$ 0 | ValidTgts$ Player | TargetMin$ 0 | TargetMax$ Maxplayer | Redistribute$ True | SpellDescription$ Redistribute any number of players' life totals. (Each of those players gets one life total back.)
|
||||
SVar:Maxplayer:PlayerCountPlayers$Amount
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/reverse_the_sands.jpg
|
||||
Oracle:Redistribute any number of players' life totals. (Each of those players gets one life total back.)
|
||||
SetInfo:CHK Rare
|
||||
@@ -1,12 +1,16 @@
|
||||
package forge.card.ability.effects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import forge.card.ability.AbilityUtils;
|
||||
import forge.card.ability.SpellAbilityEffect;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.spellability.Target;
|
||||
import forge.game.player.HumanPlayer;
|
||||
import forge.game.player.Player;
|
||||
import forge.gui.GuiChoose;
|
||||
|
||||
public class LifeSetEffect extends SpellAbilityEffect {
|
||||
|
||||
@@ -15,12 +19,39 @@ public class LifeSetEffect extends SpellAbilityEffect {
|
||||
*/
|
||||
@Override
|
||||
public void resolve(SpellAbility sa) {
|
||||
final int lifeAmount = AbilityUtils.calculateAmount(sa.getSourceCard(), sa.getParam("LifeAmount"), sa);
|
||||
final boolean redistribute = sa.hasParam("Redistribute");
|
||||
final int lifeAmount = redistribute ? 20 : AbilityUtils.calculateAmount(sa.getSourceCard(), sa.getParam("LifeAmount"), sa);
|
||||
final Target tgt = sa.getTarget();
|
||||
final List<Integer> lifetotals = new ArrayList<Integer>();
|
||||
|
||||
if (redistribute) {
|
||||
for (final Player p : getTargetPlayers(sa)) {
|
||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||
lifetotals.add(p.getLife());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (final Player p : getTargetPlayers(sa)) {
|
||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||
p.setLife(lifeAmount, sa.getSourceCard());
|
||||
if (!redistribute) {
|
||||
p.setLife(lifeAmount, sa.getSourceCard());
|
||||
} else {
|
||||
int life;
|
||||
if (sa.getActivatingPlayer() instanceof HumanPlayer) {
|
||||
life = GuiChoose.one("Life Total: " + p, lifetotals);
|
||||
} else {//AI
|
||||
if (p.equals(sa.getSourceCard().getController())) {
|
||||
life = Collections.max(lifetotals);
|
||||
} else if (p.isOpponentOf(sa.getSourceCard().getController())) {
|
||||
life = Collections.min(lifetotals);
|
||||
} else {
|
||||
life = lifetotals.get(0);
|
||||
}
|
||||
}
|
||||
p.setLife(life, sa.getSourceCard());
|
||||
lifetotals.remove((Integer) life);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,15 +63,21 @@ public class LifeSetEffect extends SpellAbilityEffect {
|
||||
protected String getStackDescription(SpellAbility sa) {
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final int amount = AbilityUtils.calculateAmount(sa.getSourceCard(), sa.getParam("LifeAmount"), sa);
|
||||
final boolean redistribute = sa.hasParam("Redistribute");
|
||||
|
||||
List<Player> tgtPlayers = getTargetPlayers(sa);
|
||||
|
||||
for (final Player player : tgtPlayers) {
|
||||
sb.append(player).append(" ");
|
||||
if (!redistribute) {
|
||||
for (final Player player : tgtPlayers) {
|
||||
sb.append(player).append(" ");
|
||||
}
|
||||
sb.append("life total becomes ").append(amount).append(".");
|
||||
} else {
|
||||
sb.append("Redistribute ");
|
||||
for (final Player player : tgtPlayers) {
|
||||
sb.append(player).append(" ");
|
||||
}
|
||||
sb.append("life totals.");
|
||||
}
|
||||
|
||||
sb.append("life total becomes ").append(amount).append(".");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user