mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-06 07:32:46 +00:00
Change-Id: Ia0d07d075e9feeb872124348948d8664364d1c8a
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
package script.template.armor;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
import com.l2jserver.model.template.ArmorTemplate;
|
||||
import com.l2jserver.model.template.capability.Enchantable;
|
||||
import com.l2jserver.model.template.capability.Penalty;
|
||||
import com.l2jserver.model.world.capability.Castable;
|
||||
import com.l2jserver.model.world.capability.Equiper;
|
||||
import com.l2jserver.model.world.capability.Levelable;
|
||||
|
||||
public abstract class AbstractGradeAArmorTemplate extends ArmorTemplate
|
||||
implements Enchantable, Penalty {
|
||||
public AbstractGradeAArmorTemplate(TemplateID id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enchant(com.l2jserver.model.world.capability.Enchantable target) {
|
||||
target.setEnchantLevel(target.getEnchantLevel() + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void penalty(Equiper user) {
|
||||
if (!(user instanceof Levelable) && !(user instanceof Castable) && !(user instanceof Equiper))
|
||||
return;
|
||||
final Levelable levelable = (Levelable) user;
|
||||
final Castable castable = (Castable) user;
|
||||
if (levelable.getLevel() < 20) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package script.template.armor;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
import com.l2jserver.model.template.ArmorTemplate;
|
||||
|
||||
public abstract class AbstractNoGradeArmorTemplate extends ArmorTemplate {
|
||||
public AbstractNoGradeArmorTemplate(TemplateID id) {
|
||||
super(id);
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package script.template.armor;
|
||||
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
import com.l2jserver.model.world.capability.Damagable;
|
||||
import com.l2jserver.model.world.capability.Enchantable;
|
||||
|
||||
public class Dummy2ArmorTemplate extends AbstractGradeAArmorTemplate {
|
||||
private static final int REDUCED_DAMAGE_PHYSICAL = 10;
|
||||
private static final int REDUCED_DAMAGE_MAGICAL = 10;
|
||||
private static final int MAX_ENCHANT = 10;
|
||||
|
||||
public Dummy2ArmorTemplate() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defend(Attacker source, Attackable target) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void interceptIncomingDamage(Damagable target) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enchant(Enchantable target) {
|
||||
if (target.getEnchantLevel() >= MAX_ENCHANT)
|
||||
return;
|
||||
super.enchant(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhysicalDefense() {
|
||||
return REDUCED_DAMAGE_PHYSICAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMagicalDefense() {
|
||||
return REDUCED_DAMAGE_MAGICAL;
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package script.template.armor;
|
||||
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
import com.l2jserver.model.world.capability.Damagable;
|
||||
|
||||
public class DummyArmorTemplate extends AbstractNoGradeArmorTemplate {
|
||||
private static final int REDUCED_DAMAGE_PHYSICAL = 10;
|
||||
private static final int REDUCED_DAMAGE_MAGICAL = 10;
|
||||
|
||||
public DummyArmorTemplate() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defend(Attacker source, Attackable target) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void interceptIncomingDamage(Damagable target) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhysicalDefense() {
|
||||
return REDUCED_DAMAGE_PHYSICAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMagicalDefense() {
|
||||
return REDUCED_DAMAGE_MAGICAL;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package script.template.item;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
import com.l2jserver.model.template.ItemTemplate;
|
||||
|
||||
public class AdenaItemTemplate extends ItemTemplate {
|
||||
public static final TemplateID ID = new TemplateID(57);
|
||||
|
||||
public AdenaItemTemplate() {
|
||||
super(ID);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package script.template.item;
|
||||
|
||||
import com.l2jserver.model.template.PotionTemplate;
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
public class TestPotionTemplate extends PotionTemplate {
|
||||
public TestPotionTemplate() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void consume(Attacker source, Attackable target) {
|
||||
//TODO consume item
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package script.template.skill;
|
||||
|
||||
import com.l2jserver.model.template.SkillTemplate;
|
||||
import com.l2jserver.model.world.capability.Castable;
|
||||
import com.l2jserver.model.world.capability.Caster;
|
||||
|
||||
public class TestSkillTemplate extends SkillTemplate {
|
||||
public TestSkillTemplate() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cast(Caster caster, Castable target) {
|
||||
// TODO do casting
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package script.template.weapon;
|
||||
|
||||
import com.l2jserver.model.template.WeaponTemplate;
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
public class TestWeaponTemplate extends WeaponTemplate {
|
||||
private static final int DAMAGE_PHYSICAL = 10;
|
||||
private static final int DAMAGE_MAGICAL = 10;
|
||||
private static final int MAX_ENCHANT_LEVEL = 10;
|
||||
|
||||
public TestWeaponTemplate() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attack(Attacker source, Attackable target) {
|
||||
source.attack(target, this);
|
||||
target.receiveAttack(source, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhysicalDamage() {
|
||||
return DAMAGE_PHYSICAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMagicalDamage() {
|
||||
return DAMAGE_MAGICAL;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user