Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Offline buff alg v2
- 1. Calculate `min(len, offline)`, where `len` is length of shortest buff, `offline` is time offline
- 2. Apply buffs to CpS, multiply that by time in (1), add to cookies
- 3. Subtract (1) from all buffs
- 4. Subtract (1) from offline time left
- 5. If buff length is 0
- 5.1 Remove it
- 5.2 If offline time left > 0
- 5.2.1 Goto 1
- Example:
- Og times:
- 3
- 5
- 10
- Offline time left is 4
- 1. min(3,4)=3
- 2. *bleh*
- 3. New times:
- 0
- 2
- 7
- 4. New offline time left: 1
- 5. Yes
- 5.1 Times left:
- 2
- 7
- 5.2 Yes
- 5.2.1 Going to 1
- 1. min(1,2)=1
- 2. *bleh*
- 3. New times:
- 1
- 6
- 4. New offline time left: 0
- 5. No
- We are done here
Advertisement
Add Comment
Please, Sign In to add comment