Converted Shadow Pokémon PBS file to a section-based format, improved Shadow Pokémon mechanics

This commit is contained in:
Maruno17
2021-11-21 00:44:41 +00:00
parent 048a18b415
commit b445f26a88
25 changed files with 761 additions and 204 deletions

View File

@@ -71,7 +71,7 @@ class Battle
evYield.each_key { |stat| evYield[stat] *= 2 }
end
# Gain EVs for each stat in turn
if pkmn.shadowPokemon? && pkmn.saved_ev
if pkmn.shadowPokemon? && pkmn.heartStage <= 3 && pkmn.saved_ev
pkmn.saved_ev.each_value { |e| evTotal += e }
GameData::Stat.each_main do |s|
evGain = evYield[s.id].clamp(0, Pokemon::EV_STAT_LIMIT - pkmn.ev[s.id] - pkmn.saved_ev[s.id])
@@ -178,11 +178,14 @@ class Battle
pkmn.name,debugInfo))
end
# Give Exp
$stats.total_exp_gained += expGained
if pkmn.shadowPokemon?
pkmn.exp += expGained
if pkmn.heartStage <= 3
pkmn.exp += expGained
$stats.total_exp_gained += expGained
end
return
end
$stats.total_exp_gained += expGained
tempExp1 = pkmn.exp
battler = pbFindBattler(idxParty)
loop do # For each level gained in turn...

View File

@@ -43,7 +43,7 @@ class Battle
if battler.shadowPokemon?
if battler.inHyperMode?
battler.pokemon.hyper_mode = false
battler.pokemon.adjustHeart(-300)
battler.pokemon.change_heart_gauge("call")
pbDisplay(_INTL("{1} came to its senses from the Trainer's call!",battler.pbThis))
else
pbDisplay(_INTL("But nothing happened!"))

View File

@@ -574,7 +574,6 @@ class Battle
if b.inHyperMode?
if pbRandom(100)<10
b.pokemon.hyper_mode = false
b.pokemon.adjustHeart(-50)
pbDisplay(_INTL("{1} came to its senses!",b.pbThis))
else
pbDisplay(_INTL("{1} is in Hyper Mode!",b.pbThis))

View File

@@ -34,7 +34,7 @@ class Battle::Move::Confusion < Battle::Move
@pp = -1
@target = 0
@priority = 0
@flags = ""
@flags = []
@addlEffect = 0
@calcType = nil
@powerBoost = false
@@ -63,7 +63,7 @@ class Battle::Move::Struggle < Battle::Move
@pp = -1
@target = 0
@priority = 0
@flags = ""
@flags = ["Contact", "CanProtect"]
@addlEffect = 0
@calcType = nil
@powerBoost = false