mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Added Hankyu
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -4818,6 +4818,7 @@ res/cardsfolder/h/hand_of_justice.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/h/hand_of_the_praetors.txt svneol=native#text/plain
|
res/cardsfolder/h/hand_of_the_praetors.txt svneol=native#text/plain
|
||||||
res/cardsfolder/h/hand_to_hand.txt -text
|
res/cardsfolder/h/hand_to_hand.txt -text
|
||||||
res/cardsfolder/h/hands_of_binding.txt -text
|
res/cardsfolder/h/hands_of_binding.txt -text
|
||||||
|
res/cardsfolder/h/hankyu.txt -text
|
||||||
res/cardsfolder/h/hanna.txt -text
|
res/cardsfolder/h/hanna.txt -text
|
||||||
res/cardsfolder/h/hanna_ships_navigator.txt svneol=native#text/plain
|
res/cardsfolder/h/hanna_ships_navigator.txt svneol=native#text/plain
|
||||||
res/cardsfolder/h/hannas_custody.txt svneol=native#text/plain
|
res/cardsfolder/h/hannas_custody.txt svneol=native#text/plain
|
||||||
|
|||||||
11
res/cardsfolder/h/hankyu.txt
Normal file
11
res/cardsfolder/h/hankyu.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Name:Hankyu
|
||||||
|
ManaCost:1
|
||||||
|
Types:Artifact Equipment
|
||||||
|
K:Equip 4
|
||||||
|
S:Mode$ Continuous | Affected$ Card.EquippedBy | AddAbility$ HankyuPutCounter & HankyuDmg | AddSVar$ HankyuX | Description$ Equipped creature has "Tap: Put an aim counter on CARDNAME" and "Tap, Remove all aim counters from CARDNAME: This creature deals damage to target creature or player equal to the number of aim counters removed this way."
|
||||||
|
SVar:HankyuPutCounter:AB$ PutCounter | Cost$ T | CounterType$ AIM | CounterNum$ 1 | Defined$ OriginalHost | SpellDescription$ Put an aim counter on Hankyu.
|
||||||
|
SVar:HankyuDmg:AB$ DealDamage | Cost$ T SubCounter<All/AIM/OriginalHost/Hankyu> | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ HankyuX | References$ HankyuX | SpellDescription$ CARDNAME deals damage to target creature or player equal to the number of aim counters removed this way.
|
||||||
|
SVar:HankyuX:SVar$CostCountersRemoved
|
||||||
|
SVar:RemAIDeck:True
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/hankyu.jpg
|
||||||
|
Oracle:Equipped creature has "{T}: Put an aim counter on Hankyu" and "{T}, Remove all aim counters from Hankyu: This creature deals damage to target creature or player equal to the number of aim counters removed this way."\nEquip {4} ({4}: Attach to target creature you control. Equip only as a sorcery.)
|
||||||
@@ -22,6 +22,8 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
import forge.CardLists;
|
import forge.CardLists;
|
||||||
import forge.CounterType;
|
import forge.CounterType;
|
||||||
@@ -119,6 +121,8 @@ public class CostRemoveCounter extends CostPartWithList {
|
|||||||
final String amount = this.getAmount();
|
final String amount = this.getAmount();
|
||||||
final Card source = ability.getSourceCard();
|
final Card source = ability.getSourceCard();
|
||||||
Integer c = this.convertAmount();
|
Integer c = this.convertAmount();
|
||||||
|
final String type = this.getType();
|
||||||
|
final Player activator = ability.getActivatingPlayer();
|
||||||
|
|
||||||
String sVarAmount = ability.getSVar(amount);
|
String sVarAmount = ability.getSVar(amount);
|
||||||
cntRemoved = 1;
|
cntRemoved = 1;
|
||||||
@@ -142,10 +146,20 @@ public class CostRemoveCounter extends CostPartWithList {
|
|||||||
source.setSVar("CostCountersRemoved", Integer.toString(cntRemoved));
|
source.setSVar("CostCountersRemoved", Integer.toString(cntRemoved));
|
||||||
executePayment(ability, source);
|
executePayment(ability, source);
|
||||||
return true;
|
return true;
|
||||||
|
} else if (type.equals("OriginalHost")) {
|
||||||
|
int maxCounters = ability.getOriginalHost().getCounters(this.counter);
|
||||||
|
if (amount.equals("All")) {
|
||||||
|
cntRemoved = maxCounters;
|
||||||
|
}
|
||||||
|
if (maxCounters < cntRemoved)
|
||||||
|
return false;
|
||||||
|
cntRemoved = cntRemoved >= 0 ? cntRemoved : maxCounters;
|
||||||
|
source.setSVar("CostCountersRemoved", Integer.toString(cntRemoved));
|
||||||
|
executePayment(ability, ability.getOriginalHost());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<Card> validCards = CardLists.getValidCards(activator.getCardsIn(getZone()), type.split(";"), activator, source);
|
||||||
List<Card> validCards = CardLists.getValidCards(ability.getActivatingPlayer().getCardsIn(getZone()), getType().split(";"), ability.getActivatingPlayer(), source);
|
|
||||||
if (this.getZone().equals(ZoneType.Battlefield)) {
|
if (this.getZone().equals(ZoneType.Battlefield)) {
|
||||||
final InputSelectCardToRemoveCounter inp = new InputSelectCardToRemoveCounter(cntRemoved, getCounter(), validCards);
|
final InputSelectCardToRemoveCounter inp = new InputSelectCardToRemoveCounter(cntRemoved, getCounter(), validCards);
|
||||||
inp.setMessage("Remove %d " + getCounter().getName() + " counters from " + getDescriptiveType());
|
inp.setMessage("Remove %d " + getCounter().getName() + " counters from " + getDescriptiveType());
|
||||||
@@ -291,6 +305,7 @@ public class CostRemoveCounter extends CostPartWithList {
|
|||||||
final CounterType cntrs = this.getCounter();
|
final CounterType cntrs = this.getCounter();
|
||||||
final Player activator = ability.getActivatingPlayer();
|
final Player activator = ability.getActivatingPlayer();
|
||||||
final Card source = ability.getSourceCard();
|
final Card source = ability.getSourceCard();
|
||||||
|
final String type = this.getType();
|
||||||
|
|
||||||
final Integer amount = this.convertAmount();
|
final Integer amount = this.convertAmount();
|
||||||
if (this.payCostFromSource()) {
|
if (this.payCostFromSource()) {
|
||||||
@@ -299,7 +314,12 @@ public class CostRemoveCounter extends CostPartWithList {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final List<Card> typeList = CardLists.getValidCards(activator.getCardsIn(this.getZone()), this.getType().split(";"), activator, source);
|
List<Card> typeList;
|
||||||
|
if (type.equals("OriginalHost")) {
|
||||||
|
typeList = Lists.newArrayList(ability.getOriginalHost());
|
||||||
|
} else {
|
||||||
|
typeList = CardLists.getValidCards(activator.getCardsIn(this.getZone()), type.split(";"), activator, source);
|
||||||
|
}
|
||||||
if (amount != null) {
|
if (amount != null) {
|
||||||
for (Card c : typeList) {
|
for (Card c : typeList) {
|
||||||
if (c.getCounters(cntrs) - amount >= 0) {
|
if (c.getCounters(cntrs) - amount >= 0) {
|
||||||
@@ -359,7 +379,7 @@ public class CostRemoveCounter extends CostPartWithList {
|
|||||||
public PaymentDecision decideAIPayment(Player ai, SpellAbility ability, Card source) {
|
public PaymentDecision decideAIPayment(Player ai, SpellAbility ability, Card source) {
|
||||||
final String amount = this.getAmount();
|
final String amount = this.getAmount();
|
||||||
Integer c = this.convertAmount();
|
Integer c = this.convertAmount();
|
||||||
|
final String type = this.getType();
|
||||||
|
|
||||||
if (c == null) {
|
if (c == null) {
|
||||||
final String sVar = ability.getSVar(amount);
|
final String sVar = ability.getSVar(amount);
|
||||||
@@ -374,8 +394,12 @@ public class CostRemoveCounter extends CostPartWithList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this.payCostFromSource()) {
|
if (!this.payCostFromSource()) {
|
||||||
final List<Card> typeList =
|
List<Card> typeList;
|
||||||
CardLists.getValidCards(ai.getCardsIn(this.getZone()), this.getType().split(";"), ai, source);
|
if (type.equals("OriginalHost")) {
|
||||||
|
typeList = Lists.newArrayList(ability.getOriginalHost());
|
||||||
|
} else {
|
||||||
|
typeList = CardLists.getValidCards(ai.getCardsIn(this.getZone()), type.split(";"), ai, source);
|
||||||
|
}
|
||||||
for (Card card : typeList) {
|
for (Card card : typeList) {
|
||||||
if (card.getCounters(this.getCounter()) >= c) {
|
if (card.getCounters(this.getCounter()) >= c) {
|
||||||
return new PaymentDecision(card);
|
return new PaymentDecision(card);
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ public class StaticAbilityContinuous {
|
|||||||
for (final String sVar : addSVars) {
|
for (final String sVar : addSVars) {
|
||||||
String actualSVar = hostCard.getSVar(sVar);
|
String actualSVar = hostCard.getSVar(sVar);
|
||||||
String name = sVar;
|
String name = sVar;
|
||||||
if (actualSVar.startsWith("SVar")) {
|
if (actualSVar.startsWith("SVar:")) {
|
||||||
actualSVar = actualSVar.split("SVar:")[1];
|
actualSVar = actualSVar.split("SVar:")[1];
|
||||||
name = actualSVar.split(":")[0];
|
name = actualSVar.split(":")[0];
|
||||||
actualSVar = actualSVar.split(":")[1];
|
actualSVar = actualSVar.split(":")[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user