Orbiit / giggle-bot

A BOT THAT doesn't SCREAM as much (and this time uses discord.js fancy library)
https://discord.gg/azw3qEH
0 stars 0 forks source link

add stealing #6

Closed SheepTester closed 6 years ago

SheepTester commented 6 years ago

rob from @person

/\b(?:rob|steal) *(?:from|d')? *<@!?([0-9]+)>/i

The robbery is tracked in an array. No BCBW is transferred yet. (react 👌) Output:

**ROBBER NAME** IS STEALING FROM **PERSON NAME**. TYPE **`HEY`** TO CATCH.
There is no backing out now. Type `my progress` to see how much money you stole, and `run` to escape with your BCBW.

However, if the given person isn't in the channel, it should give an error. (react 👎)

**robber name**, **person name** doesn't live here!

And if the given person is already robbing, it should also give an error. (react 👎)

**robber name**, you're a bit busy with another robbery.

my progress

/\bmy *progress\b/i

From the tracked robbery, it calculates the amount of BCBW that would be stolen if they typed run then. The rate is 10 BCBW/s. (react 👌)

**robber name**, you have stolen 123 bitcoin but worse so far. type `run` to escape now

Ignore if the person isn't robbing at the moment.

run

/\brun\b/i

From the tracked robbery, it calculates the amount of BCBW stolen and gives it from the robbed to the robber. (react 👌)

**robber name** successfully robbed **`123`** bitcoin but worse from **person name**

Ignore if the person isn't robbing at the moment.

HEY

/\bHEY\b/

Case sensitive! (otherwise ignore) The robbery will become untracked. If the robber has less than 12000 BCBW, they will be fined a third of their balance. Otherwise, they will be fined 4000 BCBW. The fine will be given to the catcher. (react 👌)

**robber name** caught! they will be forced to return the stolen money and pay 123 bitcoin but worse to **catcher name** for their service.

If there are multiple robberies, the fine will be applied to each robber for the same catcher. If there are no robberies, notify the person. (react 👎)

there are no ongoing robberies. that was probably a bird

(bird can be replaced with a random item)

SheepTester commented 6 years ago

implemented in 2eaad30