Specific messages instead of FFT for disengage (#136)

* Specific messages instead of FFT for disengage

* return early to prevent ghost messages for disengage
This commit is contained in:
thmsndk
2024-05-21 10:39:54 +02:00
committed by GitHub
parent 4a9f9455cb
commit c584e56f09
2 changed files with 44 additions and 5 deletions
+4 -3
View File
@@ -11431,7 +11431,8 @@ function stop_pursuit(monster, args) {
monster.u = true;
monster.irregular = 2;
calculate_monster_stats(monster);
xy_emit(monster, "ui", { id: monster.id, type: "disengage", event: true });
// Forward args.cause to the UI so it can give different messages
xy_emit(monster, "ui", { id: monster.id, type: "disengage", event: true, cause: args.cause });
}
function defeated_by_a_monster(attacker, player) {
@@ -11753,7 +11754,7 @@ function update_instance(instance) {
var theone = random_one(c);
if (theone) {
if (monster.target && get_player(monster.target)) {
stop_pursuit(monster);
stop_pursuit(monster, { cause: "anger" });
}
target_player(monster, theone);
}
@@ -11778,7 +11779,7 @@ function update_instance(instance) {
var theone = random_one(c);
if (theone) {
if (monster.target && get_player(monster.target)) {
stop_pursuit(monster);
stop_pursuit(monster, { cause: "warpstomp" });
}
target_player(monster, theone);
port_monster(monster, theone, { stomp: 160 });