fc200281(Implements Stance Change ability)

2c73bbf9(Fix for tiles being invisible after a map transfer if they were on screen before it)
dc01031a(prevent unknown_items from being obtained in randomizer)
ee906fb3(previous commit also included new attack animations)
4dba7c02(Fixes unreal time and footprint scripts being accidentally disabled)
This commit is contained in:
infinitefusion
2022-06-05 15:36:21 -04:00
parent 64bcefa3f7
commit dd68c56c79
25 changed files with 499 additions and 460 deletions

View File

@@ -218,11 +218,13 @@ class PokeBattle_Battler
end
end
# Stance Change
if isSpecies?(:AEGISLASH) && self.ability == :STANCECHANGE
if self.ability == :STANCECHANGE
if move.damagingMove?
pbChangeForm(1,_INTL("{1} changed to Blade Forme!",pbThis))
user = pbFindUser(choice,move)
stanceChangeEffect(user,true)
elsif move.id == :KINGSSHIELD
pbChangeForm(0,_INTL("{1} changed to Shield Forme!",pbThis))
user = pbFindUser(choice,move)
stanceChangeEffect(user,false)
end
end
# Calculate the move's type during this usage
@@ -570,6 +572,20 @@ class PokeBattle_Battler
end
end
def stanceChangeEffect(user,attacking=false)
inSwordForm = user.effects[PBEffects::PowerTrick]
if !inSwordForm && attacking
user.effects[PBEffects::PowerTrick] = true
user.attack,user.defense = user.defense,user.attack
@battle.pbDisplay(_INTL("{1} changed to Sword Mode!",pbThis))
elsif inSwordForm && !attacking
user.effects[PBEffects::PowerTrick] = false
user.attack,user.defense = user.defense,user.attack
@battle.pbDisplay(_INTL("{1} changed to Shield Mode!",pbThis))
end
end
#=============================================================================
# Attack a single target
#=============================================================================