v0.3.4: moved recharging into its own class
This commit is contained in:
committed by
Evan Debenham
parent
2c0cd939f0
commit
b079aad640
@@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
@@ -275,7 +276,7 @@ public class CursedWand {
|
||||
//shock and recharge
|
||||
case 3:
|
||||
new LightningTrap().set( user.pos ).activate();
|
||||
Buff.prolong(user, ScrollOfRecharging.Recharging.class, 20f);
|
||||
Buff.prolong(user, Recharging.class, 20f);
|
||||
ScrollOfRecharging.charge(user);
|
||||
SpellSprite.show(user, SpellSprite.CHARGE);
|
||||
wand.wandUsed();
|
||||
|
||||
@@ -24,10 +24,10 @@ import java.util.ArrayList;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SoulMark;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
@@ -431,7 +431,7 @@ public abstract class Wand extends Item {
|
||||
if (lock == null || lock.regenOn())
|
||||
partialCharge += 1f/turnsToCharge;
|
||||
|
||||
ScrollOfRecharging.Recharging bonus = target.buff(ScrollOfRecharging.Recharging.class);
|
||||
Recharging bonus = target.buff(Recharging.class);
|
||||
if (bonus != null && bonus.remainder() > 0f){
|
||||
partialCharge += CHARGE_BUFF_BONUS * bonus.remainder();
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.wands;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
@@ -55,7 +55,7 @@ public class WandOfMagicMissile extends Wand {
|
||||
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
|
||||
//gain 1 turn of recharging buff per level of the wand.
|
||||
if (level() > 0) {
|
||||
Buff.prolong( attacker, ScrollOfRecharging.Recharging.class, (float)staff.level());
|
||||
Buff.prolong( attacker, Recharging.class, (float)staff.level());
|
||||
SpellSprite.show(attacker, SpellSprite.CHARGE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user