Added Aura Wheel's visible type change in battle, added "display" methods for several move properties and examples of their use

This commit is contained in:
Maruno17
2021-12-06 22:00:27 +00:00
parent 95916e242e
commit 5a81d447d1
7 changed files with 361 additions and 16 deletions

View File

@@ -695,7 +695,7 @@ class PokemonSummary_Scene
for i in 0...Pokemon::MAX_MOVES
move=@pokemon.moves[i]
if move
type_number = GameData::Type.get(move.type).icon_position
type_number = GameData::Type.get(move.display_type(@pokemon)).icon_position
imagepos.push(["Graphics/Pictures/types", 248, yPos + 8, 0, type_number * 28, 64, 28])
textpos.push([move.name,316,yPos,0,moveBase,moveShadow])
if move.total_pp>0
@@ -761,7 +761,7 @@ class PokemonSummary_Scene
yPos += 20
end
if move
type_number = GameData::Type.get(move.type).icon_position
type_number = GameData::Type.get(move.display_type(@pokemon)).icon_position
imagepos.push(["Graphics/Pictures/types", 248, yPos + 8, 0, type_number * 28, 64, 28])
textpos.push([move.name,316,yPos,0,moveBase,moveShadow])
if move.total_pp>0
@@ -807,20 +807,20 @@ class PokemonSummary_Scene
@sprites["itemicon"].visible = false if @sprites["itemicon"]
textpos = []
# Write power and accuracy values for selected move
case selected_move.base_damage
case selected_move.display_damage(@pokemon)
when 0 then textpos.push(["---", 216, 148, 1, base, shadow]) # Status move
when 1 then textpos.push(["???", 216, 148, 1, base, shadow]) # Variable power move
else textpos.push([selected_move.base_damage.to_s, 216, 148, 1, base, shadow])
else textpos.push([selected_move.display_damage(@pokemon).to_s, 216, 148, 1, base, shadow])
end
if selected_move.accuracy == 0
if selected_move.display_accuracy(@pokemon) == 0
textpos.push(["---", 216, 180, 1, base, shadow])
else
textpos.push(["#{selected_move.accuracy}%", 216 + overlay.text_size("%").width, 180, 1, base, shadow])
textpos.push(["#{selected_move.display_accuracy(@pokemon)}%", 216 + overlay.text_size("%").width, 180, 1, base, shadow])
end
# Draw all text
pbDrawTextPositions(overlay, textpos)
# Draw selected move's damage category icon
imagepos = [["Graphics/Pictures/category", 166, 124, 0, selected_move.category * 28, 64, 28]]
imagepos = [["Graphics/Pictures/category", 166, 124, 0, selected_move.display_category(@pokemon) * 28, 64, 28]]
pbDrawImagePositions(overlay, imagepos)
# Draw selected move's description
drawTextEx(overlay, 4, 222, 230, 5, selected_move.description, base, shadow)

View File

@@ -67,7 +67,7 @@ class MoveRelearner_Scene
moveobject=@moves[@sprites["commands"].top_item+i]
if moveobject
moveData=GameData::Move.get(moveobject)
type_number = GameData::Type.get(moveData.type).icon_position
type_number = GameData::Type.get(moveData.display_type(@pokemon)).icon_position
imagepos.push(["Graphics/Pictures/types", 12, yPos + 8, 0, type_number * 28, 64, 28])
textpos.push([moveData.name,80,yPos,0,Color.new(248,248,248),Color.new(0,0,0)])
if moveData.total_pp>0
@@ -85,9 +85,9 @@ class MoveRelearner_Scene
0,78+(@sprites["commands"].index-@sprites["commands"].top_item)*64,
0,0,258,72])
selMoveData=GameData::Move.get(@moves[@sprites["commands"].index])
basedamage=selMoveData.base_damage
category=selMoveData.category
accuracy=selMoveData.accuracy
basedamage = selMoveData.display_damage(@pokemon)
category = selMoveData.display_category(@pokemon)
accuracy = selMoveData.display_accuracy(@pokemon)
textpos.push([_INTL("CATEGORY"),272,108,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([_INTL("POWER"),272,140,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([basedamage<=1 ? basedamage==1 ? "???" : "---" : sprintf("%d",basedamage),