v0.3.2: changed most passive effects to pause when a floor is locked
This commit is contained in:
parent
0bcaba7a7c
commit
257ca8a6c6
|
@ -50,9 +50,8 @@ public class LockedFloor extends Buff {
|
||||||
public String desc() {
|
public String desc() {
|
||||||
return "The current floor is locked, and you are unable to leave it!\n" +
|
return "The current floor is locked, and you are unable to leave it!\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"While a floor is locked, you will not gain hunger, or take damage from starving, " +
|
"While a floor is locked hunger, passive health regen, and passive item recharging will not function. " +
|
||||||
"but your current hunger state is still in effect. For example, if you are starving you won't take " +
|
"The passing of time will not help or hinder you here.\n" +
|
||||||
"damage, but will still not regenerate health.\n" +
|
|
||||||
"\n" +
|
"\n" +
|
||||||
"Additionally, if you are revived by an unblessed ankh while the floor is locked, then it will reset.\n" +
|
"Additionally, if you are revived by an unblessed ankh while the floor is locked, then it will reset.\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class Regeneration extends Buff {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (target.HP < target.HT && !((Hero)target).isStarving()) {
|
if (target.HP < target.HT && !((Hero)target).isStarving() && target.buff(LockedFloor.class) == null) {
|
||||||
target.HP += 1;
|
target.HP += 1;
|
||||||
if (target.HP == target.HT){
|
if (target.HP == target.HT){
|
||||||
((Hero)target).resting = false;
|
((Hero)target).resting = false;
|
||||||
|
|
|
@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
|
@ -182,7 +183,7 @@ public class CloakOfShadows extends Artifact {
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
if (charge < chargeCap) {
|
if (charge < chargeCap) {
|
||||||
if (!stealthed)
|
if (!stealthed && target.buff(LockedFloor.class) == null)
|
||||||
partialCharge += (1f / (60 - (chargeCap-charge)*2));
|
partialCharge += (1f / (60 - (chargeCap-charge)*2));
|
||||||
|
|
||||||
if (partialCharge >= 1) {
|
if (partialCharge >= 1) {
|
||||||
|
|
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||||
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.Wraith;
|
||||||
|
@ -207,7 +208,7 @@ public class DriedRose extends Artifact {
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
|
|
||||||
if (charge < chargeCap && !cursed) {
|
if (charge < chargeCap && !cursed && target.buff(LockedFloor.class) == null) {
|
||||||
//TODO: investigate balancing on this.
|
//TODO: investigate balancing on this.
|
||||||
partialCharge += 10/75f;
|
partialCharge += 10/75f;
|
||||||
if (partialCharge > 1){
|
if (partialCharge > 1){
|
||||||
|
|
|
@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
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.buffs.Cripple;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Chains;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Chains;
|
||||||
|
@ -207,7 +208,7 @@ public class EtherealChains extends Artifact {
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
int chargeTarget = 5+(level*2);
|
int chargeTarget = 5+(level*2);
|
||||||
if (!cursed && charge < chargeTarget) {
|
if (!cursed && charge < chargeTarget && target.buff(LockedFloor.class) == null) {
|
||||||
partialCharge += 1 / (40f - (chargeTarget - charge)*2f);
|
partialCharge += 1 / (40f - (chargeTarget - charge)*2f);
|
||||||
} else if (cursed && Random.Int(100) == 0){
|
} else if (cursed && Random.Int(100) == 0){
|
||||||
Buff.prolong( target, Cripple.class, 10f);
|
Buff.prolong( target, Cripple.class, 10f);
|
||||||
|
|
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
|
||||||
|
@ -172,7 +173,7 @@ public class HornOfPlenty extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
if (charge < chargeCap && !cursed) {
|
if (charge < chargeCap && !cursed && target.buff(LockedFloor.class) == null) {
|
||||||
|
|
||||||
//generates 0.25 food value every round, +0.015 value per level
|
//generates 0.25 food value every round, +0.015 value per level
|
||||||
//to a max of 0.70 food value per round (0.25+0.5, at level 30)
|
//to a max of 0.70 food value per round (0.25+0.5, at level 30)
|
||||||
|
|
|
@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
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.buffs.Invisibility;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||||
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.RotHeart;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RotHeart;
|
||||||
|
@ -303,7 +304,7 @@ public class LloydsBeacon extends Artifact {
|
||||||
public class beaconRecharge extends ArtifactBuff{
|
public class beaconRecharge extends ArtifactBuff{
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
if (charge < chargeCap && !cursed) {
|
if (charge < chargeCap && !cursed && target.buff(LockedFloor.class) == null) {
|
||||||
partialCharge += 1 / (100f - (chargeCap - charge)*10f);
|
partialCharge += 1 / (100f - (chargeCap - charge)*10f);
|
||||||
|
|
||||||
if (partialCharge >= 1) {
|
if (partialCharge >= 1) {
|
||||||
|
|
|
@ -24,6 +24,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||||
|
@ -156,7 +157,7 @@ public class TalismanOfForesight extends Artifact {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (smthFound == true && !cursed){
|
if (smthFound && !cursed){
|
||||||
if (warn == 0){
|
if (warn == 0){
|
||||||
GLog.w("You feel uneasy.");
|
GLog.w("You feel uneasy.");
|
||||||
if (target instanceof Hero){
|
if (target instanceof Hero){
|
||||||
|
@ -172,7 +173,7 @@ public class TalismanOfForesight extends Artifact {
|
||||||
BuffIndicator.refreshHero();
|
BuffIndicator.refreshHero();
|
||||||
|
|
||||||
//fully charges in 2500 turns at lvl=0, scaling to 1000 turns at lvl = 10.
|
//fully charges in 2500 turns at lvl=0, scaling to 1000 turns at lvl = 10.
|
||||||
if (charge < 100 && !cursed) {
|
if (charge < 100 && !cursed && target.buff(LockedFloor.class) == null) {
|
||||||
partialCharge += 0.04+(level*0.006);
|
partialCharge += 0.04+(level*0.006);
|
||||||
|
|
||||||
if (partialCharge > 1 && charge < 100) {
|
if (partialCharge > 1 && charge < 100) {
|
||||||
|
|
|
@ -24,6 +24,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||||
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.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
@ -200,7 +201,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
public class hourglassRecharge extends ArtifactBuff {
|
public class hourglassRecharge extends ArtifactBuff {
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
if (charge < chargeCap && !cursed) {
|
if (charge < chargeCap && !cursed && target.buff(LockedFloor.class) == null) {
|
||||||
partialCharge += 1 / (60f - (chargeCap - charge)*2f);
|
partialCharge += 1 / (60f - (chargeCap - charge)*2f);
|
||||||
|
|
||||||
if (partialCharge >= 1) {
|
if (partialCharge >= 1) {
|
||||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||||
|
@ -196,7 +197,7 @@ public class UnstableSpellbook extends Artifact {
|
||||||
public class bookRecharge extends ArtifactBuff{
|
public class bookRecharge extends ArtifactBuff{
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
if (charge < chargeCap && !cursed) {
|
if (charge < chargeCap && !cursed && target.buff(LockedFloor.class) == null) {
|
||||||
partialCharge += 1 / (150f - (chargeCap - charge)*15f);
|
partialCharge += 1 / (150f - (chargeCap - charge)*15f);
|
||||||
|
|
||||||
if (partialCharge >= 1) {
|
if (partialCharge >= 1) {
|
||||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.wands;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SoulMark;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SoulMark;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
|
@ -435,7 +436,8 @@ public abstract class Wand extends Item {
|
||||||
float turnsToCharge = (float) (BASE_CHARGE_DELAY
|
float turnsToCharge = (float) (BASE_CHARGE_DELAY
|
||||||
+ (SCALING_CHARGE_ADDITION * Math.pow(scalingFactor, missingCharges)));
|
+ (SCALING_CHARGE_ADDITION * Math.pow(scalingFactor, missingCharges)));
|
||||||
|
|
||||||
partialCharge += 1f/turnsToCharge;
|
if (target.buff(LockedFloor.class) == null)
|
||||||
|
partialCharge += 1f/turnsToCharge;
|
||||||
|
|
||||||
ScrollOfRecharging.Recharging bonus = target.buff(ScrollOfRecharging.Recharging.class);
|
ScrollOfRecharging.Recharging bonus = target.buff(ScrollOfRecharging.Recharging.class);
|
||||||
if (bonus != null && bonus.remainder() > 0f){
|
if (bonus != null && bonus.remainder() > 0f){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user