diff --git a/package.json b/package.json index 0d7cc76..5519e32 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tankz", - "version": "0.8.10", + "version": "0.8.11", "private": true, "devDependencies": { "dateformat": "^3.0.3", diff --git a/src/client/resources/image/bonus/grenade.png b/src/client/resources/image/bonus/grenade.png index 5d6be95..3c3c765 100644 Binary files a/src/client/resources/image/bonus/grenade.png and b/src/client/resources/image/bonus/grenade.png differ diff --git a/src/client/resources/image/bonus/gun.png b/src/client/resources/image/bonus/gun.png new file mode 100644 index 0000000..6ce09f9 Binary files /dev/null and b/src/client/resources/image/bonus/gun.png differ diff --git a/src/client/resources/image/bonus/life.png b/src/client/resources/image/bonus/life.png index c4c59d0..167b527 100644 Binary files a/src/client/resources/image/bonus/life.png and b/src/client/resources/image/bonus/life.png differ diff --git a/src/client/resources/image/bonus/shovel.png b/src/client/resources/image/bonus/shovel.png index 9746dac..9d226d8 100644 Binary files a/src/client/resources/image/bonus/shovel.png and b/src/client/resources/image/bonus/shovel.png differ diff --git a/src/client/resources/image/bonus/star.png b/src/client/resources/image/bonus/star.png index 06cf55b..732f8ce 100644 Binary files a/src/client/resources/image/bonus/star.png and b/src/client/resources/image/bonus/star.png differ diff --git a/src/client/resources/image/eagle/eagle-death.png b/src/client/resources/image/eagle/eagle-death.png index 5e71aa4..b128631 100644 Binary files a/src/client/resources/image/eagle/eagle-death.png and b/src/client/resources/image/eagle/eagle-death.png differ diff --git a/src/client/resources/image/eagle/eagle-protected.png b/src/client/resources/image/eagle/eagle-protected.png index 92d3360..0b593f8 100644 Binary files a/src/client/resources/image/eagle/eagle-protected.png and b/src/client/resources/image/eagle/eagle-protected.png differ diff --git a/src/client/resources/image/eagle/eagle.png b/src/client/resources/image/eagle/eagle.png index 86fdd5c..f646334 100644 Binary files a/src/client/resources/image/eagle/eagle.png and b/src/client/resources/image/eagle/eagle.png differ diff --git a/src/common/haxe/ru/m/tankz/engine/Engine.hx b/src/common/haxe/ru/m/tankz/engine/Engine.hx index 6aca60d..cf4f821 100755 --- a/src/common/haxe/ru/m/tankz/engine/Engine.hx +++ b/src/common/haxe/ru/m/tankz/engine/Engine.hx @@ -52,12 +52,12 @@ class CollisionProcessor { // Nothing } else { if (!tank.protect.active) { - if (tank.config.downgrade != null) { - tank.config = engine.config.getTank(tank.config.downgrade); - engine.change(tank, TYPE); - } else if (tank.hits > 0) { + if (tank.hits > 0) { tank.hits--; engine.change(tank, HIT); + } else if (tank.config.downgrade != null) { + tank.config = engine.config.getTank(tank.config.downgrade); + engine.change(tank, TYPE); } else { engine.destroy(tank, bullet.tank.playerId); } diff --git a/src/common/haxe/ru/m/tankz/game/Game.hx b/src/common/haxe/ru/m/tankz/game/Game.hx index bfa669c..d76ff3d 100644 --- a/src/common/haxe/ru/m/tankz/game/Game.hx +++ b/src/common/haxe/ru/m/tankz/game/Game.hx @@ -323,6 +323,16 @@ class Game extends GameDispatcher { eagle.protect.on(bonus.config.duration); engine.change(eagle, EntityChange.PROTECT); } + case 'gun': + if (tank.config.upgrade != null) { + while (tank.config.upgrade != null) { + tank.config = config.getTank(tank.config.upgrade); + } + engine.change(tank, EntityChange.TYPE); + } else { + tank.hits++; + engine.change(tank, EntityChange.HIT); + } case _: engine.destroy(tank); // :-D } diff --git a/src/common/resources/classic/config.yaml b/src/common/resources/classic/config.yaml index 2839fec..4f4d8ac 100644 --- a/src/common/resources/classic/config.yaml +++ b/src/common/resources/classic/config.yaml @@ -30,10 +30,10 @@ player: color: 0xFFFFFF bonus: 0.25 tanks: - - {type: bot0, rate: 0.25} - - {type: bot1, rate: 0.25} - - {type: bot2, rate: 0.25} - - {type: bot3, rate: 0.25} + - {type: bot0, rate: 0.30} + - {type: bot1, rate: 0.28} + - {type: bot2, rate: 0.27} + - {type: bot3, rate: 0.15} presets: # player1 @@ -117,7 +117,7 @@ tanks: skin: pc - type: human3 - upgrade: human3 + # upgrade: human3 downgrade: human2 width: 42 height: 38 @@ -181,4 +181,4 @@ bonuses: - {score: 500, type: life} - {score: 500, type: shovel, duration: 10} - {score: 500, type: star} - + - {score: 500, type: gun}