v0.3.0: changed food to work with new recharging mechanic. Also removed charging from lightning trap.
This commit is contained in:
parent
348f16c19b
commit
75f1181d27
|
@ -4,6 +4,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
|
@ -81,7 +82,8 @@ public class HornOfPlenty extends Artifact {
|
|||
}
|
||||
break;
|
||||
case MAGE:
|
||||
hero.belongings.charge(false);
|
||||
//1 charge
|
||||
Buff.affect( hero, ScrollOfRecharging.Recharging.class, 4f );
|
||||
ScrollOfRecharging.charge(hero);
|
||||
break;
|
||||
case ROGUE:
|
||||
|
|
|
@ -152,7 +152,8 @@ public class Blandfruit extends Food {
|
|||
}
|
||||
break;
|
||||
case MAGE:
|
||||
hero.belongings.charge( false );
|
||||
//1 charge
|
||||
Buff.affect(hero, ScrollOfRecharging.Recharging.class, 4f);
|
||||
ScrollOfRecharging.charge(hero);
|
||||
break;
|
||||
case ROGUE:
|
||||
|
|
|
@ -20,6 +20,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.food;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
|
@ -75,7 +76,8 @@ public class Food extends Item {
|
|||
}
|
||||
break;
|
||||
case MAGE:
|
||||
hero.belongings.charge( false );
|
||||
//1 charge
|
||||
Buff.affect( hero, ScrollOfRecharging.Recharging.class, 4f );
|
||||
ScrollOfRecharging.charge( hero );
|
||||
break;
|
||||
case ROGUE:
|
||||
|
|
|
@ -21,7 +21,6 @@ import com.watabou.noosa.Camera;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ResultDescriptions;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle;
|
||||
|
@ -47,8 +46,6 @@ public class LightningTrap {
|
|||
if (!ch.isAlive()) {
|
||||
Dungeon.fail( Utils.format( ResultDescriptions.TRAP, name ) );
|
||||
GLog.n( "You were killed by a discharge of a lightning trap..." );
|
||||
} else {
|
||||
((Hero)ch).belongings.charge( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user