v0.9.2: implemented the ally warp talent

This commit is contained in:
Evan Debenham 2021-02-13 20:40:45 -05:00
parent 7bf3cacbb3
commit 20f41e369b
3 changed files with 26 additions and 4 deletions

View File

@ -371,6 +371,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.empowering_scrolls.title=empowering scrolls
actors.hero.talent.empowering_scrolls.desc=_+1:_ When the Mage reads a scroll, his next wand zap within 10 turns will get _+1 level_.\n\n_+2:_ When the Mage reads a scroll, his next wand zap within 10 turns will get _+2 levels_.\n\n_+3:_ When the Mage reads a scroll, his next wand zap within 10 turns will get _+3 levels_.
actors.hero.talent.ally_warp.title=ally warp
actors.hero.talent.ally_warp.desc=_+1:_ The Mage can tap an ally to instantly swap places with them, with a 3 tile range.\n\n_+2:_ The Mage can tap an ally to instantly swap places with them, with a 6 tile range.\n\n_+3:_ The Mage can tap an ally to instantly swap places with them, with a 9 tile range.\n\nThe mage cannot swap places with immobile allies.
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
@ -404,6 +406,8 @@ actors.hero.talent.rogues_foresight.title=rogue's foresight
actors.hero.talent.rogues_foresight.desc=_+1:_ When the Rogue is on a level with a secret room, he has a _50% chance to notice_ that the level contains a secret.\n\n_+2:_ When the Rogue is on a level with a secret room, he has a _75% chance to notice_ that the level contains a secret.
actors.hero.talent.light_cloak.title=light cloak
actors.hero.talent.light_cloak.desc=_+1:_ The Rogue can use his cloak of shadows when it is not equipped, but it recharges at _10% speed_.\n\n_+2:_ The Rogue can use his cloak of shadows when it is not equipped, but it recharges at _20% speed_.\n\n_+3:_ The Rogue can use his cloak of shadows when it is not equipped, but it recharges at _30% speed_.
actors.hero.talent.enhanced_rings.title=enhanced rings
actors.hero.talent.enhanced_rings.desc=_+1:_ When the Rogue consumes uses an artifact, his rings gain +1 upgrade for _5 turns_.\n\n_+2:_ When the Rogue consumes uses an artifact, his rings gain +1 upgrade for _10 turns_.\n\n_+3:_When the Rogue consumes uses an artifact, his rings gain +1 upgrade for _15 turns_.
actors.hero.talent.enhanced_lethality.title=enhanced lethality
actors.hero.talent.enhanced_lethality.desc=_+1:_ The Assassin can assassinate enemies below _4/12/25/60% health_ per level of preparation, up from 3/10/20/40%.\n\n_+2:_ The Assassin can assassinate enemies below _5/14/30/80% health_ per level of preparation, up from 3/10/20/40%.\n\n_+3:_ The Assassin can assassinate enemies below _6/16/35/100% health_ per level of preparation, up from 3/10/20/40%.
actors.hero.talent.assassins_reach.title=assassin's reach

View File

@ -61,12 +61,14 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Elemental;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Potential;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAggression;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast;
@ -154,7 +156,15 @@ public abstract class Char extends Actor {
}
public boolean canInteract(Char c){
return Dungeon.level.adjacent( pos, c.pos );
if (Dungeon.level.adjacent( pos, c.pos )){
return true;
} else if (c instanceof Hero
&& alignment == Alignment.ALLY
&& Dungeon.level.distance(pos, c.pos) <= 3*Dungeon.hero.pointsInTalent(Talent.ALLY_WARP)){
return true;
} else {
return false;
}
}
//swaps places by default
@ -176,8 +186,16 @@ public abstract class Char extends Actor {
|| c.properties().contains(Property.LARGE) && !Dungeon.level.openSpace[pos]){
return true;
}
int curPos = pos;
//warp instantly with allies in this case
if (Dungeon.hero.hasTalent(Talent.ALLY_WARP)){
ScrollOfTeleportation.appear(this, Dungeon.hero.pos);
ScrollOfTeleportation.appear(Dungeon.hero, curPos);
Dungeon.observe();
return true;
}
moveSprite( pos, Dungeon.hero.pos );
move( Dungeon.hero.pos );

View File

@ -82,7 +82,7 @@ public enum Talent {
//Mage T2
ENERGIZING_MEAL(36), ENERGIZING_UPGRADE(37), WAND_PRESERVATION(38), ARCANE_VISION(39), SHIELD_BATTERY(40),
//Mage T3
EMPOWERING_SCROLLS(41, 3), MAGE_T3_2(42, 3),
EMPOWERING_SCROLLS(41, 3), ALLY_WARP(42, 3),
//Battlemage T3
EMPOWERED_STRIKE(43, 3), MYSTICAL_CHARGE(44, 3), EXCESS_CHARGE(45, 3),
//Warlock T3
@ -451,7 +451,7 @@ public enum Talent {
Collections.addAll(tierTalents, HOLD_FAST, STRONGMAN);
break;
case MAGE:
Collections.addAll(tierTalents, EMPOWERING_SCROLLS, MAGE_T3_2);
Collections.addAll(tierTalents, EMPOWERING_SCROLLS, ALLY_WARP);
break;
case ROGUE:
Collections.addAll(tierTalents, ENHANCED_RINGS, LIGHT_CLOAK);