Advertisement
Ultimga

Untitled

Jan 19th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. options:
  2. skill-damage-bonus: 0.1 # Scale of damage bonus by skill level
  3.  
  4. crit-damage: 1.5 # Critical damage percentage
  5. crit-chance-base: 0.05 # Critical chance base is 1/20
  6. crit-chance-scale: 0.002 # Scale critical chance with skill up to an additional 4/20
  7.  
  8. sneak-damage: 1.25 # Sneak attack damage
  9.  
  10. on damage:
  11. # Get weapon damage--------
  12. # Get skill used
  13.  
  14. # Increase damage based on skill level
  15. if {_skill} != "":
  16. set {_damageBonus} to getSkillLevel({_attackerUID}, {_skill}) * {@skill-damage-bonus}
  17. add {_damageBonus} to {_damage}
  18.  
  19. # Perform sneak attacks
  20. if {_attacker} is sneaking: # TODO: Check if attacker is 'hidden' from the target to make less OP
  21. if {_victim}'s target is not {_attacker}:
  22. set {_damage} to {_damage} * {@sneak-damage}
  23. message "&c** Sneak attack! **" to {_attacker}
  24.  
  25. # Perform critical hits
  26. set {_critChance} to {@crit-chance-base}
  27. if {_skill} != "":
  28. add getSkillLevel({_attackerUID}, {_skill}) * {@crit-chance-scale} to {_critChance}
  29.  
  30. chance of {_critChance}%:
  31. set {_damage} to {_damage} * {@crit-damage}
  32. message "&c** Critical hit! **" to {_attacker}
  33.  
  34. # Perform charged attacks
  35. if {attackCharge.%{_attackerUID}%} > 0.834:
  36. set {_chargedAttack} to nbtItemGetString("eCharged")
  37.  
  38. if {_chargedAttack} = "Hurl":
  39. # hurl enemy
  40. else if {_chargedAttack} = "Pierce":
  41. # deal damage that ignores armor
  42. else if {_chargedAttack} = "Bleed":
  43. # cause bleed
  44. else if {_chargedAttack} = "Dent":
  45. # bonus damage to armor/shield
  46. else if {_chargedAttack} = "Taunt":
  47.  
  48. else if {_chargedAttack} = "":
  49. else if {_chargedAttack} = "":
  50. else if {_chargedAttack} = "":
  51.  
  52. event.setDamage({_damage})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement