mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Added terrain tag 17 NoEffect, Terrain Tag Editor now only sets defined terrain tags, fixed some move effects, fixed opposing Shadow Pokémon going into Hyper Mode, fixed Shadow Pokémon nature visibility
This commit is contained in:
@@ -192,3 +192,8 @@ GameData::TerrainTag.register({
|
||||
:battle_environment => :Puddle,
|
||||
:shows_reflections => true
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :NoEffect,
|
||||
:id_number => 17
|
||||
})
|
||||
|
||||
@@ -91,6 +91,8 @@ class PokeBattle_Move
|
||||
def damagingMove?; return @category!=2; end
|
||||
def statusMove?; return @category==2; end
|
||||
|
||||
def pbPriority(user); return @priority; end
|
||||
|
||||
def usableWhenAsleep?; return false; end
|
||||
def unusableInGravity?; return false; end
|
||||
def healingMove?; return false; end
|
||||
|
||||
@@ -93,7 +93,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_086 < PokeBattle_Move
|
||||
def pbBaseDamageMultiplier(damageMult,user,target)
|
||||
damageMult *= 2 if !user.item
|
||||
damageMult *= 2 if !user.item || user.effects[PBEffects::GemConsumed]
|
||||
return damageMult
|
||||
end
|
||||
end
|
||||
@@ -1107,6 +1107,7 @@ class PokeBattle_Move_0AD < PokeBattle_Move
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
target.effects[PBEffects::BanefulBunker] = false
|
||||
target.effects[PBEffects::KingsShield] = false
|
||||
target.effects[PBEffects::Obstruct] = false
|
||||
target.effects[PBEffects::Protect] = false
|
||||
target.effects[PBEffects::SpikyShield] = false
|
||||
target.pbOwnSide.effects[PBEffects::CraftyShield] = false
|
||||
@@ -1336,54 +1337,36 @@ class PokeBattle_Move_0B3 < PokeBattle_Move
|
||||
when :Psychic
|
||||
@npMove = :PSYCHIC if GameData::Move.exists?(:PSYCHIC)
|
||||
else
|
||||
try_move = nil
|
||||
case @battle.environment
|
||||
when :Grass, :TallGrass, :Forest, :ForestGrass
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@npMove = :ENERGYBALL if GameData::Move.exists?(:ENERGYBALL)
|
||||
else
|
||||
@npMove = :SEEDBOMB if GameData::Move.exists?(:SEEDBOMB)
|
||||
end
|
||||
try_move = (Settings::MECHANICS_GENERATION >= 6) ? :ENERGYBALL : :SEEDBOMB
|
||||
when :MovingWater, :StillWater, :Underwater
|
||||
@npMove = :HYDROPUMP if GameData::Move.exists?(:HYDROPUMP)
|
||||
try_move = :HYDROPUMP
|
||||
when :Puddle
|
||||
@npMove = :MUDBOMB if GameData::Move.exists?(:MUDBOMB)
|
||||
try_move = :MUDBOMB
|
||||
when :Cave
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@npMove = :POWERGEM if GameData::Move.exists?(:POWERGEM)
|
||||
else
|
||||
@npMove = :ROCKSLIDE if GameData::Move.exists?(:ROCKSLIDE)
|
||||
end
|
||||
when :Rock
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@npMove = :EARTHPOWER if GameData::Move.exists?(:EARTHPOWER)
|
||||
else
|
||||
@npMove = :ROCKSLIDE if GameData::Move.exists?(:ROCKSLIDE)
|
||||
end
|
||||
when :Sand
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@npMove = :EARTHPOWER if GameData::Move.exists?(:EARTHPOWER)
|
||||
else
|
||||
@npMove = :EARTHQUAKE if GameData::Move.exists?(:EARTHQUAKE)
|
||||
end
|
||||
try_move = (Settings::MECHANICS_GENERATION >= 6) ? :POWERGEM : :ROCKSLIDE
|
||||
when :Rock, :Sand
|
||||
try_move = (Settings::MECHANICS_GENERATION >= 6) ? :EARTHPOWER : :EARTHQUAKE
|
||||
when :Snow
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@npMove = :FROSTBREATH if GameData::Move.exists?(:FROSTBREATH)
|
||||
else
|
||||
@npMove = :BLIZZARD if GameData::Move.exists?(:BLIZZARD)
|
||||
end
|
||||
try_move = :BLIZZARD
|
||||
try_move = :FROSTBREATH if Settings::MECHANICS_GENERATION == 6
|
||||
try_move = :ICEBEAM if Settings::MECHANICS_GENERATION >= 7
|
||||
when :Ice
|
||||
@npMove = :ICEBEAM if GameData::Move.exists?(:ICEBEAM)
|
||||
try_move = :ICEBEAM
|
||||
when :Volcano
|
||||
@npMove = :LAVAPLUME if GameData::Move.exists?(:LAVAPLUME)
|
||||
try_move = :LAVAPLUME
|
||||
when :Graveyard
|
||||
@npMove = :SHADOWBALL if GameData::Move.exists?(:SHADOWBALL)
|
||||
try_move = :SHADOWBALL
|
||||
when :Sky
|
||||
@npMove = :AIRSLASH if GameData::Move.exists?(:AIRSLASH)
|
||||
try_move = :AIRSLASH
|
||||
when :Space
|
||||
@npMove = :DRACOMETEOR if GameData::Move.exists?(:DRACOMETEOR)
|
||||
try_move = :DRACOMETEOR
|
||||
when :UltraSpace
|
||||
@npMove = :PSYSHOCK if GameData::Move.exists?(:PSYSHOCK)
|
||||
try_move = :PSYSHOCK
|
||||
end
|
||||
@npMove = try_move if GameData::Move.exists?(try_move)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2227,6 +2210,7 @@ class PokeBattle_Move_0CD < PokeBattle_TwoTurnMove
|
||||
def pbAttackingTurnEffect(user,target)
|
||||
target.effects[PBEffects::BanefulBunker] = false
|
||||
target.effects[PBEffects::KingsShield] = false
|
||||
target.effects[PBEffects::Obstruct] = false
|
||||
target.effects[PBEffects::Protect] = false
|
||||
target.effects[PBEffects::SpikyShield] = false
|
||||
target.pbOwnSide.effects[PBEffects::CraftyShield] = false
|
||||
|
||||
@@ -1235,6 +1235,7 @@ class PokeBattle_Move_13B < PokeBattle_StatDownMove
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
target.effects[PBEffects::BanefulBunker] = false
|
||||
target.effects[PBEffects::KingsShield] = false
|
||||
target.effects[PBEffects::Obstruct] = false
|
||||
target.effects[PBEffects::Protect] = false
|
||||
target.effects[PBEffects::SpikyShield] = false
|
||||
target.pbOwnSide.effects[PBEffects::CraftyShield] = false
|
||||
@@ -1543,6 +1544,7 @@ class PokeBattle_Move_147 < PokeBattle_Move
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
target.effects[PBEffects::BanefulBunker] = false
|
||||
target.effects[PBEffects::KingsShield] = false
|
||||
target.effects[PBEffects::Obstruct] = false
|
||||
target.effects[PBEffects::Protect] = false
|
||||
target.effects[PBEffects::SpikyShield] = false
|
||||
target.pbOwnSide.effects[PBEffects::CraftyShield] = false
|
||||
|
||||
@@ -264,7 +264,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_180 < PokeBattle_Move
|
||||
def pbBaseDamage(baseDmg, user, target)
|
||||
baseDmg *= 2 if @battle.field.terrain == :Electric
|
||||
baseDmg *= 2 if @battle.field.terrain == :Electric && target.affectedByTerrain?
|
||||
return baseDmg
|
||||
end
|
||||
end
|
||||
@@ -353,9 +353,9 @@ end
|
||||
# If Grassy Terrain applies, priority is increased by 1. (Grassy Glide)
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_185 < PokeBattle_Move
|
||||
def priority
|
||||
def pbPriority(user)
|
||||
ret = super
|
||||
ret += 1 if @battle.field.terrain == :Electric
|
||||
ret += 1 if @battle.field.terrain == :Grass && user.affectedByTerrain?
|
||||
return ret
|
||||
end
|
||||
end
|
||||
|
||||
@@ -90,7 +90,7 @@ class PokeBattle_Battle
|
||||
end
|
||||
|
||||
def pbGainExpOne(idxParty,defeatedBattler,numPartic,expShare,expAll,showMessages=true)
|
||||
pkmn = pbParty(0)[idxParty] # The Pokémon gaining EVs from defeatedBattler
|
||||
pkmn = pbParty(0)[idxParty] # The Pokémon gaining Exp from defeatedBattler
|
||||
growth_rate = pkmn.growth_rate
|
||||
# Don't bother calculating if gainer is already at max Exp
|
||||
if pkmn.exp>=growth_rate.maximum_exp
|
||||
|
||||
@@ -153,7 +153,7 @@ class PokeBattle_Battle
|
||||
# Calculate move's priority
|
||||
if @choices[b.index][0]==:UseMove
|
||||
move = @choices[b.index][2]
|
||||
pri = move.priority
|
||||
pri = move.pbPriority(b)
|
||||
if b.abilityActive?
|
||||
pri = BattleHandlers.triggerPriorityChangeAbility(b.ability,b,move,pri)
|
||||
end
|
||||
|
||||
@@ -213,7 +213,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
|
||||
def pbHyperMode
|
||||
return if fainted? || !shadowPokemon? || inHyperMode?
|
||||
return if fainted? || !shadowPokemon? || inHyperMode? || !pbOwnedByPlayer?
|
||||
p = self.pokemon
|
||||
if @battle.pbRandom(p.heart_gauge) <= Pokemon::HEART_GAUGE_SIZE / 4
|
||||
p.hyper_mode = true
|
||||
|
||||
@@ -534,7 +534,7 @@ class PokemonSummary_Scene
|
||||
overlay = @sprites["overlay"].bitmap
|
||||
memo = ""
|
||||
# Write nature
|
||||
showNature = !@pokemon.shadowPokemon? || @pokemon.heartStage>3
|
||||
showNature = !@pokemon.shadowPokemon? || @pokemon.heartStage <= 3
|
||||
if showNature
|
||||
natureName = @pokemon.nature.name
|
||||
memo += _INTL("<c3=F83820,E09890>{1}<c3=404040,B0B0B0> nature.\n",natureName)
|
||||
|
||||
@@ -204,11 +204,20 @@ class PokemonTilesetScene
|
||||
break if pbConfirmMessage(_INTL("Exit from the editor?"))
|
||||
elsif Input.trigger?(Input::USE)
|
||||
selected = tile_ID_from_coordinates(@x, @y)
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, 99)
|
||||
params.setDefaultValue(@tileset.terrain_tags[selected])
|
||||
set_terrain_tag_for_tile_ID(selected, pbMessageChooseNumber(_INTL("Set the terrain tag."), params))
|
||||
draw_overlay
|
||||
old_tag = @tileset.terrain_tags[selected]
|
||||
cmds = []
|
||||
ids = []
|
||||
old_idx = 0
|
||||
GameData::TerrainTag.each do |tag|
|
||||
old_idx = cmds.length if tag.id_number == old_tag
|
||||
cmds.push("#{tag.id_number}: #{tag.real_name}")
|
||||
ids.push(tag.id_number)
|
||||
end
|
||||
val = pbMessage(_INTL("\\l[1]\\ts[]Set the terrain tag."), cmds, -1, nil, old_idx)
|
||||
if val >= 0 && val != old_tag
|
||||
set_terrain_tag_for_tile_ID(selected, val)
|
||||
draw_overlay
|
||||
end
|
||||
end
|
||||
end
|
||||
close_screen
|
||||
@@ -220,7 +229,11 @@ end
|
||||
#===============================================================================
|
||||
def pbTilesetScreen
|
||||
pbFadeOutIn {
|
||||
Graphics.resize_screen(Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT * 2)
|
||||
pbSetResizeFactor(1)
|
||||
scene = PokemonTilesetScene.new
|
||||
scene.pbStartScene
|
||||
Graphics.resize_screen(Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT)
|
||||
pbSetResizeFactor($PokemonSystem.screensize)
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user