Examples of Spell


Examples of beans.serializable.Spell

        final String sName = name.getText();
        final String sDescr = description.getText();
        final Target sTarget = (Target)target.getSelectedItem();
        final Utilization sUse = (Utilization)use.getSelectedItem();
        //TODO : Rajouter nombre de tour
        final Spell spell = new Spell (sName, sDescr, sTarget, listChangeStatut, cost, sUse, 1);
        guiModel.initSpellPopUpResponse(spell);
        this.reset();
    }//GEN-LAST:event_SaveJButtonActionPerformed
View Full Code Here

Examples of ca.wowapi.entities.Spell

          JSONObject itemSpellObj = spellArray.getJSONObject(i);
          ItemSpell itemSpell = new ItemSpell();
          itemSpell.setSpellId(itemSpellObj.getInt("spellId"));

          JSONObject spellObj = itemSpellObj.getJSONObject("spell");
          Spell spell = new Spell();
          spell.setId(spellObj.getInt("id"));
          spell.setName(spellObj.getString("name"));
          spell.setDescription(spellObj.getString("description"));
          spell.setCastTime(spellObj.getString("castTime"));

          itemSpell.setSpell(spell);
          itemSpell.setnCharges(itemSpellObj.getInt("nCharges"));
          itemSpell.setConsumable(itemSpellObj.getBoolean("consumable"));
          itemSpell.setCategoryId(itemSpellObj.getInt("categoryId"));
View Full Code Here

Examples of de.pdf_scrutinizer.API.Spell

                ScriptableObject.putProperty(scope, "media", Context.javaToJS(new Media(scrutinizer), scope));
                ScriptableObject.putProperty(scope, "XMLData", Context.javaToJS(new XMLData(scrutinizer), scope));
                ScriptableObject.putProperty(scope, "display", Context.javaToJS(new display(), scope));
                ScriptableObject.putProperty(scope, "console", Context.javaToJS(doc.console, scope));
                ScriptableObject.putProperty(scope, "info", Context.javaToJS(doc.info, scope));
                ScriptableObject.putProperty(scope, "spell", Context.javaToJS(new Spell(scrutinizer), scope));

                // redirect String.eval() and app.eval() to eval()
                ScriptableObject.putProperty((Scriptable) scope.get("String", scope), "eval", (Scriptable) scope.get("eval", scope));
                ScriptableObject.putProperty((Scriptable) scope.get("app", scope), "eval", (Scriptable) scope.get("eval", scope));
View Full Code Here

Examples of games.stendhal.server.entity.spell.Spell

    assertThat(spell.getMinimumLevel(),is(Integer.valueOf(0)));
    assertThat(spell.getRange(),is(Integer.valueOf(10)));
    assertThat(spell.getRate(),is(Integer.valueOf(1)));
    assertThat(spell.getRegen(),is(Integer.valueOf(100)));
    SingletonRepository.getEntityManager().addSpell(spell);
    Spell entity = SingletonRepository.getEntityManager().getSpell("heal");
    assertThat(entity, notNullValue());
    assertThat(entity.getName(), is("heal"));
    assertThat(entity.getNature(), is(Nature.LIGHT));
    assertThat(entity.getAmount(),is(Integer.valueOf(100)));
    assertThat(entity.getAtk(),is(Integer.valueOf(0)));
    assertThat(entity.getCooldown(),is(Integer.valueOf(3)));
    assertThat(entity.getDef(),is(Integer.valueOf(0)));
    assertThat(entity.getLifesteal(),is(Double.valueOf(0.5)));
    assertThat(entity.getMana(),is(Integer.valueOf(5)));
    assertThat(entity.getMinimumLevel(),is(Integer.valueOf(0)));
    assertThat(entity.getRange(),is(Integer.valueOf(10)));
    assertThat(entity.getRate(),is(Integer.valueOf(1)));
    assertThat(entity.getRegen(),is(Integer.valueOf(100)));
    assertThat(entity.getClass().getName(), is("games.stendhal.server.entity.spell.HealingSpell"));
    entity.setID(new ID(1, "some_zone"))
    RPObject object = new SpellTransformer().transform(entity);
    assertThat(object, is((RPObject)entity));
  }
View Full Code Here

Examples of games.stendhal.server.entity.spell.Spell

      // clear the slot
      slot.clear();
      SpellTransformer transformer = new SpellTransformer();
      //transform rpobjects in slot to spell
      for(RPObject o : objects) {
        Spell s = (Spell) transformer.transform(o);
        //only add to slot if transforming was successful
        if(s != null) {
          slot.add(s);
        }
      }
View Full Code Here

Examples of games.stendhal.server.entity.spell.Spell

    if(spell == null) {
      throw new IllegalArgumentException("spell name is null");
    }
    DefaultSpell defaultSpell = nameToSpell.get(spell);
    if (defaultSpell != null) {
      Spell spellEntity = defaultSpell.getSpell();
      if(!createdSpell.containsKey(spell)) {
        createdSpell.put(spell, spellEntity);
      }
      return spellEntity;
    }
View Full Code Here

Examples of games.stendhal.server.entity.spell.Spell

* @author madmetzger
*/
public class SpellTransformer implements Transformer {

  public RPObject transform(RPObject object) {
    Spell spell = SingletonRepository.getEntityManager().getSpell(object.get("subclass"));
    if(spell != null) {
      //preserve the id of the transformed spell
      spell.setID(object.getID());
    }
    return spell;
  }
View Full Code Here

Examples of games.stendhal.server.entity.spell.Spell

  public void onAction(Player player, RPAction action) {
    //base object is always the player sending the action
    action.put("baseobject", player.getID().getObjectID());
    Entity target = EntityHelper.entityFromTargetName(action.get(TARGET), player);
    Spell spell = (Spell) EntityHelper.entityFromSlot(player, action);
    spell.cast(player, target);
  }
View Full Code Here

Examples of games.stendhal.server.entity.spell.Spell

    if(args.size() != 2) {
      admin.sendPrivateText("Usage: [character] [spell name].");
      return;
    }
    EntityManager em = SingletonRepository.getEntityManager();
    Spell spell = em.getSpell(args.get(1));
    String name = args.get(0);
    Player player = SingletonRepository.getRuleProcessor().getPlayer(name);
    RPSlot slot = player.getSlot("spells");
    ID id = null;
    for(RPObject o : slot) {
      if(spell.getName().equalsIgnoreCase(o.get("name"))) {
        id = o.getID();
      }
    }
    if (id != null) {
      slot.remove(id);
View Full Code Here

Examples of jpotter.spells.Spell

    return false;
  }

  public boolean enemyCast(int from) {
    Random rand = new Random();
    Spell s = Enemy.knownSpells.get(rand.nextInt(Enemy.knownSpells.size()));
    Point target = getTargetPos(from, s);
    jPanel.add(s.getComponent());
    jPanel.setComponentZOrder(s.getComponent(), 0);
    jPanel.validate();
    if (target != null) {
      s.cast(target, getDefaultStartPos(s), jPanel, false);
      return true;
    }
    return false;
  }
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.