Search in sources :

Example 1 with HeroChoiceSequence

use of eidolons.client.cc.gui.neo.choice.HeroChoiceSequence in project Eidolons by IDemiurge.

the class MainManager method newHero.

public void newHero(boolean arcadeMode) {
    hero = CharacterCreator.getNewHero();
    Launcher.setView(null, VIEWS.CHOICE);
    // TODO
    if (isMacroMode()) {
    // add filters
    }
    sequence = new HeroChoiceSequence(hero);
    sequence.setManager(this);
    sequence.start();
}
Also used : HeroChoiceSequence(eidolons.client.cc.gui.neo.choice.HeroChoiceSequence)

Example 2 with HeroChoiceSequence

use of eidolons.client.cc.gui.neo.choice.HeroChoiceSequence in project Eidolons by IDemiurge.

the class HC_Controls method handleClick.

public void handleClick(String command, final boolean alt) {
    if (processing) {
        DC_SoundMaster.playStandardSound(STD_SOUNDS.CLICK_BLOCKED);
        return;
    }
    processing = true;
    try {
        switch(command) {
            case MAP:
                break;
            case TAVERNS:
                Tavern tavern = MacroManager.getActiveParty().getTown().selectTavern();
                if (tavern != null) {
                    tavern.openView();
                }
                break;
            case ADD:
                DC_SoundMaster.playStandardSound(STD_SOUNDS.MOVE);
                if (PartyHelper.checkPartySize() || Launcher.DEV_MODE) {
                    Launcher.getMainManager().getSequenceMaster().chooseNewMember(PartyHelper.getParty());
                } else {
                    DialogMaster.error("Maximum party size reached!");
                }
                break;
            case REMOVE:
                // ...
                PartyHelper.remove(hero);
                break;
            case FIGHT:
            case FIGHT_2:
            case FIGHT_3:
            case FIGHT_ARCADE:
                new Thread(() -> fight(), " thread").start();
                // }
                break;
            case EXPORT_HERO:
                {
                    DC_SoundMaster.playStandardSound(STD_SOUNDS.DONE);
                    new Thread(new Runnable() {

                        public void run() {
                            CharacterCreator.saveAs(CharacterCreator.getSelectedHeroType(), !alt);
                            // CharacterCreator.savePreset(hero.getType());
                            DC_SoundMaster.playStandardSound(STD_SOUNDS.OK);
                        }
                    }).start();
                    break;
                }
            case EXPORT_PARTY:
                {
                    new Thread(new Runnable() {

                        public void run() {
                            PartyHelper.savePartyAs(false);
                        }
                    }).start();
                    break;
                }
            case NEW_BRANCH:
                {
                    new Thread(new Runnable() {

                        public void run() {
                            PartyHelper.savePartyAs(true);
                        }
                    }).start();
                    break;
                }
            case NEW_HERO:
                {
                    newHero = CharacterCreator.getNewHero();
                    Launcher.setView(null, VIEWS.CHOICE);
                    final HeroChoiceSequence sequence = new HeroChoiceSequence(newHero);
                    sequence.setManager(this);
                    new Thread(new Runnable() {

                        public void run() {
                            sequence.start();
                        }
                    }).start();
                    break;
                }
            case SAVE:
                DC_SoundMaster.playStandardSound(STD_SOUNDS.DONE);
                if (CharacterCreator.isPartyMode()) {
                    PartyHelper.saveParty();
                } else {
                    CharacterCreator.save(CharacterCreator.getSelectedHeroType());
                }
                DC_SoundMaster.playStandardSound(STD_SOUNDS.OK);
                break;
            case BACK:
                DC_SoundMaster.playStandardSound(STD_SOUNDS.ACTION_CANCELLED);
                CharacterCreator.getHeroManager().stepBack(hero);
                CharacterCreator.refreshGUI();
                break;
            case LEVEL_UP:
                // always ready?
                if (!CharacterCreator.isLevelUpEnabled(hero)) {
                    DC_SoundMaster.playStandardSound(STD_SOUNDS.CLICK_ERROR);
                    break;
                }
                HeroLevelManager.levelUp(hero);
                DC_SoundMaster.playStandardSound(STD_SOUNDS.LEVEL_UP);
                break;
        }
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    } finally {
        processing = false;
    // CharacterCreator.refreshGUI();
    }
}
Also used : HeroChoiceSequence(eidolons.client.cc.gui.neo.choice.HeroChoiceSequence) Tavern(eidolons.game.module.adventure.town.Tavern)

Aggregations

HeroChoiceSequence (eidolons.client.cc.gui.neo.choice.HeroChoiceSequence)2 Tavern (eidolons.game.module.adventure.town.Tavern)1