mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Add Ballot Broker, Borderland Explorer, Custodi Soulcaller, Illusion of Choice (CN2)
This commit is contained in:
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -2457,6 +2457,7 @@ forge-gui/res/cardsfolder/b/ball_lightning.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/b/ballista_charger.txt -text
|
||||
forge-gui/res/cardsfolder/b/ballista_squad.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/b/balloon_peddler.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/b/ballot_broker.txt -text
|
||||
forge-gui/res/cardsfolder/b/ballynock_cohort.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/b/ballynock_trapper.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/b/ballyrush_banneret.txt svneol=native#text/plain
|
||||
@@ -3053,6 +3054,7 @@ forge-gui/res/cardsfolder/b/borborygmos_enraged.txt -text
|
||||
forge-gui/res/cardsfolder/b/border_guard.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/b/border_patrol.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/b/borderland_behemoth.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/b/borderland_explorer.txt -text
|
||||
forge-gui/res/cardsfolder/b/borderland_marauder.txt -text
|
||||
forge-gui/res/cardsfolder/b/borderland_minotaur.txt -text
|
||||
forge-gui/res/cardsfolder/b/borderland_ranger.txt svneol=native#text/plain
|
||||
@@ -4442,6 +4444,7 @@ forge-gui/res/cardsfolder/c/curtain_of_light.txt -text
|
||||
forge-gui/res/cardsfolder/c/curtains_call.txt -text
|
||||
forge-gui/res/cardsfolder/c/custodi_lich.txt -text svneol=unset#text/plain
|
||||
forge-gui/res/cardsfolder/c/custodi_soulbinders.txt -text
|
||||
forge-gui/res/cardsfolder/c/custodi_soulcaller.txt -text
|
||||
forge-gui/res/cardsfolder/c/custodi_squire.txt -text
|
||||
forge-gui/res/cardsfolder/c/custodian_of_the_trove.txt -text
|
||||
forge-gui/res/cardsfolder/c/custody_battle.txt -text svneol=unset#text/plain
|
||||
@@ -8267,6 +8270,7 @@ forge-gui/res/cardsfolder/i/illuminate.txt -text
|
||||
forge-gui/res/cardsfolder/i/illuminated_folio.txt -text
|
||||
forge-gui/res/cardsfolder/i/illuminated_wings.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/i/illumination.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/i/illusion_of_choice.txt -text
|
||||
forge-gui/res/cardsfolder/i/illusion_reality.txt -text
|
||||
forge-gui/res/cardsfolder/i/illusionary_armor.txt -text
|
||||
forge-gui/res/cardsfolder/i/illusionary_forces.txt svneol=native#text/plain
|
||||
|
||||
@@ -1268,7 +1268,7 @@ public class AiController {
|
||||
|
||||
public int chooseNumber(SpellAbility sa, String title, int min, int max) {
|
||||
final Card source = sa.getHostCard();
|
||||
final String logic = sa.getParam("AILogic");
|
||||
final String logic = sa.getParamOrDefault("AILogic", "Max");
|
||||
if ("GainLife".equals(logic)) {
|
||||
if (player.getLife() < 5 || player.getCardsIn(ZoneType.Hand).size() >= player.getMaxHandSize()) {
|
||||
return min;
|
||||
|
||||
@@ -9,6 +9,8 @@ import forge.game.player.Player;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.zone.ZoneType;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class VoteAi extends SpellAbilityAi {
|
||||
/* (non-Javadoc)
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
@@ -41,4 +43,12 @@ public class VoteAi extends SpellAbilityAi {
|
||||
protected boolean doTriggerAINoCost(Player ai, SpellAbility sa, boolean mandatory) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int chooseNumber(Player player, SpellAbility sa, int min, int max, Map<String, Object> params) {
|
||||
if (sa.getActivatingPlayer().isOpponentOf(player)) {
|
||||
return min;
|
||||
}
|
||||
return max;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ public class EffectEffect extends SpellAbilityEffect {
|
||||
|
||||
final Player controller = sa.hasParam("EffectOwner") ? ownerEff : sa.getActivatingPlayer();
|
||||
final Card eff = new Card(game.nextCardId(), game);
|
||||
eff.setTimestamp(game.getNextTimestamp());
|
||||
eff.setName(name);
|
||||
// if name includes emplem then it should be one
|
||||
eff.addType(name.endsWith("emblem") ? "Emblem" : "Effect");
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
@@ -70,10 +71,48 @@ public class VoteEffect extends SpellAbilityEffect {
|
||||
}
|
||||
ListMultimap<Object, Player> votes = ArrayListMultimap.create();
|
||||
|
||||
Player voter = null;
|
||||
|
||||
List<Player> voters = game.getPlayers().filter(new Predicate<Player>() {
|
||||
@Override
|
||||
public boolean apply(Player input) {
|
||||
return input.hasKeyword("You choose how each player votes this turn.");
|
||||
}
|
||||
});
|
||||
|
||||
if (voters.size() > 1) {
|
||||
long latestTimestamp = -1;
|
||||
for(Player p : voters) {
|
||||
List<Card> illusions = CardLists.filter(p.getCardsIn(ZoneType.Command), new Predicate<Card>() {
|
||||
@Override
|
||||
public boolean apply(Card input) {
|
||||
return input.getName().equals("Illusion of Choice Effect");
|
||||
}
|
||||
});
|
||||
for(Card illusion : illusions) {
|
||||
if (illusion.getTimestamp() > latestTimestamp) {
|
||||
latestTimestamp = illusion.getTimestamp();
|
||||
voter = p;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (voters.size() == 1) {
|
||||
voter = voters.get(0);
|
||||
}
|
||||
|
||||
for (final Player p : tgtPlayers) {
|
||||
int voteAmount = p.getKeywords().getAmount("You get an additional vote.") + 1;
|
||||
int optionalVotes = p.getKeywords().getAmount("You may vote an additional time.");
|
||||
voteAmount += p.getController().chooseNumber(sa, "How many additional votes do you want?", 0, optionalVotes);
|
||||
|
||||
for (int i = 0; i < voteAmount; i++) {
|
||||
final Object result = p.getController().vote(sa, host + "Vote:", voteType, votes);
|
||||
Object result;
|
||||
if (voter == null) {
|
||||
result = p.getController().vote(sa, host + "Vote:", voteType, votes);
|
||||
} else {
|
||||
result = voter.getController().vote(sa, host + "Vote:", voteType, votes);
|
||||
}
|
||||
|
||||
votes.put(result, p);
|
||||
host.getGame().getAction().nofityOfValue(sa, p, result + "\r\nCurrent Votes:" + votes, p);
|
||||
}
|
||||
|
||||
6
forge-gui/res/cardsfolder/b/ballot_broker.txt
Normal file
6
forge-gui/res/cardsfolder/b/ballot_broker.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Name:Ballot Broker
|
||||
ManaCost:2 W
|
||||
Types:Creature Human Advisor
|
||||
PT:2/3
|
||||
S:Mode$ Continuous | Affected$ You | AddKeyword$ You may vote an additional time. | Description$ While voting, you may vote an additional time. (The votes can be for different choices or for the same choice.)
|
||||
Oracle:While voting, you may vote an additional time. (The votes can be for different choices or for the same choice.)
|
||||
8
forge-gui/res/cardsfolder/b/borderland_explorer.txt
Normal file
8
forge-gui/res/cardsfolder/b/borderland_explorer.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Borderland Explorer
|
||||
ManaCost:1 G
|
||||
Types:Creature Elf Scout
|
||||
PT:3/1
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExploration | TriggerDescription$ When CARDNAME enters the battlefield, each player may discard a card. Each player who discarded a card this way may search his or her library for a basic land card, reveal it, put it into his or her hand, then shuffle his or her library.
|
||||
SVar:TrigExploration:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBDiscardToFetch
|
||||
SVar:DBDiscardToFetch:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Land.Basic | DefinedPlayer$ Player.IsRemembered | UnlessCost$ Discard<1/Card> | UnlessPayer$ Player.IsRemembered | UnlessSwitched$ True
|
||||
Oracle:When Borderland Explorer enters the battlefield, each player may discard a card. Each player who discarded a card this way may search his or her library for a basic land card, reveal it, put it into his or her hand, then shuffle his or her library.
|
||||
9
forge-gui/res/cardsfolder/c/custodi_soulcaller.txt
Normal file
9
forge-gui/res/cardsfolder/c/custodi_soulcaller.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Custodi Soulcaller
|
||||
ManaCost:1 W W
|
||||
Types:Creature Human Cleric
|
||||
PT:1/2
|
||||
K:Melee
|
||||
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigSoulcall | TriggerDescription$ Whenever CARDNAME attacks, return target creature card with converted mana cost X or less from your graveyard to the battlefield, where X is the number of players you attacked with a creature this combat
|
||||
SVar:TrigSoulcall:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouCtrl+cmcLEX
|
||||
SVar:X:TriggeredPlayersDefenders$Amount
|
||||
Oracle:Whenever Custodi Soulcaller attacks, return target creature card with converted mana cost X or less from your graveyard to the battlefield, where X is the number of players you attacked with a creature this combat
|
||||
7
forge-gui/res/cardsfolder/i/illusion_of_choice.txt
Normal file
7
forge-gui/res/cardsfolder/i/illusion_of_choice.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Name:Illusion of Choice
|
||||
ManaCost:U
|
||||
Types:Instant
|
||||
A:SP$ Effect | Cost$ U | Name$ Illusion of Choice Effect | StaticAbilities$ STVoter | SubAbilities$ DBDraw | SpellDescription$ You choose how each player votes this turn. Draw a card.
|
||||
SVar:DBDraw:DB$ Draw | NumCards$ 1
|
||||
SVar:STVoter:Mode$ Continuous | EffectZone$ Command | Affected$ You | AddKeyword$ You choose how each player votes this turn.
|
||||
SVar:RemAIDeck:True
|
||||
Reference in New Issue
Block a user