2018-01-11 22:40:20 -08:00
|
|
|
MANIA_OT_ID EQU 00518
|
|
|
|
|
2018-01-24 08:17:05 -08:00
|
|
|
GiveShuckle: ; 7305
|
2016-03-27 09:47:28 -07:00
|
|
|
|
|
|
|
; Adding to the party.
|
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMonType], a
|
2016-03-27 09:47:28 -07:00
|
|
|
|
|
|
|
; Level 15 Shuckle.
|
|
|
|
ld a, SHUCKLE
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wCurPartySpecies], a
|
2016-03-27 09:47:28 -07:00
|
|
|
ld a, 15
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wCurPartyLevel], a
|
2016-03-27 09:47:28 -07:00
|
|
|
|
2018-01-16 11:30:10 -08:00
|
|
|
predef TryAddMonToParty
|
2016-03-27 09:47:28 -07:00
|
|
|
jr nc, .NotGiven
|
|
|
|
|
|
|
|
; Caught data.
|
|
|
|
ld b, 0
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall SetGiftPartyMonCaughtData
|
2016-03-27 09:47:28 -07:00
|
|
|
|
|
|
|
; Holding a Berry.
|
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wPartyCount]
|
2016-03-27 09:47:28 -07:00
|
|
|
dec a
|
|
|
|
push af
|
|
|
|
push bc
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPartyMon1Item
|
2016-03-27 09:47:28 -07:00
|
|
|
call AddNTimes
|
|
|
|
ld [hl], BERRY
|
|
|
|
pop bc
|
|
|
|
pop af
|
|
|
|
|
|
|
|
; OT ID.
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPartyMon1ID
|
2016-03-27 09:47:28 -07:00
|
|
|
call AddNTimes
|
2018-01-11 22:40:20 -08:00
|
|
|
ld a, HIGH(MANIA_OT_ID)
|
2016-03-27 09:47:28 -07:00
|
|
|
ld [hli], a
|
2018-01-11 22:40:20 -08:00
|
|
|
ld [hl], LOW(MANIA_OT_ID)
|
2016-03-27 09:47:28 -07:00
|
|
|
|
|
|
|
; Nickname.
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wPartyCount]
|
2016-03-27 09:47:28 -07:00
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPartyMonNicknames
|
2016-03-27 09:47:28 -07:00
|
|
|
call SkipNames
|
|
|
|
ld de, SpecialShuckleNick
|
|
|
|
call CopyName2
|
|
|
|
|
|
|
|
; OT.
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wPartyCount]
|
2016-03-27 09:47:28 -07:00
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPartyMonOT
|
2016-03-27 09:47:28 -07:00
|
|
|
call SkipNames
|
|
|
|
ld de, SpecialShuckleOT
|
|
|
|
call CopyName2
|
|
|
|
|
|
|
|
; Engine flag for this event.
|
2017-12-28 04:15:46 -08:00
|
|
|
ld hl, wDailyFlags
|
2018-01-22 12:59:24 -08:00
|
|
|
set DAILYFLAGS_GOT_SHUCKIE_TODAY_F, [hl]
|
2016-03-27 09:47:28 -07:00
|
|
|
ld a, 1
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2016-03-27 09:47:28 -07:00
|
|
|
ret
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
.NotGiven:
|
2016-03-27 09:47:28 -07:00
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2016-03-27 09:47:28 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
SpecialShuckleOT:
|
|
|
|
db "MANIA@"
|
|
|
|
SpecialShuckleNick:
|
|
|
|
db "SHUCKIE@"
|
|
|
|
|
2018-01-24 08:17:05 -08:00
|
|
|
ReturnShuckle: ; 737e
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall SelectMonFromParty
|
2016-03-27 09:47:28 -07:00
|
|
|
jr c, .refused
|
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartySpecies]
|
2016-03-27 09:47:28 -07:00
|
|
|
cp SHUCKLE
|
|
|
|
jr nz, .DontReturn
|
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartyMon]
|
|
|
|
ld hl, wPartyMon1ID
|
2016-03-27 09:47:28 -07:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
|
|
call AddNTimes
|
|
|
|
|
|
|
|
; OT ID
|
|
|
|
ld a, [hli]
|
2018-01-11 22:40:20 -08:00
|
|
|
cp HIGH(MANIA_OT_ID)
|
2016-03-27 09:47:28 -07:00
|
|
|
jr nz, .DontReturn
|
|
|
|
ld a, [hl]
|
2018-01-11 22:40:20 -08:00
|
|
|
cp LOW(MANIA_OT_ID)
|
2016-03-27 09:47:28 -07:00
|
|
|
jr nz, .DontReturn
|
|
|
|
|
|
|
|
; OT
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartyMon]
|
|
|
|
ld hl, wPartyMonOT
|
2016-03-27 09:47:28 -07:00
|
|
|
call SkipNames
|
|
|
|
ld de, SpecialShuckleOT
|
2016-04-10 11:42:14 -07:00
|
|
|
.CheckOT:
|
2016-03-27 09:47:28 -07:00
|
|
|
ld a, [de]
|
|
|
|
cp [hl]
|
|
|
|
jr nz, .DontReturn
|
|
|
|
cp "@"
|
|
|
|
jr z, .done
|
|
|
|
inc de
|
|
|
|
inc hl
|
|
|
|
jr .CheckOT
|
|
|
|
|
|
|
|
.done
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall CheckCurPartyMonFainted
|
2016-03-27 09:47:28 -07:00
|
|
|
jr c, .fainted
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartyMon]
|
|
|
|
ld hl, wPartyMon1Happiness
|
2016-03-27 09:47:28 -07:00
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
|
|
call AddNTimes
|
|
|
|
ld a, [hl]
|
|
|
|
cp 150
|
2018-01-11 22:40:20 -08:00
|
|
|
ld a, SHUCKIE_HAPPY
|
2016-03-27 09:47:28 -07:00
|
|
|
jr nc, .HappyToStayWithYou
|
2018-02-22 12:35:11 -08:00
|
|
|
xor a ; REMOVE_PARTY
|
2016-03-27 09:47:28 -07:00
|
|
|
ld [wPokemonWithdrawDepositParameter], a
|
2017-12-24 09:47:30 -08:00
|
|
|
callfar RemoveMonFromPartyOrBox
|
2018-01-11 22:40:20 -08:00
|
|
|
ld a, SHUCKIE_RETURNED
|
2016-04-10 11:42:14 -07:00
|
|
|
.HappyToStayWithYou:
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2016-03-27 09:47:28 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.refused
|
2018-01-11 22:40:20 -08:00
|
|
|
ld a, SHUCKIE_REFUSED
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2016-03-27 09:47:28 -07:00
|
|
|
ret
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
.DontReturn:
|
2018-01-11 22:40:20 -08:00
|
|
|
xor a ; SHUCKIE_WRONG_MON
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2016-03-27 09:47:28 -07:00
|
|
|
ret
|
|
|
|
|
|
|
|
.fainted
|
2018-01-11 22:40:20 -08:00
|
|
|
ld a, SHUCKIE_FAINTED
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wScriptVar], a
|
2016-03-27 09:47:28 -07:00
|
|
|
ret
|