Skip to content

Commit 84bb8f4

Browse files
committed
don't teleport the player home
1 parent f494962 commit 84bb8f4

6 files changed

+16
-17
lines changed

src/Animation.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ def __init__(self, picnames, framerate, loopp = True, surfacelist = False, offse
2323
self.relativeframerate = False
2424
self.offsetlist = offsetlist
2525

26-
def current_frame(self, outerframerate = None, begin_time = None, current_time = variables.settings.current_time):
26+
def current_frame(self, outerframerate = None, begin_time = None, current_time = None):
27+
if current_time == None:
28+
current_time = variables.settings.current_time
2729
if begin_time == None:
2830
begin_time = self.beginning_time
2931
at = current_time-begin_time

src/Battle.py

+10-11
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def __init__(self, enemy):
9292
self.battlechoice = ChoiceButtons(
9393
[" DANCE! ", "leave", variables.settings.soundpack, self.getscalename()], 13 / 16)
9494

95-
self.retrychoice = ChoiceButtons(["retry", "go home"], 13/16)
95+
self.retrychoice = ChoiceButtons(["retry", "flee"], 13/16)
9696

9797
# if pausetime is 0 it is not paused, otherwise it is paused and it records when it was paused
9898
self.pausetime = 0
@@ -629,6 +629,10 @@ def ontick(self):
629629
classvar.player.health = self.newplayerhealth # set it to the new health when done
630630
if self.newplayerhealth <= 0:
631631
self.state = "lose"
632+
classvar.player.addstoryevents(
633+
self.enemy.storyeventsonlose)
634+
classvar.player.timeslost += 1
635+
classvar.player.totalbattles += 1
632636
if self.enemy.name == "chimney":
633637
maps.engage_conversation("losetochimney", True)
634638
elif self.newenemyhealth == self.enemy.health: # if done with the animation
@@ -647,6 +651,7 @@ def ontick(self):
647651
if self.enemy.health <= self.newenemyhealth:
648652
self.enemy.health = self.newenemyhealth
649653
if self.newenemyhealth <= 0:
654+
classvar.player.totalbattles += 1
650655
self.state = "win"
651656
elif classvar.player.health == self.newplayerhealth: # if done with the animation
652657
self.state = "dance" # exit
@@ -676,21 +681,15 @@ def togotexp(self):
676681
classvar.player.heal()
677682
self.state = "got exp"
678683

684+
# go home (currently unused)
679685

680-
def lose(self):
681-
# go home
682-
classvar.player.addstoryevents(self.enemy.storyeventsonlose)
683-
686+
def teleport_home(self):
684687
maps.teleportplayerhome()
685-
686-
classvar.player.timeslost += 1
687-
classvar.player.totalbattles += 1
688688
returntoworld()
689689

690690

691691
def win(self):
692692
classvar.player.addstoryevents(self.enemy.storyeventsonwin)
693-
classvar.player.totalbattles += 1
694693
returntoworld()
695694

696695
def flee(self):
@@ -711,7 +710,7 @@ def change_scale(offset):
711710

712711
if(devoptions.devmode):
713712
if(key == devoptions.devlosebattlekey):
714-
self.lose()
713+
self.flee()
715714
elif(key == devoptions.devwinbattlekey):
716715
self.win()
717716
if self.state == 'dance':
@@ -759,7 +758,7 @@ def change_scale(offset):
759758
if self.retrychoice.getoption() == "retry":
760759
self.startnew()
761760
else:
762-
self.lose()
761+
self.flee()
763762
else:
764763
self.retrychoice.leftrightonkey(key)
765764
elif self.state == "win" and variables.checkkey("enter", key):

src/bearly_dancing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ def draw_world():
274274

275275

276276
# update the screen
277-
if len(variables.dirtyrects) > 0 and devoptions.devmode:
278-
pygame.draw.rect(variables.screen, variables.BLUE, variables.dirtyrects[0], 1)
277+
#if len(variables.dirtyrects) > 0 and devoptions.devmode:
278+
#pygame.draw.rect(variables.screen, variables.BLUE, variables.dirtyrects[0], 1)
279279

280280
variables.updatescreen()
281281

src/devoptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
testsmallp = False
66
devmode = True
77
# skip the fight with steve, add the event to the player
8-
skipsteve = True
8+
skipsteve = False
99
# adds all the soundpacks and keys to the player
1010
addallrewards = False
1111
# generates a new world on load no matter what

src/properties.txt

0 Bytes
Binary file not shown.

to do.txt

-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ sound
5858
battle
5959
- Feedback on starting a note, not just ending it?
6060
- Croc too wide
61-
6261
- change color of note while holding note
6362
- battle code is ugly and convoluted with all the time/health variables
6463

@@ -86,7 +85,6 @@ Knob ideas for the beatmap generator
8685
- sway probabilities for repeating at different lengths, and the size of these repetitions
8786

8887

89-
9088
graphics
9189
- frames around progress bars
9290
- random drumming octopus, drum mode

0 commit comments

Comments
 (0)