Examples of addModifier()


Examples of com.google.java.contract.core.model.ContractMethodModel.addModifier()

      name += nameSuffix;
    }
    ContractMethodModel contract =
        new ContractMethodModel(kind, name, new TypeName("void"), contracted);

    contract.addModifier(ElementModifier.PRIVATE);
    type.addMember(contract);

    return contract;
  }
View Full Code Here

Examples of com.google.java.contract.core.model.VariableModel.addModifier()

  @Ensures("result != null")
  private static VariableModel getResultVariable(TypeName type) {
    VariableModel var =
        new VariableModel(ElementKind.PARAMETER, JavaUtils.RESULT_VARIABLE,
                          type);
    var.addModifier(ElementModifier.FINAL);
    return var;
  }

  @Ensures("result != null")
  private static VariableModel getSignalVariable() {
View Full Code Here

Examples of gannuNLP.dictionaries.DataBroker.addModifier()

    {
      mod.addParameters(bowMod.getAttribute("config"));
    }   
    mod.setDict(dict);
    mod.init();
    dict.addModifier(mod);
  }
  //Load the test sets
  System.out.println("Loading test sets");
  NodeList docs=root.getElementsByTagName("testset");
  ArrayList<String> testsetsnames=new ArrayList<String>(docs.getLength());
View Full Code Here

Examples of megamek.common.PilotingRollData.addModifier()

                }

                if (t instanceof VTOL) {
                    PilotingRollData psr = t.getBasePilotingRoll();
                    IHex hex = game.getBoard().getHex(t.getPosition());
                    psr.addModifier(4, "forced landing");
                    int elevation = Math.max(hex.terrainLevel(Terrains.BLDG_ELEV), hex.terrainLevel(Terrains.BRIDGE_ELEV));
                    elevation = Math.max(elevation, 0);
                    elevation = Math.min(elevation, t.getElevation());
                    if (t.getElevation() > elevation) {
                        if (!hex.containsTerrain(Terrains.FUEL_TANK) && !hex.containsTerrain(Terrains.JUNGLE) && !hex.containsTerrain(Terrains.MAGMA) && !hex.containsTerrain(Terrains.MUD) && !hex.containsTerrain(Terrains.RUBBLE) && !hex.containsTerrain(Terrains.WATER) && !hex.containsTerrain(Terrains.WOODS)) {
View Full Code Here

Examples of megamek.common.TargetRoll.addModifier()

        TargetRoll directroll = new TargetRoll(9, "spread downwind");
        TargetRoll obliqueroll = new TargetRoll(11, "spread 60 degrees to downwind");

        if((windStr > PlanetaryConditions.WI_NONE) && (windStr < PlanetaryConditions.WI_STRONG_GALE)) {
            directroll.addModifier(-2, "light/moderate gale");
            obliqueroll.addModifier(-1, "light/moderate gale");
        }
        else if(windStr > PlanetaryConditions.WI_MOD_GALE) {
            directroll.addModifier(-3, "strong gale+");
            directroll.addModifier(-2, "strong gale+");
        }
View Full Code Here

Examples of megamek.common.ToHitData.addModifier()

        setCommonModifiers(toHit, game, ae, target);

        // +2 for prone
        if (ae.isProne()) {
            toHit.addModifier(2, "Attacker is prone");
        }

        // factor in target side
        toHit.setSideTable(Compute.targetSideTable(ae, target));
View Full Code Here

Examples of megamek.common.ToHitData.addModifier()

        // target terrain
        toHit.append(Compute.getTargetTerrainModifier(game, te, 0, inSameBuilding));

        // attacker is spotting
        if (ae.isSpotting()) {
            toHit.addModifier(+1, "attacker is spotting");
        }

        // target prone
        if (te.isProne()) {
            toHit.addModifier(-2, "target prone and adjacent");
View Full Code Here

Examples of megamek.common.ToHitData.addModifier()

            toHit.addModifier(+1, "attacker is spotting");
        }

        // target prone
        if (te.isProne()) {
            toHit.addModifier(-2, "target prone and adjacent");
        }

        // water partial cover?
        if ((te.height() > 0) && (te.getElevation() == -1)
                && (targHex.terrainLevel(Terrains.WATER) == te.height())) {
View Full Code Here

Examples of megamek.common.ToHitData.addModifier()

        }

        // water partial cover?
        if ((te.height() > 0) && (te.getElevation() == -1)
                && (targHex.terrainLevel(Terrains.WATER) == te.height())) {
            toHit.addModifier(3, "target has partial cover");
        }

        // target immobile
        toHit.append(Compute.getImmobileMod(te));
View Full Code Here

Examples of megamek.common.ToHitData.addModifier()

            return new ToHitData(TargetRoll.IMPOSSIBLE, "Invalid attack");
        }

        // okay, modifiers...
        toHit = new ToHitData(ae.getCrew().getPiloting(), "base PSR");
        toHit.addModifier(4, "brush off swarming infantry");

        // damaged or missing actuators
        if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, armLoc)) {
            toHit.addModifier(2, "Upper arm actuator destroyed");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.