v2.4.0: redesigned the cached rations talent
This commit is contained in:
@@ -744,7 +744,7 @@ actors.hero.talent.longrange_warp.desc=_+1:_ The Mage can now warp between floor
|
||||
|
||||
#rogue
|
||||
actors.hero.talent.cached_rations.title=cached rations
|
||||
actors.hero.talent.cached_rations.desc=_+1:_ The Rogue can find _4 small rations_ placed in chests while he explores the earlier stages of the dungeon.\n\n_+2:_ The Rogue can find _6 small rations_ placed in chests while he explores the earlier stages of the dungeon.
|
||||
actors.hero.talent.cached_rations.desc=_+1:_ The Rogue can find _2 supply rations_ placed in chests while he explores the next few floors of the dungeon.\n\n_+2:_ The Rogue can find _3 supply rations_ placed in chests while he explores the next few floors of the dungeon.\n\nSupply rations are eaten quickly, restore a moderate amount of satiety, heal 5 hp, and restore 1 charge to the cloak of shadows.
|
||||
actors.hero.talent.thiefs_intuition.title=thief's intuition
|
||||
actors.hero.talent.thiefs_intuition.desc=_+1:_ The Rogue identifies rings _2x faster_, and identifies the type of a ring _when he equips it_.\n\n_+2:_ The Rogue identifies rings _when he equips them_, and identifies the type of a ring _when he picks it up_.
|
||||
actors.hero.talent.sucker_punch.title=sucker punch
|
||||
@@ -753,7 +753,7 @@ actors.hero.talent.protective_shadows.title=protective shadows
|
||||
actors.hero.talent.protective_shadows.desc=_+1:_ The Rogue gains one shielding _every other turn_ he is invisible, _to a max of 3_.\n\n_+2:_ The Rogue gains one shielding _every turn_ he is invisible, _to a max of 5_.
|
||||
|
||||
actors.hero.talent.mystical_meal.title=mystical meal
|
||||
actors.hero.talent.mystical_meal.desc=_+1:_ Eating food takes the Rogue 1 turn and grants him _3 turns of artifact recharging_.\n\n_+2:_ Eating food takes the Rogue 1 turn and grants him _5 turns of artifact recharging_.\n\nThis talent cannot be used to let the horn of plenty recharge itself.
|
||||
actors.hero.talent.mystical_meal.desc=_+1:_ Eating food takes the Rogue 1 turn (supply rations are eaten instantly) and grants him _3 turns of artifact recharging_.\n\n_+2:_ Eating food takes the Rogue 1 turn (supply rations are eaten instantly) and grants him _5 turns of artifact recharging_.\n\nThis talent cannot be used to let the horn of plenty recharge itself.
|
||||
actors.hero.talent.inscribed_stealth.title=inscribed stealth
|
||||
actors.hero.talent.inscribed_stealth.desc=_+1:_ The Rogue gains _3 turns_ of invisibility after reading a scroll.\n\n_+2:_ The Rogue gains _5 turns_ of invisibility after reading a scroll.\n\nThe invisibility duration is doubled when reading a scroll of upgrade, transmutation, enchantment, or metamorphosis.
|
||||
actors.hero.talent.wide_search.title=wide search
|
||||
@@ -807,7 +807,7 @@ actors.hero.talent.perfect_copy.desc=_+1:_ The shadow clone gains _10%_ of the h
|
||||
|
||||
#huntress
|
||||
actors.hero.talent.natures_bounty.title=nature's bounty
|
||||
actors.hero.talent.natures_bounty.desc=_+1:_ The Huntress can find _4 berries_ hidden in tall grass as she explores the earlier stages of the dungeon.\n\n_+2:_ The Huntress can find _6 berries_ hidden in tall grass as she explores the earlier stages of the dungeon.
|
||||
actors.hero.talent.natures_bounty.desc=_+1:_ The Huntress can find _4 berries_ hidden in tall grass as she explores the next few floors of the dungeon.\n\n_+2:_ The Huntress can find _6 berries_ hidden in tall grass as she explores the next few floors of the dungeon\n\nBerries are eaten quickly, restore a small amount of satiety, and might contain a usable seed.
|
||||
actors.hero.talent.survivalists_intuition.title=survivalist's intuition
|
||||
actors.hero.talent.survivalists_intuition.desc=_+1:_ The Huntress identifies all equipment _1.75x faster_.\n\n_+2:_ The Huntress identifies all equipment _2.5x faster_.
|
||||
actors.hero.talent.followup_strike.title=followup strike
|
||||
|
||||
@@ -606,6 +606,9 @@ items.food.stewedmeat.name=stewed meat
|
||||
items.food.stewedmeat.eat_msg=That food tasted ok.
|
||||
items.food.stewedmeat.desc=Stewing the meat has cleansed it of any disease or parasites. It should be safe to eat.
|
||||
|
||||
items.food.supplyration.name=supply ration
|
||||
items.food.supplyration.desc=This ration was left in the dungeon by and for members of the thieves guild. It's specifically designed to be eaten on the go, and aid with general skullduggery.\n\nWhile it doesn't fill you up as much as a regular ration, it can be eaten quickly, provides a little direct healing, and will restore a charge to the Rogue's cloak of shadows.
|
||||
|
||||
|
||||
|
||||
##journal items
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@@ -188,8 +188,8 @@ public class CloakOfShadows extends Artifact {
|
||||
}
|
||||
}
|
||||
|
||||
public void overCharge(int amount){
|
||||
charge = Math.min(charge+amount, chargeCap+amount);
|
||||
public void directCharge(int amount){
|
||||
charge = Math.min(charge+amount, chargeCap);
|
||||
updateQuickslot();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2015 Oleg Dolya
|
||||
*
|
||||
* Shattered Pixel Dungeon
|
||||
* Copyright (C) 2014-2024 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.items.food;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
|
||||
public class SupplyRation extends Food {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.SUPPLY_RATION;
|
||||
energy = 2*Hunger.HUNGRY/3f; //200 food value
|
||||
|
||||
bones = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float eatingTime(){
|
||||
if (Dungeon.hero.hasTalent(Talent.IRON_STOMACH)
|
||||
|| Dungeon.hero.hasTalent(Talent.ENERGIZING_MEAL)
|
||||
|| Dungeon.hero.hasTalent(Talent.MYSTICAL_MEAL)
|
||||
|| Dungeon.hero.hasTalent(Talent.INVIGORATING_MEAL)
|
||||
|| Dungeon.hero.hasTalent(Talent.FOCUSED_MEAL)){
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void satisfy(Hero hero) {
|
||||
super.satisfy(hero);
|
||||
|
||||
hero.HP = Math.min(hero.HP + 5, hero.HT);
|
||||
hero.sprite.showStatusWithIcon( CharSprite.POSITIVE, "5", FloatingText.HEALING );
|
||||
|
||||
CloakOfShadows cloak = hero.belongings.getItem(CloakOfShadows.class);
|
||||
if (cloak != null) {
|
||||
cloak.directCharge(1);
|
||||
ScrollOfRecharging.charge(hero);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return 10 * quantity;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -42,7 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Torch;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.SmallRation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.SupplyRation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.journal.DocumentPage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.journal.GuidePage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.journal.RegionLorePage;
|
||||
@@ -483,11 +483,14 @@ public abstract class RegularLevel extends Level {
|
||||
}
|
||||
Random.popGenerator();
|
||||
|
||||
//cached rations try to drop in a special room on floors 2/3/4/6/7/8, to a max of 4/6
|
||||
//cached rations try to drop in a special room on floors 2/4/7, to a max of 2/3
|
||||
//we incremented dropped by 2 for compatibility with pre-v2.4 saves (when the talent dropped 4/6 items)
|
||||
Random.pushGenerator( Random.Long() );
|
||||
if (Dungeon.hero.hasTalent(Talent.CACHED_RATIONS)){
|
||||
Talent.CachedRationsDropped dropped = Buff.affect(Dungeon.hero, Talent.CachedRationsDropped.class);
|
||||
if (dropped.count() < 2 + 2*Dungeon.hero.pointsInTalent(Talent.CACHED_RATIONS)){
|
||||
int targetFloor = (int)(2 + dropped.count());
|
||||
if (dropped.count() > 4) targetFloor++;
|
||||
if (Dungeon.depth >= targetFloor && dropped.count() < 2 + 2*Dungeon.hero.pointsInTalent(Talent.CACHED_RATIONS)){
|
||||
int cell;
|
||||
int tries = 100;
|
||||
boolean valid;
|
||||
@@ -504,8 +507,8 @@ public abstract class RegularLevel extends Level {
|
||||
map[cell] = Terrain.GRASS;
|
||||
losBlocking[cell] = false;
|
||||
}
|
||||
drop(new SmallRation(), cell).type = Heap.Type.CHEST;
|
||||
dropped.countUp(1);
|
||||
drop(new SupplyRation(), cell).type = Heap.Type.CHEST;
|
||||
dropped.countUp(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -654,31 +654,33 @@ public class ItemSpriteSheet {
|
||||
}
|
||||
|
||||
private static final int FOOD = xy(1, 28); //16 slots
|
||||
public static final int MEAT = FOOD+0;
|
||||
public static final int STEAK = FOOD+1;
|
||||
public static final int STEWED = FOOD+2;
|
||||
public static final int OVERPRICED = FOOD+3;
|
||||
public static final int CARPACCIO = FOOD+4;
|
||||
public static final int RATION = FOOD+5;
|
||||
public static final int PASTY = FOOD+6;
|
||||
public static final int MEAT_PIE = FOOD+7;
|
||||
public static final int BLANDFRUIT = FOOD+8;
|
||||
public static final int BLAND_CHUNKS= FOOD+9;
|
||||
public static final int BERRY = FOOD+10;
|
||||
public static final int PHANTOM_MEAT= FOOD+11;
|
||||
public static final int MEAT = FOOD+0;
|
||||
public static final int STEAK = FOOD+1;
|
||||
public static final int STEWED = FOOD+2;
|
||||
public static final int OVERPRICED = FOOD+3;
|
||||
public static final int CARPACCIO = FOOD+4;
|
||||
public static final int RATION = FOOD+5;
|
||||
public static final int PASTY = FOOD+6;
|
||||
public static final int MEAT_PIE = FOOD+7;
|
||||
public static final int BLANDFRUIT = FOOD+8;
|
||||
public static final int BLAND_CHUNKS = FOOD+9;
|
||||
public static final int BERRY = FOOD+10;
|
||||
public static final int PHANTOM_MEAT = FOOD+11;
|
||||
public static final int SUPPLY_RATION = FOOD+12;
|
||||
static{
|
||||
assignItemRect(MEAT, 15, 11);
|
||||
assignItemRect(STEAK, 15, 11);
|
||||
assignItemRect(STEWED, 15, 11);
|
||||
assignItemRect(OVERPRICED, 14, 11);
|
||||
assignItemRect(CARPACCIO, 15, 11);
|
||||
assignItemRect(RATION, 16, 12);
|
||||
assignItemRect(PASTY, 16, 11);
|
||||
assignItemRect(MEAT_PIE, 16, 12);
|
||||
assignItemRect(BLANDFRUIT, 9, 12);
|
||||
assignItemRect(BLAND_CHUNKS,14, 6);
|
||||
assignItemRect(BERRY, 9, 11);
|
||||
assignItemRect(PHANTOM_MEAT,15, 11);
|
||||
assignItemRect(MEAT, 15, 11);
|
||||
assignItemRect(STEAK, 15, 11);
|
||||
assignItemRect(STEWED, 15, 11);
|
||||
assignItemRect(OVERPRICED, 14, 11);
|
||||
assignItemRect(CARPACCIO, 15, 11);
|
||||
assignItemRect(RATION, 16, 12);
|
||||
assignItemRect(PASTY, 16, 11);
|
||||
assignItemRect(MEAT_PIE, 16, 12);
|
||||
assignItemRect(BLANDFRUIT, 9, 12);
|
||||
assignItemRect(BLAND_CHUNKS, 14, 6);
|
||||
assignItemRect(BERRY, 9, 11);
|
||||
assignItemRect(PHANTOM_MEAT, 15, 11);
|
||||
assignItemRect(SUPPLY_RATION, 16, 12);
|
||||
}
|
||||
|
||||
private static final int HOLIDAY_FOOD = xy(1, 29); //16 slots
|
||||
|
||||
Reference in New Issue
Block a user