mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed Bug Bite/Pluck and Fling not enabling Belch/triggering Symbiosis when a berry is consumed
This commit is contained in:
@@ -325,7 +325,7 @@ class Battle::Move::UserConsumeBerryRaiseDefense2 < Battle::Move::StatUpMove
|
|||||||
@battle.pbDisplay(_INTL("{1} ate its {2}!", user.pbThis, user.itemName))
|
@battle.pbDisplay(_INTL("{1} ate its {2}!", user.pbThis, user.itemName))
|
||||||
item = user.item
|
item = user.item
|
||||||
user.pbConsumeItem(true, false) # Don't trigger Symbiosis yet
|
user.pbConsumeItem(true, false) # Don't trigger Symbiosis yet
|
||||||
user.pbHeldItemTriggerCheck(item, false)
|
user.pbHeldItemTriggerCheck(item.id, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -367,7 +367,7 @@ class Battle::Move::AllBattlersConsumeBerry < Battle::Move
|
|||||||
@battle.pbCommonAnimation("EatBerry", target)
|
@battle.pbCommonAnimation("EatBerry", target)
|
||||||
item = target.item
|
item = target.item
|
||||||
target.pbConsumeItem(true, false) # Don't trigger Symbiosis yet
|
target.pbConsumeItem(true, false) # Don't trigger Symbiosis yet
|
||||||
target.pbHeldItemTriggerCheck(item, false)
|
target.pbHeldItemTriggerCheck(item.id, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -382,9 +382,11 @@ class Battle::Move::UserConsumeTargetBerry < Battle::Move
|
|||||||
return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
return if target.hasActiveAbility?(:STICKYHOLD) && !@battle.moldBreaker
|
||||||
item = target.item
|
item = target.item
|
||||||
itemName = target.itemName
|
itemName = target.itemName
|
||||||
|
user.setBelched
|
||||||
target.pbRemoveItem
|
target.pbRemoveItem
|
||||||
@battle.pbDisplay(_INTL("{1} stole and ate its target's {2}!", user.pbThis, itemName))
|
@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
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -442,8 +444,13 @@ class Battle::Move::ThrowUserItemAtTarget < Battle::Move
|
|||||||
when :KINGSROCK, :RAZORFANG
|
when :KINGSROCK, :RAZORFANG
|
||||||
target.pbFlinch(user)
|
target.pbFlinch(user)
|
||||||
else
|
else
|
||||||
target.pbHeldItemTriggerCheck(user.item, true)
|
target.pbHeldItemTriggerCheck(user.item_id, true)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
def pbEndOfMoveUsageEffect(user, targets, numHits, switchedBattlers)
|
def pbEndOfMoveUsageEffect(user, targets, numHits, switchedBattlers)
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ def drawSpot(bitmap, spotpattern, x, y, red, green, blue)
|
|||||||
spot = spotpattern[yy]
|
spot = spotpattern[yy]
|
||||||
width.times do |xx|
|
width.times do |xx|
|
||||||
next if spot[xx] != 1
|
next if spot[xx] != 1
|
||||||
xOrg = (x + xx) << 1
|
xOrg = (x + xx) * 2
|
||||||
yOrg = (y + yy) << 1
|
yOrg = (y + yy) * 2
|
||||||
color = bitmap.get_pixel(xOrg, yOrg)
|
color = bitmap.get_pixel(xOrg, yOrg)
|
||||||
r = color.red + red
|
r = color.red + red
|
||||||
g = color.green + green
|
g = color.green + green
|
||||||
@@ -63,6 +63,7 @@ def drawSpot(bitmap, spotpattern, x, y, red, green, blue)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbSpindaSpots(pkmn, bitmap)
|
def pbSpindaSpots(pkmn, bitmap)
|
||||||
|
# NOTE: These spots are doubled in size when drawing them.
|
||||||
spot1 = [
|
spot1 = [
|
||||||
[0, 0, 1, 1, 1, 1, 0, 0],
|
[0, 0, 1, 1, 1, 1, 0, 0],
|
||||||
[0, 1, 1, 1, 1, 1, 1, 0],
|
[0, 1, 1, 1, 1, 1, 1, 0],
|
||||||
@@ -123,6 +124,8 @@ def pbSpindaSpots(pkmn, bitmap)
|
|||||||
c = (id >> 8) & 15
|
c = (id >> 8) & 15
|
||||||
b = (id >> 4) & 15
|
b = (id >> 4) & 15
|
||||||
a = (id) & 15
|
a = (id) & 15
|
||||||
|
# NOTE: The coordinates below (b + 33, a + 25 and so on) are doubled when
|
||||||
|
# drawing the spot.
|
||||||
if pkmn.shiny?
|
if pkmn.shiny?
|
||||||
drawSpot(bitmap, spot1, b + 33, a + 25, -75, -10, -150)
|
drawSpot(bitmap, spot1, b + 33, a + 25, -75, -10, -150)
|
||||||
drawSpot(bitmap, spot2, d + 21, c + 24, -75, -10, -150)
|
drawSpot(bitmap, spot2, d + 21, c + 24, -75, -10, -150)
|
||||||
|
|||||||
@@ -195,14 +195,14 @@ class Window_PokemonOption < Window_DrawableCommand
|
|||||||
when EnumOption
|
when EnumOption
|
||||||
if @options[index].values.length > 1
|
if @options[index].values.length > 1
|
||||||
totalwidth = 0
|
totalwidth = 0
|
||||||
@options[index].each_value do |value|
|
@options[index].values.each do |value|
|
||||||
totalwidth += self.contents.text_size(value).width
|
totalwidth += self.contents.text_size(value).width
|
||||||
end
|
end
|
||||||
spacing = (rect.width - rect.x - optionwidth - totalwidth) / (@options[index].values.length - 1)
|
spacing = (rect.width - rect.x - optionwidth - totalwidth) / (@options[index].values.length - 1)
|
||||||
spacing = 0 if spacing < 0
|
spacing = 0 if spacing < 0
|
||||||
xpos = optionwidth + rect.x
|
xpos = optionwidth + rect.x
|
||||||
ivalue = 0
|
ivalue = 0
|
||||||
@options[index].each_value do |value|
|
@options[index].values.each do |value|
|
||||||
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
||||||
(ivalue == self[index]) ? SEL_VALUE_BASE_COLOR : self.baseColor,
|
(ivalue == self[index]) ? SEL_VALUE_BASE_COLOR : self.baseColor,
|
||||||
(ivalue == self[index]) ? SEL_VALUE_SHADOW_COLOR : self.shadowColor)
|
(ivalue == self[index]) ? SEL_VALUE_SHADOW_COLOR : self.shadowColor)
|
||||||
|
|||||||
Reference in New Issue
Block a user