@@ -92,7 +92,7 @@ def __init__(self, enemy):
92
92
self .battlechoice = ChoiceButtons (
93
93
[" DANCE! " , "leave" , variables .settings .soundpack , self .getscalename ()], 13 / 16 )
94
94
95
- self .retrychoice = ChoiceButtons (["retry" , "go home " ], 13 / 16 )
95
+ self .retrychoice = ChoiceButtons (["retry" , "flee " ], 13 / 16 )
96
96
97
97
# if pausetime is 0 it is not paused, otherwise it is paused and it records when it was paused
98
98
self .pausetime = 0
@@ -629,6 +629,10 @@ def ontick(self):
629
629
classvar .player .health = self .newplayerhealth # set it to the new health when done
630
630
if self .newplayerhealth <= 0 :
631
631
self .state = "lose"
632
+ classvar .player .addstoryevents (
633
+ self .enemy .storyeventsonlose )
634
+ classvar .player .timeslost += 1
635
+ classvar .player .totalbattles += 1
632
636
if self .enemy .name == "chimney" :
633
637
maps .engage_conversation ("losetochimney" , True )
634
638
elif self .newenemyhealth == self .enemy .health : # if done with the animation
@@ -647,6 +651,7 @@ def ontick(self):
647
651
if self .enemy .health <= self .newenemyhealth :
648
652
self .enemy .health = self .newenemyhealth
649
653
if self .newenemyhealth <= 0 :
654
+ classvar .player .totalbattles += 1
650
655
self .state = "win"
651
656
elif classvar .player .health == self .newplayerhealth : # if done with the animation
652
657
self .state = "dance" # exit
@@ -676,21 +681,15 @@ def togotexp(self):
676
681
classvar .player .heal ()
677
682
self .state = "got exp"
678
683
684
+ # go home (currently unused)
679
685
680
- def lose (self ):
681
- # go home
682
- classvar .player .addstoryevents (self .enemy .storyeventsonlose )
683
-
686
+ def teleport_home (self ):
684
687
maps .teleportplayerhome ()
685
-
686
- classvar .player .timeslost += 1
687
- classvar .player .totalbattles += 1
688
688
returntoworld ()
689
689
690
690
691
691
def win (self ):
692
692
classvar .player .addstoryevents (self .enemy .storyeventsonwin )
693
- classvar .player .totalbattles += 1
694
693
returntoworld ()
695
694
696
695
def flee (self ):
@@ -711,7 +710,7 @@ def change_scale(offset):
711
710
712
711
if (devoptions .devmode ):
713
712
if (key == devoptions .devlosebattlekey ):
714
- self .lose ()
713
+ self .flee ()
715
714
elif (key == devoptions .devwinbattlekey ):
716
715
self .win ()
717
716
if self .state == 'dance' :
@@ -759,7 +758,7 @@ def change_scale(offset):
759
758
if self .retrychoice .getoption () == "retry" :
760
759
self .startnew ()
761
760
else :
762
- self .lose ()
761
+ self .flee ()
763
762
else :
764
763
self .retrychoice .leftrightonkey (key )
765
764
elif self .state == "win" and variables .checkkey ("enter" , key ):
0 commit comments