Tidied up some function codes, added missing ones

This commit is contained in:
Maruno17
2021-09-06 21:26:59 +01:00
parent c670c63bf5
commit 27be1cb330
6 changed files with 336 additions and 77 deletions

View File

@@ -446,7 +446,7 @@ module GameData
when "135" then new_code = "FreezeTargetSuperEffectiveAgainstWater" when "135" then new_code = "FreezeTargetSuperEffectiveAgainstWater"
when "136" then new_code = "RaiseUserDefense2" when "136" then new_code = "RaiseUserDefense2"
when "137" then new_code = "RaisePlusMinusUserAndAlliesDefSpDef1" when "137" then new_code = "RaisePlusMinusUserAndAlliesDefSpDef1"
when "138" then new_code = "RaiseAllySpDef1" when "138" then new_code = "RaiseTargetSpDef1"
when "139" then new_code = "LowerTargetAttack1BypassSubstitute" when "139" then new_code = "LowerTargetAttack1BypassSubstitute"
when "13A" then new_code = "LowerTargetAtkSpAtk1" when "13A" then new_code = "LowerTargetAtkSpAtk1"
when "13B" then new_code = "HoopaRemoveProtectionsBypassSubstituteLowerUserDef1" when "13B" then new_code = "HoopaRemoveProtectionsBypassSubstituteLowerUserDef1"

View File

