New versions of Bilbo for The Hobbit Draft

This commit is contained in:
Phallen Cassidy
2021-11-25 23:19:44 -05:00
parent a47ce94020
commit 758ff70394
3 changed files with 205 additions and 90 deletions

View File

@@ -1034,31 +1034,56 @@
"type": "trigger",
"optional": true,
"trigger": {
"type": "winsSkirmish",
"filter": "self"
"type": "played",
"filter": "culture(dwarven),fellowship,event"
},
"effect": [
{
"type": "drawCards",
"count": 3
"effect": {
"type": "drawCards",
"count": 2
}
},
{
"type": "activated",
"phase": "fellowship",
"cost": {
"type": "discard",
"filter": "choose(culture(dwarven),follower)"
},
"effect": {
"type": "modifyStrength",
"filter": "self",
"amount": {
"type": "condition",
"condition": {
"type": "canSpot",
"filter": "name(Gollum)"
},
"true": 2,
"false": 1
},
{
"type": "discardFromHand",
"forced": false,
"count": 2
}
]
"until": "start(regroup)"
}
},
{
"type": "activated",
"phase": "skirmish",
"cost": {
"type": "addBurdens",
"amount": 2
"type": "discard",
"filter": "choose(culture(dwarven),follower)"
},
"effect": {
"type": "cancelSkirmish",
"filter": "name(Gollum)"
"type": "modifyStrength",
"filter": "self",
"amount": {
"type": "condition",
"condition": {
"type": "canSpot",
"filter": "name(Gollum)"
},
"true": 2,
"false": 1
},
"until": "start(regroup)"
}
}
]
@@ -1077,6 +1102,56 @@
"burglar",
"can start with ring"
],
"effects": [
{
"type": "trigger",
"optional": true,
"trigger": {
"type": "discardFromHandBy",
"by": "follower"
},
"effect": {
"type": "drawCards",
"count": 2
}
},
{
"type": "activated",
"phase": "skirmish",
"condition": {
"type": "canSpot",
"filter": "self,inSkirmishAgainst(or(name(Smaug),name(Gollum)))"
},
"cost": {
"type": "addBurdens",
"amount": 1
},
"effect": {
"type": "modifyStrength",
"filter": "self",
"amount": {
"type": "cardAffectedLimitPerPhase",
"limit": 2,
"source": 2
}
}
}
]
},
"30_45": {
"title": "*Bilbo",
"subtitle": "Master in Riddles",
"culture": "shire",
"cost": 0,
"type": "companion",
"race": "hobbit",
"strength": 3,
"vitality": 4,
"resistance": 8,
"keyword": [
"burglar",
"can start with ring"
],
"effects": [
{
"type": "modifier",
@@ -1090,66 +1165,16 @@
"type": "trigger",
"optional": true,
"trigger": {
"type": "winsSkirmish",
"filter": "self"
"type": "heals",
"filter": "companion"
},
"effect": {
"type": "putCardsFromDeckIntoHand",
"filter": "choose(side(free people),artifact)"
}
}
]
},
"30_45": {
"title": "*Bilbo",
"subtitle": "Master in Riddles",
"culture": "shire",
"cost": 0,
"type": "companion",
"race": "hobbit",
"strength": 3,
"vitality": 4,
"resistance": 8,
"keyword": [
"burglar",
"can start with ring"
],
"effects": [
{
"type": "trigger",
"optional": true,
"trigger": {
"type": "winsSkirmish",
"filter": "self"
},
"effect": {
"type": "drawCards",
"count": 3
}
},
{
"type": "activated",
"phase": "skirmish",
"condition": {
"type": "perPhaseLimit",
"limit": 2
"type": "canSpot",
"filter": "minion"
},
"cost": {
"type": "discardFromHand",
"forced": false,
"count": 2
},
"effect": [
{
"type": "incrementPerPhaseLimit",
"limit": 2
},
{
"type": "modifyStrength",
"filter": "choose(name(Gollum))",
"amount": -2
}
]
"effect": {
"type": "drawCards"
}
}
]
},
@@ -1172,29 +1197,29 @@
"type": "modifier",
"modifier": {
"type": "cantBeOverwhelmedMultiplier",
"filter": "self,inSkirmishAgainst(name(Gollum))",
"filter": "self,inSkirmishAgainst(or(name(Smaug),name(Gollum)))",
"multiplier": 3
}
},
{
"type": "activatedTrigger",
"trigger": {
"type": "winsSkirmish",
"filter": "self"
"type": "activated",
"phase": "skirmish",
"cost": {
"type": "play",
"filter": "choose(culture(dwarven),skirmish,event)"
},
"condition": {
"type": "perTurnLimit",
"limit": 1
},
"effect": [
{
"type": "incrementPerTurnLimit",
"limit": 1
},
{
"type": "reconcileHand"
"effect": {
"type": "drawCards",
"count": {
"type": "condition",
"condition": {
"type": "canSpot",
"filter": "self,inSkirmish"
},
"true": 4,
"false": 2
}
]
}
}
]
},

