Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. special_on_hit = {desc="9% chance to stun or confuse the target", fct=function(combat, who, target)
  2. if not rng.percent(9) then return end
  3. local eff = rng.table{"stun", "confusion"}
  4. if not target:canBe(eff) then return end
  5. if not target:checkHit(who:combatAttack(combat), target:combatPhysicalResist(), 15) then return end
  6. if eff == "stun" then target:setEffect(target.EFF_STUNNED, 3, {})
  7. elseif eff == "confusion" then target:setEffect(target.EFF_CONFUSED, 3, {power=75})
  8. end
  9. end},
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement