Merge pull request #2275 from tool4ever/verrak_fix

Fix Verrak
This commit is contained in:
Anthony Calosa
2023-01-21 08:38:33 +08:00
committed by GitHub
5 changed files with 4 additions and 6 deletions

View File

@@ -128,6 +128,7 @@ public class ComputerUtil {
if (!sa.isCopied()) { if (!sa.isCopied()) {
sa.resetPaidHash(); sa.resetPaidHash();
sa.setPaidLife(0);
} }
sa = GameActionUtil.addExtraKeywordCost(sa); sa = GameActionUtil.addExtraKeywordCost(sa);

View File

@@ -1802,11 +1802,6 @@ public class AbilityUtils {
final SpellAbility root = (SpellAbility) sa.getRootAbility().getTriggeringObject(AbilityKey.SpellAbility); final SpellAbility root = (SpellAbility) sa.getRootAbility().getTriggeringObject(AbilityKey.SpellAbility);
return root == null ? 0 : root.getTotalManaSpent(); return root == null ? 0 : root.getTotalManaSpent();
} }
// Count$TriggeredLifeSpent
if (sq[0].equals("TriggeredLifeSpent")) {
final SpellAbility root = (SpellAbility) sa.getRootAbility().getTriggeringObject(AbilityKey.SpellAbility);
return root == null ? 0 : root.getAmountLifePaid();
}
// Count$ManaColorsPaid // Count$ManaColorsPaid
if (sq[0].equals("ManaColorsPaid")) { if (sq[0].equals("ManaColorsPaid")) {

View File

@@ -283,6 +283,7 @@ public class TriggerSpellAbilityCastOrCopy extends Trigger {
} }
sa.setTriggeringObject(AbilityKey.SpellAbilityTargets, saTargets); sa.setTriggeringObject(AbilityKey.SpellAbilityTargets, saTargets);
} }
sa.setTriggeringObject(AbilityKey.LifeAmount, castSA.getAmountLifePaid());
sa.setTriggeringObjectsFrom( sa.setTriggeringObjectsFrom(
runParams, runParams,
AbilityKey.Player, AbilityKey.Player,

View File

@@ -7,5 +7,5 @@ K:Deathtouch
K:Lifelink K:Lifelink
T:Mode$ AbilityCast | ValidActivatingPlayer$ You | ValidSA$ SpellAbility.nonManaAbility | Condition$ LifePaid | TriggerZones$ Battlefield | Execute$ TrigCopySpell | TriggerDescription$ Whenever you activate an ability that isn't a mana ability, if life was paid to activate it, you may pay that much life again. If you do, copy that ability. You may choose new targets for the copy. T:Mode$ AbilityCast | ValidActivatingPlayer$ You | ValidSA$ SpellAbility.nonManaAbility | Condition$ LifePaid | TriggerZones$ Battlefield | Execute$ TrigCopySpell | TriggerDescription$ Whenever you activate an ability that isn't a mana ability, if life was paid to activate it, you may pay that much life again. If you do, copy that ability. You may choose new targets for the copy.
SVar:TrigCopySpell:AB$ CopySpellAbility | Cost$ PayLife<X> | Defined$ TriggeredSpellAbility | MayChooseTarget$ True SVar:TrigCopySpell:AB$ CopySpellAbility | Cost$ PayLife<X> | Defined$ TriggeredSpellAbility | MayChooseTarget$ True
SVar:X:Count$TriggeredLifeSpent SVar:X:TriggerCount$LifeAmount
Oracle:Flying, deathtouch, lifelink\nWhenever you activate an ability that isn't a mana ability, if life was paid to activate it, you may pay that much life again. If you do, copy that ability. You may choose new targets for the copy. Oracle:Flying, deathtouch, lifelink\nWhenever you activate an ability that isn't a mana ability, if life was paid to activate it, you may pay that much life again. If you do, copy that ability. You may choose new targets for the copy.

View File

@@ -94,6 +94,7 @@ public class HumanPlaySpellAbility {
if (!ability.isCopied()) { if (!ability.isCopied()) {
ability.resetPaidHash(); ability.resetPaidHash();
ability.setPaidLife(0);
} }
ability = GameActionUtil.addExtraKeywordCost(ability); ability = GameActionUtil.addExtraKeywordCost(ability);