mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Fixed max hand size.
This commit is contained in:
@@ -2,7 +2,7 @@ Name:Anvil of Bogardan
|
||||
ManaCost:2
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
S:Mode$ Continuous | Affected$ Player | SetMaxHandSize$ -1 | Description$ Players have no maximum hand size.
|
||||
S:Mode$ Continuous | Affected$ Player | SetMaxHandSize$ Unlimited | Description$ Players have no maximum hand size.
|
||||
T:Mode$ Phase | Phase$ Draw | ValidPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ At the beginning of each player's draw step, that player draws an additional card, then discards a card.
|
||||
SVar:TrigDraw:AB$ Draw | Cost$ 0 | NumCards$ 1 | Defined$ TriggeredPlayer | SubAbility$ DBDiscard
|
||||
SVar:DBDiscard:DB$Discard | Defined$ TriggeredPlayer | NumCards$ 1 | Mode$ TgtChoose
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:no cost
|
||||
Types:Vanguard
|
||||
Text:no text
|
||||
HandLifeModifier:-1/+1
|
||||
S:Mode$ Continuous | EffectZone$ Command | Affected$ You | SetMaxHandSize$ -1 | Description$ You have no maximum hand size.
|
||||
S:Mode$ Continuous | EffectZone$ Command | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size.
|
||||
A:AB$ Draw | ActivationZone$ Command | Cost$ 0 | NumCards$ 3 | Defined$ You | ActivationLimit$ 1 | SubAbility$ DBSkipTurn | SpellDescription$ Draw three cards. You skip your next turn. Activate this ability only once each turn.
|
||||
SVar:DBSkipTurn:DB$ AddTurn | NumTurns$ 1 | Defined$ Opponent
|
||||
SVar:RemAIDeck:True
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 U
|
||||
Types:Creature Human Wizard
|
||||
Text:no text
|
||||
PT:1/3
|
||||
S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ -1 | Description$ You have no maximum hand size.
|
||||
S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size.
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/graceful_adept.jpg
|
||||
SetInfo:CHK|Uncommon|http://magiccards.info/scans/en/chk/63.jpg
|
||||
|
||||
@@ -5,7 +5,7 @@ Text:no text
|
||||
A:SP$ ChangeZoneAll | Cost$ 5 G G G | Origin$ Graveyard | Destination$ Hand | ChangeType$ Card.YouOwn | SubAbility$ DBChange | SpellDescription$ Return all cards from your graveyard to your hand. Exile CARDNAME. You have no maximum hand size for the rest of the game.
|
||||
SVar:DBChange:DB$ChangeZone | Origin$ Stack | Destination$ Exile | SubAbility$ DBEffect
|
||||
SVar:DBEffect:DB$ Effect | Name$ Praetor's Counsel Effect | StaticAbilities$ STHandSize | Duration$ Permanent
|
||||
SVar:STHandSize:Mode$ Continuous | EffectZone$ Command | Affected$ You | SetMaxHandSize$ -1 | Description$ You have no maximum hand size.
|
||||
SVar:STHandSize:Mode$ Continuous | EffectZone$ Command | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size.
|
||||
SVar:Rarity:Mythic
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/praetors_counsel.jpg
|
||||
SetInfo:MBS|Mythic|http://magiccards.info/scans/en/mbs/88.jpg
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Reliquary Tower
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
Text:no text
|
||||
S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ -1 | Description$ You have no maximum hand size.
|
||||
S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size.
|
||||
A:AB$ Mana | Cost$ T | Produced$ 1 | SpellDescription$ Add 1 to your mana pool.
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/reliquary_tower.jpg
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Spellbook
|
||||
ManaCost:0
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ -1 | Description$ You have no maximum hand size.
|
||||
S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spellbook.jpg
|
||||
|
||||
@@ -8,7 +8,7 @@ SVar:TamiyoPump:DB$ Pump | Defined$ Targeted | Permanent$ True | KW$ HIDDEN This
|
||||
A:AB$ Draw | Cost$ SubCounter<2/LOYALTY> | ValidTgts$ Player | TgtPrompt$ Select target player | Defined$ You | NumCards$ X | References$ X | Planeswalker$ True | SpellDescription$ Draw a card for each tapped creature target player controls.
|
||||
SVar:X:Count$Valid Creature.tapped+TargetedPlayerCtrl
|
||||
A:AB$ Effect | Cost$ SubCounter<8/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Tamiyo, the Moon Sage emblem | Image$ tamiyo_the_moon_sage_emblem | StaticAbilities$ UnlimitedHand | Triggers$ TamiyoCardToGrave | SVars$ TamiyoReturn | Stackable$ False | Duration$ Permanent | AILogic$ Always | SpellDescription$ You get an emblem with "You have no maximum hand size" and "Whenever a card is put into your graveyard from anywhere, you may return it to your hand."
|
||||
SVar:UnlimitedHand:Mode$ Continuous | EffectZone$ Command | Affected$ You | SetMaxHandSize$ -1 | Description$ You have no maximum hand size.
|
||||
SVar:UnlimitedHand:Mode$ Continuous | EffectZone$ Command | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size.
|
||||
SVar:TamiyoCardToGrave:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Card.nonToken+YouCtrl | OptionalDecider$ You | Execute$ TamiyoReturn | TriggerDescription$ Whenever a card is put into your graveyard from anywhere, you may return it to your hand.
|
||||
SVar:TamiyoReturn:AB$ ChangeZone | Cost$ 0 | Defined$ TriggeredCard | Origin$ Graveyard | Destination$ Hand
|
||||
SVar:Rarity:Mythic
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Venser's Journal
|
||||
ManaCost:5
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ -1 | Description$ You have no maximum hand size.
|
||||
S:Mode$ Continuous | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size.
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGainLife | TriggerDescription$ At the beginning of your upkeep, you gain 1 life for each card in your hand.
|
||||
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | LifeAmount$ X | References$ X
|
||||
SVar:X:Count$InYourHand
|
||||
|
||||
@@ -159,6 +159,9 @@ public class StaticEffects {
|
||||
|
||||
// modify players
|
||||
for (final Player p : affectedPlayers) {
|
||||
p.setUnlimitedHandSize(false);
|
||||
p.setMaxHandSize(7);
|
||||
|
||||
if (params.containsKey("AddKeyword")) {
|
||||
addKeywords = params.get("AddKeyword").split(" & ");
|
||||
}
|
||||
|
||||
@@ -285,12 +285,16 @@ public class StaticAbilityContinuous {
|
||||
|
||||
if (params.containsKey("SetMaxHandSize")) {
|
||||
String mhs = params.get("SetMaxHandSize");
|
||||
if (mhs.equals("Unlimited")) {
|
||||
p.setUnlimitedHandSize(true);
|
||||
} else {
|
||||
int max = mhs.matches("[0-9][0-9]?") ? Integer.parseInt(mhs)
|
||||
: AbilityFactory.calculateAmount(hostCard, mhs, null);
|
||||
p.setMaxHandSize(max);
|
||||
}
|
||||
}
|
||||
|
||||
if (params.containsKey("RaiseMaxHandSize") && p.getMaxHandSize() != -1) {
|
||||
if (params.containsKey("RaiseMaxHandSize")) {
|
||||
String rmhs = params.get("RaiseMaxHandSize");
|
||||
int rmax = rmhs.matches("[0-9][0-9]?") ? Integer.parseInt(rmhs)
|
||||
: AbilityFactory.calculateAmount(hostCard, rmhs, null);
|
||||
|
||||
@@ -50,7 +50,7 @@ public class InputCleanup extends Input {
|
||||
final int n = active.getCardsIn(ZoneType.Hand).size();
|
||||
final int max = active.getMaxHandSize();
|
||||
// goes to the next phase
|
||||
if (n <= max || n <= 0) {
|
||||
if (active.isUnlimitedHandSize() || n <= max || n <= 0) {
|
||||
Singletons.getModel().getGame().getPhaseHandler().passPriority();
|
||||
return;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class InputCleanup extends Input {
|
||||
public void aiCleanupDiscard(final Player ai) {
|
||||
final int size = ai.getCardsIn(ZoneType.Hand).size();
|
||||
|
||||
if (ai.getMaxHandSize() != -1) {
|
||||
if (!ai.isUnlimitedHandSize()) {
|
||||
final int numDiscards = size - ai.getMaxHandSize();
|
||||
ai.discard(numDiscards, null);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import forge.CardPredicates;
|
||||
import forge.CardUtil;
|
||||
import forge.GameAction;
|
||||
import forge.Singletons;
|
||||
import forge.card.cardfactory.CardFactoryUtil;
|
||||
import forge.card.trigger.TriggerHandler;
|
||||
import forge.card.trigger.TriggerType;
|
||||
import forge.control.input.InputControl;
|
||||
@@ -34,7 +33,6 @@ import forge.game.player.Player;
|
||||
import forge.game.zone.PlayerZone;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.gui.match.views.VAntes;
|
||||
import forge.item.CardDb;
|
||||
import forge.item.CardPrinted;
|
||||
import forge.properties.ForgePreferences.FPref;
|
||||
import forge.util.Aggregates;
|
||||
|
||||
@@ -108,6 +108,9 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
|
||||
/** The max hand size. */
|
||||
private int maxHandSize = 7;
|
||||
|
||||
/** The unlimited hand size. */
|
||||
private boolean unlimitedHandSize = false;
|
||||
|
||||
/** The last drawn card. */
|
||||
private Card lastDrawnCard = null;
|
||||
|
||||
@@ -2520,6 +2523,21 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
|
||||
maxHandSize = size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the unlimitedHandSize
|
||||
*/
|
||||
public boolean isUnlimitedHandSize() {
|
||||
return unlimitedHandSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param unlimitedHandSize0 the unlimitedHandSize to set
|
||||
*/
|
||||
public void setUnlimitedHandSize(boolean unlimited) {
|
||||
this.unlimitedHandSize = unlimited;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>maxLandsToPlay</code>.
|
||||
|
||||
@@ -325,7 +325,7 @@ public class VField implements IVDoc<CField> {
|
||||
*/
|
||||
public void updateZones(final Player p0) {
|
||||
this.getLblHand().setText("" + p0.getZone(ZoneType.Hand).size());
|
||||
final String handMaxToolTip = p0.getMaxHandSize() < 0
|
||||
final String handMaxToolTip = p0.isUnlimitedHandSize()
|
||||
? "no maximum hand size" : String.valueOf(p0.getMaxHandSize());
|
||||
this.getLblHand().setToolTipText("Cards in hand (max: " + handMaxToolTip + ")");
|
||||
this.getLblGraveyard().setText("" + p0.getZone(ZoneType.Graveyard).size());
|
||||
|
||||
Reference in New Issue
Block a user