NEO: Hidetsugu Consumes All // Vessel of the All-Consuming and support

This commit is contained in:
Tim Mocny
2022-02-06 05:00:36 +00:00
committed by Michael Kamensky
parent f7b61398fa
commit bd7b76ddb3
3 changed files with 50 additions and 0 deletions

View File

@@ -846,6 +846,10 @@ public class Player extends GameEntity implements Comparable<Player> {
return assignedDamage.keySet();
}
public final int getAssignedDamage(final Card c) {
return assignedDamage.get(c);
}
public final int getAssignedDamage(final String type) {
final Map<Card, Integer> valueMap = Maps.newHashMap();
for (final Card c : assignedDamage.keySet()) {

View File

@@ -22,6 +22,7 @@ import java.util.Map;
import forge.game.ability.AbilityKey;
import forge.game.card.Card;
import forge.game.card.CardUtil;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.util.Expressions;
import forge.util.Localizer;
@@ -90,6 +91,24 @@ public class TriggerDamageDone extends Trigger {
}
}
if (hasParam("DamageToTargetThisTurnCondition")) {
final String fullParam = getParam("DamageToTargetThisTurnCondition");
final String operator = fullParam.substring(0, 2);
final int operand = Integer.parseInt(fullParam.substring(2));
final Object target = runParams.get(AbilityKey.DamageTarget);
final Card source = (Card) runParams.get(AbilityKey.DamageSource);
if (target instanceof Player) {
final Player trigTgt = (Player) target;
if (!Expressions.compare(trigTgt.getAssignedDamage(source), operator, operand)) {
return false;
}
} else {
return false; //for now this is only used to check damage assigned to a player
}
}
return true;
}

View File

@@ -0,0 +1,27 @@
Name:Hidetsugu Consumes All
ManaCost:1 B R
Types:Enchantment Saga
K:Saga:3:DBDestroyAll,DBExile,DBTransform
SVar:DBDestroyAll:DB$ DestroyAll | ValidCards$ Permanent.nonLand+cmcLE1 | SpellDescription$ Destroy each nonland permanent with mana value 1 or less.
SVar:DBExile:DB$ ChangeZoneAll | ChangeType$ Card | Origin$ Graveyard | Destination$ Exile | SpellDescription$ Exile all graveyards.
SVar:DBTransform:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | SubAbility$ DBReturn | SpellDescription$ Exile this Saga, then return it to the battlefield transformed under your control.
SVar:DBReturn:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield | Transformed$ True | GainControl$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
AlternateMode:DoubleFaced
Oracle:(As this Saga enters and after your draw step, add a lore counter.)\nI — Destroy each nonland permanent with mana value 1 or less.\nII — Exile all graveyards.\nIII — Exile this Saga, then return it to the battlefield transformed under your control.
ALTERNATE
Name:Vessel of the All-Consuming
ManaCost:no cost
Colors:black,red
Types:Enchantment Creature Ogre Shaman
PT:3/3
K:Trample
T:Mode$ DamageDealtOnce | ValidSource$ Card.Self | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals damage, put a +1/+1 counter on it.
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | Execute$ TrigLose | DamageToTargetThisTurnCondition$ GE10 | TriggerDescription$ Whenever CARDNAME deals damage to a player, if it has dealt 10 or more damage to that player this turn, they lose the game.
SVar:TrigLose:DB$ LosesGame | Defined$ TriggeredTarget
DeckHas:Ability$Counters
Oracle:Trample\nWhenever Vessel of the All-Consuming deals damage, put a +1/+1 counter on it.
Whenever Vessel of the All-Consuming deals damage to a player, if it has dealt 10 or more damage to that player this turn, they lose the game.