Examples of Effects


Examples of mage.abilities.effects.Effects

        // −1: Put a 3/3 green Beast creature token onto the battlefield.
        this.addAbility(new LoyaltyAbility(new CreateTokenEffect(beastToken), -1));

        // −4: Creatures you control get +3/+3 and gain trample until end of turn.
        Effects effects1 = new Effects();
        Effect effect = new BoostControlledEffect(3, 3, Duration.EndOfTurn);
        effect.setText("Creatures you control get +3/+3");
        effects1.add(effect);
        effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent());
        effect.setText("and gain trample until end of turn");
        effects1.add(effect);
        this.addAbility(new LoyaltyAbility(effects1, -4));
    }
View Full Code Here

Examples of mage.abilities.effects.Effects

        Token token = new SoldierToken();
        token.setOriginalExpansionSetCode("ALA"); // to get the right image
        this.addAbility(new LoyaltyAbility(new CreateTokenEffect(token), 1));

        // +1: Target creature gets +3/+3 and gains flying until end of turn.
        Effects effects1 = new Effects();
        Effect effect = new BoostTargetEffect(3, 3, Duration.EndOfTurn);
        effect.setText("Target creature gets +3/+3");
        effects1.add(effect);
        effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("and gains flying until end of turn");
        effects1.add(effect);
        LoyaltyAbility ability1 = new LoyaltyAbility(effects1, 1);
        ability1.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability1);

        // -8: You get an emblem with "Artifacts, creatures, enchantments, and lands you control are indestructible."
View Full Code Here

Examples of mage.abilities.effects.Effects

        this.color.setRed(true);
        this.color.setGreen(true);
        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));

        // +1: Creatures you control get +1/+1 and gain haste until end of turn.
        Effects effects1 = new Effects();
        effects1.add(new BoostControlledEffect(1, 1, Duration.EndOfTurn));
        effects1.add(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent()));
        this.addAbility(new LoyaltyAbility(effects1, 1));

        // -2: Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
        Effects effects2 = new Effects();
        effects2.add(new GainControlTargetEffect(Duration.EndOfTurn));
        effects2.add(new UntapTargetEffect());
        effects2.add(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
        LoyaltyAbility ability = new LoyaltyAbility(effects2, -2);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);

        // -6: Put five 4/4 red Dragon creature tokens with flying onto the battlefield.
View Full Code Here

Examples of mage.abilities.effects.Effects

        // +1: Put a +1/+1 counter on up to one target creature.
        Ability ability = new LoyaltyAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), 1);
        ability.addTarget(new TargetCreaturePermanent(0,1));
        this.addAbility(ability);
        // -3: Target creature gains flying and double strike until end of turn.
        Effects effects = new Effects();
        effects.add(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
        effects.add(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn));
        ability = new LoyaltyAbility(effects, -3);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
        // -8: Put X 2/2 white Cat creature tokens onto the battlefield, where X is your life total.
        this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new CatToken(), new ControllerLifeCount()), -8));
View Full Code Here

Examples of mage.abilities.effects.Effects

        LoyaltyAbility ability2 = new LoyaltyAbility(new DamageTargetEffect(ChandraNalaarXValue.getDefault()));
        ability2.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability2);

        Effects effects1 = new Effects();
        effects1.add(new DamageTargetEffect(10));
        effects1.add(new DamageAllControlledTargetEffect(10, new FilterCreaturePermanent()));
        LoyaltyAbility ability3 = new LoyaltyAbility(effects1, -8);
        ability3.addTarget(new TargetPlayer());
        this.addAbility(ability3);
    }
View Full Code Here

Examples of org.spout.vanilla.component.entity.misc.Effects

    if (getLevels() < 1 || primary == null || primary == EntityEffectType.NONE) {
      return;
    }

    for (Player player : pos.getWorld().getNearbyPlayers(pos, (int) getEffectRange())) {
      Effects effects = player.add(Effects.class);
      effects.add(new EntityEffect(primary, getPrimaryAmplifier(), getEffectDuration()));
      if (secondary != null && secondary != EntityEffectType.NONE && getLevels() == 4 && primary != secondary) {
        effects.add(new EntityEffect(secondary, getEffectDuration()));
      }
    }
  }
View Full Code Here

Examples of org.spout.vanilla.component.entity.misc.Effects

          value = (byte) (value | ((human.isSprinting() ? 1 : 0) << 3));
        }

        value = (byte) (value | ((isEatingBlocking() ? 1 : 0) << 4));

        Effects effects = getOwner().get(Effects.class);
        if (effects != null) {
          value = (byte) (value | ((effects.contains(EntityEffectType.INVISIBILITY) ? 1 : 0) << 5));
        }

        return value;
      }
View Full Code Here

Examples of org.spout.vanilla.component.entity.misc.Effects

          }
        }

        //Potion modification
        if (holdingMat.equals(VanillaMaterials.AIR)) {
          Effects effect = playerEnt.add(Effects.class);
          if (effect.contains(EntityEffectType.STRENGTH)) {
            damage += 3;
          }
          if (effect.contains(EntityEffectType.WEAKNESS)) {
            damage -= 2;
          }
        }
        //END Potion modification
View Full Code Here

Examples of soc.qase.state.Effects

    {
      rEffect = (int)(Utils.shortValue(data, offset));
      offset = offset + 2;
    }

    return (offset > prevOff ? new Effects(nEffect, rEffect) : null);
  }
View Full Code Here

Examples of soc.qase.state.Effects

/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
  private Effects processEffects()
  {
    Effects result = null;
    int effect = 0;
   
    result = new Effects();
   
    // process entity effects
    if((bitmask & 0x00004000) != 0) {
      if((bitmask & 0x00080000) != 0) {
        result.setEffects((int)(Utils.intValue(data, offset)));
        offset = offset + 4;
      }
      else {
        effect = (int)data[offset];
        if(effect < 0) effect = effect + 256;
        result.setEffects(effect);
        offset = offset + 1;
      }
    }
    else if((bitmask & 0x00080000) != 0) {
      result.setEffects((int)(Utils.shortValue(data, offset)));
      offset = offset + 2;
    }   

    // process render effects
    if((bitmask & 0x00001000) != 0) {
      if((bitmask & 0x00040000) != 0) {
        result.setRenderEffects((int)(Utils.intValue(data, offset)));
        offset = offset + 4;
      }
      else {
        effect = (int)data[offset];
        if(effect < 0) effect = effect + 256;
        result.setRenderEffects(effect);
        offset = offset + 1;
      }
    }
    else if((bitmask & 0x00040000) != 0) {
      result.setRenderEffects((int)(Utils.shortValue(data, offset)));
      offset = offset + 2;
    }
    else result.setRenderEffects(0);
    return result;
  }
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.