mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-17 19:24:01 +02:00
Translate Gold's Light Screen / Reflect rose! messages
Same theme as the RBY fix, found while checking whether Gold had the same gap: EFFECT_LIGHT_SCREEN and EFFECT_REFLECT built their "'s SPCL.DEF/DEFENSE rose!" message by raw string concatenation, bypassing Strings() entirely -- unlike most other messages in this file (e.g. "%s\nused %s!" a few lines up), which already go through it. Wrap the whole message template in Strings(), matching that existing pattern; the substituted name still comes from monName() as before. Gold's gen2/Battle.lua has many more messages built the same unwrapped way (fainted!, learned..., missed!, and so on) -- that is the much larger "Battle messages" gap already tracked separately and deliberately left out of this change.
This commit is contained in:
@@ -2429,7 +2429,7 @@ Battle.MOVE_EFFECTS.EFFECT_LIGHT_SCREEN = function(self, attacker)
|
|||||||
if (side.lightScreen or 0) > 0 then return fail(self) end
|
if (side.lightScreen or 0) > 0 then return fail(self) end
|
||||||
side.lightScreen = Battle.SCREEN_TURNS
|
side.lightScreen = Battle.SCREEN_TURNS
|
||||||
self:emit({ kind = "message",
|
self:emit({ kind = "message",
|
||||||
text = self:monName(attacker) .. "'s SPCL.DEF rose!" })
|
text = Strings("%s's SPCL.DEF rose!", self:monName(attacker)) })
|
||||||
end
|
end
|
||||||
|
|
||||||
Battle.MOVE_EFFECTS.EFFECT_REFLECT = function(self, attacker)
|
Battle.MOVE_EFFECTS.EFFECT_REFLECT = function(self, attacker)
|
||||||
@@ -2437,7 +2437,7 @@ Battle.MOVE_EFFECTS.EFFECT_REFLECT = function(self, attacker)
|
|||||||
if (side.reflect or 0) > 0 then return fail(self) end
|
if (side.reflect or 0) > 0 then return fail(self) end
|
||||||
side.reflect = Battle.SCREEN_TURNS
|
side.reflect = Battle.SCREEN_TURNS
|
||||||
self:emit({ kind = "message",
|
self:emit({ kind = "message",
|
||||||
text = self:monName(attacker) .. "'s DEFENSE rose!" })
|
text = Strings("%s's DEFENSE rose!", self:monName(attacker)) })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- engine/battle/move_effects/safeguard.asm:1
|
-- engine/battle/move_effects/safeguard.asm:1
|
||||||
|
|||||||
Reference in New Issue
Block a user