v0.3.2b: tweaked lock floor effect, allowed for some regen to process if time is awarded.
This commit is contained in:
parent
519e1252cb
commit
47aa30c830
|
@ -24,7 +24,9 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
||||
public class LockedFloor extends Buff {
|
||||
//this buff is purely meant as a visual indicator that the gameplay implications of a level seal are in effect.
|
||||
|
||||
//the amount of turns remaining before beneficial passive effects turn off
|
||||
private float left = 20; //starts at 20 turns
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
|
@ -33,9 +35,20 @@ public class LockedFloor extends Buff {
|
|||
if (!Dungeon.level.locked)
|
||||
detach();
|
||||
|
||||
if (left >= 1)
|
||||
left --;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void addTime(float time){
|
||||
left += time;
|
||||
}
|
||||
|
||||
public boolean regenOn(){
|
||||
return left >= 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.LOCKED_FLOOR;
|
||||
|
@ -50,8 +63,8 @@ public class LockedFloor extends Buff {
|
|||
public String desc() {
|
||||
return "The current floor is locked, and you are unable to leave it!\n" +
|
||||
"\n" +
|
||||
"While a floor is locked hunger, passive health regen, and passive item recharging will not function. " +
|
||||
"The passing of time will not help or hinder you here.\n" +
|
||||
"While a floor is locked, you will not gain hunger or take damage from starving. In addition, " +
|
||||
"if you do not work towards defeating this floor's boss, passive regeneration effects will also stop.\n " +
|
||||
"\n" +
|
||||
"Additionally, if you are revived by an unblessed ankh while the floor is locked, then it will reset.\n" +
|
||||
"\n" +
|
||||
|
|
|
@ -32,12 +32,13 @@ public class Regeneration extends Buff {
|
|||
public boolean act() {
|
||||
if (target.isAlive()) {
|
||||
|
||||
|
||||
|
||||
if (target.HP < target.HT && !((Hero)target).isStarving() && target.buff(LockedFloor.class) == null) {
|
||||
target.HP += 1;
|
||||
if (target.HP == target.HT){
|
||||
((Hero)target).resting = false;
|
||||
if (target.HP < target.HT && !((Hero)target).isStarving()) {
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (lock == null || lock.regenOn()) {
|
||||
target.HP += 1;
|
||||
if (target.HP == target.HT) {
|
||||
((Hero) target).resting = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,8 @@ public class CloakOfShadows extends Artifact {
|
|||
@Override
|
||||
public boolean act() {
|
||||
if (charge < chargeCap) {
|
||||
if (!stealthed && target.buff(LockedFloor.class) == null)
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (!stealthed && (lock == null || lock.regenOn()))
|
||||
partialCharge += (1f / (60 - (chargeCap-charge)*2));
|
||||
|
||||
if (partialCharge >= 1) {
|
||||
|
|
|
@ -208,7 +208,8 @@ public class DriedRose extends Artifact {
|
|||
@Override
|
||||
public boolean act() {
|
||||
|
||||
if (charge < chargeCap && !cursed && target.buff(LockedFloor.class) == null) {
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
|
||||
//TODO: investigate balancing on this.
|
||||
partialCharge += 10/75f;
|
||||
if (partialCharge > 1){
|
||||
|
|
|
@ -208,7 +208,8 @@ public class EtherealChains extends Artifact {
|
|||
@Override
|
||||
public boolean act() {
|
||||
int chargeTarget = 5+(level*2);
|
||||
if (!cursed && charge < chargeTarget && target.buff(LockedFloor.class) == null) {
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (charge < chargeTarget && !cursed && (lock == null || lock.regenOn())) {
|
||||
partialCharge += 1 / (40f - (chargeTarget - charge)*2f);
|
||||
} else if (cursed && Random.Int(100) == 0){
|
||||
Buff.prolong( target, Cripple.class, 10f);
|
||||
|
|
|
@ -173,7 +173,8 @@ public class HornOfPlenty extends Artifact {
|
|||
|
||||
@Override
|
||||
public boolean act() {
|
||||
if (charge < chargeCap && !cursed && target.buff(LockedFloor.class) == null) {
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
|
||||
|
||||
//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)
|
||||
|
|
|
@ -304,7 +304,8 @@ public class LloydsBeacon extends Artifact {
|
|||
public class beaconRecharge extends ArtifactBuff{
|
||||
@Override
|
||||
public boolean act() {
|
||||
if (charge < chargeCap && !cursed && target.buff(LockedFloor.class) == null) {
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
|
||||
partialCharge += 1 / (100f - (chargeCap - charge)*10f);
|
||||
|
||||
if (partialCharge >= 1) {
|
||||
|
|
|
@ -58,7 +58,7 @@ public class TalismanOfForesight extends Artifact {
|
|||
@Override
|
||||
public ArrayList<String> actions( Hero hero ) {
|
||||
ArrayList<String> actions = super.actions( hero );
|
||||
if (isEquipped( hero ) && charge == 100 && !cursed)
|
||||
if (isEquipped( hero ) && charge == chargeCap && !cursed)
|
||||
actions.add(AC_SCRY);
|
||||
return actions;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class TalismanOfForesight extends Artifact {
|
|||
if ( isEquipped( Dungeon.hero ) ){
|
||||
if (!cursed) {
|
||||
desc += "\n\nWhen you hold the talisman you feel like your senses are heightened.";
|
||||
if (charge == 100)
|
||||
if (charge == chargeCap)
|
||||
desc += "\n\nThe talisman is radiating energy, prodding at your mind. You wonder what would " +
|
||||
"happen if you let it in.";
|
||||
} else {
|
||||
|
@ -173,13 +173,14 @@ public class TalismanOfForesight extends Artifact {
|
|||
BuffIndicator.refreshHero();
|
||||
|
||||
//fully charges in 2500 turns at lvl=0, scaling to 1000 turns at lvl = 10.
|
||||
if (charge < 100 && !cursed && target.buff(LockedFloor.class) == null) {
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
|
||||
partialCharge += 0.04+(level*0.006);
|
||||
|
||||
if (partialCharge > 1 && charge < 100) {
|
||||
if (partialCharge > 1 && charge < chargeCap) {
|
||||
partialCharge--;
|
||||
charge++;
|
||||
} else if (charge >= 100) {
|
||||
} else if (charge >= chargeCap) {
|
||||
partialCharge = 0;
|
||||
GLog.p("Your Talisman is fully charged!");
|
||||
}
|
||||
|
|
|
@ -201,7 +201,9 @@ public class TimekeepersHourglass extends Artifact {
|
|||
public class hourglassRecharge extends ArtifactBuff {
|
||||
@Override
|
||||
public boolean act() {
|
||||
if (charge < chargeCap && !cursed && target.buff(LockedFloor.class) == null) {
|
||||
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
|
||||
partialCharge += 1 / (60f - (chargeCap - charge)*2f);
|
||||
|
||||
if (partialCharge >= 1) {
|
||||
|
|
|
@ -197,7 +197,8 @@ public class UnstableSpellbook extends Artifact {
|
|||
public class bookRecharge extends ArtifactBuff{
|
||||
@Override
|
||||
public boolean act() {
|
||||
if (charge < chargeCap && !cursed && target.buff(LockedFloor.class) == null) {
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
|
||||
partialCharge += 1 / (150f - (chargeCap - charge)*15f);
|
||||
|
||||
if (partialCharge >= 1) {
|
||||
|
|
|
@ -436,7 +436,8 @@ public abstract class Wand extends Item {
|
|||
float turnsToCharge = (float) (BASE_CHARGE_DELAY
|
||||
+ (SCALING_CHARGE_ADDITION * Math.pow(scalingFactor, missingCharges)));
|
||||
|
||||
if (target.buff(LockedFloor.class) == null)
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
if (lock == null || lock.regenOn())
|
||||
partialCharge += 1f/turnsToCharge;
|
||||
|
||||
ScrollOfRecharging.Recharging bonus = target.buff(ScrollOfRecharging.Recharging.class);
|
||||
|
|
Loading…
Reference in New Issue
Block a user