- [Pokemon Purple] Battle GUI code bits
- 28 Dec 2010 09:37:50 pm
- Last edited by tifreak8x on 07 Jan 2011 01:09:20 pm; edited 13 times in total
Battle GUI
Code:
This is what I have managed to get rewritten, for like the 5th time. Trying to make this work in the most efficient manner as possible.
Also, this topic will be used to post random bits of code as I work on the battle system and GUI.
Code:
ClrDraw
"0ZBD
prgmZRS:{94,0,3,15:prgmTEMP:prcmZC1
"rowSwap(ZSS->Str0:0->θ
1:prgmZCE:expr(Str9->Str4
{15,24:prgmZSP
SetUpEditor L_2
60->dim(L_2:Fill(0,L_2
iPart(L_EPRTY(1->L_2(43:10fPart(L_EPRTY(1->L_2(46
If Tmin=2:Then
"rowSwap(TRNRNAME->Str0:0->θ
10fPart(∟EPRTY(7:prgmZCE:Str9->Str7
"rowSwap(ZSS->Str0:iPart(∟EPRTY(7
prgmZCE:expr(Str9->Str4:{65,2:prgmZSP:1->U
Text(47,4,Str7,"WANTS
Text(53,4,"TO FIGHT!
Repeat getKey
Line(90,7,86,7,U
Line(89,6,87,6,U
Pt-Change(88,5
not(U->U
rand(20:End
For(F,4,14
Line(4,F,90,F,0
End
"rowSwap(ZPNA->Str0
L_2(43:prgmZCE
Text(47,4,Str7,"SENT
Text(53,4,"OUT",Str9:1->U
For(F,41,62
Line(61,F,92,F,0
End:End
If Tmin-1:Then
"rowSwap(ZPNA->Str0
0->θ:L_2(43:prgmZCE
Text(47,4,"WILD",Str9
Text(53,4,"APPEARED!
End
"rowSwap(ZPMA->Str0
L_2(43:prgmZCE:Str9->Str4
64->I:1->J:Asm(prgmZSP2
1->Z:"0ZEQU
prgmZRS:prgmTEMP:prgmZC1
Text(0,2,Str5
Text(6,15,"L_ ",L_2(46
Text(11,5,"HP
Line(14,49,38,49
Line(14,47,38,47
Line(3,53,3,44
Line(3,44,42,44
Line(4,43,42,43
Line(2,53,2,45
Line(41,45,40,46
Pt-On(39,48
Pt-On(40,45
Pt-On(13,48
iPart((E_2(L_2(1)/L_2(2)).25
Line(14,48,14+ans,48
For(F,4,14
Line(4,F,90,F,0
End
4->W:1->A:SetUpEditor L_PRTY
While W=4
If fPart(L_PRTY(A)=.5:Then
A+1->A:Else
4->θ:"ZTMP->Str0:prgmZCE
3->θ:prgmZCE
"L_P"+sub("123456",L_PRTY(A),1->Str7
1->θ:"UnArchive "+Str7+":"+Str7+sub(Str9,1,1)+"L_1:Archive "+Str7->Str9
1:prgmZCE:prgmZTMP:60->dim(L_1:L_PRTY(A->L_1(57
1->W:End:End
0->θ:"rowSwap(ZPNA->Str0
L_1(43:prgmZCE
Text(47,4,"GO! "+Str9+"!
Str9->Str7
For(F,19,42
Line(10,F,40,F,0
End:Str9->Str7
-32->I:21->J
"rowSwap(ZPMA->Str0
L_1(43:prgmZCE:Str9->Str4
Asm(prgmZSP2
Delvar Str4 Delvar Str9
Text(23,59,Str7
Text(29,66,"L_ "L_1(46
Text(34,56,"HP
Line(65,26,89,26
Line(65,24,89,24
Pt-On(64,25
Pt-On(90,25
Line(92,30,92,21
Line(92,21,52,21
Line(93,22,93,30
Line(52,20,91,20
Line(53,22,54,23
Pt-On(54,22
L_1(1)/L_1(2->G
(GE_2)/4->G
Line(65,25,65+G,25
For(F,4,14
Line(4,F,90,F,0
End
" ->Str7
Text(50,10,"FIGHT",Str7,"ITEM",Str7,"PKMN",Str7,"RUN
StorePic Pic2:0->Y
6->A:Whilei W=1
Text(50,A,">
getKey->K
If K:Text(50,A,"
A+4(A=6 and K=26)-20((K=24 and A>6)-(K=26 and A<70))-4(A=30 and K=24->A
If K=21:Then
If A=70:Then
If Tmin=2:Then
For(F,4,14
Line(4,F,90,F,0
End
Text(47,4,"NO! THERE'S NO RUNNING
Text(53,4,"FROM A TRAINER BATTLE!
1->U:Repeat getKey
Line(90,7,86,7,U
Line(89,6,87,6,U
Pt-Change(88,5
not(U->U
End
For(F,4,14
Line(4,F,90,F,0
End
RecallPic Pic2
End
If Tmin=1:Then
L_2(33)/4->C
While C>=256
C-256->C
End
L_1(33)32->D
(D/C)+(30Y->I
For(F,4,14
Line(4,F,90,F,0
End:Y+1->Y
If I<256
randInt(0,255
If Ans<I:Then:1->U
Text(47,4,"COULDN'T FLEE!
Repeat getKey
Line(90,7,86,7,U
Line(89,6,87,6,U
Pt-Change(88,5
not(U->U:rand(20
End
For(F,4,14
Line(4,F,90,F,0
End
10->W:End
If Ans>I or I>255:Then
Text(47,4,"GOT AWAY SAFELY!
1->U:Repeat getKey
Line(90,7,86,7,U
Line(89,6,87,6,U
Pt-Change(88,5
not(U->U:rand(20
End:2->W:End:End:End
This is what I have managed to get rewritten, for like the 5th time. Trying to make this work in the most efficient manner as possible.
Also, this topic will be used to post random bits of code as I work on the battle system and GUI.