Search in sources :

Example 1 with GarmonFighter

use of gartham.c10ver.games.rpg.fighting.battles.app.GarmonFighter in project c10ver by Gartham.

the class Dungeon method generateRandomRoom.

public static DungeonRoom generateRandomRoom() {
    var rand = Math.random();
    if (rand < .7)
        return new EmptyRoom();
    else if (rand < 0.8) {
        List<Creature> creechurrs = new ArrayList<>();
        var enemy = new Nymph();
        if (Math.random() < 0.3)
            creechurrs.add(new Nymph());
        GarmonTeam team = new GarmonTeam("Wilderness", new GarmonFighter(enemy));
        return new EnemyRoom(team);
    } else if (rand < 0.95)
        return new LootRoom(new RewardsOperation().setCloves(BigInteger.valueOf((long) (Math.random() * 158 + 32))));
    else {
        var ro = new RewardsOperation();
        ro.getMults().put(generateRandomMultiplier(), 1);
        if (Math.random() < .2) {
            AbstractMultiplier val = generateRandomMultiplier();
            if (ro.getMults().containsKey(val))
                ro.getMults().put(val, ro.getMults().get(val) + 1);
        }
        return new LootRoom(ro);
    }
}
Also used : GarmonFighter(gartham.c10ver.games.rpg.fighting.battles.app.GarmonFighter) RewardsOperation(gartham.c10ver.economy.RewardsOperation) GarmonTeam(gartham.c10ver.games.rpg.fighting.battles.app.GarmonTeam) Nymph(gartham.c10ver.games.rpg.creatures.Nymph) AbstractMultiplier(gartham.c10ver.economy.AbstractMultiplier) List(java.util.List) ArrayList(java.util.ArrayList)

Aggregations

AbstractMultiplier (gartham.c10ver.economy.AbstractMultiplier)1 RewardsOperation (gartham.c10ver.economy.RewardsOperation)1 Nymph (gartham.c10ver.games.rpg.creatures.Nymph)1 GarmonFighter (gartham.c10ver.games.rpg.fighting.battles.app.GarmonFighter)1 GarmonTeam (gartham.c10ver.games.rpg.fighting.battles.app.GarmonTeam)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1