diff options
Diffstat (limited to 'Stages/Wintermaul/wintermaul.gd')
-rw-r--r-- | Stages/Wintermaul/wintermaul.gd | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/Stages/Wintermaul/wintermaul.gd b/Stages/Wintermaul/wintermaul.gd index e66a979..078edc6 100644 --- a/Stages/Wintermaul/wintermaul.gd +++ b/Stages/Wintermaul/wintermaul.gd @@ -18,6 +18,30 @@ var teams := Teams.new() var income_frequency := 15.0 +var price_map = { + "tower": { + "cost": 5, + "attack_range": func(attack_range: int, number_of_towers: int = 1): + return (attack_range / 8.0) * 10 * number_of_towers + , + "attack_power": func(attack_power: int, number_of_towers: int = 1): + return attack_power * 10 * number_of_towers + , + "attack_speed": func(attack_speed: int, number_of_towers: int = 1): + return attack_speed * 10 * number_of_towers + , + }, + + "unit": { + "tiers": [ + { + "cost": 5, + "income": 1, + }, + ], + }, +} + func _init(): super._init() @@ -35,15 +59,15 @@ func _ready(): if multiplayer.is_server(): for player in Network.get_players(): Network.update_player.rpc(player.id, { - "money": 50, + "money": 50 * 1000, "income": 5, }) # set camera limits - $Camera.limit_left = $Map.get_used_rect().position.x * %Map.tile_set.tile_size.x - %Map.tile_set.tile_size.x - $Camera.limit_right = $Map.get_used_rect().end.x * %Map.tile_set.tile_size.x - %Map.tile_set.tile_size.x - $Camera.limit_top = %Map.get_used_rect().position.y * %Map.tile_set.tile_size.y - $Camera.limit_bottom = %Map.get_used_rect().end.y * %Map.tile_set.tile_size.y + $Camera.limit_left = $Map.get_used_rect().position.x * %Map.tile_set.tile_size.x - %Map.tile_set.tile_size.x - 8 * %Map.tile_set.tile_size.y + $Camera.limit_right = $Map.get_used_rect().end.x * %Map.tile_set.tile_size.x - %Map.tile_set.tile_size.x + 8 * %Map.tile_set.tile_size.y + $Camera.limit_top = %Map.get_used_rect().position.y * %Map.tile_set.tile_size.y - 8 * %Map.tile_set.tile_size.y + $Camera.limit_bottom = %Map.get_used_rect().end.y * %Map.tile_set.tile_size.y + 8 * %Map.tile_set.tile_size.y # add players to teams Network.player_joined.connect(add_player) @@ -67,12 +91,6 @@ func _ready(): # initialize lives display update_lives("top", 0) update_lives("bottom", 0) - - %HUD.attack_value_changed.connect(func(value: int): - Network.update_player.rpc(Client.player.id, { - "money": -(value * 10), - }) - ) func _process(_delta: float) -> void: |