Skip to content
Permalink
Browse files

Merge pull request #9970 from KA101/tankfix

Tankbot fix & pull
  • Loading branch information...
Rivet-the-Zombie committed Nov 13, 2014
2 parents 5cf528e + 55d4035 commit efef827224faaeae966996c90d82ba45537135bd
Showing with 25 additions and 15 deletions.
  1. +1 −1 data/json/items/ammo.json
  2. +1 −1 data/json/recipes/recipe_deconstruction.json
  3. +6 −3 doc/JSON_FLAGS.md
  4. +1 −1 src/mapgen.cpp
  5. +16 −9 src/monattack.cpp
@@ -1695,7 +1695,7 @@
"dispersion" : 5,
"recoil" : 30,
"count" : 1,
"effects" : ["COOKOFF", "EXPLOSIVE_BIG", "TRAIL"]
"effects" : ["COOKOFF", "EXPLOSIVE", "TRAIL"]
},
{ "type" : "AMMO",
"id" : "12mm",
@@ -1319,7 +1319,7 @@
], "components": [
[ [ "flamethrower", 1 ] ],
[ [ "tazer", 1 ] ],
[ [ "hk_mp5", 1 ] ],
[ [ "m4a1", 1 ] ],
[ [ "motor_large", 1 ] ],
[ [ "power_supply", 30 ] ],
[ [ "plut_cell", 4 ] ],
@@ -278,10 +278,13 @@ Some special attacks are also valid use actions for tools and weapons.
- ```TAZER``` Shock the player.
- ```SMG``` SMG turret fires.
- ```LASER``` Laser turret fires.
```RIFLE_TUR``` Rifle turret fires.
- ```FLAMETHROWER``` Shoots a stream fire.
- ```RIFLE_TUR``` Rifle turret fires.
- ```FRAG_TUR``` MGL fires frag rounds.
- ```BMG_TUR``` Barrett .50BMG rifle fires.
- ```FLAMETHROWER``` Shoots a stream of fire.
- ```COPBOT``` Cop-bot alerts and then tazes the player.
- ```MULTI_ROBOT``` Robot can attack with tazer, flamethrower or SMG depending on distance.
- ```CHICKENBOT``` Robot can attack with tazer, M4, or MGL depending on distance.
- ```MULTI_ROBOT``` Robot can attack with tazer, flamethrower, M4, MGL, or 120mm cannon depending on distance.
- ```RATKING``` Inflicts disease `rat`
- ```GENERATOR``` Regenerates health.
- ```UPGRADE``` Upgrades a regular zombie into a special zombie.
line(this, t_fence_barbed, SEEX * 2 - 3, 13, SEEX * 2 - 3, 19);
line(this, t_fence_barbed, 3, 4, 3, 10);
line(this, t_fence_barbed, 1, 13, 1, 19);
if (one_in(3)) { // Chicken delivvery truck
if (one_in(3)) { // Chicken delivery truck
add_vehicle("military_cargo_truck", 12, SEEY * 2 - 5, 0);
add_spawn("mon_chickenbot", 1, 12, 12);
} else if (one_in(2)) { // TAAANK
@@ -2205,7 +2205,9 @@ void mattack::frag_tur(monster *z, int index) // This is for the bots, not a sta
add_msg(m_warning, _("Those laser dots don't seem very friendly...") );
g->sound(z->posx(), z->posy(), 10, _("Targeting."));
z->add_effect("targeted", 4);
z->moves -= 100;
z->moves -= 150;
// Should give some ability to get behind cover,
// even though it's patently unrealistic.
return;
}
target = &g->u;
@@ -2347,8 +2349,10 @@ void mattack::tank_tur(monster *z, int index)
add_msg(m_warning, _("You're not sure why you've got a laser dot on you...") );
//~ Sound of a tank turret swiveling into place
g->sound(z->posx(), z->posy(), 10, _("whirrrrrclick."));
z->add_effect("targeted", 2);
z->moves -= 100;
z->add_effect("targeted", 3);
z->moves -= 200;
// Should give some ability to get behind cover,
// even though it's patently unrealistic.
return;
}
target = &g->u;
@@ -2372,9 +2376,6 @@ void mattack::tank_tur(monster *z, int index)
z->ammo[ammo_type] -= tmp.weapon.charges;
tmp.fire_gun(target->xpos(), target->ypos(), false);
z->ammo[ammo_type] += tmp.weapon.charges;
if (target == &g->u) {
z->add_effect("targeted", 2);
}
}

void mattack::searchlight(monster *z, int index)
@@ -2714,9 +2715,15 @@ void mattack::multi_robot(monster *z, int index)
mode = 3;
} else if (rl_dist(z->posx(), z->posy(), g->u.posx, g->u.posy) <= 30) {
mode = 4;
} else if ((rl_dist(z->posx(), z->posy(), g->u.posx, g->u.posy) >= 35) ||
(rl_dist(z->posx(), z->posy(), g->u.posx, g->u.posy) >= 25 && g->u.in_vehicle)) {
mode = 5;
} else if (g->u.in_vehicle || g->u.has_trait("HUGE") || g->u.has_trait("HUGE_OK") ||
z->friendly != 0) {
// Primary only kicks in if you're in a vehicle or are big enough to be mistaken for one.
// Or if you've hacked it so the turret's on your side. ;-)
if ( (rl_dist(z->posx(), z->posy(), g->u.posx, g->u.posy) >= 35) &&
(rl_dist(z->posx(), z->posy(), g->u.posx, g->u.posy) < 50 )) {
// Enforced max-range of 50.
mode = 5;
}
}

if (mode == 0) {

1 comment on commit efef827

@jokermatt999

This comment has been minimized.

Copy link
Contributor

commented on efef827 Nov 13, 2014

Looks great to me. Thanks KA!

Please sign in to comment.
You can’t perform that action at this time.