summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2021-08-07 21:21:02 +0200
committerHoraK-FDF <horak-fdf@web.de>2021-08-07 21:21:02 +0200
commita593fe1fbf19e988d61678ba9c00049a236baf11 (patch)
tree41134470089eba7f5b0296bb61520526e6d7d033
parent90414ed83cbc41a9d88690eb387474115a9769df (diff)
downloadserverdata-focus_skills.tar.gz
serverdata-focus_skills.tar.bz2
serverdata-focus_skills.tar.xz
serverdata-focus_skills.zip
changed back to switch and replaced ids with constantsfocus_skills
-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);