mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Merge branch 'dev' into ai
This commit is contained in:
@@ -104,11 +104,11 @@ class Battle::Move
|
||||
def pbFailsAgainstTarget?(user, target, show_message); return false; end
|
||||
|
||||
def pbMoveFailedLastInRound?(user, showMessage = true)
|
||||
unmoved = @battle.allBattlers.any? { |b|
|
||||
unmoved = @battle.allBattlers.any? do |b|
|
||||
next b.index != user.index &&
|
||||
[:UseMove, :Shift].include?(@battle.choices[b.index][0]) &&
|
||||
!b.movedThisRound?
|
||||
}
|
||||
end
|
||||
if !unmoved
|
||||
@battle.pbDisplay(_INTL("But it failed!")) if showMessage
|
||||
return true
|
||||
|
||||
@@ -226,16 +226,12 @@ class Battle::Move
|
||||
def pbModifyDamage(damageMult, user, target); return damageMult; end
|
||||
|
||||
def pbGetAttackStats(user, target)
|
||||
if specialMove?
|
||||
return user.spatk, user.stages[:SPECIAL_ATTACK] + 6
|
||||
end
|
||||
return user.spatk, user.stages[:SPECIAL_ATTACK] + 6 if specialMove?
|
||||
return user.attack, user.stages[:ATTACK] + 6
|
||||
end
|
||||
|
||||
def pbGetDefenseStats(user, target)
|
||||
if specialMove?
|
||||
return target.spdef, target.stages[:SPECIAL_DEFENSE] + 6
|
||||
end
|
||||
return target.spdef, target.stages[:SPECIAL_DEFENSE] + 6 if specialMove?
|
||||
return target.defense, target.stages[:DEFENSE] + 6
|
||||
end
|
||||
|
||||
@@ -400,9 +396,7 @@ class Battle::Move
|
||||
end
|
||||
end
|
||||
# Multi-targeting attacks
|
||||
if numTargets > 1
|
||||
multipliers[:final_damage_multiplier] *= 0.75
|
||||
end
|
||||
multipliers[:final_damage_multiplier] *= 0.75 if numTargets > 1
|
||||
# Weather
|
||||
case user.effectiveWeather
|
||||
when :Sun, :HarshSun
|
||||
|
||||
@@ -366,8 +366,7 @@ class Battle::Move::TwoTurnMove < Battle::Move
|
||||
@battle.pbDisplay(_INTL("{1} began charging up!", user.pbThis))
|
||||
end
|
||||
|
||||
def pbAttackingTurnMessage(user, targets)
|
||||
end
|
||||
def pbAttackingTurnMessage(user, targets); end
|
||||
|
||||
def pbEffectAgainstTarget(user, target)
|
||||
if @damagingTurn
|
||||
@@ -382,8 +381,7 @@ class Battle::Move::TwoTurnMove < Battle::Move
|
||||
# the latter just records the target is being Sky Dropped
|
||||
end
|
||||
|
||||
def pbAttackingTurnEffect(user, target)
|
||||
end
|
||||
def pbAttackingTurnEffect(user, target); end
|
||||
|
||||
def pbShowAnimation(id, user, targets, hitNum = 0, showAnimation = true)
|
||||
hitNum = 1 if @chargingTurn && !@damagingTurn # Charging anim
|
||||
|
||||
@@ -100,9 +100,7 @@ class Battle::Move::OHKO < Battle::Move::FixedDamageMove
|
||||
|
||||
def pbHitEffectivenessMessages(user, target, numTargets = 1)
|
||||
super
|
||||
if target.fainted?
|
||||
@battle.pbDisplay(_INTL("It's a one-hit KO!"))
|
||||
end
|
||||
@battle.pbDisplay(_INTL("It's a one-hit KO!")) if target.fainted?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1211,9 +1209,7 @@ end
|
||||
#===============================================================================
|
||||
class Battle::Move::UseTargetAttackInsteadOfUserAttack < Battle::Move
|
||||
def pbGetAttackStats(user, target)
|
||||
if specialMove?
|
||||
return target.spatk, target.stages[:SPECIAL_ATTACK] + 6
|
||||
end
|
||||
return target.spatk, target.stages[:SPECIAL_ATTACK] + 6 if specialMove?
|
||||
return target.attack, target.stages[:ATTACK] + 6
|
||||
end
|
||||
end
|
||||
|
||||
@@ -328,7 +328,7 @@ class Battle::Move::UserConsumeBerryRaiseDefense2 < Battle::Move::StatUpMove
|
||||
@battle.pbDisplay(_INTL("{1} ate its {2}!", user.pbThis, user.itemName))
|
||||
item = user.item
|
||||
user.pbConsumeItem(true, false) # Don't trigger Symbiosis yet
|
||||
user.pbHeldItemTriggerCheck(item, false)
|
||||
user.pbHeldItemTriggerCheck(item.id, false)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -370,7 +370,7 @@ class Battle::Move::AllBattlersConsumeBerry < Battle::Move
|
||||
@battle.pbCommonAnimation("EatBerry", target)
|
||||
item = target.item
|
||||
target.pbConsumeItem(true, false) # Don't trigger Symbiosis yet
|
||||
target.pbHeldItemTriggerCheck(item, false)
|
||||
target.pbHeldItemTriggerCheck(item.id, false)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -385,9 +385,11 @@ class Battle::Move::UserConsumeTargetBerry < Battle::Move
|
||||
return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
||||
item = target.item
|
||||
itemName = target.itemName
|
||||
user.setBelched
|
||||
target.pbRemoveItem
|
||||
@battle.pbDisplay(_INTL("{1} stole and ate its target's {2}!", user.pbThis, itemName))
|
||||
user.pbHeldItemTriggerCheck(item, false)
|
||||
user.pbHeldItemTriggerCheck(item.id, false)
|
||||
user.pbSymbiosis
|
||||
end
|
||||
end
|
||||
|
||||
@@ -445,8 +447,13 @@ class Battle::Move::ThrowUserItemAtTarget < Battle::Move
|
||||
when :KINGSROCK, :RAZORFANG
|
||||
target.pbFlinch(user)
|
||||
else
|
||||
target.pbHeldItemTriggerCheck(user.item, true)
|
||||
target.pbHeldItemTriggerCheck(user.item_id, true)
|
||||
end
|
||||
# NOTE: The official games only let the target use Belch if the berry flung
|
||||
# at it has some kind of effect (i.e. it isn't an effectless berry). I
|
||||
# think this isn't in the spirit of "consuming a berry", so I've said
|
||||
# that Belch is usable after having any kind of berry flung at you.
|
||||
target.setBelched if user.item.is_berry?
|
||||
end
|
||||
|
||||
def pbEndOfMoveUsageEffect(user, targets, numHits, switchedBattlers)
|
||||
|
||||
Reference in New Issue
Block a user