mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
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:
@@ -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
|
||||
#=============================================================================
|
||||
|
||||
Reference in New Issue
Block a user