Skip to content

Simplify Alcohol Script for consistency, and replace penalty

Jesusalva Jesusalva requested to merge jesusalva/AlcoholCap into master

This replaces Alcohol to use SC_Bonus, which became the de-facto default.

SC_Bonus was made based on Alcohol code, but it received improvements over time. So I decided it was time to let the parent code go.

I also replaced the penalty. The ASPD penalty never struck me as "right". I tried SC_FROSTMISTY (which slows you down, reduces ASPD, etc. ─ more effects but less duration) and SC_QUAGMIRE (reduces DEX/AGI and nullifies buffs for them, slows you down).

But I opted for SC_HALT_REGENERATION. It is used elsewhere as well and is inflexible: While the effect is active, regardless of what drink you used, healing yourself (by magic, not by potions) will be ineffective, and natural regen is inhibited or disabled ─ likely the later).

Old reasons This is a feeble attempt to prevent an overflow, but actually catching it is harder, so it just adds some limits to ensure it'll at very least finish.

Debug can be done later.

Error Message (Server Console):

[Warning]: script:op_2num: overflow detected op=C_ADD i1=2147483647 i2=840000 [Debug]: Source (NPC): alcohol_sc (invisible/not on a map)

This prevents the alcohol from having full effects.

Edited by Jesusalva Jesusalva

Merge request reports