Added affection effects

This commit is contained in:
Maruno17
2021-10-31 20:43:16 +00:00
parent ee16c22388
commit 0ec67f78fa
11 changed files with 187 additions and 61 deletions

View File

@@ -128,9 +128,10 @@ class PokeBattle_Battler
#=============================================================================
# Properties from Pokémon
#=============================================================================
def happiness; return @pokemon ? @pokemon.happiness : 0; end
def nature; return @pokemon ? @pokemon.nature : 0; end
def pokerusStage; return @pokemon ? @pokemon.pokerusStage : 0; end
def happiness; return @pokemon ? @pokemon.happiness : 0; end
def affection_level; return @pokemon ? @pokemon.affection_level : 2; end
def nature; return @pokemon ? @pokemon.nature : 0; end
def pokerusStage; return @pokemon ? @pokemon.pokerusStage : 0; end
#=============================================================================
# Mega Evolution, Primal Reversion, Shadow Pokémon

View File

@@ -571,7 +571,9 @@ class PokeBattle_Battler
# Message shown when a move fails the per-hit success check above.
#=============================================================================
def pbMissMessage(move,user,target)
if move.pbTarget(user).num_targets > 1
if target.damageState.affection_missed
@battle.pbDisplay(_INTL("{1} avoided the move in time with your shout!", target.pbThis))
elsif move.pbTarget(user).num_targets > 1
@battle.pbDisplay(_INTL("{1} avoided the attack!",target.pbThis))
elsif target.effects[PBEffects::TwoTurnAttack]
@battle.pbDisplay(_INTL("{1} avoided the attack!",target.pbThis))