v3.0.0: implemented the light reading talent
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.2 KiB |
@@ -867,7 +867,7 @@ 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 _75% 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 _100% chance to notice_ that the level contains a secret.
|
actors.hero.talent.rogues_foresight.desc=_+1:_ When the Rogue is on a level with a secret room, he has a _75% 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 _100% chance to notice_ that the level contains a secret.
|
||||||
|
|
||||||
actors.hero.talent.light_cloak.title=light cloak
|
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 _25% speed_.\n\n_+2:_ The Rogue can use his cloak of shadows when it is not equipped, but it recharges at _50% speed_.\n\n_+3:_ The Rogue can use his cloak of shadows when it is not equipped, but it recharges at _75% speed_.
|
actors.hero.talent.light_cloak.desc=_+1:_ The Rogue can use his cloak of shadows when it is not equipped, but it recharges at _25% speed_ when unequipped.\n\n_+2:_ The Rogue can use his cloak of shadows when it is not equipped, but it recharges at _50% speed_ when unequipped.\n\n_+3:_ The Rogue can use his cloak of shadows when it is not equipped, but it recharges at _75% speed_ when unequipped.
|
||||||
actors.hero.talent.light_cloak.meta_desc=_If this talent is gained by a different hero_ it will instead increase the charging speed of all artifacts by 7/13/20% at +1/+2/+3.
|
actors.hero.talent.light_cloak.meta_desc=_If this talent is gained by a different hero_ it will instead increase the charging speed of all artifacts by 7/13/20% at +1/+2/+3.
|
||||||
actors.hero.talent.enhanced_rings.title=enhanced rings
|
actors.hero.talent.enhanced_rings.title=enhanced rings
|
||||||
actors.hero.talent.enhanced_rings.desc=_+1:_ When the Rogue uses an artifact, his rings gain +1 upgrade for _3 turns_.\n\n_+2:_ When the Rogue uses an artifact, his rings gain +1 upgrade for _6 turns_.\n\n_+3:_ When the Rogue uses an artifact, his rings gain +1 upgrade for _9 turns_.
|
actors.hero.talent.enhanced_rings.desc=_+1:_ When the Rogue uses an artifact, his rings gain +1 upgrade for _3 turns_.\n\n_+2:_ When the Rogue uses an artifact, his rings gain +1 upgrade for _6 turns_.\n\n_+3:_ When the Rogue uses an artifact, his rings gain +1 upgrade for _9 turns_.
|
||||||
@@ -1058,8 +1058,8 @@ actors.hero.talent.clerict2e.desc=This talent hasn't been implemented yet, it cu
|
|||||||
|
|
||||||
actors.hero.talent.clerict3a.title=Unknown
|
actors.hero.talent.clerict3a.title=Unknown
|
||||||
actors.hero.talent.clerict3a.desc=This talent hasn't been implemented yet, it currently does nothing.
|
actors.hero.talent.clerict3a.desc=This talent hasn't been implemented yet, it currently does nothing.
|
||||||
actors.hero.talent.clerict3b.title=Unknown
|
actors.hero.talent.light_reading.title=Light Reading
|
||||||
actors.hero.talent.clerict3b.desc=This talent hasn't been implemented yet, it currently does nothing.
|
actors.hero.talent.light_reading.desc=_+1:_ The Cleric can use his holy tome when it is not equipped, but it recharges at _25% speed_ when unequipped.\n\n_+2:_ The Cleric can use his holy tome when it is not equipped, but it recharges at _50% speed_ when unequipped.\n\n_+3:_ The Cleric can use his holy tome when it is not equipped, but it recharges at _75% speed_ when unequipped.
|
||||||
|
|
||||||
actors.hero.talent.priestt3a.title=Unknown
|
actors.hero.talent.priestt3a.title=Unknown
|
||||||
actors.hero.talent.priestt3a.desc=This talent hasn't been implemented yet, it currently does nothing.
|
actors.hero.talent.priestt3a.desc=This talent hasn't been implemented yet, it currently does nothing.
|
||||||
|
|||||||
@@ -2481,8 +2481,10 @@ public class Hero extends Char {
|
|||||||
for (Item i : belongings){
|
for (Item i : belongings){
|
||||||
if (i instanceof EquipableItem && i.isEquipped(this)){
|
if (i instanceof EquipableItem && i.isEquipped(this)){
|
||||||
((EquipableItem) i).activate(this);
|
((EquipableItem) i).activate(this);
|
||||||
} else if (i instanceof CloakOfShadows && i.keptThroughLostInventory() && hasTalent(Talent.LIGHT_CLOAK)){
|
} else if (i instanceof CloakOfShadows && i.keptThroughLostInventory() && hasTalent(Talent.LIGHT_CLOAK)) {
|
||||||
((CloakOfShadows) i).activate(this);
|
((CloakOfShadows) i).activate(this);
|
||||||
|
} else if (i instanceof HolyTome && i.keptThroughLostInventory() && hasTalent(Talent.LIGHT_READING)) {
|
||||||
|
((HolyTome) i).activate(this);
|
||||||
} else if (i instanceof Wand && i.keptThroughLostInventory()){
|
} else if (i instanceof Wand && i.keptThroughLostInventory()){
|
||||||
if (holster != null && holster.contains(i)){
|
if (holster != null && holster.contains(i)){
|
||||||
((Wand) i).charge(this, MagicalHolster.HOLSTER_SCALE_FACTOR);
|
((Wand) i).charge(this, MagicalHolster.HOLSTER_SCALE_FACTOR);
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public enum Talent {
|
|||||||
//Cleric T2
|
//Cleric T2
|
||||||
ENLIGHTENING_MEAL(164), RECALL_GLYPH(165), SUNRAY(166), DIVINE_SENSE(167), CLERICT2E(168),
|
ENLIGHTENING_MEAL(164), RECALL_GLYPH(165), SUNRAY(166), DIVINE_SENSE(167), CLERICT2E(168),
|
||||||
//Cleric T3
|
//Cleric T3
|
||||||
CLERICT3A(169, 3), CLERICT3B(170, 3),
|
CLERICT3A(169, 3), LIGHT_READING(170, 3),
|
||||||
//Priest T3
|
//Priest T3
|
||||||
PRIESTT3A(171, 3), PRIESTT3B(172, 3), PRIESTT3C(173, 3),
|
PRIESTT3A(171, 3), PRIESTT3B(172, 3), PRIESTT3C(173, 3),
|
||||||
//Paladin T3
|
//Paladin T3
|
||||||
@@ -540,6 +540,16 @@ public enum Talent {
|
|||||||
Dungeon.level.drop(toGive, hero.pos).sprite.drop();
|
Dungeon.level.drop(toGive, hero.pos).sprite.drop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (talent == LIGHT_READING && hero.heroClass == HeroClass.CLERIC){
|
||||||
|
for (Item item : Dungeon.hero.belongings.backpack){
|
||||||
|
if (item instanceof HolyTome){
|
||||||
|
if (!hero.belongings.lostInventory() || item.keptThroughLostInventory()) {
|
||||||
|
((HolyTome) item).activate(Dungeon.hero);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class CachedRationsDropped extends CounterBuff{{revivePersists = true;}};
|
public static class CachedRationsDropped extends CounterBuff{{revivePersists = true;}};
|
||||||
@@ -954,7 +964,7 @@ public enum Talent {
|
|||||||
Collections.addAll(tierTalents, PRECISE_ASSAULT, DEADLY_FOLLOWUP);
|
Collections.addAll(tierTalents, PRECISE_ASSAULT, DEADLY_FOLLOWUP);
|
||||||
break;
|
break;
|
||||||
case CLERIC:
|
case CLERIC:
|
||||||
Collections.addAll(tierTalents, CLERICT3A, CLERICT3B);
|
Collections.addAll(tierTalents, CLERICT3A, LIGHT_READING);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (Talent talent : tierTalents){
|
for (Talent talent : tierTalents){
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LostInventory;
|
|||||||
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.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.MagicalHolster;
|
import com.shatteredpixel.shatteredpixeldungeon.items.bags.MagicalHolster;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||||
@@ -57,6 +58,8 @@ public class LostBackpack extends Item {
|
|||||||
((EquipableItem) i).activate(hero);
|
((EquipableItem) i).activate(hero);
|
||||||
} else if ( i instanceof CloakOfShadows && hero.hasTalent(Talent.LIGHT_CLOAK)){
|
} else if ( i instanceof CloakOfShadows && hero.hasTalent(Talent.LIGHT_CLOAK)){
|
||||||
((CloakOfShadows) i).activate(hero);
|
((CloakOfShadows) i).activate(hero);
|
||||||
|
} else if ( i instanceof HolyTome && hero.hasTalent(Talent.LIGHT_READING)){
|
||||||
|
((HolyTome) i).activate(hero);
|
||||||
} else if (i instanceof Wand){
|
} else if (i instanceof Wand){
|
||||||
if (holster != null && holster.contains(i)){
|
if (holster != null && holster.contains(i)){
|
||||||
((Wand) i).charge(hero, MagicalHolster.HOLSTER_SCALE_FACTOR);
|
((Wand) i).charge(hero, MagicalHolster.HOLSTER_SCALE_FACTOR);
|
||||||
|
|||||||
@@ -24,8 +24,10 @@ package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||||
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.actors.hero.spells.ClericSpell;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.ClericSpell;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
|
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Catalog;
|
import com.shatteredpixel.shatteredpixeldungeon.journal.Catalog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
@@ -59,7 +61,7 @@ public class HolyTome extends Artifact {
|
|||||||
@Override
|
@Override
|
||||||
public ArrayList<String> actions( Hero hero ) {
|
public ArrayList<String> actions( Hero hero ) {
|
||||||
ArrayList<String> actions = super.actions( hero );
|
ArrayList<String> actions = super.actions( hero );
|
||||||
if (isEquipped( hero )
|
if ((isEquipped( hero ) || hero.hasTalent(Talent.LIGHT_READING))
|
||||||
&& !cursed
|
&& !cursed
|
||||||
&& hero.buff(MagicImmune.class) == null) {
|
&& hero.buff(MagicImmune.class) == null) {
|
||||||
actions.add(AC_CAST);
|
actions.add(AC_CAST);
|
||||||
@@ -76,7 +78,7 @@ public class HolyTome extends Artifact {
|
|||||||
|
|
||||||
if (action.equals(AC_CAST)) {
|
if (action.equals(AC_CAST)) {
|
||||||
|
|
||||||
if (!isEquipped(hero)) GLog.i(Messages.get(Artifact.class, "need_to_equip"));
|
if (!isEquipped(hero) && !hero.hasTalent(Talent.LIGHT_READING)) GLog.i(Messages.get(Artifact.class, "need_to_equip"));
|
||||||
else {
|
else {
|
||||||
|
|
||||||
GameScene.show(new WndClericSpells(this, hero, false));
|
GameScene.show(new WndClericSpells(this, hero, false));
|
||||||
@@ -86,6 +88,40 @@ public class HolyTome extends Artifact {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean doUnequip(Hero hero, boolean collect, boolean single) {
|
||||||
|
if (super.doUnequip(hero, collect, single)){
|
||||||
|
if (collect && hero.hasTalent(Talent.LIGHT_READING)){
|
||||||
|
activate(hero);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean collect( Bag container ) {
|
||||||
|
if (super.collect(container)){
|
||||||
|
if (container.owner instanceof Hero
|
||||||
|
&& passiveBuff == null
|
||||||
|
&& ((Hero) container.owner).hasTalent(Talent.LIGHT_READING)){
|
||||||
|
activate((Hero) container.owner);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDetach() {
|
||||||
|
if (passiveBuff != null){
|
||||||
|
passiveBuff.detach();
|
||||||
|
passiveBuff = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canCast( Hero hero, ClericSpell spell ){
|
public boolean canCast( Hero hero, ClericSpell spell ){
|
||||||
return (charge >= spell.chargeUse(hero) && spell.canCast(hero));
|
return (charge >= spell.chargeUse(hero) && spell.canCast(hero));
|
||||||
}
|
}
|
||||||
@@ -153,6 +189,7 @@ public class HolyTome extends Artifact {
|
|||||||
if (cursed || target.buff(MagicImmune.class) != null) return;
|
if (cursed || target.buff(MagicImmune.class) != null) return;
|
||||||
|
|
||||||
if (charge < chargeCap) {
|
if (charge < chargeCap) {
|
||||||
|
if (!isEquipped(target)) amount *= 0.75f*target.pointsInTalent(Talent.LIGHT_READING)/3f;
|
||||||
partialCharge += 0.25f*amount;
|
partialCharge += 0.25f*amount;
|
||||||
while (partialCharge >= 1f) {
|
while (partialCharge >= 1f) {
|
||||||
charge++;
|
charge++;
|
||||||
@@ -184,6 +221,10 @@ public class HolyTome extends Artifact {
|
|||||||
chargeGain *= 0.67f;
|
chargeGain *= 0.67f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isEquipped(Dungeon.hero)){
|
||||||
|
chargeGain *= 0.75f*Dungeon.hero.pointsInTalent(Talent.LIGHT_READING)/3f;
|
||||||
|
}
|
||||||
|
|
||||||
partialCharge += chargeGain;
|
partialCharge += chargeGain;
|
||||||
|
|
||||||
//charge is in increments of 1/5 max hunger value.
|
//charge is in increments of 1/5 max hunger value.
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
@@ -72,7 +73,8 @@ public class WndQuickBag extends Window {
|
|||||||
}
|
}
|
||||||
if (i instanceof Artifact
|
if (i instanceof Artifact
|
||||||
&& !i.isEquipped(Dungeon.hero)
|
&& !i.isEquipped(Dungeon.hero)
|
||||||
&& (!(i instanceof CloakOfShadows) || !Dungeon.hero.hasTalent(Talent.LIGHT_CLOAK))){
|
&& (!(i instanceof CloakOfShadows) || !Dungeon.hero.hasTalent(Talent.LIGHT_CLOAK))
|
||||||
|
&& (!(i instanceof HolyTome) || !Dungeon.hero.hasTalent(Talent.LIGHT_READING))){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
items.add(i);
|
items.add(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user