View File

@@ -0,0 +1,48 @@
package com.gempukku.lotro.cards.build.field.effect.trigger;
import com.gempukku.lotro.cards.build.*;
import com.gempukku.lotro.cards.build.field.FieldUtils;
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.PlayerResolver;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.timing.results.DiscardCardFromHandResult;
import com.gempukku.lotro.logic.timing.results.DiscardCardsFromPlayResult;
import org.json.simple.JSONObject;
public class DiscardFromHandBy implements TriggerCheckerProducer {
@Override
public TriggerChecker getTriggerChecker(JSONObject value, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(value, "filter", "memorize", "player", "by");
final String filter = FieldUtils.getString(value.get("filter"), "filter", "any");
final String memorize = FieldUtils.getString(value.get("memorize"), "memorize");
final String player = FieldUtils.getString(value.get("player"), "player", "you");
final String byFilter = FieldUtils.getString(value.get("by"), "by");
PlayerSource playerSource = (player != null) ? PlayerResolver.resolvePlayer(player, environment) : null;
final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);
final FilterableSource byFilterableSource = environment.getFilterFactory().generateFilter(byFilter, environment);
return new TriggerChecker() {
@Override
public boolean isBefore() {
return false;
}
@Override
public boolean accepts(ActionContext actionContext) {
boolean result = TriggerConditions.forEachDiscardedFromHandBy(actionContext.getGame(), actionContext.getEffectResult(),
byFilterableSource.getFilterable(actionContext), filterableSource.getFilterable(actionContext));
if (result && playerSource != null) {
// Need to check if it was that player discarding the card
final String performingPlayer = ((DiscardCardFromHandResult) actionContext.getEffectResult()).getSource().getOwner();
if (performingPlayer == null || !performingPlayer.equals(playerSource.getPlayer(actionContext)))
result = false;
}
if (result && memorize != null) {
actionContext.setCardMemory(memorize, ((DiscardCardFromHandResult) actionContext.getEffectResult()).getDiscardedCard());
}
return result;
}
};
}
}

View File

@@ -0,0 +1,42 @@
package com.gempukku.lotro.cards.build.field.effect.trigger;
import com.gempukku.lotro.cards.build.ActionContext;
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
import com.gempukku.lotro.cards.build.FilterableSource;
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
import com.gempukku.lotro.cards.build.field.FieldUtils;
import com.gempukku.lotro.common.Filterable;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.timing.results.HealResult;
import org.json.simple.JSONObject;
public class Heals implements TriggerCheckerProducer {
@Override
public TriggerChecker getTriggerChecker(JSONObject value, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(value, "filter", "memorize");
final String filter = FieldUtils.getString(value.get("filter"), "filter", "any");
final String memorize = FieldUtils.getString(value.get("memorize"), "memorize");
final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);
return new TriggerChecker() {
@Override
public boolean isBefore() {
return false;
}
@Override
public boolean accepts(ActionContext actionContext) {
final Filterable filterable = filterableSource.getFilterable(actionContext);
final boolean result = TriggerConditions.forEachHealed(actionContext.getGame(), actionContext.getEffectResult(), filterable);
if (result && memorize != null) {
final PhysicalCard healedCard = ((HealResult) actionContext.getEffectResult()).getHealedCard();
actionContext.setCardMemory(memorize, healedCard);
}
return result;
}
};
}
}