- Added support for ability granting of the stPump keyword.

- Added Armor Sliver, Clot Sliver and Barbed Sliver.
This commit is contained in:
jendave
2011-08-06 17:10:09 +00:00
parent 37e54df13f
commit d58acb6bd2
9 changed files with 75 additions and 12 deletions

3
.gitattributes vendored
View File

@@ -292,6 +292,7 @@ res/cardsfolder/armed_response.txt -text svneol=native#text/plain
res/cardsfolder/armillary_sphere.txt -text svneol=native#text/plain
res/cardsfolder/armistice.txt -text svneol=native#text/plain
res/cardsfolder/armor_of_faith.txt -text svneol=native#text/plain
res/cardsfolder/armor_sliver.txt -text svneol=native#text/plain
res/cardsfolder/armor_thrull.txt -text svneol=native#text/plain
res/cardsfolder/armored_ascension.txt -text svneol=native#text/plain
res/cardsfolder/armored_cancrix.txt -text svneol=native#text/plain
@@ -448,6 +449,7 @@ res/cardsfolder/barbary_apes.txt -text svneol=native#text/plain
res/cardsfolder/barbed_battlegear.txt -text svneol=native#text/plain
res/cardsfolder/barbed_lightning.txt svneol=native#text/plain
res/cardsfolder/barbed_sextant.txt -text svneol=native#text/plain
res/cardsfolder/barbed_sliver.txt -text svneol=native#text/plain
res/cardsfolder/barbtooth_wurm.txt -text svneol=native#text/plain
res/cardsfolder/bargain.txt -text svneol=native#text/plain
res/cardsfolder/barkhide_mauler.txt -text svneol=native#text/plain
@@ -1008,6 +1010,7 @@ res/cardsfolder/clock_of_omens.txt -text svneol=native#text/plain
res/cardsfolder/clockwork_gnomes.txt -text svneol=native#text/plain
res/cardsfolder/clone.txt -text svneol=native#text/plain
res/cardsfolder/close_quarters.txt -text svneol=native#text/plain
res/cardsfolder/clot_sliver.txt -text svneol=native#text/plain
res/cardsfolder/cloud_crusader.txt -text svneol=native#text/plain
res/cardsfolder/cloud_djinn.txt -text svneol=native#text/plain
res/cardsfolder/cloud_dragon.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,12 @@
Name:Armor Sliver
ManaCost:2 W
Types:Creature Sliver
Text:no text
PT:2/2
K:stPumpAll:Creature.Sliver:0/0/ABSVar=Pump:no Condition:All Sliver creatures have "2: This creature gets +0/+1 until end of turn."
SVar:Pump:AB$Pump | Cost$ 2 | NumDef$ +1 | SpellDescription$ CARDNAME gets +0/+1 until end of turn.
SVar:PlayMain1:TRUE
SVar:BuffedBy:Sliver
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/armor_sliver.jpg
End

View File

@@ -0,0 +1,12 @@
Name:Barbed Sliver
ManaCost:2 R
Types:Creature Sliver
Text:no text
PT:2/2
K:stPumpAll:Creature.Sliver:0/0/ABSVar=Pump:no Condition:All Sliver creatures have "2: This creature gets +1/+0 until end of turn."
SVar:Pump:AB$Pump | Cost$ 2 | NumAtt$ +1 | SpellDescription$ CARDNAME gets +0/+1 until end of turn.
SVar:PlayMain1:TRUE
SVar:BuffedBy:Sliver
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/barbed_sliver.jpg
End

View File

@@ -0,0 +1,12 @@
Name:Clot Sliver
ManaCost:1 B
Types:Creature Sliver
Text:no text
PT:1/1
K:stPumpAll:Sliver:0/0/ABSVar=Pump:no Condition:All Slivers have "2: Regenerate this permanent."
SVar:Pump:AB$Regenerate | Cost$ 2 | SpellDescription$ Regenerate CARDNAME.
SVar:PlayMain1:TRUE
SVar:BuffedBy:Sliver
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/clot_sliver.jpg
End

View File

@@ -5,7 +5,8 @@ Text:no text
K:CARDNAME enters the battlefield tapped.
A:AB$ Mana | Cost$ T | Produced$ R | SpellDescription$ Add R to your mana pool.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ When CARDNAME enters the battlefield, target creature can't block this turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | ValidTgts$ Creature | IsCurse$ True | KW$ CARDNAME can't block | TgtPrompt$ Select target creature.
SVar:TrigPump:AB$Pump | Cost$ 0 | ValidTgts$ Creature | IsCurse$ True | KW$ HIDDEN CARDNAME can't block | TgtPrompt$ Select target creature.
SVar:PlayMain1:TRUE
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/Smoldering_Spires.jpg
End

View File

