mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 14:44:58 +00:00
AI and other Gen 8 Effects (#123)
* Added Rattled being triggered by Intimidate in Gen 8 * Added Rapid Spin speed boost effect * Added basic AI for Gen 8 * Tweaked Leppa berry's effect * Added Ability Patch's exemption for Zygarde * Added Curse's Gen 8 targeting change * Added Teleport's Gen 8 effect * Added check for Choice items in Instruct and Dancer * Added Quash's Gen 8 change to the order that multiple Quashed Pokémon move in Co-authored-by: Maruno17 <serialcolour@hotmail.com>
This commit is contained in:
@@ -129,19 +129,29 @@ class PokeBattle_Battle
|
||||
return if @decision>0
|
||||
next if advance
|
||||
# Quashed
|
||||
quashLevel = 0
|
||||
loop do
|
||||
quashLevel += 1
|
||||
moreQuash = false
|
||||
if Settings::MECHANICS_GENERATION >= 8
|
||||
priority.each do |b|
|
||||
moreQuash = true if b.effects[PBEffects::Quash]>quashLevel
|
||||
next unless b.effects[PBEffects::Quash]==quashLevel && !b.fainted?
|
||||
next unless b.effects[PBEffects::Quash] > 0 && !b.fainted?
|
||||
next unless @choices[b.index][0]==:UseMove || @choices[b.index][0]==:Shift
|
||||
next if b.movedThisRound?
|
||||
advance = b.pbProcessTurn(@choices[b.index])
|
||||
break
|
||||
break if advance
|
||||
end
|
||||
else
|
||||
quashLevel = 0
|
||||
loop do
|
||||
quashLevel += 1
|
||||
moreQuash = false
|
||||
priority.each do |b|
|
||||
moreQuash = true if b.effects[PBEffects::Quash]>quashLevel
|
||||
next unless b.effects[PBEffects::Quash]==quashLevel && !b.fainted?
|
||||
next unless @choices[b.index][0]==:UseMove || @choices[b.index][0]==:Shift
|
||||
next if b.movedThisRound?
|
||||
advance = b.pbProcessTurn(@choices[b.index])
|
||||
break
|
||||
end
|
||||
break if advance || !moreQuash
|
||||
end
|
||||
break if advance || !moreQuash
|
||||
end
|
||||
return if @decision>0
|
||||
next if advance
|
||||
|
||||
Reference in New Issue
Block a user