Compare commits

...

2 commits

Author SHA1 Message Date
04547161a3 picture 2024-03-10 16:05:15 +01:00
93bbb0eb84 Stoorryy 2024-03-10 16:05:09 +01:00
3 changed files with 14 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -115,7 +115,6 @@ def village(screen, clock, running, background, isblack, WIDTH, HEIGHT):
mobs = []
weapons = []
others = [Obstacle('fireplace', 'interactable', 'art/images/background/fireplace.png', False, 200, 500),
Obstacle('portal', 'interactable', 'art/images/background/portal.png', False, 700, 300),
Obstacle('house', 'Interactable', 'art/images/background/house.png', False, 500, 150, WIDTH=180, HEIGHT=160)]
npcs = [NPC('oldlady', 100, 'people/oldlady.png', 0, 200, 200)]
objects = [main, mobs, npcs, weapons, others]
@ -187,7 +186,7 @@ def house(screen, clock, running, background, isblack, WIDTH, HEIGHT):
mobs = []
weapons = []
others = []
npcs = [NPC('oldman', 100, 'people/reddy.png', 0, 200, 200)]
npcs = [NPC('elder', 100, 'people/reddy.png', 0, 200, 200)]
objects = [main, mobs, npcs, weapons, others]
room = Room('house', 'house', 'art/images/background/insideHouse.png', objects, WIDTH - 64, HEIGHT - 64, [True, True, True, True], 0)
freeze = False #Gameplay is freezed in certain situations

View file

@ -1,6 +1,7 @@
import pygame as pg
from classes import *
from main import *
import random
vec = pg.math.Vector2
fps = 60
@ -97,8 +98,9 @@ class Convo(Label):
self.convo_scene = convo_scene
self.convos = [
['oldlady', 0, ['There are so many rats here.', 'I wish someone would to something against that.','An experienced fighter could kill them.', 'For them it only takes a mouseclick.']],
['oldlady', 1, ['Oh, did you kill all the rats?', 'You must be the chosen one!', 'It would be nice if you would go and talk to the old wise man in the house.']],
['oldman', 0, ['Who are you?', 'You want to help us?', 'We have a serious problem with some monsters.', 'One day they appeared out of nowhere and started attacking.', 'When you jump into the portal outside,', 'You will be send to some monsters.', 'PLEASE help us!']]
['oldlady', 1, ['Oh, did you kill all the rats?', 'You must be the chosen one!', 'It would be nice if you would go and talk to the village elder.']],
['elder', 0, ['Who are you?', 'You want to help us?', 'We have a serious problem with some monsters.', 'One day they appeared out of nowhere and started attacking.', 'When you jump into the portal outside,', 'You will be send to some monsters.', 'PLEASE help us!']],
['elder', 1, ['Who are you?', 'You want to help us?', 'We have a serious problem with some monsters.', 'One day they appeared out of nowhere and started attacking.', 'When you jump into the portal outside,', 'You will be send to some monsters.', 'PLEASE help us!']]
]
def draw(self, screen):
@ -121,10 +123,15 @@ class Convo(Label):
else:
if convo[0] == 'oldlady':
if convo[1] == 0:
objects[1].append(Rat('rat', 200, 1000, 350, 1, 1, 1, 100, 25))
for i in range(0,5):
objects[1].append(Rat('rat', random.randint(150,250), 800, 400+i*20, 1, 1, 1, 100, 25))
elif convo[1] == 1:
objects[0][0].level.level = 5
while 'rat' in objects[0][0].killed: objects[0][0].remove('rat')
while 'rat' in objects[0][0].killed: objects[0][0].killed.remove('rat')
if convo[0] == 'elder':
if convo[1] == 0:
objects[4].append(Obstacle('portal', 'interactable', 'art/images/background/portal.png', False, 700, 300))
self.convo_scene += 1
self.convo_act = 0
self.npc.talking = False
objects[0][0].talking = False
@ -178,6 +185,8 @@ class MainCharacter(Fighter):
elif touches.name == 'portal' and self.level.level != 1:
return 'play'
elif touches.name == 'house' and self.level.level != 1:
self.x = 500
self.y = 400
return 'house'
elif 'wall' in touches.name:
return 'wall'