v0.9.2: implemented the mystical charge talent
This commit is contained in:
parent
b9f3f84e04
commit
33e17c1700
|
@ -365,6 +365,8 @@ actors.hero.talent.shield_battery.title=shield battery
|
|||
actors.hero.talent.shield_battery.desc=_+1:_ The Mage can self-target with a wand to convert its charges into shielding at a rate of _5% max HP per charge_.\n\n_+2:_ The Mage can self-target with a wand to convert its charges into shielding at a rate of _7.5% max HP per charge_.
|
||||
actors.hero.talent.empowered_strike.title=empowered strike
|
||||
actors.hero.talent.empowered_strike.desc=_+1:_ The Battlemage's first melee strike with his staff after zapping with it deals _+17% damage_.\n\n_+2:_ The Battlemage's first melee strike with his staff after zapping with it deals _+33% damage_.\n\n_+3:_ The Battlemage's first melee strike with his staff after zapping with it deals _+50% damage_.
|
||||
actors.hero.talent.mystical_charge.title=mystical charge
|
||||
actors.hero.talent.mystical_charge.desc=_+1:_ Striking with his staff grants the Battlemage _0.5 turns_ worth of artifact recharging.\n\n_+2:_ Striking with his staff grants the Battlemage _1 turn_ worth of artifact recharging.\n\n_+3:_ Striking with his staff grants the Battlemage _1.5 turns_ worth of artifact recharging.
|
||||
actors.hero.talent.soul_siphon.title=soul siphon
|
||||
actors.hero.talent.soul_siphon.desc=_+1:_ Melee damage dealt by other characters triggers the Warlock's soul mark at _15% effectiveness_.\n\n_+2:_ Melee damage dealt by other characters triggers the Warlock's soul mark at _30% effectiveness_.\n\n_+3:_ Melee damage dealt by other characters triggers the Warlock's soul mark at _45% effectiveness_.
|
||||
actors.hero.talent.soul_eater.title=soul eater
|
||||
|
|
|
@ -38,7 +38,7 @@ public class ArtifactRecharge extends Buff {
|
|||
type = buffType.POSITIVE;
|
||||
}
|
||||
|
||||
private int left;
|
||||
private float left;
|
||||
public boolean ignoreHornOfPlenty;
|
||||
|
||||
@Override
|
||||
|
@ -46,15 +46,17 @@ public class ArtifactRecharge extends Buff {
|
|||
|
||||
if (target instanceof Hero){
|
||||
Belongings b = ((Hero) target).belongings;
|
||||
|
||||
float chargeAmount = Math.min(1, left);
|
||||
|
||||
if (b.artifact instanceof Artifact){
|
||||
if (!(b.artifact instanceof HornOfPlenty) || !ignoreHornOfPlenty) {
|
||||
((Artifact) b.artifact).charge((Hero) target);
|
||||
((Artifact) b.artifact).charge((Hero) target, chargeAmount);
|
||||
}
|
||||
}
|
||||
if (b.misc instanceof Artifact){
|
||||
if (!(b.misc instanceof HornOfPlenty) || !ignoreHornOfPlenty) {
|
||||
((Artifact) b.misc).charge((Hero) target);
|
||||
((Artifact) b.misc).charge((Hero) target, chargeAmount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,12 +71,12 @@ public class ArtifactRecharge extends Buff {
|
|||
return true;
|
||||
}
|
||||
|
||||
public ArtifactRecharge set( int amount ){
|
||||
left = amount;
|
||||
public ArtifactRecharge set( float amount ){
|
||||
if (left < amount) left = amount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArtifactRecharge prolong( int amount ){
|
||||
public ArtifactRecharge prolong( float amount ){
|
||||
left += amount;
|
||||
return this;
|
||||
}
|
||||
|
@ -117,7 +119,7 @@ public class ArtifactRecharge extends Buff {
|
|||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
left = bundle.getInt(LEFT);
|
||||
left = bundle.getFloat(LEFT);
|
||||
ignoreHornOfPlenty = bundle.getBoolean(IGNORE_HORN);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ public enum Talent {
|
|||
//Mage T3
|
||||
MAGE_T3_1(41), MAGE_T3_2(42),
|
||||
//Battlemage T3
|
||||
EMPOWERED_STRIKE(43, 3), BATTLEMAGE_T3_2(44, 3), BATTLEMAGE_T3_3(45, 3),
|
||||
EMPOWERED_STRIKE(43, 3), MYSTICAL_CHARGE(44, 3), BATTLEMAGE_T3_3(45, 3),
|
||||
//Warlock T3
|
||||
SOUL_SIPHON(46, 3), SOUL_EATER(47, 3), WARLOCK_T3_3(48, 3),
|
||||
|
||||
|
@ -464,7 +464,7 @@ public enum Talent {
|
|||
Collections.addAll(tierTalents, CLEAVE, LETHAL_DEFENSE, GLADIATOR_T3_3);
|
||||
break;
|
||||
case BATTLEMAGE:
|
||||
Collections.addAll(tierTalents, EMPOWERED_STRIKE, BATTLEMAGE_T3_2, BATTLEMAGE_T3_3);
|
||||
Collections.addAll(tierTalents, EMPOWERED_STRIKE, MYSTICAL_CHARGE, BATTLEMAGE_T3_3);
|
||||
break;
|
||||
case WARLOCK:
|
||||
Collections.addAll(tierTalents, SOUL_SIPHON, SOUL_EATER, WARLOCK_T3_3);
|
||||
|
|
|
@ -89,9 +89,9 @@ public class AlchemistsToolkit extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
if (charge < chargeCap){
|
||||
partialCharge += 0.5f;
|
||||
partialCharge += 0.5f*amount;
|
||||
if (partialCharge >= 1){
|
||||
partialCharge--;
|
||||
charge++;
|
||||
|
|
|
@ -208,7 +208,7 @@ public class Artifact extends KindofMisc {
|
|||
|
||||
protected ArtifactBuff activeBuff() {return null; }
|
||||
|
||||
public void charge(Hero target){
|
||||
public void charge(Hero target, float amount){
|
||||
//do nothing by default;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ public class CapeOfThorns extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
if (cooldown == 0) {
|
||||
charge += 4;
|
||||
charge += Math.round(4*amount);
|
||||
updateQuickslot();
|
||||
}
|
||||
if (charge >= chargeCap){
|
||||
|
|
|
@ -143,9 +143,10 @@ public class ChaliceOfBlood extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
//grants 5 turns of healing up-front
|
||||
float healDelay = 10f - level()*0.9f;
|
||||
healDelay /= amount;
|
||||
//effectively 1HP at lvl 0-5, 2HP lvl 6-8, 3HP lvl 9, and 5HP lvl 10.
|
||||
target.HP = Math.min( target.HT, target.HP + (int)Math.ceil(5/healDelay));
|
||||
}
|
||||
|
|
|
@ -139,9 +139,9 @@ public class CloakOfShadows extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
if (charge < chargeCap) {
|
||||
partialCharge += 0.25f;
|
||||
partialCharge += 0.25f*amount;
|
||||
if (partialCharge >= 1){
|
||||
partialCharge--;
|
||||
charge++;
|
||||
|
|
|
@ -271,10 +271,10 @@ public class DriedRose extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
if (ghost == null){
|
||||
if (charge < chargeCap) {
|
||||
charge += 4;
|
||||
charge += Math.round(4*amount);
|
||||
if (charge >= chargeCap) {
|
||||
charge = chargeCap;
|
||||
partialCharge = 0;
|
||||
|
@ -283,7 +283,8 @@ public class DriedRose extends Artifact {
|
|||
updateQuickslot();
|
||||
}
|
||||
} else {
|
||||
ghost.HP = Math.min( ghost.HT, ghost.HP + 1 + level()/3);
|
||||
int heal = Math.round((1 + level()/3f)*amount);
|
||||
ghost.HP = Math.min( ghost.HT, ghost.HP + heal);
|
||||
updateQuickslot();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -251,10 +251,10 @@ public class EtherealChains extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
int chargeTarget = 5+(level()*2);
|
||||
if (charge < chargeTarget*2){
|
||||
partialCharge += 0.5f;
|
||||
partialCharge += 0.5f*amount;
|
||||
if (partialCharge >= 1){
|
||||
partialCharge--;
|
||||
charge++;
|
||||
|
|
|
@ -142,9 +142,9 @@ public class HornOfPlenty extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
if (charge < chargeCap){
|
||||
partialCharge += 0.25f;
|
||||
partialCharge += 0.25f*amount;
|
||||
if (partialCharge >= 1){
|
||||
partialCharge--;
|
||||
charge++;
|
||||
|
|
|
@ -278,9 +278,9 @@ public class LloydsBeacon extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
if (charge < chargeCap){
|
||||
partialCharge += 0.25f;
|
||||
partialCharge += 0.25f*amount;
|
||||
if (partialCharge >= 1){
|
||||
partialCharge--;
|
||||
charge++;
|
||||
|
|
|
@ -46,9 +46,9 @@ public class MasterThievesArmband extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
if (charge < chargeCap){
|
||||
charge += 10;
|
||||
charge += Math.round(10*amount);
|
||||
updateQuickslot();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,8 +102,8 @@ public class SandalsOfNature extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
target.buff(Naturalism.class).charge();
|
||||
public void charge(Hero target, float amount) {
|
||||
target.buff(Naturalism.class).charge(amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -172,10 +172,11 @@ public class SandalsOfNature extends Artifact {
|
|||
}
|
||||
|
||||
public class Naturalism extends ArtifactBuff{
|
||||
public void charge() {
|
||||
public void charge(float amount) {
|
||||
if (level() > 0 && charge < target.HT){
|
||||
//gain 1+(1*level)% of the difference between current charge and max HP.
|
||||
float chargeGain = (target.HT-charge) * (.01f+ level()*0.01f);
|
||||
chargeGain *= amount;
|
||||
chargeGain *= RingOfEnergy.artifactChargeMultiplier(target);
|
||||
partialCharge += Math.max(0, chargeGain);
|
||||
while (partialCharge > 1){
|
||||
|
|
|
@ -88,9 +88,9 @@ public class TalismanOfForesight extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
if (charge < chargeCap){
|
||||
charge += 2f;
|
||||
charge += Math.round(2*amount);
|
||||
if (charge >= chargeCap) {
|
||||
charge = chargeCap;
|
||||
partialCharge = 0;
|
||||
|
|
|
@ -141,9 +141,9 @@ public class TimekeepersHourglass extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
if (charge < chargeCap){
|
||||
partialCharge += 0.25f;
|
||||
partialCharge += 0.25f*amount;
|
||||
if (partialCharge >= 1){
|
||||
partialCharge--;
|
||||
charge++;
|
||||
|
|
|
@ -212,9 +212,9 @@ public class UnstableSpellbook extends Artifact {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void charge(Hero target) {
|
||||
public void charge(Hero target, float amount) {
|
||||
if (charge < chargeCap){
|
||||
partialCharge += 0.1f;
|
||||
partialCharge += 0.1f*amount;
|
||||
if (partialCharge >= 1){
|
||||
partialCharge--;
|
||||
charge++;
|
||||
|
|
|
@ -58,10 +58,8 @@ public class WildEnergy extends TargetedSpell {
|
|||
ScrollOfRecharging.charge(hero);
|
||||
|
||||
hero.belongings.charge(1f);
|
||||
for (int i = 0; i < 4; i++){
|
||||
if (hero.belongings.artifact instanceof Artifact) ((Artifact) hero.belongings.artifact).charge(hero);
|
||||
if (hero.belongings.misc instanceof Artifact) ((Artifact) hero.belongings.misc).charge(hero);
|
||||
}
|
||||
if (hero.belongings.artifact instanceof Artifact) ((Artifact) hero.belongings.artifact).charge(hero, 4);
|
||||
if (hero.belongings.misc instanceof Artifact) ((Artifact) hero.belongings.misc).charge(hero, 4);
|
||||
|
||||
Buff.affect(hero, Recharging.class, 8f);
|
||||
Buff.affect(hero, ArtifactRecharge.class).prolong( 8 ).ignoreHornOfPlenty = false;
|
||||
|
|
|
@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
||||
|
@ -151,6 +152,12 @@ public class MagesStaff extends MeleeWeapon {
|
|||
damage = Math.round( damage * (1f + Dungeon.hero.pointsInTalent(Talent.EMPOWERED_STRIKE)/6f));
|
||||
}
|
||||
|
||||
if (attacker instanceof Hero && ((Hero) attacker).hasTalent(Talent.MYSTICAL_CHARGE)){
|
||||
Hero hero = (Hero) attacker;
|
||||
if (hero.belongings.artifact instanceof Artifact) ((Artifact) hero.belongings.artifact).charge(hero, hero.pointsInTalent(Talent.MYSTICAL_CHARGE)/2f);
|
||||
if (hero.belongings.misc instanceof Artifact) ((Artifact) hero.belongings.misc).charge(hero, hero.pointsInTalent(Talent.MYSTICAL_CHARGE)/2f);
|
||||
}
|
||||
|
||||
if (wand != null &&
|
||||
attacker instanceof Hero && ((Hero)attacker).subClass == HeroSubClass.BATTLEMAGE) {
|
||||
if (wand.curCharges < wand.maxCharges) wand.partialCharge += 0.5f;
|
||||
|
|
|
@ -79,7 +79,7 @@ public class HighGrass {
|
|||
if (naturalism != null) {
|
||||
if (!naturalism.isCursed()) {
|
||||
naturalismLevel = naturalism.itemLevel() + 1;
|
||||
naturalism.charge();
|
||||
naturalism.charge(1);
|
||||
} else {
|
||||
naturalismLevel = -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user