V0.2.0: fixed two bugs with buff logic.
This commit is contained in:
parent
41d0ca00da
commit
9224f1539a
|
@ -39,14 +39,13 @@ public class Drowsy extends Buff {
|
||||||
if (target instanceof Hero)
|
if (target instanceof Hero)
|
||||||
if (target.HP == target.HT) {
|
if (target.HP == target.HT) {
|
||||||
GLog.i("You are too healthy, and resist the urge to sleep.");
|
GLog.i("You are too healthy, and resist the urge to sleep.");
|
||||||
detach();
|
|
||||||
} else {
|
} else {
|
||||||
GLog.i("You fall into a deep magical sleep.");
|
GLog.i("You fall into a deep magical sleep.");
|
||||||
Buff.affect(target, MagicalSleep.class);
|
Buff.affect(target, MagicalSleep.class);
|
||||||
detach();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Buff.affect(target, MagicalSleep.class);
|
Buff.affect(target, MagicalSleep.class);
|
||||||
|
detach();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
placed = true;
|
placed = true;
|
||||||
|
|
|
@ -34,8 +34,10 @@ public class Regeneration extends Buff {
|
||||||
}
|
}
|
||||||
|
|
||||||
ChaliceOfBlood.chaliceRegen regenBuff = Dungeon.hero.buff( ChaliceOfBlood.chaliceRegen.class);
|
ChaliceOfBlood.chaliceRegen regenBuff = Dungeon.hero.buff( ChaliceOfBlood.chaliceRegen.class);
|
||||||
|
if (regenBuff != null)
|
||||||
spend( REGENERATION_DELAY - regenBuff.level() );
|
spend( REGENERATION_DELAY - regenBuff.level() );
|
||||||
|
else
|
||||||
|
spend( REGENERATION_DELAY );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user