v3.0.0: holy tome now charges based on time, not exp
This commit is contained in:
@@ -342,10 +342,9 @@ items.artifacts.etherealchains$chainsrecharge.levelup=Your chains grow stronger!
|
||||
|
||||
items.artifacts.holytome.name=holy tome
|
||||
items.artifacts.holytome.ac_cast=CAST
|
||||
items.artifacts.holytome.no_charge=Your tome is out of charge. Gain exp to recharge it.
|
||||
items.artifacts.holytome.no_spell=You're not able to cast that spell right now.
|
||||
items.artifacts.holytome.levelup=Your tome grows stronger!
|
||||
items.artifacts.holytome.desc=A holy tome that acts as a focus for the Cleric's divine magic. Using the tome lets the Cleric cast a variety of magical spells.\n\nThe tome will steadily get more powerful as the Cleric uses it, and it will recharge as the Cleric gains experience points when defeating enemies.
|
||||
items.artifacts.holytome.desc=A holy tome that acts as a focus for the Cleric's divine magic. Using the tome lets the Cleric cast a variety of magical spells.\n\nThe tome will steadily get more powerful as the Cleric uses it, giving the Cleric more maximum charges and slightly increasing the recharging speed.
|
||||
|
||||
items.artifacts.hornofplenty.name=horn of plenty
|
||||
items.artifacts.hornofplenty.ac_snack=SNACK
|
||||
|
||||
@@ -1888,9 +1888,6 @@ public class Hero extends Char {
|
||||
MasterThievesArmband.Thievery armband = buff(MasterThievesArmband.Thievery.class);
|
||||
if (armband != null) armband.gainCharge(percent);
|
||||
|
||||
HolyTome.TomeRecharge tome = buff(HolyTome.TomeRecharge.class);
|
||||
if (tome != null) tome.gainCharge(percent);
|
||||
|
||||
Berserk berserk = buff(Berserk.class);
|
||||
if (berserk != null) berserk.recover(percent);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.ClericSpell;
|
||||
@@ -249,41 +250,38 @@ public class HolyTome extends Artifact {
|
||||
else ActionIndicator.clearAction(this);
|
||||
}
|
||||
|
||||
public void gainCharge(float levelPortion) {
|
||||
if (cursed || target.buff(MagicImmune.class) != null) return;
|
||||
|
||||
if (charge < chargeCap) {
|
||||
|
||||
//gains 5 charges per hero level, plus 0.25 per missing charge, plus another 0.25 for every level after 7
|
||||
float chargeGain = (5f * levelPortion) * (1f+(chargeCap - charge)/20f);
|
||||
if (level() > 7) chargeGain *= 1f + (level()-7)/20f;
|
||||
|
||||
chargeGain *= RingOfEnergy.artifactChargeMultiplier(target);
|
||||
|
||||
//floor 1 is very short with pre-spawned weak enemies, so nerf recharge speed here specifically
|
||||
if (Dungeon.depth == 1){
|
||||
chargeGain *= 0.67f;
|
||||
@Override
|
||||
public boolean act() {
|
||||
if (charge < chargeCap && !cursed && target.buff(MagicImmune.class) == null) {
|
||||
if (Regeneration.regenOn()) {
|
||||
float missing = (chargeCap - charge);
|
||||
if (level() > 7) missing += 5*(level() - 7)/3f;
|
||||
float turnsToCharge = (60 - missing);
|
||||
turnsToCharge /= RingOfEnergy.artifactChargeMultiplier(target);
|
||||
float chargeToGain = (1f / turnsToCharge);
|
||||
if (!isEquipped(Dungeon.hero)){
|
||||
chargeToGain *= 0.75f*Dungeon.hero.pointsInTalent(Talent.LIGHT_READING)/3f;
|
||||
}
|
||||
partialCharge += chargeToGain;
|
||||
}
|
||||
|
||||
if (!isEquipped(Dungeon.hero)){
|
||||
chargeGain *= 0.75f*Dungeon.hero.pointsInTalent(Talent.LIGHT_READING)/3f;
|
||||
}
|
||||
|
||||
partialCharge += chargeGain;
|
||||
|
||||
//charge is in increments of 1/5 max hunger value.
|
||||
while (partialCharge >= 1) {
|
||||
charge++;
|
||||
partialCharge -= 1;
|
||||
|
||||
if (charge == chargeCap){
|
||||
partialCharge = 0;
|
||||
}
|
||||
updateQuickslot();
|
||||
|
||||
}
|
||||
} else {
|
||||
partialCharge = 0;
|
||||
}
|
||||
|
||||
updateQuickslot();
|
||||
|
||||
spend( TICK );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user