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

@@ -82,6 +82,301 @@ module GameData
return false return false
end end
def display_type(pkmn, move = nil)
=begin
case @function_code
when "TypeDependsOnUserIVs"
return pbHiddenPower(pkmn)[0]
when "TypeAndPowerDependOnUserBerry"
type_array = {
:NORMAL => [:CHILANBERRY],
:FIRE => [:CHERIBERRY, :BLUKBERRY, :WATMELBERRY, :OCCABERRY],
:WATER => [:CHESTOBERRY, :NANABBERRY, :DURINBERRY, :PASSHOBERRY],
:ELECTRIC => [:PECHABERRY, :WEPEARBERRY, :BELUEBERRY, :WACANBERRY],
:GRASS => [:RAWSTBERRY, :PINAPBERRY, :RINDOBERRY, :LIECHIBERRY],
:ICE => [:ASPEARBERRY, :POMEGBERRY, :YACHEBERRY, :GANLONBERRY],
:FIGHTING => [:LEPPABERRY, :KELPSYBERRY, :CHOPLEBERRY, :SALACBERRY],
:POISON => [:ORANBERRY, :QUALOTBERRY, :KEBIABERRY, :PETAYABERRY],
:GROUND => [:PERSIMBERRY, :HONDEWBERRY, :SHUCABERRY, :APICOTBERRY],
:FLYING => [:LUMBERRY, :GREPABERRY, :COBABERRY, :LANSATBERRY],
:PSYCHIC => [:SITRUSBERRY, :TAMATOBERRY, :PAYAPABERRY, :STARFBERRY],
:BUG => [:FIGYBERRY, :CORNNBERRY, :TANGABERRY, :ENIGMABERRY],
:ROCK => [:WIKIBERRY, :MAGOSTBERRY, :CHARTIBERRY, :MICLEBERRY],
:GHOST => [:MAGOBERRY, :RABUTABERRY, :KASIBBERRY, :CUSTAPBERRY],
:DRAGON => [:AGUAVBERRY, :NOMELBERRY, :HABANBERRY, :JABOCABERRY],
:DARK => [:IAPAPABERRY, :SPELONBERRY, :COLBURBERRY, :ROWAPBERRY, :MARANGABERRY],
:STEEL => [:RAZZBERRY, :PAMTREBERRY, :BABIRIBERRY],
:FAIRY => [:ROSELIBERRY, :KEEBERRY]
}
if pkmn.hasItem?
type_array.each do |type, items|
return type if items.include?(pkmn.item_id) && GameData::Type.exists?(type)
end
end
when "TypeDependsOnUserPlate"
item_types = {
:FISTPLATE => :FIGHTING,
:SKYPLATE => :FLYING,
:TOXICPLATE => :POISON,
:EARTHPLATE => :GROUND,
:STONEPLATE => :ROCK,
:INSECTPLATE => :BUG,
:SPOOKYPLATE => :GHOST,
:IRONPLATE => :STEEL,
:FLAMEPLATE => :FIRE,
:SPLASHPLATE => :WATER,
:MEADOWPLATE => :GRASS,
:ZAPPLATE => :ELECTRIC,
:MINDPLATE => :PSYCHIC,
:ICICLEPLATE => :ICE,
:DRACOPLATE => :DRAGON,
:DREADPLATE => :DARK,
:PIXIEPLATE => :FAIRY
}
if pkmn.hasItem?
item_types.each do |item, item_type|
return item_type if pkmn.item_id == item && GameData::Type.exists?(item_type)
end
end
when "TypeDependsOnUserMemory"
item_types = {
:FIGHTINGMEMORY => :FIGHTING,
:FLYINGMEMORY => :FLYING,
:POISONMEMORY => :POISON,
:GROUNDMEMORY => :GROUND,
:ROCKMEMORY => :ROCK,
:BUGMEMORY => :BUG,
:GHOSTMEMORY => :GHOST,
:STEELMEMORY => :STEEL,
:FIREMEMORY => :FIRE,
:WATERMEMORY => :WATER,
:GRASSMEMORY => :GRASS,
:ELECTRICMEMORY => :ELECTRIC,
:PSYCHICMEMORY => :PSYCHIC,
:ICEMEMORY => :ICE,
:DRAGONMEMORY => :DRAGON,
:DARKMEMORY => :DARK,
:FAIRYMEMORY => :FAIRY
}
if pkmn.hasItem?
item_types.each do |item, item_type|
return item_type if pkmn.item_id == item && GameData::Type.exists?(item_type)
end
end
when "TypeDependsOnUserDrive"
item_types = {
:SHOCKDRIVE => :ELECTRIC,
:BURNDRIVE => :FIRE,
:CHILLDRIVE => :ICE,
:DOUSEDRIVE => :WATER
}
if pkmn.hasItem?
item_types.each do |item, item_type|
return item_type if pkmn.item_id == item && GameData::Type.exists?(item_type)
end
end
when "TypeIsUserFirstType"
return pkmn.types[0]
end
=end
return @type
end
def display_damage(pkmn, move = nil)
=begin
case @function_code
when "TypeDependsOnUserIVs"
return pbHiddenPower(pkmn)[1]
when "TypeAndPowerDependOnUserBerry"
damage_array = {
60 => [:CHERIBERRY, :CHESTOBERRY, :PECHABERRY, :RAWSTBERRY, :ASPEARBERRY,
:LEPPABERRY, :ORANBERRY, :PERSIMBERRY, :LUMBERRY, :SITRUSBERRY,
:FIGYBERRY, :WIKIBERRY, :MAGOBERRY, :AGUAVBERRY, :IAPAPABERRY,
:RAZZBERRY, :OCCABERRY, :PASSHOBERRY, :WACANBERRY, :RINDOBERRY,
:YACHEBERRY, :CHOPLEBERRY, :KEBIABERRY, :SHUCABERRY, :COBABERRY,
:PAYAPABERRY, :TANGABERRY, :CHARTIBERRY, :KASIBBERRY, :HABANBERRY,
:COLBURBERRY, :BABIRIBERRY, :CHILANBERRY, :ROSELIBERRY],
70 => [:BLUKBERRY, :NANABBERRY, :WEPEARBERRY, :PINAPBERRY, :POMEGBERRY,
:KELPSYBERRY, :QUALOTBERRY, :HONDEWBERRY, :GREPABERRY, :TAMATOBERRY,
:CORNNBERRY, :MAGOSTBERRY, :RABUTABERRY, :NOMELBERRY, :SPELONBERRY,
:PAMTREBERRY],
80 => [:WATMELBERRY, :DURINBERRY, :BELUEBERRY, :LIECHIBERRY, :GANLONBERRY,
:SALACBERRY, :PETAYABERRY, :APICOTBERRY, :LANSATBERRY, :STARFBERRY,
:ENIGMABERRY, :MICLEBERRY, :CUSTAPBERRY, :JABOCABERRY, :ROWAPBERRY,
:KEEBERRY, :MARANGABERRY]
}
if pkmn.hasItem?
damage_array.each do |dmg, items|
next if !items.include?(pkmn.item_id)
ret = dmg
ret += 20 if Settings::MECHANICS_GENERATION >= 6
return ret
end
end
when "ThrowUserItemAtTarget"
fling_powers = {
130 => [:IRONBALL
],
100 => [:HARDSTONE,:RAREBONE,
# Fossils
:ARMORFOSSIL,:CLAWFOSSIL,:COVERFOSSIL,:DOMEFOSSIL,:HELIXFOSSIL,
:JAWFOSSIL,:OLDAMBER,:PLUMEFOSSIL,:ROOTFOSSIL,:SAILFOSSIL,
:SKULLFOSSIL
],
90 => [:DEEPSEATOOTH,:GRIPCLAW,:THICKCLUB,
# Plates
:DRACOPLATE,:DREADPLATE,:EARTHPLATE,:FISTPLATE,:FLAMEPLATE,
:ICICLEPLATE,:INSECTPLATE,:IRONPLATE,:MEADOWPLATE,:MINDPLATE,
:PIXIEPLATE,:SKYPLATE,:SPLASHPLATE,:SPOOKYPLATE,:STONEPLATE,
:TOXICPLATE,:ZAPPLATE
],
80 => [:ASSAULTVEST,:CHIPPEDPOT,:CRACKEDPOT,:DAWNSTONE,:DUSKSTONE,
:ELECTIRIZER,:HEAVYDUTYBOOTS,:MAGMARIZER,:ODDKEYSTONE,:OVALSTONE,
:PROTECTOR,:QUICKCLAW,:RAZORCLAW,:SACHET,:SAFETYGOGGLES,
:SHINYSTONE,:STICKYBARB,:WEAKNESSPOLICY,:WHIPPEDDREAM
],
70 => [:DRAGONFANG,:POISONBARB,
# EV-training items (Macho Brace is 60)
:POWERANKLET,:POWERBAND,:POWERBELT,:POWERBRACER,:POWERLENS,
:POWERWEIGHT,
# Drives
:BURNDRIVE,:CHILLDRIVE,:DOUSEDRIVE,:SHOCKDRIVE
],
60 => [:ADAMANTORB,:DAMPROCK,:GRISEOUSORB,:HEATROCK,:LEEK,:LUSTROUSORB,
:MACHOBRACE,:ROCKYHELMET,:STICK,:TERRAINEXTENDER
],
50 => [:DUBIOUSDISC,:SHARPBEAK,
# Memories
:BUGMEMORY,:DARKMEMORY,:DRAGONMEMORY,:ELECTRICMEMORY,:FAIRYMEMORY,
:FIGHTINGMEMORY,:FIREMEMORY,:FLYINGMEMORY,:GHOSTMEMORY,
:GRASSMEMORY,:GROUNDMEMORY,:ICEMEMORY,:POISONMEMORY,
:PSYCHICMEMORY,:ROCKMEMORY,:STEELMEMORY,:WATERMEMORY
],
40 => [:EVIOLITE,:ICYROCK,:LUCKYPUNCH
],
30 => [:ABSORBBULB,:ADRENALINEORB,:AMULETCOIN,:BINDINGBAND,:BLACKBELT,
:BLACKGLASSES,:BLACKSLUDGE,:BOTTLECAP,:CELLBATTERY,:CHARCOAL,
:CLEANSETAG,:DEEPSEASCALE,:DRAGONSCALE,:EJECTBUTTON,:ESCAPEROPE,
:EXPSHARE,:FLAMEORB,:FLOATSTONE,:FLUFFYTAIL,:GOLDBOTTLECAP,
:HEARTSCALE,:HONEY,:KINGSROCK,:LIFEORB,:LIGHTBALL,:LIGHTCLAY,
:LUCKYEGG,:LUMINOUSMOSS,:MAGNET,:METALCOAT,:METRONOME,
:MIRACLESEED,:MYSTICWATER,:NEVERMELTICE,:PASSORB,:POKEDOLL,
:POKETOY,:PRISMSCALE,:PROTECTIVEPADS,:RAZORFANG,:SACREDASH,
:SCOPELENS,:SHELLBELL,:SHOALSALT,:SHOALSHELL,:SMOKEBALL,:SNOWBALL,
:SOULDEW,:SPELLTAG,:TOXICORB,:TWISTEDSPOON,:UPGRADE,
# Healing items
:ANTIDOTE,:AWAKENING,:BERRYJUICE,:BIGMALASADA,:BLUEFLUTE,
:BURNHEAL,:CASTELIACONE,:ELIXIR,:ENERGYPOWDER,:ENERGYROOT,:ETHER,
:FRESHWATER,:FULLHEAL,:FULLRESTORE,:HEALPOWDER,:HYPERPOTION,
:ICEHEAL,:LAVACOOKIE,:LEMONADE,:LUMIOSEGALETTE,:MAXELIXIR,
:MAXETHER,:MAXHONEY,:MAXPOTION,:MAXREVIVE,:MOOMOOMILK,:OLDGATEAU,
:PARALYZEHEAL,:PARLYZHEAL,:PEWTERCRUNCHIES,:POTION,:RAGECANDYBAR,
:REDFLUTE,:REVIVALHERB,:REVIVE,:SHALOURSABLE,:SODAPOP,
:SUPERPOTION,:SWEETHEART,:YELLOWFLUTE,
# Battle items
:XACCURACY,:XACCURACY2,:XACCURACY3,:XACCURACY6,
:XATTACK,:XATTACK2,:XATTACK3,:XATTACK6,
:XDEFEND,:XDEFEND2,:XDEFEND3,:XDEFEND6,
:XDEFENSE,:XDEFENSE2,:XDEFENSE3,:XDEFENSE6,
:XSPATK,:XSPATK2,:XSPATK3,:XSPATK6,
:XSPECIAL,:XSPECIAL2,:XSPECIAL3,:XSPECIAL6,
:XSPDEF,:XSPDEF2,:XSPDEF3,:XSPDEF6,
:XSPEED,:XSPEED2,:XSPEED3,:XSPEED6,
:DIREHIT,:DIREHIT2,:DIREHIT3,
:ABILITYURGE,:GUARDSPEC,:ITEMDROP,:ITEMURGE,:RESETURGE,
:MAXMUSHROOMS,
# Vitamins
:CALCIUM,:CARBOS,:HPUP,:IRON,:PPUP,:PPMAX,:PROTEIN,:ZINC,
:RARECANDY,
# Most evolution stones (see also 80)
:EVERSTONE,:FIRESTONE,:ICESTONE,:LEAFSTONE,:MOONSTONE,:SUNSTONE,
:THUNDERSTONE,:WATERSTONE,:SWEETAPPLE,:TARTAPPLE, :GALARICACUFF,
:GALARICAWREATH,
# Repels
:MAXREPEL,:REPEL,:SUPERREPEL,
# Mulches
:AMAZEMULCH,:BOOSTMULCH,:DAMPMULCH,:GOOEYMULCH,:GROWTHMULCH,
:RICHMULCH,:STABLEMULCH,:SURPRISEMULCH,
# Shards
:BLUESHARD,:GREENSHARD,:REDSHARD,:YELLOWSHARD,
# Valuables
:BALMMUSHROOM,:BIGMUSHROOM,:BIGNUGGET,:BIGPEARL,:COMETSHARD,
:NUGGET,:PEARL,:PEARLSTRING,:RELICBAND,:RELICCOPPER,:RELICCROWN,
:RELICGOLD,:RELICSILVER,:RELICSTATUE,:RELICVASE,:STARDUST,
:STARPIECE,:STRANGESOUVENIR,:TINYMUSHROOM,
# Exp Candies
:EXPCANDYXS, :EXPCANDYS, :EXPCANDYM, :EXPCANDYL, :EXPCANDYXL
],
20 => [# Feathers
:CLEVERFEATHER,:GENIUSFEATHER,:HEALTHFEATHER,:MUSCLEFEATHER,
:PRETTYFEATHER,:RESISTFEATHER,:SWIFTFEATHER,
:CLEVERWING,:GENIUSWING,:HEALTHWING,:MUSCLEWING,:PRETTYWING,
:RESISTWING,:SWIFTWING
],
10 => [:AIRBALLOON,:BIGROOT,:BRIGHTPOWDER,:CHOICEBAND,:CHOICESCARF,
:CHOICESPECS,:DESTINYKNOT,:DISCOUNTCOUPON,:EXPERTBELT,:FOCUSBAND,
:FOCUSSASH,:LAGGINGTAIL,:LEFTOVERS,:MENTALHERB,:METALPOWDER,
:MUSCLEBAND,:POWERHERB,:QUICKPOWDER,:REAPERCLOTH,:REDCARD,
:RINGTARGET,:SHEDSHELL,:SILKSCARF,:SILVERPOWDER,:SMOOTHROCK,
:SOFTSAND,:SOOTHEBELL,:WHITEHERB,:WIDELENS,:WISEGLASSES,:ZOOMLENS,
# Terrain seeds
:ELECTRICSEED,:GRASSYSEED,:MISTYSEED,:PSYCHICSEED,
# Nectar
:PINKNECTAR,:PURPLENECTAR,:REDNECTAR,:YELLOWNECTAR,
# Incenses
:FULLINCENSE,:LAXINCENSE,:LUCKINCENSE,:ODDINCENSE,:PUREINCENSE,
:ROCKINCENSE,:ROSEINCENSE,:SEAINCENSE,:WAVEINCENSE,
# Scarves
:BLUESCARF,:GREENSCARF,:PINKSCARF,:REDSCARF,:YELLOWSCARF,
# Mints
:LONELYMINT, :ADAMANTMINT, :NAUGHTYMINT, :BRAVEMINT, :BOLDMINT,
:IMPISHMINT, :LAXMINT, :RELAXEDMINT, :MODESTMINT, :MILDMINT,
:RASHMINT, :QUIETMINT, :CALMMINT, :GENTLEMINT, :CAREFULMINT,
:SASSYMINT, :TIMIDMINT, :HASTYMINT, :JOLLYMINT, :NAIVEMINT,
:SERIOUSMINT,
# Sweets
:STRAWBERRYSWEET, :LOVESWEET, :BERRYSWEET, :CLOVERSWEET,
:FLOWERSWEET, :STARSWEET, :RIBBONSWEET
]
}
return 0 if !pkmn.item
return 10 if pkmn.item.is_berry?
return 80 if pkmn.item.is_mega_stone?
if pkmn.item.is_TR?
ret = GameData::Move.get(pkmn.item.move).base_damage
ret = 10 if ret < 10
return ret
end
fling_powers.each do |power,items|
return power if items.include?(pkmn.item_id)
end
return 10
when "PowerHigherWithUserHP"
return [150 * pkmn.hp / pkmn.totalhp, 1].max
when "PowerLowerWithUserHP"
n = 48 * pkmn.hp / pkmn.totalhp
return 200 if n < 2
return 150 if n < 5
return 100 if n < 10
return 80 if n < 17
return 40 if n < 33
return 20
when "PowerHigherWithUserHappiness"
return [(pkmn.happiness * 2 / 5).floor, 1].max
when "PowerLowerWithUserHappiness"
return [((255 - pkmn.happiness) * 2 / 5).floor, 1].max
when "PowerHigherWithLessPP"
dmgs = [200, 80, 60, 50, 40]
ppLeft = [[(move&.pp || @total_pp) - 1, 0].max, dmgs.length - 1].min
return dmgs[ppLeft]
end
=end
return @base_damage
end
def display_category(pkmn, move = nil); return @category; end
def display_accuracy(pkmn, move = nil); return @accuracy; end
def convert_move_data(data) def convert_move_data(data)
new_code = data[:function_code] new_code = data[:function_code]
case data[:function_code] case data[:function_code]

