Removed the unneeded direction parameter from catapults. No longer has to be included in the json file, won't cause crash.
This commit is contained in:
@@ -108,7 +108,6 @@
|
||||
"x": 145,
|
||||
"y": 0,
|
||||
"type": "catapult",
|
||||
"direction": -1,
|
||||
"fire_interval": 5000,
|
||||
"range": 15
|
||||
},
|
||||
|
@@ -107,7 +107,6 @@
|
||||
"x": 120,
|
||||
"y": 0,
|
||||
"type": "catapult",
|
||||
"direction": -1,
|
||||
"fire_interval": 5000,
|
||||
"range": 15
|
||||
},
|
||||
@@ -163,7 +162,7 @@
|
||||
"x_range": [189, 198],
|
||||
"y": 0,
|
||||
"enemy_type": "witch",
|
||||
"health": 4,
|
||||
"health": 2,
|
||||
"damage": 2,
|
||||
"attack_range": 1.5,
|
||||
"attack_pattern": {
|
||||
|
@@ -46,7 +46,7 @@
|
||||
"x_range": [21, 31],
|
||||
"y": 0,
|
||||
"enemy_type": "goblin",
|
||||
"health": 5,
|
||||
"health": 3,
|
||||
"damage": 2,
|
||||
"attack_range": 1,
|
||||
"attack_pattern": {
|
||||
@@ -83,7 +83,7 @@
|
||||
"x_range": [60, 70],
|
||||
"y": 0,
|
||||
"enemy_type": "goblin",
|
||||
"health": 5,
|
||||
"health": 3,
|
||||
"damage": 2,
|
||||
"attack_range": 1,
|
||||
"attack_pattern": {
|
||||
@@ -101,7 +101,7 @@
|
||||
"x_range": [71, 81],
|
||||
"y": 0,
|
||||
"enemy_type": "goblin",
|
||||
"health": 5,
|
||||
"health": 3,
|
||||
"damage": 2,
|
||||
"attack_range": 1,
|
||||
"attack_pattern": {
|
||||
@@ -143,7 +143,7 @@
|
||||
{
|
||||
"x_range": [101, 111],
|
||||
"y": 0,
|
||||
"enemy_type": "goblin",
|
||||
"enemy_type": "witch",
|
||||
"health": 6,
|
||||
"damage": 2,
|
||||
"attack_range": 1,
|
||||
@@ -171,7 +171,7 @@
|
||||
"x_range": [140, 150],
|
||||
"y": 0,
|
||||
"enemy_type": "goblin",
|
||||
"health": 6,
|
||||
"health": 3,
|
||||
"damage": 2,
|
||||
"attack_range": 1,
|
||||
"attack_pattern": {
|
||||
@@ -219,7 +219,6 @@
|
||||
"x": 175,
|
||||
"y": 0,
|
||||
"type": "catapult",
|
||||
"direction": -1,
|
||||
"fire_interval": 4500,
|
||||
"range": 20
|
||||
},
|
||||
|
@@ -7,7 +7,7 @@ class Pumpkin:
|
||||
def __init__(self, x, isHigh, direction, playerMaxHealth):
|
||||
self.x = x
|
||||
self.isHigh = isHigh
|
||||
self.direction = direction # 1 for right, -1 for left
|
||||
self.direction = direction
|
||||
self.speed = 0.15
|
||||
self.isActive = True
|
||||
self.damage = playerMaxHealth // 2 # Half of player's max health
|
||||
@@ -61,7 +61,6 @@ class Catapult(Object):
|
||||
isCollectible=False,
|
||||
)
|
||||
self.sounds = sounds
|
||||
self.direction = direction
|
||||
self.fireInterval = fireInterval # Time between shots in milliseconds
|
||||
self.firingRange = firingRange # How close player needs to be to trigger firing
|
||||
self.lastFireTime = 0
|
||||
|
@@ -59,7 +59,6 @@ class Level:
|
||||
xPos[0],
|
||||
obj["y"],
|
||||
self.sounds,
|
||||
direction=obj.get("direction", 1),
|
||||
fireInterval=obj.get("fireInterval", 5000),
|
||||
firingRange=obj.get("range", 20)
|
||||
)
|
||||
|
Reference in New Issue
Block a user