Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if $BlizzABS
- class BlizzABS::Processor
- def exp_factor(actor, gold)
- lvl = gold - actor.level #compare the Enemy Level(EXP field)
- #with the actor's current level
- sexp = 0
- case lvl
- when 16..100000 # The instance where enemies are 16+ levels higher than you.
- sexp = 10.0
- when 15
- sexp = 5.0
- when 14
- sexp = 4.25
- when 13
- sexp = 3.5
- when 12
- sexp = 3.0
- when 11
- sexp = 2.5
- when 10
- sexp = 2.25
- when 9
- sexp = 2.0
- when 8
- sexp = 1.75
- when 7
- sexp = 1.55
- when 6
- sexp = 1.4
- when 5
- sexp = 1.3
- when 4
- sexp = 1.25 # enemy levels are higher than yours.
- when 3
- sexp = 1.15 #^
- when 2 #|
- sexp = 1.1 #|
- when 1 #|
- sexp = 1.05
- when 0 # The instance where enemeis and yourself are the same level.
- sexp = 1.0
- when -1 #|
- sexp = 0.95 #|
- when -2 #|
- sexp = 0.9 #v
- when -3
- sexp = 0.8 #enemy levels are lower than yours.
- when -4
- sexp = 0.7
- when -5
- sexp = 0.6
- when -6
- sexp = 0.5
- when -7
- sexp = 0.4
- when -8
- sexp = 0.3
- when -9
- sexp = 0.2
- when -10
- sexp = 0.1
- when -11
- sexp = 0.05
- when -100000..-12 # The instance where you are 12+ levels higher than the foe.
- sexp = 0.01
- end
- return sexp
- end
- #----------------------------------------------------------------------------
- # exp_result
- # enemy - the killed enemy event
- # Processes EXP gain after the death of an enemy.
- #----------------------------------------------------------------------------
- def exp_result(enemy)
- # get EXP
- exp = enemy.exp if enemy.exp != nil
- gold = enemy.gold if enemy.gold != nil
- # All the stuff dealing with TONs
- if $tons_version != nil
- # if version is correct and using Different Difficulties
- if $tons_version >= 6.4 && TONS_OF_ADDONS::DIFFICULTY
- # multiply gained gold
- exp = exp * $game_system.exp_rate / 100
- end
- # if version is correct and using Passive Skills
- if $tons_version >= 6.5 && $game_system.PASSIVE_SKILLS
- # multiply gained gold with each actor's rate
- $game_party.actors.each {|actor| exp *= actor.exp_rate}
- exp = exp.to_i
- end
- end
- # iterate through all party members
- $game_party.actors.each {|actor|
- # increase EXP except if actor can't get EXP
- actor.exp += (exp * exp_factor(actor, gold)).ceil unless actor.cant_get_exp?}
- # return exp value for further processing
- return exp
- end#def
- end#class
- $BlizzABS = BlizzABS::Processor.new
- end#if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement