From 418c70a8afd034ed1ded863bd60e1f11f714f962 Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 10 Jan 2022 21:16:34 -0500 Subject: [PATCH] Don't require a boolean trainer flag for `givepoke` Fixes #865 --- docs/event_commands.md | 2 +- macros/scripts/events.asm | 6 ++++-- maps/Route35GoldenrodGate.asm | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/event_commands.md b/docs/event_commands.md index 917dda09c..8e878a758 100644 --- a/docs/event_commands.md +++ b/docs/event_commands.md @@ -156,7 +156,7 @@ Until this document is filled out, the [G/S Scripting Compendium](https://hax.ii ## `$2C`: checkpoke mon_id -## `$2D`: givepoke mon_id, level[, item=0[, trainer=0, ot_name, nickname]] +## `$2D`: givepoke mon_id, level[, item=0[, ot_name, nickname]] ## `$2E`: giveegg mon_id, level diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm index 0a18456fa..c260a3a81 100644 --- a/macros/scripts/events.asm +++ b/macros/scripts/events.asm @@ -300,6 +300,8 @@ if _NARG == 2 givepoke \1, \2, NO_ITEM, FALSE elif _NARG == 3 givepoke \1, \2, \3, FALSE +elif _NARG == 5 + givepoke \1, \2, \3, TRUE, \4, \5 else db givepoke_command db \1 ; pokemon @@ -307,8 +309,8 @@ else db \3 ; item db \4 ; trainer if \4 - dw \5 ; trainer_name_pointer - dw \6 ; pkmn_nickname + dw \5 ; nickname_pointer + dw \6 ; ot_name_pointer endc endc ENDM diff --git a/maps/Route35GoldenrodGate.asm b/maps/Route35GoldenrodGate.asm index 2eae3cd47..05dd7d85b 100644 --- a/maps/Route35GoldenrodGate.asm +++ b/maps/Route35GoldenrodGate.asm @@ -28,7 +28,7 @@ RandyScript: writetext Route35GoldenrodGatePlayerReceivedAMonWithMailText playsound SFX_KEY_ITEM waitsfx - givepoke SPEAROW, 10, NO_ITEM, TRUE, GiftSpearowName, GiftSpearowOTName + givepoke SPEAROW, 10, NO_ITEM, GiftSpearowName, GiftSpearowOTName givepokemail GiftSpearowMail setevent EVENT_GOT_KENYA .alreadyhavekenya