View File

@@ -144,4 +144,49 @@ class Battle::Move
end end
return false return false
end end
def display_type(battler)
case @function
when "TypeDependsOnUserMorpekoFormRaiseUserSpeed1"
if battler.isSpecies?(:MORPEKO) || battler.effects[PBEffects::TransformSpecies] == :MORPEKO
return pbBaseType(battler)
end
=begin
when "TypeDependsOnUserPlate", "TypeDependsOnUserMemory",
"TypeDependsOnUserDrive", "TypeAndPowerDependOnUserBerry",
"TypeIsUserFirstType", "TypeAndPowerDependOnWeather",
"TypeAndPowerDependOnTerrain"
return pbBaseType(battler)
=end
end
return @realMove.display_type(battler.pokemon)
end
def display_damage(battler)
=begin
case @function
when "TypeAndPowerDependOnUserBerry"
return pbNaturalGiftBaseDamage(battler.item_id)
when "TypeAndPowerDependOnWeather", "TypeAndPowerDependOnTerrain",
"PowerHigherWithUserHP", "PowerLowerWithUserHP",
"PowerHigherWithUserHappiness", "PowerLowerWithUserHappiness",
"PowerHigherWithUserPositiveStatStages", "PowerDependsOnUserStockpile"
return pbBaseType(@baseDamage, battler, nil)
end
=end
return @realMove.display_damage(battler.pokemon)
end
def display_category(battler)
=begin
case @function
when "CategoryDependsOnHigherDamageIgnoreTargetAbility"
pbOnStartUse(user, nil)
return @calcCategory
end
=end
return @realMove.display_category(battler.pokemon)
end
def display_accuracy(battler); return @realMove.display_accuracy(battler.pokemon); end
end end

