v3.2.0: fixed body form working on all weapon wielders
This commit is contained in:
@@ -32,9 +32,11 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.cleric.AscendedForm;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.duelist.ElementalStrike;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.rogue.ShadowClone;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.BodyForm;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.HolyWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.Smite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.MirrorImage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.KindOfWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||
@@ -128,7 +130,9 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
boolean wasAlly = defender.alignment == Char.Alignment.ALLY;
|
||||
if (attacker.buff(MagicImmune.class) == null) {
|
||||
Enchantment trinityEnchant = null;
|
||||
if (Dungeon.hero.buff(BodyForm.BodyFormBuff.class) != null && this instanceof MeleeWeapon){
|
||||
//only when it's the hero or a char that uses the hero's weapon
|
||||
if (Dungeon.hero.buff(BodyForm.BodyFormBuff.class) != null && this instanceof MeleeWeapon
|
||||
&& (attacker == Dungeon.hero || attacker instanceof MirrorImage || attacker instanceof ShadowClone.ShadowAlly)){
|
||||
trinityEnchant = Dungeon.hero.buff(BodyForm.BodyFormBuff.class).enchant();
|
||||
if (enchantment != null && trinityEnchant != null && trinityEnchant.getClass() == enchantment.getClass()){
|
||||
trinityEnchant = null;
|
||||
|
||||
Reference in New Issue
Block a user