diff options
| author | savask <savask@yandex.ru> | 2011-10-31 04:36:30 (GMT) |
|---|---|---|
| committer | savask <savask@yandex.ru> | 2011-11-01 16:44:17 (GMT) |
| commit | 3e5fb5942d3a4e100bbdba05a2099e82861f8996 (patch) | |
| tree | ea83837814c1a0468396d19ab72043682f28671f /src/elements | |
| parent | 8e00d07f35394c098da073a86e1f986a1d800705 (diff) | |
| download | powder-3e5fb5942d3a4e100bbdba05a2099e82861f8996.zip powder-3e5fb5942d3a4e100bbdba05a2099e82861f8996.tar.gz | |
Made fighters shoot anything deadly.
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/figh.c | 4 | ||||
| -rw-r--r-- | src/elements/stkm.c | 16 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/elements/figh.c b/src/elements/figh.c index 36cc392..284a56c 100644 --- a/src/elements/figh.c +++ b/src/elements/figh.c @@ -45,7 +45,9 @@ int update_FIGH(UPDATE_FUNC_ARGS) case 1: if ((pow(tarx-x, 2) + pow(tary-y, 2))<600) { - if (figh->elem == PT_FIRE || figh->elem == PT_LIGH) + if (figh->elem == PT_LIGH || figh->elem == PT_NEUT + || ptypes[figh->elem].properties&(PROP_DEADLY|PROP_RADIOACTIVE) + || ptypes[figh->elem].heat>=323 || ptypes[figh->elem].heat<=243) figh->comm = (int)figh->comm | 0x08; } else diff --git a/src/elements/stkm.c b/src/elements/stkm.c index e8a1241..be3506d 100644 --- a/src/elements/stkm.c +++ b/src/elements/stkm.c @@ -426,14 +426,18 @@ void STKM_interact(playerst* playerp, int i, int x, int y) parts[i].life -= 2; playerp->accs[3] -= 1; } - - if ((r&0xFF)==PT_ACID) //If on acid - parts[i].life -= 5; - - if ((r&0xFF)==PT_PLUT) //If on plut - parts[i].life -= 1; if (ptypes[r&0xFF].properties&PROP_DEADLY) + switch (r&0xFF) + { + case PT_ACID: + parts[i].life -= 5; + break; + default: + parts[i].life -= 1; + } + + if (ptypes[r&0xFF].properties&PROP_RADIOACTIVE) parts[i].life -= 1; if ((r&0xFF)==PT_PRTI && parts[i].type) |
