v0.9.2: implemented the shared upgrades talent
This commit is contained in:
parent
a6838ace3c
commit
7e521ec841
|
@ -429,6 +429,8 @@ actors.hero.talent.farsight.title=farsight
|
||||||
actors.hero.talent.farsight.desc=_+1:_ The Sniper's vision range is _increased by 25%_\n\n_+2:_ The Sniper's vision range is _increased by 50%_\n\n_+3:_ The Sniper's vision range is _increased by 75%_
|
actors.hero.talent.farsight.desc=_+1:_ The Sniper's vision range is _increased by 25%_\n\n_+2:_ The Sniper's vision range is _increased by 50%_\n\n_+3:_ The Sniper's vision range is _increased by 75%_
|
||||||
actors.hero.talent.shared_enchantment.title=shared enchantment
|
actors.hero.talent.shared_enchantment.title=shared enchantment
|
||||||
actors.hero.talent.shared_enchantment.desc=_+1:_ Thrown weapons have a _33% chance_ to use the enchantment on the Sniper's bow.\n\n_+2:_ Thrown weapons have a _67% chance_ to use the enchantment on the Sniper's bow.\n\n_+3:_ Thrown weapons have a _100% chance_ to use the enchantment on the Sniper's bow.\n\nThis talent does not apply to darts shot from an enchanted crossbow, they already trigger the crossbow's enchantment.
|
actors.hero.talent.shared_enchantment.desc=_+1:_ Thrown weapons have a _33% chance_ to use the enchantment on the Sniper's bow.\n\n_+2:_ Thrown weapons have a _67% chance_ to use the enchantment on the Sniper's bow.\n\n_+3:_ Thrown weapons have a _100% chance_ to use the enchantment on the Sniper's bow.\n\nThis talent does not apply to darts shot from an enchanted crossbow, they already trigger the crossbow's enchantment.
|
||||||
|
actors.hero.talent.shared_upgrades.title=shared upgrades
|
||||||
|
actors.hero.talent.shared_upgrades.desc=_+1:_ When the Sniper attacks with an upgraded thrown weapon, each level increases the duration of sniper's mark by 1 turn and the damage of her special attack by _7%_.\n\n_+2:_ When the Sniper attacks with an upgraded thrown weapon, each level increases the duration of sniper's mark by 1 turn and the damage of her special attack by _13%_.\n\n_+3:_ When the Sniper attacks with an upgraded thrown weapon, each level increases the duration of sniper's mark by 1 turn and the damage of her special attack by _20%_.
|
||||||
actors.hero.talent.durable_tips.title=durable tips
|
actors.hero.talent.durable_tips.title=durable tips
|
||||||
actors.hero.talent.durable_tips.desc=_+1:_ Tipped darts have _2x durability_ when the Warden uses them.\n\n_+2:_ Tipped darts have _3x durability_ when the Warden uses them.\n\n_+3:_ Tipped darts have _4x durability_ when the Warden uses them.
|
actors.hero.talent.durable_tips.desc=_+1:_ Tipped darts have _2x durability_ when the Warden uses them.\n\n_+2:_ Tipped darts have _3x durability_ when the Warden uses them.\n\n_+3:_ Tipped darts have _4x durability_ when the Warden uses them.
|
||||||
actors.hero.talent.barkskin.title=barkskin
|
actors.hero.talent.barkskin.title=barkskin
|
||||||
|
|
|
@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||||
|
@ -38,8 +39,10 @@ import com.watabou.utils.Bundle;
|
||||||
public class SnipersMark extends FlavourBuff implements ActionIndicator.Action {
|
public class SnipersMark extends FlavourBuff implements ActionIndicator.Action {
|
||||||
|
|
||||||
public int object = 0;
|
public int object = 0;
|
||||||
|
public int level = 0;
|
||||||
|
|
||||||
private static final String OBJECT = "object";
|
private static final String OBJECT = "object";
|
||||||
|
private static final String LEVEL = "level";
|
||||||
|
|
||||||
public static final float DURATION = 4f;
|
public static final float DURATION = 4f;
|
||||||
|
|
||||||
|
@ -47,6 +50,11 @@ public class SnipersMark extends FlavourBuff implements ActionIndicator.Action {
|
||||||
type = buffType.POSITIVE;
|
type = buffType.POSITIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void set(int object, int level){
|
||||||
|
this.object = object;
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean attachTo(Char target) {
|
public boolean attachTo(Char target) {
|
||||||
ActionIndicator.setAction(this);
|
ActionIndicator.setAction(this);
|
||||||
|
@ -63,13 +71,14 @@ public class SnipersMark extends FlavourBuff implements ActionIndicator.Action {
|
||||||
public void storeInBundle( Bundle bundle ) {
|
public void storeInBundle( Bundle bundle ) {
|
||||||
super.storeInBundle( bundle );
|
super.storeInBundle( bundle );
|
||||||
bundle.put( OBJECT, object );
|
bundle.put( OBJECT, object );
|
||||||
|
bundle.put( LEVEL, level );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void restoreFromBundle( Bundle bundle ) {
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
super.restoreFromBundle( bundle );
|
super.restoreFromBundle( bundle );
|
||||||
object = bundle.getInt( OBJECT );
|
object = bundle.getInt( OBJECT );
|
||||||
|
level = bundle.getInt( LEVEL );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -116,6 +125,7 @@ public class SnipersMark extends FlavourBuff implements ActionIndicator.Action {
|
||||||
if (cell == -1) return;
|
if (cell == -1) return;
|
||||||
|
|
||||||
bow.sniperSpecial = true;
|
bow.sniperSpecial = true;
|
||||||
|
bow.sniperSpecialBonusDamage = level*Dungeon.hero.pointsInTalent(Talent.SHARED_UPGRADES)/15f;
|
||||||
|
|
||||||
arrow.cast(hero, cell);
|
arrow.cast(hero, cell);
|
||||||
detach();
|
detach();
|
||||||
|
|
|
@ -1067,7 +1067,8 @@ public class Hero extends Char {
|
||||||
@Override
|
@Override
|
||||||
protected boolean act() {
|
protected boolean act() {
|
||||||
if (enemy.isAlive()) {
|
if (enemy.isAlive()) {
|
||||||
Buff.prolong(Hero.this, SnipersMark.class, SnipersMark.DURATION).object = enemy.id();
|
int bonusTurns = hasTalent(Talent.SHARED_UPGRADES) ? wep.buffedLvl() : 0;
|
||||||
|
Buff.prolong(Hero.this, SnipersMark.class, SnipersMark.DURATION + bonusTurns).set(enemy.id(), bonusTurns);
|
||||||
}
|
}
|
||||||
Actor.remove(this);
|
Actor.remove(this);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -106,7 +106,7 @@ public enum Talent {
|
||||||
//Huntress T3
|
//Huntress T3
|
||||||
POINT_BLANK(105, 3), HUNTRESS_T3_2(106, 3),
|
POINT_BLANK(105, 3), HUNTRESS_T3_2(106, 3),
|
||||||
//Sniper T3
|
//Sniper T3
|
||||||
FARSIGHT(107, 3), SHARED_ENCHANTMENT(108, 3), SNIPER_T3_3(109, 3),
|
FARSIGHT(107, 3), SHARED_ENCHANTMENT(108, 3), SHARED_UPGRADES(109, 3),
|
||||||
//Warden T3
|
//Warden T3
|
||||||
DURABLE_TIPS(110, 3), BARKSKIN(111, 3), SHIELDING_DEW(112, 3);
|
DURABLE_TIPS(110, 3), BARKSKIN(111, 3), SHIELDING_DEW(112, 3);
|
||||||
|
|
||||||
|
@ -476,7 +476,7 @@ public enum Talent {
|
||||||
Collections.addAll(tierTalents, EVASIVE_ARMOR, PROJECTILE_MOMENTUM, FREERUNNER_T3_3);
|
Collections.addAll(tierTalents, EVASIVE_ARMOR, PROJECTILE_MOMENTUM, FREERUNNER_T3_3);
|
||||||
break;
|
break;
|
||||||
case SNIPER:
|
case SNIPER:
|
||||||
Collections.addAll(tierTalents, FARSIGHT, SHARED_ENCHANTMENT, SNIPER_T3_3);
|
Collections.addAll(tierTalents, FARSIGHT, SHARED_ENCHANTMENT, SHARED_UPGRADES);
|
||||||
break;
|
break;
|
||||||
case WARDEN:
|
case WARDEN:
|
||||||
Collections.addAll(tierTalents, DURABLE_TIPS, BARKSKIN, SHIELDING_DEW);
|
Collections.addAll(tierTalents, DURABLE_TIPS, BARKSKIN, SHIELDING_DEW);
|
||||||
|
|
|
@ -57,6 +57,7 @@ public class SpiritBow extends Weapon {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean sniperSpecial = false;
|
public boolean sniperSpecial = false;
|
||||||
|
public float sniperSpecialBonusDamage = 0f;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<String> actions(Hero hero) {
|
public ArrayList<String> actions(Hero hero) {
|
||||||
|
@ -160,6 +161,8 @@ public class SpiritBow extends Weapon {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
damage = Math.round(damage * (1f + sniperSpecialBonusDamage));
|
||||||
|
|
||||||
if (sniperSpecial){
|
if (sniperSpecial){
|
||||||
switch (augment){
|
switch (augment){
|
||||||
case NONE:
|
case NONE:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user