Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. // For the Attacker (DiceRoll1), 1 = auto-miss, 20 = critical hit
  2. DiceRoll1 = number_range(1, 20)
  3. DiceRoll2 = number_range(1, 20)
  4.  
  5. // Second Chance Feat
  6. If (ch has second chance feat) and (DiceRoll1 == 1)
  7. DiceRoll1 = number_range(1, 15) // no chance of a higher roll on second chance
  8.  
  9. // Glance represents a glancing blow.
  10. // 4+ below Defender_Roll means a miss.
  11. // 1-3 below Defender_Roll means glancing blow.
  12. // 1 = 30% damage, 2 = 20% damage, 3 = 10% damage
  13. // 0 means reduced blow, 50% damage
  14.  
  15. Attacker_Roll = DiceRoll1 + prof_bonus + get_curr_dex(ch) + GET_HITROLL(ch) + Combat_Level
  16. Defender_Roll = DiceRoll2 + get_curr_dex(ch) + Combat_Level + Offset - Size_Modifier
  17.  
  18. // Offset on Defender_Roll is 10, but adjust as needed to balance
  19. // the hit/miss ratio on the MUD.
  20.  
  21. // Size_Modifier is a modifier of how big the race of the defender is. Bigger means
  22. // easier to hit.
  23.  
  24. Glance = Defender_Roll - Attacker_Roll
  25. if (DiceRoll1 == 1) or (Glance >= 4)
  26. Attack Missed
  27.  
  28. // Calculate Damage Here, Etc.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement