v2.0.0: added a T1 food talent for the Duelist
This commit is contained in:
@@ -281,6 +281,9 @@ actors.buffs.paralysis.heromsg=You are paralysed!
|
||||
actors.buffs.paralysis.out=resisted paralysis
|
||||
actors.buffs.paralysis.desc=Oftentimes the worst thing to do is nothing at all.\n\nParalysis completely halts all actions, forcing the target to wait until the effect wears off. The pain from taking damage can cause characters to resist paralysis, breaking them out of the effect.\n\nTurns of paralysis remaining: %s.
|
||||
|
||||
actors.buffs.physicalempower.name=physically empowered
|
||||
actors.buffs.physicalempower.desc=Your blows have been empowered, increasing the amount of damage you can deal with physical attacks.\n\nBonus damage: %1$d.\nHits remaining: %2$d.
|
||||
|
||||
actors.buffs.pincushion.name=pincushion
|
||||
actors.buffs.pincushion.desc=The thrown weapons you have used against this character are currently stuck to them and will fall to the floor after they are defeated.\n\nThe following items are currently attached:
|
||||
|
||||
@@ -543,7 +546,7 @@ actors.hero.talent$seershotcooldown.desc=You have recently used this talent, and
|
||||
#warrior
|
||||
actors.hero.talent.hearty_meal.title=hearty meal
|
||||
actors.hero.talent.hearty_meal.desc=_+1:_ Eating heals the Warrior for _2 HP_ when he is below 50% health, and _3 HP_ when he is below 25% health.\n\n_+2:_ Eating heals the Warrior for _3 HP_ when he is below 50% health, and _5 HP_ when he is below 25% health.
|
||||
actors.hero.talent.veterans_intuition.title=Veteran's intuition
|
||||
actors.hero.talent.veterans_intuition.title=veteran's intuition
|
||||
actors.hero.talent.veterans_intuition.desc=_+1:_ The Warrior identifies weapons _1.75x faster_ and armor _2.5x faster_.\n\n_+2:_ The Warrior identifies weapons _2.5x faster_ and armor _when he equips it_.
|
||||
actors.hero.talent.test_subject.title=test subject
|
||||
actors.hero.talent.test_subject.desc=_+1:_ Whenever the Warrior identifies an item, he heals for _2 HP_.\n\n_+2:_ Whenever the Warrior identifies an item, he heals for _3 HP_.
|
||||
@@ -793,7 +796,9 @@ actors.hero.talent.swift_spirit.title=swift spirit
|
||||
actors.hero.talent.swift_spirit.desc=_+1:_ The spirit hawk's movement speed is increased to _2.5 tiles_ from 2, and it is guaranteed to dodge the first _2 attacks_ made against it.\n\n_+2:_ The spirit hawk's movement speed is increased to _3 tiles_ from 2, and it is guaranteed to dodge the first _4 attacks_ made against it.\n\n_+3:_ The spirit hawk's movement speed is increased to _3.5 tiles_ from 2, and it is guaranteed to dodge the first _6 attacks_ made against it.\n\n_+4:_The spirit hawk's movement speed is increased to _4 tiles_ from 2, and it is guaranteed to dodge the first _8 attacks_ made against it.
|
||||
|
||||
#duelist
|
||||
actors.hero.talent.adventurers_intuition.title=Adventurer's Intuition
|
||||
actors.hero.talent.strengthening_meal.title=strengthening meal
|
||||
actors.hero.talent.strengthening_meal.desc=_+1:_ Eating food grants the Duelist 2 bonus damage on her next _2 physical attacks_.\n\n_+2:_ Eating food grants the Duelist 2 bonus damage on her next _3 physical attacks_.
|
||||
actors.hero.talent.adventurers_intuition.title=adventurer's intuition
|
||||
actors.hero.talent.adventurers_intuition.desc=_+1:_ The Duelist identifies weapons _2.5x faster_ and armor _1.75x faster_.\n\n_+2:_ The Duelist identifies weapons _when she equips them_ and armor _2.5x faster_.
|
||||
|
||||
#universal
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2015 Oleg Dolya
|
||||
*
|
||||
* Shattered Pixel Dungeon
|
||||
* Copyright (C) 2014-2022 Evan Debenham
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
public class PhysicalEmpower extends Buff {
|
||||
|
||||
{
|
||||
type = buffType.POSITIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.UPGRADE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tintIcon(Image icon) {
|
||||
icon.hardlight(1, 0.5f, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float iconFadePercent() {
|
||||
float max = 1 + Dungeon.hero.pointsInTalent(Talent.STRENGTHENING_MEAL);
|
||||
return Math.max(0, (max-left) / max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String iconTextDisplay() {
|
||||
return Integer.toString(left);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return Messages.get(this, "desc", dmgBoost, left);
|
||||
}
|
||||
|
||||
public int dmgBoost;
|
||||
public int left;
|
||||
|
||||
public void set(int dmg, int hits){
|
||||
dmgBoost = dmg;
|
||||
left = Math.max(left, hits);
|
||||
}
|
||||
|
||||
private static final String BOOST = "boost";
|
||||
private static final String LEFT = "left";
|
||||
|
||||
@Override
|
||||
public void storeInBundle(Bundle bundle) {
|
||||
super.storeInBundle(bundle);
|
||||
bundle.put( BOOST, dmgBoost );
|
||||
bundle.put( LEFT, left );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
dmgBoost = bundle.getInt( BOOST );
|
||||
left = bundle.getInt( LEFT );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,6 +52,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LostInventory;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MindVision;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Momentum;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PhysicalEmpower;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SnipersMark;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
|
||||
@@ -560,8 +561,18 @@ public class Hero extends Char {
|
||||
} else {
|
||||
dmg = RingOfForce.damageRoll(this);
|
||||
}
|
||||
|
||||
PhysicalEmpower emp = buff(PhysicalEmpower.class);
|
||||
if (emp != null){
|
||||
dmg += emp.dmgBoost;
|
||||
emp.left--;
|
||||
if (emp.left <= 0) {
|
||||
emp.detach();
|
||||
}
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG, 0.75f, 1.2f);
|
||||
}
|
||||
|
||||
if (dmg < 0) dmg = 0;
|
||||
|
||||
return dmg;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.EnhancedRings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LostInventory;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PhysicalEmpower;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.RevealedArea;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
|
||||
@@ -62,7 +63,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.noosa.particles.Emitter;
|
||||
@@ -147,7 +147,7 @@ public enum Talent {
|
||||
EAGLE_EYE(119, 4), GO_FOR_THE_EYES(120, 4), SWIFT_SPIRIT(121, 4),
|
||||
|
||||
//Duelist T1
|
||||
DUELIST_T1_1(128), ADVENTURERS_INTUITION(129), DUELIST_T1_3(130), DUELIST_T1_4(131),
|
||||
STRENGTHENING_MEAL(128), ADVENTURERS_INTUITION(129), DUELIST_T1_3(130), DUELIST_T1_4(131),
|
||||
//Duelist T2
|
||||
DUELIST_T2_1(132), DUELIST_T2_2(133), DUELIST_T2_3(134), DUELIST_T2_4(135), DUELIST_T2_5(136),
|
||||
//Duelist T3
|
||||
@@ -377,6 +377,10 @@ public enum Talent {
|
||||
//effectively 1/2 turns of haste
|
||||
Buff.prolong( hero, Haste.class, 0.67f+hero.pointsInTalent(INVIGORATING_MEAL));
|
||||
}
|
||||
if (hero.hasTalent(STRENGTHENING_MEAL)){
|
||||
//2 bonus physical damage for next 2/3 attacks
|
||||
Buff.affect( hero, PhysicalEmpower.class).set(2, 1 + hero.pointsInTalent(STRENGTHENING_MEAL));
|
||||
}
|
||||
}
|
||||
|
||||
public static class WarriorFoodImmunity extends FlavourBuff{
|
||||
@@ -590,7 +594,7 @@ public enum Talent {
|
||||
Collections.addAll(tierTalents, NATURES_BOUNTY, SURVIVALISTS_INTUITION, FOLLOWUP_STRIKE, NATURES_AID);
|
||||
break;
|
||||
case DUELIST:
|
||||
Collections.addAll(tierTalents, DUELIST_T1_1, ADVENTURERS_INTUITION, DUELIST_T1_3, DUELIST_T1_4);
|
||||
Collections.addAll(tierTalents, STRENGTHENING_MEAL, ADVENTURERS_INTUITION, DUELIST_T1_3, DUELIST_T1_4);
|
||||
break;
|
||||
}
|
||||
for (Talent talent : tierTalents){
|
||||
|
||||
Reference in New Issue
Block a user