Package beans.serializable

Examples of beans.serializable.StatsPerso


   
    private final String TABLE_NAME = "PERSO";
   
    public StatsPerso getPerso(final String key) {
        // Stats retournés
        StatsPerso perso = new StatsPerso();
        retreiveComp(key, perso);
        PreparedStatement statement = null;
        try {
            // Préparer la requête
            statement = Database.getStatement("select * from " + TABLE_NAME + " where " + PERSO_NAME + " = ?");
View Full Code Here


    private void addObjectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addObjectActionPerformed
        new InitObjetChoice(this);
    }//GEN-LAST:event_addObjectActionPerformed

    private void saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveActionPerformed
        final StatsPerso statPerso = new StatsPerso();
        statPerso.setName(name.getText());
        statPerso.setCharisma(Integer.parseInt(charisma.getText()));
        statPerso.setConstitution(Integer.parseInt(constitution.getText()));
        statPerso.setDexterity(Integer.parseInt(dexterity.getText()));
        statPerso.setHpMaxModifier(Integer.parseInt(hpMaxModifier.getText()));
        statPerso.setStrength(Integer.parseInt(strenth.getText()));
        statPerso.setWisdom(Integer.parseInt(wisdom.getText()));
        statPerso.setClasse((Classe) classe.getSelectedItem());
        statPerso.setSkills(skills);
        statPerso.setSpells(spells);
        statPerso.setObjets(objets);
        guiModel.initHeroPopUpResponse(statPerso);
    }//GEN-LAST:event_saveActionPerformed
View Full Code Here

     */
    public Player(final GameModel gameModel, final GUIModel guiModel) {
        final PersoControl persoControl = new PersoControl();

//        StatsPerso stats = persoControl.getPerso("hero");
        final StatsPerso stats = new StatsPerso();
        stats.setName("hero");
        stats.setClasse(Classe.WARRIOR);
        stats.setCharisma(5);
        stats.setConstitution(5);
        stats.setDexterity(5);
        stats.setHpMaxModifier(5);
        stats.setIntelligence(5);
        stats.setMpMaxModifier(5);
        stats.setStrength(5);
        stats.setWisdom(5);
        stats.setSkills(new ArrayList<Skill>());
        stats.setSpells(new ArrayList<Spell>());

        final Map<Objet, Integer> objets = new HashMap<Objet, Integer>();
        List<ChangeStatut> changeStat = new ArrayList<ChangeStatut>();
        changeStat.add(new ChangeStatut(Type.HEAL, Element.AQUA, 10, Stat.DEXTERITY, Stat.HP));
        Objet objet = new Objet("Potion", "Soin", Target.ALLY, changeStat, Utilization.TWICE);
        objets.put(objet, 1);
       
        changeStat = new ArrayList<ChangeStatut>();
        changeStat.add(new ChangeStatut(Type.HEAL, Element.AQUA, 10, Stat.DEXTERITY, Stat.MP));
        objet = new Objet("Potion mana", "Magie", Target.ALLY, changeStat, Utilization.TWICE);
        objets.put(objet, 1);
       
        changeStat = new ArrayList<ChangeStatut>();
        objet = new Equipment("Epee", "Epee basique en bois", TypeEquipment.WEAPON, Panoply.NONE, 5, 3, 10, 10);
        objets.put(objet, 1);
       
        changeStat = new ArrayList<ChangeStatut>();
        objet = new Equipment("Hache", "Hache basique en bois", TypeEquipment.WEAPON, Panoply.NONE, 10, 5, 10, 10);
        objets.put(objet, 1);
       
        stats.setObjets(objets);
       
        final Fighter hero = new Fighter(stats, GeneralConstant.MONSTER_IMAGE_PATH + "heros.png");
        final Map<TypeEquipment, Equipment> equipment = new EnumMap<TypeEquipment, Equipment>(TypeEquipment.class);
        equipment.put(TypeEquipment.WEAPON, (Equipment)objet);
       
        hero.getStat().getPermanentStats().setEquipment(equipment);
        hero.initEquipment();
       
        final Emotion emotion = new Emotion(GeneralConstant.PERSO_FACE_PATH, "normal", new Point(0,0));
        emotion.addEmotion("triste", new Point(1,0));
        emotion.addEmotion("joie", new Point(3,0));
        emotion.addEmotion("peur", new Point(3,2));
       
        EmotionFactory.addElement("hero", emotion);
       
        equipe.add(hero);
       
        final StatsPerso stats2 = new StatsPerso();
        stats2.setName("snes");
        stats2.setClasse(Classe.WARRIOR);
        stats2.setCharisma(5);
        stats2.setConstitution(5);
        stats2.setDexterity(5);
        stats2.setHpMaxModifier(5);
        stats2.setIntelligence(5);
        stats2.setMpMaxModifier(5);
        stats2.setStrength(5);
        stats2.setWisdom(5);
        stats2.setSkills(new ArrayList<Skill>());
        stats2.setSpells(new ArrayList<Spell>());
       
        stats2.setObjets(objets);
       
        final Fighter hero2 = new Fighter(stats2, GeneralConstant.MONSTER_IMAGE_PATH + "heros.png");
        hero2.getStat().getPermanentStats().setEquipment(equipment);
        hero2.initEquipment();
       
View Full Code Here

TOP

Related Classes of beans.serializable.StatsPerso

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.