Unfolding more cards from unnecessary (I hope) CostToEffect wrappers
This commit is contained in:
@@ -324,18 +324,15 @@
|
||||
{
|
||||
type: optional
|
||||
text: Would you like to discard Forewarned to discard {revealedCard}?
|
||||
cost: {
|
||||
type: discard
|
||||
select: self
|
||||
}
|
||||
effect: {
|
||||
type: costToEffect
|
||||
cost: {
|
||||
type: discard
|
||||
select: self
|
||||
}
|
||||
effect: {
|
||||
type: discardCardsFromDrawDeck
|
||||
select: memory(revealedCard)
|
||||
showAll: false
|
||||
shuffle: false
|
||||
}
|
||||
type: discardCardsFromDrawDeck
|
||||
select: memory(revealedCard)
|
||||
showAll: false
|
||||
shuffle: false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1092,17 +1092,14 @@
|
||||
type: optional
|
||||
player: shadow
|
||||
text: Would you like to place a random card from hand beneath draw deck to reduce the bonus to +2 for {chosenMan}?
|
||||
cost: {
|
||||
type: putRandomCardFromHandBeneathDrawDeck
|
||||
hand: shadow
|
||||
}
|
||||
effect: {
|
||||
type: costToEffect
|
||||
cost: {
|
||||
type: putRandomCardFromHandBeneathDrawDeck
|
||||
hand: shadow
|
||||
}
|
||||
effect: {
|
||||
type: modifyStrength
|
||||
select: memory(chosenMan)
|
||||
amount: -2
|
||||
}
|
||||
type: modifyStrength
|
||||
select: memory(chosenMan)
|
||||
amount: -2
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -53,15 +53,12 @@
|
||||
effect: {
|
||||
type: optional
|
||||
text: Would you like to heal {exhaustedCompanion} to add a burden?
|
||||
cost: {
|
||||
type: heal
|
||||
select: memory(exhaustedCompanion)
|
||||
}
|
||||
effect: {
|
||||
type: costToEffect
|
||||
cost: {
|
||||
type: heal
|
||||
select: memory(exhaustedCompanion)
|
||||
}
|
||||
effect: {
|
||||
type: addBurdens
|
||||
}
|
||||
type: addBurdens
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,19 +350,16 @@
|
||||
{
|
||||
type: optional
|
||||
text: Would you like to discard {spottedPossession} to make {spottedMinion} damage +1?
|
||||
cost: {
|
||||
type: discard
|
||||
select: memory(spottedPossession)
|
||||
ignoreCostCheckFailure: true
|
||||
}
|
||||
effect: {
|
||||
type: costToEffect
|
||||
cost: {
|
||||
type: discard
|
||||
select: memory(spottedPossession)
|
||||
ignoreCostCheckFailure: true
|
||||
}
|
||||
effect: {
|
||||
type: addKeyword
|
||||
select: memory(spottedMinion)
|
||||
keyword: damage
|
||||
amount: 1
|
||||
}
|
||||
type: addKeyword
|
||||
select: memory(spottedMinion)
|
||||
keyword: damage
|
||||
amount: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -435,19 +432,16 @@
|
||||
type: winsSkirmish
|
||||
filter: bearer
|
||||
}
|
||||
cost: {
|
||||
type: transfer
|
||||
select: self
|
||||
where: choose(not(bearer),culture(men),minion)
|
||||
checkTarget: true
|
||||
}
|
||||
effect: {
|
||||
type: costToEffect
|
||||
cost: {
|
||||
type: transfer
|
||||
select: self
|
||||
where: choose(not(bearer),culture(men),minion)
|
||||
checkTarget: true
|
||||
}
|
||||
effect: {
|
||||
type: StackCardsFromPlay
|
||||
select: choose(culture(men),minion)
|
||||
where: choose(culture(men),possession,zone(support))
|
||||
}
|
||||
type: StackCardsFromPlay
|
||||
select: choose(culture(men),minion)
|
||||
where: choose(culture(men),possession,zone(support))
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -143,25 +143,22 @@
|
||||
{
|
||||
type: optional
|
||||
text: Would you like to liberate a site to make {chosenUrukHai} strength +2 and damage +1?
|
||||
effect: {
|
||||
type: costToEffect
|
||||
cost: {
|
||||
type: liberateSite
|
||||
}
|
||||
effect: [
|
||||
{
|
||||
type: modifyStrength
|
||||
select: memory(chosenUrukHai)
|
||||
amount: 2
|
||||
}
|
||||
{
|
||||
type: addKeyword
|
||||
select: memory(chosenUrukHai)
|
||||
keyword: damage
|
||||
amount: 1
|
||||
}
|
||||
]
|
||||
cost: {
|
||||
type: liberateSite
|
||||
}
|
||||
effect: [
|
||||
{
|
||||
type: modifyStrength
|
||||
select: memory(chosenUrukHai)
|
||||
amount: 2
|
||||
}
|
||||
{
|
||||
type: addKeyword
|
||||
select: memory(chosenUrukHai)
|
||||
keyword: damage
|
||||
amount: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1129,46 +1129,46 @@
|
||||
}
|
||||
}
|
||||
30_30: {
|
||||
title: He Gives Me Courage
|
||||
culture: gandalf
|
||||
twilight: 2
|
||||
type: event
|
||||
timeword: maneuver
|
||||
effects: {
|
||||
type: event
|
||||
requires: {
|
||||
type: canSpot
|
||||
filter: name(Gandalf)
|
||||
}
|
||||
effect: {
|
||||
type: choice
|
||||
texts: [
|
||||
Remove a burden
|
||||
Exert Gandalf and an [ELVEN] Wise Ally to remove 2 burdens
|
||||
]
|
||||
effects: [
|
||||
{
|
||||
type: removeBurdens
|
||||
amount: 1
|
||||
title: He Gives Me Courage
|
||||
culture: gandalf
|
||||
twilight: 2
|
||||
type: event
|
||||
timeword: maneuver
|
||||
effects: {
|
||||
type: event
|
||||
requires: {
|
||||
type: canSpot
|
||||
filter: name(Gandalf)
|
||||
}
|
||||
{
|
||||
type: costToEffect
|
||||
cost: [
|
||||
effect: {
|
||||
type: choice
|
||||
texts: [
|
||||
Remove a burden
|
||||
Exert Gandalf and an [ELVEN] Wise Ally to remove 2 burdens
|
||||
]
|
||||
effects: [
|
||||
{
|
||||
type: exert
|
||||
select: choose(name(Gandalf))
|
||||
type: removeBurdens
|
||||
amount: 1
|
||||
}
|
||||
{
|
||||
type: exert
|
||||
select: choose(culture(elven),wise,ally)
|
||||
type: costToEffect
|
||||
cost: [
|
||||
{
|
||||
type: exert
|
||||
select: choose(name(Gandalf))
|
||||
}
|
||||
{
|
||||
type: exert
|
||||
select: choose(culture(elven),wise,ally)
|
||||
}
|
||||
]
|
||||
effect: {
|
||||
type: removeBurdens
|
||||
amount: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
effect: {
|
||||
type: removeBurdens
|
||||
amount: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,18 +207,15 @@
|
||||
type: Optional
|
||||
player: freeps
|
||||
text: Would you like to exert {bearer} twice to discard Can You Protect Me From Yourself?
|
||||
cost: {
|
||||
type: exert
|
||||
player: freeps
|
||||
times: 2
|
||||
select: bearer
|
||||
}
|
||||
effect: {
|
||||
type: CostToEffect
|
||||
cost: {
|
||||
type: exert
|
||||
player: freeps
|
||||
times: 2
|
||||
select: bearer
|
||||
}
|
||||
effect: {
|
||||
type: Discard
|
||||
select: self
|
||||
}
|
||||
type: Discard
|
||||
select: self
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -268,27 +265,24 @@
|
||||
phase: Shadow
|
||||
}
|
||||
optional: true
|
||||
cost: {
|
||||
type: discardfromhand
|
||||
forced: false
|
||||
select: choose(culture(isengard))
|
||||
count: 1
|
||||
memorize: discardedCard
|
||||
}
|
||||
effect: {
|
||||
type: costToEffect
|
||||
cost: {
|
||||
type: discardfromhand
|
||||
forced: false
|
||||
select: choose(culture(isengard))
|
||||
count: 1
|
||||
memorize: discardedCard
|
||||
}
|
||||
effect: {
|
||||
type: addTwilight
|
||||
amount: {
|
||||
type: Conditional
|
||||
requires: {
|
||||
type: MemoryMatches
|
||||
memory: discardedCard
|
||||
filter: Orc
|
||||
}
|
||||
true: 5
|
||||
false: 3
|
||||
type: addTwilight
|
||||
amount: {
|
||||
type: Conditional
|
||||
requires: {
|
||||
type: MemoryMatches
|
||||
memory: discardedCard
|
||||
filter: Orc
|
||||
}
|
||||
true: 5
|
||||
false: 3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,16 +23,13 @@
|
||||
type: startOfTurn
|
||||
}
|
||||
optional: true
|
||||
cost: {
|
||||
type: AddTwilight
|
||||
amount: 2
|
||||
}
|
||||
effect: {
|
||||
type: CostToEffect
|
||||
cost: {
|
||||
type: AddTwilight
|
||||
amount: 2
|
||||
}
|
||||
effect: {
|
||||
type: heal
|
||||
select: choose(culture(shire),companion)
|
||||
}
|
||||
type: heal
|
||||
select: choose(culture(shire),companion)
|
||||
}
|
||||
}
|
||||
{
|
||||
|
||||
@@ -79,17 +79,14 @@
|
||||
{
|
||||
type: Optional
|
||||
text: Would you like to make the Free Peoples player discard a tentacle to shuffle a {moria} card from discard into your draw deck?
|
||||
cost: {
|
||||
type: Discard
|
||||
player: freeps
|
||||
select: choose(tentacle)
|
||||
}
|
||||
effect: {
|
||||
type: CostToEffect
|
||||
cost: {
|
||||
type: Discard
|
||||
player: freeps
|
||||
select: choose(tentacle)
|
||||
}
|
||||
effect: {
|
||||
type: ShuffleCardsFromDiscardIntoDrawDeck
|
||||
select: choose(culture(moria))
|
||||
}
|
||||
type: ShuffleCardsFromDiscardIntoDrawDeck
|
||||
select: choose(culture(moria))
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -29,7 +29,7 @@ public class IfEffect implements EffectAppenderProducer {
|
||||
return new DelayedAppender() {
|
||||
@Override
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
EffectAppender[] effects = checkConditions(actionContext) ? trueEffectAppenders : falseEffectAppenders;
|
||||
EffectAppender[] effects = checkRequirements(actionContext) ? trueEffectAppenders : falseEffectAppenders;
|
||||
|
||||
if(effects == null || effects.length == 0)
|
||||
return null;
|
||||
@@ -41,7 +41,7 @@ public class IfEffect implements EffectAppenderProducer {
|
||||
return new StackActionEffect(subAction);
|
||||
}
|
||||
|
||||
private boolean checkConditions(ActionContext actionContext) {
|
||||
private boolean checkRequirements(ActionContext actionContext) {
|
||||
for (Requirement condition : conditions) {
|
||||
if (!condition.accepts(actionContext))
|
||||
return false;
|
||||
@@ -52,7 +52,7 @@ public class IfEffect implements EffectAppenderProducer {
|
||||
@Override
|
||||
public boolean isPlayableInFull(ActionContext actionContext) {
|
||||
|
||||
boolean check = checkConditions(actionContext);
|
||||
boolean check = checkRequirements(actionContext);
|
||||
EffectAppender[] effects = check ? trueEffectAppenders : falseEffectAppenders;
|
||||
|
||||
if(effects == null || effects.length == 0)
|
||||
|
||||
Reference in New Issue
Block a user