v0.9.2: implemented the light cloak talent
This commit is contained in:
parent
ce9f1d77d2
commit
470b9b9c51
|
@ -390,6 +390,8 @@ actors.hero.talent.silent_steps.title=silent steps
|
|||
actors.hero.talent.silent_steps.desc=_+1:_ The Rogue will not wake sleeping enemies while he is _3 or more tiles away from them_.\n\n_+2:_ The Rogue will not wake sleeping enemies while he is _not adjacent to them_.
|
||||
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_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.bounty_hunter.title=bounty hunter
|
||||
|
|
|
@ -93,7 +93,7 @@ public enum Talent {
|
|||
//Rogue T2
|
||||
MYSTICAL_MEAL(68), MYSTICAL_UPGRADE(69), WIDE_SEARCH(70), SILENT_STEPS(71), ROGUES_FORESIGHT(72),
|
||||
//Rogue T3
|
||||
ROGUE_T3_1(73, 3), ROGUE_T3_2(74, 3),
|
||||
LIGHT_CLOAK(73, 3), ROGUE_T3_2(74, 3),
|
||||
//Assassin T3
|
||||
ENHANCED_LETHALITY(75, 3), ASSASSIN_T3_2(76, 3), BOUNTY_HUNTER(77, 3),
|
||||
//Freerunner T3
|
||||
|
@ -427,7 +427,7 @@ public enum Talent {
|
|||
Collections.addAll(tierTalents, MAGE_T3_1, MAGE_T3_2);
|
||||
break;
|
||||
case ROGUE:
|
||||
Collections.addAll(tierTalents, ROGUE_T3_1, ROGUE_T3_2);
|
||||
Collections.addAll(tierTalents, LIGHT_CLOAK, ROGUE_T3_2);
|
||||
break;
|
||||
case HUNTRESS:
|
||||
Collections.addAll(tierTalents, POINT_BLANK, HUNTRESS_T3_2);
|
||||
|
|
|
@ -32,6 +32,7 @@ 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.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
|
@ -69,8 +70,10 @@ public class CloakOfShadows extends Artifact {
|
|||
@Override
|
||||
public ArrayList<String> actions( Hero hero ) {
|
||||
ArrayList<String> actions = super.actions( hero );
|
||||
if (isEquipped( hero ) && !cursed && (charge > 0 || stealthed))
|
||||
if ((isEquipped( hero ) || hero.hasTalent(Talent.LIGHT_CLOAK))
|
||||
&& !cursed && (charge > 0 || stealthed)) {
|
||||
actions.add(AC_STEALTH);
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
|
||||
|
@ -82,7 +85,7 @@ public class CloakOfShadows extends Artifact {
|
|||
if (action.equals( AC_STEALTH )) {
|
||||
|
||||
if (!stealthed){
|
||||
if (!isEquipped(hero)) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
||||
if (!isEquipped(hero) && !hero.hasTalent(Talent.LIGHT_CLOAK)) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
||||
else if (cursed) GLog.i( Messages.get(this, "cursed") );
|
||||
else if (charge <= 0) GLog.i( Messages.get(this, "no_charge") );
|
||||
else {
|
||||
|
@ -123,16 +126,47 @@ public class CloakOfShadows extends Artifact {
|
|||
public boolean doUnequip(Hero hero, boolean collect, boolean single) {
|
||||
if (super.doUnequip(hero, collect, single)){
|
||||
stealthed = false;
|
||||
if (hero.hasTalent(Talent.LIGHT_CLOAK)){
|
||||
activate(hero);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean collect( Bag container ) {
|
||||
if (super.collect(container)){
|
||||
if (container.owner instanceof Hero
|
||||
&& ((Hero) container.owner).hasTalent(Talent.LIGHT_CLOAK)){
|
||||
activate((Hero) container.owner);
|
||||
}
|
||||
return true;
|
||||
} else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetach() {
|
||||
if (passiveBuff != null){
|
||||
passiveBuff.detach();
|
||||
passiveBuff = null;
|
||||
|
||||
if (activeBuff != null){
|
||||
activeBuff.detach();
|
||||
activeBuff = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ArtifactBuff passiveBuff() {
|
||||
return new cloakRecharge();
|
||||
}
|
||||
|
||||
//FIXME errors with this!
|
||||
@Override
|
||||
protected ArtifactBuff activeBuff( ) {
|
||||
return new cloakStealth();
|
||||
|
@ -190,7 +224,11 @@ public class CloakOfShadows extends Artifact {
|
|||
if (level() > 7) missing += 5*(level() - 7)/3f;
|
||||
float turnsToCharge = (45 - missing);
|
||||
turnsToCharge /= RingOfEnergy.artifactChargeMultiplier(target);
|
||||
partialCharge += (1f / turnsToCharge);
|
||||
float chargeToGain = (1f / turnsToCharge);
|
||||
if (!isEquipped(Dungeon.hero)){
|
||||
chargeToGain *= 0.1f*Dungeon.hero.pointsInTalent(Talent.LIGHT_CLOAK);
|
||||
}
|
||||
partialCharge += chargeToGain;
|
||||
}
|
||||
|
||||
if (partialCharge >= 1) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user