summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-30 21:13:33 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-30 21:13:33 (GMT)
commit4124738a0e7dc4f105593612e86951a77d766173 (patch)
tree4313a1315659248a926ad0b49a81c0601a0fb06e /src/elements
parent856f9574b6bf92c1b15d8e4f1a04869182eb05fb (diff)
downloadpowder-4124738a0e7dc4f105593612e86951a77d766173.zip
powder-4124738a0e7dc4f105593612e86951a77d766173.tar.gz
Electrons Hydrolysis.
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/elec.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/elements/elec.c b/src/elements/elec.c
index f425d11..014c162 100644
--- a/src/elements/elec.c
+++ b/src/elements/elec.c
@@ -41,6 +41,25 @@ int update_ELEC(UPDATE_FUNC_ARGS) {
{
parts[r>>8].life = 5+rand()%5;
}
+ if ((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW)
+ {
+ if(rand()%2)
+ {
+ create_part(r>>8, x+rx, y+ry, PT_H2);
+ part_change_type(i, x, y, PT_O2);
+ parts[i].life = 0;
+ parts[i].ctype = 0;
+ return 1;
+ }
+ else
+ {
+ create_part(r>>8, x+rx, y+ry, PT_O2);
+ part_change_type(i, x, y, PT_H2);
+ parts[i].life = 0;
+ parts[i].ctype = 0;
+ return 1;
+ }
+ }
if ((r&0xFF)==PT_NEUT)
{
part_change_type(r>>8, x+rx, y+ry, PT_H2);