Package game.entity

Examples of game.entity.Fighter


     */
    public Fighter getFighter(final Fighter who, final Target whichGroup) {
        // Index du combattant à modifier
        int index;
        // Valeur de retour
        Fighter ret = null;

        // Regarder dans quel type de groupe le combattant est
        switch (whichGroup) {
            // C'est un allié
            case ALLY:
View Full Code Here


     * @see Target
     * @see ChangeStatut
     */
    public void changeStatus(final Fighter who, final Target whichGroup, final List<ChangeStatut> changeStatus) {
        // Récupérer le combattant
        final Fighter toChange = getFighter(who, whichGroup);
        // Si non trouvé
        if (toChange == null) {
            // Renvoyer une erreur
            // TODO: Ecrire dans le fichier de logs l'erreur
        } // Sinon
        else {
            // Appliquer les changements
            toChange.appliqueChangeStatut(changeStatus);
        }
       
        // Notifier d'un changement
        setChanged();
        notifyObservers();
View Full Code Here

     * @return Le mode dans lequel le modèle est.
     * @since InventorySpellModel 1.0
     */
    @Override
    public InventoryMode EnterRequest() {
        final Fighter fighter = fighterListModel.get(currentFighter);
        final boolean utilisable = (currentSpell.getUse() == Utilization.OUTSIDE_BATTLE || currentSpell.getUse() == Utilization.TWICE);
        if (currentSpell != null && utilisable) {
            final SpellController spellController = new SpellController(currentSpell, null);
            if (currentSpell.getTarget() == Target.ALLY || currentSpell.getTarget() == Target.ENEMY) {
                spellController.castSpell(fighter, fighter);
View Full Code Here

     * @return Le mode dans lequel le modèle est.
     * @since InventoryObjetModel 1.0
     */
    @Override
    public InventoryMode EnterRequest() {
        final Fighter fighter = fighterListModel.get(currentFighter);
        final boolean utilisable = (currentObjet.getUse() == Utilization.OUTSIDE_BATTLE || currentObjet.getUse() == Utilization.TWICE);
        if (currentObjet != null && utilisable) {
            final ObjetController objetController = new ObjetController(currentObjet, null);
            if (currentObjet.getTarget() == Target.ALLY || currentObjet.getTarget() == Target.ENEMY) {
                fighter.useObjet(currentObjet);
                objetController.castObjet(fighter);
            }else {
                fighter.useObjet(currentObjet);
                objetController.castObjet(fighterListModel);
            }
        }
        resetList();
       
View Full Code Here

     * @return Le mode dans lequel le modèle est.
     * @since InventorySkillModel 1.0
     */
    @Override
    public InventoryMode EnterRequest() {
        final Fighter fighter = fighterListModel.get(currentFighter);
        final boolean utilisable = (currentSkill.getUse() == Utilization.OUTSIDE_BATTLE || currentSkill.getUse() == Utilization.TWICE);
        if (currentSkill != null && utilisable) {
            final SkillController skillController = new SkillController(currentSkill, null);
            //TODO: Finir les modifications ici pour adapter avec le système de combat
            if (currentSkill.getTarget() == Target.ALLY) {
View Full Code Here

TOP

Related Classes of game.entity.Fighter

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.