- Added Aphetto Dredging and Liquid Fire

This commit is contained in:
swordshine
2013-06-13 00:28:18 +00:00
parent 0177e94d86
commit e691849da0
4 changed files with 46 additions and 1 deletions

2
.gitattributes vendored
View File

@@ -377,6 +377,7 @@ res/cardsfolder/a/apathy.txt -text
res/cardsfolder/a/apes_of_rath.txt svneol=native#text/plain
res/cardsfolder/a/apex_hawks.txt svneol=native#text/plain
res/cardsfolder/a/aphetto_alchemist.txt svneol=native#text/plain
res/cardsfolder/a/aphetto_dredging.txt -text
res/cardsfolder/a/aphetto_exterminator.txt svneol=native#text/plain
res/cardsfolder/a/aphetto_grifter.txt svneol=native#text/plain
res/cardsfolder/a/aphetto_runecaster.txt svneol=native#text/plain
@@ -6256,6 +6257,7 @@ res/cardsfolder/l/lingering_tormentor.txt svneol=native#text/plain
res/cardsfolder/l/linvala_keeper_of_silence.txt svneol=native#text/plain
res/cardsfolder/l/lionheart_maverick.txt svneol=native#text/plain
res/cardsfolder/l/lions_eye_diamond.txt -text
res/cardsfolder/l/liquid_fire.txt -text
res/cardsfolder/l/liquify.txt svneol=native#text/plain
res/cardsfolder/l/liquimetal_coating.txt svneol=native#text/plain
res/cardsfolder/l/lithatog.txt svneol=native#text/plain

View File

@@ -0,0 +1,7 @@
Name:Aphetto Dredging
ManaCost:3 B
Types:Sorcery
A:SP$ ChangeZone | Cost$ 3 B | AnnounceType$ CreatureType | ValidTgts$ Creature.YouCtrl+ChosenType | TargetMin$ 0 | TargetMax$ 3 | AILogic$ MostProminentInComputerGraveyard | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target creature card with the chosen type in your graveyard | SpellDescription$ Return up to three target creature cards of the creature type of your choice from your graveyard to your hand.
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/aphetto_dredging.jpg
Oracle:Return up to three target creature cards of the creature type of your choice from your graveyard to your hand.

View File

@@ -0,0 +1,11 @@
Name:Liquid Fire
ManaCost:4 R R
Types:Sorcery
Text:As an additional cost to cast CARDNAME, choose a number between 0 and 5.
A:SP$ DealDamage | Cost$ 4 R R | AnnounceType$ ChooseNumber | Min$ 0 | Max$ 5 | ValidTgts$ Creature | NumDmg$ X | References$ X | SubAbility$ DBDmg | SpellDescription$ CARDNAME deals X damage to target creature and 5 minus X damage to that creature's controller, where X is the chosen number.
SVar:DBDmg:DB$ DealDamage | Defined$ TargetedController | NumDmg$ Y | References$ Y
SVar:X:Count$ChosenNumber
SVar:Y:SVar$X/NMinus.5
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/liquid_fire.jpg
Oracle:As an additional cost to cast Liquid Fire, choose a number between 0 and 5.\nLiquid Fire deals X damage to target creature and 5 minus X damage to that creature's controller, where X is the chosen number.

View File

@@ -23,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
import forge.Card;
import forge.CardCharacteristicName;
import forge.card.CardType;
import forge.card.ability.AbilityUtils;
import forge.card.cost.CostPartMana;
import forge.card.cost.CostPayment;
@@ -67,6 +68,7 @@ public class HumanPlaySpellAbility {
// This line makes use of short-circuit evaluation of boolean values, that is each subsequent argument
// is only executed or evaluated if the first argument does not suffice to determine the value of the expression
boolean prerequisitesMet = this.announceValuesLikeX()
&& this.announceType()
&& ( isAlreadyTargeted || setupTargets() )
&& ( isFree || this.payment.payCost(game) );
@@ -169,6 +171,29 @@ public class HumanPlaySpellAbility {
return true;
}
private boolean announceType() {
// Announcing Requirements like choosing creature type or number
String announce = ability.getParam("AnnounceType");
if (announce != null) {
for(String aVar : announce.split(",")) {
String varName = aVar.trim();
if ("CreatureType".equals(varName)) {
String choice = ability.getActivatingPlayer().getController().chooseSomeType("Creature",
ability.getParam("AILogic"), CardType.getCreatureTypes(), new ArrayList<String>());
ability.getSourceCard().setChosenType(choice);
}
if ("ChooseNumber".equals(varName)) {
int min = Integer.parseInt(ability.getParam("Min"));
int max = Integer.parseInt(ability.getParam("Max"));
int i = ability.getActivatingPlayer().getController().chooseNumber(ability,
"Choose a number", min, max);
ability.getSourceCard().setChosenNumber(i);
}
}
}
return true;
}
private void enusureAbilityHasDescription(SpellAbility ability) {
if (!StringUtils.isBlank(ability.getStackDescription()))
return;