mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 06:04:59 +00:00
Generalised AI code for scoring stat changes
This commit is contained in:
@@ -155,6 +155,8 @@ end
|
||||
# Lower multiple of user's stats.
|
||||
#===============================================================================
|
||||
class Battle::Move::StatDownMove < Battle::Move
|
||||
attr_reader :statDown
|
||||
|
||||
def pbEffectWhenDealingDamage(user, target)
|
||||
return if @battle.pbAllFainted?(target.idxOwnSide)
|
||||
showAnim = true
|
||||
|
||||
@@ -907,11 +907,12 @@ class Battle::Move::RaiseTargetAtkSpAtk2 < Battle::Move
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user, target)
|
||||
showAnim = true
|
||||
if target.pbCanRaiseStatStage?(:ATTACK, user, self)
|
||||
target.pbRaiseStatStage(:ATTACK, 2, user)
|
||||
showAnim = false if target.pbRaiseStatStage(:ATTACK, 2, user, showAnim)
|
||||
end
|
||||
if target.pbCanRaiseStatStage?(:SPECIAL_ATTACK, user, self)
|
||||
target.pbRaiseStatStage(:SPECIAL_ATTACK, 2, user)
|
||||
target.pbRaiseStatStage(:SPECIAL_ATTACK, 2, user, showAnim)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user