mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Added attacking and blocking as restrictions to isValidCard.
- Added Mightstone and Weakstone.
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -2355,6 +2355,7 @@ res/cardsfolder/might_of_alara.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/might_of_oaks.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/might_of_the_masses.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/might_sliver.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/mightstone.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/mighty_leap.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/mikokoro_center_of_the_sea.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/millstone.txt -text svneol=native#text/plain
|
||||
@@ -4211,6 +4212,7 @@ res/cardsfolder/waveskimmer_aven.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/waylay.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/wayward_soul.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/weakness.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/weakstone.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/weathered_wayfarer.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/weatherseed_elf.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/weatherseed_faeries.txt -text svneol=native#text/plain
|
||||
|
||||
10
res/cardsfolder/mightstone.txt
Normal file
10
res/cardsfolder/mightstone.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Name:Mightstone
|
||||
ManaCost:4
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
K:stPumpAll:Creature.attacking:1/0:No Condition:Attacking creatures get +1/+0.
|
||||
SVar:PlayMain1:TRUE
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mightstone.jpg
|
||||
End
|
||||
10
res/cardsfolder/weakstone.txt
Normal file
10
res/cardsfolder/weakstone.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Name:Weakstone
|
||||
ManaCost:4
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
K:stPumpAll:Creature.attacking:-1/0:No Condition:Attacking creatures get -1/+0.
|
||||
SVar:PlayMain1:TRUE
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/weakstone.jpg
|
||||
End
|
||||
@@ -2311,6 +2311,10 @@ public class Card extends MyObservable {
|
||||
r = r && (y > x);
|
||||
}
|
||||
|
||||
else if (exR[j].startsWith("attacking")) r = r && isAttacking();
|
||||
|
||||
else if (exR[j].startsWith("blocking")) r = r && isBlocking();
|
||||
|
||||
//TODO: enchanting
|
||||
//TODO: counters
|
||||
else if(exR[j].startsWith("named")) //by name
|
||||
@@ -2359,4 +2363,16 @@ public class Card extends MyObservable {
|
||||
return CardUtil.getColors(this).contains(Constant.Color.White);
|
||||
}
|
||||
|
||||
public boolean isAttacking() {
|
||||
CardList attackers = new CardList(AllZone.Combat.getAttackers());
|
||||
attackers.addAll(AllZone.pwCombat.getAttackers());
|
||||
return attackers.contains(this);
|
||||
}
|
||||
|
||||
public boolean isBlocking() {
|
||||
CardList blockers = AllZone.Combat.getAllBlockers();
|
||||
blockers.add(AllZone.pwCombat.getAllBlockers());
|
||||
return blockers.contains(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user