v0.3.2: reworked the warlock subclass
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -73,6 +73,7 @@ public class WandOfBlastWave extends Wand {
|
||||
Char ch = Actor.findChar(bolt.collisionPos + i);
|
||||
|
||||
if (ch != null){
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
ch.damage(damage, this);
|
||||
|
||||
if (ch.isAlive()) {
|
||||
@@ -86,6 +87,7 @@ public class WandOfBlastWave extends Wand {
|
||||
//throws the char at the center of the blast
|
||||
Char ch = Actor.findChar(bolt.collisionPos);
|
||||
if (ch != null){
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
ch.damage(damage, this);
|
||||
|
||||
if (ch.isAlive() && bolt.path.size() > bolt.dist+1) {
|
||||
|
||||
@@ -104,6 +104,8 @@ public class WandOfCorruption extends Wand {
|
||||
ch.HP = ch.HT;
|
||||
curCharges -= extraCharges;
|
||||
usagesToKnow -= extraCharges;
|
||||
|
||||
processSoulMark(ch, extraCharges+chargesPerCast());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ public class WandOfDisintegration extends Wand {
|
||||
int dmgMin = lvl;
|
||||
int dmgMax = (int) (8 + lvl * lvl / 3f);
|
||||
for (Char ch : chars) {
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
ch.damage( Random.NormalIntRange( dmgMin, dmgMax ), this );
|
||||
ch.sprite.centerEmitter().burst( PurpleParticle.BURST, Random.IntRange( 1, 2 ) );
|
||||
ch.sprite.flash();
|
||||
|
||||
@@ -68,6 +68,7 @@ public class WandOfFrost extends Wand {
|
||||
ch.sprite.burst( 0xFF99CCFF, level / 2 + 2 );
|
||||
}
|
||||
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
ch.damage(damage, this);
|
||||
|
||||
if (ch.isAlive()){
|
||||
|
||||
@@ -64,6 +64,7 @@ public class WandOfLightning extends Wand {
|
||||
int max = Math.round(10 + (level * level / 4f));
|
||||
|
||||
for (Char ch : affected){
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
ch.damage(Math.round(Random.NormalIntRange(min, max) * multipler), LightningTrap.LIGHTNING);
|
||||
|
||||
if (ch == Dungeon.hero) Camera.main.shake( 2, 0.3f );
|
||||
|
||||
@@ -45,6 +45,7 @@ public class WandOfMagicMissile extends Wand {
|
||||
|
||||
int level = level();
|
||||
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
ch.damage(Random.NormalIntRange(4 , 6 + level * 2), this);
|
||||
|
||||
ch.sprite.burst(0xFFFFFFFF, level / 2 + 2);
|
||||
|
||||
@@ -84,7 +84,8 @@ public class WandOfPrismaticLight extends Wand {
|
||||
protected void onZap(Ballistica beam) {
|
||||
Char ch = Actor.findChar(beam.collisionPos);
|
||||
if (ch != null){
|
||||
affectTarget(ch);
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
affectTarget(ch);
|
||||
}
|
||||
affectMap(beam);
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
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.items.Dewdrop;
|
||||
@@ -96,6 +97,11 @@ public class WandOfRegrowth extends Wand {
|
||||
Level.set( i, Terrain.GRASS );
|
||||
}
|
||||
|
||||
Char ch = Actor.findChar(i);
|
||||
if (ch != null){
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
}
|
||||
|
||||
GameScene.add( Blob.seed( i, 10, Regrowth.class ) );
|
||||
|
||||
}
|
||||
|
||||
@@ -102,6 +102,8 @@ public class WandOfTransfusion extends Wand {
|
||||
//if we find a character..
|
||||
if (ch != null && ch instanceof Mob){
|
||||
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
|
||||
//heals an ally, or charmed/corrupted enemy
|
||||
if (((Mob) ch).ally || ch.buff(Charm.class) != null || ch.buff(Corruption.class) != null){
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.wands;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.VenomGas;
|
||||
@@ -47,6 +48,11 @@ public class WandOfVenom extends Wand {
|
||||
Blob venomGas = Blob.seed(bolt.collisionPos, 50 + 10 * level, VenomGas.class);
|
||||
((VenomGas)venomGas).setStrength(level+1);
|
||||
GameScene.add(venomGas);
|
||||
|
||||
Char ch = Actor.findChar(bolt.collisionPos);
|
||||
if (ch != null){
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user