Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
- # ■ Battler Stat: Barehand
- # ■ Author: Bigace360
- # ■ Type: Actor Add-on
- # ■ Date: Feb, 2. 2012
- # ■ Version: 1.0
- #
- # For those that would like to give their actors stronger strength when no
- # weapon is equipped, there is a barehand stat now. You can adjust how strong
- # an actor's barehanded multiplier will grow each level so that way, you don't
- # have your actors going over the top strong from the beginning.
- #
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
- # Instructions
- # Just scroll down below and adjust the rules.
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
- # Compatibility
- # - Alias: Game_Actor: base_atk
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
- module ACE
- # This is the multiplier given to base attack when no weapon is equipped.
- BAREHAND_BASE_MULTIPLIER = 15
- BAREHAND_PER_LEVEL_BOOST = 10
- BARE_HAND_MAX_MULTIPLIER = 10
- # This is the array listing actors who fight barehanded by default.
- BAREHAND_ACTORS = [1, 2]
- # This is the array of classes that can fight barehanded.
- BAREHAND_CLASSES = [1, 7]
- end
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
- # ** Game_Party
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
- class Game_Party
- include ACE
- attr_accessor :barehand_actors
- attr_accessor :barehand_classes
- alias initialize_twohands initialize
- def initialize
- initialize_twohands
- @barehand_actors = BAREHAND_ACTORS.dup
- @barehand_classes = BAREHAND_CLASSES.dup
- end
- end
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
- # ** Game_Actor
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
- class Game_Actor < Game_Battler
- include ACE
- alias base_atk_bsb base_atk
- def base_atk
- n = base_atk_bsb
- barehand_trait = self.barehanded?
- n = barehanded_multiplier(n) if barehand_trait
- return Integer(n)
- end
- def weapons
- result = [$data_weapons[@weapon_id]]
- result.delete_if {|x| x == nil }
- return result
- end
- def barehanded_multiplier(value)
- multiplier = BAREHAND_BASE_MULTIPLIER
- multiplier += BAREHAND_PER_LEVEL_BOOST * (@level - 1)
- multiplier = [BARE_HAND_MAX_MULTIPLIER, multiplier].min
- value *= multiplier
- value /= 100
- return value
- end
- def barehanded?
- if self.weapons == nil
- return true if $game_party.barehand_actors.include?(@actor_id)
- return true if $game_party.barehand_classes.include?(@class_id)
- end
- return false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment