summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/magic/final.txt22
1 files changed, 15 insertions, 7 deletions
diff --git a/npc/magic/final.txt b/npc/magic/final.txt
index 055fe495..5250bcf8 100644
--- a/npc/magic/final.txt
+++ b/npc/magic/final.txt
@@ -244,13 +244,21 @@ function script HUB_PCBonus {
{
// atm trolls can use raging, I thought it's ok since they do damage over Str and have only a range of 3
@item_crit = 0;
-
- if (getequipname(EQI_HEAD_TOP) == "AssassinMask" || getequipname(EQI_HEAD_TOP) == "BullHelmet")
- @item_crit = 15;
- else if (getequipname(EQI_HEAD_TOP) == "Monocle" || getequipname(EQI_HEAD_TOP) == "Pipe")
- @item_crit = 10;
-
- if (getequipname(EQI_HAND_R) == "Beheader")
+ switch (getequipid(EQI_HEAD_TOP))
+ {
+ case AssassinMask:
+ case BullHelmet:
+ @item_crit = 15;
+ break;
+ case Monocle:
+ case Pipe:
+ @item_crit = 10;
+ break;
+ default:
+ @item_crit = 0;
+ break;
+ }
+ if (getequipid(EQI_HAND_R) == Beheader)
@item_crit -= 25;
bonus bCritical, (getskilllv(SKILL_RAGING))*((readparam2(UDT_DEX)/40)+(readparam2(UDT_LUK)/30)+(@item_crit/10)+(readparam2(UDT_STR)/10)-2);