v0.3.2: reworked the warlock subclass

This commit is contained in:
Evan Debenham
2015-09-23 21:52:33 -04:00
parent 5f09d23ea0
commit 71f65ec31a
16 changed files with 108 additions and 29 deletions
@@ -22,7 +22,10 @@ package com.shatteredpixel.shatteredpixeldungeon.items.wands;
import java.util.ArrayList;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
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;
@@ -132,6 +135,14 @@ public abstract class Wand extends Item {
charger.setScaleFactor( chargeScaleFactor );
}
protected void processSoulMark(Char target, int chargesUsed){
if (target != Dungeon.hero &&
Dungeon.hero.subClass == HeroSubClass.WARLOCK &&
Random.Float() < .08f + (level*chargesUsed*0.04f)){
SoulMark.prolong(target, SoulMark.class, SoulMark.DURATION);
}
}
@Override
public void onDetach( ) {
stopCharging();