View File

@@ -1310,7 +1310,7 @@ end
class Battle::Move::TypeIsUserFirstType < Battle::Move class Battle::Move::TypeIsUserFirstType < Battle::Move
def pbBaseType(user) def pbBaseType(user)
userTypes = user.pbTypes(true) userTypes = user.pbTypes(true)
return userTypes[0] return userTypes[0] || @type
end end
end end

View File

@@ -350,7 +350,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
x = button.x-self.x+button.src_rect.width/2 x = button.x-self.x+button.src_rect.width/2
y = button.y-self.y+2 y = button.y-self.y+2
moveNameBase = TEXT_BASE_COLOR moveNameBase = TEXT_BASE_COLOR
if moves[i].type if moves[i].display_type(@battler)
# NOTE: This takes a colour from a particular pixel in the button # NOTE: This takes a colour from a particular pixel in the button
# graphic and makes the move name's base colour that same colour. # graphic and makes the move name's base colour that same colour.
# The pixel is at coordinates 10,34 in the button box. If you # The pixel is at coordinates 10,34 in the button box. If you
@@ -374,7 +374,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
end end
@visibility["button_#{i}"] = true @visibility["button_#{i}"] = true
button.src_rect.x = (i==@index) ? @buttonBitmap.width/2 : 0 button.src_rect.x = (i==@index) ? @buttonBitmap.width/2 : 0
button.src_rect.y = GameData::Type.get(moves[i].type).icon_position * BUTTON_HEIGHT button.src_rect.y = GameData::Type.get(moves[i].display_type(@battler)).icon_position * BUTTON_HEIGHT
button.z = self.z + ((i==@index) ? 4 : 3) button.z = self.z + ((i==@index) ? 4 : 3)
end end
end end
@@ -384,7 +384,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
def refreshMoveData(move) def refreshMoveData(move)
# Write PP and type of the selected move # Write PP and type of the selected move
if !USE_GRAPHICS if !USE_GRAPHICS
moveType = GameData::Type.get(move.type).name moveType = GameData::Type.get(move.display_type(@battler)).name
if move.total_pp<=0 if move.total_pp<=0
@msgBox.text = _INTL("PP: ---<br>TYPE/{1}",moveType) @msgBox.text = _INTL("PP: ---<br>TYPE/{1}",moveType)
else else
@@ -400,7 +400,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
end end
@visibility["typeIcon"] = true @visibility["typeIcon"] = true
# Type icon # Type icon
type_number = GameData::Type.get(move.type).icon_position type_number = GameData::Type.get(move.display_type(@battler)).icon_position
@typeIcon.src_rect.y = type_number * TYPE_ICON_HEIGHT @typeIcon.src_rect.y = type_number * TYPE_ICON_HEIGHT
# PP text # PP text
if move.total_pp>0 if move.total_pp>0

