mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
*Added Sunburst keyword.
*Added: Baton of Courage Etched Oracle Heliophial Lunar Avenger Sawtooth Thresher Skyreach Manta Suncrusher Suntouched Myr *Added SetInfo to Ratchet Bomb.
This commit is contained in:
8
.gitattributes
vendored
8
.gitattributes
vendored
@@ -411,6 +411,7 @@ res/cardsfolder/basalt_monolith.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/bash_to_bits.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/basilisk_collar.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/basking_rootwalla.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/baton_of_courage.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/battered_golem.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/battering_craghorn.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/battering_sliver.txt -text svneol=native#text/plain
|
||||
@@ -1508,6 +1509,7 @@ res/cardsfolder/essence_scatter.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/essence_sliver.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/essence_warden.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/etched_champion.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/etched_oracle.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/eternal_dragon.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/eternal_flame.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/eternal_warrior.txt -text svneol=native#text/plain
|
||||
@@ -2187,6 +2189,7 @@ res/cardsfolder/hedron_rover.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/heedless_one.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/heidar_rimewind_master.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/helionaut.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/heliophial.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/helix_pinnacle.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/hell_bent_raider.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/helldozer.txt -text svneol=native#text/plain
|
||||
@@ -2845,6 +2848,7 @@ res/cardsfolder/lull.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/lumbering_satyr.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/lumengrid_warden.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/luminous_angel.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/lunar_avenger.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/lunge.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/lure.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/lurking_informant.txt -text svneol=native#text/plain
|
||||
@@ -4001,6 +4005,7 @@ res/cardsfolder/savage_lands.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/savage_twister.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/savannah.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/savannah_lions.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sawtooth_thresher.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/scabland.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/scalding_tarn.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/scale_of_chiss_goria.txt -text svneol=native#text/plain
|
||||
@@ -4294,6 +4299,7 @@ res/cardsfolder/skyhunter_patrol.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/skyhunter_prowler.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/skyhunter_skirmisher.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/skyknight_legionnaire.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/skyreach_manta.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/skyrider_trainee.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/skyshaper.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/skyshroud_behemoth.txt -text svneol=native#text/plain
|
||||
@@ -4649,6 +4655,7 @@ res/cardsfolder/sun_titan.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sunastian_falconer.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sunbeam_spellbomb.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sunblast_angel.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/suncrusher.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sunder.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sunder_from_within.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sunflare_shaman.txt -text svneol=native#text/plain
|
||||
@@ -4667,6 +4674,7 @@ res/cardsfolder/sunscape_master.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sunspear_shikari.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sunstone.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/suntail_hawk.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/suntouched_myr.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sunweb.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/supreme_exemplar.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/suqata_assassin.txt -text svneol=native#text/plain
|
||||
|
||||
11
res/cardsfolder/baton_of_courage.txt
Normal file
11
res/cardsfolder/baton_of_courage.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Baton of Courage
|
||||
ManaCost:3
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
K:Flash
|
||||
K:Sunburst
|
||||
A:AB$Pump | Cost$ Subcounter<1/CHARGE> | Tgt$ TgtC | NumDef$ 1 | NumAtt$ 1 | SpellDescription$ Target creature gets +1/+1 until end of turn.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/baton_of_courage.jpg
|
||||
SetInfo:5DN|Common|http://magiccards.info/scans/en/5dn/105.jpg
|
||||
End
|
||||
12
res/cardsfolder/etched_oracle.txt
Normal file
12
res/cardsfolder/etched_oracle.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Name:Etched Oracle
|
||||
ManaCost:4
|
||||
Types:Artifact Creature Wizard
|
||||
Text:no text
|
||||
PT:0/0
|
||||
K:Sunburst
|
||||
A:AB$Draw | Cost$ 1 SubCounter<4/P1P1> | Tgt$ TgtP | NumCards$ 3 | SpellDescription$ Target player draws 3 cards.
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/etched_oracle.jpg
|
||||
SetInfo:5DN|Uncommon|http://magiccards.info/scans/en/5dn/121.jpg
|
||||
End
|
||||
11
res/cardsfolder/heliophial.txt
Normal file
11
res/cardsfolder/heliophial.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Heliophial
|
||||
ManaCost:5
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
A:AB$DealDamage | Cost$ 2 Sac<1/CARDNAME> | Tgt$ TgtCP | NumDmg$ X | SpellDescription$ CARDNAME deals damage equal to the number of charge counters on it to target creature or player.
|
||||
K:Sunburst
|
||||
SVar:X:Count$CardCounters.CHARGE
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/heliophial.jpg
|
||||
SetInfo:5DN|Common|http://magiccards.info/scans/en/5dn/130.jpg
|
||||
End
|
||||
13
res/cardsfolder/lunar_avenger.txt
Normal file
13
res/cardsfolder/lunar_avenger.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
Name:Lunar Avenger
|
||||
ManaCost:7
|
||||
Types:Artifact Creature Golem
|
||||
Text:no text
|
||||
PT:2/2
|
||||
K:Sunburst
|
||||
A:AB$Pump | Cost$ SubCounter<1/P1P1> | KW$ Flying | SpellDescription$ CARDNAME gains flying until end of turn.
|
||||
A:AB$Pump | Cost$ SubCounter<1/P1P1> | KW$ First strike | SpellDescription$ CARDNAME gains first strike until end of turn.
|
||||
A:AB$Pump | Cost$ SubCounter<1/P1P1> | KW$ Haste | SpellDescription$ CARDNAME gains haste until end of turn.
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/lunar_avenger.jpg
|
||||
SetInfo:5DN|Uncommon|http://magiccards.info/scans/en/5dn/136.jpg
|
||||
End
|
||||
@@ -7,4 +7,5 @@ A:AB$DestroyAll | Cost$ T Sac<1/CARDNAME> | ValidCards$ Permanent.nonLand+cmcEQX
|
||||
SVar:X:Count$CardCounters.CHARGE
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/ratchet_bomb.jpg
|
||||
SetInfo:SOM|Rare|http://magiccards.info/scans/en/som/196.jpg
|
||||
End
|
||||
11
res/cardsfolder/sawtooth_thresher.txt
Normal file
11
res/cardsfolder/sawtooth_thresher.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Sawtooth Thresher
|
||||
ManaCost:6
|
||||
Types:Artifact Creature Construct
|
||||
Text:no text
|
||||
PT:1/1
|
||||
K:Sunburst
|
||||
A:AB$Pump | Cost$ SubCounter<2/P1P1> | NumAtt$ 4 | NumDef$ 4 | SpellDescription$ CARDNAME gets +4/+4 until end of turn.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/opaline_bracers.jpg
|
||||
SetInfo:5DN|Common|http://magiccards.info/scans/en/5dn/149.jpg
|
||||
End
|
||||
12
res/cardsfolder/skyreach_manta.txt
Normal file
12
res/cardsfolder/skyreach_manta.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Name:Skyreach Manta
|
||||
ManaCost:5
|
||||
Types:Artifact Creature Fish
|
||||
Text:no text
|
||||
PT:0/0
|
||||
K:Flying
|
||||
K:Sunburst
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/skyreach_manta.jpg
|
||||
SetInfo:5DN|Common|http://magiccards.info/scans/en/5dn/152.jpg
|
||||
End
|
||||
12
res/cardsfolder/suncrusher.txt
Normal file
12
res/cardsfolder/suncrusher.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Name:Suncrusher
|
||||
ManaCost:9
|
||||
Types:Artifact Creature Construct
|
||||
Text:no text
|
||||
PT:3/3
|
||||
K:Sunburst
|
||||
A:AB$Destroy | Cost$ 4 T SubCounter<1/P1P1> | Tgt$ TgtC | SpellDescription$ Destroy target creature.
|
||||
A:AB$Bounce | Cost$ 2 SubCounter<1/P1P1> | Destination$ Hand | SpellDescription$ Return CARDNAME to its owner's hand.
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/suncrusher.jpg
|
||||
SetInfo:5DN|Rare|http://magiccards.info/scans/en/5dn/159.jpg
|
||||
End
|
||||
11
res/cardsfolder/suntouched_myr.txt
Normal file
11
res/cardsfolder/suntouched_myr.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Suntouched Myr
|
||||
ManaCost:3
|
||||
Types:Artifact Creature Myr
|
||||
Text:no text
|
||||
PT:0/0
|
||||
K:Sunburst
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/suntouched_myr.jpg
|
||||
SetInfo:5DN|Common|http://magiccards.info/scans/en/5dn/160.jpg
|
||||
End
|
||||
@@ -120,6 +120,8 @@ public class Card extends MyObservable {
|
||||
|
||||
private int multiKickerMagnitude = 0;
|
||||
|
||||
private int sunburstValue = 0;
|
||||
|
||||
private Player owner = null;
|
||||
private Player controller = null;
|
||||
private String name = "";
|
||||
@@ -185,6 +187,16 @@ public class Card extends MyObservable {
|
||||
return abilityUsed;
|
||||
}
|
||||
|
||||
public int getSunburstValue()
|
||||
{
|
||||
return sunburstValue;
|
||||
}
|
||||
|
||||
public void setSunburstValue(int value)
|
||||
{
|
||||
sunburstValue = value;
|
||||
}
|
||||
|
||||
//****************TOhaveDOne:Use somehow
|
||||
public void setX(int i) {
|
||||
X = i;
|
||||
|
||||
@@ -340,6 +340,31 @@ public class CardFactory implements NewConstants {
|
||||
}
|
||||
});
|
||||
}
|
||||
if(hasKeyword(card,"Sunburst") != -1)
|
||||
{
|
||||
Command sunburstCIP = new Command() {
|
||||
private static final long serialVersionUID = 1489845860231758299L;
|
||||
public void execute() {
|
||||
if(card.isType("Creature")) {
|
||||
card.addCounter(Counters.P1P1, card.getSunburstValue());
|
||||
}
|
||||
else {
|
||||
card.addCounter(Counters.CHARGE, card.getSunburstValue());
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Command sunburstLP = new Command() {
|
||||
private static final long serialVersionUID = -7564420917490677427L;
|
||||
public void execute() {
|
||||
card.setSunburstValue(0);
|
||||
}
|
||||
};
|
||||
|
||||
card.addComesIntoPlayCommand(sunburstCIP);
|
||||
card.addLeavesPlayCommand(sunburstLP);
|
||||
}
|
||||
if(hasKeyword(card,"spCounter") != -1) {
|
||||
ComputerAI_counterSpells2.KeywordedCounterspells.add(card.getName());
|
||||
|
||||
|
||||
@@ -456,7 +456,10 @@ public class ComputerUtil
|
||||
|
||||
}
|
||||
if(cost.isPaid())
|
||||
break;
|
||||
{
|
||||
sa.getSourceCard().setSunburstValue(cost.getSunburst());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -599,7 +599,7 @@ public class Cost_Payment {
|
||||
boolean canUse = false;
|
||||
for(Ability_Mana am:card.getManaAbility())
|
||||
canUse |= am.canPlay();
|
||||
mana = Input_PayManaCostUtil.tapCard(card, mana);
|
||||
mana = Input_PayManaCostUtil.tapCard(card, mana,false);
|
||||
|
||||
if(mana.isPaid())
|
||||
done();
|
||||
@@ -660,7 +660,7 @@ public class Cost_Payment {
|
||||
boolean canUse = false;
|
||||
for(Ability_Mana am:card.getManaAbility())
|
||||
canUse |= am.canPlay();
|
||||
manaCost = Input_PayManaCostUtil.tapCard(card, manaCost);
|
||||
manaCost = Input_PayManaCostUtil.tapCard(card, manaCost,false);
|
||||
if(manaCost.isPaid()){
|
||||
manaCost = new ManaCost(Integer.toString(numX));
|
||||
xPaid++;
|
||||
|
||||
@@ -57,10 +57,13 @@ public class Input_PayManaCost extends Input {
|
||||
boolean canUse = false;
|
||||
for(Ability_Mana am:card.getManaAbility())
|
||||
canUse |= am.canPlay();
|
||||
manaCost = Input_PayManaCostUtil.tapCard(card, manaCost);
|
||||
manaCost = Input_PayManaCostUtil.tapCard(card, manaCost,false);
|
||||
showMessage();
|
||||
|
||||
if(manaCost.isPaid()) done();
|
||||
if(manaCost.isPaid()) {
|
||||
originalCard.setSunburstValue(manaCost.getSunburst());
|
||||
done();
|
||||
}
|
||||
}
|
||||
|
||||
private void done() {
|
||||
@@ -105,6 +108,9 @@ public class Input_PayManaCost extends Input {
|
||||
public void showMessage() {
|
||||
ButtonUtil.enableOnlyCancel();
|
||||
AllZone.Display.showMessage("Pay Mana Cost: " + manaCost.toString());
|
||||
if(manaCost.isPaid() && !new ManaCost(originalManaCost).isPaid()) done();
|
||||
if(manaCost.isPaid() && !new ManaCost(originalManaCost).isPaid()) {
|
||||
originalCard.setSunburstValue(manaCost.getSunburst());
|
||||
done();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ public class Input_PayManaCostUtil
|
||||
//all mana abilities start with this and typical look like "tap: add G"
|
||||
//mana abilities are Strings and are retrieved by calling card.getKeyword()
|
||||
//taps any card that has mana ability, not just land
|
||||
public static ManaCost tapCard(Card card, ManaCost manaCost)
|
||||
public static ManaCost tapCard(Card card, ManaCost manaCost,boolean forceNoExpress)
|
||||
{
|
||||
//make sure computer's lands aren't selected
|
||||
if(card.getController().equals(AllZone.ComputerPlayer))
|
||||
@@ -45,6 +45,7 @@ public class Input_PayManaCostUtil
|
||||
// todo when implementing sunburst
|
||||
// If the card has sunburst or any other ability that tracks mana spent, skip express Mana choice
|
||||
// if (card.getTrackManaPaid()) skipExpress = true;
|
||||
if(forceNoExpress) skipExpress = true;
|
||||
|
||||
if (!skipExpress){
|
||||
// express Mana Choice
|
||||
|
||||
@@ -59,7 +59,7 @@ public class Input_PayManaCost_Ability extends Input {
|
||||
@Override
|
||||
public void selectCard(Card card, PlayerZone zone) {
|
||||
//only tap card if the mana is needed
|
||||
manaCost = Input_PayManaCostUtil.tapCard(card, manaCost);
|
||||
manaCost = Input_PayManaCostUtil.tapCard(card, manaCost,false);
|
||||
showMessage();
|
||||
|
||||
if(manaCost.isPaid()) {
|
||||
|
||||
@@ -2,12 +2,14 @@ package forge;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class ManaCost {
|
||||
//holds Mana_Part objects
|
||||
//ManaPartColor is stored before ManaPartColorless
|
||||
private ArrayList<Object> manaPart;
|
||||
private HashMap<String,Integer> sunburstMap = new HashMap<String,Integer>();
|
||||
|
||||
//manaCost can be like "0", "3", "G", "GW", "10", "3 GW", "10 GW"
|
||||
//or "split hybrid mana" like "2/G 2/G", "2/B 2/B 2/B"
|
||||
@@ -27,6 +29,13 @@ public class ManaCost {
|
||||
manaPart = split(manaCost);
|
||||
}
|
||||
|
||||
public int getSunburst()
|
||||
{
|
||||
int ret = sunburstMap.size();
|
||||
sunburstMap.clear();
|
||||
return ret;
|
||||
}
|
||||
|
||||
// takes a Short Color and returns true if it exists in the mana cost. Easier for split costs
|
||||
public boolean isColor(String color){
|
||||
for(Object s : manaPart){
|
||||
@@ -114,6 +123,12 @@ public class ManaCost {
|
||||
return false;
|
||||
|
||||
choice.reduce(mana);
|
||||
if(!mana.equals(Constant.Color.Colorless)) {
|
||||
if(sunburstMap.containsKey(mana))
|
||||
sunburstMap.put(mana, sunburstMap.get(mana)+1);
|
||||
else
|
||||
sunburstMap.put(mana, 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -140,6 +155,12 @@ public class ManaCost {
|
||||
return false;
|
||||
|
||||
choice.reduce(mana);
|
||||
if(!mana.isColor(Constant.Color.Colorless)) {
|
||||
if(sunburstMap.containsKey(mana.getColor()))
|
||||
sunburstMap.put(mana.getColor(), sunburstMap.get(mana.getColor())+1);
|
||||
else
|
||||
sunburstMap.put(mana.getColor(), 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user