Search in sources :

Example 6 with RewardsOperation

use of gartham.c10ver.economy.RewardsOperation in project c10ver by Gartham.

the class MonthlyCrate method open.

@Override
public RewardsOperation open() {
    List<ItemBunch<?>> items = new ArrayList<>();
    double rand = Math.random();
    items.add(new ItemBunch<>(new Hamburger(), BigInteger.valueOf((long) (rand * 3 + 1))));
    if (Math.random() < 0.2)
        items.add(new ItemBunch<>(new Pizza()));
    if (Math.random() < 0.15)
        items.add(new ItemBunch<>(new DailyCrate(), BigInteger.valueOf((long) (Math.random() * 3 + 1))));
    if (Math.random() < 0.1)
        items.add(new ItemBunch<>(new MonthlyCrate()));
    return new RewardsOperation().with(BigInteger.valueOf((long) (Math.random() * 800 + 450))).with(items);
}
Also used : Hamburger(gartham.c10ver.economy.items.utility.foodstuffs.Hamburger) Pizza(gartham.c10ver.economy.items.utility.foodstuffs.Pizza) ItemBunch(gartham.c10ver.economy.items.ItemBunch) RewardsOperation(gartham.c10ver.economy.RewardsOperation) ArrayList(java.util.ArrayList)

Aggregations

RewardsOperation (gartham.c10ver.economy.RewardsOperation)6 ItemBunch (gartham.c10ver.economy.items.ItemBunch)5 ArrayList (java.util.ArrayList)4 Sandwich (gartham.c10ver.economy.items.utility.foodstuffs.Sandwich)3 EconomyUser (gartham.c10ver.economy.users.EconomyUser)2 GarmonTeam (gartham.c10ver.games.rpg.fighting.battles.app.GarmonTeam)2 BigInteger (java.math.BigInteger)2 List (java.util.List)2 Action (gartham.apps.garthchat.api.execution.Action)1 Clover (gartham.c10ver.Clover)1 InputProcessor (gartham.c10ver.commands.InputProcessor)1 InputConsumer (gartham.c10ver.commands.consumers.InputConsumer)1 AbstractMultiplier (gartham.c10ver.economy.AbstractMultiplier)1 Hamburger (gartham.c10ver.economy.items.utility.foodstuffs.Hamburger)1 Pizza (gartham.c10ver.economy.items.utility.foodstuffs.Pizza)1 VoteToken (gartham.c10ver.economy.items.valuables.VoteToken)1 Receipt (gartham.c10ver.economy.users.EconomyUser.Receipt)1 Nymph (gartham.c10ver.games.rpg.creatures.Nymph)1 CreatureAI (gartham.c10ver.games.rpg.fighting.battles.app.CreatureAI)1 GarmonBattle (gartham.c10ver.games.rpg.fighting.battles.app.GarmonBattle)1