View File

@@ -59,5 +59,10 @@ class Pokemon
def name; return GameData::Move.get(@id).name; end def name; return GameData::Move.get(@id).name; end
def description; return GameData::Move.get(@id).description; end def description; return GameData::Move.get(@id).description; end
def hidden_move?; return GameData::Move.get(@id).hidden_move?; end def hidden_move?; return GameData::Move.get(@id).hidden_move?; end
def display_type(pkmn); return GameData::Move.get(@id).display_type(pkmn, self); end
def display_category(pkmn); return GameData::Move.get(@id).display_category(pkmn, self); end
def display_damage(pkmn); return GameData::Move.get(@id).display_damage(pkmn, self); end
def display_accuracy(pkmn); return GameData::Move.get(@id).display_accuracy(pkmn, self); end
end end
end end

View File

@@ -695,7 +695,7 @@ class PokemonSummary_Scene
for i in 0...Pokemon::MAX_MOVES for i in 0...Pokemon::MAX_MOVES
move=@pokemon.moves[i] move=@pokemon.moves[i]
if move 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]) imagepos.push(["Graphics/Pictures/types", 248, yPos + 8, 0, type_number * 28, 64, 28])
textpos.push([move.name,316,yPos,0,moveBase,moveShadow]) textpos.push([move.name,316,yPos,0,moveBase,moveShadow])
if move.total_pp>0 if move.total_pp>0
@@ -761,7 +761,7 @@ class PokemonSummary_Scene
yPos += 20 yPos += 20
end end
if move 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]) imagepos.push(["Graphics/Pictures/types", 248, yPos + 8, 0, type_number * 28, 64, 28])
textpos.push([move.name,316,yPos,0,moveBase,moveShadow]) textpos.push([move.name,316,yPos,0,moveBase,moveShadow])
if move.total_pp>0 if move.total_pp>0
@@ -807,20 +807,20 @@ class PokemonSummary_Scene
@sprites["itemicon"].visible = false if @sprites["itemicon"] @sprites["itemicon"].visible = false if @sprites["itemicon"]
textpos = [] textpos = []
# Write power and accuracy values for selected move # 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 0 then textpos.push(["---", 216, 148, 1, base, shadow]) # Status move
when 1 then textpos.push(["???", 216, 148, 1, base, shadow]) # Variable power 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 end
if selected_move.accuracy == 0 if selected_move.display_accuracy(@pokemon) == 0
textpos.push(["---", 216, 180, 1, base, shadow]) textpos.push(["---", 216, 180, 1, base, shadow])
else 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 end
# Draw all text # Draw all text
pbDrawTextPositions(overlay, textpos) pbDrawTextPositions(overlay, textpos)
# Draw selected move's damage category icon # 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) pbDrawImagePositions(overlay, imagepos)
# Draw selected move's description # Draw selected move's description
drawTextEx(overlay, 4, 222, 230, 5, selected_move.description, base, shadow) 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] moveobject=@moves[@sprites["commands"].top_item+i]
if moveobject if moveobject
moveData=GameData::Move.get(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]) 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)]) textpos.push([moveData.name,80,yPos,0,Color.new(248,248,248),Color.new(0,0,0)])
if moveData.total_pp>0 if moveData.total_pp>0
@@ -85,9 +85,9 @@ class MoveRelearner_Scene
0,78+(@sprites["commands"].index-@sprites["commands"].top_item)*64, 0,78+(@sprites["commands"].index-@sprites["commands"].top_item)*64,
0,0,258,72]) 0,0,258,72])
selMoveData=GameData::Move.get(@moves[@sprites["commands"].index]) selMoveData=GameData::Move.get(@moves[@sprites["commands"].index])
basedamage=selMoveData.base_damage basedamage = selMoveData.display_damage(@pokemon)
category=selMoveData.category category = selMoveData.display_category(@pokemon)
accuracy=selMoveData.accuracy 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("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([_INTL("POWER"),272,140,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([basedamage<=1 ? basedamage==1 ? "???" : "---" : sprintf("%d",basedamage), textpos.push([basedamage<=1 ? basedamage==1 ? "???" : "---" : sprintf("%d",basedamage),