From e4d60dfba3b49ea1a51e900083d0215e1b554cfa Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 19 Jun 2020 21:21:54 -0300 Subject: New function: alignment() --- npc/functions/util.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'npc') diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 6f21fb536..c23352147 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -589,6 +589,22 @@ function script nard_time { return INT_MAX; } +// alignment() → 1 if Good, -1 if Evil, 0 if Neutral +function script alignment { + .@m=getq(HurnscaldQuest_InjuriedMouboo); + + // Mouboo was slain: EVIL + if (.@m >= 9) + return -1; + + // Mouboo was saved and Sagratha rescued: GOOD + if (SAGRATHA_FRIENDSHIP >= 2) + return 1; + + // N/A: NEUTRAL + return 0; +} + // Returns if an event is a ranked Aurora Event or not // (Had to be moved from functions/aurora.txt) function script FYEventUsesRanking { -- cgit v1.2.3-60-g2f50