Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # Random code creating a unique skill /item damage formula.
- # not really used within my game, feel free to adjust and use or whatever..
- # No credit is required.
- #
- #===============================================================================
- class Game_Battler < Game_BattlerBase
- #===============================================================================
- #-----------------------------------------------------------------------------
- # In the formula box, put
- # a.custom_skill(b,true)
- # or
- # a.custom_skill(b)
- # or
- # b.custom_skill(a,true)
- # or
- # b.custom_skill(a)
- # - Depending on who is attacking / Skill type / Whatever.
- #-----------------------------------------------------------------------------
- def custom_skill(enemy,magic = false)
- # / Checks if skill is magic
- if magic
- # // Gets simple damage formula
- x = [[self.mat*1.6 - enemy.mdf].min,1].max
- else
- # // Repeats process but for non magic attack
- x = [[self.atk*1.6 - enemy.def].min,1].max
- end
- # // Gets value of variable id 25
- y = $game_variables[25]
- # // Gets multiplier.. If game switch 50 is on, mult is 10, else, 1
- z = $game_switches[50] ? 10 : 1
- # // Perform another damage calculation
- dmg = state?(12) ? x + y * z : x * z
- # // Returns damage output
- return dmg
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement