Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // For the Attacker (DiceRoll1), 1 = auto-miss, 20 = critical hit
- DiceRoll1 = number_range(1, 20)
- DiceRoll2 = number_range(1, 20)
- // Second Chance Feat
- If (ch has second chance feat) and (DiceRoll1 == 1)
- DiceRoll1 = number_range(1, 15) // no chance of a higher roll on second chance
- // Glance represents a glancing blow.
- // 4+ below Defender_Roll means a miss.
- // 1-3 below Defender_Roll means glancing blow.
- // 1 = 30% damage, 2 = 20% damage, 3 = 10% damage
- // 0 means reduced blow, 50% damage
- Attacker_Roll = DiceRoll1 + prof_bonus + get_curr_dex(ch) + GET_HITROLL(ch) + Combat_Level
- Defender_Roll = DiceRoll2 + get_curr_dex(ch) + Combat_Level + Offset - Size_Modifier
- // Offset on Defender_Roll is 10, but adjust as needed to balance
- // the hit/miss ratio on the MUD.
- // Size_Modifier is a modifier of how big the race of the defender is. Bigger means
- // easier to hit.
- Glance = Defender_Roll - Attacker_Roll
- if (DiceRoll1 == 1) or (Glance >= 4)
- Attack Missed
- // Calculate Damage Here, Etc.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement