diff options
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) |
