v0.4.0: renamed enchant classes
This commit is contained in:
@@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Beam;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.PurpleParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Death;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
@@ -104,7 +104,7 @@ public class WandOfDisintegration extends Wand {
|
||||
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
|
||||
//less likely Grim proc
|
||||
if (Random.Int(3) == 0)
|
||||
new Death().proc( staff, attacker, defender, damage);
|
||||
new Grim().proc( staff, attacker, defender, damage);
|
||||
}
|
||||
|
||||
private int distance() {
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blazing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
@@ -109,9 +110,8 @@ public class WandOfFireblast extends Wand {
|
||||
|
||||
@Override
|
||||
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
|
||||
//acts like blazing enchantment, package conflict.....
|
||||
new com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Fire()
|
||||
.proc( staff, attacker, defender, damage);
|
||||
//acts like blazing enchantment
|
||||
new Blazing().proc( staff, attacker, defender, damage);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shocking;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.LightningTrap;
|
||||
@@ -78,7 +78,7 @@ public class WandOfLightning extends Wand {
|
||||
@Override
|
||||
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
|
||||
//acts like shocking enchantment
|
||||
new Shock().proc(staff, attacker, defender, damage);
|
||||
new Shocking().proc(staff, attacker, defender, damage);
|
||||
}
|
||||
|
||||
private void arc( Char ch ) {
|
||||
|
||||
@@ -26,7 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.VenomGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Poison;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Venomous;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
@@ -62,7 +62,8 @@ public class WandOfVenom extends Wand {
|
||||
|
||||
@Override
|
||||
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
|
||||
new Poison().proc(staff, attacker, defender, damage);
|
||||
//acts like venomous enchantment
|
||||
new Venomous().proc(staff, attacker, defender, damage);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,16 +29,16 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.KindOfWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfFuror;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfSharpshooting;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Death;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Fire;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Horror;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Instability;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Leech;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Luck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Paralysis;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Poison;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Slow;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blazing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Chilling;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Eldritch;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Lucky;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shocking;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Stunning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Unstable;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Vampiric;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Venomous;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
@@ -243,12 +243,11 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
return enchantment != null ? enchantment.glowing() : null;
|
||||
}
|
||||
|
||||
//FIXME: most enchantment names are pretty broken, should refactor
|
||||
public static abstract class Enchantment implements Bundlable {
|
||||
|
||||
private static final Class<?>[] enchants = new Class<?>[]{
|
||||
Fire.class, Poison.class, Death.class, Paralysis.class, Leech.class,
|
||||
Slow.class, Shock.class, Instability.class, Horror.class, Luck.class };
|
||||
Blazing.class, Venomous.class, Grim.class, Stunning.class, Vampiric.class,
|
||||
Chilling.class, Shocking.class, Unstable.class, Eldritch.class, Lucky.class };
|
||||
private static final float[] chances= new float[]{ 10, 10, 1, 2, 1, 2, 6, 3, 2, 2 };
|
||||
|
||||
public abstract boolean proc( Weapon weapon, Char attacker, Char defender, int damage );
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Fire extends Weapon.Enchantment {
|
||||
public class Blazing extends Weapon.Enchantment {
|
||||
|
||||
private static ItemSprite.Glowing ORANGE = new ItemSprite.Glowing( 0xFF4400 );
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Slow extends Weapon.Enchantment {
|
||||
public class Chilling extends Weapon.Enchantment {
|
||||
|
||||
private static ItemSprite.Glowing BLUE = new ItemSprite.Glowing( 0x0044FF );
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Horror extends Weapon.Enchantment {
|
||||
public class Eldritch extends Weapon.Enchantment {
|
||||
|
||||
private static ItemSprite.Glowing GREY = new ItemSprite.Glowing( 0x222222 );
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Death extends Weapon.Enchantment {
|
||||
public class Grim extends Weapon.Enchantment {
|
||||
|
||||
private static ItemSprite.Glowing BLACK = new ItemSprite.Glowing( 0x000000 );
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||
|
||||
public class Luck extends Weapon.Enchantment {
|
||||
public class Lucky extends Weapon.Enchantment {
|
||||
|
||||
private static ItemSprite.Glowing GREEN = new ItemSprite.Glowing( 0x00FF00 );
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import com.watabou.utils.Random;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
|
||||
public class Shock extends Weapon.Enchantment {
|
||||
public class Shocking extends Weapon.Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean proc( Weapon weapon, Char attacker, Char defender, int damage ) {
|
||||
+1
-1
@@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Paralysis extends Weapon.Enchantment {
|
||||
public class Stunning extends Weapon.Enchantment {
|
||||
|
||||
private static ItemSprite.Glowing YELLOW = new ItemSprite.Glowing( 0xCCAA44 );
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
|
||||
public class Instability extends Weapon.Enchantment {
|
||||
public class Unstable extends Weapon.Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean proc( Weapon weapon, Char attacker, Char defender, int damage ) {
|
||||
+1
-1
@@ -28,7 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Leech extends Weapon.Enchantment {
|
||||
public class Vampiric extends Weapon.Enchantment {
|
||||
|
||||
private static ItemSprite.Glowing RED = new ItemSprite.Glowing( 0x660022 );
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Poison extends Weapon.Enchantment {
|
||||
public class Venomous extends Weapon.Enchantment {
|
||||
|
||||
private static ItemSprite.Glowing PURPLE = new ItemSprite.Glowing( 0x4400AA );
|
||||
|
||||
Reference in New Issue
Block a user