v0.3.2: reworked the warlock subclass
This commit is contained in:
@@ -127,10 +127,6 @@ public class Hunger extends Buff implements Hero.Doom {
|
||||
}
|
||||
|
||||
public void satisfy( float energy ) {
|
||||
if (((Hero) target).subClass == HeroSubClass.WARLOCK){
|
||||
Buff.affect( target, ScrollOfRecharging.Recharging.class, energy/50f);
|
||||
return;
|
||||
}
|
||||
|
||||
Artifact.ArtifactBuff buff = target.buff( HornOfPlenty.hornRecharge.class );
|
||||
if (buff != null && buff.isCursed()){
|
||||
@@ -142,17 +138,6 @@ public class Hunger extends Buff implements Hero.Doom {
|
||||
reduceHunger( energy );
|
||||
}
|
||||
|
||||
public void consumeSoul( float energy ){
|
||||
|
||||
if (level >= STARVING)
|
||||
energy *= 1.33f;
|
||||
else if (level < HUNGRY)
|
||||
energy *= 0.67f;
|
||||
|
||||
if (!Dungeon.isChallenged(Challenges.NO_FOOD))
|
||||
reduceHunger( energy );
|
||||
}
|
||||
|
||||
//directly interacts with hunger, no checks.
|
||||
public void reduceHunger( float energy ) {
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2015 Oleg Dolya
|
||||
*
|
||||
* Shattered Pixel Dungeon
|
||||
* Copyright (C) 2014-2015 Evan Debenham
|
||||
*
|
||||
* 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
||||
public class SoulMark extends FlavourBuff {
|
||||
|
||||
public static final float DURATION = 50f;
|
||||
|
||||
{
|
||||
type = buffType.NEGATIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.CORRUPT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Soul Marked";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attachTo(Char target) {
|
||||
if (super.attachTo(target) && target.sprite != null){
|
||||
target.sprite.emitter().burst(ShadowParticle.UP, 10);
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return "The warlock has tapped into the soul of this creature. " +
|
||||
"He will heal and satisfy his hunger as it takes physical damage.\n" +
|
||||
"\n" +
|
||||
"This mark will last for " + dispTurns() + ".";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user