|
@@ -3,10 +3,10 @@
|
|
|
# Declare characters used by this game. The color argument colorizes the
|
|
|
# name of the character.
|
|
|
|
|
|
+define true = "true" # or whatever != None for easier coding and better readability
|
|
|
init:
|
|
|
- $ true = "true" # or whatever != None for easier coding and better readability
|
|
|
$ player = None
|
|
|
- $ timeObj = None
|
|
|
+# default timeObj = None
|
|
|
|
|
|
init python:
|
|
|
|
|
@@ -27,7 +27,7 @@ init python:
|
|
|
self.dayChange()
|
|
|
|
|
|
def dayChange(self):
|
|
|
- loseMight(player, 10)
|
|
|
+ player.loseMight(10)
|
|
|
#rent calculation and all the other stuff
|
|
|
|
|
|
def getMinute(self):
|
|
@@ -94,6 +94,17 @@ init python:
|
|
|
def getCurAP(self):
|
|
|
return self.curHP
|
|
|
|
|
|
+ def hurt(self, amount):
|
|
|
+ self.curHP -= amount
|
|
|
+ if (self.curHP <= 0):
|
|
|
+ self.curHP = 0
|
|
|
+ return self.curHP # because somehow it is beyond me how to access it from child
|
|
|
+
|
|
|
+ def heal(self, amount):
|
|
|
+ self.curHP += amount
|
|
|
+ if (self.curHP > self.maxHP):
|
|
|
+ self.curHP = self.maxHP
|
|
|
+
|
|
|
class npcCharacterClass(characterClass):
|
|
|
def __init__(self, name, color, maxHP, maxAP, disposition):
|
|
|
characterClass.__init__(self, name, color, maxHP, maxAP)
|
|
@@ -115,6 +126,21 @@ init python:
|
|
|
self.money = 0
|
|
|
self.heat = 0 # how much suspicion is going around that there is an unknown daemon in the district
|
|
|
|
|
|
+ def hurt(self, amount):
|
|
|
+ if (super(playerCharacterClass, self).hurt(amount) == 0):
|
|
|
+ renpy.jump('gameover')
|
|
|
+
|
|
|
+ def sleep(self, time):
|
|
|
+ self.curAP = self.maxAP
|
|
|
+ self.heal((self.maxHP/20))
|
|
|
+ timeObj.passTime(time)
|
|
|
+
|
|
|
+ def loseMight(self, amount):
|
|
|
+ self.might -= amount
|
|
|
+ if (self.might <= 0):
|
|
|
+ self.might = 0
|
|
|
+ self.hurt(self.maxHP/5)
|
|
|
+
|
|
|
def wrapCharacter(char):
|
|
|
return Character(char.name, color=char.color)
|
|
|
|
|
@@ -126,56 +152,6 @@ init python:
|
|
|
char.skills.bj += 10
|
|
|
char.money += payment
|
|
|
timeObj.passTime(10)
|
|
|
-
|
|
|
- def sleep(char, time):
|
|
|
- char.curAP = char.maxAP
|
|
|
- heal(char,(char.maxHP/20))
|
|
|
- timeObj.passTime(time)
|
|
|
-
|
|
|
- def hurt(char, amount):
|
|
|
- char.curHP -= amount
|
|
|
- if (char.curHP <= 0):
|
|
|
- char.curHP = 0
|
|
|
- if (char == player):
|
|
|
- renpy.jump('gameover')
|
|
|
-
|
|
|
- def heal(char, amount):
|
|
|
- char.curHP += amount
|
|
|
- if (char.curHP > char.maxHP):
|
|
|
- char.curHP = char.maxHP
|
|
|
-
|
|
|
- def loseMight(char, amount):
|
|
|
- char.might -= amount
|
|
|
- if (char.might <= 0):
|
|
|
- char.might = 0
|
|
|
- if (char == player):
|
|
|
- hurt(player, player.maxHP/5)
|
|
|
-
|
|
|
-init:
|
|
|
-
|
|
|
- python:
|
|
|
- timeObj = timeClass()
|
|
|
- mapObj = mapClass()
|
|
|
- playerInventory = {} # dummy
|
|
|
- playerInventory["Pants"] = itemClass("Your lucky pants, plus they are your only pants", "lowerBody", None)
|
|
|
- player = playerCharacterClass('[playerName]', '#CC66DD', 100, 100, playerInventory)
|
|
|
- character = {}
|
|
|
- character["UnknownHooker"] = npcCharacterClass("Unknown Hooker", '#CC0066', 50, 100, 0)
|
|
|
- character["HostelOwner"] = npcCharacterClass("Slimy Joe", '#774411', 100, 100, 10)
|
|
|
- character["Marjorie"] = npcCharacterClass("Marjorie", '#CC0099', 250, 100, 25)
|
|
|
- character["Katrina"] = npcCharacterClass("Katrina", '#BB1177', 100, 100, 25)
|
|
|
-
|
|
|
- $ Player = wrapCharacter(player)
|
|
|
- $ UnknownHooker = wrapCharacter(character["UnknownHooker"])
|
|
|
- $ HostelOwner = wrapCharacter(character["HostelOwner"])
|
|
|
- $ Marjorie = wrapCharacter(character["Marjorie"])
|
|
|
- $ Katrina = wrapCharacter(character["Katrina"])
|
|
|
-
|
|
|
- $ Mom = Character("Mom", color='#33BB33')
|
|
|
- $ Narrator = Character(None, color='#999999')
|
|
|
-
|
|
|
- $ sideBarImage = "profile_pants.png"
|
|
|
-
|
|
|
screen sideBarScreen():
|
|
|
|
|
|
# image eileen composite = Composite(
|
|
@@ -220,4 +196,17 @@ screen mapScreen():
|
|
|
|
|
|
add "citymap.jpg"
|
|
|
|
|
|
- imagebutton idle "redlight_button.jpg" xpos 830 ypos 560 action Function(renpy.jump, label='downtownRedlight') # 200,113
|
|
|
+ imagebutton idle "redlight_button.jpg" xpos 830 ypos 560 action Show("redlighMenuScreen") #action Function(renpy.jump, label='downtownRedlight') # 200,113
|
|
|
+
|
|
|
+screen redlighMenuScreen():
|
|
|
+ modal True
|
|
|
+ default x = renpy.get_mouse_pos()[0]
|
|
|
+ default y = renpy.get_mouse_pos()[1]
|
|
|
+
|
|
|
+ frame:
|
|
|
+ pos (x + 10, y + 20)
|
|
|
+ has vbox
|
|
|
+ textbutton "Redlight district":
|
|
|
+ action Hide("redlighMenuScreen"), Function(renpy.jump, label='downtownRedlight')
|
|
|
+ textbutton "Brothel":
|
|
|
+ action Hide("redlighMenuScreen"), Function(renpy.jump, label='brothel')
|