mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Experimental Frenzy
This commit is contained in:
@@ -39,51 +39,8 @@ public class LandAbility extends Ability {
|
|||||||
public boolean canPlay() {
|
public boolean canPlay() {
|
||||||
final Card land = this.getHostCard();
|
final Card land = this.getHostCard();
|
||||||
final Player p = this.getActivatingPlayer();
|
final Player p = this.getActivatingPlayer();
|
||||||
final Game game = p.getGame();
|
|
||||||
if (!p.canCastSorcery()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// CantBeCast static abilities
|
return p.canPlayLand(land);
|
||||||
for (final Card ca : game.getCardsIn(ZoneType.listValueOf("Battlefield,Command"))) {
|
|
||||||
final Iterable<StaticAbility> staticAbilities = ca.getStaticAbilities();
|
|
||||||
for (final StaticAbility stAb : staticAbilities) {
|
|
||||||
if (stAb.applyAbility("CantPlayLand", land, this)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (land != null) {
|
|
||||||
final boolean mayPlay = getMayPlay() != null;
|
|
||||||
if (land.getOwner() != p && !mayPlay) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
final Zone zone = game.getZoneOf(land);
|
|
||||||
if (zone != null && (zone.is(ZoneType.Battlefield) || (!zone.is(ZoneType.Hand) && !mayPlay))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// **** Check for land play limit per turn ****
|
|
||||||
// Dev Mode
|
|
||||||
if (p.getController().canPlayUnlimitedLands() || p.hasKeyword("You may play any number of additional lands on each of your turns.")) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check for adjusted max lands play per turn
|
|
||||||
int adjMax = 1;
|
|
||||||
for (String keyword : p.getKeywords()) {
|
|
||||||
if (keyword.startsWith("AdjustLandPlays")) {
|
|
||||||
final String[] k = keyword.split(":");
|
|
||||||
adjMax += Integer.valueOf(k[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (p.getLandsPlayedThisTurn() < adjMax) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
|
|||||||
@@ -160,6 +160,14 @@ public class StaticAbilityCantBeCast {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params.containsKey("Origin")) {
|
||||||
|
List<ZoneType> src = ZoneType.listValueOf(params.get("Origin"));
|
||||||
|
|
||||||
|
if (!src.contains(card.getZone().getZoneType())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (params.containsKey("Player") && (player != null)
|
if (params.containsKey("Player") && (player != null)
|
||||||
&& !player.isValid(params.get("Player"), hostCard.getController(), hostCard, null)) {
|
&& !player.isValid(params.get("Player"), hostCard.getController(), hostCard, null)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
10
forge-gui/res/cardsfolder/upcoming/experimental_frenzy.txt
Normal file
10
forge-gui/res/cardsfolder/upcoming/experimental_frenzy.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Name:Experimental Frenzy
|
||||||
|
ManaCost:3 R
|
||||||
|
Types:Enchantment
|
||||||
|
S:Mode$ Continuous | Affected$ Card.TopLibrary+YouCtrl | AffectedZone$ Library | MayLookAt$ Player | Description$ You may look at the top card of your library any time.
|
||||||
|
S:Mode$ Continuous | Affected$ Card.TopLibrary+YouCtrl | AffectedZone$ Library | MayPlay$ True | Description$ You may play the top card of your library.
|
||||||
|
S:Mode$ CantPlayLand | Player$ You | Origin$ Hand | Description$ You can't play lands from your hand.
|
||||||
|
S:Mode$ CantBeCast | ValidCard$ Card | Caster$ You | Origin$ Hand | Description$ You can't play cards from your hand.
|
||||||
|
SVar:NonStackingEffect:True
|
||||||
|
A:AB$ Destroy | Cost$ 3 R | Defined$ Self | SpellDescription$ Destroy CARDNAME.
|
||||||
|
Oracle:You may look at the top card of your library any time.\nYou may play the top card of your library.\nYou can't play cards from your hand.\n{3}{R}: Destroy Experimental Frenzy.
|
||||||
Reference in New Issue
Block a user