tustin2121 / UpdaterNeededBot

Source for the UpdaterNeeded bot (minus authentication files)
0 stars 0 forks source link

Handle "buying" Premier Balls #20

Closed tustin2121 closed 6 years ago

tustin2121 commented 6 years ago

New Rule: If a Premier Ball is bought, it actually is gotten for free.

new Rule('If a Premier Ball is bought, it actually is gotten for free')
.when(ledger=>ledger.has('GainItem').with('item.id', premierBallId).ofFlavor('shopping')
.then(ledger=>{
    ledger.get(0).forEach(x=>x.flavor = 'freeSample');
})

We got a Premier Ball for free!