mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Made AI function code-specific MoveFailureCheck handlers
This commit is contained in:
@@ -63,8 +63,9 @@ end
|
||||
#
|
||||
#===============================================================================
|
||||
module Battle::AI::Handlers
|
||||
MoveEffectScore = HandlerHash.new
|
||||
MoveBasePower = HandlerHash.new
|
||||
MoveEffectScore = HandlerHash.new
|
||||
MoveBasePower = HandlerHash.new
|
||||
MoveFailureCheck = HandlerHash.new
|
||||
# Move type
|
||||
# Move accuracy
|
||||
# Move target
|
||||
@@ -72,6 +73,10 @@ module Battle::AI::Handlers
|
||||
# Move unselectable check
|
||||
# Move failure check
|
||||
|
||||
def self.move_will_fail?(function_code, *args)
|
||||
return MoveFailureCheck.trigger(function_code, *args) || false
|
||||
end
|
||||
|
||||
def self.apply_move_effect_score(function_code, score, *args)
|
||||
ret = MoveEffectScore.trigger(function_code, score, *args)
|
||||
return (ret.nil?) ? score : ret
|
||||
|
||||
Reference in New Issue
Block a user