mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Merge branch 'rocks' into 'master'
Fix Chained to the Rocks crash See merge request core-developers/forge!6098
This commit is contained in:
@@ -125,8 +125,9 @@ public class AttachAi extends SpellAbilityAi {
|
|||||||
|
|
||||||
if (ComputerUtilAbility.getAbilitySourceName(sa).equals("Chained to the Rocks")) {
|
if (ComputerUtilAbility.getAbilitySourceName(sa).equals("Chained to the Rocks")) {
|
||||||
final SpellAbility effectExile = AbilityFactory.getAbility(source.getSVar("TrigExile"), source);
|
final SpellAbility effectExile = AbilityFactory.getAbility(source.getSVar("TrigExile"), source);
|
||||||
|
effectExile.setActivatingPlayer(ai);
|
||||||
final TargetRestrictions exile_tgt = effectExile.getTargetRestrictions();
|
final TargetRestrictions exile_tgt = effectExile.getTargetRestrictions();
|
||||||
final CardCollection targets = CardLists.filter(CardUtil.getValidCardsToTarget(exile_tgt, effectExile), CardPredicates.canBeAttached(source));
|
final List<Card> targets = CardUtil.getValidCardsToTarget(exile_tgt, effectExile);
|
||||||
return !targets.isEmpty();
|
return !targets.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class MillEffect extends SpellAbilityEffect {
|
|||||||
public void resolve(SpellAbility sa) {
|
public void resolve(SpellAbility sa) {
|
||||||
final Card source = sa.getHostCard();
|
final Card source = sa.getHostCard();
|
||||||
final Game game = source.getGame();
|
final Game game = source.getGame();
|
||||||
final int numCards = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("NumCards"), sa);
|
final int numCards = sa.hasParam("NumCards") ? AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("NumCards"), sa) : 1;
|
||||||
final boolean bottom = sa.hasParam("FromBottom");
|
final boolean bottom = sa.hasParam("FromBottom");
|
||||||
final boolean facedown = sa.hasParam("ExileFaceDown");
|
final boolean facedown = sa.hasParam("ExileFaceDown");
|
||||||
final boolean reveal = !sa.hasParam("NoReveal");
|
final boolean reveal = !sa.hasParam("NoReveal");
|
||||||
@@ -84,7 +84,7 @@ public class MillEffect extends SpellAbilityEffect {
|
|||||||
@Override
|
@Override
|
||||||
protected String getStackDescription(SpellAbility sa) {
|
protected String getStackDescription(SpellAbility sa) {
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
final int numCards = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("NumCards"), sa);
|
final int numCards = sa.hasParam("NumCards") ? AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("NumCards"), sa) : 1;
|
||||||
|
|
||||||
sb.append(Lang.joinHomogenous(getTargetPlayers(sa))).append(" ");
|
sb.append(Lang.joinHomogenous(getTargetPlayers(sa))).append(" ");
|
||||||
|
|
||||||
|
|||||||
@@ -3108,7 +3108,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
{
|
{
|
||||||
final String drawTrig = "Mode$ Phase | Phase$ End of Turn | TriggerZones$ Command | " +
|
final String drawTrig = "Mode$ Phase | Phase$ End of Turn | TriggerZones$ Command | " +
|
||||||
"ValidPlayer$ You | TriggerDescription$ At the beginning of your end step, draw a card.";
|
"ValidPlayer$ You | TriggerDescription$ At the beginning of your end step, draw a card.";
|
||||||
final String drawEff = "AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1";
|
final String drawEff = "AB$ Draw | Cost$ 0 | Defined$ You";
|
||||||
|
|
||||||
final Trigger drawTrigger = TriggerHandler.parseTrigger(drawTrig, monarchEffect, true);
|
final Trigger drawTrigger = TriggerHandler.parseTrigger(drawTrig, monarchEffect, true);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Types:Legendary Planeswalker Domri
|
|||||||
Loyalty:3
|
Loyalty:3
|
||||||
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddPower$ 1 | Description$ Creatures you control get +1/+0.
|
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddPower$ 1 | Description$ Creatures you control get +1/+0.
|
||||||
SVar:PlayMain1:TRUE
|
SVar:PlayMain1:TRUE
|
||||||
A:AB$ Mana | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Produced$ Combo R G | Amount$ 1 | AILogic$ Always | SubAbility$ DBEffect | SpellDescription$ Add {R} or {G}. Creature spells you cast this turn can't be countered.
|
A:AB$ Mana | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Produced$ Combo R G | Amount$ 1 | AILogic$ Always | SubAbility$ DBEffect | SpellDescription$ Add {R} or {G}.
|
||||||
SVar:DBEffect:DB$ Effect | Name$ Domri, Anarch of Bolas Effect | StaticAbilities$ AntiMagic | SpellDescription$ Creature spells you cast this turn can't be countered
|
SVar:DBEffect:DB$ Effect | Name$ Domri, Anarch of Bolas Effect | StaticAbilities$ AntiMagic | SpellDescription$ Creature spells you cast this turn can't be countered
|
||||||
SVar:AntiMagic:Mode$ Continuous | Affected$ Creature.YouCtrl | AffectedZone$ Stack | EffectZone$ Command | AddHiddenKeyword$ CARDNAME can't be countered.
|
SVar:AntiMagic:Mode$ Continuous | Affected$ Creature.YouCtrl | AffectedZone$ Stack | EffectZone$ Command | AddHiddenKeyword$ CARDNAME can't be countered.
|
||||||
A:AB$ Pump | Planeswalker$ True | Cost$ SubCounter<2/LOYALTY> | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Choose target creature you control | AILogic$ Fight | SpellDescription$ Target creature you control fights target creature you don't control. | SubAbility$ DBFight
|
A:AB$ Pump | Planeswalker$ True | Cost$ SubCounter<2/LOYALTY> | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Choose target creature you control | AILogic$ Fight | SpellDescription$ Target creature you control fights target creature you don't control. | SubAbility$ DBFight
|
||||||
|
|||||||
Reference in New Issue
Block a user