Skip to content

Commit

Permalink
Factor level & HP amount into Ermenegilda's price
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Jun 22, 2024
1 parent e6e76a7 commit 160f485
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* (C) Copyright 2003-2019 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -15,7 +15,7 @@

import games.stendhal.server.core.config.ZoneConfigurator;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.entity.npc.SpeakerNPC;
import games.stendhal.server.entity.npc.HealerNPC;
import games.stendhal.server.entity.npc.behaviour.adder.HealerAdder;
import games.stendhal.server.entity.npc.behaviour.impl.MonologueBehaviour;

Expand All @@ -37,8 +37,9 @@ public void configureZone(final StendhalRPZone zone, final Map<String, String> a
new MonologueBehaviour(buildNPC(zone), mumbles, 1);
}

private SpeakerNPC buildNPC(final StendhalRPZone zone) {
final SpeakerNPC npc = new SpeakerNPC("Ermenegilda") {
private HealerNPC buildNPC(final StendhalRPZone zone) {
//final SpeakerNPC npc = new SpeakerNPC("Ermenegilda") {
final HealerNPC npc = new HealerNPC("Ermenegilda") {

@Override
public void createDialog() {
Expand All @@ -54,7 +55,9 @@ public void createDialog() {
npc.setDescription("You see Ermenegilda... Maybe she can heal you!");
npc.setPosition(18, 105);
//heal according to player level (cost -1)
new HealerAdder().addHealer(npc, -1);
//new HealerAdder().addHealer(npc, -1);
npc.setLevelPriceFactor(100);
new HealerAdder().addHealer(npc);
npc.initHP(100);
zone.add(npc);
return npc;
Expand Down

0 comments on commit 160f485

Please sign in to comment.