QUOTE
Wow!!! This guy is a genius. This system is amazing, and now I understand it!
Wow!!! It's really cool
Mabe to create a new concept topic on this? Well the whole idea is exactly as you wrote, but he did it somehow else...
I didnt understand what the '>' means there:
QUOTE
Ore+floor gun > floor missile
Ore > data disk
Floor Missile > Ore+floor Gun
Data Disk > Ore+floor Gun
Lets call these counters G - Floor Gun, M - Floor Missle, D - Data Disk and use O for Ore.
Well, the first obvious question, just to point it out, what if the player builds something and his minerals decreases? Then at first step you have O < G and all you need is to clear all G after the first countoff.
The second question is more complicated. What if the player gains minerals with some other way than harvesting? The only situation is canceling a construction (or an upgrade of course). In this situation the amount of gained minerals in most cases is not divisible by 8 and when counting down gained O to D you can detect it and do not double this increase. Well the creator of the Phantom map also dont double more than 100 increase of minerals and as I can assume he supposes beforehand that more than 100 increase is canceling something. He uses 'Switch 16' for that purpose.
To clearfy it all I'll adduce the exact algorithm of how his system is exaclty working:
At the beggining the counter G contains the amount of ore on the previous step.1. Transfer G amount of O to M.
2. If G > 0 then G = 0
(this if you decrased your ore scince last step).
At this point we have gained (scince last trigger loop or step) amount of ore in O3. If O > 100 then Set Switch
(increase is more than 100; assuming canceling smth; Swich indicates that we shlouldn't double this increase).
4. Transfer divisible by 8 amount of O to D.
5. If O > 0 then Set Switch
(increase is not divisible by 8; this increase is caused by canceling smth).
6. Add left amount of O to D.
7. If Switch is Cleared then Transfer D to O
(if Switch is Cleared we wont have more than 100 D and D is divisible by 8, so we may have lot less triggers for this Transfer: for 8, 16, 32 and 64 only).
Now we have an amount of ore divisible by 8.8. Transfer 2*O to M
(This is where your ore doubles; you change this on Transfer O/8 to M for 1 mineral per harvest, as far as amount of ore is divisible by 8).
9. Transfer M to O and G.
10. Clear Switch.
If we had Switch Set before then we'll have nonzero D counter and should transfer it back to minerals without change, in other case further triggers do nothing.11. Transfer D to O and G.
That way the system will only fail when you cancel a building gaining less than 100 minerals which amount is divisible by 8. In this case the system would double this increase.
ADDITION:
Oh, I think I understand what '>' is meaning!
It means Transfer!
ADDITION:
And to finish with this I'll adduce triggers for transfer.
Next triggers, arranged from high numbers to low (which is emphasized by DOWNTO) will transfer any number (from 0 to 2^(n+1) - 1) from counter A to counter B [and to C].
Transfer A to B [and C], where [...] is optional:
CODE
FOR k = n DOWNTO 1 REPEAT
Trigger:
Players:
Players you wish to have a countoff.
Conditions:
Current Player suffered at least 2^k deaths of A.
// Some additional conditions
Actions:
Preserve Trigger.
Set Deaths of A for Current Player: Substract 2^k of A.
Set Deaths of B for Current Player: Add 2^k of B.
[Set Deaths of C for Current Player: Add 2^k of C.]
END REPEAT
If A, B or C means minerals or score you should (of course) change corresponding Action or Condtiion.