Don't require a boolean trainer flag for givepoke

Fixes #865
This commit is contained in:
Rangi 2022-01-10 21:16:34 -05:00
parent 039addcb00
commit 418c70a8af
3 changed files with 6 additions and 4 deletions

View File

@ -156,7 +156,7 @@ Until this document is filled out, the [G/S Scripting Compendium](https://hax.ii
## `$2C`: <code>checkpoke <i>mon_id</i></code>
## `$2D`: <code>givepoke <i>mon_id</i>, <i>level</i>[, <i>item</i>=0[, <i>trainer</i>=0, <i>ot_name</i>, <i>nickname</i>]]</code>
## `$2D`: <code>givepoke <i>mon_id</i>, <i>level</i>[, <i>item</i>=0[, <i>ot_name</i>, <i>nickname</i>]]</code>
## `$2E`: <code>giveegg <i>mon_id</i>, <i>level</i></code>

View File

@ -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

View File

@ -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