@@ -18,6 +18,16 @@ class PokeBattle_Move_RaiseUserAttack2 < PokeBattle_StatUpMove
end end
end end
#===============================================================================
# Increases the user's Attack by 3 stages.
#===============================================================================
class PokeBattle_Move_RaiseUserAttack3 < PokeBattle_StatUpMove
def initialize(battle, move)
super
@statUp = [:ATTACK, 3]
end
end
#=============================================================================== #===============================================================================
# If this move KO's the target, increases the user's Attack by 3 stages. # If this move KO's the target, increases the user's Attack by 3 stages.
# (Fell Stinger) # (Fell Stinger)
@@ -140,6 +150,16 @@ class PokeBattle_Move_RaiseUserSpAtk3 < PokeBattle_StatUpMove
end end
end end
#===============================================================================
# Increases the user's Special Defense by 1 stage.
#===============================================================================
class PokeBattle_Move_RaiseUserSpDef1 < PokeBattle_StatUpMove
def initialize(battle, move)
super
@statUp = [:SPECIAL_DEFENSE, 1]
end
end
#=============================================================================== #===============================================================================
# Increases the user's Special Defense by 1 stage. # Increases the user's Special Defense by 1 stage.
# Charges up user's next attack if it is Electric-type. (Charge) # Charges up user's next attack if it is Electric-type. (Charge)
@@ -167,6 +187,16 @@ class PokeBattle_Move_RaiseUserSpDef2 < PokeBattle_StatUpMove
end end
end end
#===============================================================================
# Increases the user's Special Defense by 3 stages.
#===============================================================================
class PokeBattle_Move_RaiseUserSpDef3 < PokeBattle_StatUpMove
def initialize(battle, move)
super
@statUp = [:SPECIAL_DEFENSE, 3]
end
end
#=============================================================================== #===============================================================================
# Increases the user's Speed by 1 stage. (Flame Charge) # Increases the user's Speed by 1 stage. (Flame Charge)
#=============================================================================== #===============================================================================
@@ -206,6 +236,46 @@ class PokeBattle_Move_RaiseUserSpeed2LowerUserWeight < PokeBattle_StatUpMove
end end
end end
#===============================================================================
# Increases the user's Speed by 3 stages.
#===============================================================================
class PokeBattle_Move_RaiseUserSpeed3 < PokeBattle_StatUpMove
def initialize(battle, move)
super
@statUp = [:SPEED, 3]
end
end
#===============================================================================
# Increases the user's accuracy by 1 stage.
#===============================================================================
class PokeBattle_Move_RaiseUserAccuracy1 < PokeBattle_StatUpMove
def initialize(battle, move)
super
@statUp = [:ACCURACY, 1]
end
end
#===============================================================================
# Increases the user's accuracy by 2 stages.
#===============================================================================
class PokeBattle_Move_RaiseUserAccuracy2 < PokeBattle_StatUpMove
def initialize(battle, move)
super
@statUp = [:ACCURACY, 2]
end
end
#===============================================================================
# Increases the user's accuracy by 3 stages.
#===============================================================================
class PokeBattle_Move_RaiseUserAccuracy3 < PokeBattle_StatUpMove
def initialize(battle, move)
super
@statUp = [:ACCURACY, 3]
end
end
#=============================================================================== #===============================================================================
# Increases the user's evasion by 1 stage. (Double Team) # Increases the user's evasion by 1 stage. (Double Team)
#=============================================================================== #===============================================================================
@@ -216,6 +286,16 @@ class PokeBattle_Move_RaiseUserEvasion1 < PokeBattle_StatUpMove
end end
end end
#===============================================================================
# Increases the user's evasion by 2 stages.
#===============================================================================
class PokeBattle_Move_RaiseUserEvasion2 < PokeBattle_StatUpMove
def initialize(battle, move)
super
@statUp = [:EVASION, 2]
end
end
#=============================================================================== #===============================================================================
# Increases the user's evasion by 2 stages. Minimizes the user. (Minimize) # Increases the user's evasion by 2 stages. Minimizes the user. (Minimize)
#=============================================================================== #===============================================================================
@@ -231,6 +311,16 @@ class PokeBattle_Move_RaiseUserEvasion2MinimizeUser < PokeBattle_StatUpMove
end end
end end
#===============================================================================
# Increases the user's evasion by 3 stages.
#===============================================================================
class PokeBattle_Move_RaiseUserEvasion3 < PokeBattle_StatUpMove
def initialize(battle, move)
super
@statUp = [:EVASION, 3]
end
end
#=============================================================================== #===============================================================================
# Increases the user's critical hit rate. (Focus Energy) # Increases the user's critical hit rate. (Focus Energy)
#=============================================================================== #===============================================================================
@@ -494,6 +584,26 @@ class PokeBattle_Move_StartRaiseUserAtk1WhenDamaged < PokeBattle_Move
end end
end end
#===============================================================================
# Decreases the user's Attack by 1 stage.
#===============================================================================
class PokeBattle_Move_LowerUserAttack1 < PokeBattle_StatDownMove
def initialize(battle, move)
super
@statDown = [:ATTACK, 1]
end
end
#===============================================================================
# Decreases the user's Attack by 2 stages.
#===============================================================================
class PokeBattle_Move_LowerUserAttack2 < PokeBattle_StatDownMove
def initialize(battle, move)
super
@statDown = [:ATTACK, 2]
end
end
#=============================================================================== #===============================================================================
# Decreases the user's Defense by 1 stage. (Clanging Scales) # Decreases the user's Defense by 1 stage. (Clanging Scales)
#=============================================================================== #===============================================================================
@@ -504,6 +614,26 @@ class PokeBattle_Move_LowerUserDefense1 < PokeBattle_StatDownMove
end end
end end
#===============================================================================
# Decreases the user's Defense by 2 stages.
#===============================================================================
class PokeBattle_Move_LowerUserDefense2 < PokeBattle_StatDownMove
def initialize(battle, move)
super
@statDown = [:DEFENSE, 2]
end
end
#===============================================================================
# Decreases the user's Special Attack by 1 stage.
#===============================================================================
class PokeBattle_Move_LowerUserSpAtk1 < PokeBattle_StatDownMove
def initialize(battle, move)
super
@statDown = [:SPECIAL_ATTACK, 1]
end
end
#=============================================================================== #===============================================================================
# Decreases the user's Special Attack by 2 stages. # Decreases the user's Special Attack by 2 stages.
#=============================================================================== #===============================================================================
@@ -514,6 +644,26 @@ class PokeBattle_Move_LowerUserSpAtk2 < PokeBattle_StatDownMove
end end
end end
#===============================================================================
# Decreases the user's Special Defense by 1 stage.
#===============================================================================
class PokeBattle_Move_LowerUserSpDef1 < PokeBattle_StatDownMove
def initialize(battle, move)
super
@statDown = [:SPECIAL_DEFENSE, 1]
end
end
#===============================================================================
# Decreases the user's Special Defense by 2 stages.
#===============================================================================
class PokeBattle_Move_LowerUserSpDef2 < PokeBattle_StatDownMove
def initialize(battle, move)
super
@statDown = [:SPECIAL_DEFENSE, 2]
end
end
#=============================================================================== #===============================================================================
# Decreases the user's Speed by 1 stage. (Hammer Arm, Ice Hammer) # Decreases the user's Speed by 1 stage. (Hammer Arm, Ice Hammer)
#=============================================================================== #===============================================================================
@@ -524,6 +674,16 @@ class PokeBattle_Move_LowerUserSpeed1 < PokeBattle_StatDownMove
end end
end end
#===============================================================================
# Decreases the user's Speed by 2 stages.
#===============================================================================
class PokeBattle_Move_LowerUserSpeed2 < PokeBattle_StatDownMove
def initialize(battle, move)
super
@statDown = [:SPEED, 2]
end
end
#=============================================================================== #===============================================================================
# Decreases the user's Attack and Defense by 1 stage each. (Superpower) # Decreases the user's Attack and Defense by 1 stage each. (Superpower)
#=============================================================================== #===============================================================================
@@ -558,6 +718,43 @@ class PokeBattle_Move_LowerUserDefSpDefSpd1 < PokeBattle_StatDownMove
end end
end end
#===============================================================================
# Increases the user's and allies' Attack by 1 stage. (Howl (Gen 8+))
#===============================================================================
class PokeBattle_Move_RaiseTargetAttack1 < PokeBattle_Move
def canSnatch?; return true; end
def pbMoveFailed?(user, targets)
return false if damagingMove?
failed = true
targets.each do |b|
next if b.pbCanRaiseStatStage?(:ATTACK, user, self)
failed = false
break
end
if failed
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
return false
end
def pbFailsAgainstTarget?(user, target, show_message)
return false if damagingMove?
return !target.pbCanRaiseStatStage?(:ATTACK, user, self, show_message)
end
def pbEffectAgainstTarget(user, target)
return if damagingMove?
target.pbRaiseStatStage(:ATTACK, 1, user)
end
def pbAdditionalEffect(user, target)
return if !target.pbCanRaiseStatStage?(:ATTACK, user, self)
target.pbRaiseStatStage(:ATTACK, 1, user)
end
end
#=============================================================================== #===============================================================================
# Increases the target's Attack by 2 stages. Confuses the target. (Swagger) # Increases the target's Attack by 2 stages. Confuses the target. (Swagger)
#=============================================================================== #===============================================================================
@@ -616,6 +813,22 @@ class PokeBattle_Move_RaiseTargetSpAtk1ConfuseTarget < PokeBattle_Move
end end
end end
#===============================================================================
# Increases target's Special Defense by 1 stage. (Aromatic Mist)
#===============================================================================
class PokeBattle_Move_RaiseTargetSpDef1 < PokeBattle_Move
def ignoresSubstitute?(user); return true; end
def pbFailsAgainstTarget?(user, target, show_message)
return true if !target.pbCanRaiseStatStage?(:SPECIAL_DEFENSE, user, self, show_message)
return false
end
def pbEffectAgainstTarget(user,target)
target.pbRaiseStatStage(:SPECIAL_DEFENSE,1,user)
end
end
#=============================================================================== #===============================================================================
# Increases one random stat of the target by 2 stages (except HP). (Acupressure) # Increases one random stat of the target by 2 stages (except HP). (Acupressure)
#=============================================================================== #===============================================================================
@@ -699,6 +912,16 @@ class PokeBattle_Move_LowerTargetAttack2 < PokeBattle_TargetStatDownMove
end end
end end
#===============================================================================
# Decreases the target's Attack by 3 stages.
#===============================================================================
class PokeBattle_Move_LowerTargetAttack3 < PokeBattle_TargetStatDownMove
def initialize(battle, move)
super
@statDown = [:ATTACK, 3]
end
end
#=============================================================================== #===============================================================================
# Decreases the target's Defense by 1 stage. # Decreases the target's Defense by 1 stage.
#=============================================================================== #===============================================================================
@@ -730,6 +953,16 @@ class PokeBattle_Move_LowerTargetDefense2 < PokeBattle_TargetStatDownMove
end end
end end
#===============================================================================
# Decreases the target's Defense by 3 stages.
#===============================================================================
class PokeBattle_Move_LowerTargetDefense3 < PokeBattle_TargetStatDownMove
def initialize(battle, move)
super
@statDown = [:DEFENSE, 3]
end
end
#=============================================================================== #===============================================================================
# Decreases the target's Special Attack by 1 stage. # Decreases the target's Special Attack by 1 stage.
#=============================================================================== #===============================================================================
@@ -789,6 +1022,16 @@ class PokeBattle_Move_LowerTargetSpAtk2IfCanAttract < PokeBattle_TargetStatDownM
end end
end end
#===============================================================================
# Decreases the target's Special Attack by 3 stages.
#===============================================================================
class PokeBattle_Move_LowerTargetSpAtk3 < PokeBattle_TargetStatDownMove
def initialize(battle, move)
super
@statDown = [:SPECIAL_ATTACK, 3]
end
end
#=============================================================================== #===============================================================================
# Decreases the target's Special Defense by 1 stage. # Decreases the target's Special Defense by 1 stage.
#=============================================================================== #===============================================================================
@@ -809,6 +1052,16 @@ class PokeBattle_Move_LowerTargetSpDef2 < PokeBattle_TargetStatDownMove
end end
end end
#===============================================================================
# Decreases the target's Special Defense by 3 stages.
#===============================================================================
class PokeBattle_Move_LowerTargetSpDef3 < PokeBattle_TargetStatDownMove
def initialize(battle, move)
super
@statDown = [:SPECIAL_DEFENSE, 3]
end
end
#=============================================================================== #===============================================================================
# Decreases the target's Speed by 1 stage. # Decreases the target's Speed by 1 stage.
#=============================================================================== #===============================================================================
@@ -870,6 +1123,16 @@ class PokeBattle_Move_LowerTargetSpeed2 < PokeBattle_TargetStatDownMove
end end
end end
#===============================================================================
# Decreases the target's Speed by 3 stages.
#===============================================================================
class PokeBattle_Move_LowerTargetSpeed3 < PokeBattle_TargetStatDownMove
def initialize(battle, move)
super
@statDown = [:SPEED, 3]
end
end
#=============================================================================== #===============================================================================
# Decreases the target's accuracy by 1 stage. # Decreases the target's accuracy by 1 stage.
#=============================================================================== #===============================================================================
@@ -880,6 +1143,26 @@ class PokeBattle_Move_LowerTargetAccuracy1 < PokeBattle_TargetStatDownMove
end end
end end
#===============================================================================
# Decreases the target's accuracy by 2 stages.
#===============================================================================
class PokeBattle_Move_LowerTargetAccuracy2 < PokeBattle_TargetStatDownMove
def initialize(battle, move)
super
@statDown = [:ACCURACY, 2]
end
end
#===============================================================================
# Decreases the target's accuracy by 3 stages.
#===============================================================================
class PokeBattle_Move_LowerTargetAccuracy3 < PokeBattle_TargetStatDownMove
def initialize(battle, move)
super
@statDown = [:ACCURACY, 3]
end
end
#=============================================================================== #===============================================================================
# Decreases the target's evasion by 1 stage. (Sweet Scent (Gen 5-)) # Decreases the target's evasion by 1 stage. (Sweet Scent (Gen 5-))
#=============================================================================== #===============================================================================
@@ -1001,6 +1284,16 @@ class PokeBattle_Move_LowerTargetEvasion2 < PokeBattle_TargetStatDownMove
end end
end end
#===============================================================================
# Decreases the target's evasion by 3 stages.
#===============================================================================
class PokeBattle_Move_LowerTargetEvasion3 < PokeBattle_TargetStatDownMove
def initialize(battle, move)
super
@statDown = [:EVASION, 3]
end
end
#=============================================================================== #===============================================================================
# Decreases the target's Attack and Defense by 1 stage each. (Tickle) # Decreases the target's Attack and Defense by 1 stage each. (Tickle)
#=============================================================================== #===============================================================================
@@ -1057,59 +1350,6 @@ class PokeBattle_Move_LowerPoisonedTargetAtkSpAtkSpd1 < PokeBattle_Move
end end
end end
#===============================================================================
# Increases target's Special Defense by 1 stage. (Aromatic Mist)
#===============================================================================
class PokeBattle_Move_RaiseAllySpDef1 < PokeBattle_Move
def ignoresSubstitute?(user); return true; end
def pbFailsAgainstTarget?(user, target, show_message)
return true if !target.pbCanRaiseStatStage?(:SPECIAL_DEFENSE, user, self, show_message)
return false
end
def pbEffectAgainstTarget(user,target)
target.pbRaiseStatStage(:SPECIAL_DEFENSE,1,user)
end
end
#===============================================================================
# Increases the user's and allies' Attack by 1 stage. (Howl (Gen 8+))
#===============================================================================
class PokeBattle_Move_RaiseUserAndAlliesAttack1 < PokeBattle_Move
def canSnatch?; return true; end
def pbMoveFailed?(user, targets)
return false if damagingMove?
failed = true
targets.each do |b|
next if b.pbCanRaiseStatStage?(:ATTACK, user, self)
failed = false
break
end
if failed
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
return false
end
def pbFailsAgainstTarget?(user, target, show_message)
return false if damagingMove?
return !target.pbCanRaiseStatStage?(:ATTACK, user, self, show_message)
end
def pbEffectAgainstTarget(user, target)
return if damagingMove?
target.pbRaiseStatStage(:ATTACK, 1, user)
end
def pbAdditionalEffect(user, target)
return if !target.pbCanRaiseStatStage?(:ATTACK, user, self)
target.pbRaiseStatStage(:ATTACK, 1, user)
end
end
#=============================================================================== #===============================================================================
# Raises the Attack and Defense of all user's allies by 1 stage each. Bypasses # Raises the Attack and Defense of all user's allies by 1 stage each. Bypasses
# protections, including Crafty Shield. Fails if there is no ally. (Coaching) # protections, including Crafty Shield. Fails if there is no ally. (Coaching)

