v0.2.3: more Dried Rose implementation
This commit is contained in:
parent
80686f6ad7
commit
bded42981f
|
@ -7,6 +7,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Wraith;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
|
@ -103,13 +104,20 @@ public class DriedRose extends Artifact {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ArtifactBuff passiveBuff() {
|
protected ArtifactBuff passiveBuff() {
|
||||||
return new roseRecharge();
|
return new roseRecharge();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Item upgrade() {
|
||||||
|
if (level >= 9)
|
||||||
|
image = ItemSpriteSheet.ARTIFACT_ROSE3;
|
||||||
|
else if (level >= 4)
|
||||||
|
image = ItemSpriteSheet.ARTIFACT_ROSE2;
|
||||||
|
return super.upgrade();
|
||||||
|
}
|
||||||
|
|
||||||
private static final String TALKEDTO = "talkedto";
|
private static final String TALKEDTO = "talkedto";
|
||||||
private static final String FIRSTSUMMON = "firstsummon";
|
private static final String FIRSTSUMMON = "firstsummon";
|
||||||
private static final String SPAWNED = "spawned";
|
private static final String SPAWNED = "spawned";
|
||||||
|
@ -136,8 +144,39 @@ public class DriedRose extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
|
|
||||||
|
if (charge < chargeCap && !cursed) {
|
||||||
|
//TODO: investigate balancing on this.
|
||||||
|
partialCharge += 1/10f;
|
||||||
|
if (partialCharge > 1){
|
||||||
|
charge++;
|
||||||
|
partialCharge--;
|
||||||
|
if (charge == chargeCap){
|
||||||
|
partialCharge = 0f;
|
||||||
|
GLog.p("Your rose is fully charged!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (cursed && Random.Int(100) == 0) {
|
||||||
|
|
||||||
|
ArrayList<Integer> spawnPoints = new ArrayList<Integer>();
|
||||||
|
|
||||||
|
for (int i = 0; i < Level.NEIGHBOURS8.length; i++) {
|
||||||
|
int p = target.pos + Level.NEIGHBOURS8[i];
|
||||||
|
if (Actor.findChar(p) == null && (Level.passable[p] || Level.avoid[p])) {
|
||||||
|
spawnPoints.add(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (spawnPoints.size() > 0) {
|
||||||
|
Wraith wraith = new Wraith();
|
||||||
|
wraith.pos = Random.element(spawnPoints);
|
||||||
|
wraith.adjustStats(Dungeon.depth);
|
||||||
|
|
||||||
|
GameScene.add(wraith, 1f);
|
||||||
|
Sample.INSTANCE.play(Assets.SND_CURSED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return super.act();
|
return super.act();
|
||||||
//TODO: decide on charging logic, put here.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,7 @@ public class WndSadGhost extends Window {
|
||||||
"I wonder what twisted magic allowed it to live so long...\n\n";
|
"I wonder what twisted magic allowed it to live so long...\n\n";
|
||||||
private static final String TXT_GIVEITEM=
|
private static final String TXT_GIVEITEM=
|
||||||
"Please take one of these items, they are useless to me now... " +
|
"Please take one of these items, they are useless to me now... " +
|
||||||
"Maybe they will help you in your journey...";
|
"Maybe they will help you in your journey...\n\n" +
|
||||||
private static final String TXT_TotallyNotATeaser=
|
|
||||||
"Also... There is an item lost in this dungeon that is very dear to me..." +
|
"Also... There is an item lost in this dungeon that is very dear to me..." +
|
||||||
"If you ever... find my... rose......";
|
"If you ever... find my... rose......";
|
||||||
private static final String TXT_WEAPON = "Ghost's weapon";
|
private static final String TXT_WEAPON = "Ghost's weapon";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user