From 9cc6d36066b18da37a609ef2773df091df4afa09 Mon Sep 17 00:00:00 2001 From: howard Date: Tue, 24 Sep 2024 13:16:12 -0700 Subject: [PATCH 1/2] Add new condtional logic to check for plasma field on a whip move activation --- src/abilities/Headless.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/abilities/Headless.ts b/src/abilities/Headless.ts index 2ea340f0a..c23aaa01d 100755 --- a/src/abilities/Headless.ts +++ b/src/abilities/Headless.ts @@ -1,5 +1,5 @@ import { Damage } from '../damage'; -import { Team } from '../utility/team'; +import { isTeam, Team } from '../utility/team'; import * as matrices from '../utility/matrices'; import { Effect } from '../effect'; import Game from '../game'; @@ -272,7 +272,22 @@ export default (G: Game) => { let destinationX = null; let destinationTargetX = null; const isOnLeft = headless.x < target.x; - if (target.size === 1) { + + if ( + target.isDarkPriest() && + target.hasCreaturePlayerGotPlasma() && + !isTeam(this.creature, target, Team.Ally) + ) { + /* Target creature is a plasma fielded enemy dark priest + blocking the ability and triggering a counter damage if upgraded field */ + destinationTargetX = 0; + const d = { + slash: 1, + }; + const damage = new Damage(ability.creature, d, 1, [], G); + + target.takeDamage(damage); + } else if (target.size === 1) { /* Small creature, pull target towards self landing it in the hex directly in front of the Headless. */ destinationTargetX = isOnLeft ? headless.x + 1 : headless.x - 2; From b65e0a142f5dd207ce157ceb4fa184ae57ff4687 Mon Sep 17 00:00:00 2001 From: Dread Knight Date: Wed, 25 Sep 2024 06:57:47 +0300 Subject: [PATCH 2/2] capitalized unit name --- src/abilities/Headless.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abilities/Headless.ts b/src/abilities/Headless.ts index c23aaa01d..dc819e1bb 100755 --- a/src/abilities/Headless.ts +++ b/src/abilities/Headless.ts @@ -278,7 +278,7 @@ export default (G: Game) => { target.hasCreaturePlayerGotPlasma() && !isTeam(this.creature, target, Team.Ally) ) { - /* Target creature is a plasma fielded enemy dark priest + /* Target creature is a plasma fielded enemy Dark Priest blocking the ability and triggering a counter damage if upgraded field */ destinationTargetX = 0; const d = {