View File

@@ -563,7 +563,7 @@ class PokeBattle_AI
score += 20 if hasDamagingAttack score += 20 if hasDamagingAttack
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "RaiseUserAttack2" when "RaiseUserAttack2", "RaiseUserAttack3"
if move.statusMove? if move.statusMove?
if user.statStageAtMax?(:ATTACK) if user.statStageAtMax?(:ATTACK)
score -= 90 score -= 90
@@ -611,7 +611,7 @@ class PokeBattle_AI
score += 20 if user.stages[:DEFENSE]<0 score += 20 if user.stages[:DEFENSE]<0
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "RaiseUserSpeed2", "RaiseUserSpeed2LowerUserWeight" when "RaiseUserSpeed2", "RaiseUserSpeed2LowerUserWeight", "RaiseUserSpeed3"
if move.statusMove? if move.statusMove?
if user.statStageAtMax?(:SPEED) if user.statStageAtMax?(:SPEED)
score -= 90 score -= 90
@@ -664,7 +664,7 @@ class PokeBattle_AI
end end
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "RaiseUserSpDef2" when "RaiseUserSpDef1", "RaiseUserSpDef2", "RaiseUserSpDef3"
if move.statusMove? if move.statusMove?
if user.statStageAtMax?(:SPECIAL_DEFENSE) if user.statStageAtMax?(:SPECIAL_DEFENSE)
score -= 90 score -= 90
@@ -677,7 +677,20 @@ class PokeBattle_AI
score += 20 if user.stages[:SPECIAL_DEFENSE]<0 score += 20 if user.stages[:SPECIAL_DEFENSE]<0
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "RaiseUserEvasion2MinimizeUser" when "RaiseUserAccuracy1", "RaiseUserAccuracy2", "RaiseUserAccuracy3"
if move.statusMove?
if user.statStageAtMax?(:ACCURACY)
score -= 90
else
score += 40 if user.turnCount==0
score -= user.stages[:ACCURACY]*20
end
else
score += 10 if user.turnCount==0
score += 20 if user.stages[:ACCURACY]<0
end
#---------------------------------------------------------------------------
when "RaiseUserEvasion2", "RaiseUserEvasion2MinimizeUser", "RaiseUserEvasion3"
if move.statusMove? if move.statusMove?
if user.statStageAtMax?(:EVASION) if user.statStageAtMax?(:EVASION)
score -= 90 score -= 90
@@ -833,12 +846,15 @@ class PokeBattle_AI
avg += user.stages[:SPECIAL_DEFENSE]*10 avg += user.stages[:SPECIAL_DEFENSE]*10
score += (avg/3).floor score += (avg/3).floor
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerUserSpeed1" when "LowerUserSpeed1", "LowerUserSpeed2"
score += user.stages[:SPEED]*10 score += user.stages[:SPEED]*10
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerUserSpAtk2" when "LowerUserSpAtk1", "LowerUserSpAtk2"
score += user.stages[:SPECIAL_ATTACK]*10 score += user.stages[:SPECIAL_ATTACK]*10
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerUserSpDef1", "LowerUserSpDef2"
score += user.stages[:SPECIAL_DEFENSE] * 10
#---------------------------------------------------------------------------
when "RaiseTargetSpAtk1ConfuseTarget" when "RaiseTargetSpAtk1ConfuseTarget"
if !target.pbCanConfuse?(user,false) if !target.pbCanConfuse?(user,false)
score -= 90 score -= 90
@@ -957,7 +973,7 @@ class PokeBattle_AI
score += 20 if target.stages[:SPECIAL_DEFENSE]>0 score += 20 if target.stages[:SPECIAL_DEFENSE]>0
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerTargetAccuracy1" when "LowerTargetAccuracy1", "LowerTargetAccuracy2", "LowerTargetAccuracy3"
if move.statusMove? if move.statusMove?
if !target.pbCanLowerStatStage?(:ACCURACY,user) if !target.pbCanLowerStatStage?(:ACCURACY,user)
score -= 90 score -= 90
@@ -968,7 +984,7 @@ class PokeBattle_AI
score += 20 if target.stages[:ACCURACY]>0 score += 20 if target.stages[:ACCURACY]>0
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerTargetEvasion1", "LowerTargetEvasion2" when "LowerTargetEvasion1", "LowerTargetEvasion2", "LowerTargetEvasion3"
if move.statusMove? if move.statusMove?
if !target.pbCanLowerStatStage?(:EVASION,user) if !target.pbCanLowerStatStage?(:EVASION,user)
score -= 90 score -= 90
@@ -1003,7 +1019,7 @@ class PokeBattle_AI
avg += target.stages[:DEFENSE]*10 avg += target.stages[:DEFENSE]*10
score += avg/2 score += avg/2
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerTargetAttack2" when "LowerTargetAttack2", "LowerTargetAttack3"
if move.statusMove? if move.statusMove?
if !target.pbCanLowerStatStage?(:ATTACK,user) if !target.pbCanLowerStatStage?(:ATTACK,user)
score -= 90 score -= 90
@@ -1038,7 +1054,7 @@ class PokeBattle_AI
end end
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerTargetDefense2" when "LowerTargetDefense2", "LowerTargetDefense3"
if move.statusMove? if move.statusMove?
if !target.pbCanLowerStatStage?(:DEFENSE,user) if !target.pbCanLowerStatStage?(:DEFENSE,user)
score -= 90 score -= 90
@@ -1051,7 +1067,7 @@ class PokeBattle_AI
score += 20 if target.stages[:DEFENSE]>0 score += 20 if target.stages[:DEFENSE]>0
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerTargetSpeed2" when "LowerTargetSpeed2", "LowerTargetSpeed3"
if move.statusMove? if move.statusMove?
if !target.pbCanLowerStatStage?(:SPEED,user) if !target.pbCanLowerStatStage?(:SPEED,user)
score -= 90 score -= 90
@@ -1107,7 +1123,7 @@ class PokeBattle_AI
end end
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerTargetSpDef2" when "LowerTargetSpDef2", "LowerTargetSpDef3"
if move.statusMove? if move.statusMove?
if !target.pbCanLowerStatStage?(:SPECIAL_DEFENSE,user) if !target.pbCanLowerStatStage?(:SPECIAL_DEFENSE,user)
score -= 90 score -= 90
@@ -2530,7 +2546,7 @@ class PokeBattle_AI
score -= 90 score -= 90
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "RaiseAllySpDef1" when "RaiseTargetSpDef1"
if target.statStageAtMax?(:SPECIAL_DEFENSE) if target.statStageAtMax?(:SPECIAL_DEFENSE)
score -= 90 score -= 90
else else
@@ -2569,7 +2585,7 @@ class PokeBattle_AI
score += 20 if target.stages[:DEFENSE]>0 score += 20 if target.stages[:DEFENSE]>0
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerTargetSpAtk2" when "LowerTargetSpAtk2", "LowerTargetSpAtk3"
if !target.pbCanLowerStatStage?(:SPECIAL_ATTACK,user) if !target.pbCanLowerStatStage?(:SPECIAL_ATTACK,user)
score -= 90 score -= 90
else else
@@ -2727,7 +2743,9 @@ class PokeBattle_AI
score += 40 if user.hp<=user.totalhp/2 score += 40 if user.hp<=user.totalhp/2
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "RaiseUserAttack3IfKOTarget" when "RaiseTargetAttack1"
#---------------------------------------------------------------------------
when "RaiseTargetAttack1IfKOTarget"
score += 20 if !user.statStageAtMax?(:ATTACK) && target.hp<=target.totalhp/4 score += 20 if !user.statStageAtMax?(:ATTACK) && target.hp<=target.totalhp/4
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerTargetAtkSpAtk1SwitchOutUser" when "LowerTargetAtkSpAtk1SwitchOutUser"
@@ -2827,7 +2845,10 @@ class PokeBattle_AI
score += 40 score += 40
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "LowerUserDefense1" when "LowerUserAttack1", "LowerUserAttack2"
score += user.stages[:ATTACK] * 10
#---------------------------------------------------------------------------
when "LowerUserDefense1", "LowerUserDefense2"
score += user.stages[:DEFENSE]*10 score += user.stages[:DEFENSE]*10
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "HealUserByTargetAttackLowerTargetAttack1" when "HealUserByTargetAttackLowerTargetAttack1"
@@ -3362,8 +3383,6 @@ class PokeBattle_AI
when "RemoveTerrain" when "RemoveTerrain"
score -= 100 if @battle.field.terrain == :None score -= 100 if @battle.field.terrain == :None
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "RaiseUserAndAlliesAttack1"
#---------------------------------------------------------------------------
end end
return score return score
end end

