[common] add gun bonus
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tankz",
|
"name": "tankz",
|
||||||
"version": "0.8.10",
|
"version": "0.8.11",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"dateformat": "^3.0.3",
|
"dateformat": "^3.0.3",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 8.9 KiB |
BIN
src/client/resources/image/bonus/gun.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 612 B |
|
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 365 B |
@@ -52,12 +52,12 @@ class CollisionProcessor {
|
|||||||
// Nothing
|
// Nothing
|
||||||
} else {
|
} else {
|
||||||
if (!tank.protect.active) {
|
if (!tank.protect.active) {
|
||||||
if (tank.config.downgrade != null) {
|
if (tank.hits > 0) {
|
||||||
tank.config = engine.config.getTank(tank.config.downgrade);
|
|
||||||
engine.change(tank, TYPE);
|
|
||||||
} else if (tank.hits > 0) {
|
|
||||||
tank.hits--;
|
tank.hits--;
|
||||||
engine.change(tank, HIT);
|
engine.change(tank, HIT);
|
||||||
|
} else if (tank.config.downgrade != null) {
|
||||||
|
tank.config = engine.config.getTank(tank.config.downgrade);
|
||||||
|
engine.change(tank, TYPE);
|
||||||
} else {
|
} else {
|
||||||
engine.destroy(tank, bullet.tank.playerId);
|
engine.destroy(tank, bullet.tank.playerId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,6 +323,16 @@ class Game extends GameDispatcher {
|
|||||||
eagle.protect.on(bonus.config.duration);
|
eagle.protect.on(bonus.config.duration);
|
||||||
engine.change(eagle, EntityChange.PROTECT);
|
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 _:
|
case _:
|
||||||
engine.destroy(tank); // :-D
|
engine.destroy(tank); // :-D
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ player:
|
|||||||
color: 0xFFFFFF
|
color: 0xFFFFFF
|
||||||
bonus: 0.25
|
bonus: 0.25
|
||||||
tanks:
|
tanks:
|
||||||
- {type: bot0, rate: 0.25}
|
- {type: bot0, rate: 0.30}
|
||||||
- {type: bot1, rate: 0.25}
|
- {type: bot1, rate: 0.28}
|
||||||
- {type: bot2, rate: 0.25}
|
- {type: bot2, rate: 0.27}
|
||||||
- {type: bot3, rate: 0.25}
|
- {type: bot3, rate: 0.15}
|
||||||
|
|
||||||
presets:
|
presets:
|
||||||
# player1
|
# player1
|
||||||
@@ -117,7 +117,7 @@ tanks:
|
|||||||
skin: pc
|
skin: pc
|
||||||
|
|
||||||
- type: human3
|
- type: human3
|
||||||
upgrade: human3
|
# upgrade: human3
|
||||||
downgrade: human2
|
downgrade: human2
|
||||||
width: 42
|
width: 42
|
||||||
height: 38
|
height: 38
|
||||||
@@ -181,4 +181,4 @@ bonuses:
|
|||||||
- {score: 500, type: life}
|
- {score: 500, type: life}
|
||||||
- {score: 500, type: shovel, duration: 10}
|
- {score: 500, type: shovel, duration: 10}
|
||||||
- {score: 500, type: star}
|
- {score: 500, type: star}
|
||||||
|
- {score: 500, type: gun}
|
||||||
|
|||||||