@@ -24,7 +24,10 @@ function weapon:isSingleUse() return self.one_use or false end
2424function weapon :hasConditionEffect (player )
2525 if self :getClassName () == ' claw' and not player .skills :check (' grapple' ) then
2626 return false -- if attacking with claws and missing grapple skill then no condition effect
27+ elseif self :getClassName () == ' bite' and not player .skills :check (' infection' ) then
28+ return false -- if attacking with bite and missing infection skill then no condition effect
2729 end
30+
2831 return (self .condition_effect and true ) or false
2932end
3033
@@ -96,7 +99,7 @@ local organic_modifier = {
9699 },
97100 bite = {
98101 dice = {' 1d5+1' , ' 1d5+2' },
99- included_skills = {' bite' , ' power_bite ' },
102+ included_skills = {' bite' , ' bite_adv ' },
100103 },
101104 fist = {
102105 dice = {' 1d2' },
@@ -123,9 +126,9 @@ function weapon:getDice(player, condition)
123126 if skill_count > 0 then
124127 local dice_str = organic_modifier .dice [skill_count ]
125128 weapon_dice = dice :new (dice_str )
126- end
127- end
129+ end
128130 -- else organic weapon has no modifier or player lacks all included skills then use weapons default dice
131+ end
129132 end
130133
131134 local mastered_skill = self :getMasterSkill ()
@@ -139,18 +142,6 @@ function weapon:getDice(player, condition)
139142 return tostring (weapon_dice )
140143end
141144
142- local skill_effects = {
143- poison = {
144- order = {' venom_adv' , ' venom' , ' stinger' },
145- stinger = {duration = ' 1d2+2' , amount = ' 1d5+10' },
146- venom = {duration = ' 1d3+2' , amount = ' 1d7+15' },
147- venom_adv = {duration = ' 1d4+3' , amount = ' 1d10+20' },
148- },
149- entangle = {
150-
151- }
152- }
153-
154145function weapon :getConditionEffect (player ) -- , condition) maybe for later...?
155146 local effect = self .condition_effect
156147 local duration , bonus_effect
@@ -159,21 +150,9 @@ function weapon:getConditionEffect(player) --, condition) maybe for later...?
159150 if effect == ' burn' then
160151 duration = weapon :getFuelAmount ()
161152 bonus_effect = weapon :isCombustionSource ()
162- elseif effect == ' decay' then
163-
164153 end
165154 elseif player :isMobType (' zombie' ) then
166- if effect == ' poison' then
167- for _ , skill in ipairs (skill_effects .poison .order ) do
168- if player .skills :check (skill ) then
169- duration = skill_effects .poison [skill ].duration
170- bonus_effect = skill_effects .poison [skill ].amount
171- break
172- end
173- end
174- elseif effect == ' infection' then
175-
176- elseif effect == ' entangle' then
155+ if effect == ' entangle' then
177156 if player .skills :check (' impale' ) then bonus_effect = true end -- possible to impale on crit hit
178157 end
179158 end
0 commit comments