GAS+CAUS+pressure = RFRG, move HEAC to solids

This commit is contained in:
jacob1 2017-06-18 23:32:25 -04:00
parent 5de384cfbc
commit 2e4617c956
3 changed files with 11 additions and 3 deletions

View File

@ -2195,7 +2195,7 @@ int Simulation::eval_move(int pt, int nx, int ny, unsigned *rr)
switch (r&0xFF) switch (r&0xFF)
{ {
case PT_LCRY: case PT_LCRY:
if (pt==PT_PHOT || pt==PT_ELEC) if (pt==PT_PHOT)
result = (parts[r>>8].life > 5)? 2 : 0; result = (parts[r>>8].life > 5)? 2 : 0;
break; break;
case PT_GPMP: case PT_GPMP:

View File

@ -55,7 +55,15 @@ int Element_CAUS::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx]; r = pmap[y+ry][x+rx];
if (!r) if (!r)
continue; continue;
if ((r&0xFF)!=PT_ACID && (r&0xFF)!=PT_CAUS) if ((r&0xFF) == PT_GAS)
{
if (sim->pv[(y+ry)/CELL][(x+rx)/CELL] > 3)
{
sim->part_change_type(r>>8, x+rx, y+ry, PT_RFRG);
sim->part_change_type(i, x, y, PT_RFRG);
}
}
else if ((r&0xFF)!=PT_ACID && (r&0xFF)!=PT_CAUS && (r&0xFF)!=PT_RFRG && (r&0xFF)!=PT_RFGL)
{ {
if (((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && sim->elements[r&0xFF].Hardness>(rand()%1000))&&parts[i].life>=50) if (((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && sim->elements[r&0xFF].Hardness>(rand()%1000))&&parts[i].life>=50)
{ {

View File

@ -9,7 +9,7 @@ Element_HEAC::Element_HEAC()
Name = "HEAC"; Name = "HEAC";
Colour = PIXPACK(0xCB6351); Colour = PIXPACK(0xCB6351);
MenuVisible = 1; MenuVisible = 1;
MenuSection = SC_SPECIAL; MenuSection = SC_SOLIDS;
Enabled = 1; Enabled = 1;
Advection = 0.0f; Advection = 0.0f;