mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Added Magmasaur
- Fixed RememberRemoved remembering more counters than were originally on a card
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -5857,6 +5857,7 @@ res/cardsfolder/m/magma_sliver.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/m/magma_spray.txt svneol=native#text/plain
|
res/cardsfolder/m/magma_spray.txt svneol=native#text/plain
|
||||||
res/cardsfolder/m/magma_vein.txt svneol=native#text/plain
|
res/cardsfolder/m/magma_vein.txt svneol=native#text/plain
|
||||||
res/cardsfolder/m/magmaquake.txt -text
|
res/cardsfolder/m/magmaquake.txt -text
|
||||||
|
res/cardsfolder/m/magmasaur.txt -text
|
||||||
res/cardsfolder/m/magmatic_force.txt svneol=native#text/plain
|
res/cardsfolder/m/magmatic_force.txt svneol=native#text/plain
|
||||||
res/cardsfolder/m/magmaw.txt svneol=native#text/plain
|
res/cardsfolder/m/magmaw.txt svneol=native#text/plain
|
||||||
res/cardsfolder/m/magnetic_flux.txt svneol=native#text/plain
|
res/cardsfolder/m/magnetic_flux.txt svneol=native#text/plain
|
||||||
|
|||||||
20
res/cardsfolder/m/magmasaur.txt
Normal file
20
res/cardsfolder/m/magmasaur.txt
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
Name:Magmasaur
|
||||||
|
ManaCost:3 R R
|
||||||
|
Types:Creature Elemental Lizard
|
||||||
|
Text:no text
|
||||||
|
PT:0/0
|
||||||
|
K:etbCounter:P1P1:5
|
||||||
|
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ Choices | TriggerDescription$ At the beginning of your upkeep, you may remove a +1/+1 counter from CARDNAME. If you don't, sacrifice CARDNAME and it deals damage equal to the number of +1/+1 counters on it to each creature without flying and each player.
|
||||||
|
SVar:Choices:AB$ GenericChoice | Cost$ 0 | Choices$ Shrink,SelfDestruct | Defined$ You
|
||||||
|
SVar:Shrink:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | UpTo$ True | RememberRemoved$ True | SubAbility$ SelfDestruct | ChoiceDescription$ Remove a +1/+1 counter from CARDNAME.
|
||||||
|
SVar:SelfDestruct:DB$ Sacrifice | Defined$ Self | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | References$ X | SubAbility$ LetEmHaveIt | ChoiceDescription$ Sacrifice CARDNAME and it deals damage equal to the number of +1/+1 counters on it to each creature without flying and each player.
|
||||||
|
SVar:LetEmHaveIt:DB$ DamageAll | ValidCards$ Creature.withoutFlying | ValidPlayers$ Each | NumDmg$ Y | References$ Y | SubAbility$ DBCleanup | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0
|
||||||
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
SVar:X:Count$RememberedSize
|
||||||
|
SVar:Y:Count$CardCounters.P1P1
|
||||||
|
SVar:RemAIDeck:True
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/magmasaur.jpg
|
||||||
|
SetInfo:TMP|Rare|http://magiccards.info/scans/en/tp/188.jpg
|
||||||
|
Oracle:Magmasaur enters the battlefield with five +1/+1 counters on it.\nAt the beginning of your upkeep, you may remove a +1/+1 counter from Magmasaur. If you don't, sacrifice Magmasaur and it deals damage equal to the number of +1/+1 counters on it to each creature without flying and each player.
|
||||||
|
End
|
||||||
@@ -14,4 +14,5 @@ SVar:RemAIDeck:True
|
|||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/prismatic_circle.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/prismatic_circle.jpg
|
||||||
SetInfo:MIR|Common|http://magiccards.info/scans/en/mr/238.jpg
|
SetInfo:MIR|Common|http://magiccards.info/scans/en/mr/238.jpg
|
||||||
|
Oracle:Cumulative upkeep {1} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.)\nAs Prismatic Circle enters the battlefield, choose a color.\n{1}: The next time a source of your choice of the chosen color would deal damage to you this turn, prevent that damage.
|
||||||
End
|
End
|
||||||
@@ -15,15 +15,15 @@ import forge.game.zone.Zone;
|
|||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
import forge.gui.GuiChoose;
|
import forge.gui.GuiChoose;
|
||||||
|
|
||||||
public class CountersRemoveEffect extends SpellEffect {
|
public class CountersRemoveEffect extends SpellEffect {
|
||||||
@Override
|
@Override
|
||||||
protected String getStackDescription(SpellAbility sa) {
|
protected String getStackDescription(SpellAbility sa) {
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
final String counterName = sa.getParam("CounterType");
|
final String counterName = sa.getParam("CounterType");
|
||||||
|
|
||||||
final int amount = AbilityFactory.calculateAmount(sa.getSourceCard(), sa.getParam("CounterNum"), sa);
|
final int amount = AbilityFactory.calculateAmount(sa.getSourceCard(), sa.getParam("CounterNum"), sa);
|
||||||
|
|
||||||
sb.append("Remove ");
|
sb.append("Remove ");
|
||||||
if (sa.hasParam("UpTo")) {
|
if (sa.hasParam("UpTo")) {
|
||||||
sb.append("up to ");
|
sb.append("up to ");
|
||||||
@@ -43,13 +43,13 @@ public class CountersRemoveEffect extends SpellEffect {
|
|||||||
sb.append("s");
|
sb.append("s");
|
||||||
}
|
}
|
||||||
sb.append(" from");
|
sb.append(" from");
|
||||||
|
|
||||||
for (final Card c : getTargetCards(sa)) {
|
for (final Card c : getTargetCards(sa)) {
|
||||||
sb.append(" ").append(c);
|
sb.append(" ").append(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append(".");
|
sb.append(".");
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ public class CountersRemoveEffect extends SpellEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Target tgt = sa.getTarget();
|
final Target tgt = sa.getTarget();
|
||||||
|
|
||||||
boolean rememberRemoved = false;
|
boolean rememberRemoved = false;
|
||||||
if (sa.hasParam("RememberRemoved")) {
|
if (sa.hasParam("RememberRemoved")) {
|
||||||
rememberRemoved = true;
|
rememberRemoved = true;
|
||||||
@@ -101,7 +101,7 @@ public class CountersRemoveEffect extends SpellEffect {
|
|||||||
chosenAmount = counterAmount;
|
chosenAmount = counterAmount;
|
||||||
}
|
}
|
||||||
// make list of amount choices
|
// make list of amount choices
|
||||||
|
|
||||||
if (chosenAmount > 1) {
|
if (chosenAmount > 1) {
|
||||||
final List<Integer> choices = new ArrayList<Integer>();
|
final List<Integer> choices = new ArrayList<Integer>();
|
||||||
for (int i = 1; i <= chosenAmount; i++) {
|
for (int i = 1; i <= chosenAmount; i++) {
|
||||||
@@ -149,6 +149,9 @@ public class CountersRemoveEffect extends SpellEffect {
|
|||||||
}
|
}
|
||||||
tgtCard.subtractCounter(Counters.valueOf(type), counterAmount);
|
tgtCard.subtractCounter(Counters.valueOf(type), counterAmount);
|
||||||
if (rememberRemoved) {
|
if (rememberRemoved) {
|
||||||
|
if (counterAmount > tgtCard.getCounters(Counters.valueOf(type))) {
|
||||||
|
counterAmount = tgtCard.getCounters(Counters.valueOf(type));
|
||||||
|
}
|
||||||
for (int i = 0; i < counterAmount; i++) {
|
for (int i = 0; i < counterAmount; i++) {
|
||||||
card.addRemembered(Counters.valueOf(type));
|
card.addRemembered(Counters.valueOf(type));
|
||||||
}
|
}
|
||||||
@@ -158,4 +161,4 @@ public class CountersRemoveEffect extends SpellEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user