mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
Waged war against TODO comments in the AI, some refactoring of AI
This commit is contained in:
@@ -94,6 +94,8 @@ module Battle::AI::Handlers
|
||||
GeneralMoveAgainstTargetScore = HandlerHash.new
|
||||
ShouldSwitch = HandlerHash.new
|
||||
ShouldNotSwitch = HandlerHash.new
|
||||
AbilityRanking = AbilityHandlerHash.new
|
||||
ItemRanking = ItemHandlerHash.new
|
||||
|
||||
def self.move_will_fail?(function_code, *args)
|
||||
return MoveFailureCheck.trigger(function_code, *args) || false
|
||||
@@ -151,4 +153,14 @@ module Battle::AI::Handlers
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
def self.modify_ability_ranking(ability, score, *args)
|
||||
ret = AbilityRanking.trigger(ability, score, *args)
|
||||
return (ret.nil?) ? score : ret
|
||||
end
|
||||
|
||||
def self.modify_item_ranking(item, score, *args)
|
||||
ret = ItemRanking.trigger(item, score, *args)
|
||||
return (ret.nil?) ? score : ret
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user