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

@@ -1,3 +1,9 @@
# NOTE: The following clauses have battle code implementing them, but no class
# below to apply them:
# "drawclause"
# "modifiedselfdestructclause"
# "suddendeath"
#===============================================================================
#
#===============================================================================
@@ -58,7 +64,7 @@ end
#
#===============================================================================
class PerishSongClause < BattleRule
def setRule(battle); battle.rules["perishsong"] = true; end
def setRule(battle); battle.rules["perishsongclause"] = true; end
end
#===============================================================================

View File

@@ -42,7 +42,7 @@ def pbRandomMove
loop do
move_id = keys.sample
move = GameData::Move.get(move_id)
next if move.id == :SKETCH || move.id == :STRUGGLE
next if ["Struggle", "ReplaceMoveWithTargetLastMoveUsed"].include?(move.function_code)
return move.id
end
end

View File

@@ -401,7 +401,7 @@ def pbRuledBattle(team1, team2, rule)
items2[i] = p.item_id
trainer2.party.push(p)
end
scene = Battle::DebugSceneNoLogging.new
scene = Battle::DebugSceneNoVisuals.new
battle = rule.createBattle(scene, trainer1, trainer2)
battle.debug = true
battle.controlPlayer = true