fix merge conflicts with dev

This commit is contained in:
1jamie
2026-08-13 07:39:11 -05:00
60 changed files with 1900 additions and 251 deletions
+18 -18
View File
@@ -1619,26 +1619,26 @@ function Battle:useMove(attacker, defender, moveId)
return
end
-- Damage that skips the formula entirely (constantdamage).
local fixed = Effects.fixedDamage(def.effect, attacker, defender, self.random, def)
-- Damage that skips the formula entirely. The move's own power goes with
-- it: EFFECT_STATIC_DAMAGE's arm of BattleCommand_ConstantDamage reads
-- BATTLE_VARS_MOVE_POWER as the damage (effect_commands.asm:3157-3161).
local fixed = Effects.fixedDamage(def.effect, attacker, defender, self.random,
def.power)
if fixed then
-- StaticDamage's effect script runs resettypematchup after constantdamage
-- (data/moves/effects.asm): immunities still miss (Sonic Boom vs Ghost).
-- Flat damage is otherwise unscaled — no STAB / effectiveness multiply.
if def.effect == "EFFECT_STATIC_DAMAGE" then
local defTypes = (self:speciesDef(defender) or {}).types or defender.types
local matchups = self.data.type_chart and self.data.type_chart.matchups
local mult = Damage.typeMultiplier(def.type, defTypes, matchups)
if mult == 0 then
self:markMissed()
self:emit({ kind = "message",
text = "It doesn't affect " .. self:monName(defender) .. "..." })
return
end
-- The constant-damage effect list carries `resettypematchup` instead of
-- `stab`, and that command misses the move outright when the matchup byte
-- is 0 (effect_commands.asm:1480-1493) -- an immune target is the one
-- thing that stops SONIC BOOM, NIGHT SHADE or SUPER FANG.
local defenderTypes = (self:speciesDef(defender) or {}).types
or defender.types
local matchups = self.data.type_chart and self.data.type_chart.matchups
if Damage.typeMultiplier(def.type, defenderTypes, matchups) == 0 then
self:markMissed()
self:emit({ kind = "message",
text = "It doesn't affect " .. self:monName(defender) .. "..." })
return
end
self:dealDamage(attacker, defender, fixed, {
move = def, moveId = moveId, effectiveness = 10,
})
self:dealDamage(attacker, defender, fixed, { move = def, moveId = moveId })
return
end