Added AI handlers that calculate a move's base power, moved AI damage calculation

This commit is contained in:
Maruno17
2022-08-25 19:16:21 +01:00
parent cfb870c944
commit b6c84fa278
12 changed files with 581 additions and 457 deletions

View File

@@ -73,14 +73,12 @@ module Battle::AI::Handlers
# Move failure check
def self.apply_move_effect_score(function_code, score, *args)
function_code = function_code.to_sym
ret = MoveEffectScore.trigger(function_code, score, *args)
return (ret.nil?) ? score : ret
end
def self.get_base_power(function_code, power, *args)
function_code = function_code.to_sym
ret = MoveBasePower.trigger(function_code, *args)
ret = MoveBasePower.trigger(function_code, power, *args)
return (ret.nil?) ? power : ret
end
end