v0.2.2: corrected sleep immunity interaction with magical sleep/drowsy

This commit is contained in:
Evan Debenham
2014-10-30 13:50:39 -04:00
parent 55b920f9bb
commit 403fe0e026
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ public class Drowsy extends Buff {
}
public boolean attachTo( Char target ) {
if (super.attachTo(target)) {
if (super.attachTo(target) && !target.immunities().contains(Sleep.class)) {
if (cooldown() == 0)
spend(Random.Int(3, 6));
return true;

View File

@@ -30,7 +30,7 @@ public class MagicalSleep extends Buff {
@Override
public boolean attachTo( Char target ) {
if (super.attachTo( target )) {
if (super.attachTo( target ) && !target.immunities().contains(Sleep.class)) {
if (target instanceof Hero)
if (target.HP == target.HT) {