mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +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)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
final AbilitySub subAb = sa.getSubAbility();
|
final AbilitySub subAb = sa.getSubAbility();
|
||||||
|
|||||||
@@ -237,7 +237,6 @@ public class CostAdjustment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sa.getHostCard().hasKeyword(Keyword.CONVOKE)) {
|
if (sa.getHostCard().hasKeyword(Keyword.CONVOKE)) {
|
||||||
sa.getHostCard().clearConvoked();
|
|
||||||
adjustCostByConvokeOrImprovise(cost, sa, false, test);
|
adjustCostByConvokeOrImprovise(cost, sa, false, test);
|
||||||
}
|
}
|
||||||
if (sa.getHostCard().hasKeyword(Keyword.IMPROVISE)) {
|
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);
|
Map<Card, ManaCostShard> convokedCards = sa.getActivatingPlayer().getController().chooseCardsForConvokeOrImprovise(sa, cost.toManaCost(), untappedCards, improvise);
|
||||||
|
|
||||||
// Convoked creats are tapped here with triggers suppressed,
|
// Convoked creats are tapped here, setting up their taps triggers,
|
||||||
// Then again when payment is done(In InputPayManaCost.done()) with suppression cleared.
|
// 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
|
// 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.
|
// 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()) {
|
for (final Entry<Card, ManaCostShard> conv : convokedCards.entrySet()) {
|
||||||
sa.addTappedForConvoke(conv.getKey());
|
sa.addTappedForConvoke(conv.getKey());
|
||||||
cost.decreaseShard(conv.getValue(), 1);
|
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) {
|
private static void adjustCostByOffering(final ManaCostBeingPaid cost, final SpellAbility sa) {
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ Types:Creature Elephant Cleric
|
|||||||
PT:4/4
|
PT:4/4
|
||||||
K:Convoke
|
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.
|
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
|
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.
|
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) {
|
if (ability.getTappedForConvoke() != null) {
|
||||||
|
activator.getGame().getTriggerHandler().suppressMode(TriggerType.Taps);
|
||||||
for (final Card c : ability.getTappedForConvoke()) {
|
for (final Card c : ability.getTappedForConvoke()) {
|
||||||
c.setTapped(false);
|
c.setTapped(false);
|
||||||
c.tap();
|
c.tap();
|
||||||
}
|
}
|
||||||
|
activator.getGame().getTriggerHandler().clearSuppression(TriggerType.Taps);
|
||||||
ability.clearTappedForConvoke();
|
ability.clearTappedForConvoke();
|
||||||
}
|
}
|
||||||
return handleOfferingConvokeAndDelve(ability, cardsToDelve, false);
|
return handleOfferingConvokeAndDelve(ability, cardsToDelve, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user