View File

@@ -1417,7 +1417,7 @@ Category = Status
Accuracy = 0 Accuracy = 0
TotalPP = 20 TotalPP = 20
Target = NearAlly Target = NearAlly
FunctionCode = RaiseAllySpDef1 FunctionCode = RaiseTargetSpDef1
Description = The user raises the Sp. Def stat of an ally Pokémon by using a mysterious aroma. Description = The user raises the Sp. Def stat of an ally Pokémon by using a mysterious aroma.
#------------------------------- #-------------------------------
[BABYDOLLEYES] [BABYDOLLEYES]

View File

@@ -1685,7 +1685,7 @@ Category = Status
Accuracy = 0 Accuracy = 0
TotalPP = 20 TotalPP = 20
Target = NearAlly Target = NearAlly
FunctionCode = RaiseAllySpDef1 FunctionCode = RaiseTargetSpDef1
Description = The user raises the Sp. Def stat of an ally Pokémon by using a mysterious aroma. Description = The user raises the Sp. Def stat of an ally Pokémon by using a mysterious aroma.
#------------------------------- #-------------------------------
[BABYDOLLEYES] [BABYDOLLEYES]
@@ -6046,7 +6046,7 @@ Category = Status
Accuracy = 0 Accuracy = 0
TotalPP = 40 TotalPP = 40
Target = UserAndAllies Target = UserAndAllies
FunctionCode = RaiseUserAndAlliesAttack1 FunctionCode = RaiseTargetAttack1
Flags = Sound Flags = Sound
Description = The user howls loudly to raise the spirit of itself and allies, boosting their Attack stats. Description = The user howls loudly to raise the spirit of itself and allies, boosting their Attack stats.
#------------------------------- #-------------------------------

View File

@@ -1685,7 +1685,7 @@ Category = Status
Accuracy = 0 Accuracy = 0
TotalPP = 20 TotalPP = 20
Target = NearAlly Target = NearAlly
FunctionCode = RaiseAllySpDef1 FunctionCode = RaiseTargetSpDef1
Description = The user raises the Sp. Def stat of an ally Pokémon by using a mysterious aroma. Description = The user raises the Sp. Def stat of an ally Pokémon by using a mysterious aroma.
#------------------------------- #-------------------------------
[BABYDOLLEYES] [BABYDOLLEYES]
@@ -6046,7 +6046,7 @@ Category = Status
Accuracy = 0 Accuracy = 0
TotalPP = 40 TotalPP = 40
Target = UserAndAllies Target = UserAndAllies
FunctionCode = RaiseUserAndAlliesAttack1 FunctionCode = RaiseTargetAttack1
Flags = Sound Flags = Sound
Description = The user howls loudly to raise the spirit of itself and allies, boosting their Attack stats. Description = The user howls loudly to raise the spirit of itself and allies, boosting their Attack stats.
#------------------------------- #-------------------------------