2010-09-19 01:29:21 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
/***************************************************************************
|
|
|
|
|
* (C) Copyright 2003-2010 - Stendhal *
|
|
|
|
|
***************************************************************************
|
|
|
|
|
***************************************************************************
|
|
|
|
|
* *
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
|
* (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
***************************************************************************/
|
2008-08-26 20:09:33 +00:00
|
|
|
package utilities.RPClass;
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
2017-05-28 01:03:01 +02:00
|
|
|
import games.stendhal.server.entity.item.ConsumableItem;
|
2018-09-22 22:58:40 +03:00
|
|
|
import games.stendhal.server.entity.item.StatusHealer;
|
2017-05-28 01:03:01 +02:00
|
|
|
|
2008-08-26 20:09:33 +00:00
|
|
|
public class ConsumableTestHelper {
|
|
|
|
|
|
|
|
|
|
public static ConsumableItem createEater(final String name) {
|
|
|
|
|
ItemTestHelper.generateRPClasses();
|
2018-09-22 22:58:40 +03:00
|
|
|
Map<String, String> attributes = new HashMap<>();
|
2008-08-26 20:09:33 +00:00
|
|
|
attributes.put("amount", "1");
|
|
|
|
|
attributes.put("regen", "1");
|
|
|
|
|
attributes.put("frequency", "1");
|
2008-08-27 21:27:29 +00:00
|
|
|
return new ConsumableItem(name, "class", "subclass", attributes);
|
2008-08-26 20:09:33 +00:00
|
|
|
}
|
2017-05-28 01:03:01 +02:00
|
|
|
|
2008-08-26 20:09:33 +00:00
|
|
|
public static ConsumableItem createImmunizer(final String name) {
|
|
|
|
|
ItemTestHelper.generateRPClasses();
|
2018-09-22 22:58:40 +03:00
|
|
|
Map<String, String> attributes = new HashMap<>();
|
2008-08-26 20:09:33 +00:00
|
|
|
attributes.put("amount", "1");
|
|
|
|
|
attributes.put("regen", "0");
|
|
|
|
|
attributes.put("frequency", "1");
|
2018-09-22 22:58:40 +03:00
|
|
|
attributes.put("immunization", "poisoned");
|
|
|
|
|
return new StatusHealer(name, "class", "subclass", attributes);
|
2008-08-26 20:09:33 +00:00
|
|
|
}
|
|
|
|
|
}
|