mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-12 23:44:58 +00:00
Added more debug logging to AI, fixed some bugs in AI
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
class Battle::AI
|
||||
#=============================================================================
|
||||
# Decide whether the opponent should use an item on the Pokémon
|
||||
# TODO: Maybe don't cure a status problem if the Pokémon has an ability or
|
||||
# something that makes it benefit from having that problem.
|
||||
#=============================================================================
|
||||
def pbEnemyShouldUseItem?
|
||||
item = nil
|
||||
@@ -14,7 +16,7 @@ class Battle::AI
|
||||
end
|
||||
# Register use of item
|
||||
@battle.pbRegisterItem(@user.index, item, idxTarget)
|
||||
PBDebug.log("[AI] #{@user.pbThis} (#{@user.index}) will use item #{GameData::Item.get(item).name}")
|
||||
PBDebug.log_ai("#{@user.name} will use item #{GameData::Item.get(item).name}")
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user