mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
*Added CombatDamage parameter to AF_DealDamage.
*Corrected cards that replace damage dealt with the same damage in a different amount. (Fixes Divine Presence + Sword of X and Y) Akki Lavarunner // Tok-Tok Volcano Born Curse of Bloodletting Divine Presence Furnace of Rath Gratuitous Violence Lashknife Barrier
This commit is contained in:
@@ -777,6 +777,7 @@ public class AbilityFactoryDealDamage {
|
|||||||
final int dmg = this.getNumDamage(saMe);
|
final int dmg = this.getNumDamage(saMe);
|
||||||
|
|
||||||
final boolean noPrevention = params.containsKey("NoPrevention");
|
final boolean noPrevention = params.containsKey("NoPrevention");
|
||||||
|
final boolean combatDmg = params.containsKey("CombatDamage");
|
||||||
|
|
||||||
ArrayList<Object> tgts;
|
ArrayList<Object> tgts;
|
||||||
if (saMe.getTarget() == null) {
|
if (saMe.getTarget() == null) {
|
||||||
@@ -814,6 +815,10 @@ public class AbilityFactoryDealDamage {
|
|||||||
if (AllZoneUtil.isCardInPlay(c) && (!targeted || c.canBeTargetedBy(saMe))) {
|
if (AllZoneUtil.isCardInPlay(c) && (!targeted || c.canBeTargetedBy(saMe))) {
|
||||||
if (noPrevention) {
|
if (noPrevention) {
|
||||||
c.addDamageWithoutPrevention(dmg, source);
|
c.addDamageWithoutPrevention(dmg, source);
|
||||||
|
} else if(combatDmg) {
|
||||||
|
HashMap<Card,Integer> combatmap = new HashMap<Card,Integer>();
|
||||||
|
combatmap.put(source, dmg);
|
||||||
|
c.addCombatDamage(combatmap);
|
||||||
} else {
|
} else {
|
||||||
c.addDamage(dmg, source);
|
c.addDamage(dmg, source);
|
||||||
}
|
}
|
||||||
@@ -824,6 +829,8 @@ public class AbilityFactoryDealDamage {
|
|||||||
if (!targeted || p.canBeTargetedBy(saMe)) {
|
if (!targeted || p.canBeTargetedBy(saMe)) {
|
||||||
if (noPrevention) {
|
if (noPrevention) {
|
||||||
p.addDamageWithoutPrevention(dmg, source);
|
p.addDamageWithoutPrevention(dmg, source);
|
||||||
|
} else if(combatDmg) {
|
||||||
|
p.addCombatDamage(dmg, source);
|
||||||
} else {
|
} else {
|
||||||
p.addDamage(dmg, source);
|
p.addDamage(dmg, source);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user