mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-13 16:04:58 +00:00
Coded some Gen 9 ability/item/move effects
This commit is contained in:
@@ -484,8 +484,10 @@ class Battle
|
||||
return allSameSideBattlers.select { |b| b.pbOwnedByPlayer? }.length
|
||||
end
|
||||
|
||||
def pbCheckGlobalAbility(abil)
|
||||
allBattlers.each { |b| return b if b.hasActiveAbility?(abil) }
|
||||
def pbCheckGlobalAbility(abil, check_mold_breaker = false)
|
||||
allBattlers.each do |b|
|
||||
return b if b.hasActiveAbility?(abil) && (!check_mold_breaker || !b.beingMoldBroken?)
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
@@ -497,6 +499,13 @@ class Battle
|
||||
return nil
|
||||
end
|
||||
|
||||
# Returns an array containing the IDs of all active abilities.
|
||||
def pbAllActiveAbilities
|
||||
ret = []
|
||||
allBattlers.each { |b| ret.push(b.ability_id) if b.abilityActive? }
|
||||
return ret
|
||||
end
|
||||
|
||||
# Given a battler index, and using battle side sizes, returns an array of
|
||||
# battler indices from the opposing side that are in order of most "opposite".
|
||||
# Used when choosing a target and pressing up/down to move the cursor to the
|
||||
|
||||
Reference in New Issue
Block a user