Merge branch 'ai' into dev

This commit is contained in:
Maruno17
2023-05-14 18:36:25 +01:00
160 changed files with 75932 additions and 5730 deletions

View File

@@ -410,7 +410,7 @@ class Battle::Scene
# Returns the animation ID to use for a given move/user. Returns nil if that
# move has no animations defined for it.
def pbFindMoveAnimDetails(move2anim, moveID, idxUser, hitNum = 0)
real_move_id = GameData::Move.get(moveID).id
real_move_id = GameData::Move.try_get(moveID)&.id || moveID
noFlip = false
if (idxUser & 1) == 0 # On player's side
anim = move2anim[0][real_move_id]
@@ -440,7 +440,7 @@ class Battle::Scene
moveType = moveData.type
moveKind = moveData.category
moveKind += 3 if target_data.num_targets > 1 || target_data.affects_foe_side
moveKind += 3 if moveKind == 2 && target_data.num_targets > 0
moveKind += 3 if moveData.status? && target_data.num_targets > 0
# [one target physical, one target special, user status,
# multiple targets physical, multiple targets special, non-user status]
typeDefaultAnim = {