Examples of Ability


Examples of mage.abilities.Ability

    this.color.setGreen(true);
    this.subtype.add("Human");
    this.subtype.add("Druid");
    this.power = new MageInt(1);
    this.toughness = new MageInt(1);
    Ability ability = new EntersBattlefieldTriggeredAbility(new AwakenerDruidEffect(), false);
    ability.addTarget(new TargetLandPermanent(filter));
    this.addAbility(ability);
  }
View Full Code Here

Examples of mage.abilities.Ability

        this.color.setWhite(true);
        this.subtype.add("Elf");
        this.subtype.add("Druid");
        this.power = new MageInt(2);
  this.toughness = new MageInt(2);
        Ability ability = new KnotvineMysticManaAbility();
        ability.addCost(new ManaCostsImpl("{1}"));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.Ability

    this.subtype.add("Goblin");
    this.subtype.add("Shaman");
    this.power = new MageInt(2);
    this.toughness = new MageInt(1);
    this.addAbility(HasteAbility.getInstance());
    Ability ability1 = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
    ability1.addTarget(new TargetNonBasicLandPermanent());
    KickerAbility ability2 = new KickerAbility(new GainAbilitySourceEffect(ability1, Duration.WhileOnBattlefield), false);
    ability2.addManaCost(new ColoredManaCost(ColoredManaSymbol.R));
    this.addAbility(ability2);

  }
View Full Code Here

Examples of morph.api.Ability

                                        try
                                        {
                                            Class abilityClass = AbilityHandler.stringToClassMap.get(ability);
                                            if(abilityClass != null)
                                            {
                                                Ability ab = ((Ability)abilityClass.getConstructor().newInstance());
                                                try
                                                {
                                                    ab.parse(argVars.toArray(new String[0]));
                                                }
                                                catch(Exception e2)
                                                {
                                                    Morph.console("Mappings are erroring! These mappings are probably invalid or outdated: "  + abilityClass.getName() + ", "+ ability + ", args: " + args, true);
                                                }
                                                abilityObjs.add(ab);
                                            }
                                            else
                                            {
                                                Morph.console("Ability \"" + ability + "\" does not exist for: "  + e.getKey() + ", args: " + args, true);
                                            }
                                        }
                                        catch(Exception e2)
                                        {
                                            e2.printStackTrace();
                                        }
                                    }
                                    if(!ability.isEmpty() && !hasArgs)
                                    {
                                        Class abilityClass = AbilityHandler.stringToClassMap.get(ability);
                                        if(abilityClass != null)
                                        {
                                            try
                                            {
                                                abilityObjs.add((Ability)abilityClass.getConstructor().newInstance());
                                            }
                                            catch(Exception e2)
                                            {
                                                e2.printStackTrace();
                                            }
                                        }
                                        else
                                        {
                                            Morph.console("Ability \"" + ability + "\" does not exist for: "  + e.getKey(), true);
                                        }
                                    }
                                }
                            }
                            if(abilityObjs.size() > 0){
                                Class<? extends EntityLivingBase> entityClass = (Class<? extends EntityLivingBase>) Class.forName(e.getKey());
                                if(entityClass != null){
                                    if(AbilityHandler.abilityMap.containsKey(entityClass))
                                    {
                                        Morph.console("Ignoring ability mapping for " + e.getKey() + "! Already has abilities mapped!", true);
                                    }
                                    else
                                    {
                                        if(entityClass.getName().startsWith("net.minecraft"))
                                        {
                                            mcMappings++;
                                        }
                                        else
                                        {
                                            StringBuilder sb = new StringBuilder();
                                            sb.append("Adding ability mappings ");
                                            for(int i = 0; i < abilityObjs.size(); i++)
                                            {
                                                Ability a = abilityObjs.get(i);
                                                sb.append(a.getType());
                                                if(i != abilityObjs.size() - 1)
                                                {
                                                    sb.append(", ");
                                                }
                                            }
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.