summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-08-04 20:39:06 +0200
committerFedja Beader <fedja@protonmail.ch>2025-03-23 22:17:19 +0000
commit60d07384971debdda4c5950cceb9921988be8178 (patch)
tree399b0bef4f780a9df16b612fbae7868d940773ce
parent16bd3c94fcea9a8c5a2cab817c35cc34ac5d8792 (diff)
downloadserverdata-60d07384971debdda4c5950cceb9921988be8178.tar.gz
serverdata-60d07384971debdda4c5950cceb9921988be8178.tar.bz2
serverdata-60d07384971debdda4c5950cceb9921988be8178.tar.xz
serverdata-60d07384971debdda4c5950cceb9921988be8178.zip
Reword & reformat alcohol code
-rw-r--r--npc/items/alcohol.txt25
1 files changed, 15 insertions, 10 deletions
diff --git a/npc/items/alcohol.txt b/npc/items/alcohol.txt
index d380a1367..75f90f525 100644
--- a/npc/items/alcohol.txt
+++ b/npc/items/alcohol.txt
@@ -40,11 +40,15 @@ OnUse:
if (ALC_THRESHOLD) {
.@vit=readparam2(bVit);
if (@Alcohol+ALC_THRESHOLD > .@vit) {
- if (GSET_ALCOHOL_NOOVERDRINK) dispbottom l("You vomit, you are too drunk for this to have effect anymore.");
- else dispbottom l("You vomit, you are too drunk and drinking is harmful.");
+ if (GSET_ALCOHOL_NOOVERDRINK)
+ dispbottom l("You vomit, you are too drunk for this to have effect anymore.");
+ else
+ dispbottom l("You vomit, you are too drunk and drinking is harmful.");
+
dispbottom l("Raise vitality to be able to drink even more.");
- sc_start SC_CONFUSION, 5000, 0, 10000, SCFLAG_NOAVOID; // Warning, forces user to use @resync!
- if (GSET_ALCOHOL_NOOVERDRINK) end;
+ sc_start SC_CONFUSION, 5000, 0, 10000, SCFLAG_NOAVOID; // Warning, forces user to use @resync!
+ if (GSET_ALCOHOL_NOOVERDRINK)
+ end;
percentheal -@Alcohol, -@Alcohol;
}
}
@@ -71,20 +75,21 @@ OnUse:
.@multiplier += 4;
else if (getmapinfo(MAPINFO_ZONE, .@m$) == "SuperMMO")
.@multiplier += 8; // Max is 4.0% per user, or 7.2% if MK is dead
+
.@bonus=.@bonus*.@multiplier/10;
@taste+=min(@taste, .@bonus);
- // Alcohol EXP Bonus is ponderate average, so having more VIT doesn't means
- // more experience - only more time (be careful when mixing alcohol!)
+ // Alcohol EXP Bonus is ponderate average, so having more to drink doesen't
+ // mean more experience - only more time (be careful when mixing alcohol!)
SC_Bonus(.@delay, SC_OVERLAPEXPUP, @taste);
// Recalculate Alcohol Threshold and time
- ALC_THRESHOLD+=@Alcohol;
+ ALC_THRESHOLD += @Alcohol;
if (ALC_DELAYTIME < gettimetick(2)) {
- ALC_DELAYTIME=gettimetick(2);
- ALC_THRESHOLD=@Alcohol;
+ ALC_DELAYTIME = gettimetick(2);
+ ALC_THRESHOLD = @Alcohol;
}
- ALC_DELAYTIME+=.@delay;
+ ALC_DELAYTIME += .@delay;
// For debuff I'll use inc_sc_bonus utilities
// (Now that I switched from SC_ATTHASTE_INFINITY to SC_HALT_REGENERATION,