package com.hearthsim.card.weapon.concrete;

import com.hearthsim.card.Card;
import com.hearthsim.card.minion.Minion;
import com.hearthsim.card.weapon.WeaponCard;
import com.hearthsim.event.EffectMinionAction;
import com.hearthsim.event.deathrattle.DeathrattleDamageAllMinions;
import com.hearthsim.event.deathrattle.DeathrattleEffectRandomMinion;
import com.hearthsim.model.BoardModel;
import com.hearthsim.model.PlayerSide;

public class Powermace extends WeaponCard {
    public Powermace() {
        super();
        this.deathrattleAction_ = new DeathrattleEffectRandomMinion(new PowermaceEffect());
    }

    private class PowermaceEffect extends EffectMinionAction {
        public boolean canEffect(PlayerSide originSide, Card origin, PlayerSide targetSide, Minion targetCharacter, BoardModel board) {
            if (targetSide != originSide) {
                return false;
            }

            if (targetCharacter.getTribe() != Minion.MinionTribe.MECH) {
                return false;
            }

            if (targetCharacter == origin) {
                return false;
            }

            if (targetCharacter.isHero()) {
                return false;
            }

            return true;
        }

        public void applyEffect(PlayerSide originSide, Card origin, PlayerSide targetSide, int targetCharacterIndex, BoardModel board) {
            Minion targetCharacter = board.modelForSide(targetSide).getCharacter(targetCharacterIndex);
            targetCharacter.addAttack((byte) 2);
            targetCharacter.addHealth((byte) 2);
            targetCharacter.addMaxHealth((byte) 2);
        }
    }
}

@@ -207,76 +207,8 @@
 on;%0A
-import com.hearthsim.event.deathrattle.DeathrattleDamageAllMinions;%0A
 impo
@@ -600,16 +600,82 @@
 ction %7B%0A
+        protected boolean canEffectOwnMinions() %7B return true; %7D%0A%0A
         
@@ -822,32 +822,80 @@
 if (
-target
+!super.canEffect(origin
 Side
- !=
+,
  origin
-Side
+, targetSide, targetCharacter, board)
 ) %7B%0A
@@ -1061,187 +1061,8 @@
  %7D%0A%0A
-            if (targetCharacter == origin) %7B%0A                return false;%0A            %7D%0A%0A            if (targetCharacter.isHero()) %7B%0A                return false;%0A            %7D%0A%0A
     

Use newer pattern for PowermaceEffect