| Mirage Source http://miragesource.net/forums/ |
|
| Damage Ranges http://miragesource.net/forums/viewtopic.php?f=210&t=56 |
Page 1 of 1 |
| Author: | Tutorial Bot [ Thu Jun 01, 2006 9:35 pm ] |
| Post subject: | Damage Ranges |
Author: Fear Difficulty: 1/5 This is no big life changing tutorial, so don't think it is (I doubt you would anyway). It does, however, add a nice change to the game, because you don't always do the same damage. You do anywhere from 80% to 100% of it. :: SERVER SIDE :: Go to ModHandleData and find Sub HandleData. Find: Code: If Not CanPlayerCriticalHit(Index) Then Damage = GetPlayerDamage(Index) - GetPlayerProtection(i) Replace this with: Code: If Not CanPlayerCriticalHit(Index) Then n = Int((((GetPlayerDamage(Index) / 5) * 4) * Rnd) + 1) If n < (n * 4 / 5) Then n = (n * 4 / 5) End If Damage = n - GetPlayerProtection(i) All the new code does, is randomize possible damage from 80% to 100%, and then subtracts your foes armor from it. Simple enough, PvP now has damage ranges. Find: Code: If Not CanPlayerCriticalHit(Index) Then Damage = GetPlayerDamage(Index) - Int(Npc(MapNpc(GetPlayerMap(Index), i).Num).DEF / 2) Replace it with: Code: If Not CanPlayerCriticalHit(Index) Then n = Int((((GetPlayerDamage(Index) / 5) * 4) * Rnd) + 1) If n < (n * 4 / 5) Then n = (n * 4 / 5) End If Damage = n - Int(Npc(MapNpc(GetPlayerMap(Index), n).Num).DEF / 2) That's all! |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|