Skip to content

Commit

Permalink
Black Tentacles: stop redirecting damage once owner is dead (fixes #386)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbjorge committed Mar 2, 2020
1 parent 097e36a commit c195a7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Fix crash in ManifestPatch reported in workshop comment
* Fix issue where card text was not being updated immediately after permanent damage changes (particularly, after drawing CULL) (thanks wang429)
* Fix issue where banishing one of the two enemies in the Spear and Shield fight would prevent Unceasing Top from working (thanks wang429)
* Black Tentacles now *immediately* stops redirecting damage once the target dies

## [v1.5.0] - 2020-02-23

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/stsjorbsmod/powers/BlackTentaclesPower.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public int onAnyMonsterHpLoss(AbstractMonster monster, DamageInfo originalDamage
// We accept null owner primarily for the sake of ExplosivePotion, see #299.
boolean isDamageFromApplicableSource = originalDamageInfo != null && (originalDamageInfo.owner == null || originalDamageInfo.owner == this.source);

if (monster != owner && isDamageFromApplicableSource && originalHpLoss > 0) {
if (monster != owner && isDamageFromApplicableSource && originalHpLoss > 0 && !owner.isDeadOrEscaped() && !owner.halfDead) {
this.flash();
DamageType newDamageType = originalDamageInfo.type == DamageType.HP_LOSS ? DamageType.HP_LOSS : DamageType.THORNS;
DamageInfo newDamageInfo = new DamageInfo(source, originalHpLoss, newDamageType);
Expand Down

0 comments on commit c195a7a

Please sign in to comment.