mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Removed all excess whitespace and standardized line endings.
This commit is contained in:
@@ -39,7 +39,7 @@ class PokeBattle_AI
|
||||
deviation = c[1].to_f-mean
|
||||
varianceTimesN += deviation*deviation
|
||||
end
|
||||
# Using population standard deviation
|
||||
# Using population standard deviation
|
||||
# [(n-1) makes it a sample std dev, would be 0 with only 1 sample]
|
||||
return Math.sqrt(varianceTimesN/n)
|
||||
end
|
||||
@@ -66,4 +66,4 @@ class PokeBattle_AI
|
||||
@battle.pbRegisterMegaEvolution(idxBattler) if pbEnemyShouldMegaEvolve?(idxBattler)
|
||||
pbChooseMoves(idxBattler)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -179,4 +179,4 @@ class PokeBattle_AI
|
||||
end
|
||||
return 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -17,7 +17,7 @@ class PokeBattle_AI
|
||||
# super-effective and powerful
|
||||
if !shouldSwitch && battler.turnCount>0 && skill>=PBTrainerAI.highSkill
|
||||
target = battler.pbDirectOpposing(true)
|
||||
if !target.fainted? && target.lastMoveUsed>0 &&
|
||||
if !target.fainted? && target.lastMoveUsed>0 &&
|
||||
(target.level-battler.level).abs<=6
|
||||
moveData = pbGetMoveData(target.lastMoveUsed)
|
||||
moveType = moveData[MOVE_TYPE]
|
||||
@@ -135,7 +135,7 @@ class PokeBattle_AI
|
||||
if @battle.pbRegisterSwitch(idxBattler,list[0])
|
||||
PBDebug.log("[AI] #{battler.pbThis} (#{idxBattler}) will switch with " +
|
||||
"#{@battle.pbParty(idxBattler)[list[0]].name}")
|
||||
return
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -179,4 +179,4 @@ class PokeBattle_AI
|
||||
end
|
||||
return best
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -284,4 +284,4 @@ class PokeBattle_AI
|
||||
score += damagePercentage.to_i
|
||||
return score
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -213,7 +213,7 @@ class PokeBattle_AI
|
||||
#---------------------------------------------------------------------------
|
||||
when "01A"
|
||||
if user.pbOwnSide.effects[PBEffects::Safeguard]>0
|
||||
score -= 80
|
||||
score -= 80
|
||||
elsif user.status!=0
|
||||
score -= 40
|
||||
else
|
||||
@@ -1431,7 +1431,7 @@ class PokeBattle_AI
|
||||
end
|
||||
end
|
||||
if skill>=PBTrainerAI.highSkill
|
||||
if isConst?(target.ability,PBAbilities,:TRUANT) &&
|
||||
if isConst?(target.ability,PBAbilities,:TRUANT) &&
|
||||
user.opposes?(target)
|
||||
score -= 90
|
||||
elsif isConst?(target.ability,PBAbilities,:SLOWSTART) &&
|
||||
@@ -1460,7 +1460,7 @@ class PokeBattle_AI
|
||||
score -= 90
|
||||
end
|
||||
if skill>=PBTrainerAI.highSkill
|
||||
if isConst?(user.ability,PBAbilities,:TRUANT) &&
|
||||
if isConst?(user.ability,PBAbilities,:TRUANT) &&
|
||||
user.opposes?(target)
|
||||
score += 90
|
||||
elsif isConst?(user.ability,PBAbilities,:SLOWSTART) &&
|
||||
@@ -1487,7 +1487,7 @@ class PokeBattle_AI
|
||||
end
|
||||
end
|
||||
if skill>=PBTrainerAI.highSkill
|
||||
if isConst?(target.ability,PBAbilities,:TRUANT) &&
|
||||
if isConst?(target.ability,PBAbilities,:TRUANT) &&
|
||||
user.opposes?(target)
|
||||
score -= 90
|
||||
elsif isConst?(target.ability,PBAbilities,:SLOWSTART) &&
|
||||
@@ -1795,7 +1795,7 @@ class PokeBattle_AI
|
||||
score -= 90 if user.effects[PBEffects::Imprison]
|
||||
#---------------------------------------------------------------------------
|
||||
when "0B9"
|
||||
score -= 90 if target.effects[PBEffects::Disable]>0
|
||||
score -= 90 if target.effects[PBEffects::Disable]>0
|
||||
#---------------------------------------------------------------------------
|
||||
when "0BA"
|
||||
score -= 90 if target.effects[PBEffects::Taunt]>0
|
||||
@@ -1872,9 +1872,9 @@ class PokeBattle_AI
|
||||
#---------------------------------------------------------------------------
|
||||
when "0D4"
|
||||
if user.hp<=user.totalhp/4
|
||||
score -= 90
|
||||
score -= 90
|
||||
elsif user.hp<=user.totalhp/2
|
||||
score -= 50
|
||||
score -= 50
|
||||
end
|
||||
#---------------------------------------------------------------------------
|
||||
when "0D5", "0D6"
|
||||
@@ -1971,7 +1971,7 @@ class PokeBattle_AI
|
||||
!target.pbCanLowerStatStage?(PBStats::SPATK,user)
|
||||
score -= 100
|
||||
elsif @battle.pbAbleNonActiveCount(user.idxOwnSide)==0
|
||||
score -= 100
|
||||
score -= 100
|
||||
else
|
||||
score += target.stages[PBStats::ATTACK]*10
|
||||
score += target.stages[PBStats::SPATK]*10
|
||||
@@ -2022,7 +2022,7 @@ class PokeBattle_AI
|
||||
when "0EB"
|
||||
if target.effects[PBEffects::Ingrain] ||
|
||||
(skill>=PBTrainerAI.highSkill && target.hasActiveAbility?(:SUCTIONCUPS))
|
||||
score -= 90
|
||||
score -= 90
|
||||
else
|
||||
ch = 0
|
||||
@battle.pbParty(target.index).each_with_index do |pkmn,i|
|
||||
@@ -2952,7 +2952,7 @@ class PokeBattle_AI
|
||||
#---------------------------------------------------------------------------
|
||||
when "167"
|
||||
if user.pbOwnSide.effects[PBEffects::AuroraVeil]>0 || @battle.pbWeather!=PBWeather::Hail
|
||||
score -= 90
|
||||
score -= 90
|
||||
else
|
||||
score += 40
|
||||
end
|
||||
@@ -3072,4 +3072,4 @@ class PokeBattle_AI
|
||||
end
|
||||
return score
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class PokeBattle_AI
|
||||
#=============================================================================
|
||||
#
|
||||
#
|
||||
#=============================================================================
|
||||
def pbTargetsMultiple?(move,user)
|
||||
numTargets = 0
|
||||
@@ -672,4 +672,4 @@ class PokeBattle_AI
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user