mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Converted Black Vise for multiplayer
This commit is contained in:
@@ -3,9 +3,9 @@ ManaCost:1
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseP | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose an opponent.
|
||||
SVar:ChooseP:AB$ ChoosePlayer | Cost$ 0 | Defined$ You | Choices$ Opponent | AILogic$ Curse
|
||||
SVar:ChooseP:AB$ ChoosePlayer | Cost$ 0 | Defined$ You | Choices$ Player.Opponent | ChoiceTitle$ Choose an opponent | AILogic$ Curse
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player.Chosen | TriggerZones$ Battlefield | Execute$ TrigDamage | TriggerDescription$ At the beginning of the chosen player's upkeep, CARDNAME deals X damage to that player, where X is the number of cards in his or her hand minus 4.
|
||||
SVar:TrigDamage:AB$DealDamage | Cost$ 0 | Defined$ ChosenPlayer | NumDmg$ X | References$ X
|
||||
SVar:TrigDamage:AB$ DealDamage | Cost$ 0 | Defined$ ChosenPlayer | NumDmg$ X | References$ X
|
||||
SVar:X:Count$InChosenHand/Minus.4
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/black_vise.jpg
|
||||
|
||||
@@ -2063,6 +2063,12 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.chosenPlayer != null) {
|
||||
sb.append("\r\n[Chosen player: ");
|
||||
sb.append(this.getChosenPlayer());
|
||||
sb.append("]\r\n");
|
||||
}
|
||||
|
||||
if (this.hauntedBy.size() != 0) {
|
||||
sb.append("Haunted by: ");
|
||||
for (final Card c : this.hauntedBy) {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ChoosePlayerEffect extends SpellEffect {
|
||||
|
||||
final Target tgt = sa.getTarget();
|
||||
|
||||
final ArrayList<Player> choices = sa.hasParam("Choices") ? AbilityFactory.getDefinedPlayers(
|
||||
final List<Player> choices = sa.hasParam("Choices") ? AbilityFactory.getDefinedPlayers(
|
||||
sa.getSourceCard(), sa.getParam("Choices"), sa) : new ArrayList<Player>(Singletons.getModel().getGame().getPlayers());
|
||||
|
||||
final String choiceDesc = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") : "Choose a player";
|
||||
@@ -55,7 +55,19 @@ public class ChoosePlayerEffect extends SpellEffect {
|
||||
} else {
|
||||
if (sa.hasParam("AILogic")) {
|
||||
if (sa.getParam("AILogic").equals("Curse")) {
|
||||
card.setChosenPlayer(p.getOpponent());
|
||||
int curseChoice;
|
||||
for (curseChoice = 0; curseChoice < choices.size(); curseChoice++) {
|
||||
System.out.println("Current player iterated: " + choices.get(curseChoice));
|
||||
if (choices.get(curseChoice).isHostileTo(p)) {
|
||||
card.setChosenPlayer(choices.get(curseChoice));
|
||||
System.out.println("Set chosen player to " + card.getChosenPlayer());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (card.getChosenPlayer() == null) {
|
||||
System.out.println("No good curse choices. Picking first available: " + choices.get(0));
|
||||
card.setChosenPlayer(choices.get(0));
|
||||
}
|
||||
} else {
|
||||
card.setChosenPlayer(p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user