Examples of addModifier()


Examples of megamek.common.ToHitData.addModifier()

        if(avionics > 0)
            toHit.addModifier(avionics, "avionics damage");
       
        //evading bonuses
        if (target.getTargetType() == Targetable.TYPE_ENTITY && te.isEvading()) {
            toHit.addModifier(te.getEvasionBonus(), "target is evading");
        }
       
        //determine hit direction
        toHit.setSideTable(te.sideTable(priorSrc));
       
View Full Code Here

Examples of megamek.common.ToHitData.addModifier()

            // be a tank, and both must be in the same hex.
            if (!ae.isLocationBad(Mech.LOC_RARM)
                    && !ae.isLocationBad(Mech.LOC_LARM)
                    && target instanceof Tank
                    && ae.getPosition().distance(target.getPosition()) == 0) {
                toHit.addModifier(2, "attacker is prone");
            } else {
                return new ToHitData(TargetRoll.IMPOSSIBLE, "Attacker is prone");
            }
        }
View Full Code Here

Examples of megamek.common.ToHitData.addModifier()

        final int armLoc = (arm == PunchAttackAction.RIGHT) ? Mech.LOC_RARM
                : Mech.LOC_LARM;

        // damaged or missing actuators
        if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, armLoc)) {
            toHit.addModifier(2, "Upper arm actuator destroyed");
        }
        if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, armLoc)) {
            toHit.addModifier(2, "Lower arm actuator missing or destroyed");
        }
View Full Code Here

Examples of megamek.common.ToHitData.addModifier()

        // damaged or missing actuators
        if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, armLoc)) {
            toHit.addModifier(2, "Upper arm actuator destroyed");
        }
        if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, armLoc)) {
            toHit.addModifier(2, "Lower arm actuator missing or destroyed");
        }

        if ( ae.hasFunctionalArmAES(armLoc) ) {
            toHit.addModifier(-1,"AES modifer");
        }
View Full Code Here

Examples of net.alteiar.documents.BeanDocument.addModifier()

    assertTrue(!autorizableBean.isAllowedToApplyChange(currentPlayer));
    assertTrue(!autorizableBean.isAllowedToSee(currentPlayer));

    // Add us as modifier
    UniqueID playerId = currentPlayer.getId();
    autorizableBean.addModifier(playerId);
    sleep();

    assertTrue("Should contain the modifier", autorizableBean
        .getModifiers().contains(playerId));
    assertTrue(autorizableBean.isAllowedToApplyChange(currentPlayer));
View Full Code Here

Examples of net.alteiar.documents.BeanDocument.addModifier()

    assertEquals("The bean have changed", 1, COUNT_BEAN_CHANGED);
    assertEquals("The authorization have not changed", 0,
        COUNT_AUTHORIZATION_CHANGED);

    UniqueID guid = new UniqueID();
    autorizableBean.addModifier(guid);
    sleep();
    autorizableBean.removeModifier(guid);

    autorizableBean.addUser(guid);
    sleep();
View Full Code Here

Examples of net.citizensnpcs.waypoints.Waypoint.addModifier()

                for (int innerKey : profiles.getIntegerKeys(root)) {
                    path = root + "." + innerKey;
                    modifier = WaypointModifierType.valueOf(profiles.getString(path + ".type")).create(
                            waypoint);
                    modifier.parse(profiles, path);
                    waypoint.addModifier(modifier);
                }
            }
            temp.add(waypoint);
        }
        return temp;
View Full Code Here

Examples of org.ajax4jsf.builder.model.JavaClass.addModifier()

    } catch (ClassNotFoundException e) {
      e.printStackTrace();
      javaClass.setSuperClass(UIComponentBase.class);
    }
   
    javaClass.addModifier(JavaModifier.PUBLIC);
   
    javaClass.addField(getComponentFamily(componentBean));
    javaClass.addField(getComponentType(componentBean));
   
    javaClass.addMethod(getConstructor(componentBean, javaClass));
View Full Code Here

Examples of org.ajax4jsf.builder.model.JavaConstructor.addModifier()

  }
 
  private JavaMethod getConstructor(ComponentBean componentBean, JavaClass javaClass) {
    final RendererBean renderer = componentBean.getRenderer();
    JavaMethod method = new JavaConstructor(javaClass);
    method.addModifier(JavaModifier.PUBLIC);
    method.setMethodBody(new MethodBody(method) {
      @Override
      public String toCode() {
        if (renderer != null) {
          return "setRendererType(\"" + renderer.getName() + "\");";
View Full Code Here

Examples of org.ajax4jsf.builder.model.JavaField.addModifier()

    javaField.getModifiers().add(JavaModifier.PRIVATE);
    javaClass.addField(javaField);
   
    JavaField field =
      new JavaField(UIComponentBase.class, "component", "null");
    field.addModifier(JavaModifier.PUBLIC);
    field.addAnnotation(Deprecated.class);
    javaClass.addField(field);
   
    javaClass.addAnnotation(Deprecated.class);
   
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.