[common] game state refactored

This commit is contained in:
2018-02-12 22:26:25 +03:00
parent d279d52b09
commit f68e5d160f
14 changed files with 266 additions and 257 deletions

View File

@@ -17,18 +17,55 @@ bricks:
- {type: 4, layer: 2, armor: 2} # armor
- {type: 5, layer: 2, armor: 1} # brick
teams:
- id: human
player:
human: &human
control: human
life: 3
tanks:
- {type: human0, rate: 1}
- id: bot
spawnInterval: 3000
bot: &bot
control: bot
life: -1
tanks:
- {type: bot0, rate: 0.25, bonus: 0.25}
- {type: bot1, rate: 0.25, bonus: 0.25}
- {type: bot2, rate: 0.25, bonus: 0.25}
- {type: bot3, rate: 0.25, bonus: 0.25}
presets:
- id: player1
teams:
- id: human
life: -1
players:
- {<<: *human, index: 0, color: 0xFC9838, life: 3}
- id: bot
spawnInterval: 3000
life: 20
players:
- {<<: *bot, index: 0}
- {<<: *bot, index: 1}
- {<<: *bot, index: 2}
- {<<: *bot, index: 3}
- id: player2
teams:
- id: human
life: -1
players:
- {<<: *human, index: 0, color: 0xFC9838, life: 3}
- {<<: *human, index: 1, color: 0x159D49, life: 3}
- id: bot
spawnInterval: 3000
life: 20
players:
- {<<: *bot, index: 0}
- {<<: *bot, index: 1}
- {<<: *bot, index: 2}
- {<<: *bot, index: 3}
- {<<: *bot, index: 4}
- {<<: *bot, index: 5}
points:
- {team: human, type: eagle, index: -1, direction: right, x: 12, y: 24}
- {team: human, type: tank, index: 0, direction: top, x: 8, y: 24}

View File

@@ -17,18 +17,72 @@ bricks:
- {type: 4, layer: 2, armor: 2} # armor
- {type: 5, layer: 2, armor: 1} # brick
team_tanks: &team_tanks
team:
radiant: &radiant
id: radiant
color: 0xff5555
life: 20
dire: &dire
id: dire
color: 0x5555ff
life: 20
player: &player
life: -1
control: bot
tanks:
- {type: slow, rate: 0.5}
- {type: fast, rate: 0.5}
teams:
- <<: *team_tanks
id: radiant
color: 0xff5555
- <<: *team_tanks
id: dire
color: 0x5555ff
presets:
- id: player1
teams:
- <<: *radiant
players:
- {<<: *player, index: 0, control: human, color: 0xff7777}
- {<<: *player, index: 1}
- {<<: *player, index: 2}
- {<<: *player, index: 3}
- {<<: *player, index: 4}
- <<: *dire
players:
- {<<: *player, index: 0}
- {<<: *player, index: 1}
- {<<: *player, index: 2}
- {<<: *player, index: 3}
- {<<: *player, index: 4}
- id: player2_coop
teams:
- <<: *radiant
players:
- {<<: *player, index: 0, control: human, color: 0xff7777}
- {<<: *player, index: 1, control: human, color: 0xff7777}
- {<<: *player, index: 2}
- {<<: *player, index: 3}
- {<<: *player, index: 4}
- <<: *dire
players:
- {<<: *player, index: 0}
- {<<: *player, index: 1}
- {<<: *player, index: 2}
- {<<: *player, index: 3}
- {<<: *player, index: 4}
- id: player2_vs
teams:
- <<: *radiant
players:
- {<<: *player, index: 0, control: human, color: 0xff7777}
- {<<: *player, index: 1}
- {<<: *player, index: 2}
- {<<: *player, index: 3}
- {<<: *player, index: 4}
- <<: *dire
players:
- {<<: *player, index: 0, control: human, color: 0x7777ff}
- {<<: *player, index: 1}
- {<<: *player, index: 2}
- {<<: *player, index: 3}
- {<<: *player, index: 4}
points:
- {team: radiant, type: eagle, index: -1, direction: right, x: 0, y: 28}