Skip to content

Commit

Permalink
0.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kurayamiblackheart committed Jun 1, 2024
1 parent cf8e17b commit b6dac3c
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Data/Scripts/001_Settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Settings
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
GAME_VERSION = '6.0.0'
IF_VERSION = "6.1.4"
GAME_VERSION_NUMBER = "0.15.4"
GAME_VERSION_NUMBER = "0.16.0"

POKERADAR_LIGHT_ANIMATION_RED_ID = 17
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
Expand Down
3 changes: 2 additions & 1 deletion Data/Scripts/011_Battle/002_Move/007_Move_Effects_100-17F.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ def initialize(battle, move)
#===============================================================================
class PokeBattle_Move_109 < PokeBattle_Move
def pbEffectGeneral(user)
if user.pbOwnedByPlayer?
# if user.pbOwnedByPlayer?
if user.pbOwnedByPlayerSerious?
@battle.field.effects[PBEffects::PayDay] += 5 * user.level
end
@battle.pbDisplay(_INTL("Coins were scattered everywhere!"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ def initialize(battle, move)
#===============================================================================
class PokeBattle_Move_109 < PokeBattle_Move
def pbEffectGeneral(user)
if user.pbOwnedByPlayer?
# if user.pbOwnedByPlayer?
if user.pbOwnedByPlayerSerious?
@battle.field.effects[PBEffects::PayDay] += 5 * user.level
end
@battle.pbDisplay(_INTL("Coins were scattered everywhere!"))
Expand Down
15 changes: 12 additions & 3 deletions Data/Scripts/014_Pokemon/001_Pokemon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -802,10 +802,15 @@ def calc_stats(this_level = self.level_simple)
# Calculate stats
stats = {}
GameData::Stat.each_main do |s|
if $PokemonSystem.noevsmode && $PokemonSystem.noevsmode > 0
ev_use = 0
else
ev_use = @ev[s.id]
end
if s.id == :HP
stats[s.id] = calcHP((base_stats[s.id]*kurayboost).round, this_level, this_IV[s.id], @ev[s.id])
stats[s.id] = calcHP((base_stats[s.id]*kurayboost).round, this_level, this_IV[s.id], ev_use)
else
stats[s.id] = calcStat((base_stats[s.id]*kurayboost).round, this_level, this_IV[s.id], @ev[s.id], nature_mod[s.id])
stats[s.id] = calcStat((base_stats[s.id]*kurayboost).round, this_level, this_IV[s.id], ev_use, nature_mod[s.id])
end
end
#End KurayX
Expand Down Expand Up @@ -1874,7 +1879,11 @@ def calcIV
this_ivs = self.iv
ret = {}
GameData::Stat.each_main do |s|
ret[s.id] = (@ivMaxed[s.id]) ? IV_STAT_LIMIT : this_ivs[s.id]
if $PokemonSystem.maxivsmode && $PokemonSystem.maxivsmode > 0
ret[s.id] = IV_STAT_LIMIT
else
ret[s.id] = (@ivMaxed[s.id]) ? IV_STAT_LIMIT : this_ivs[s.id]
end
end
return ret
end
Expand Down
97 changes: 67 additions & 30 deletions Data/Scripts/016_UI/006_UI_Summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -721,36 +721,73 @@ def drawPageThree
end
end
# Write various bits of text
textpos = [
[_INTL("HP"), 248, 70, 0, base, statshadows[:HP]],
[sprintf("%d", @pokemon.hp), 346, 70, 1, base, shadow],
[sprintf("%d", @pokemon.totalhp), 400, 70, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
#[_INTL("IV"), 360, 70, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[sprintf("%d", @pokemon.iv[:HP]), 440, 70, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
#[_INTL("EV"), 442, 70, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[sprintf("%d", @pokemon.ev[:HP]), 480, 70, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
[_INTL("Attack"), 248, 114, 0, base, statshadows[:ATTACK]],
[sprintf("%d", @pokemon.attack), 400, 114, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[sprintf("%d", @pokemon.iv[:ATTACK]), 440, 114, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
[sprintf("%d", @pokemon.ev[:ATTACK]), 480, 114, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
[_INTL("Defense"), 248, 146, 0, base, statshadows[:DEFENSE]],
[sprintf("%d", @pokemon.defense), 400, 146, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[sprintf("%d", @pokemon.iv[:DEFENSE]), 440, 146, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
[sprintf("%d", @pokemon.ev[:DEFENSE]), 480, 146, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
[_INTL("Sp. Atk"), 248, 178, 0, base, statshadows[:SPECIAL_ATTACK]],
[sprintf("%d", @pokemon.spatk), 400, 178, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[sprintf("%d", @pokemon.iv[:SPECIAL_ATTACK]), 440, 178, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
[sprintf("%d", @pokemon.ev[:SPECIAL_ATTACK]), 480, 178, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
[_INTL("Sp. Def"), 248, 210, 0, base, statshadows[:SPECIAL_DEFENSE]],
[sprintf("%d", @pokemon.spdef), 400, 210, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[sprintf("%d", @pokemon.iv[:SPECIAL_DEFENSE]), 440, 210, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
[sprintf("%d", @pokemon.ev[:SPECIAL_DEFENSE]), 480, 210, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
[_INTL("Speed"), 248, 242, 0, base, statshadows[:SPEED]],
[sprintf("%d", @pokemon.speed), 400, 242, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[sprintf("%d", @pokemon.iv[:SPEED]), 440, 242, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
[sprintf("%d", @pokemon.ev[:SPEED]), 480, 242, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
[_INTL("Ability"), 224, 278, 0, base, shadow]
]
# textpos = [
# [_INTL("HP"), 248, 70, 0, base, statshadows[:HP]],
# [sprintf("%d", @pokemon.hp), 346, 70, 1, base, shadow],
# [sprintf("%d", @pokemon.totalhp), 400, 70, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
# #[_INTL("IV"), 360, 70, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)],
# [sprintf("%d", @pokemon.iv[:HP]), 440, 70, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
# #[_INTL("EV"), 442, 70, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
# [sprintf("%d", @pokemon.ev[:HP]), 480, 70, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
# [_INTL("Attack"), 248, 114, 0, base, statshadows[:ATTACK]],
# [sprintf("%d", @pokemon.attack), 400, 114, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
# [sprintf("%d", @pokemon.iv[:ATTACK]), 440, 114, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
# [sprintf("%d", @pokemon.ev[:ATTACK]), 480, 114, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
# [_INTL("Defense"), 248, 146, 0, base, statshadows[:DEFENSE]],
# [sprintf("%d", @pokemon.defense), 400, 146, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
# [sprintf("%d", @pokemon.iv[:DEFENSE]), 440, 146, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
# [sprintf("%d", @pokemon.ev[:DEFENSE]), 480, 146, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
# [_INTL("Sp. Atk"), 248, 178, 0, base, statshadows[:SPECIAL_ATTACK]],
# [sprintf("%d", @pokemon.spatk), 400, 178, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
# [sprintf("%d", @pokemon.iv[:SPECIAL_ATTACK]), 440, 178, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
# [sprintf("%d", @pokemon.ev[:SPECIAL_ATTACK]), 480, 178, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
# [_INTL("Sp. Def"), 248, 210, 0, base, statshadows[:SPECIAL_DEFENSE]],
# [sprintf("%d", @pokemon.spdef), 400, 210, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
# [sprintf("%d", @pokemon.iv[:SPECIAL_DEFENSE]), 440, 210, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
# [sprintf("%d", @pokemon.ev[:SPECIAL_DEFENSE]), 480, 210, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
# [_INTL("Speed"), 248, 242, 0, base, statshadows[:SPEED]],
# [sprintf("%d", @pokemon.speed), 400, 242, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
# [sprintf("%d", @pokemon.iv[:SPEED]), 440, 242, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
# [sprintf("%d", @pokemon.ev[:SPEED]), 480, 242, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)],
# [_INTL("Ability"), 224, 278, 0, base, shadow]
# ]
stats = [:HP, :ATTACK, :DEFENSE, :SPECIAL_ATTACK, :SPECIAL_DEFENSE, :SPEED]
stats_value = [:totalhp, :attack, :defense, :spatk, :spdef, :speed]
stats_displayname = [_INTL("HP"), _INTL("Attack"), _INTL("Defense"), _INTL("Sp. Atk"), _INTL("Sp. Def"), _INTL("Speed")]
textpos = []

stats.length.times do |i|
# y = 70 + i * 36
case i
when 0
y = 70
when 1
y = 114
when 2
y = 146
when 3
y = 178
when 4
y = 210
when 5
y = 242
end
ev_stat = ($PokemonSystem.noevsmode && $PokemonSystem.noevsmode > 0) ? 0 : @pokemon.ev[stats[i]]
iv_stat = ($PokemonSystem.maxivsmode && $PokemonSystem.maxivsmode > 0) ? Pokemon::IV_STAT_LIMIT : @pokemon.iv[stats[i]]
textpos += [
[stats_displayname[i], 248, y, 0, base, statshadows[stats[i]]],
[sprintf("%d", @pokemon.send(stats_value[i].downcase)), 400, y, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
[sprintf("%d", iv_stat), 440, y, 1, Color.new(84, 64, 44), Color.new(248, 148, 0)],
[sprintf("%d", ev_stat), 480, y, 1, Color.new(54, 84, 54), Color.new(24, 192, 32)]
]
if i == 0 # If the stat is HP
textpos << [sprintf("%d", @pokemon.hp), 346, y, 1, base, shadow]
textpos << ["IVs", 440, y-23, 1, Color.new(64, 44, 24), Color.new(228, 128, 0)]
textpos << ["EVs", 480, y-23, 1, Color.new(34, 64, 34), Color.new(4, 172, 12)]
end
end

textpos << [_INTL("Ability"), 224, 278, 0, base, shadow]
# Draw ability name and description
ability = @pokemon.ability
ability2 = @pokemon.ability2
Expand Down
44 changes: 42 additions & 2 deletions Data/Scripts/016_UI/015_UI_Options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ class PokemonSystem

attr_accessor :optionsnames

attr_accessor :noevsmode
attr_accessor :maxivsmode
attr_accessor :showlevel_nolevelmode

def initialize
# Vanilla Global
@raiser = 1
Expand Down Expand Up @@ -249,6 +253,10 @@ def initialize
@speedvaluedef = 0
@skipcaughtnickname = 0#0 = false, 1 = true
@skipcaughtprompt = 0#0 = false, 1 = true

@noevsmode = 0
@maxivsmode = 0
@showlevel_nolevelmode = 0
end

def load_bootup_data(saved)
Expand Down Expand Up @@ -358,12 +366,15 @@ def load_file_data(saved)
# End of Challenges
@skipcaughtnickname = saved.skipcaughtnickname if saved.skipcaughtnickname
@skipcaughtprompt = saved.skipcaughtprompt if saved.skipcaughtprompt
@noevsmode = saved.noevsmode if saved.noevsmode
@maxivsmode = saved.maxivsmode if saved.maxivsmode
@showlevel_nolevelmode = saved.showlevel_nolevelmode if saved.showlevel_nolevelmode
end
end

def as_json(options={})
{
"json_version" => "0.1",
"json_version" => "0.2",
"textspeed" => $PokemonSystem.textspeed,
"battlescene" => $PokemonSystem.battlescene,
"frame" => $PokemonSystem.frame,
Expand Down Expand Up @@ -466,7 +477,10 @@ def as_json(options={})
"autosave_healing_var" => $game_switches[AUTOSAVE_HEALING_VAR],
"autosave_catch_switch" => $game_switches[AUTOSAVE_CATCH_SWITCH],
"autosave_win_switch" => $game_switches[AUTOSAVE_WIN_SWITCH],
"autosave_steps_switch" => $game_switches[AUTOSAVE_STEPS_SWITCH]
"autosave_steps_switch" => $game_switches[AUTOSAVE_STEPS_SWITCH],
"noevsmode" => $PokemonSystem.noevsmode,
"maxivsmode" => $PokemonSystem.maxivsmode,
"showlevel_nolevelmode" => $PokemonSystem.showlevel_nolevelmode
}
end

Expand Down Expand Up @@ -626,6 +640,14 @@ def load_json(jsonparse)
MessageConfig.pbSetNarrowFontName("Power Red and Blue")
end

$PokemonSystem.noevsmode = 0
$PokemonSystem.maxivsmode = 0
$PokemonSystem.showlevel_nolevelmode = 0
if json_ver >= 2
$PokemonSystem.noevsmode = jsonparse['noevsmode']
$PokemonSystem.maxivsmode = jsonparse['maxivsmode']
$PokemonSystem.showlevel_nolevelmode = jsonparse['showlevel_nolevelmode']
end

end

Expand Down Expand Up @@ -2084,6 +2106,24 @@ def pbGetInGameOptions()
["Prompts you to nickname newly caught pokemon.",
"Never prompts to nickname newly caught pokemon."]
)
options << EnumOption.new(_INTL("Show Lv. in BSM"), [_INTL("Off"), _INTL("On")],
proc { $PokemonSystem.showlevel_nolevelmode },
proc { |value| $PokemonSystem.showlevel_nolevelmode = value },
["Base Stats Mode hides the level of Pokemons in battle.",
"Base Stats Mode shows the level of Pokemons in battle (level don't reflect stats!)."]
)
options << EnumOption.new(_INTL("No-EVs Mode"), [_INTL("Off"), _INTL("On")],
proc { $PokemonSystem.noevsmode },
proc { |value| $PokemonSystem.noevsmode = value },
["Pokemon EVs exist.",
"Pokemon EVs are disabled."]
)
options << EnumOption.new(_INTL("Max IVs Mode"), [_INTL("Off"), _INTL("On")],
proc { $PokemonSystem.maxivsmode },
proc { |value| $PokemonSystem.maxivsmode = value },
["Disabled.",
"Pokemon IVs are always at max."]
)

return options
end
Expand Down
2 changes: 1 addition & 1 deletion Data/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.15.4
0.16.0

0 comments on commit b6dac3c

Please sign in to comment.