v0.7.4: allies are now healed by magical sleep just as the hero is

This commit is contained in:
Evan Debenham 2019-07-07 21:41:37 -04:00
parent 93c312a53e
commit 3841f593f8
2 changed files with 10 additions and 8 deletions

View File

@ -38,14 +38,16 @@ public class MagicalSleep extends Buff {
target.paralysed++;
if (target instanceof Hero) {
if (target.alignment == Char.Alignment.ALLY) {
if (target.HP == target.HT) {
GLog.i(Messages.get(this, "toohealthy"));
if (target instanceof Hero) GLog.i(Messages.get(this, "toohealthy"));
detach();
} else {
GLog.i(Messages.get(this, "fallasleep"));
if (target instanceof Hero) GLog.i(Messages.get(this, "fallasleep"));
}
} else if (target instanceof Mob) {
}
if (target instanceof Mob) {
((Mob) target).state = ((Mob) target).SLEEPING;
}
@ -61,11 +63,11 @@ public class MagicalSleep extends Buff {
detach();
return true;
}
if (target instanceof Hero) {
if (target.alignment == Char.Alignment.ALLY) {
target.HP = Math.min(target.HP+1, target.HT);
((Hero) target).resting = true;
if (target instanceof Hero) ((Hero) target).resting = true;
if (target.HP == target.buff(Regeneration.class).regencap()) {
GLog.p(Messages.get(this, "wakeup"));
if (target instanceof Hero) GLog.p(Messages.get(this, "wakeup"));
detach();
}
}

View File

@ -890,7 +890,7 @@ items.scrolls.scrollofidentify.desc=This scroll permanently reveals all of the s
items.scrolls.scrolloflullaby.name=scroll of lullaby
items.scrolls.scrolloflullaby.sooth=The scroll utters a soothing melody. You feel very sleepy.
items.scrolls.scrolloflullaby.desc=Reading this scroll emits a soothing melody which will lull all who hear it into a deep magical sleep.
items.scrolls.scrolloflullaby.desc=Reading this scroll emits a soothing melody which will lull all who hear it into a deep magical sleep. For the reader and their allies the sleep is restorative.
items.scrolls.scrollofmagicmapping.name=scroll of magic mapping
items.scrolls.scrollofmagicmapping.layout=You are now aware of the level layout.