v0.2.2: corrected sleep immunity interaction with magical sleep/drowsy
This commit is contained in:
@@ -29,7 +29,7 @@ public class Drowsy extends Buff {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean attachTo( Char target ) {
|
public boolean attachTo( Char target ) {
|
||||||
if (super.attachTo(target)) {
|
if (super.attachTo(target) && !target.immunities().contains(Sleep.class)) {
|
||||||
if (cooldown() == 0)
|
if (cooldown() == 0)
|
||||||
spend(Random.Int(3, 6));
|
spend(Random.Int(3, 6));
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class MagicalSleep extends Buff {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean attachTo( Char target ) {
|
public boolean attachTo( Char target ) {
|
||||||
if (super.attachTo( target )) {
|
if (super.attachTo( target ) && !target.immunities().contains(Sleep.class)) {
|
||||||
|
|
||||||
if (target instanceof Hero)
|
if (target instanceof Hero)
|
||||||
if (target.HP == target.HT) {
|
if (target.HP == target.HT) {
|
||||||
|
|||||||
Reference in New Issue
Block a user