mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Merge branch 'venerated-loxodon-fix' into 'master'
Attempting to fix Venerated Loxodon not giving counters to creatures that helped convoke it. Closes #774 See merge request core-developers/forge!1174
This commit is contained in:
@@ -176,7 +176,7 @@ public abstract class SpellAbilityAi {
|
||||
|
||||
public final boolean doTriggerNoCostWithSubs(final Player aiPlayer, final SpellAbility sa, final boolean mandatory)
|
||||
{
|
||||
if (!doTriggerAINoCost(aiPlayer, sa, mandatory)) {
|
||||
if (!doTriggerAINoCost(aiPlayer, sa, mandatory) && !"Always".equals(sa.getParam("AILogic"))) {
|
||||
return false;
|
||||
}
|
||||
final AbilitySub subAb = sa.getSubAbility();
|
||||
|
||||
@@ -237,7 +237,6 @@ public class CostAdjustment {
|
||||
}
|
||||
}
|
||||
if (sa.getHostCard().hasKeyword(Keyword.CONVOKE)) {
|
||||
sa.getHostCard().clearConvoked();
|
||||
adjustCostByConvokeOrImprovise(cost, sa, false, test);
|
||||
}
|
||||
if (sa.getHostCard().hasKeyword(Keyword.IMPROVISE)) {
|
||||
@@ -262,11 +261,10 @@ public class CostAdjustment {
|
||||
|
||||
Map<Card, ManaCostShard> convokedCards = sa.getActivatingPlayer().getController().chooseCardsForConvokeOrImprovise(sa, cost.toManaCost(), untappedCards, improvise);
|
||||
|
||||
// Convoked creats are tapped here with triggers suppressed,
|
||||
// Then again when payment is done(In InputPayManaCost.done()) with suppression cleared.
|
||||
// Convoked creats are tapped here, setting up their taps triggers,
|
||||
// Then again when payment is done(In InputPayManaCost.done()) with suppression of Taps triggers.
|
||||
// This is to make sure that triggers go off at the right time
|
||||
// AND that you can't use mana tapabilities of convoked creatures to pay the convoked cost.
|
||||
sa.getActivatingPlayer().getGame().getTriggerHandler().suppressMode(TriggerType.Taps);
|
||||
for (final Entry<Card, ManaCostShard> conv : convokedCards.entrySet()) {
|
||||
sa.addTappedForConvoke(conv.getKey());
|
||||
cost.decreaseShard(conv.getValue(), 1);
|
||||
@@ -277,7 +275,6 @@ public class CostAdjustment {
|
||||
}
|
||||
}
|
||||
}
|
||||
sa.getActivatingPlayer().getGame().getTriggerHandler().clearSuppression(TriggerType.Taps);
|
||||
}
|
||||
|
||||
private static void adjustCostByOffering(final ManaCostBeingPaid cost, final SpellAbility sa) {
|
||||
|
||||
@@ -4,6 +4,6 @@ Types:Creature Elephant Cleric
|
||||
PT:4/4
|
||||
K:Convoke
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounterAll | TriggerDescription$ When CARDNAME enters the battlefield, put a +1/+1 counter on each creature that convoked it.
|
||||
SVar:TrigPutCounterAll:DB$ PutCounterAll | ValidCards$ Creature.convoked | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:TrigPutCounterAll:DB$ PutCounterAll | ValidCards$ Creature.convoked | CounterType$ P1P1 | CounterNum$ 1 | AILogic$ Always
|
||||
DeckHas:Ability$Counters
|
||||
Oracle:Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for {1} or one mana of the creature's color.)\nWhen Venerated Loxodon enters the battlefield, put a +1/+1 counter on each creature that convoked it.
|
||||
|
||||
@@ -903,10 +903,12 @@ public class HumanPlay {
|
||||
}
|
||||
}
|
||||
if (ability.getTappedForConvoke() != null) {
|
||||
activator.getGame().getTriggerHandler().suppressMode(TriggerType.Taps);
|
||||
for (final Card c : ability.getTappedForConvoke()) {
|
||||
c.setTapped(false);
|
||||
c.tap();
|
||||
}
|
||||
activator.getGame().getTriggerHandler().clearSuppression(TriggerType.Taps);
|
||||
ability.clearTappedForConvoke();
|
||||
}
|
||||
return handleOfferingConvokeAndDelve(ability, cardsToDelve, false);
|
||||
|
||||
Reference in New Issue
Block a user