forked from danenders/pkedx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontest_ai_scripts.s
903 lines (865 loc) · 32.1 KB
/
contest_ai_scripts.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
#include "constants/global.h"
#include "constants/contest.h"
.include "asm/macros.inc"
.include "asm/macros/contest_ai_script.inc"
.include "constants/constants.inc"
.section script_data, "aw", %progbits
enum_start
enum MON_1
enum MON_2
enum MON_3
enum MON_4
.align 2
gContestAI_ScriptsTable::
.4byte AI_CheckBadMove @ CONTEST_AI_CHECK_BAD_MOVE
.4byte AI_CheckCombo @ CONTEST_AI_CHECK_COMBO
.4byte AI_CheckBoring @ CONTEST_AI_CHECK_BORING
.4byte AI_CheckExcitement @ CONTEST_AI_CHECK_EXCITEMENT
.4byte AI_CheckOrder @ CONTEST_AI_CHECK_ORDER
.4byte AI_CheckGoodMove @ CONTEST_AI_CHECK_GOOD_MOVE
.4byte AI_Erratic @ CONTEST_AI_ERRATIC
.4byte AI_Nothing @ CONTEST_AI_DUMMY_1
.4byte AI_Nothing @ CONTEST_AI_DUMMY_2
.4byte AI_Nothing @ CONTEST_AI_DUMMY_3
.4byte AI_Nothing @ CONTEST_AI_DUMMY_4
.4byte AI_Nothing @ CONTEST_AI_DUMMY_5
.4byte AI_Nothing @ CONTEST_AI_DUMMY_6
.4byte AI_Nothing @ CONTEST_AI_DUMMY_7
.4byte AI_Nothing @ CONTEST_AI_DUMMY_8
.4byte AI_Nothing @ CONTEST_AI_DUMMY_9
.4byte AI_Nothing @ CONTEST_AI_DUMMY_10
.4byte AI_Nothing @ CONTEST_AI_DUMMY_11
.4byte AI_Nothing @ CONTEST_AI_DUMMY_12
.4byte AI_Nothing @ CONTEST_AI_DUMMY_13
.4byte AI_Nothing @ CONTEST_AI_DUMMY_14
.4byte AI_Nothing @ CONTEST_AI_DUMMY_15
.4byte AI_Nothing @ CONTEST_AI_DUMMY_16
.4byte AI_Nothing @ CONTEST_AI_DUMMY_17
.4byte AI_Nothing @ CONTEST_AI_DUMMY_18
.4byte AI_Nothing @ CONTEST_AI_DUMMY_19
.4byte AI_Nothing @ CONTEST_AI_DUMMY_20
.4byte AI_Nothing @ CONTEST_AI_DUMMY_21
.4byte AI_Nothing @ CONTEST_AI_DUMMY_22
.4byte AI_Nothing @ CONTEST_AI_DUMMY_23
.4byte AI_Nothing @ CONTEST_AI_DUMMY_24
.4byte AI_Nothing @ CONTEST_AI_DUMMY_25
@ Unused. Encourages improving condition on the 1st appeal, or startling mons if the users turn is later
AI_CheckTiming:
if_appeal_num_not_eq 0, AI_CheckTiming_SkipCondition
if_effect_not_eq CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS, AI_CheckTiming_SkipCondition
score +10
AI_CheckTiming_SkipCondition:
call AI_CheckTiming_TryStartle
end
AI_CheckTiming_TryStartle:
if_user_order_more_than MON_2, AI_CheckTiming_End
if_effect_type_not_eq CONTEST_EFFECT_TYPE_STARTLE_MON, AI_CheckTiming_End
if_effect_type_not_eq CONTEST_EFFECT_TYPE_STARTLE_MONS, AI_CheckTiming_End
score +10
AI_CheckTiming_End:
end
@ Unused, doesnt make much sense
@ Encourages using an avoid being startled move
@ The various appeal and turn checks are pointless, it will always encourage these moves
AI_AvoidStartle:
if_appeal_num_eq 0, AI_AvoidStartle_1stAppeal
if_appeal_num_eq 1, AI_AvoidStartle_2ndAppeal
if_appeal_num_eq 2, AI_AvoidStartle_3rdAppeal
if_appeal_num_eq 3, AI_AvoidStartle_4thAppeal
if_last_appeal AI_AvoidStartle_LastAppeal
end
AI_AvoidStartle_1stAppeal:
if_user_order_not_eq MON_1, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_2, AI_AvoidStartle_EncourageIfAvoidMove2
if_user_order_not_eq MON_3, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_4, AI_AvoidStartle_EncourageIfAvoidMove
end
AI_AvoidStartle_EncourageIfAvoidMove:
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_AvoidStartle_Encourage
end
AI_AvoidStartle_EncourageIfAvoidMove2:
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_AvoidStartle_Encourage
end
AI_AvoidStartle_EncourageIfAvoidMove3:
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_AvoidStartle_Encourage
end
AI_AvoidStartle_2ndAppeal:
if_user_order_not_eq MON_1, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_2, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_3, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_4, AI_AvoidStartle_EncourageIfAvoidMove
end
AI_AvoidStartle_3rdAppeal:
if_user_order_not_eq MON_1, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_2, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_3, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_4, AI_AvoidStartle_EncourageIfAvoidMove
end
AI_AvoidStartle_4thAppeal:
if_user_order_not_eq MON_1, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_2, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_3, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_4, AI_AvoidStartle_EncourageIfAvoidMove
end
AI_AvoidStartle_LastAppeal:
if_user_order_not_eq MON_1, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_2, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_3, AI_AvoidStartle_EncourageIfAvoidMove
if_user_order_not_eq MON_4, AI_AvoidStartle_EncourageIfAvoidMove
end
AI_AvoidStartle_Encourage:
score +10
end
AI_AvoidStartle_End:
end
@ Unused
AI_PreferMostAppealingMove:
if_most_appealing_move AI_PreferMostAppealingMove_Encourage
end
AI_PreferMostAppealingMove_Encourage:
score +10
end
@ Discourages using the same move multiple times if it would get boring
AI_CheckBoring:
if_effect_eq CONTEST_EFFECT_REPETITION_NOT_BORING, AI_CheckBoring_NotBoring
if_move_used_count_eq 1, AI_CheckBoring_1stRepeat
if_move_used_count_eq 2, AI_CheckBoring_2ndRepeat
if_move_used_count_eq 3, AI_CheckBoring_3rdRepeat
if_move_used_count_eq 4, AI_CheckBoring_4thRepeat
@ No repeats
end
AI_CheckBoring_1stRepeat:
score -5
end
AI_CheckBoring_2ndRepeat:
score -15
end
AI_CheckBoring_3rdRepeat:
score -20
end
AI_CheckBoring_4thRepeat:
score -25
end
AI_CheckBoring_NotBoring:
end
@ Strongly encourages using an exciting move if user is in a position to receive the max excitement bonus
@ Encourages using exciting moves in general
@ If the user doesnt have a good exciting move to use, then encourage lowering excitement to prevent
@ opponents from benefitting from the excitement
AI_CheckExcitement:
if_move_excitement_less_than 0, AI_CheckExcitement_Negative
if_move_excitement_eq 0, AI_CheckExcitement_Neutral
if_move_excitement_eq 1, AI_CheckExcitement_Positive
end
AI_CheckExcitement_Negative:
if_excitement_eq 4, AI_CheckExcitement_Negative_1AwayFromMax
if_excitement_eq 3, AI_CheckExcitement_Negative_2AwayFromMax
if_user_has_exciting_move AI_CheckExcitement_End
score +15
end
AI_CheckExcitement_Negative_1AwayFromMax:
if_user_order_not_eq MON_1, AI_CheckExcitement_Negative_1AwayFromMax_Not1stUp
if_random_less_than 51, AI_CheckExcitement_End
score +20
end
AI_CheckExcitement_Negative_1AwayFromMax_Not1stUp:
if_random_less_than 127, AI_CheckExcitement_End
score -10
end
AI_CheckExcitement_Negative_2AwayFromMax:
if_user_order_not_eq MON_1, AI_CheckExcitement_Negative_2AwayFromMax_Not1stUp
if_last_appeal AI_CheckExcitement_Negative_2AwayFromMax_LastAppeal
if_random_less_than 51, AI_CheckExcitement_End
score +10
end
AI_CheckExcitement_Negative_2AwayFromMax_LastAppeal:
score +15
end
AI_CheckExcitement_Negative_2AwayFromMax_Not1stUp:
if_random_less_than 127, AI_CheckExcitement_End
score +10
end
AI_CheckExcitement_Neutral:
if_random_less_than 127, AI_CheckExcitement_End
score +10
end
AI_CheckExcitement_Positive:
if_move_used_count_more_than 0, AI_CheckExcitement_Positive_Repeat
if_user_order_not_eq MON_1, AI_CheckExcitement_Positive_Not1stUpForMax
if_excitement_not_eq 4, AI_CheckExcitement_Positive_Not1stUpForMax
score +30
end
AI_CheckExcitement_Positive_Not1stUpForMax:
if_random_less_than 100, AI_CheckExcitement_End
score +10
end
AI_CheckExcitement_Positive_Repeat:
if_effect_not_eq CONTEST_EFFECT_REPETITION_NOT_BORING, AI_CheckExcitement_End
if_user_order_not_eq MON_1, AI_CheckExcitement_Positive_Not1stUpForMax
if_excitement_not_eq 4, AI_CheckExcitement_Positive_Not1stUpForMax
score +30
end
AI_CheckExcitement_End:
end
@ Strongly encourages using a move if it would finish a combo
@ Encourages using a move if it would start a combo, esp if the user goes earlier
@ Discourages starting a combo in the last round
@ Discourages using a combo finisher when its combo starter hasnt been used yet
AI_CheckCombo:
if_would_finish_combo AI_CheckCombo_WouldFinish
call AI_CheckCombo_CheckStarter
call AI_CheckCombo_CheckFinisherWithoutStarter
end
AI_CheckCombo_CheckStarter:
if_move_used_count_not_eq 0, AI_CheckCombo_End
if_not_combo_starter AI_CheckCombo_End
if_user_order_eq MON_1, AI_CheckCombo_Starter1stUp
if_user_order_eq MON_2, AI_CheckCombo_Starter2ndUp
if_user_order_eq MON_3, AI_CheckCombo_Starter3rdUp
if_user_order_eq MON_4, AI_CheckCombo_StarterLast
end
AI_CheckCombo_CheckFinisherWithoutStarter:
if_not_combo_finisher AI_CheckCombo_End
score -10
end
AI_CheckCombo_WouldFinish:
score +25
end
AI_CheckCombo_Starter1stUp:
if_last_appeal AI_CheckCombo_StarterOnLastAppeal
if_random_less_than 150, AI_CheckCombo_End
score +10
end
AI_CheckCombo_Starter2ndUp:
if_last_appeal AI_CheckCombo_StarterOnLastAppeal
if_random_less_than 125, AI_CheckCombo_End
score +10
end
AI_CheckCombo_Starter3rdUp:
if_last_appeal AI_CheckCombo_StarterOnLastAppeal
if_random_less_than 50, AI_CheckCombo_End
score +10
end
AI_CheckCombo_StarterLast:
if_last_appeal AI_CheckCombo_StarterOnLastAppeal
score +10
end
AI_CheckCombo_StarterOnLastAppeal:
if_random_less_than 125, AI_CheckCombo_End
score -15
end
AI_CheckCombo_End:
end
@ Checks if move should be encouraged based on its effect
AI_CheckGoodMove:
if_effect_eq CONTEST_EFFECT_BETTER_WITH_GOOD_CONDITION, AI_CGM_BetterWithGoodCondition
if_effect_eq CONTEST_EFFECT_NEXT_APPEAL_EARLIER, AI_CGM_NextAppealEarlier
if_effect_eq CONTEST_EFFECT_NEXT_APPEAL_LATER, AI_CGM_NextAppealLater
if_effect_eq CONTEST_EFFECT_REPETITION_NOT_BORING, AI_CGM_RepetitionNotBoring
if_effect_eq CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS, AI_CGM_ImproveCondition
if_effect_eq CONTEST_EFFECT_DONT_EXCITE_AUDIENCE, AI_CGM_DontExciteAudience
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES, AI_CGM_AppealAsGoodAsPrevOnes
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONE, AI_CGM_AppealAsGoodAsPrevOne
if_effect_eq CONTEST_EFFECT_BETTER_WHEN_AUDIENCE_EXCITED, AI_CGM_BetterWhenAudienceExcited
if_effect_eq CONTEST_EFFECT_WORSEN_CONDITION_OF_PREV_MONS, AI_CGM_WorsenConditionOfPrevMons
if_effect_eq CONTEST_EFFECT_SHIFT_JUDGE_ATTENTION, AI_CGM_TargetMonWithJudgesAttention
if_effect_eq CONTEST_EFFECT_STARTLE_MON_WITH_JUDGES_ATTENTION, AI_CGM_TargetMonWithJudgesAttention
if_effect_eq CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS, AI_CGM_MakeFollowingMonsNervous
if_effect_eq CONTEST_EFFECT_JAMS_OTHERS_BUT_MISS_ONE_TURN, AI_CGM_JamsOthersButMissOneTurn
end
AI_CGM_BetterWithGoodCondition:
if_user_condition_eq 3, AI_CGM_BetterWithGoodCondition_3
if_user_condition_eq 2, AI_CGM_BetterWithGoodCondition_2
if_user_condition_eq 1, AI_CGM_BetterWithGoodCondition_1
if_user_condition_eq 0, AI_CGM_BetterWithGoodCondition_0
end
AI_CGM_BetterWithGoodCondition_3:
score +20
end
AI_CGM_BetterWithGoodCondition_2:
if_random_less_than 125, AI_CGM_End
score +15
end
AI_CGM_BetterWithGoodCondition_1:
if_random_less_than 125, AI_CGM_End
score +5
end
AI_CGM_BetterWithGoodCondition_0:
score -20
end
AI_CGM_NextAppealEarlier:
if_user_doesnt_have_move CONTEST_EFFECT_BETTER_IF_FIRST, AI_CGM_End
if_random_less_than 50, AI_CGM_End
score +20
end
AI_CGM_NextAppealLater:
if_user_doesnt_have_move CONTEST_EFFECT_BETTER_IF_LAST, AI_CGM_End
if_random_less_than 50, AI_CGM_End
score +20
end
AI_CGM_RepetitionNotBoring:
if_user_order_not_eq MON_4, AI_CGM_End
if_random_less_than 50, AI_CGM_End
score +15
end
AI_CGM_Unused:
if_last_appeal AI_CGM_Unused_LastAppeal
if_random_less_than 220, AI_CGM_Unused_Discourage
score +10
end
AI_CGM_Unused_LastAppeal:
if_random_less_than 20, AI_CGM_End
score +15
end
AI_CGM_Unused_Discourage:
score -20
end
@ Enourages improving condition, esp if user has moves better with good condition or on 1st appeal
@ Discourages improving condition if at max condition, or if last appeal
AI_CGM_ImproveCondition:
if_user_doesnt_have_move CONTEST_EFFECT_BETTER_WITH_GOOD_CONDITION, AI_CGM_ImproveCondition_CheckAppealNum
if_user_condition_eq 3, AI_CGM_ImproveCondition_AtMax
if_random_less_than 50, AI_CGM_End
score +15
end
AI_CGM_ImproveCondition_AtMax:
score -10
end
AI_CGM_ImproveCondition_CheckAppealNum:
if_last_appeal AI_CGM_ImproveCondition_LastAppeal
if_appeal_num_eq 0, AI_CGM_ImproveCondition_FirstAppeal
if_move_used_count_eq 1, AI_CGM_End
if_random_less_than 125, AI_CGM_End
score +10
end
AI_CGM_ImproveCondition_FirstAppeal:
if_random_less_than 100, AI_CGM_End
score +10
end
AI_CGM_ImproveCondition_LastAppeal:
score -10
end
@ Encourage stopping audience excitement early in the appeal, or last appeal if no better options
AI_CGM_DontExciteAudience:
if_move_used_count_eq 1, AI_CGM_End
if_user_order_eq MON_1, AI_CGM_DontExciteAudience_EarlyTurn
if_user_order_eq MON_2, AI_CGM_DontExciteAudience_EarlyTurn
if_not_last_appeal AI_CGM_End
if_user_has_exciting_move AI_CGM_End
if_excitement_less_than 1, AI_CGM_End
score +10
end
AI_CGM_DontExciteAudience_EarlyTurn:
if_random_less_than 127, AI_CGM_End
score +10
end
@ Encourages move the later the user goes
AI_CGM_AppealAsGoodAsPrevOnes:
if_user_order_eq MON_2, AI_CGM_AppealAsGoodAsPrevOnes_2ndUp
if_user_order_eq MON_3, AI_CGM_AppealAsGoodAsPrevOnes_3rdUp
if_user_order_eq MON_4, AI_CGM_AppealAsGoodAsPrevOnes_Last
end
AI_CGM_AppealAsGoodAsPrevOnes_2ndUp:
score +5
end
AI_CGM_AppealAsGoodAsPrevOnes_3rdUp:
score +15
end
AI_CGM_AppealAsGoodAsPrevOnes_Last:
score +20
end
@ Encourages move more for each opponent who will have a turn before the user
AI_CGM_AppealAsGoodAsPrevOne:
if_user_order_eq MON_1, AI_CGM_AppealAsGoodAsPrevOne_1stUp
if_user_order_eq MON_2, AI_CGM_AppealAsGoodAsPrevOne_2ndUp
if_user_order_eq MON_3, AI_CGM_AppealAsGoodAsPrevOne_3rdUp
if_user_order_eq MON_4, AI_CGM_AppealAsGoodAsPrevOne_Last
end
AI_CGM_AppealAsGoodAsPrevOne_1stUp:
score -10
end
AI_CGM_AppealAsGoodAsPrevOne_2ndUp:
if_cannot_participate MON_1, AI_CGM_End
score +5
end
AI_CGM_AppealAsGoodAsPrevOne_3rdUp:
if_cannot_participate MON_1, AI_CGM_AppealAsGoodAsPrevOne_3rdUp_CheckMon2
score +5
goto AI_CGM_AppealAsGoodAsPrevOne_3rdUp_CheckMon2
end
AI_CGM_AppealAsGoodAsPrevOne_3rdUp_CheckMon2:
if_cannot_participate MON_2, AI_CGM_End
score +5
end
AI_CGM_AppealAsGoodAsPrevOne_Last:
if_cannot_participate MON_1, AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon2
score +5
goto AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon2
end
AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon2:
if_cannot_participate MON_2, AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon3
score +5
goto AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon3
end
AI_CGM_AppealAsGoodAsPrevOne_Last_CheckMon3:
if_cannot_participate MON_3, AI_CGM_End
score +5
end
@ Encourage move if audience is close to full exictement and user goes first
@ See bug note, only does this on 1st appeal (when it will never happen)
AI_CGM_BetterWhenAudienceExcited:
if_user_order_eq MON_1, AI_CGM_BetterWhenAudienceExcited_1stUp
if_user_order_more_than MON_1, AI_CGM_BetterWhenAudienceExcited_Not1stUp
end
AI_CGM_BetterWhenAudienceExcited_1stUp:
@ BUG: Should be if_appeal_num_eq 0
@ 1st up on 1st appeal excitement will always be 0
if_appeal_num_not_eq 0, AI_CGM_BetterWhenAudienceExcited_Not1stAppeal
if_excitement_eq 4, AI_CGM_BetterWhenAudienceExcited_1AwayFromMax
if_excitement_eq 3, AI_CGM_BetterWhenAudienceExcited_2AwayFromMax
end
AI_CGM_BetterWhenAudienceExcited_Not1stAppeal:
if_random_less_than 125, AI_CGM_End
score -15
end
AI_CGM_BetterWhenAudienceExcited_1AwayFromMax:
if_random_less_than 125, AI_CGM_End
score +20
end
AI_CGM_BetterWhenAudienceExcited_2AwayFromMax:
if_random_less_than 125, AI_CGM_End
score +15
end
AI_CGM_BetterWhenAudienceExcited_Not1stUp:
if_random_less_than 178, AI_CGM_End
score +10
end
@ Encourage move more for each condition star the prev mons have
AI_CGM_WorsenConditionOfPrevMons:
if_user_order_eq MON_1, AI_CGM_End
goto AI_CGM_WorsenConditionOfPrevMons_CheckMon1
end
AI_CGM_WorsenConditionOfPrevMons_CheckMon1:
if_cannot_participate MON_1, AI_CGM_WorsenConditionOfPrevMons_TryCheckMon2
if_condition_eq MON_1, 0, AI_CGM_WorsenConditionOfPrevMons_TryCheckMon2
if_condition_eq MON_1, 1, AI_CGM_WorsenConditionOfPrevMons_Mon1Has1Star
if_condition_eq MON_1, 2, AI_CGM_WorsenConditionOfPrevMons_Mon1Has2Stars
if_condition_eq MON_1, 3, AI_CGM_WorsenConditionOfPrevMons_Mon1Has3Stars
end
AI_CGM_WorsenConditionOfPrevMons_Mon1Has1Star:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
score +5
if_user_order_more_than MON_2, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
end
AI_CGM_WorsenConditionOfPrevMons_Mon1Has2Stars:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
score +10
if_user_order_more_than MON_2, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
end
AI_CGM_WorsenConditionOfPrevMons_Mon1Has3Stars:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
score +15
if_user_order_more_than MON_2, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
end
AI_CGM_WorsenConditionOfPrevMons_TryCheckMon2:
if_user_order_more_than MON_2, AI_CGM_WorsenConditionOfPrevMons_CheckMon2
end
AI_CGM_WorsenConditionOfPrevMons_CheckMon2:
if_cannot_participate MON_2, AI_CGM_WorsenConditionOfPrevMons_TryCheckMon3
if_condition_eq MON_2, 0, AI_CGM_WorsenConditionOfPrevMons_TryCheckMon3
if_condition_eq MON_2, 1, AI_CGM_WorsenConditionOfPrevMons_Mon2Has1Star
if_condition_eq MON_2, 2, AI_CGM_WorsenConditionOfPrevMons_Mon2Has2Stars
if_condition_eq MON_2, 3, AI_CGM_WorsenConditionOfPrevMons_Mon2Has3Stars
end
AI_CGM_WorsenConditionOfPrevMons_Mon2Has1Star:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
score +5
if_user_order_more_than MON_3, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
end
AI_CGM_WorsenConditionOfPrevMons_Mon2Has2Stars:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
score +10
if_user_order_more_than MON_3, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
end
AI_CGM_WorsenConditionOfPrevMons_Mon2Has3Stars:
if_random_less_than 125, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
score +15
if_user_order_more_than MON_3, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
end
AI_CGM_WorsenConditionOfPrevMons_TryCheckMon3:
if_user_order_more_than MON_3, AI_CGM_WorsenConditionOfPrevMons_CheckMon3
end
AI_CGM_WorsenConditionOfPrevMons_CheckMon3:
if_cannot_participate MON_3, AI_CGM_WorsenConditionOfPrevMons_end
if_condition_eq MON_3, 0, AI_CGM_WorsenConditionOfPrevMons_end
if_condition_eq MON_3, 1, AI_CGM_WorsenConditionOfPrevMons_Mon3Has1Star
if_condition_eq MON_3, 2, AI_CGM_WorsenConditionOfPrevMons_Mon3Has2Stars
if_condition_eq MON_3, 3, AI_CGM_WorsenConditionOfPrevMons_Mon3Has3Stars
end
AI_CGM_WorsenConditionOfPrevMons_Mon3Has1Star:
if_random_less_than 125, AI_CGM_End
score +5
end
AI_CGM_WorsenConditionOfPrevMons_Mon3Has2Stars:
if_random_less_than 125, AI_CGM_End
score +10
end
AI_CGM_WorsenConditionOfPrevMons_Mon3Has3Stars:
if_random_less_than 125, AI_CGM_End
score +15
end
AI_CGM_WorsenConditionOfPrevMons_end:
end
@ Encourage if a prev mon has started a combo, esp if they havent completed it yet
@ BUG: Incorrectly uses if_used_combo_starter below, instead of if_not_used_combo_starter
@ As a result it encourages move if a prev mon has not begun a combo
AI_CGM_TargetMonWithJudgesAttention:
if_user_order_eq MON_1, AI_CGM_End
goto AI_CGM_TargetMonWithJudgesAttention_CheckMon1
end
AI_CGM_TargetMonWithJudgesAttention_CheckMon1:
if_cannot_participate MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
if_used_combo_starter MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
score +2
if_not_completed_combo MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
score +8
end
AI_CGM_TargetMonWithJudgesAttention_CheckMon2:
if_user_order_eq MON_2, AI_CGM_End
if_cannot_participate MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
if_used_combo_starter MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
score +2
if_not_completed_combo MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
score +8
end
AI_CGM_TargetMonWithJudgesAttention_CheckMon3:
if_user_order_eq MON_3, AI_CGM_End
if_cannot_participate MON_3, AI_CGM_End
if_used_combo_starter MON_3, AI_CGM_End
if_random_less_than 125, AI_CGM_End
score +2
if_not_completed_combo MON_3, AI_CGM_End
score +8
end
@ Encourage making mons nervous that have started a combo and can appeal after the user
AI_CGM_MakeFollowingMonsNervous:
if_user_order_eq MON_4, AI_CGM_End
goto AI_CGM_MakeFollowingMonsNervous_CheckMon4
end
AI_CGM_MakeFollowingMonsNervous_CheckMon4:
if_cannot_participate MON_4, AI_CGM_MakeFollowingMonsNervous_CheckMon3
if_not_used_combo_starter MON_4, AI_CGM_MakeFollowingMonsNervous_CheckMon3
score +5
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
score +5
end
AI_CGM_MakeFollowingMonsNervous_CheckMon3:
if_user_order_eq MON_3, AI_CGM_End
if_cannot_participate MON_3, AI_CGM_MakeFollowingMonsNervous_CheckMon2
if_not_used_combo_starter MON_3, AI_CGM_MakeFollowingMonsNervous_CheckMon2
score +5
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
score +5
end
AI_CGM_MakeFollowingMonsNervous_CheckMon2:
if_user_order_eq MON_2, AI_CGM_End
if_cannot_participate MON_2, AI_CGM_End
if_not_used_combo_starter MON_2, AI_CGM_End
score +5
if_random_less_than 125, AI_CGM_End
score +5
end
@ Encourages move if users turn is later, or if its the last appeal
AI_CGM_JamsOthersButMissOneTurn:
if_last_appeal AI_CGM_JamsOthersButMissOneTurn_LastAppeal
goto AI_CGM_JamsOthersButMissOneTurn_TurnOrder
end
AI_CGM_JamsOthersButMissOneTurn_LastAppeal:
score +5
goto AI_CGM_JamsOthersButMissOneTurn_TurnOrder
end
AI_CGM_JamsOthersButMissOneTurn_TurnOrder:
if_user_order_eq MON_1, AI_CGM_JamsOthersButMissOneTurn_1stUp
if_user_order_eq MON_2, AI_CGM_JamsOthersButMissOneTurn_2ndUp
if_user_order_eq MON_3, AI_CGM_JamsOthersButMissOneTurn_3rdUp
if_user_order_eq MON_4, AI_CGM_JamsOthersButMissOneTurn_Last
end
AI_CGM_JamsOthersButMissOneTurn_1stUp:
score -15
end
AI_CGM_JamsOthersButMissOneTurn_2ndUp:
if_random_less_than 125, AI_CGM_End
score -10
end
AI_CGM_JamsOthersButMissOneTurn_3rdUp:
if_random_less_than 125, AI_CGM_End
score +5
end
AI_CGM_JamsOthersButMissOneTurn_Last:
if_random_less_than 125, AI_CGM_End
score +15
end
AI_CGM_End:
end
@ Randomly encourage moves in Cute, Smart, and Tough contests.
AI_Erratic:
if_contest_type_eq CONTEST_CATEGORY_CUTE, AI_Erratic_CuteSmartTough
if_contest_type_eq CONTEST_CATEGORY_SMART, AI_Erratic_CuteSmartTough
if_contest_type_eq CONTEST_CATEGORY_TOUGH, AI_Erratic_CuteSmartTough
end
AI_Erratic_CuteSmartTough:
if_random_less_than 125, AI_Erratic_End
score +10
end
AI_Erratic_End:
end
@ Checks if move should be discouraged based on its effect
AI_CheckBadMove:
if_effect_eq CONTEST_EFFECT_STARTLE_FRONT_MON, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_STARTLE_PREV_MON, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_BADLY_STARTLE_FRONT_MON, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_STARTLE_PREV_MON_2, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONE, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_BETTER_IF_SAME_TYPE, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_BETTER_IF_DIFF_TYPE, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_AFFECTED_BY_PREV_APPEAL, AI_CBM_DependsOnPrevMon
if_effect_eq CONTEST_EFFECT_SLIGHTLY_STARTLE_PREV_MONS, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_PREV_MONS, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_BADLY_STARTLE_PREV_MONS, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_PREV_MONS_2, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MON_WITH_JUDGES_ATTENTION, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_SHIFT_JUDGE_ATTENTION, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_JAMS_OTHERS_BUT_MISS_ONE_TURN, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_SAME_TYPE_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_BADLY_STARTLE_MONS_WITH_GOOD_APPEALS, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_COOL_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_BEAUTY_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_CUTE_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_SMART_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_STARTLE_MONS_TOUGH_APPEAL, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_BADLY_STARTLES_MONS_IN_GOOD_CONDITION, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_WORSEN_CONDITION_OF_PREV_MONS, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES, AI_CBM_DependsOnPrevMons
if_effect_eq CONTEST_EFFECT_MAKE_FOLLOWING_MON_NERVOUS, AI_CBM_DependsOnNextMon
if_effect_eq CONTEST_EFFECT_MAKE_FOLLOWING_MONS_NERVOUS, AI_CBM_DependsOnNextMons
if_effect_eq CONTEST_EFFECT_DONT_EXCITE_AUDIENCE, AI_CBM_DependsOnNextMons
if_effect_eq CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS, AI_CBM_ImproveCondition
if_effect_eq CONTEST_EFFECT_AVOID_STARTLE_ONCE, AI_CBM_AvoidStartle
if_effect_eq CONTEST_EFFECT_AVOID_STARTLE, AI_CBM_AvoidStartle
if_effect_eq CONTEST_EFFECT_AVOID_STARTLE_SLIGHTLY, AI_CBM_AvoidStartle
if_effect_eq CONTEST_EFFECT_GREAT_APPEAL_BUT_NO_MORE_MOVES, AI_CBM_NoMoreMoves
end
@ If previous mon is skipping turn (or user is first), discourage move
AI_CBM_DependsOnPrevMon:
if_user_order_eq MON_1, AI_CBM_DependsOnPrevMon_1stUp
if_user_order_eq MON_2, AI_CBM_DependsOnPrevMon_2ndUp
if_user_order_eq MON_3, AI_CBM_DependsOnPrevMon_3rdUp
if_user_order_eq MON_4, AI_CBM_DependsOnPrevMon_Last
end
AI_CBM_DependsOnPrevMon_1stUp:
score -10
end
AI_CBM_DependsOnPrevMon_2ndUp:
if_can_participate MON_1, AI_CBM_End
score -10
end
AI_CBM_DependsOnPrevMon_3rdUp:
if_can_participate MON_2, AI_CBM_End
score -10
end
AI_CBM_DependsOnPrevMon_Last:
if_can_participate MON_3, AI_CBM_End
score -10
end
@ If previous mons are all skipping turns (or user is first), discourage move
AI_CBM_DependsOnPrevMons:
if_user_order_eq MON_1, AI_CBM_DependsOnPrevMons_1stUp
if_user_order_eq MON_2, AI_CBM_DependsOnPrevMons_2ndUp
if_user_order_eq MON_3, AI_CBM_DependsOnPrevMons_3rdUp
if_user_order_eq MON_4, AI_CBM_DependsOnPrevMons_Last
end
AI_CBM_DependsOnPrevMons_1stUp:
score -20
end
AI_CBM_DependsOnPrevMons_2ndUp:
if_can_participate MON_1, AI_CBM_End
score -15
end
AI_CBM_DependsOnPrevMons_3rdUp:
if_can_participate MON_1, AI_CBM_End
if_can_participate MON_2, AI_CBM_End
score -15
end
AI_CBM_DependsOnPrevMons_Last:
if_can_participate MON_1, AI_CBM_End
if_can_participate MON_2, AI_CBM_End
if_can_participate MON_3, AI_CBM_End
score -15
end
@ If next mon is skipping turn (or user is last), discourage move
AI_CBM_DependsOnNextMon:
if_user_order_eq MON_1, AI_CBM_DependsOnNextMon_1stUp
if_user_order_eq MON_2, AI_CBM_DependsOnNextMon_2ndUp
if_user_order_eq MON_3, AI_CBM_DependsOnNextMon_3rdUp
score -10
end
AI_CBM_DependsOnNextMon_1stUp:
if_can_participate MON_2, AI_CBM_End
score -10
end
AI_CBM_DependsOnNextMon_2ndUp:
if_can_participate MON_3, AI_CBM_End
score -10
end
AI_CBM_DependsOnNextMon_3rdUp:
if_can_participate MON_4, AI_CBM_End
score -10
end
@ If next mons are all skipping turns (or user is last), discourage move
AI_CBM_DependsOnNextMons:
if_user_order_eq MON_1, AI_CBM_DependsOnNextMons_1stUp
if_user_order_eq MON_2, AI_CBM_DependsOnNextMons_2ndUp
if_user_order_eq MON_3, AI_CBM_DependsOnNextMons_3rdUp
score -10
end
AI_CBM_DependsOnNextMons_1stUp:
if_can_participate MON_2, AI_CBM_End
if_can_participate MON_3, AI_CBM_End
if_can_participate MON_4, AI_CBM_End
score -10
end
AI_CBM_DependsOnNextMons_2ndUp:
if_can_participate MON_3, AI_CBM_End
if_can_participate MON_4, AI_CBM_End
score -10
end
AI_CBM_DependsOnNextMons_3rdUp:
if_can_participate MON_4, AI_CBM_End
score -10
end
@ If at max condition, discourage move
AI_CBM_ImproveCondition:
if_user_condition_less_than 3, AI_CBM_End
score -20
end
@ If there are no upcoming mons who can make an appeal (or if user is last), discourage move
@ Identical to AI_CBM_DependsOnNextMons
AI_CBM_AvoidStartle:
if_user_order_eq MON_1, AI_CBM_AvoidStartle_1stUp
if_user_order_eq MON_2, AI_CBM_AvoidStartle_2ndUp
if_user_order_eq MON_3, AI_CBM_AvoidStartle_3rdUp
score -10
end
AI_CBM_AvoidStartle_1stUp:
if_can_participate MON_2, AI_CBM_End
if_can_participate MON_3, AI_CBM_End
if_can_participate MON_4, AI_CBM_End
score -10
end
AI_CBM_AvoidStartle_2ndUp:
if_can_participate MON_3, AI_CBM_End
if_can_participate MON_4, AI_CBM_End
score -10
end
AI_CBM_AvoidStartle_3rdUp:
if_can_participate MON_4, AI_CBM_End
score -10
end
@ Very good if its the last appeal, otherwise discourage move
AI_CBM_NoMoreMoves:
if_appeal_num_eq 0, AI_CBM_NoMoreMoves_1stAppeal
if_appeal_num_eq 1, AI_CBM_NoMoreMoves_2ndAppeal
if_appeal_num_eq 2, AI_CBM_NoMoreMoves_3rdAppeal
if_appeal_num_eq 3, AI_CBM_NoMoreMoves_4thAppeal
if_last_appeal AI_CBM_NoMoreMoves_LastAppeal
end
AI_CBM_NoMoreMoves_1stAppeal:
if_random_less_than 20, AI_CBM_End
score -15
end
AI_CBM_NoMoreMoves_2ndAppeal:
if_random_less_than 40, AI_CBM_End
score -15
end
AI_CBM_NoMoreMoves_3rdAppeal:
if_random_less_than 60, AI_CBM_End
score -15
end
AI_CBM_NoMoreMoves_4thAppeal:
if_random_less_than 80, AI_CBM_End
score -15
end
AI_CBM_NoMoreMoves_LastAppeal:
if_random_less_than 20, AI_CBM_End
score +20
end
AI_CBM_End:
end
@ Encourages/discourages move affected by the move order
@ e.g. use BETTER_IF_FIRST moves if user is first, dont use AVOID_STARTLE moves if last
AI_CheckOrder:
if_user_order_eq MON_1, AI_CheckOrder_1stUp
if_user_order_eq MON_2, AI_CheckOrder_2ndUp
if_user_order_eq MON_3, AI_CheckOrder_3rdUp
if_user_order_eq MON_4, AI_CheckOrder_Last
end
AI_CheckOrder_1stUp:
if_effect_eq CONTEST_EFFECT_BETTER_IF_FIRST, AI_CheckOrder_1stUp_Encourage
if_effect_eq CONTEST_EFFECT_BETTER_WHEN_LATER, AI_CheckOrder_1stUp_Discourage
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_CheckOrder_1stUp_RandomEncourage
end
AI_CheckOrder_1stUp_Encourage:
score +15
end
AI_CheckOrder_1stUp_Discourage:
score -15
end
AI_CheckOrder_1stUp_RandomEncourage:
if_random_less_than 100, AI_CBM_End
score +10
end
AI_CheckOrder_2ndUp:
if_effect_eq CONTEST_EFFECT_BETTER_WHEN_LATER, AI_CheckOrder_2ndUp_Discourage
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_CheckOrder_2ndUp_RandomEncourage
end
AI_CheckOrder_2ndUp_Discourage:
score -5
end
AI_CheckOrder_2ndUp_RandomEncourage:
if_random_less_than 125, AI_CBM_End
score +10
end
AI_CheckOrder_3rdUp:
if_effect_eq CONTEST_EFFECT_BETTER_WHEN_LATER, AI_CheckOrder_3rdUp_Encourage
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES, AI_CheckOrder_3rdUp_Encourage
if_effect_eq CONTEST_EFFECT_USER_MORE_EASILY_STARTLED, AI_CheckOrder_3rdUp_Encourage
end
AI_CheckOrder_3rdUp_Encourage:
score +5
end
AI_CheckOrder_Last:
if_effect_eq CONTEST_EFFECT_BETTER_WHEN_LATER, AI_CheckOrder_Last_StronglyEncourage
if_effect_eq CONTEST_EFFECT_BETTER_IF_LAST, AI_CheckOrder_Last_StronglyEncourage
if_effect_eq CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES, AI_CheckOrder_Last_StronglyEncourage
if_effect_eq CONTEST_EFFECT_USER_MORE_EASILY_STARTLED, AI_CheckOrder_Last_StronglyEncourage
if_effect_eq CONTEST_EFFECT_JAMS_OTHERS_BUT_MISS_ONE_TURN, AI_CheckOrder_Last_Encourage
if_effect_type_eq CONTEST_EFFECT_TYPE_AVOID_STARTLE, AI_CheckOrder_Last_Discourage
if_effect_type_eq CONTEST_EFFECT_TYPE_STARTLE_MONS, AI_CheckOrder_Last_RandomEncourage
end
AI_CheckOrder_Last_StronglyEncourage:
score +15
end
AI_CheckOrder_Last_Discourage:
score -10
end
AI_CheckOrder_Last_RandomEncourage:
if_random_less_than 125, AI_CBM_End
score +10
end
AI_CheckOrder_Last_Encourage:
score +5
end
AI_Nothing:
end