mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Convert Thrummingbird to Trigger
- Removed unused Proliferate functions - Switching Proliferate to use the Cancel button so you don't accidentally space through your Proliferate
This commit is contained in:
@@ -4,7 +4,8 @@ Types:Creature Bird Horror
|
|||||||
Text:no text
|
Text:no text
|
||||||
PT:1/1
|
PT:1/1
|
||||||
K:Flying
|
K:Flying
|
||||||
K:Whenever CARDNAME deals combat damage to a player, proliferate.
|
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigProliferate | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, proliferate.
|
||||||
|
SVar:TrigProliferate:AB$Proliferate | Cost$ 0
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/thrummingbird.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/thrummingbird.jpg
|
||||||
SetInfo:SOM|Uncommon|http://magiccards.info/scans/en/som/47.jpg
|
SetInfo:SOM|Uncommon|http://magiccards.info/scans/en/som/47.jpg
|
||||||
|
|||||||
@@ -907,12 +907,12 @@ public class AbilityFactory_Counters {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showMessage() {
|
public void showMessage() {
|
||||||
|
ButtonUtil.enableOnlyCancel();
|
||||||
AllZone.Display.showMessage("Proliferate: Choose permanents and/or players");
|
AllZone.Display.showMessage("Proliferate: Choose permanents and/or players");
|
||||||
ButtonUtil.enableOnlyOK();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void selectButtonOK() {
|
public void selectButtonCancel() {
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3494,180 +3494,6 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void proliferate(final Card c, String cost)
|
|
||||||
{
|
|
||||||
Ability p = getProliferateAbility(c, cost);
|
|
||||||
AllZone.Stack.add(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Ability getProliferateAbility(final Card c, final String cost)
|
|
||||||
{
|
|
||||||
final Ability ability = new Ability(c, cost)
|
|
||||||
{
|
|
||||||
public void resolve()
|
|
||||||
{
|
|
||||||
CardList hperms = AllZoneUtil.getPlayerCardsInPlay(AllZone.HumanPlayer);
|
|
||||||
hperms = hperms.filter(new CardListFilter(){
|
|
||||||
public boolean addCard(Card crd)
|
|
||||||
{
|
|
||||||
return !crd.getName().equals("Mana Pool") /*&& crd.hasCounters()*/;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
CardList cperms = AllZoneUtil.getPlayerCardsInPlay(AllZone.ComputerPlayer);
|
|
||||||
cperms = cperms.filter(new CardListFilter(){
|
|
||||||
public boolean addCard(Card crd)
|
|
||||||
{
|
|
||||||
return !crd.getName().equals("Mana Pool") /*&& crd.hasCounters()*/;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (c.getController().equals(AllZone.HumanPlayer))
|
|
||||||
{
|
|
||||||
cperms.addAll(hperms.toArray());
|
|
||||||
final CardList unchosen = cperms;
|
|
||||||
AllZone.InputControl.setInput(new Input() {
|
|
||||||
private static final long serialVersionUID = -1779224307654698954L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void showMessage() {
|
|
||||||
AllZone.Display.showMessage("Choose permanents and/or players");
|
|
||||||
ButtonUtil.enableOnlyOK();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectButtonOK() {
|
|
||||||
stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectCard(Card card, PlayerZone zone)
|
|
||||||
{
|
|
||||||
if(!unchosen.contains(card)) return;
|
|
||||||
unchosen.remove(card);
|
|
||||||
ArrayList<String> choices = new ArrayList<String>();
|
|
||||||
for(Counters c_1:Counters.values())
|
|
||||||
if(card.getCounters(c_1) != 0) choices.add(c_1.getName());
|
|
||||||
if (choices.size() > 0)
|
|
||||||
card.addCounter(Counters.getType((choices.size() == 1 ? choices.get(0) : GuiUtils.getChoice("Select counter type", choices.toArray()).toString())), 1);
|
|
||||||
}
|
|
||||||
boolean selComputer = false;
|
|
||||||
boolean selHuman = false;
|
|
||||||
@Override
|
|
||||||
public void selectPlayer(Player player){
|
|
||||||
if (player.equals(AllZone.HumanPlayer) && selHuman == false)
|
|
||||||
{
|
|
||||||
selHuman = true;
|
|
||||||
if (AllZone.HumanPlayer.getPoisonCounters() > 0)
|
|
||||||
AllZone.HumanPlayer.addPoisonCounters(1);
|
|
||||||
}
|
|
||||||
if (player.equals(AllZone.ComputerPlayer) && selComputer == false)
|
|
||||||
{
|
|
||||||
selComputer = true;
|
|
||||||
if (AllZone.ComputerPlayer.getPoisonCounters() > 0)
|
|
||||||
AllZone.ComputerPlayer.addPoisonCounters(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else //comp
|
|
||||||
{
|
|
||||||
cperms = cperms.filter(new CardListFilter(){
|
|
||||||
public boolean addCard(Card crd)
|
|
||||||
{
|
|
||||||
int pos = 0;
|
|
||||||
int neg = 0;
|
|
||||||
for(Counters c_1:Counters.values()) {
|
|
||||||
if(crd.getCounters(c_1) != 0)
|
|
||||||
{
|
|
||||||
if (CardFactoryUtil.isNegativeCounter(c_1))
|
|
||||||
neg++;
|
|
||||||
else
|
|
||||||
pos++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return pos > neg;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
hperms = hperms.filter(new CardListFilter(){
|
|
||||||
public boolean addCard(Card crd)
|
|
||||||
{
|
|
||||||
int pos = 0;
|
|
||||||
int neg = 0;
|
|
||||||
for(Counters c_1:Counters.values()) {
|
|
||||||
if(crd.getCounters(c_1) != 0)
|
|
||||||
{
|
|
||||||
if (CardFactoryUtil.isNegativeCounter(c_1))
|
|
||||||
neg++;
|
|
||||||
else
|
|
||||||
pos++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return pos < neg;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("<html>Proliferate: <br>Computer selects ");
|
|
||||||
if (cperms.size() == 0 && hperms.size() == 0 && AllZone.HumanPlayer.getPoisonCounters() == 0)
|
|
||||||
sb.append("<b>nothing</b>.");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (cperms.size()>0) {
|
|
||||||
sb.append("<br>From Computer's permanents: <br><b>");
|
|
||||||
for (Card c:cperms)
|
|
||||||
{
|
|
||||||
sb.append(c);
|
|
||||||
sb.append(" ");
|
|
||||||
}
|
|
||||||
sb.append("</b><br>");
|
|
||||||
}
|
|
||||||
if (hperms.size()>0) {
|
|
||||||
sb.append("<br>From Human's permanents: <br><b>");
|
|
||||||
for (Card c:cperms)
|
|
||||||
{
|
|
||||||
sb.append(c);
|
|
||||||
sb.append(" ");
|
|
||||||
}
|
|
||||||
sb.append("</b><br>");
|
|
||||||
}
|
|
||||||
if (AllZone.HumanPlayer.getPoisonCounters() > 0)
|
|
||||||
sb.append("<b>Human Player</b>.");
|
|
||||||
}//else
|
|
||||||
sb.append("</html>");
|
|
||||||
|
|
||||||
|
|
||||||
//add a counter for each counter type, if it would benefit the computer
|
|
||||||
for (Card c:cperms)
|
|
||||||
{
|
|
||||||
for(Counters c_1:Counters.values())
|
|
||||||
if(c.getCounters(c_1) != 0) c.addCounter(c_1, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
//add a counter for each counter type, if it would screw over the player
|
|
||||||
for (Card c:hperms)
|
|
||||||
{
|
|
||||||
for(Counters c_1:Counters.values())
|
|
||||||
if(c.getCounters(c_1) != 0) c.addCounter(c_1, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
//give human a poison counter, if he has one
|
|
||||||
if (AllZone.HumanPlayer.getPoisonCounters() > 0)
|
|
||||||
AllZone.HumanPlayer.addPoisonCounters(1);
|
|
||||||
|
|
||||||
} //comp
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(c).append(" - Proliferate (You choose any number of permanents and/or players with ");
|
|
||||||
sb.append("counters on them, then give each another counter of a kind already there.)");
|
|
||||||
ability.setStackDescription(sb.toString());
|
|
||||||
|
|
||||||
return ability;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
GameAction gameAction = new GameAction();
|
GameAction gameAction = new GameAction();
|
||||||
GenerateConstructedDeck gen = new GenerateConstructedDeck();
|
GenerateConstructedDeck gen = new GenerateConstructedDeck();
|
||||||
|
|||||||
@@ -4675,9 +4675,6 @@ public class GameActionUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.getKeyword().contains("Whenever CARDNAME deals combat damage to a player, proliferate."))
|
|
||||||
AllZone.GameAction.proliferate(c, "0");
|
|
||||||
|
|
||||||
if(CardFactoryUtil.hasNumberEquipments(c, "Mask of Riddles") > 0 && c.getNetAttack() > 0) {
|
if(CardFactoryUtil.hasNumberEquipments(c, "Mask of Riddles") > 0 && c.getNetAttack() > 0) {
|
||||||
for(int k = 0; k < CardFactoryUtil.hasNumberEquipments(c, "Mask of Riddles"); k++) {
|
for(int k = 0; k < CardFactoryUtil.hasNumberEquipments(c, "Mask of Riddles"); k++) {
|
||||||
playerCombatDamage_May_draw(c);
|
playerCombatDamage_May_draw(c);
|
||||||
|
|||||||
@@ -671,9 +671,6 @@ public class MagicStack extends MyObservable {
|
|||||||
if (sa.getSourceCard().getKeyword().contains("Draw a card at the beginning of the next turn's upkeep."))
|
if (sa.getSourceCard().getKeyword().contains("Draw a card at the beginning of the next turn's upkeep."))
|
||||||
sa.getSourceCard().getController().addSlowtripList(sa.getSourceCard());
|
sa.getSourceCard().getController().addSlowtripList(sa.getSourceCard());
|
||||||
|
|
||||||
if (sa.getSourceCard().getKeyword().contains("Proliferate"))
|
|
||||||
AllZone.GameAction.getProliferateAbility(sa.getSourceCard(), "0").resolve();
|
|
||||||
|
|
||||||
for (int i = 0; i < sa.getSourceCard().getKeyword().size(); i++) {
|
for (int i = 0; i < sa.getSourceCard().getKeyword().size(); i++) {
|
||||||
String k = sa.getSourceCard().getKeyword().get(i);
|
String k = sa.getSourceCard().getKeyword().get(i);
|
||||||
if (k.startsWith("Scry")) {
|
if (k.startsWith("Scry")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user