@@ -3,7 +3,7 @@ ManaCost:4 B
Types:Creature Horror
Text:no text
PT:1/1
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Artifact | Execute$ TrigPump | TriggerDescription$ Whenever an artifact enters the battlefield, CARDNAME gets +4/+4 until end of turn.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Artifact | Execute$ TrigPump | TriggerZones$ Battlefield | TriggerDescription$ Whenever an artifact enters the battlefield, CARDNAME gets +4/+4 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | Defined$ Self | NumAtt$ 4 | NumDef$ 4
SVar:BuffedBy:Artifact
SVar:Rarity:Rare

View File

@@ -888,7 +888,7 @@ public class Card extends MyObservable {
String k[] = keyword.get(i).split(":");
sbLong.append(k[5]).append("\r\n");
} else if (keyword.get(i).toString().contains("stPump")) {
String k[] = keyword.get(i).split(":");
String k[] = keyword.get(i).split(":",5);
if (!k[4].contains("no text")) sbLong.append(k[4]).append("\r\n");
} else if (keyword.get(i).toString().contains("stSetPT")) {
String k[] = keyword.get(i).split(":");

View File

@@ -10290,7 +10290,7 @@ public class GameActionUtil {
//get the affected cards
String k[] = keyword.split(":");
String k[] = keyword.split(":",5);
if(SpecialConditionsMet(cardWithKeyword, k[3])) { //special Conditions are Threshold, etc.
@@ -10305,7 +10305,7 @@ public class GameActionUtil {
x = CardFactoryUtil.xCount(cardWithKeyword, cardWithKeyword.getSVar("X").split("\\$")[1]);
se.setXValue(x);
addStaticEffects(affectedCards,k[2],x); //give the boni to the affected cards
addStaticEffects(cardWithKeyword,affectedCards,k[2],x); //give the boni to the affected cards
storage.add(se); // store the information
}
@@ -10314,7 +10314,7 @@ public class GameActionUtil {
}
}// execute()
void addStaticEffects(CardList affectedCards, String Keyword_Details, int xValue) {
void addStaticEffects(Card source, CardList affectedCards, String Keyword_Details, int xValue) {
int powerbonus = 0;
int toughnessbonus = 0;
@@ -10336,25 +10336,34 @@ public class GameActionUtil {
if (Keyword.length > 2) {
String Keywords[] = Keyword[2].split(" & ");
for(int j = 0; j < Keywords.length; j++) {
affectedCard.addExtrinsicKeyword(Keywords[j]);
String keyword = Keywords[j];
if(keyword.startsWith("ABSVar=")) {
String ability = source.getSVar(keyword.split("SVar=")[1]);
AbilityFactory AF = new AbilityFactory();
SpellAbility sa = AF.getAbility(ability, affectedCard);
sa.setType("Temporary");
affectedCard.addSpellAbility(sa);
}
else affectedCard.addExtrinsicKeyword(keyword);
}
}
}
}
void removeStaticEffect(StaticEffect se) {
Card Source = se.getSource();
Card source = se.getSource();
CardList affected = se.getAffectedCards();
int KeywordNumber = se.getKeywordNumber();
int xValue = se.getXValue(); // the old xValue has to be removed, not the actual one!
String parse = Source.getKeyword().get(KeywordNumber).toString();
String parse = source.getKeyword().get(KeywordNumber).toString();
String k[] = parse.split(":");
for(int i = 0; i < affected.size(); i++) {
removeStaticEffect(affected.get(i),k,xValue);
removeStaticEffect(source, affected.get(i),k,xValue);
}
}
void removeStaticEffect(Card affectedCard, String[] Keyword_Details, int xValue) {
void removeStaticEffect(Card source, Card affectedCard, String[] Keyword_Details, int xValue) {
int powerbonus = 0;
int toughnessbonus = 0;
@@ -10374,7 +10383,16 @@ public class GameActionUtil {
if (Keyword.length > 2) {
String Keywords[] = Keyword[2].split(" & ");
for(int j = 0; j < Keywords.length; j++) {
affectedCard.removeExtrinsicKeyword(Keywords[j]);
String keyword = Keywords[j];
if(keyword.startsWith("ABSVar=")) {
SpellAbility[] spellAbility = affectedCard.getSpellAbility();
for(SpellAbility s : spellAbility)
{
if (s.getType().equals("Temporary"))
affectedCard.removeSpellAbility(s);
}
}
affectedCard.removeExtrinsicKeyword(keyword);
}
}
}

View File

@@ -383,6 +383,11 @@ public abstract class SpellAbility {
type = s;
}
public String getType() //Extrinsic or Intrinsic:
{
return type;
}
//setDescription() includes mana cost and everything like
//"G, tap: put target creature from your hand onto the battlefield"
public void setDescription(String s) {