Merge branch 'zilortha' into 'master'

Zilortha, Strength Incarnate

Closes #1337

See merge request core-developers/forge!2653
This commit is contained in:
Michael Kamensky
2020-04-04 03:51:32 +00:00
3 changed files with 23 additions and 4 deletions

View File

@@ -984,7 +984,7 @@ public class GameAction {
for (final Card c : game.getCardsIn(ZoneType.Battlefield)) { for (final Card c : game.getCardsIn(ZoneType.Battlefield)) {
if (c.isCreature()) { if (c.isCreature()) {
// Rule 704.5f - Put into grave (no regeneration) for toughness <= 0 // Rule 704.5f - Put into grave (no regeneration) for toughness <= 0
if (c.getNetToughness() <= 0) { if (c.getLethal() <= 0) {
if (noRegCreats == null) { if (noRegCreats == null) {
noRegCreats = new CardCollection(); noRegCreats = new CardCollection();
} }
@@ -992,7 +992,7 @@ public class GameAction {
checkAgain = true; checkAgain = true;
} else if (c.hasKeyword("CARDNAME can't be destroyed by lethal damage unless lethal damage dealt by a single source is marked on it.")) { } else if (c.hasKeyword("CARDNAME can't be destroyed by lethal damage unless lethal damage dealt by a single source is marked on it.")) {
for (final Integer dmg : c.getReceivedDamageFromThisTurn().values()) { for (final Integer dmg : c.getReceivedDamageFromThisTurn().values()) {
if (c.getNetToughness() <= dmg.intValue()) { if (c.getLethal() <= dmg.intValue()) {
if (desCreats == null) { if (desCreats == null) {
desCreats = new CardCollection(); desCreats = new CardCollection();
} }
@@ -1004,7 +1004,7 @@ public class GameAction {
} }
// Rule 704.5g - Destroy due to lethal damage // Rule 704.5g - Destroy due to lethal damage
// Rule 704.5h - Destroy due to deathtouch // Rule 704.5h - Destroy due to deathtouch
else if (c.getNetToughness() <= c.getDamage() || c.hasBeenDealtDeathtouchDamage()) { else if (c.getLethal() <= c.getDamage() || c.hasBeenDealtDeathtouchDamage()) {
if (desCreats == null) { if (desCreats == null) {
desCreats = new CardCollection(); desCreats = new CardCollection();
} }

View File

@@ -4731,9 +4731,21 @@ public class Card extends GameEntity implements Comparable<Card> {
return false; return false;
} }
// this is the amount of damage a creature needs to receive before it dies
public final int getLethal() {
if (getAmountOfKeyword("Lethal damage dealt to CARDNAME is determined by its power rather than its toughness.") % 2 !=0) {
return getNetPower(); }
else {
return getNetToughness(); }
}
// this is the minimal damage a trampling creature has to assign to a blocker // this is the minimal damage a trampling creature has to assign to a blocker
public final int getLethalDamage() { public final int getLethalDamage() {
return getNetToughness() - getDamage() - getTotalAssignedDamage(); if (getAmountOfKeyword("Lethal damage dealt to CARDNAME is determined by its power rather than its toughness.") % 2 !=0) {
return getNetPower() - getDamage() - getTotalAssignedDamage();
}
else {
return getNetToughness() - getDamage() - getTotalAssignedDamage();}
} }
public final int getDamage() { public final int getDamage() {

View File

@@ -0,0 +1,7 @@
Name:Zilortha, Strength Incarnate
ManaCost:3 R G
Types:Legendary Creature Dinosaur
K:Trample
PT:7/3
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddHiddenKeyword$ Lethal damage dealt to CARDNAME is determined by its power rather than its toughness. | Description$ Lethal damage dealt to creatures you control is determined by their power rather than their toughness.
Oracle:Trample\nLethal damage dealt to creatures you control is determined by their power rather than their toughness.