public static void setUnequipCommand(Monster monster, String itemID) { MonsterCommand newCommand = new MonsterCommand(); newCommand.commandCode = MonsterCommandCode.UNEQUIP; newCommand.counter = MonsterActionManager.getSpeed(monster)/2; newCommand.addParameter("itemID", itemID); monster.setCommand(newCommand); }
public static void setItemVerbCommand(Monster monster, Item item, ItemVerb verb, int x, int y) { MonsterCommand newCommand = new MonsterCommand(); newCommand.commandCode = MonsterCommandCode.ITEM_VERB; newCommand.counter = MonsterActionManager.getSpeed(monster); if(item != null) { newCommand.addParameter("itemID", item.ID); } else { newCommand.addParameter("itemID", ""); } newCommand.addParameter("verb", EnumUtil.EnumName<ItemVerb>(verb)); newCommand.addParameter("x", x+""); newCommand.addParameter("y", y+""); monster.setCommand(newCommand); }
public static void setMoveCommand(Monster monster, Direction direction) { MonsterCommand newCommand = new MonsterCommand(); newCommand.commandCode = MonsterCommandCode.MOVE; newCommand.counter = MonsterActionManager.getSpeed(monster); newCommand.addParameter("direction", EnumUtil.EnumName<Direction>(direction)); monster.setCommand(newCommand); }
public static void setAttackCommand(Monster monster, String monsterID) { MonsterCommand newCommand = new MonsterCommand(); newCommand.commandCode = MonsterCommandCode.ATTACK; newCommand.counter = MonsterActionManager.getSpeed(monster)/2; newCommand.addParameter("monsterID", monsterID); monster.setCommand(newCommand); }