Compare commits

..

4 Commits

Author SHA1 Message Date
Storm Dragon 4e453b33db Merge branch 'testing' 2026-03-03 00:37:16 -05:00
Storm Dragon 0281911aa8 Merge branch 'testing' 2026-03-02 23:47:28 -05:00
Storm Dragon e0abd968a5 Merge branch 'testing'
# Conflicts:
#	draugnorak.nvgt
#	lang/af.ini
#	lang/en.ini
#	lang/en.template.ini
#	lang/es.ini
#	scripts/generate_i18n_catalog.py
#	src/i18n.nvgt
2026-03-01 19:22:26 -05:00
Storm Dragon 671d6b7898 Translation updates and submodule sync 2026-02-28 01:03:26 -05:00
39 changed files with 120 additions and 2100 deletions
-10
View File
@@ -16,7 +16,6 @@ sound_pool p(300);
#include "src/enemies/bandit.nvgt"
#include "src/enemies/ground_game.nvgt"
#include "src/enemies/flying_creatures.nvgt"
#include "src/enemies/corpse_worm.nvgt"
#include "src/world/world_drops.nvgt"
#include "src/world/world_snares.nvgt"
#include "src/world/world_fires.nvgt"
@@ -32,7 +31,6 @@ sound_pool p(300);
#include "src/inventory.nvgt"
#include "src/pet_system.nvgt"
#include "src/quest_system.nvgt"
#include "src/goals.nvgt"
#include "src/environment.nvgt"
#include "src/combat.nvgt"
#include "src/fylgja_system.nvgt"
@@ -213,7 +211,6 @@ void run_game() {
init_item_registry();
init_pet_sounds();
init_search_pools();
init_goal_state();
while (true) {
bool game_started = false;
@@ -314,13 +311,11 @@ void run_game() {
update_bandits();
update_boars();
update_flying_creatures();
update_corpse_worms();
update_weapon_range_audio_all();
update_world_drops();
update_pets();
update_blessings();
update_notifications();
update_goal_announcements();
// Fire damage check (only if not jumping)
WorldFire @fire_on_tile = get_fire_at(x);
@@ -381,9 +376,6 @@ void run_game() {
speak_with_history(get_health_report(), true);
}
// Current goal key (G)
check_goal_key();
// Coordinates Key
if (key_pressed(KEY_X)) {
string direction_label = (facing == 1) ? tr("system.direction.east") : tr("system.direction.west");
@@ -631,8 +623,6 @@ void run_game() {
int attack_cooldown = 1000;
if (spear_equipped)
attack_cooldown = 800;
if (great_spear_equipped)
attack_cooldown = GREAT_SPEAR_ATTACK_COOLDOWN_MS;
if (axe_equipped)
attack_cooldown = 1600;
+4 -12
View File
@@ -11,6 +11,10 @@ Explore gather craft defend your base through the day and night cycle
chmod +x draugnorak
```
### Android Note
- Android builds require an external keyboard (USB or Bluetooth)
- Touch controls are not implemented because too many game controls to do this in a good way for playability
## Quick Start
- Move with Left or Right
- Jump with Up
@@ -38,7 +42,6 @@ Some of the first things you will want are a stone knife a spear a stone axe and
- **F** fylgja menu once unlocked
- **Tab** adventure menu outside base once per day
- **H** health
- **G** current goal speaks the next incomplete goal and unspent goal points
- **T** time
- **X** coordinates and terrain
- **1 to 0** quick slots press in Equipment to bind an item to equip or in Inventory to bind a count check
@@ -192,17 +195,6 @@ Pets are optional companions that can fight and retrieve drops
- Bowstrings are crafted from sinew at a fire and used to craft bows
- Storage is separate and accessed in the base Inventory menu when storage exists
## Goals and Mastery
Completing one-time character milestones awards goal points.
- Press **G** to hear your current goal and unspent points.
- Open **P** (Character info) and choose **Goals** for the full menu.
- Spend goal points in **Mastery** to unlock concrete benefits.
Current categories:
- **Crafting Mastery 1** (2 points) crafted basic tools are sturdier.
- **Crafting Mastery 2** (3 points) unlocks the great spear recipe.
- **Crafting Mastery 3** (4 points) great spear reaches 2 tiles but has a slower attack window.
## Saving and Loading
- The game auto saves daily at 6 AM in game time
- Load from the main menu starting a new game prompts if a save exists
-95
View File
@@ -117,7 +117,6 @@ time.event.mountain_discovered='n Bergreeks is in die ooste ontdek!
time.event.invasion_source_mountains=die berge
time.event.invasion_source_new_area=die nuwe area
time.event.invasion_start={enemy_plural} val in vanaf {source}!
time.event.undead_resident_raid=Die dooies onthou waar mense nog leef. {count} ondode inwoners kom.
time.event.zombie_swarm_spotted='n Swerm zombies is gewaar.
time.event.survivor_joins_one='n Oorlewende sluit by jou basis aan.
time.event.survivor_joins_many={count} oorlewendes sluit by jou basis aan.
@@ -463,9 +462,6 @@ crafting.weapons.prompt=Wapens. {option}
crafting.weapons.option.spear=Speer (1 Stok, 1 Rankplant, 1 Klip) [Vereis Mes]
crafting.weapons.option.sling=Slinger (1 Vel, 2 Rankplante)
crafting.weapons.option.bow=Boog (1 Stok, 1 Boogstring)
system.crafting.weapons.option.great_spear=Groot Speer (1 Speer, 1 Blok, 2 Rankplante, 2 Senuwee) [Vereis Handwerk Bemeestering 2]
system.crafting.weapons.crafted.great_spear='n Groot Speer gemaak.
system.crafting.weapons.great_spear.requires_mastery=Groot speer vereis Handwerk Bemeestering 2.
crafting.weapons.crafted.spear='n Speer gemaak.
crafting.weapons.crafted.sling='n Slinger gemaak.
crafting.weapons.crafted.bow='n Boog gemaak.
@@ -627,7 +623,6 @@ msg.096539f23463=Die oorlogstromme slaan! Berei voor vir geveg!
msg.09c28ae8f83b=Klippe
msg.09d016686864=Stal nie gebou nie
msg.0a3bdcef1906=Rietmandjies
msg.0a6e19e37b4d=nuwe doelwit
msg.0a9d6438c818==== Betowerde Melodie ===
msg.0b3d8d5cdca6=- Bereik die basis en vernietig die barrikade
msg.0bcd9af79f2d=woud
@@ -973,93 +968,3 @@ msg.fe2a9d6606e0=draugnorak
msg.feea4a3b0a84==== Eenhoringjag ===
msg.fefc084f67de=D of J - Tweede nota
msg.ff5ac0b6df7b=boë
msg.14941e07fc96=Groot Spere
msg.4fd74919913c=groot speer
msg.f03527f80533=groot spere
system.character.info.goals=Doelwitte: {unspent} onbestee, {earned} verdien
system.character.info.goals_menu=Doelwitte
system.goals.all_complete=Alle huidige doelwitte voltooi. Onbestede doelpunte: {unspent}.
system.goals.completed.entry_many={goal}. {points} doelpunte toegeken.
system.goals.completed.entry_one={goal}. 1 doelpunt toegeken.
system.goals.completed.none=Nog geen doelwitte voltooi nie.
system.goals.completed.prompt=Voltooide doelwitte. {option}
system.goals.current=Huidige doelwit: {goal}. Onbestede doelpunte: {unspent}.
system.goals.new=Nuwe doelwit: {goal} Druk G om jou huidige doelwit te hersien.
system.goals.spend_hint=Om doelpunte te spandeer, druk P vir die karakterkieslys, kies dan Doelwitte en Bemeestering.
system.goals.goal.build_altar.name=Bou 'n altaar.
system.goals.goal.build_firepit.name=Bou 'n vuurput.
system.goals.goal.build_storage.name=Gradeer berging op.
system.goals.goal.complete_quest.name=Voltooi 'n soektog.
system.goals.goal.completed=Doelwit voltooi: {goal}. 1 doelpunt toegeken.
system.goals.goal.craft_knife.name=Maak 'n mes.
system.goals.goal.craft_spear.name=Maak 'n speer.
system.goals.goal.engrave_rune.name=Grafeer 'n rune.
system.goals.goal.craft_axe.name=Maak 'n klipbyl.
system.goals.goal.chop_tree_1.name=Kap 'n boom af.
system.goals.goal.chop_tree_4.name=Kap 4 bome af.
system.goals.goal.chop_tree_9.name=Kap 9 bome af.
system.goals.goal.chop_tree_27.name=Kap 27 bome af.
system.goals.goal.craft_snare.name=Maak 'n strik.
system.goals.goal.catch_snare.name=Vang iets in 'n strik.
system.goals.goal.butcher_game.name=Slag wild.
system.goals.goal.craft_sling.name=Maak 'n slinger.
system.goals.goal.craft_bow.name=Craft a bow.
system.goals.goal.build_herb_garden.name=Build an herb garden.
system.goals.goal.upgrade_storage_2.name=Fully upgrade storage.
system.goals.goal.build_pasture.name=Build a pasture.
system.goals.goal.build_stable.name=Build a stable.
system.goals.goal.craft_quiver.name=Craft a quiver.
system.goals.goal.craft_arrows.name=Craft arrows.
system.goals.goal.survive_day_9.name=Survive until day 9.
system.goals.goal.tame_pet.name=Tame a pet.
system.goals.goal.reinforce_barricade.name=Reinforce the barricade.
system.goals.goal.light_fire.name=Steek 'n vuur aan.
system.goals.goal.unknown.name=Onbekende doelwit.
system.goals.goal.win_adventure.name=Wen 'n avontuur.
system.goals.menu.completed=Voltooide doelwitte
system.goals.menu.current=Huidige doelwit: {goal}
system.goals.menu.current_done=Huidige doelwit: alles voltooi
system.goals.menu.earned=Totale doelpunte verdien: {earned}
system.goals.menu.earned_solo=Totale doelpunte verdien: {earned}
system.goals.menu.mastery=Bemeestering
system.goals.menu.prompt=Doelwitte. {option}
system.goals.menu.unspent=Onbestede doelpunte: {unspent}
system.goals.menu.unspent_solo=Onbestede doelpunte: {unspent}
system.goals.reward.many=Beloning: {count} doelpunte.
system.goals.reward.one=Beloning: 1 doelpunt.
system.goals.mastery.unknown.name=Onbekende bemeestering
system.goals.mastery.unlocked=Ontgrendel {unlock}.
system.goals.mastery.prompt=Bemeestering. {option}
system.goals.mastery.crafting.level1=Gemaakte basiese gereedskap is stewiger.
system.goals.mastery.crafting.level2=Ontsluit groot speer resep.
system.goals.mastery.crafting.level3=Groot speer bereik 2 teëls maar het 'n stadiger aanvalsvenster.
system.goals.mastery.crafting.level4=Persoonlike gereedskap, wapens en klere slyt nie meer uit nie.
system.goals.mastery.crafting.name=Handwerk Bemeestering
system.goals.mastery.leadership.level1=Inwoners is versigtig en breek minder gereedskap en wapens.
system.goals.mastery.leadership.level2=Inwoners is georganiseer en slaag meer gereeld met werk.
system.goals.mastery.leadership.level3=Inwoners tree vinniger op tydens verdediging en dringende werk.
system.goals.mastery.leadership.level4=Inwoners rantsoeneer kos en bly werk na nagval.
system.goals.mastery.leadership.name=Leierskap Bemeestering
system.goals.mastery.taming.level1=Troeteldiere kan gevalle items haal.
system.goals.mastery.taming.level2=Troeteldiere is sterker en kry een maksimum gesondheid.
system.goals.mastery.taming.level3=Troeteldiere herstel vinniger van bewusteloosheid.
system.goals.mastery.taming.level4=Gebonde troeteldiere benodig nie meer kos nie en bly ten volle lojaal.
system.goals.mastery.taming.name=Tem Bemeestering
system.goals.mastery.unknown.name=Onbekende bemeestering
system.goals.mastery.unknown_level=Onbekende ontgrendeling
system.goals.mastery.maxed={category}: maks bereik
system.goals.mastery.summary={category} vlak {level} van {max}. Volgende koste: {cost} doelpunte.
system.goals.mastery.unlocked=Ontgrendel {unlock}.
system.goals.mastery.confirm=Spandeer {cost} doelpunte om {unlock} te ontgrendel?
system.goals.mastery.already_maxed={category} is reeds maks.
system.goals.mastery.not_enough_points=Benodig {cost} doelpunte. Jy het {unspent}.
system.goals.mastery.spend_failed=Kon nie die doelpunt spandeer nie.
system.goals.menu.back=Terug
msg.06c9fefbd6d7=lykwurm sterf
msg.c6d56016b910=lykwurm
msg.d2e0d305bc2b='n Swak kruipende vyand wat buite die basis begin verskyn na dag 1.
+22 -117
View File
@@ -71,7 +71,6 @@ time.event.mountain_discovered=A mountain range has been discovered to the east!
time.event.invasion_source_mountains=the mountains
time.event.invasion_source_new_area=the new area
time.event.invasion_start={enemy_plural} are invading from {source}!
time.event.undead_resident_raid=The dead remember where people still live. {count} undead residents are coming.
time.event.zombie_swarm_spotted=A swarm of zombies has been spotted.
time.event.survivor_joins_one=A survivor joins your base.
time.event.survivor_joins_many={count} survivors join your base.
@@ -230,88 +229,8 @@ character.info.speed=Speed {status}
character.info.pet=Pet {pet}, health {health} of {max_health}, loyalty {loyalty} of {max_loyalty}
character.info.pet_knocked_out=Knocked out for {hours} {hour_label}.
character.info.pet_none=No pet.
character.info.goals=Goals: {unspent} unspent, {earned} earned
character.info.goals_menu=Goals
character.word.hour=hour
character.word.hours=hours
goals.new=New goal: {goal} Press G to review your current goal.
goals.current=Current goal: {goal}. Unspent goal points: {unspent}.
goals.all_complete=All current goals complete. Unspent goal points: {unspent}.
goals.spend_hint=To spend goal points, press P for the character menu, then choose Goals and Mastery.
goals.goal.completed=Goal complete: {goal}. Awarded 1 goal point.
goals.reward.one=Reward: 1 goal point.
goals.reward.many=Reward: {count} goal points.
goals.goal.craft_knife.name=Craft a knife.
goals.goal.craft_spear.name=Craft a spear.
goals.goal.build_firepit.name=Build a firepit.
goals.goal.light_fire.name=Light a fire.
goals.goal.build_storage.name=Upgrade storage.
goals.goal.build_altar.name=Build an altar.
goals.goal.complete_quest.name=Complete a quest.
goals.goal.win_adventure.name=Win an adventure.
goals.goal.engrave_rune.name=Engrave a rune.
goals.goal.craft_axe.name=Craft a stone axe.
goals.goal.chop_tree_1.name=Chop down a tree.
goals.goal.chop_tree_4.name=Chop down 4 trees.
goals.goal.chop_tree_9.name=Chop down 9 trees.
goals.goal.chop_tree_27.name=Chop down 27 trees.
goals.goal.craft_snare.name=Craft a snare.
goals.goal.catch_snare.name=Catch something in a snare.
goals.goal.butcher_game.name=Butcher game.
goals.goal.craft_sling.name=Craft a sling.
goals.goal.craft_bow.name=Craft a bow.
goals.goal.build_herb_garden.name=Build an herb garden.
goals.goal.upgrade_storage_2.name=Fully upgrade storage.
goals.goal.build_pasture.name=Build a pasture.
goals.goal.build_stable.name=Build a stable.
goals.goal.craft_quiver.name=Craft a quiver.
goals.goal.craft_arrows.name=Craft arrows.
goals.goal.survive_day_9.name=Survive until day 9.
goals.goal.tame_pet.name=Tame a pet.
goals.goal.reinforce_barricade.name=Reinforce the barricade.
goals.goal.unknown.name=Unknown goal.
goals.menu.prompt=Goals. {option}
goals.menu.current=Current goal: {goal}
goals.menu.current_done=Current goal: all complete
goals.menu.completed=Completed goals
goals.menu.mastery=Mastery
goals.menu.unspent=Unspent goal points: {unspent}
goals.menu.unspent_solo=Unspent goal points: {unspent}
goals.menu.earned=Total goal points earned: {earned}
goals.menu.earned_solo=Total goal points earned: {earned}
goals.menu.back=Back
goals.completed.prompt=Completed goals. {option}
goals.completed.none=No goals completed yet.
goals.completed.entry_one={goal}. Awarded 1 goal point.
goals.completed.entry_many={goal}. Awarded {points} goal points.
goals.mastery.prompt=Mastery. {option}
goals.mastery.crafting.name=Crafting Mastery
goals.mastery.leadership.name=Leadership Mastery
goals.mastery.taming.name=Taming Mastery
goals.mastery.unknown.name=Unknown mastery
goals.mastery.unknown_level=Unknown unlock
goals.mastery.maxed={category}: maxed out
goals.mastery.summary={category} level {level} of {max}. Next cost: {cost} goal points.
goals.mastery.unlocked=Unlocked {unlock}.
goals.mastery.confirm=Spend {cost} goal points to unlock {unlock}?
goals.mastery.already_maxed={category} is already maxed out.
goals.mastery.not_enough_points=Need {cost} goal points. You have {unspent}.
goals.mastery.spend_failed=Could not spend the goal point.
goals.mastery.crafting.level1=Crafted basic tools are sturdier.
goals.mastery.crafting.level2=Unlock great spear recipe.
goals.mastery.crafting.level3=Great spear reaches 2 tiles but has a slower attack window.
goals.mastery.crafting.level4=Personal tools, weapons, and clothing no longer wear out.
goals.mastery.leadership.level1=Residents are careful and break fewer tools and weapons.
goals.mastery.leadership.level2=Residents are organized and succeed at work more often.
goals.mastery.leadership.level3=Residents act faster during defense and urgent work.
goals.mastery.leadership.level4=Residents ration food and keep working after nightfall.
goals.mastery.taming.level1=Pets can retrieve dropped items.
goals.mastery.taming.level2=Pets are heartier and gain one maximum health.
goals.mastery.taming.level3=Pets recover from knockout faster.
goals.mastery.taming.level4=Bonded pets no longer require food and stay fully loyal.
crafting.weapons.option.great_spear=Great Spear (1 Spear, 1 Log, 2 Vines, 2 Sinew) [Requires Crafting Mastery 2]
crafting.weapons.crafted.great_spear=Crafted a Great Spear.
crafting.weapons.great_spear.requires_mastery=Great spear requires Crafting Mastery 2.
pet.default_name=pet
pet.returned=A {pet} returns to you.
pet.knocked_out=Your {pet} has been knocked out.
@@ -703,7 +622,7 @@ msg.03268c7d7239=backpacks
msg.03976920927e=rope
; src/item_registry.nvgt:item_display:small_game
msg.0406529811c7=Small Game
; draugnorak.nvgt:656:ui_info_box[2]
; draugnorak.nvgt:608:ui_info_box[2]
msg.041d8413712d=A crash log was written to your save data folder.
; seed:learn_sounds_label:sounds/enemies/vampyr1.ogg
msg.04a8916a9494=vampyr1
@@ -711,8 +630,6 @@ msg.04a8916a9494=vampyr1
msg.0532db2192fa=incense
; src/bosses/bandit_hideout.nvgt:787:insert_last[0]
msg.066723a92e94==== Victory Rewards ===
; seed:learn_sounds_label:sounds/enemies/corpse_worm_dies.ogg
msg.06c9fefbd6d7=corpse worm dies
; src/quests/enchanted_melody_game.nvgt:36:insert_last[0]
msg.07e9ab246cdd=After closing this screen, you can practice the notes.
; src/item_registry.nvgt:item_plural:sinew
@@ -725,8 +642,6 @@ msg.09c28ae8f83b=Stones
msg.09d016686864=Stable not built
; src/item_registry.nvgt:item_display:reed_baskets
msg.0a3bdcef1906=Reed Baskets
; seed:learn_sounds_label:sounds/new_goal.ogg
msg.0a6e19e37b4d=new goal
; src/quests/enchanted_melody_game.nvgt:26:insert_last[0]
msg.0a9d6438c818==== Enchanted Melody ===
; src/bosses/bandit_hideout.nvgt:305:insert_last[0]
@@ -753,8 +668,6 @@ msg.126dd3b70a5c=Logs
msg.136e4cb03bd5=Failed to save file
; src/item_registry.nvgt:item_plural:quivers
msg.145ba8a7a0f2=quivers
; src/item_registry.nvgt:item_display:great_spears
msg.14941e07fc96=Great Spears
; src/bosses/bandit_hideout.nvgt:860:insert_last[0]
msg.14f5f5ff4f76=No survivors were found.
; seed:learn_sounds_label:sounds/game/game_falls.ogg
@@ -773,7 +686,7 @@ msg.18b837bb6f43=bat1
msg.18c77e824a2a=yeti dies
; seed:learn_sounds_label:sounds/enemies/bandit_dies.ogg
msg.1a853cbfbc36=bandit dies
; src/sound_settings.nvgt:50:learn_sounds_add_description[1]
; src/sound_settings.nvgt:48:learn_sounds_add_description[1]
msg.1bb8ef2886a3=Basic undead.
; seed:learn_sounds_label:sounds/nature/night.ogg
msg.1be2a44cb53d=night
@@ -915,7 +828,7 @@ msg.444d4678962b=falling
msg.4537c16badd9=bow fire
; src/item_registry.nvgt:item_plural:snares
msg.455b11a16eb7=snares
; src/sound_settings.nvgt:40:learn_sounds_add_description[1]
; src/sound_settings.nvgt:38:learn_sounds_add_description[1]
msg.4671b16b0398=Not quite a zombie nor a vampyr. These undead remember they used to have a home, and maybe there's food there...
; seed:learn_sounds_label:sounds/terrain/draugrhaugr_step.ogg
msg.46fcdd91c99e=draugrhaugr step
@@ -945,21 +858,19 @@ msg.4f773e9d5bf0=Bows
msg.4f7f358cd341=goose
; src/item_registry.nvgt:item_display:clay_pots
msg.4f99d3d5b638=Clay Pots
; src/item_registry.nvgt:item_singular:great_spear
msg.4fd74919913c=great spear
; seed:learn_sounds_label:sounds/game/turkey.ogg
msg.5009c8e190ee=turkey
; src/quests/skeletal_bard_game.nvgt:51:insert_last[0]
msg.508e8bc0cc57=- Use Up/Down to change the number
; seed:learn_sounds_label:sounds/weapons/sling_low_range.ogg
msg.5123c22ce6a5=sling low range
; draugnorak.nvgt:113:insert_last[0]
; draugnorak.nvgt:81:insert_last[0]
msg.528fb1c4e5fb=New Game
; seed:learn_sounds_label:sounds/quests/squish.ogg
msg.5460f2e3c43e=squish
; seed:learn_sounds_label:sounds/actions/fishpole_break.ogg
msg.546330ee64db=fishpole break
; draugnorak.nvgt:656:ui_info_box[0]
; draugnorak.nvgt:608:ui_info_box[0]
msg.54fc2d657ed6=Draugnorak
; seed:learn_sounds_label:sounds/enemies/vampyr3.ogg
msg.55748cf43121=vampyr3
@@ -987,7 +898,7 @@ msg.5cac31311668=Pasture is full. No livestock were recovered.
msg.5cc7429297c8=that can be destroyed with an axe.
; seed:learn_sounds_label:sounds/actions/cast_strength.ogg
msg.5dfc869b7588=cast strength
; src/time_system.nvgt:861:notify[0]
; src/time_system.nvgt:793:notify[0]
msg.5ea84b1201bb={arg1} favor grants you the eyes of an eagle.
; seed:learn_sounds_label:sounds/menu/menu_select.ogg
; seed:learn_sounds_label:sounds/menu.bak/menu_select.ogg
@@ -1071,8 +982,8 @@ msg.7e83de91b4a2=bandit female dies
msg.7f7e3bbf8864=An enemy is no longer in range of your currently wielded weapon.
; src/item_registry.nvgt:item_display:backpacks
msg.7fae743693f4=Backpacks
; draugnorak.nvgt:232:ui_info_box[1]
; draugnorak.nvgt:246:ui_info_box[1]
; draugnorak.nvgt:194:ui_info_box[1]
; draugnorak.nvgt:208:ui_info_box[1]
msg.802aa6576577=Load Game
; src/item_registry.nvgt:item_plural:sticks
msg.803e4c41bbd2=sticks
@@ -1081,12 +992,12 @@ msg.803e4c41bbd2=sticks
msg.80655da8d80a=tree
; src/item_registry.nvgt:item_plural:canoes
msg.806baaf8e039=canoes
; src/time_system.nvgt:843:notify[0]
; src/time_system.nvgt:853:notify[0]
; src/time_system.nvgt:775:notify[0]
; src/time_system.nvgt:785:notify[0]
msg.81df04a81e24={arg1} favor shines upon you. {arg2}
; src/quests/catch_the_boomerang_game.nvgt:22:insert_last[0]
msg.823be948275f=- Better timing earns more points (up to 4)
; src/sound_settings.nvgt:43:learn_sounds_add_description[1]
; src/sound_settings.nvgt:41:learn_sounds_add_description[1]
msg.83865f248682=More powerful undead. They do not lose track of you when you are in the base.
; seed:learn_sounds_label:sounds/nature/wind_high.ogg
msg.8443de859917=wind high
@@ -1108,7 +1019,7 @@ msg.86e257c3efcb=Oldest notification. {arg1}
msg.87383ce4344d=Bowstrings
; src/item_registry.nvgt:item_plural:ropes
msg.87cdb5c91437=ropes
; src/time_system.nvgt:857:notify[0]
; src/time_system.nvgt:789:notify[0]
msg.8818f1d55166={arg1} radiance fills residents with purpose.
; src/quests/bat_invasion_game.nvgt:7:insert_last[0]
msg.88749dbbbf09==== Bat Invasion ===
@@ -1126,7 +1037,7 @@ msg.8f993ac20023=You enter a narrow mountain pass. A massive Unicorn blocks your
msg.917ee46db0cd=bee
; seed:learn_sounds_label:sounds/player_male_damage.ogg
msg.924e0eb6b6f1=player male damage
; src/time_system.nvgt:848:notify[0]
; src/time_system.nvgt:780:notify[0]
msg.9281d2fe5f08={arg1} favor shines upon you. You feel swift for a while.
; seed:learn_sounds_label:sounds/actions/climb_rope.ogg
msg.92abc6d6953f=climb rope
@@ -1177,9 +1088,9 @@ msg.a3cb738850fa=wolf
msg.a3f2439ef01a=skin hat
; seed:learn_sounds_label:sounds/quests/bone1.ogg
msg.a56be51786dc=bone1
; src/sound_settings.nvgt:43:learn_sounds_add_description[1]
; src/sound_settings.nvgt:44:learn_sounds_add_description[1]
; src/sound_settings.nvgt:45:learn_sounds_add_description[1]
; src/sound_settings.nvgt:46:learn_sounds_add_description[1]
; src/sound_settings.nvgt:47:learn_sounds_add_description[1]
msg.a570b024087d=Ever hungry, they feed upon your residents.
; src/quests/escape_from_hel_game.nvgt:15:insert_last[0]
msg.a641f39a6317=- The run ends when you fall into a grave
@@ -1255,7 +1166,7 @@ msg.c01409b3a728=When casting release control when over water. When catching rel
msg.c05feaca7269=No items were recovered.
; src/item_registry.nvgt:item_singular:snare
msg.c1104d82c0bd=snare
; src/sound_settings.nvgt:39:learn_sounds_add_description[1]
; src/sound_settings.nvgt:37:learn_sounds_add_description[1]
msg.c48d642737b2=Inhabits mountainous regions.
; src/item_registry.nvgt:item_display:smoked_fish
msg.c4f7e9c21601=Smoked Fish
@@ -1265,8 +1176,6 @@ msg.c50641e24962=Your cast missed the water and landed in nearby foliage where i
msg.c52888225c69=fall
; seed:learn_sounds_label:sounds/enemies/bandit1.ogg
msg.c65e5dfc5ba7=bandit1
; seed:learn_sounds_label:sounds/enemies/corpse_worm.ogg
msg.c6d56016b910=corpse worm
; src/bosses/bandit_hideout.nvgt:789:insert_last[0]
msg.c72b7844929d=Bandits defeated: {arg1}.
; seed:learn_sounds_label:sounds/terrain/stream.ogg
@@ -1298,7 +1207,7 @@ msg.ce3897c6b3be={arg1}: {arg2}
; seed:learn_sounds_label:sounds/items/item_breaks.ogg
msg.ce5aeca95fb9=item breaks
; src/i18n.nvgt:677:speak_with_history[0]
; src/pet_system.nvgt:936:speak_with_history[0]
; src/pet_system.nvgt:926:speak_with_history[0]
; src/save_system.nvgt:344:speak_with_history[0]
msg.cea88b214070={arg1} {arg2}
; seed:manual
@@ -1307,13 +1216,11 @@ msg.cfe2650b4c6e=Found a stone.
msg.d04a59a6a71b=Controls: LEFT/RIGHT to move, UP to jump, CTRL to attack, ESC to flee
; src/item_registry.nvgt:item_singular:skin
msg.d0cb2acd0739=skin
; src/sound_settings.nvgt:37:learn_sounds_add_description[1]
msg.d2e0d305bc2b=A weak crawling enemy that starts appearing outside the base after day 1.
; seed:learn_sounds_label:sounds/enemies/enemy_falls.ogg
msg.d34b6217ea75=enemy falls
; src/item_registry.nvgt:item_display:skin_gloves
msg.d373510877fd=Skin Gloves
; draugnorak.nvgt:656:ui_info_box[1]
; draugnorak.nvgt:608:ui_info_box[1]
; seed:manual
msg.d39008c4a392=Unhandled exception
; src/item_registry.nvgt:item_singular:backpack
@@ -1336,7 +1243,7 @@ msg.da0b5a461d98=F or K - First note (lowest pitch)
msg.da11dc5e090c=sling hit
; seed:learn_sounds_label:sounds/enemies/vampyr_dies.ogg
msg.da93fb9992a3=vampyr dies
; src/sound_settings.nvgt:49:learn_sounds_add_description[1]
; src/sound_settings.nvgt:47:learn_sounds_add_description[1]
msg.dadd68431e60=Inhabits snowy regions.
; seed:learn_sounds_label:sounds/enemies/exit_range.ogg
msg.db2a8514a0fc=exit range
@@ -1406,7 +1313,7 @@ msg.e7409fcb54bc=feed fire
msg.e8002c169040=wood
; src/quests/escape_from_hel_game.nvgt:13:insert_last[0]
msg.e8216720d30b=- Press SPACE to jump over graves
; draugnorak.nvgt:133:insert_last[0]
; draugnorak.nvgt:96:insert_last[0]
msg.e8db3a42f86f=Learn Sounds
; src/bosses/bandit_hideout.nvgt:845:insert_last[0]
msg.e8e8f4ee7a5a=You can now engrave weapons with this rune at the crafting menu.
@@ -1423,8 +1330,6 @@ msg.ee200b3d8ae2=Spears
msg.eff5a5f34d9a=unicorn on bridge
; seed:learn_sounds_label:sounds/weapons/bow_draw.ogg
msg.f015f25c409b=bow draw
; src/item_registry.nvgt:item_plural:great_spears
msg.f03527f80533=great spears
; src/item_registry.nvgt:item_display:ropes
msg.f12b2d219fe8=Ropes
; src/quests/catch_the_boomerang_game.nvgt:14:insert_last[0]
@@ -1437,9 +1342,9 @@ msg.f3d964225e83=player female damage
msg.f5cabf873590=reed
; src/bosses/bandit_hideout.nvgt:301:insert_last[0]
msg.f77fc018cb7b=You find a hidden bandit base deep in the forest.
; draugnorak.nvgt:149:insert_last[0]
; draugnorak.nvgt:112:insert_last[0]
msg.f83b6fe3aebf=Exit
; src/inventory_items.nvgt:504:speak_with_history[0]
; src/inventory_items.nvgt:460:speak_with_history[0]
; src/quests/skeletal_bard_game.nvgt:26:speak_with_history[0]
; src/quests/skeletal_bard_game.nvgt:32:speak_with_history[0]
msg.f85b4b604c9b={arg1}.
+22 -117
View File
@@ -71,7 +71,6 @@ time.event.mountain_discovered=A mountain range has been discovered to the east!
time.event.invasion_source_mountains=the mountains
time.event.invasion_source_new_area=the new area
time.event.invasion_start={enemy_plural} are invading from {source}!
time.event.undead_resident_raid=The dead remember where people still live. {count} undead residents are coming.
time.event.zombie_swarm_spotted=A swarm of zombies has been spotted.
time.event.survivor_joins_one=A survivor joins your base.
time.event.survivor_joins_many={count} survivors join your base.
@@ -230,88 +229,8 @@ character.info.speed=Speed {status}
character.info.pet=Pet {pet}, health {health} of {max_health}, loyalty {loyalty} of {max_loyalty}
character.info.pet_knocked_out=Knocked out for {hours} {hour_label}.
character.info.pet_none=No pet.
character.info.goals=Goals: {unspent} unspent, {earned} earned
character.info.goals_menu=Goals
character.word.hour=hour
character.word.hours=hours
goals.new=New goal: {goal} Press G to review your current goal.
goals.current=Current goal: {goal}. Unspent goal points: {unspent}.
goals.all_complete=All current goals complete. Unspent goal points: {unspent}.
goals.spend_hint=To spend goal points, press P for the character menu, then choose Goals and Mastery.
goals.goal.completed=Goal complete: {goal}. Awarded 1 goal point.
goals.reward.one=Reward: 1 goal point.
goals.reward.many=Reward: {count} goal points.
goals.goal.craft_knife.name=Craft a knife.
goals.goal.craft_spear.name=Craft a spear.
goals.goal.build_firepit.name=Build a firepit.
goals.goal.light_fire.name=Light a fire.
goals.goal.build_storage.name=Upgrade storage.
goals.goal.build_altar.name=Build an altar.
goals.goal.complete_quest.name=Complete a quest.
goals.goal.win_adventure.name=Win an adventure.
goals.goal.engrave_rune.name=Engrave a rune.
goals.goal.craft_axe.name=Craft a stone axe.
goals.goal.chop_tree_1.name=Chop down a tree.
goals.goal.chop_tree_4.name=Chop down 4 trees.
goals.goal.chop_tree_9.name=Chop down 9 trees.
goals.goal.chop_tree_27.name=Chop down 27 trees.
goals.goal.craft_snare.name=Craft a snare.
goals.goal.catch_snare.name=Catch something in a snare.
goals.goal.butcher_game.name=Butcher game.
goals.goal.craft_sling.name=Craft a sling.
goals.goal.craft_bow.name=Craft a bow.
goals.goal.build_herb_garden.name=Build an herb garden.
goals.goal.upgrade_storage_2.name=Fully upgrade storage.
goals.goal.build_pasture.name=Build a pasture.
goals.goal.build_stable.name=Build a stable.
goals.goal.craft_quiver.name=Craft a quiver.
goals.goal.craft_arrows.name=Craft arrows.
goals.goal.survive_day_9.name=Survive until day 9.
goals.goal.tame_pet.name=Tame a pet.
goals.goal.reinforce_barricade.name=Reinforce the barricade.
goals.goal.unknown.name=Unknown goal.
goals.menu.prompt=Goals. {option}
goals.menu.current=Current goal: {goal}
goals.menu.current_done=Current goal: all complete
goals.menu.completed=Completed goals
goals.menu.mastery=Mastery
goals.menu.unspent=Unspent goal points: {unspent}
goals.menu.unspent_solo=Unspent goal points: {unspent}
goals.menu.earned=Total goal points earned: {earned}
goals.menu.earned_solo=Total goal points earned: {earned}
goals.menu.back=Back
goals.completed.prompt=Completed goals. {option}
goals.completed.none=No goals completed yet.
goals.completed.entry_one={goal}. Awarded 1 goal point.
goals.completed.entry_many={goal}. Awarded {points} goal points.
goals.mastery.prompt=Mastery. {option}
goals.mastery.crafting.name=Crafting Mastery
goals.mastery.leadership.name=Leadership Mastery
goals.mastery.taming.name=Taming Mastery
goals.mastery.unknown.name=Unknown mastery
goals.mastery.unknown_level=Unknown unlock
goals.mastery.maxed={category}: maxed out
goals.mastery.summary={category} level {level} of {max}. Next cost: {cost} goal points.
goals.mastery.unlocked=Unlocked {unlock}.
goals.mastery.confirm=Spend {cost} goal points to unlock {unlock}?
goals.mastery.already_maxed={category} is already maxed out.
goals.mastery.not_enough_points=Need {cost} goal points. You have {unspent}.
goals.mastery.spend_failed=Could not spend the goal point.
goals.mastery.crafting.level1=Crafted basic tools are sturdier.
goals.mastery.crafting.level2=Unlock great spear recipe.
goals.mastery.crafting.level3=Great spear reaches 2 tiles but has a slower attack window.
goals.mastery.crafting.level4=Personal tools, weapons, and clothing no longer wear out.
goals.mastery.leadership.level1=Residents are careful and break fewer tools and weapons.
goals.mastery.leadership.level2=Residents are organized and succeed at work more often.
goals.mastery.leadership.level3=Residents act faster during defense and urgent work.
goals.mastery.leadership.level4=Residents ration food and keep working after nightfall.
goals.mastery.taming.level1=Pets can retrieve dropped items.
goals.mastery.taming.level2=Pets are heartier and gain one maximum health.
goals.mastery.taming.level3=Pets recover from knockout faster.
goals.mastery.taming.level4=Bonded pets no longer require food and stay fully loyal.
crafting.weapons.option.great_spear=Great Spear (1 Spear, 1 Log, 2 Vines, 2 Sinew) [Requires Crafting Mastery 2]
crafting.weapons.crafted.great_spear=Crafted a Great Spear.
crafting.weapons.great_spear.requires_mastery=Great spear requires Crafting Mastery 2.
pet.default_name=pet
pet.returned=A {pet} returns to you.
pet.knocked_out=Your {pet} has been knocked out.
@@ -703,7 +622,7 @@ msg.03268c7d7239=backpacks
msg.03976920927e=rope
; src/item_registry.nvgt:item_display:small_game
msg.0406529811c7=Small Game
; draugnorak.nvgt:656:ui_info_box[2]
; draugnorak.nvgt:608:ui_info_box[2]
msg.041d8413712d=A crash log was written to your save data folder.
; seed:learn_sounds_label:sounds/enemies/vampyr1.ogg
msg.04a8916a9494=vampyr1
@@ -711,8 +630,6 @@ msg.04a8916a9494=vampyr1
msg.0532db2192fa=incense
; src/bosses/bandit_hideout.nvgt:787:insert_last[0]
msg.066723a92e94==== Victory Rewards ===
; seed:learn_sounds_label:sounds/enemies/corpse_worm_dies.ogg
msg.06c9fefbd6d7=corpse worm dies
; src/quests/enchanted_melody_game.nvgt:36:insert_last[0]
msg.07e9ab246cdd=After closing this screen, you can practice the notes.
; src/item_registry.nvgt:item_plural:sinew
@@ -725,8 +642,6 @@ msg.09c28ae8f83b=Stones
msg.09d016686864=Stable not built
; src/item_registry.nvgt:item_display:reed_baskets
msg.0a3bdcef1906=Reed Baskets
; seed:learn_sounds_label:sounds/new_goal.ogg
msg.0a6e19e37b4d=new goal
; src/quests/enchanted_melody_game.nvgt:26:insert_last[0]
msg.0a9d6438c818==== Enchanted Melody ===
; src/bosses/bandit_hideout.nvgt:305:insert_last[0]
@@ -753,8 +668,6 @@ msg.126dd3b70a5c=Logs
msg.136e4cb03bd5=Failed to save file
; src/item_registry.nvgt:item_plural:quivers
msg.145ba8a7a0f2=quivers
; src/item_registry.nvgt:item_display:great_spears
msg.14941e07fc96=Great Spears
; src/bosses/bandit_hideout.nvgt:860:insert_last[0]
msg.14f5f5ff4f76=No survivors were found.
; seed:learn_sounds_label:sounds/game/game_falls.ogg
@@ -773,7 +686,7 @@ msg.18b837bb6f43=bat1
msg.18c77e824a2a=yeti dies
; seed:learn_sounds_label:sounds/enemies/bandit_dies.ogg
msg.1a853cbfbc36=bandit dies
; src/sound_settings.nvgt:50:learn_sounds_add_description[1]
; src/sound_settings.nvgt:48:learn_sounds_add_description[1]
msg.1bb8ef2886a3=Basic undead.
; seed:learn_sounds_label:sounds/nature/night.ogg
msg.1be2a44cb53d=night
@@ -915,7 +828,7 @@ msg.444d4678962b=falling
msg.4537c16badd9=bow fire
; src/item_registry.nvgt:item_plural:snares
msg.455b11a16eb7=snares
; src/sound_settings.nvgt:40:learn_sounds_add_description[1]
; src/sound_settings.nvgt:38:learn_sounds_add_description[1]
msg.4671b16b0398=Not quite a zombie nor a vampyr. These undead remember they used to have a home, and maybe there's food there...
; seed:learn_sounds_label:sounds/terrain/draugrhaugr_step.ogg
msg.46fcdd91c99e=draugrhaugr step
@@ -945,21 +858,19 @@ msg.4f773e9d5bf0=Bows
msg.4f7f358cd341=goose
; src/item_registry.nvgt:item_display:clay_pots
msg.4f99d3d5b638=Clay Pots
; src/item_registry.nvgt:item_singular:great_spear
msg.4fd74919913c=great spear
; seed:learn_sounds_label:sounds/game/turkey.ogg
msg.5009c8e190ee=turkey
; src/quests/skeletal_bard_game.nvgt:51:insert_last[0]
msg.508e8bc0cc57=- Use Up/Down to change the number
; seed:learn_sounds_label:sounds/weapons/sling_low_range.ogg
msg.5123c22ce6a5=sling low range
; draugnorak.nvgt:113:insert_last[0]
; draugnorak.nvgt:81:insert_last[0]
msg.528fb1c4e5fb=New Game
; seed:learn_sounds_label:sounds/quests/squish.ogg
msg.5460f2e3c43e=squish
; seed:learn_sounds_label:sounds/actions/fishpole_break.ogg
msg.546330ee64db=fishpole break
; draugnorak.nvgt:656:ui_info_box[0]
; draugnorak.nvgt:608:ui_info_box[0]
msg.54fc2d657ed6=Draugnorak
; seed:learn_sounds_label:sounds/enemies/vampyr3.ogg
msg.55748cf43121=vampyr3
@@ -987,7 +898,7 @@ msg.5cac31311668=Pasture is full. No livestock were recovered.
msg.5cc7429297c8=that can be destroyed with an axe.
; seed:learn_sounds_label:sounds/actions/cast_strength.ogg
msg.5dfc869b7588=cast strength
; src/time_system.nvgt:861:notify[0]
; src/time_system.nvgt:793:notify[0]
msg.5ea84b1201bb={arg1} favor grants you the eyes of an eagle.
; seed:learn_sounds_label:sounds/menu/menu_select.ogg
; seed:learn_sounds_label:sounds/menu.bak/menu_select.ogg
@@ -1071,8 +982,8 @@ msg.7e83de91b4a2=bandit female dies
msg.7f7e3bbf8864=An enemy is no longer in range of your currently wielded weapon.
; src/item_registry.nvgt:item_display:backpacks
msg.7fae743693f4=Backpacks
; draugnorak.nvgt:232:ui_info_box[1]
; draugnorak.nvgt:246:ui_info_box[1]
; draugnorak.nvgt:194:ui_info_box[1]
; draugnorak.nvgt:208:ui_info_box[1]
msg.802aa6576577=Load Game
; src/item_registry.nvgt:item_plural:sticks
msg.803e4c41bbd2=sticks
@@ -1081,12 +992,12 @@ msg.803e4c41bbd2=sticks
msg.80655da8d80a=tree
; src/item_registry.nvgt:item_plural:canoes
msg.806baaf8e039=canoes
; src/time_system.nvgt:843:notify[0]
; src/time_system.nvgt:853:notify[0]
; src/time_system.nvgt:775:notify[0]
; src/time_system.nvgt:785:notify[0]
msg.81df04a81e24={arg1} favor shines upon you. {arg2}
; src/quests/catch_the_boomerang_game.nvgt:22:insert_last[0]
msg.823be948275f=- Better timing earns more points (up to 4)
; src/sound_settings.nvgt:43:learn_sounds_add_description[1]
; src/sound_settings.nvgt:41:learn_sounds_add_description[1]
msg.83865f248682=More powerful undead. They do not lose track of you when you are in the base.
; seed:learn_sounds_label:sounds/nature/wind_high.ogg
msg.8443de859917=wind high
@@ -1108,7 +1019,7 @@ msg.86e257c3efcb=Oldest notification. {arg1}
msg.87383ce4344d=Bowstrings
; src/item_registry.nvgt:item_plural:ropes
msg.87cdb5c91437=ropes
; src/time_system.nvgt:857:notify[0]
; src/time_system.nvgt:789:notify[0]
msg.8818f1d55166={arg1} radiance fills residents with purpose.
; src/quests/bat_invasion_game.nvgt:7:insert_last[0]
msg.88749dbbbf09==== Bat Invasion ===
@@ -1126,7 +1037,7 @@ msg.8f993ac20023=You enter a narrow mountain pass. A massive Unicorn blocks your
msg.917ee46db0cd=bee
; seed:learn_sounds_label:sounds/player_male_damage.ogg
msg.924e0eb6b6f1=player male damage
; src/time_system.nvgt:848:notify[0]
; src/time_system.nvgt:780:notify[0]
msg.9281d2fe5f08={arg1} favor shines upon you. You feel swift for a while.
; seed:learn_sounds_label:sounds/actions/climb_rope.ogg
msg.92abc6d6953f=climb rope
@@ -1177,9 +1088,9 @@ msg.a3cb738850fa=wolf
msg.a3f2439ef01a=skin hat
; seed:learn_sounds_label:sounds/quests/bone1.ogg
msg.a56be51786dc=bone1
; src/sound_settings.nvgt:43:learn_sounds_add_description[1]
; src/sound_settings.nvgt:44:learn_sounds_add_description[1]
; src/sound_settings.nvgt:45:learn_sounds_add_description[1]
; src/sound_settings.nvgt:46:learn_sounds_add_description[1]
; src/sound_settings.nvgt:47:learn_sounds_add_description[1]
msg.a570b024087d=Ever hungry, they feed upon your residents.
; src/quests/escape_from_hel_game.nvgt:15:insert_last[0]
msg.a641f39a6317=- The run ends when you fall into a grave
@@ -1255,7 +1166,7 @@ msg.c01409b3a728=When casting release control when over water. When catching rel
msg.c05feaca7269=No items were recovered.
; src/item_registry.nvgt:item_singular:snare
msg.c1104d82c0bd=snare
; src/sound_settings.nvgt:39:learn_sounds_add_description[1]
; src/sound_settings.nvgt:37:learn_sounds_add_description[1]
msg.c48d642737b2=Inhabits mountainous regions.
; src/item_registry.nvgt:item_display:smoked_fish
msg.c4f7e9c21601=Smoked Fish
@@ -1265,8 +1176,6 @@ msg.c50641e24962=Your cast missed the water and landed in nearby foliage where i
msg.c52888225c69=fall
; seed:learn_sounds_label:sounds/enemies/bandit1.ogg
msg.c65e5dfc5ba7=bandit1
; seed:learn_sounds_label:sounds/enemies/corpse_worm.ogg
msg.c6d56016b910=corpse worm
; src/bosses/bandit_hideout.nvgt:789:insert_last[0]
msg.c72b7844929d=Bandits defeated: {arg1}.
; seed:learn_sounds_label:sounds/terrain/stream.ogg
@@ -1298,7 +1207,7 @@ msg.ce3897c6b3be={arg1}: {arg2}
; seed:learn_sounds_label:sounds/items/item_breaks.ogg
msg.ce5aeca95fb9=item breaks
; src/i18n.nvgt:677:speak_with_history[0]
; src/pet_system.nvgt:936:speak_with_history[0]
; src/pet_system.nvgt:926:speak_with_history[0]
; src/save_system.nvgt:344:speak_with_history[0]
msg.cea88b214070={arg1} {arg2}
; seed:manual
@@ -1307,13 +1216,11 @@ msg.cfe2650b4c6e=Found a stone.
msg.d04a59a6a71b=Controls: LEFT/RIGHT to move, UP to jump, CTRL to attack, ESC to flee
; src/item_registry.nvgt:item_singular:skin
msg.d0cb2acd0739=skin
; src/sound_settings.nvgt:37:learn_sounds_add_description[1]
msg.d2e0d305bc2b=A weak crawling enemy that starts appearing outside the base after day 1.
; seed:learn_sounds_label:sounds/enemies/enemy_falls.ogg
msg.d34b6217ea75=enemy falls
; src/item_registry.nvgt:item_display:skin_gloves
msg.d373510877fd=Skin Gloves
; draugnorak.nvgt:656:ui_info_box[1]
; draugnorak.nvgt:608:ui_info_box[1]
; seed:manual
msg.d39008c4a392=Unhandled exception
; src/item_registry.nvgt:item_singular:backpack
@@ -1336,7 +1243,7 @@ msg.da0b5a461d98=F or K - First note (lowest pitch)
msg.da11dc5e090c=sling hit
; seed:learn_sounds_label:sounds/enemies/vampyr_dies.ogg
msg.da93fb9992a3=vampyr dies
; src/sound_settings.nvgt:49:learn_sounds_add_description[1]
; src/sound_settings.nvgt:47:learn_sounds_add_description[1]
msg.dadd68431e60=Inhabits snowy regions.
; seed:learn_sounds_label:sounds/enemies/exit_range.ogg
msg.db2a8514a0fc=exit range
@@ -1406,7 +1313,7 @@ msg.e7409fcb54bc=feed fire
msg.e8002c169040=wood
; src/quests/escape_from_hel_game.nvgt:13:insert_last[0]
msg.e8216720d30b=- Press SPACE to jump over graves
; draugnorak.nvgt:133:insert_last[0]
; draugnorak.nvgt:96:insert_last[0]
msg.e8db3a42f86f=Learn Sounds
; src/bosses/bandit_hideout.nvgt:845:insert_last[0]
msg.e8e8f4ee7a5a=You can now engrave weapons with this rune at the crafting menu.
@@ -1423,8 +1330,6 @@ msg.ee200b3d8ae2=Spears
msg.eff5a5f34d9a=unicorn on bridge
; seed:learn_sounds_label:sounds/weapons/bow_draw.ogg
msg.f015f25c409b=bow draw
; src/item_registry.nvgt:item_plural:great_spears
msg.f03527f80533=great spears
; src/item_registry.nvgt:item_display:ropes
msg.f12b2d219fe8=Ropes
; src/quests/catch_the_boomerang_game.nvgt:14:insert_last[0]
@@ -1437,9 +1342,9 @@ msg.f3d964225e83=player female damage
msg.f5cabf873590=reed
; src/bosses/bandit_hideout.nvgt:301:insert_last[0]
msg.f77fc018cb7b=You find a hidden bandit base deep in the forest.
; draugnorak.nvgt:149:insert_last[0]
; draugnorak.nvgt:112:insert_last[0]
msg.f83b6fe3aebf=Exit
; src/inventory_items.nvgt:504:speak_with_history[0]
; src/inventory_items.nvgt:460:speak_with_history[0]
; src/quests/skeletal_bard_game.nvgt:26:speak_with_history[0]
; src/quests/skeletal_bard_game.nvgt:32:speak_with_history[0]
msg.f85b4b604c9b={arg1}.
-95
View File
@@ -117,7 +117,6 @@ time.event.mountain_discovered=Se ha descubierto una cordillera al este!
time.event.invasion_source_mountains=las montanas
time.event.invasion_source_new_area=el area nueva
time.event.invasion_start={enemy_plural} estan invadiendo desde {source}!
time.event.undead_resident_raid=Los muertos recuerdan donde aun vive la gente. Vienen {count} residentes no muertos.
time.event.zombie_swarm_spotted=Se ha detectado una horda de zombis.
time.event.survivor_joins_one=Un superviviente se une a tu base.
time.event.survivor_joins_many={count} supervivientes se unen a tu base.
@@ -463,9 +462,6 @@ crafting.weapons.prompt=Armas. {option}
crafting.weapons.option.spear=Lanza (1 Palo, 1 Liana, 1 Piedra) [Requiere Cuchillo]
crafting.weapons.option.sling=Honda (1 Piel, 2 Lianas)
crafting.weapons.option.bow=Arco (1 Palo, 1 Cuerda de arco)
system.crafting.weapons.option.great_spear=Lanza Grande (1 Lanza, 1 Tronco, 2 Lianas, 2 Tendones) [Requiere Maestría de Fabricación 2]
system.crafting.weapons.crafted.great_spear=Fabricaste una lanza grande.
system.crafting.weapons.great_spear.requires_mastery=La lanza grande requiere Maestría de Fabricación 2.
crafting.weapons.crafted.spear=Fabricaste una lanza.
crafting.weapons.crafted.sling=Fabricaste una honda.
crafting.weapons.crafted.bow=Fabricaste un arco.
@@ -627,7 +623,6 @@ msg.096539f23463=Retumban los tambores de guerra! Preparate para el combate!
msg.09c28ae8f83b=Piedras
msg.09d016686864=Establo no construido
msg.0a3bdcef1906=Cestas de junco
msg.0a6e19e37b4d=nuevo objetivo
msg.0a9d6438c818==== Melodia Encantada ===
msg.0b3d8d5cdca6=- Llega a la base y destruye la barricada
msg.0bcd9af79f2d=bosque
@@ -973,93 +968,3 @@ msg.fe2a9d6606e0=draugnorak
msg.feea4a3b0a84==== Unicornio Hunt ===
msg.fefc084f67de=D o J - Segunda nota
msg.ff5ac0b6df7b=arcos
msg.14941e07fc96=Grandes Lanzas
msg.4fd74919913c=lanza grande
msg.f03527f80533=grandes lanzas
system.character.info.goals=Objetivos: {unspent} sin gastar, {earned} ganados
system.character.info.goals_menu=Objetivos
system.goals.all_complete=Todos los objetivos actuales completados. Puntos sin gastar: {unspent}.
system.goals.completed.entry_many={goal}. {points} puntos otorgados.
system.goals.completed.entry_one={goal}. 1 punto otorgado.
system.goals.completed.none=Aún no se han completado objetivos.
system.goals.completed.prompt=Objetivos completados. {option}
system.goals.current=Objetivo actual: {goal}. Puntos sin gastar: {unspent}.
system.goals.new=Nuevo objetivo: {goal} Pulsa G para revisar tu objetivo actual.
system.goals.spend_hint=Para gastar puntos de objetivo, pulsa P para abrir el menu de personaje, y luego elige Objetivos y Maestria.
system.goals.goal.build_altar.name=Construye un altar.
system.goals.goal.build_firepit.name=Construye un fogón.
system.goals.goal.build_storage.name=Mejora almacenamiento.
system.goals.goal.complete_quest.name=Completa una misión.
system.goals.goal.completed=Objetivo completado: {goal}. 1 punto otorgado.
system.goals.goal.craft_knife.name=Fabrica un cuchillo.
system.goals.goal.craft_spear.name=Fabrica una lanza.
system.goals.goal.engrave_rune.name=Graba una runa.
system.goals.goal.craft_axe.name=Fabrica un hacha de piedra.
system.goals.goal.chop_tree_1.name=Tala un arbol.
system.goals.goal.chop_tree_4.name=Tala 4 arboles.
system.goals.goal.chop_tree_9.name=Tala 9 arboles.
system.goals.goal.chop_tree_27.name=Tala 27 arboles.
system.goals.goal.craft_snare.name=Fabrica una trampa.
system.goals.goal.catch_snare.name=Atrapa algo en una trampa.
system.goals.goal.butcher_game.name=Descuartiza caza.
system.goals.goal.craft_sling.name=Fabrica una honda.
system.goals.goal.craft_bow.name=Craft a bow.
system.goals.goal.build_herb_garden.name=Build an herb garden.
system.goals.goal.upgrade_storage_2.name=Fully upgrade storage.
system.goals.goal.build_pasture.name=Build a pasture.
system.goals.goal.build_stable.name=Build a stable.
system.goals.goal.craft_quiver.name=Craft a quiver.
system.goals.goal.craft_arrows.name=Craft arrows.
system.goals.goal.survive_day_9.name=Survive until day 9.
system.goals.goal.tame_pet.name=Tame a pet.
system.goals.goal.reinforce_barricade.name=Reinforce the barricade.
system.goals.goal.light_fire.name=Enciende un fuego.
system.goals.goal.unknown.name=Objetivo desconocido.
system.goals.goal.win_adventure.name=Gana una aventura.
system.goals.menu.completed=Objetivos completados
system.goals.menu.current=Objetivo actual: {goal}
system.goals.menu.current_done=Objetivo actual: todo completado
system.goals.menu.earned=Puntos totales ganados: {earned}
system.goals.menu.earned_solo=Puntos totales ganados: {earned}
system.goals.menu.mastery=Maestría
system.goals.menu.prompt=Objetivos. {option}
system.goals.menu.unspent=Puntos sin gastar: {unspent}
system.goals.menu.unspent_solo=Puntos sin gastar: {unspent}
system.goals.reward.many=Recompensa: {count} puntos.
system.goals.reward.one=Recompensa: 1 punto.
system.goals.mastery.unknown.name=Maestría desconocida
system.goals.mastery.unlocked=Desbloqueado {unlock}.
system.goals.mastery.prompt=Maestría. {option}
system.goals.mastery.crafting.level1=Las herramientas básicas fabricadas son más resistentes.
system.goals.mastery.crafting.level2=Desbloquea la receta de la lanza grande.
system.goals.mastery.crafting.level3=La lanza grande alcanza 2 casillas pero tiene una ventana de ataque más lenta.
system.goals.mastery.crafting.level4=Las herramientas, armas y ropa personales ya no se desgastan.
system.goals.mastery.crafting.name=Maestría de Fabricación
system.goals.mastery.leadership.level1=Los residentes son cuidadosos y rompen menos herramientas y armas.
system.goals.mastery.leadership.level2=Los residentes son organizados y tienen éxito en el trabajo más a menudo.
system.goals.mastery.leadership.level3=Los residentes actúan más rápido durante la defensa y el trabajo urgente.
system.goals.mastery.leadership.level4=Los residentes racionan comida y siguen trabajando después del anochecer.
system.goals.mastery.leadership.name=Maestría de Liderazgo
system.goals.mastery.taming.level1=Las mascotas pueden recuperar objetos caídos.
system.goals.mastery.taming.level2=Las mascotas son más resistentes y ganan una salud máxima.
system.goals.mastery.taming.level3=Las mascotas se recuperan más rápido tras quedar inconscientes.
system.goals.mastery.taming.level4=Las mascotas vinculadas ya no requieren comida y se mantienen totalmente leales.
system.goals.mastery.taming.name=Maestría de Domesticación
system.goals.mastery.unknown.name=Maestría desconocida
system.goals.mastery.unknown_level=Desbloqueo desconocido
system.goals.mastery.maxed={category}: al máximo
system.goals.mastery.summary={category} nivel {level} de {max}. Coste siguiente: {cost} puntos.
system.goals.mastery.unlocked=Desbloqueado {unlock}.
system.goals.mastery.confirm=¿Gastar {cost} puntos para desbloquear {unlock}?
system.goals.mastery.already_maxed={category} ya está al máximo.
system.goals.mastery.not_enough_points=Necesitas {cost} puntos. Tienes {unspent}.
system.goals.mastery.spend_failed=No se pudo gastar el punto.
system.goals.menu.back=Atrás
msg.06c9fefbd6d7=gusano de cadáver muere
msg.c6d56016b910=gusano de cadáver
msg.d2e0d305bc2b=Un enemigo rastrero débil que empieza a aparecer fuera de la base después del día 1.
-82
View File
@@ -562,8 +562,6 @@ def write_catalog(entries: Dict[str, Dict[str, object]], output_path: Path) -> N
("system.time.event.invasion_source_mountains", "the mountains"),
("system.time.event.invasion_source_new_area", "the new area"),
("system.time.event.invasion_start", "{enemy_plural} are invading from {source}!"),
("system.time.event.undead_resident_raid",
"The dead remember where people still live. {count} undead residents are coming."),
("system.time.event.zombie_swarm_spotted", "A swarm of zombies has been spotted."),
("system.time.event.survivor_joins_one", "A survivor joins your base."),
("system.time.event.survivor_joins_many", "{count} survivors join your base."),
@@ -734,88 +732,8 @@ def write_catalog(entries: Dict[str, Dict[str, object]], output_path: Path) -> N
("system.character.info.pet", "Pet {pet}, health {health} of {max_health}, loyalty {loyalty} of {max_loyalty}"),
("system.character.info.pet_knocked_out", "Knocked out for {hours} {hour_label}."),
("system.character.info.pet_none", "No pet."),
("system.character.info.goals", "Goals: {unspent} unspent, {earned} earned"),
("system.character.info.goals_menu", "Goals"),
("system.character.word.hour", "hour"),
("system.character.word.hours", "hours"),
("system.goals.new", "New goal: {goal} Press G to review your current goal."),
("system.goals.current", "Current goal: {goal}. Unspent goal points: {unspent}."),
("system.goals.all_complete", "All current goals complete. Unspent goal points: {unspent}."),
("system.goals.spend_hint", "To spend goal points, press P for the character menu, then choose Goals and Mastery."),
("system.goals.goal.completed", "Goal complete: {goal}. Awarded 1 goal point."),
("system.goals.reward.one", "Reward: 1 goal point."),
("system.goals.reward.many", "Reward: {count} goal points."),
("system.goals.goal.craft_knife.name", "Craft a knife."),
("system.goals.goal.craft_spear.name", "Craft a spear."),
("system.goals.goal.build_firepit.name", "Build a firepit."),
("system.goals.goal.light_fire.name", "Light a fire."),
("system.goals.goal.build_storage.name", "Upgrade storage."),
("system.goals.goal.build_altar.name", "Build an altar."),
("system.goals.goal.complete_quest.name", "Complete a quest."),
("system.goals.goal.win_adventure.name", "Win an adventure."),
("system.goals.goal.engrave_rune.name", "Engrave a rune."),
("system.goals.goal.craft_axe.name", "Craft a stone axe."),
("system.goals.goal.chop_tree_1.name", "Chop down a tree."),
("system.goals.goal.chop_tree_4.name", "Chop down 4 trees."),
("system.goals.goal.chop_tree_9.name", "Chop down 9 trees."),
("system.goals.goal.chop_tree_27.name", "Chop down 27 trees."),
("system.goals.goal.craft_snare.name", "Craft a snare."),
("system.goals.goal.catch_snare.name", "Catch something in a snare."),
("system.goals.goal.butcher_game.name", "Butcher game."),
("system.goals.goal.craft_sling.name", "Craft a sling."),
("system.goals.goal.craft_bow.name", "Craft a bow."),
("system.goals.goal.build_herb_garden.name", "Build an herb garden."),
("system.goals.goal.upgrade_storage_2.name", "Fully upgrade storage."),
("system.goals.goal.build_pasture.name", "Build a pasture."),
("system.goals.goal.build_stable.name", "Build a stable."),
("system.goals.goal.craft_quiver.name", "Craft a quiver."),
("system.goals.goal.craft_arrows.name", "Craft arrows."),
("system.goals.goal.survive_day_9.name", "Survive until day 9."),
("system.goals.goal.tame_pet.name", "Tame a pet."),
("system.goals.goal.reinforce_barricade.name", "Reinforce the barricade."),
("system.goals.goal.unknown.name", "Unknown goal."),
("system.goals.menu.prompt", "Goals. {option}"),
("system.goals.menu.current", "Current goal: {goal}"),
("system.goals.menu.current_done", "Current goal: all complete"),
("system.goals.menu.completed", "Completed goals"),
("system.goals.menu.mastery", "Mastery"),
("system.goals.menu.unspent", "Unspent goal points: {unspent}"),
("system.goals.menu.unspent_solo", "Unspent goal points: {unspent}"),
("system.goals.menu.earned", "Total goal points earned: {earned}"),
("system.goals.menu.earned_solo", "Total goal points earned: {earned}"),
("system.goals.menu.back", "Back"),
("system.goals.completed.prompt", "Completed goals. {option}"),
("system.goals.completed.none", "No goals completed yet."),
("system.goals.completed.entry_one", "{goal}. Awarded 1 goal point."),
("system.goals.completed.entry_many", "{goal}. Awarded {points} goal points."),
("system.goals.mastery.prompt", "Mastery. {option}"),
("system.goals.mastery.crafting.name", "Crafting Mastery"),
("system.goals.mastery.leadership.name", "Leadership Mastery"),
("system.goals.mastery.taming.name", "Taming Mastery"),
("system.goals.mastery.unknown.name", "Unknown mastery"),
("system.goals.mastery.unknown_level", "Unknown unlock"),
("system.goals.mastery.maxed", "{category}: maxed out"),
("system.goals.mastery.summary", "{category} level {level} of {max}. Next cost: {cost} goal points."),
("system.goals.mastery.unlocked", "Unlocked {unlock}."),
("system.goals.mastery.confirm", "Spend {cost} goal points to unlock {unlock}?"),
("system.goals.mastery.already_maxed", "{category} is already maxed out."),
("system.goals.mastery.not_enough_points", "Need {cost} goal points. You have {unspent}."),
("system.goals.mastery.spend_failed", "Could not spend the goal point."),
("system.goals.mastery.crafting.level1", "Crafted basic tools are sturdier."),
("system.goals.mastery.crafting.level2", "Unlock great spear recipe."),
("system.goals.mastery.crafting.level3", "Great spear reaches 2 tiles but has a slower attack window."),
("system.goals.mastery.crafting.level4", "Personal tools, weapons, and clothing no longer wear out."),
("system.goals.mastery.leadership.level1", "Residents are careful and break fewer tools and weapons."),
("system.goals.mastery.leadership.level2", "Residents are organized and succeed at work more often."),
("system.goals.mastery.leadership.level3", "Residents act faster during defense and urgent work."),
("system.goals.mastery.leadership.level4", "Residents ration food and keep working after nightfall."),
("system.goals.mastery.taming.level1", "Pets can retrieve dropped items."),
("system.goals.mastery.taming.level2", "Pets are heartier and gain one maximum health."),
("system.goals.mastery.taming.level3", "Pets recover from knockout faster."),
("system.goals.mastery.taming.level4", "Bonded pets no longer require food and stay fully loyal."),
("system.crafting.weapons.option.great_spear", "Great Spear (1 Spear, 1 Log, 2 Vines, 2 Sinew) [Requires Crafting Mastery 2]"),
("system.crafting.weapons.crafted.great_spear", "Crafted a Great Spear."),
("system.crafting.weapons.great_spear.requires_mastery", "Great spear requires Crafting Mastery 2."),
("system.pet.default_name", "pet"),
("system.pet.returned", "A {pet} returns to you."),
("system.pet.knocked_out", "Your {pet} has been knocked out."),
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+12 -14
View File
@@ -2,7 +2,7 @@
int get_food_requirement() {
if (residents_count <= 0)
return 0;
return residents_count;
return residents_count; // 1 food per resident per 8 hours
}
int get_total_storage_food() {
@@ -68,7 +68,6 @@ int get_horse_resident_cooldown_reduction() {
int get_resident_success_chance(int base_chance) {
int chance = base_chance * get_resident_effect_multiplier();
chance += get_leadership_success_bonus();
chance += get_horse_success_bonus();
if (chance > 100)
chance = 100;
@@ -76,12 +75,9 @@ int get_resident_success_chance(int base_chance) {
}
int get_resident_break_chance(int base_chance) {
int chance = (base_chance * get_leadership_break_percent()) / 100;
if (chance < 1 && base_chance > 0)
chance = 1;
if (!blessing_resident_active)
return chance;
int reduced = chance / get_resident_effect_multiplier();
return base_chance;
int reduced = base_chance / get_resident_effect_multiplier();
if (reduced < 1 && base_chance > 0)
reduced = 1;
return reduced;
@@ -97,8 +93,7 @@ int get_resident_escape_chance(int base_chance) {
}
int get_resident_cooldown(int base_cooldown) {
int cooldown = (base_cooldown * get_leadership_cooldown_percent()) / 100;
cooldown = cooldown / get_resident_effect_multiplier();
int cooldown = base_cooldown / get_resident_effect_multiplier();
if (cooldown < 1)
cooldown = 1;
return cooldown;
@@ -155,7 +150,7 @@ void consume_food_for_residents() {
}
void attempt_resident_fishing() {
if (!is_daytime && !leadership_mastery_allows_night_work())
if (!is_daytime)
return;
if (residents_count <= 0)
return;
@@ -216,7 +211,7 @@ void attempt_resident_fishing() {
}
void attempt_resident_fish_smoking() {
if (!is_daytime && !leadership_mastery_allows_night_work())
if (!is_daytime)
return;
if (residents_count <= 0)
return;
@@ -741,7 +736,8 @@ void attempt_resident_clothing_repairs() {
// Resident snare retrieval
void attempt_resident_snare_retrieval() {
if (!is_daytime && !leadership_mastery_allows_night_work())
// Only during daytime
if (!is_daytime)
return;
// Need residents
@@ -925,7 +921,8 @@ void attempt_resident_butchering() {
// Resident resource collection
void attempt_resident_collection() {
if (!is_daytime && !leadership_mastery_allows_night_work())
// Only during daytime
if (!is_daytime)
return;
// Need residents
@@ -1003,7 +1000,8 @@ void attempt_resident_collection() {
// Resident foraging - produces baskets of fruits and nuts from reed baskets
void attempt_resident_foraging() {
if (!is_daytime && !leadership_mastery_allows_night_work())
// Only during daytime
if (!is_daytime)
return;
// Need residents
-1
View File
@@ -863,6 +863,5 @@ void give_bandit_hideout_rewards() {
i18n_translate_string_array_in_place(rewards);
text_reader_lines(rewards, i18n_text("Bandit's Hideout"), true);
complete_goal(GOAL_WIN_ADVENTURE);
attempt_pet_offer_from_adventure();
}
-1
View File
@@ -733,6 +733,5 @@ void give_unicorn_rewards() {
// Display rewards in text reader
text_reader_lines(rewards, tr("system.adventure.unicorn.victory_title"), true);
complete_goal(GOAL_WIN_ADVENTURE);
attempt_pet_offer_from_adventure();
}
+3 -64
View File
@@ -3,8 +3,6 @@ void perform_attack(int current_x) {
perform_sling_attack(current_x);
} else if (spear_equipped) {
perform_spear_attack(current_x);
} else if (great_spear_equipped) {
perform_great_spear_attack(current_x);
} else if (axe_equipped) {
perform_axe_attack(current_x);
} else {
@@ -21,7 +19,6 @@ const int BOW_HIT_BANDIT = 1;
const int BOW_HIT_BOAR = 2;
const int BOW_HIT_ZOMBIE = 3;
const int BOW_HIT_FLYING = 4;
const int BOW_HIT_CORPSE_WORM = 5;
void speak_ammo_blocked(string message) {
if (message == lastAmmoBlockMessage && ammoBlockTimer.elapsed < AMMO_BLOCK_COOLDOWN_MS) {
@@ -34,11 +31,10 @@ void speak_ammo_blocked(string message) {
}
int find_ranged_enemy(int player_x, int range, int direction, bool allow_flying, bool& out hit_bandit,
bool& out hit_boar, bool& out hit_flying_creature, bool& out hit_corpse_worm) {
bool& out hit_boar, bool& out hit_flying_creature) {
hit_bandit = false;
hit_boar = false;
hit_flying_creature = false;
hit_corpse_worm = false;
for (int dist = 1; dist <= range; dist++) {
int check_x = player_x + (dist * direction);
@@ -57,12 +53,6 @@ int find_ranged_enemy(int player_x, int range, int direction, bool allow_flying,
return check_x;
}
CorpseWorm @corpse_worm = get_corpse_worm_at(check_x);
if (corpse_worm != null) {
hit_corpse_worm = true;
return check_x;
}
Undead @undead = get_zombie_at(check_x);
if (undead != null) {
return check_x;
@@ -94,10 +84,6 @@ int attack_enemy_ranged(int start_x, int end_x, int damage) {
if (damage_boar_at(check_x, damage)) {
return check_x;
}
// Then check corpse worms
if (damage_corpse_worm_at(check_x, damage)) {
return check_x;
}
}
return -1;
}
@@ -111,10 +97,6 @@ bool attack_enemy(int target_x, int damage) {
if (damage_boar_at(target_x, damage)) {
return true;
}
// Check corpse worms
if (damage_corpse_worm_at(target_x, damage)) {
return true;
}
// Then check zombies
return damage_zombie_at(target_x, damage);
}
@@ -131,8 +113,6 @@ void perform_spear_attack(int current_x) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_pos, BANDIT_SOUND_VOLUME_STEP);
} else if (get_boar_at(hit_pos) != null) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_pos, BOAR_SOUND_VOLUME_STEP);
} else if (get_corpse_worm_at(hit_pos) != null) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_pos, CORPSE_WORM_SOUND_VOLUME_STEP);
} else {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_pos, ZOMBIE_SOUND_VOLUME_STEP);
}
@@ -154,8 +134,6 @@ void perform_axe_attack(int current_x) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, current_x, BANDIT_SOUND_VOLUME_STEP);
} else if (get_boar_at(current_x) != null) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, current_x, BOAR_SOUND_VOLUME_STEP);
} else if (get_corpse_worm_at(current_x) != null) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, current_x, CORPSE_WORM_SOUND_VOLUME_STEP);
} else {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, current_x, ZOMBIE_SOUND_VOLUME_STEP);
}
@@ -279,8 +257,6 @@ void update_bow_shot() {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_x, BOAR_SOUND_VOLUME_STEP);
} else if (hit_type == BOW_HIT_ZOMBIE) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_x, ZOMBIE_SOUND_VOLUME_STEP);
} else if (hit_type == BOW_HIT_CORPSE_WORM) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_x, CORPSE_WORM_SOUND_VOLUME_STEP);
}
}
if (drop_pending && drop_pos >= 0) {
@@ -306,10 +282,8 @@ void release_bow_attack(int player_x) {
bool hit_bandit = false;
bool hit_flying_creature = false;
bool hit_boar = false;
bool hit_corpse_worm = false;
int target_x =
find_ranged_enemy(player_x, BOW_RANGE, search_direction, true, hit_bandit, hit_boar, hit_flying_creature,
hit_corpse_worm);
find_ranged_enemy(player_x, BOW_RANGE, search_direction, true, hit_bandit, hit_boar, hit_flying_creature);
bool hit_tree = false;
if (target_x == -1) {
@@ -337,9 +311,6 @@ void release_bow_attack(int player_x) {
} else if (hit_flying_creature) {
damage_flying_creature_at(target_x, damage);
hit_type = BOW_HIT_FLYING;
} else if (hit_corpse_worm) {
damage_corpse_worm_at(target_x, damage);
hit_type = BOW_HIT_CORPSE_WORM;
} else {
damage_zombie_at(target_x, damage);
hit_type = BOW_HIT_ZOMBIE;
@@ -388,10 +359,8 @@ void release_sling_attack(int player_x) {
bool hit_bandit = false;
bool hit_flying_creature = false;
bool hit_boar = false;
bool hit_corpse_worm = false;
target_x =
find_ranged_enemy(player_x, SLING_RANGE, search_direction, true, hit_bandit, hit_boar, hit_flying_creature,
hit_corpse_worm);
find_ranged_enemy(player_x, SLING_RANGE, search_direction, true, hit_bandit, hit_boar, hit_flying_creature);
// If no enemy found, check for trees (but don't damage them)
if (target_x == -1) {
@@ -433,12 +402,6 @@ void release_sling_attack(int player_x) {
play_1d_with_volume_step("sounds/weapons/sling_hit.ogg", player_x, target_x, false,
PLAYER_WEAPON_SOUND_VOLUME_STEP);
// Falling sound handled by damage_flying_creature_at
} else if (hit_corpse_worm) {
damage_corpse_worm_at(target_x, damage);
play_1d_with_volume_step("sounds/weapons/sling_hit.ogg", player_x, target_x, false,
PLAYER_WEAPON_SOUND_VOLUME_STEP);
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", player_x, target_x,
CORPSE_WORM_SOUND_VOLUME_STEP);
} else {
damage_zombie_at(target_x, damage);
play_1d_with_volume_step("sounds/weapons/sling_hit.ogg", player_x, target_x, false,
@@ -446,27 +409,3 @@ void release_sling_attack(int player_x) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", player_x, target_x, ZOMBIE_SOUND_VOLUME_STEP);
}
}
void perform_great_spear_attack(int current_x) {
p.play_stationary("sounds/weapons/spear_swing.ogg", false);
int damage = apply_weapon_rune_damage(GREAT_SPEAR_DAMAGE);
int reach = get_great_spear_range();
int hit_pos = attack_enemy_ranged(current_x - reach, current_x + reach, damage);
if (hit_pos != -1) {
p.play_stationary("sounds/weapons/spear_hit.ogg", false);
if (get_bandit_at(hit_pos) != null) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_pos, BANDIT_SOUND_VOLUME_STEP);
} else if (get_boar_at(hit_pos) != null) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_pos, BOAR_SOUND_VOLUME_STEP);
} else if (get_corpse_worm_at(hit_pos) != null) {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_pos, CORPSE_WORM_SOUND_VOLUME_STEP);
} else {
play_creature_hit_sound("sounds/enemies/zombie_hit.ogg", x, hit_pos, ZOMBIE_SOUND_VOLUME_STEP);
}
return;
}
// Hit tree with great spear (sound only, 0 damage)
hit_tree_with_spear(current_x);
}
-17
View File
@@ -86,9 +86,6 @@ const int ZOMBIE_ATTACK_MAX_HEIGHT = 6;
const int UNDEAD_RESIDENT_HEALTH = 16;
const int UNDEAD_RESIDENT_DAMAGE_MIN = 5;
const int UNDEAD_RESIDENT_DAMAGE_MAX = 7;
const int UNDEAD_RESIDENT_RAID_BASE_COUNT = 2;
const int UNDEAD_RESIDENT_RAID_DAYS_PER_EXTRA = 18;
const int UNDEAD_RESIDENT_RAID_MAX_COUNT = 8;
// Wight settings (undead elite)
const int WIGHT_HEALTH = 40;
@@ -121,20 +118,6 @@ const int BOAR_SIGHT_RANGE = 4;
const int BOAR_CHARGE_SPEED = 500; // ms per tile when charging
const int BOAR_SPAWN_CHANCE_PER_HOUR = 30;
// Corpse worm settings
const int CORPSE_WORM_START_DAY = 2;
const int CORPSE_WORM_HEALTH = 2;
const int CORPSE_WORM_MAX_COUNT = 2;
const int CORPSE_WORM_MOVE_INTERVAL = 1200;
const int CORPSE_WORM_ATTACK_INTERVAL = 3500;
const int CORPSE_WORM_DAMAGE = 1;
const int CORPSE_WORM_SPAWN_ROLL_INTERVAL = 30000;
const int CORPSE_WORM_SPAWN_CHANCE = 8;
const int CORPSE_WORM_SPAWN_MIN_DISTANCE = 5;
const int CORPSE_WORM_SPAWN_MAX_DISTANCE = 14;
const int CORPSE_WORM_FOOTSTEP_MAX_DISTANCE = 4;
const float CORPSE_WORM_SOUND_VOLUME_STEP = 3.0;
// Barricade configuration
const int BARRICADE_BASE_HEALTH = 40;
const int BARRICADE_MAX_HEALTH = 500;
-8
View File
@@ -128,7 +128,6 @@ void reinforce_barricade_with_sticks() {
simulate_crafting(BARRICADE_STICK_COST);
add_personal_count(ITEM_STICKS, -BARRICADE_STICK_COST);
int gained = add_barricade_health(BARRICADE_STICK_HEALTH);
complete_goal(GOAL_REINFORCE_BARRICADE);
speak_barricade_reinforced_status("system.crafting.barricade.reinforced.sticks", gained);
}
@@ -145,7 +144,6 @@ void reinforce_barricade_with_vines() {
simulate_crafting(BARRICADE_VINE_COST);
add_personal_count(ITEM_VINES, -BARRICADE_VINE_COST);
int gained = add_barricade_health(BARRICADE_VINE_HEALTH);
complete_goal(GOAL_REINFORCE_BARRICADE);
speak_barricade_reinforced_status("system.crafting.barricade.reinforced.vines", gained);
}
@@ -162,7 +160,6 @@ void reinforce_barricade_with_log() {
simulate_crafting(BARRICADE_LOG_COST);
add_personal_count(ITEM_LOGS, -BARRICADE_LOG_COST);
int gained = add_barricade_health(BARRICADE_LOG_HEALTH);
complete_goal(GOAL_REINFORCE_BARRICADE);
speak_barricade_reinforced_status("system.crafting.barricade.reinforced.log", gained);
}
@@ -179,7 +176,6 @@ void reinforce_barricade_with_stones() {
simulate_crafting(BARRICADE_STONE_COST);
add_personal_count(ITEM_STONES, -BARRICADE_STONE_COST);
int gained = add_barricade_health(BARRICADE_STONE_HEALTH);
complete_goal(GOAL_REINFORCE_BARRICADE);
speak_barricade_reinforced_status("system.crafting.barricade.reinforced.stones", gained);
}
@@ -208,7 +204,6 @@ void reinforce_barricade_max_with_sticks() {
if (barricade_health > BARRICADE_MAX_HEALTH)
barricade_health = BARRICADE_MAX_HEALTH;
complete_goal(GOAL_REINFORCE_BARRICADE);
speak_barricade_reinforced_max_status("system.crafting.barricade.reinforced_max.sticks", to_do);
}
@@ -237,7 +232,6 @@ void reinforce_barricade_max_with_vines() {
if (barricade_health > BARRICADE_MAX_HEALTH)
barricade_health = BARRICADE_MAX_HEALTH;
complete_goal(GOAL_REINFORCE_BARRICADE);
speak_barricade_reinforced_max_status("system.crafting.barricade.reinforced_max.vines", to_do);
}
@@ -266,7 +260,6 @@ void reinforce_barricade_max_with_log() {
if (barricade_health > BARRICADE_MAX_HEALTH)
barricade_health = BARRICADE_MAX_HEALTH;
complete_goal(GOAL_REINFORCE_BARRICADE);
speak_barricade_reinforced_max_status("system.crafting.barricade.reinforced_max.log", to_do);
}
@@ -295,6 +288,5 @@ void reinforce_barricade_max_with_stones() {
if (barricade_health > BARRICADE_MAX_HEALTH)
barricade_health = BARRICADE_MAX_HEALTH;
complete_goal(GOAL_REINFORCE_BARRICADE);
speak_barricade_reinforced_max_status("system.crafting.barricade.reinforced_max.stones", to_do);
}
-10
View File
@@ -175,7 +175,6 @@ void craft_firepit() {
simulate_crafting(9);
add_personal_count(ITEM_STONES, -9);
add_world_firepit(x);
complete_goal(GOAL_BUILD_FIREPIT);
speak_with_history(tr("system.crafting.buildings.firepit.built"), true);
} else {
speak_crafting_missing(missing);
@@ -212,7 +211,6 @@ void craft_campfire() {
add_personal_count(ITEM_STICKS, -2);
// Build the fire at the firepit location, not player location
add_world_fire(firepit.position);
complete_goal(GOAL_LIGHT_FIRE);
speak_with_history(tr("system.crafting.buildings.fire.built"), true);
} else {
speak_crafting_missing(missing);
@@ -246,7 +244,6 @@ void craft_herb_garden() {
add_personal_count(ITEM_VINES, -3);
add_personal_count(ITEM_LOGS, -2);
add_world_herb_garden(x);
complete_goal(GOAL_BUILD_HERB_GARDEN);
speak_with_history(tr("system.crafting.buildings.herb_garden.built"), true);
} else {
speak_crafting_missing(missing);
@@ -293,10 +290,6 @@ void craft_storage() {
add_world_storage(x);
}
storage_level = targetLevel;
complete_goal(GOAL_BUILD_STORAGE);
if (storage_level >= STORAGE_LEVEL_UPGRADE_2) {
complete_goal(GOAL_UPGRADE_STORAGE_2);
}
dictionary storageArgs;
storageArgs.set("capacity", newCapacity);
speak_with_history(trf("system.crafting.buildings.storage.upgraded", storageArgs), true);
@@ -329,7 +322,6 @@ void craft_pasture() {
add_personal_count(ITEM_LOGS, -PASTURE_LOG_COST);
add_personal_count(ITEM_ROPES, -PASTURE_ROPE_COST);
add_world_pasture(x);
complete_goal(GOAL_BUILD_PASTURE);
speak_with_history(tr("system.crafting.buildings.pasture.built"), true);
} else {
speak_crafting_missing(missing);
@@ -363,7 +355,6 @@ void craft_stable() {
add_personal_count(ITEM_STONES, -STABLE_STONE_COST);
add_personal_count(ITEM_VINES, -STABLE_VINE_COST);
add_world_stable(x);
complete_goal(GOAL_BUILD_STABLE);
speak_with_history(tr("system.crafting.buildings.stable.built"), true);
} else {
speak_crafting_missing(missing);
@@ -390,7 +381,6 @@ void craft_altar() {
add_personal_count(ITEM_STONES, -ALTAR_STONE_COST);
add_personal_count(ITEM_STICKS, -ALTAR_STICK_COST);
add_world_altar(x);
complete_goal(GOAL_BUILD_ALTAR);
speak_with_history(tr("system.crafting.buildings.altar.built"), true);
} else {
speak_crafting_missing(missing);
-5
View File
@@ -93,7 +93,6 @@ void craft_arrows() {
add_personal_count(ITEM_FEATHERS, -4);
add_personal_count(ITEM_STONES, -2);
add_personal_count(ITEM_ARROWS, ARROWS_PER_CRAFT);
complete_goal(GOAL_CRAFT_ARROWS);
dictionary arrowArgs;
arrowArgs.set("count", ARROWS_PER_CRAFT);
speak_with_history(trf("system.crafting.materials.crafted.arrows", arrowArgs), true);
@@ -146,7 +145,6 @@ void craft_arrows_max() {
add_personal_count(ITEM_FEATHERS, -(maxCraft * 4));
add_personal_count(ITEM_STONES, -(maxCraft * 2));
add_personal_count(ITEM_ARROWS, ARROWS_PER_CRAFT * maxCraft);
complete_goal(GOAL_CRAFT_ARROWS);
dictionary arrowsMaxArgs;
arrowsMaxArgs.set("count", ARROWS_PER_CRAFT * maxCraft);
speak_with_history(trf("system.crafting.materials.crafted.arrows", arrowsMaxArgs), true);
@@ -444,8 +442,6 @@ void butcher_small_game() {
speak_with_history(trf("system.crafting.materials.butcher.default", butcherDefaultArgs), true);
}
complete_goal(GOAL_BUTCHER_GAME);
// Play sound
p.play_stationary("sounds/items/miscellaneous.ogg", false);
} else {
@@ -565,7 +561,6 @@ void butcher_small_game_max() {
butcherMaxArgs.set("feathers", total_feathers);
butcherMaxArgs.set("down", total_down);
butcherMaxArgs.set("sinew", total_sinew);
complete_goal(GOAL_BUTCHER_GAME);
speak_with_history(trf("system.crafting.materials.butcher.max_result", butcherMaxArgs), true);
p.play_stationary("sounds/items/miscellaneous.ogg", false);
}
-14
View File
@@ -4,8 +4,6 @@
// Get the base equipment name without any rune prefix
string get_base_equipment_name(int equip_type) {
if (equip_type == EQUIP_GREAT_SPEAR)
return i18n_lookup_key_with_fallback("system.equipment.name.great_spear", "Great Spear");
if (equip_type == EQUIP_SPEAR)
return i18n_lookup_key_with_fallback("system.equipment.name.spear", "Spear");
if (equip_type == EQUIP_AXE)
@@ -34,8 +32,6 @@ string get_base_equipment_name(int equip_type) {
}
string get_base_equipment_name_plural(int equip_type) {
if (equip_type == EQUIP_GREAT_SPEAR)
return i18n_lookup_key_with_fallback("system.equipment.name_plural.great_spears", "Great Spears");
if (equip_type == EQUIP_SPEAR)
return i18n_lookup_key_with_fallback("system.equipment.name_plural.spears", "Spears");
if (equip_type == EQUIP_AXE)
@@ -65,8 +61,6 @@ string get_base_equipment_name_plural(int equip_type) {
// Get inventory count for an equipment type
int get_unruned_equipment_count(int equip_type) {
if (equip_type == EQUIP_GREAT_SPEAR)
return get_personal_count(ITEM_GREAT_SPEARS);
if (equip_type == EQUIP_SPEAR)
return get_personal_count(ITEM_SPEARS);
if (equip_type == EQUIP_AXE)
@@ -96,10 +90,6 @@ int get_unruned_equipment_count(int equip_type) {
// Decrement inventory for an equipment type
void decrement_unruned_equipment(int equip_type) {
if (equip_type == EQUIP_GREAT_SPEAR) {
add_personal_count(ITEM_GREAT_SPEARS, -1);
return;
}
if (equip_type == EQUIP_SPEAR) {
add_personal_count(ITEM_SPEARS, -1);
return;
@@ -326,7 +316,6 @@ void engrave_rune(int equip_type, int rune_type) {
dictionary engravedArgs;
engravedArgs.set("item", runed_name);
speak_with_history(trf("system.crafting.runes.engraved", engravedArgs), true);
complete_goal(GOAL_ENGRAVE_RUNE);
} else {
speak_crafting_missing(missing);
}
@@ -388,7 +377,4 @@ void engrave_rune_max(int equip_type, int rune_type) {
engravedMaxArgs.set("item", item_name);
engravedMaxArgs.set("rune", get_rune_name(rune_type));
speak_with_history(trf("system.crafting.runes.engraved_max", engravedMaxArgs), true);
if (max_craft > 0) {
complete_goal(GOAL_ENGRAVE_RUNE);
}
}
-6
View File
@@ -99,7 +99,6 @@ void craft_knife() {
simulate_crafting(2);
add_personal_count(ITEM_STONES, -2);
add_personal_count(ITEM_KNIVES, 1);
complete_goal(GOAL_CRAFT_KNIFE);
speak_with_history(tr("system.crafting.tools.crafted.stone_knife"), true);
} else {
speak_crafting_missing(missing);
@@ -127,7 +126,6 @@ void craft_knife_max() {
simulate_crafting(craft_time);
add_personal_count(ITEM_STONES, -(max_possible * 2));
add_personal_count(ITEM_KNIVES, max_possible);
complete_goal(GOAL_CRAFT_KNIFE);
dictionary knifeArgs;
knifeArgs.set("count", max_possible);
speak_with_history(trf("system.crafting.tools.crafted_max.stone_knives", knifeArgs), true);
@@ -149,7 +147,6 @@ void craft_snare() {
add_personal_count(ITEM_STICKS, -1);
add_personal_count(ITEM_VINES, -2);
add_personal_count(ITEM_SNARES, 1);
complete_goal(GOAL_CRAFT_SNARE);
speak_with_history(tr("system.crafting.tools.crafted.snare"), true);
} else {
speak_crafting_missing(missing);
@@ -188,7 +185,6 @@ void craft_snare_max() {
add_personal_count(ITEM_STICKS, -max_craft);
add_personal_count(ITEM_VINES, -(max_craft * 2));
add_personal_count(ITEM_SNARES, max_craft);
complete_goal(GOAL_CRAFT_SNARE);
dictionary snareArgs;
snareArgs.set("count", max_craft);
speak_with_history(trf("system.crafting.tools.crafted_max.snares", snareArgs), true);
@@ -315,7 +311,6 @@ void craft_quiver() {
add_personal_count(ITEM_SKINS, -2);
add_personal_count(ITEM_VINES, -2);
add_personal_count(ITEM_QUIVERS, 1);
complete_goal(GOAL_CRAFT_QUIVER);
speak_with_history(tr("system.crafting.tools.crafted.quiver"), true);
} else {
speak_crafting_missing(missing);
@@ -354,7 +349,6 @@ void craft_quiver_max() {
add_personal_count(ITEM_SKINS, -(maxCraft * 2));
add_personal_count(ITEM_VINES, -(maxCraft * 2));
add_personal_count(ITEM_QUIVERS, maxCraft);
complete_goal(GOAL_CRAFT_QUIVER);
dictionary quiverArgs;
quiverArgs.set("count", maxCraft);
speak_with_history(trf("system.crafting.tools.crafted_max.quivers", quiverArgs), true);
-49
View File
@@ -3,9 +3,6 @@ void run_weapons_menu() {
int selection = 0;
string[] options = {tr("system.crafting.weapons.option.spear"), tr("system.crafting.weapons.option.sling"),
tr("system.crafting.weapons.option.bow")};
if (get_crafting_mastery_level() >= 2) {
options.insert_last(tr("system.crafting.weapons.option.great_spear"));
}
speak_menu_prompt("system.crafting.weapons.prompt", options[selection]);
while (true) {
@@ -42,8 +39,6 @@ void run_weapons_menu() {
craft_sling();
else if (selection == 2)
craft_bow();
else if (selection == 3)
craft_great_spear();
break;
}
@@ -55,8 +50,6 @@ void run_weapons_menu() {
craft_sling_max();
else if (selection == 2)
craft_bow_max();
else if (selection == 3)
craft_great_spear();
break;
}
}
@@ -83,7 +76,6 @@ void craft_spear() {
add_personal_count(ITEM_VINES, -1);
add_personal_count(ITEM_STONES, -1);
add_personal_count(ITEM_SPEARS, 1);
complete_goal(GOAL_CRAFT_SPEAR);
speak_with_history(tr("system.crafting.weapons.crafted.spear"), true);
} else {
speak_crafting_missing(missing);
@@ -132,7 +124,6 @@ void craft_spear_max() {
add_personal_count(ITEM_VINES, -max_craft);
add_personal_count(ITEM_STONES, -max_craft);
add_personal_count(ITEM_SPEARS, max_craft);
complete_goal(GOAL_CRAFT_SPEAR);
dictionary spearArgs;
spearArgs.set("count", max_craft);
speak_with_history(trf("system.crafting.weapons.crafted_max.spears", spearArgs), true);
@@ -154,7 +145,6 @@ void craft_sling() {
add_personal_count(ITEM_SKINS, -1);
add_personal_count(ITEM_VINES, -2);
add_personal_count(ITEM_SLINGS, 1);
complete_goal(GOAL_CRAFT_SLING);
speak_with_history(tr("system.crafting.weapons.crafted.sling"), true);
} else {
speak_crafting_missing(missing);
@@ -193,7 +183,6 @@ void craft_sling_max() {
add_personal_count(ITEM_SKINS, -max_craft);
add_personal_count(ITEM_VINES, -(max_craft * 2));
add_personal_count(ITEM_SLINGS, max_craft);
complete_goal(GOAL_CRAFT_SLING);
dictionary slingArgs;
slingArgs.set("count", max_craft);
speak_with_history(trf("system.crafting.weapons.crafted_max.slings", slingArgs), true);
@@ -215,7 +204,6 @@ void craft_bow() {
add_personal_count(ITEM_STICKS, -1);
add_personal_count(ITEM_BOWSTRINGS, -1);
add_personal_count(ITEM_BOWS, 1);
complete_goal(GOAL_CRAFT_BOW);
speak_with_history(tr("system.crafting.weapons.crafted.bow"), true);
} else {
speak_crafting_missing(missing);
@@ -254,7 +242,6 @@ void craft_bow_max() {
add_personal_count(ITEM_STICKS, -max_craft);
add_personal_count(ITEM_BOWSTRINGS, -max_craft);
add_personal_count(ITEM_BOWS, max_craft);
complete_goal(GOAL_CRAFT_BOW);
dictionary bowArgs;
bowArgs.set("count", max_craft);
speak_with_history(trf("system.crafting.weapons.crafted_max.bows", bowArgs), true);
@@ -281,7 +268,6 @@ void craft_axe() {
add_personal_count(ITEM_VINES, -1);
add_personal_count(ITEM_STONES, -2);
add_personal_count(ITEM_AXES, 1);
complete_goal(GOAL_CRAFT_AXE);
speak_with_history(tr("system.crafting.weapons.crafted.stone_axe"), true);
} else {
speak_crafting_missing(missing);
@@ -329,42 +315,7 @@ void craft_axe_max() {
add_personal_count(ITEM_VINES, -max_craft);
add_personal_count(ITEM_STONES, -(max_craft * 2));
add_personal_count(ITEM_AXES, max_craft);
complete_goal(GOAL_CRAFT_AXE);
dictionary axeArgs;
axeArgs.set("count", max_craft);
speak_with_history(trf("system.crafting.weapons.crafted_max.stone_axes", axeArgs), true);
}
// Great spear recipe: requires a base spear, extra materials, and Crafting
// Mastery 2. Range 2 with a slower attack/recovery to balance.
void craft_great_spear() {
if (get_crafting_mastery_level() < 2) {
speak_with_history(tr("system.crafting.weapons.great_spear.requires_mastery"), true);
return;
}
string missing = "";
if (get_personal_count(ITEM_SPEARS) < 1)
missing += "1 spear ";
if (get_personal_count(ITEM_LOGS) < 1)
missing += "1 log ";
if (get_personal_count(ITEM_VINES) < 2)
missing += "2 vines ";
if (get_personal_count(ITEM_SINEW) < 2)
missing += "2 sinew ";
if (missing == "") {
if (get_personal_count(ITEM_GREAT_SPEARS) >= get_personal_stack_limit()) {
speak_cant_carry_any_more_item(ITEM_GREAT_SPEARS);
return;
}
simulate_crafting(8);
add_personal_count(ITEM_SPEARS, -1);
add_personal_count(ITEM_LOGS, -1);
add_personal_count(ITEM_VINES, -2);
add_personal_count(ITEM_SINEW, -2);
add_personal_count(ITEM_GREAT_SPEARS, 1);
speak_with_history(tr("system.crafting.weapons.crafted.great_spear"), true);
} else {
speak_crafting_missing(missing);
}
}
-222
View File
@@ -1,222 +0,0 @@
// Corpse worms are weak opportunistic enemies that begin appearing after day 1.
string[] corpse_worm_sounds = {"sounds/enemies/corpse_worm.ogg"};
timer corpse_worm_spawn_timer;
class CorpseWorm {
int position;
int health;
int sound_handle;
bool in_weapon_range;
timer move_timer;
timer attack_timer;
string voice_sound;
CorpseWorm(int pos) {
position = pos;
health = CORPSE_WORM_HEALTH;
sound_handle = -1;
in_weapon_range = false;
voice_sound = corpse_worm_sounds[random(0, corpse_worm_sounds.length() - 1)];
move_timer.restart();
attack_timer.restart();
}
} CorpseWorm @[] corpse_worms;
void update_corpse_worm_weapon_range_audio() {
for (uint i = 0; i < corpse_worms.length(); i++) {
update_weapon_range_audio(corpse_worms[i].position, corpse_worms[i].in_weapon_range);
}
}
bool corpse_worm_range_audio_registered = false;
void ensure_corpse_worm_range_audio_registration() {
if (corpse_worm_range_audio_registered)
return;
corpse_worm_range_audio_registered = register_weapon_range_audio_callback(@update_corpse_worm_weapon_range_audio);
}
void clear_corpse_worms() {
for (uint i = 0; i < corpse_worms.length(); i++) {
force_weapon_range_exit(corpse_worms[i].position, corpse_worms[i].in_weapon_range);
if (corpse_worms[i].sound_handle != -1) {
p.destroy_sound(corpse_worms[i].sound_handle);
corpse_worms[i].sound_handle = -1;
}
}
corpse_worms.resize(0);
corpse_worm_spawn_timer.restart();
}
CorpseWorm @get_corpse_worm_at(int pos) {
for (uint i = 0; i < corpse_worms.length(); i++) {
if (corpse_worms[i].position == pos) {
return @corpse_worms[i];
}
}
return null;
}
bool can_spawn_corpse_worm_at(int pos) {
if (pos <= BASE_END || pos < 0 || pos >= MAP_SIZE)
return false;
if (pos == x)
return false;
if (get_corpse_worm_at(pos) != null)
return false;
if (get_bandit_at(pos) != null)
return false;
if (get_boar_at(pos) != null)
return false;
if (get_zombie_at(pos) != null)
return false;
if (get_flying_creature_at(pos) != null)
return false;
return true;
}
int pick_corpse_worm_spawn_position() {
for (int attempts = 0; attempts < 20; attempts++) {
int distance = random(CORPSE_WORM_SPAWN_MIN_DISTANCE, CORPSE_WORM_SPAWN_MAX_DISTANCE);
int direction = (random(0, 1) == 0) ? -1 : 1;
int candidate = x + (distance * direction);
if (can_spawn_corpse_worm_at(candidate))
return candidate;
}
for (int candidate = BASE_END + 1; candidate < MAP_SIZE; candidate++) {
if (can_spawn_corpse_worm_at(candidate))
return candidate;
}
return -1;
}
void spawn_corpse_worm() {
int spawn_x = pick_corpse_worm_spawn_position();
if (spawn_x == -1)
return;
CorpseWorm @worm = CorpseWorm(spawn_x);
corpse_worms.insert_last(worm);
int[] areaStarts;
int[] areaEnds;
get_active_audio_areas(areaStarts, areaEnds);
if (areaStarts.length() == 0 || range_overlaps_active_areas(spawn_x, spawn_x, areaStarts, areaEnds)) {
worm.sound_handle =
play_1d_with_volume_step(worm.voice_sound, x, spawn_x, true, CORPSE_WORM_SOUND_VOLUME_STEP);
}
}
void attempt_corpse_worm_spawn() {
if (current_day < CORPSE_WORM_START_DAY)
return;
if (x <= BASE_END)
return;
if (corpse_worms.length() >= CORPSE_WORM_MAX_COUNT)
return;
if (corpse_worm_spawn_timer.elapsed < CORPSE_WORM_SPAWN_ROLL_INTERVAL)
return;
corpse_worm_spawn_timer.restart();
if (random(1, 100) <= CORPSE_WORM_SPAWN_CHANCE) {
spawn_corpse_worm();
}
}
bool try_attack_player_corpse_worm(CorpseWorm @worm) {
if (player_health <= 0)
return false;
if (x <= BASE_END)
return false;
if (y != 0)
return false;
if (worm.position != x)
return false;
if (worm.attack_timer.elapsed < CORPSE_WORM_ATTACK_INTERVAL)
return false;
worm.attack_timer.restart();
player_health -= CORPSE_WORM_DAMAGE;
if (player_health < 0)
player_health = 0;
play_player_damage_sound();
return true;
}
void update_corpse_worm(CorpseWorm @worm, bool audio_active) {
if (!audio_active) {
if (worm.sound_handle != -1) {
p.destroy_sound(worm.sound_handle);
worm.sound_handle = -1;
}
} else if (worm.sound_handle != -1 && p.sound_is_active(worm.sound_handle)) {
p.update_sound_1d(worm.sound_handle, worm.position);
} else if (worm.sound_handle == -1 || !p.sound_is_active(worm.sound_handle)) {
if (worm.sound_handle != -1) {
p.destroy_sound(worm.sound_handle);
}
worm.sound_handle =
play_1d_with_volume_step(worm.voice_sound, x, worm.position, true, CORPSE_WORM_SOUND_VOLUME_STEP);
}
if (try_attack_player_corpse_worm(worm))
return;
if (worm.move_timer.elapsed < CORPSE_WORM_MOVE_INTERVAL)
return;
worm.move_timer.restart();
int target_x = (x > BASE_END) ? x : BASE_END + 1;
if (target_x == worm.position)
return;
int direction = (target_x > worm.position) ? 1 : -1;
int next_pos = worm.position + direction;
if (next_pos <= BASE_END || next_pos < 0 || next_pos >= MAP_SIZE)
return;
if (get_corpse_worm_at(next_pos) != null)
return;
worm.position = next_pos;
if (audio_active) {
play_creature_footstep(x, worm.position, BASE_END, GRASS_END, CORPSE_WORM_FOOTSTEP_MAX_DISTANCE,
CORPSE_WORM_SOUND_VOLUME_STEP);
}
}
void update_corpse_worms() {
ensure_corpse_worm_range_audio_registration();
attempt_corpse_worm_spawn();
int[] areaStarts;
int[] areaEnds;
get_active_audio_areas(areaStarts, areaEnds);
bool limit_audio = (areaStarts.length() > 0);
for (uint i = 0; i < corpse_worms.length(); i++) {
bool audio_active =
!limit_audio || range_overlaps_active_areas(corpse_worms[i].position, corpse_worms[i].position, areaStarts,
areaEnds);
update_corpse_worm(corpse_worms[i], audio_active);
}
}
bool damage_corpse_worm_at(int pos, int damage) {
for (uint i = 0; i < corpse_worms.length(); i++) {
if (corpse_worms[i].position == pos) {
corpse_worms[i].health -= damage;
if (corpse_worms[i].health <= 0) {
force_weapon_range_exit(corpse_worms[i].position, corpse_worms[i].in_weapon_range);
if (corpse_worms[i].sound_handle != -1) {
p.destroy_sound(corpse_worms[i].sound_handle);
corpse_worms[i].sound_handle = -1;
}
play_creature_death_sounds("sounds/enemies/enemy_falls.ogg", corpse_worms[i].voice_sound, x, pos,
CORPSE_WORM_SOUND_VOLUME_STEP);
corpse_worms.remove_at(i);
}
return true;
}
}
return false;
}
+5 -8
View File
@@ -79,7 +79,6 @@ class Undead {
bool retreating;
bool suppress_voice;
bool should_despawn;
bool counts_as_lost_resident;
timer move_timer;
timer attack_timer;
@@ -93,7 +92,6 @@ class Undead {
retreating = false;
suppress_voice = false;
should_despawn = false;
counts_as_lost_resident = (undead_type == "undead_resident");
move_timer.restart();
attack_timer.restart();
}
@@ -259,7 +257,7 @@ int pick_undead_spawn_near_player(int min_distance, int max_distance) {
return candidate;
}
void spawn_undead(const string& in undead_type = "zombie", bool counts_as_lost_resident = true) {
void spawn_undead(const string& in undead_type = "zombie") {
int spawn_x = -1;
if (undead_type == "zombie" || undead_type == "undead_resident") {
spawn_x = pick_undead_spawn_near_player(ZOMBIE_SPAWN_MIN_DISTANCE, ZOMBIE_SPAWN_MAX_DISTANCE);
@@ -271,7 +269,6 @@ void spawn_undead(const string& in undead_type = "zombie", bool counts_as_lost_r
return;
Undead @undead = Undead(spawn_x, undead_type);
undead.counts_as_lost_resident = (undead_type == "undead_resident" && counts_as_lost_resident);
undeads.insert_last(undead);
// Play looping sound that follows the undead
int[] areaStarts;
@@ -529,7 +526,7 @@ void update_undeads() {
for (uint i = 0; i < undeads.length(); i++) {
if (undeads[i].undead_type == "zombie") {
zombie_count++;
} else if (undeads[i].undead_type == "undead_resident" && undeads[i].counts_as_lost_resident) {
} else if (undeads[i].undead_type == "undead_resident") {
undead_resident_count++;
}
}
@@ -569,7 +566,7 @@ void update_undeads() {
}
void attempt_hourly_wight_spawn() {
if (current_hour == get_current_night_start_hour()) {
if (current_hour == 19) {
wight_spawned_this_night_count = 0;
}
@@ -605,7 +602,7 @@ void attempt_hourly_wight_spawn() {
}
void attempt_hourly_vampyr_spawn() {
if (current_hour == get_current_night_start_hour()) {
if (current_hour == 19) {
vampyr_spawned_this_night_count = 0;
}
@@ -652,7 +649,7 @@ bool damage_undead_at(int pos, int damage) {
if (world_altars.length() > 0) {
favor += 0.2;
}
if (undeads[i].undead_type == "undead_resident" && undeads[i].counts_as_lost_resident) {
if (undeads[i].undead_type == "undead_resident") {
undead_residents_count--;
if (undead_residents_count < 0)
undead_residents_count = 0;
-1
View File
@@ -577,7 +577,6 @@ void damage_tree(int target_x, int damage) {
if (target.health <= 0) {
target.is_chopped = true;
record_tree_chopped_goal_progress();
target.depleted = true;
target.regen_timer.restart();
target.minutes_since_depletion = 0;
+1 -1
View File
@@ -105,7 +105,7 @@ int get_random_stream_tile() {
}
string get_random_fish_type() {
bool is_night = is_night_hour(current_hour);
bool is_night = (current_hour >= 18 || current_hour < 7);
if (is_night) {
int roll = random(0, 99);
-799
View File
@@ -1,799 +0,0 @@
// Goals and Mastery system
// Tracks one-time character milestones, goal points, and the
// initial Crafting Mastery spend path. See goal.md for design notes.
const int GOAL_CRAFT_KNIFE = 0;
const int GOAL_CRAFT_SPEAR = 1;
const int GOAL_BUILD_FIREPIT = 2;
const int GOAL_LIGHT_FIRE = 3;
const int GOAL_BUILD_STORAGE = 4;
const int GOAL_BUILD_ALTAR = 5;
const int GOAL_COMPLETE_QUEST = 6;
const int GOAL_WIN_ADVENTURE = 7;
const int GOAL_ENGRAVE_RUNE = 8;
const int GOAL_CRAFT_AXE = 9;
const int GOAL_CHOP_TREE_1 = 10;
const int GOAL_CHOP_TREE_4 = 11;
const int GOAL_CHOP_TREE_9 = 12;
const int GOAL_CHOP_TREE_27 = 13;
const int GOAL_CATCH_SNARE = 14;
const int GOAL_BUTCHER_GAME = 15;
const int GOAL_CRAFT_SLING = 16;
const int GOAL_CRAFT_SNARE = 17;
const int GOAL_CRAFT_BOW = 18;
const int GOAL_BUILD_HERB_GARDEN = 19;
const int GOAL_UPGRADE_STORAGE_2 = 20;
const int GOAL_BUILD_PASTURE = 21;
const int GOAL_BUILD_STABLE = 22;
const int GOAL_CRAFT_QUIVER = 23;
const int GOAL_CRAFT_ARROWS = 24;
const int GOAL_SURVIVE_DAY_9 = 25;
const int GOAL_TAME_PET = 26;
const int GOAL_REINFORCE_BARRICADE = 27;
const int GOAL_COUNT = 28;
// Mastery spend categories.
const int MASTERY_CRAFTING = 0;
const int MASTERY_LEADERSHIP = 1;
const int MASTERY_TAMING = 2;
const int MASTERY_CATEGORY_COUNT = 3;
// Maximum spendable mastery level. Four levels keep the system Norse-themed while preserving a 9-point cap.
const int MASTERY_MAX_LEVEL = 4;
const string GOAL_ANNOUNCEMENT_SOUND_PATH = "sounds/new_goal";
bool[] goalsCompleted;
int goalPointsUnspent = 0;
int goalPointsEarned = 0;
int craftingMasteryLevel = 0;
int leadershipMasteryLevel = 0;
int tamingMasteryLevel = 0;
int treesChopped = 0;
bool goalAnnouncementPending = false;
bool goalAnnouncementWaitForNextHour = false;
bool goalAnnouncementWaitingForSound = false;
int goalAnnouncementGoalId = -1;
int lastAnnouncedGoalId = -1;
string lastAnnouncedGoalMessage = "";
sound goalAnnouncementSound;
int goal_reward_points(int goalId) {
if (is_valid_goal_id(goalId)) return 1;
return 0;
}
string goal_name_key(int goalId) {
if (goalId == GOAL_CRAFT_KNIFE) return "system.goals.goal.craft_knife.name";
if (goalId == GOAL_CRAFT_SPEAR) return "system.goals.goal.craft_spear.name";
if (goalId == GOAL_BUILD_FIREPIT) return "system.goals.goal.build_firepit.name";
if (goalId == GOAL_LIGHT_FIRE) return "system.goals.goal.light_fire.name";
if (goalId == GOAL_BUILD_STORAGE) return "system.goals.goal.build_storage.name";
if (goalId == GOAL_BUILD_ALTAR) return "system.goals.goal.build_altar.name";
if (goalId == GOAL_COMPLETE_QUEST) return "system.goals.goal.complete_quest.name";
if (goalId == GOAL_WIN_ADVENTURE) return "system.goals.goal.win_adventure.name";
if (goalId == GOAL_ENGRAVE_RUNE) return "system.goals.goal.engrave_rune.name";
if (goalId == GOAL_CRAFT_AXE) return "system.goals.goal.craft_axe.name";
if (goalId == GOAL_CHOP_TREE_1) return "system.goals.goal.chop_tree_1.name";
if (goalId == GOAL_CHOP_TREE_4) return "system.goals.goal.chop_tree_4.name";
if (goalId == GOAL_CHOP_TREE_9) return "system.goals.goal.chop_tree_9.name";
if (goalId == GOAL_CHOP_TREE_27) return "system.goals.goal.chop_tree_27.name";
if (goalId == GOAL_CRAFT_SNARE) return "system.goals.goal.craft_snare.name";
if (goalId == GOAL_CATCH_SNARE) return "system.goals.goal.catch_snare.name";
if (goalId == GOAL_BUTCHER_GAME) return "system.goals.goal.butcher_game.name";
if (goalId == GOAL_CRAFT_SLING) return "system.goals.goal.craft_sling.name";
if (goalId == GOAL_CRAFT_BOW) return "system.goals.goal.craft_bow.name";
if (goalId == GOAL_BUILD_HERB_GARDEN) return "system.goals.goal.build_herb_garden.name";
if (goalId == GOAL_UPGRADE_STORAGE_2) return "system.goals.goal.upgrade_storage_2.name";
if (goalId == GOAL_BUILD_PASTURE) return "system.goals.goal.build_pasture.name";
if (goalId == GOAL_BUILD_STABLE) return "system.goals.goal.build_stable.name";
if (goalId == GOAL_CRAFT_QUIVER) return "system.goals.goal.craft_quiver.name";
if (goalId == GOAL_CRAFT_ARROWS) return "system.goals.goal.craft_arrows.name";
if (goalId == GOAL_SURVIVE_DAY_9) return "system.goals.goal.survive_day_9.name";
if (goalId == GOAL_TAME_PET) return "system.goals.goal.tame_pet.name";
if (goalId == GOAL_REINFORCE_BARRICADE) return "system.goals.goal.reinforce_barricade.name";
return "system.goals.goal.unknown.name";
}
string goal_name(int goalId) {
return tr(goal_name_key(goalId));
}
string goal_summary(int goalId) {
string name = goal_name(goalId);
if (name == goal_name_key(goalId)) {
if (goalId == GOAL_CRAFT_KNIFE) name = "Craft a knife.";
else if (goalId == GOAL_CRAFT_SPEAR) name = "Craft a spear.";
else if (goalId == GOAL_BUILD_FIREPIT) name = "Build a firepit.";
else if (goalId == GOAL_LIGHT_FIRE) name = "Light a fire.";
else if (goalId == GOAL_BUILD_STORAGE) name = "Upgrade storage.";
else if (goalId == GOAL_BUILD_ALTAR) name = "Build an altar.";
else if (goalId == GOAL_COMPLETE_QUEST) name = "Complete a quest.";
else if (goalId == GOAL_WIN_ADVENTURE) name = "Win an adventure.";
else if (goalId == GOAL_ENGRAVE_RUNE) name = "Engrave a rune.";
else if (goalId == GOAL_CRAFT_AXE) name = "Craft a stone axe.";
else if (goalId == GOAL_CHOP_TREE_1) name = "Chop down a tree.";
else if (goalId == GOAL_CHOP_TREE_4) name = "Chop down 4 trees.";
else if (goalId == GOAL_CHOP_TREE_9) name = "Chop down 9 trees.";
else if (goalId == GOAL_CHOP_TREE_27) name = "Chop down 27 trees.";
else if (goalId == GOAL_CRAFT_SNARE) name = "Craft a snare.";
else if (goalId == GOAL_CATCH_SNARE) name = "Catch something in a snare.";
else if (goalId == GOAL_BUTCHER_GAME) name = "Butcher game.";
else if (goalId == GOAL_CRAFT_SLING) name = "Craft a sling.";
else if (goalId == GOAL_CRAFT_BOW) name = "Craft a bow.";
else if (goalId == GOAL_BUILD_HERB_GARDEN) name = "Build an herb garden.";
else if (goalId == GOAL_UPGRADE_STORAGE_2) name = "Fully upgrade storage.";
else if (goalId == GOAL_BUILD_PASTURE) name = "Build a pasture.";
else if (goalId == GOAL_BUILD_STABLE) name = "Build a stable.";
else if (goalId == GOAL_CRAFT_QUIVER) name = "Craft a quiver.";
else if (goalId == GOAL_CRAFT_ARROWS) name = "Craft arrows.";
else if (goalId == GOAL_SURVIVE_DAY_9) name = "Survive until day 9.";
else if (goalId == GOAL_TAME_PET) name = "Tame a pet.";
else if (goalId == GOAL_REINFORCE_BARRICADE) name = "Reinforce the barricade.";
}
int points = goal_reward_points(goalId);
if (points == 1) {
return name + " " + tr("system.goals.reward.one");
}
dictionary args;
args.set("count", points);
return name + " " + trf("system.goals.reward.many", args);
}
void init_goal_state() {
goalAnnouncementSound.close();
goalsCompleted.resize(GOAL_COUNT);
for (int i = 0; i < GOAL_COUNT; i++) {
goalsCompleted[i] = false;
}
goalPointsUnspent = 0;
goalPointsEarned = 0;
craftingMasteryLevel = 0;
leadershipMasteryLevel = 0;
tamingMasteryLevel = 0;
treesChopped = 0;
goalAnnouncementPending = false;
goalAnnouncementWaitForNextHour = false;
goalAnnouncementWaitingForSound = false;
goalAnnouncementGoalId = -1;
lastAnnouncedGoalId = -1;
lastAnnouncedGoalMessage = "";
}
void reset_goal_state() {
init_goal_state();
}
bool is_valid_goal_id(int goalId) {
return goalId >= 0 && goalId < GOAL_COUNT;
}
bool is_goal_completed(int goalId) {
if (!is_valid_goal_id(goalId))
return false;
return goalsCompleted[goalId];
}
int get_current_goal_id() {
int[] goalOrder = {GOAL_CRAFT_KNIFE, GOAL_CRAFT_AXE, GOAL_CHOP_TREE_1, GOAL_REINFORCE_BARRICADE,
GOAL_CRAFT_SPEAR, GOAL_CRAFT_SNARE, GOAL_CATCH_SNARE, GOAL_BUILD_FIREPIT,
GOAL_LIGHT_FIRE, GOAL_BUTCHER_GAME, GOAL_CRAFT_SLING, GOAL_BUILD_ALTAR,
GOAL_COMPLETE_QUEST, GOAL_CRAFT_BOW, GOAL_WIN_ADVENTURE, GOAL_ENGRAVE_RUNE};
for (uint i = 0; i < goalOrder.length(); i++) {
if (!goalsCompleted[goalOrder[i]]) {
return goalOrder[i];
}
}
return -1;
}
string new_goal_announcement_message(int goalId) {
dictionary args;
args.set("goal", goal_summary(goalId));
return trf("system.goals.new", args);
}
bool speak_new_goal_announcement(int goalId) {
string message = new_goal_announcement_message(goalId);
if (message == lastAnnouncedGoalMessage) {
lastAnnouncedGoalId = goalId;
return false;
}
speak_with_history(message, true);
lastAnnouncedGoalId = goalId;
lastAnnouncedGoalMessage = message;
return true;
}
bool goal_announcement_try_play_sound() {
goalAnnouncementSound.close();
if (goalAnnouncementSound.load(GOAL_ANNOUNCEMENT_SOUND_PATH)) {
goalAnnouncementSound.play();
return true;
}
string oggPath = GOAL_ANNOUNCEMENT_SOUND_PATH + ".ogg";
if (goalAnnouncementSound.load(oggPath)) {
goalAnnouncementSound.play();
return true;
}
string wavPath = GOAL_ANNOUNCEMENT_SOUND_PATH + ".wav";
if (!goalAnnouncementSound.load(wavPath)) {
return false;
}
goalAnnouncementSound.play();
return true;
}
void queue_current_goal_announcement(bool waitForNextHour) {
int currentId = get_current_goal_id();
if (currentId == -1)
return;
if (currentId == lastAnnouncedGoalId)
return;
goalAnnouncementPending = true;
goalAnnouncementWaitForNextHour = waitForNextHour;
goalAnnouncementWaitingForSound = false;
goalAnnouncementGoalId = currentId;
}
void allow_delayed_goal_announcement() {
goalAnnouncementWaitForNextHour = false;
if (!goalAnnouncementPending) {
queue_current_goal_announcement(false);
}
}
void update_goal_announcements() {
if (!goalAnnouncementPending)
return;
if (goalAnnouncementWaitForNextHour)
return;
int currentId = get_current_goal_id();
if (currentId == -1) {
goalAnnouncementPending = false;
goalAnnouncementWaitingForSound = false;
goalAnnouncementGoalId = -1;
goalAnnouncementSound.close();
return;
}
if (currentId == lastAnnouncedGoalId) {
goalAnnouncementPending = false;
goalAnnouncementWaitingForSound = false;
goalAnnouncementGoalId = -1;
goalAnnouncementSound.close();
return;
}
if (goalAnnouncementGoalId != currentId) {
goalAnnouncementGoalId = currentId;
goalAnnouncementWaitingForSound = false;
goalAnnouncementSound.close();
}
if (goalAnnouncementWaitingForSound) {
if (goalAnnouncementSound.playing)
return;
speak_new_goal_announcement(goalAnnouncementGoalId);
goalAnnouncementPending = false;
goalAnnouncementWaitingForSound = false;
goalAnnouncementGoalId = -1;
return;
}
if (goal_announcement_try_play_sound()) {
goalAnnouncementWaitingForSound = true;
return;
}
speak_new_goal_announcement(goalAnnouncementGoalId);
goalAnnouncementPending = false;
goalAnnouncementGoalId = -1;
}
bool complete_goal(int goalId) {
if (!is_valid_goal_id(goalId)) {
return false;
}
if (goalsCompleted[goalId]) {
return false;
}
goalsCompleted[goalId] = true;
int points = goal_reward_points(goalId);
goalPointsUnspent += points;
goalPointsEarned += points;
dictionary args;
args.set("goal", goal_name(goalId));
args.set("points", points);
notify(trf("system.goals.goal.completed", args));
queue_current_goal_announcement(true);
return true;
}
bool complete_goal_silent(int goalId) {
if (!is_valid_goal_id(goalId)) {
return false;
}
if (goalsCompleted[goalId]) {
return false;
}
goalsCompleted[goalId] = true;
int points = goal_reward_points(goalId);
goalPointsUnspent += points;
goalPointsEarned += points;
return true;
}
void record_tree_chopped_goal_progress() {
treesChopped++;
if (treesChopped >= 1) complete_goal(GOAL_CHOP_TREE_1);
if (treesChopped >= 4) complete_goal(GOAL_CHOP_TREE_4);
if (treesChopped >= 9) complete_goal(GOAL_CHOP_TREE_9);
if (treesChopped >= 27) complete_goal(GOAL_CHOP_TREE_27);
}
string speak_current_goal() {
int currentId = get_current_goal_id();
dictionary unspentArgs;
unspentArgs.set("unspent", goalPointsUnspent);
if (currentId == -1) {
return trf("system.goals.all_complete", unspentArgs);
}
dictionary args;
args.set("goal", goal_summary(currentId));
args.set("unspent", goalPointsUnspent);
return trf("system.goals.current", args);
}
string speak_current_goal_with_spend_hint() {
string message = speak_current_goal();
if (goalPointsUnspent > 0) {
message += " " + tr("system.goals.spend_hint");
}
return message;
}
void check_goal_key() {
if (key_pressed(KEY_G)) {
speak_with_history(speak_current_goal_with_spend_hint(), true);
}
}
string mastery_category_name(int categoryId) {
if (categoryId == MASTERY_CRAFTING) return tr("system.goals.mastery.crafting.name");
if (categoryId == MASTERY_LEADERSHIP) return tr("system.goals.mastery.leadership.name");
if (categoryId == MASTERY_TAMING) return tr("system.goals.mastery.taming.name");
return tr("system.goals.mastery.unknown.name");
}
int mastery_current_level(int categoryId) {
if (categoryId == MASTERY_CRAFTING) return craftingMasteryLevel;
if (categoryId == MASTERY_LEADERSHIP) return leadershipMasteryLevel;
if (categoryId == MASTERY_TAMING) return tamingMasteryLevel;
return 0;
}
int mastery_max_level(int categoryId) {
if (categoryId == MASTERY_CRAFTING) return MASTERY_MAX_LEVEL;
if (categoryId == MASTERY_LEADERSHIP) return MASTERY_MAX_LEVEL;
if (categoryId == MASTERY_TAMING) return MASTERY_MAX_LEVEL;
return 0;
}
int mastery_cost_for_next_level(int categoryId) {
int level = mastery_current_level(categoryId);
int maxLevel = mastery_max_level(categoryId);
if (level >= maxLevel)
return -1;
if (categoryId == MASTERY_CRAFTING || categoryId == MASTERY_LEADERSHIP || categoryId == MASTERY_TAMING) {
if (level == 0) return 1;
if (level == 1) return 2;
if (level == 2) return 3;
if (level == 3) return 3;
}
return -1;
}
string mastery_unlock_key(int categoryId, int level) {
if (categoryId == MASTERY_CRAFTING) {
if (level == 1) return "system.goals.mastery.crafting.level1";
if (level == 2) return "system.goals.mastery.crafting.level2";
if (level == 3) return "system.goals.mastery.crafting.level3";
if (level == 4) return "system.goals.mastery.crafting.level4";
}
if (categoryId == MASTERY_LEADERSHIP) {
if (level == 1) return "system.goals.mastery.leadership.level1";
if (level == 2) return "system.goals.mastery.leadership.level2";
if (level == 3) return "system.goals.mastery.leadership.level3";
if (level == 4) return "system.goals.mastery.leadership.level4";
}
if (categoryId == MASTERY_TAMING) {
if (level == 1) return "system.goals.mastery.taming.level1";
if (level == 2) return "system.goals.mastery.taming.level2";
if (level == 3) return "system.goals.mastery.taming.level3";
if (level == 4) return "system.goals.mastery.taming.level4";
}
return "system.goals.mastery.unknown_level";
}
string mastery_unlock_label(int categoryId, int level) {
return tr(mastery_unlock_key(categoryId, level));
}
string mastery_level_summary(int categoryId) {
int level = mastery_current_level(categoryId);
int maxLevel = mastery_max_level(categoryId);
int cost = mastery_cost_for_next_level(categoryId);
if (level >= maxLevel) {
dictionary maxedArgs;
maxedArgs.set("category", mastery_category_name(categoryId));
return trf("system.goals.mastery.maxed", maxedArgs);
}
dictionary args;
args.set("category", mastery_category_name(categoryId));
args.set("level", level);
args.set("max", maxLevel);
args.set("cost", cost);
return trf("system.goals.mastery.summary", args);
}
bool can_spend_mastery_point(int categoryId) {
if (mastery_current_level(categoryId) >= mastery_max_level(categoryId))
return false;
int cost = mastery_cost_for_next_level(categoryId);
if (cost < 0)
return false;
return goalPointsUnspent >= cost;
}
bool spend_mastery_point(int categoryId) {
int cost = mastery_cost_for_next_level(categoryId);
if (cost < 0)
return false;
if (goalPointsUnspent < cost)
return false;
if (mastery_current_level(categoryId) >= mastery_max_level(categoryId))
return false;
int newLevel = mastery_current_level(categoryId) + 1;
if (categoryId == MASTERY_CRAFTING) {
craftingMasteryLevel = newLevel;
} else if (categoryId == MASTERY_LEADERSHIP) {
leadershipMasteryLevel = newLevel;
} else if (categoryId == MASTERY_TAMING) {
tamingMasteryLevel = newLevel;
if (petActive && !is_pet_knocked_out()) {
int maxHealth = get_pet_max_health();
if (petHealth < maxHealth)
petHealth = maxHealth;
}
if (tamingMasteryLevel >= 4 && petActive) {
petLoyalty = PET_LOYALTY_MAX;
petHungryWarned = false;
}
} else {
return false;
}
goalPointsUnspent -= cost;
dictionary args;
args.set("unlock", mastery_unlock_label(categoryId, newLevel));
notify(trf("system.goals.mastery.unlocked", args));
return true;
}
float get_crafting_mastery_break_multiplier() {
if (craftingMasteryLevel >= 1)
return 0.5;
return 1.0;
}
bool crafting_mastery_prevents_personal_wear() {
return craftingMasteryLevel >= 4;
}
int get_leadership_break_percent() {
if (leadershipMasteryLevel >= 1)
return 75;
return 100;
}
int get_leadership_success_bonus() {
if (leadershipMasteryLevel >= 3)
return 10;
if (leadershipMasteryLevel >= 2)
return 5;
return 0;
}
int get_leadership_cooldown_percent() {
if (leadershipMasteryLevel >= 3)
return 75;
return 100;
}
int get_resident_food_interval_hours() {
if (leadershipMasteryLevel >= 4)
return 12;
return 8;
}
bool leadership_mastery_allows_night_work() {
return leadershipMasteryLevel >= 4;
}
bool taming_mastery_allows_retrieval() {
return tamingMasteryLevel >= 1;
}
int get_pet_max_health() {
if (tamingMasteryLevel >= 2)
return PET_HEALTH_MAX + 1;
return PET_HEALTH_MAX;
}
int get_pet_knockout_cooldown_hours() {
if (tamingMasteryLevel >= 3)
return 2;
return PET_KNOCKOUT_COOLDOWN_HOURS;
}
bool taming_mastery_prevents_pet_hunger() {
return tamingMasteryLevel >= 4;
}
int get_goal_points_unspent() {
return goalPointsUnspent;
}
int get_goal_points_earned() {
return goalPointsEarned;
}
int get_crafting_mastery_level() {
return craftingMasteryLevel;
}
int get_leadership_mastery_level() {
return leadershipMasteryLevel;
}
int get_taming_mastery_level() {
return tamingMasteryLevel;
}
void run_goals_menu() {
string[] options;
int currentId = get_current_goal_id();
if (currentId == -1) {
options.insert_last(tr("system.goals.menu.current_done"));
} else {
dictionary args;
args.set("goal", goal_summary(currentId));
options.insert_last(trf("system.goals.menu.current", args));
}
options.insert_last(tr("system.goals.menu.completed"));
options.insert_last(tr("system.goals.menu.mastery"));
dictionary unspentArgs;
unspentArgs.set("unspent", goalPointsUnspent);
options.insert_last(trf("system.goals.menu.unspent", unspentArgs));
dictionary earnedArgs;
earnedArgs.set("earned", goalPointsEarned);
options.insert_last(trf("system.goals.menu.earned", earnedArgs));
speak_menu_prompt("system.goals.menu.prompt", options[0]);
int selection = 0;
speak_with_history(options[selection], true);
while (true) {
wait(5);
if (menu_background_tick()) {
return;
}
if (key_pressed(KEY_ESCAPE)) {
speak_with_history(tr("system.menu.closed"), true);
return;
}
if (key_pressed(KEY_DOWN)) {
play_menu_move_sound();
selection++;
if (selection >= int(options.length()))
selection = 0;
speak_with_history(options[selection], true);
}
if (key_pressed(KEY_UP)) {
play_menu_move_sound();
selection--;
if (selection < 0)
selection = int(options.length()) - 1;
speak_with_history(options[selection], true);
}
if (key_pressed(KEY_RETURN)) {
play_menu_select_sound();
if (selection == 0) {
speak_with_history(speak_current_goal(), true);
} else if (selection == 1) {
run_completed_goals_menu();
} else if (selection == 2) {
run_mastery_menu();
} else if (selection == 3) {
dictionary args;
args.set("unspent", goalPointsUnspent);
speak_with_history(trf("system.goals.menu.unspent_solo", args), true);
} else if (selection == 4) {
dictionary args;
args.set("earned", goalPointsEarned);
speak_with_history(trf("system.goals.menu.earned_solo", args), true);
}
}
}
}
void run_completed_goals_menu() {
int completedCount = 0;
for (int i = 0; i < GOAL_COUNT; i++) {
if (goalsCompleted[i]) {
completedCount++;
}
}
if (completedCount == 0) {
speak_with_history(tr("system.goals.completed.none"), true);
return;
}
string[] options;
for (int i = 0; i < GOAL_COUNT; i++) {
if (!goalsCompleted[i])
continue;
int points = goal_reward_points(i);
dictionary args;
args.set("goal", goal_name(i));
if (points == 1) {
options.insert_last(trf("system.goals.completed.entry_one", args));
} else {
args.set("points", points);
options.insert_last(trf("system.goals.completed.entry_many", args));
}
}
speak_menu_prompt("system.goals.completed.prompt", options[0]);
int selection = 0;
speak_with_history(options[selection], true);
while (true) {
wait(5);
if (menu_background_tick()) {
return;
}
if (key_pressed(KEY_ESCAPE)) {
speak_with_history(tr("system.menu.closed"), true);
return;
}
if (key_pressed(KEY_DOWN)) {
play_menu_move_sound();
selection++;
if (selection >= int(options.length()))
selection = 0;
speak_with_history(options[selection], true);
}
if (key_pressed(KEY_UP)) {
play_menu_move_sound();
selection--;
if (selection < 0)
selection = int(options.length()) - 1;
speak_with_history(options[selection], true);
}
if (key_pressed(KEY_RETURN)) {
play_menu_select_sound();
speak_with_history(options[selection], true);
}
}
}
void run_mastery_menu() {
string[] options;
int[] optionCategories;
for (int i = 0; i < MASTERY_CATEGORY_COUNT; i++) {
options.insert_last(mastery_level_summary(i));
optionCategories.insert_last(i);
}
options.insert_last(tr("system.goals.menu.back"));
int backIndex = int(options.length()) - 1;
speak_menu_prompt("system.goals.mastery.prompt", options[0]);
int selection = 0;
speak_with_history(options[selection], true);
while (true) {
wait(5);
if (menu_background_tick()) {
return;
}
if (key_pressed(KEY_ESCAPE)) {
speak_with_history(tr("system.menu.closed"), true);
return;
}
if (key_pressed(KEY_DOWN)) {
play_menu_move_sound();
selection++;
if (selection >= int(options.length()))
selection = 0;
speak_with_history(options[selection], true);
}
if (key_pressed(KEY_UP)) {
play_menu_move_sound();
selection--;
if (selection < 0)
selection = int(options.length()) - 1;
speak_with_history(options[selection], true);
}
if (key_pressed(KEY_RETURN)) {
play_menu_select_sound();
if (selection == backIndex) {
return;
}
int categoryId = optionCategories[selection];
if (mastery_current_level(categoryId) >= mastery_max_level(categoryId)) {
dictionary maxedArgs;
maxedArgs.set("category", mastery_category_name(categoryId));
speak_with_history(trf("system.goals.mastery.already_maxed", maxedArgs), true);
continue;
}
int cost = mastery_cost_for_next_level(categoryId);
if (goalPointsUnspent < cost) {
dictionary args;
args.set("cost", cost);
args.set("unspent", goalPointsUnspent);
speak_with_history(trf("system.goals.mastery.not_enough_points", args), true);
continue;
}
dictionary promptArgs;
promptArgs.set("cost", cost);
promptArgs.set("unlock", mastery_unlock_label(categoryId, mastery_current_level(categoryId) + 1));
int confirm = ui_question("", trf("system.goals.mastery.confirm", promptArgs));
if (confirm != 1) {
speak_with_history(tr("system.menu.canceled"), true);
continue;
}
if (spend_mastery_point(categoryId)) {
options[selection] = mastery_level_summary(categoryId);
speak_with_history(options[selection], true);
} else {
speak_with_history(tr("system.goals.mastery.spend_failed"), true);
}
}
}
}
string goals_serialize_completed() {
string result = "";
for (int i = 0; i < GOAL_COUNT; i++) {
if (i > 0)
result += ",";
result += goalsCompleted[i] ? "1" : "0";
}
return result;
}
void goals_deserialize_completed(const string& in data) {
if (goalsCompleted.length() != GOAL_COUNT) {
goalsCompleted.resize(GOAL_COUNT);
}
for (int i = 0; i < GOAL_COUNT; i++) {
goalsCompleted[i] = false;
}
if (data.length() == 0)
return;
string[] @parts = data.split(",");
uint count = parts.length();
if (count > uint(GOAL_COUNT))
count = uint(GOAL_COUNT);
for (uint i = 0; i < count; i++) {
if (parts[i] == "1")
goalsCompleted[i] = true;
}
}
+3 -49
View File
@@ -15,14 +15,6 @@ const int EQUIP_POUCH = 8;
const int EQUIP_BOW = 9;
const int EQUIP_BACKPACK = 10;
const int EQUIP_FISHING_POLE = 11;
const int EQUIP_GREAT_SPEAR = 12;
// Great spear equipment: long reach only after Crafting Mastery 3, with slower
// attack recovery than a base spear at all levels.
const int GREAT_SPEAR_BASE_RANGE = 1;
const int GREAT_SPEAR_MASTERY_RANGE = 2;
const int GREAT_SPEAR_DAMAGE = 5;
const int GREAT_SPEAR_ATTACK_COOLDOWN_MS = 1100;
// Health bonuses from equipment
const int HAT_MAX_HEALTH_BONUS = 1;
@@ -33,7 +25,6 @@ const int MOCCASINS_MAX_HEALTH_BONUS = 2;
// Equipment state
bool spear_equipped = false;
bool great_spear_equipped = false;
bool axe_equipped = false;
bool sling_equipped = false;
bool bow_equipped = false;
@@ -145,8 +136,6 @@ string get_equipment_name(int equip_type) {
bool equipment_available(int equip_type) {
// Check unruned items first, then runed versions
if (equip_type == EQUIP_GREAT_SPEAR)
return get_personal_count(ITEM_GREAT_SPEARS) > 0 || has_any_runed_version(equip_type);
if (equip_type == EQUIP_SPEAR)
return get_personal_count(ITEM_SPEARS) > 0 || has_any_runed_version(equip_type);
if (equip_type == EQUIP_AXE)
@@ -175,10 +164,9 @@ bool equipment_available(int equip_type) {
}
void equip_equipment_type(int equip_type) {
if (equip_type == EQUIP_SPEAR || equip_type == EQUIP_GREAT_SPEAR || equip_type == EQUIP_AXE ||
equip_type == EQUIP_SLING || equip_type == EQUIP_BOW || equip_type == EQUIP_FISHING_POLE) {
if (equip_type == EQUIP_SPEAR || equip_type == EQUIP_AXE || equip_type == EQUIP_SLING || equip_type == EQUIP_BOW ||
equip_type == EQUIP_FISHING_POLE) {
spear_equipped = (equip_type == EQUIP_SPEAR);
great_spear_equipped = (equip_type == EQUIP_GREAT_SPEAR);
axe_equipped = (equip_type == EQUIP_AXE);
sling_equipped = (equip_type == EQUIP_SLING);
bow_equipped = (equip_type == EQUIP_BOW);
@@ -205,8 +193,6 @@ void equip_equipment_type(int equip_type) {
bool equipment_is_equipped(int equip_type) {
if (equip_type == EQUIP_SPEAR)
return spear_equipped;
if (equip_type == EQUIP_GREAT_SPEAR)
return great_spear_equipped;
if (equip_type == EQUIP_AXE)
return axe_equipped;
if (equip_type == EQUIP_SLING)
@@ -235,8 +221,6 @@ bool equipment_is_equipped(int equip_type) {
void unequip_equipment_type(int equip_type) {
if (equip_type == EQUIP_SPEAR) {
spear_equipped = false;
} else if (equip_type == EQUIP_GREAT_SPEAR) {
great_spear_equipped = false;
} else if (equip_type == EQUIP_AXE) {
axe_equipped = false;
} else if (equip_type == EQUIP_SLING) {
@@ -587,8 +571,6 @@ string format_favor(double value) {
string get_equipped_weapon_name() {
if (spear_equipped)
return get_base_equipment_name(EQUIP_SPEAR);
if (great_spear_equipped)
return get_base_equipment_name(EQUIP_GREAT_SPEAR);
if (axe_equipped)
return get_base_equipment_name(EQUIP_AXE);
if (sling_equipped)
@@ -619,17 +601,9 @@ string get_speed_status() {
return i18n_lookup_key_with_fallback("system.character.speed.normal", "normal");
}
int get_great_spear_range() {
if (get_crafting_mastery_level() >= 3)
return GREAT_SPEAR_MASTERY_RANGE;
return GREAT_SPEAR_BASE_RANGE;
}
void cleanup_equipment_after_inventory_change() {
if (!equipment_available(EQUIP_SPEAR))
spear_equipped = false;
if (!equipment_available(EQUIP_GREAT_SPEAR))
great_spear_equipped = false;
if (!equipment_available(EQUIP_AXE))
axe_equipped = false;
if (!equipment_available(EQUIP_SLING))
@@ -640,8 +614,7 @@ void cleanup_equipment_after_inventory_change() {
fishing_pole_equipped = false;
bool any_weapon_equipped =
spear_equipped || great_spear_equipped || axe_equipped || sling_equipped || bow_equipped ||
fishing_pole_equipped;
spear_equipped || axe_equipped || sling_equipped || bow_equipped || fishing_pole_equipped;
if (!any_weapon_equipped)
equipped_weapon_rune = RUNE_NONE;
@@ -676,22 +649,3 @@ void cleanup_equipment_after_inventory_change() {
clamp_arrows_to_quiver_limit();
update_max_health_from_equipment();
}
int get_equipped_weapon_equip_type() {
if (spear_equipped) return EQUIP_SPEAR;
if (great_spear_equipped) return EQUIP_GREAT_SPEAR;
if (axe_equipped) return EQUIP_AXE;
if (sling_equipped) return EQUIP_SLING;
if (bow_equipped) return EQUIP_BOW;
if (fishing_pole_equipped) return EQUIP_FISHING_POLE;
return EQUIP_NONE;
}
void unequip_all_weapons() {
spear_equipped = false;
great_spear_equipped = false;
axe_equipped = false;
sling_equipped = false;
bow_equipped = false;
fishing_pole_equipped = false;
}
+2 -4
View File
@@ -41,8 +41,7 @@ const int ITEM_FISH = 35;
const int ITEM_SMOKED_FISH = 36;
const int ITEM_HEAL_SCROLL = 37;
const int ITEM_BASKET_FOOD = 38;
const int ITEM_GREAT_SPEARS = 39;
const int ITEM_COUNT = 40; // Total number of item types
const int ITEM_COUNT = 39; // Total number of item types
// Item definition class
class ItemDefinition {
@@ -138,7 +137,6 @@ void init_item_registry() {
ItemDefinition(ITEM_HEAL_SCROLL, "heal scrolls", "heal scroll", "Heal Scrolls", 0.50);
item_registry[ITEM_BASKET_FOOD] = ItemDefinition(ITEM_BASKET_FOOD, "baskets of fruits and nuts",
"basket of fruits and nuts", "Baskets of Fruits and Nuts", 0.15);
item_registry[ITEM_GREAT_SPEARS] = ItemDefinition(ITEM_GREAT_SPEARS, "great spears", "great spear", "Great Spears", 1.20);
// Define display order for inventory menus
// This controls the order items appear in menus
@@ -152,7 +150,7 @@ void init_item_registry() {
// Misc items
ITEM_INCENSE, ITEM_HEAL_SCROLL,
// Weapons
ITEM_SPEARS, ITEM_GREAT_SPEARS, ITEM_SLINGS, ITEM_AXES, ITEM_BOWS, ITEM_ARROWS, ITEM_QUIVERS, ITEM_BOWSTRINGS,
ITEM_SPEARS, ITEM_SLINGS, ITEM_AXES, ITEM_BOWS, ITEM_ARROWS, ITEM_QUIVERS, ITEM_BOWSTRINGS,
// Tools
ITEM_SNARES, ITEM_KNIVES, ITEM_FISHING_POLES, ITEM_ROPES, ITEM_REED_BASKETS, ITEM_CLAY_POTS, ITEM_CANOES,
// Clothing
+1 -1
View File
@@ -18,7 +18,7 @@ void run_base_info_menu() {
if (world_storages.length() > 0) {
options.insert_last("Storage built. Total items " + get_storage_total_items());
int daily_food = residents_count * (24 / get_resident_food_interval_hours());
int daily_food = residents_count * 3; // 1 per resident per 8 hours = 3 per day
int meat_in_storage = get_storage_count(ITEM_MEAT);
int smoked_fish_in_storage = get_storage_count(ITEM_SMOKED_FISH);
int basket_food_in_storage = get_storage_count(ITEM_BASKET_FOOD);
+1 -14
View File
@@ -122,23 +122,15 @@ void run_character_info_menu() {
favorArgs.set("favor", format_favor(favor));
options.insert_last(trf("system.character.info.favor", favorArgs));
dictionary pointsArgs;
pointsArgs.set("unspent", goalPointsUnspent);
pointsArgs.set("earned", goalPointsEarned);
options.insert_last(trf("system.character.info.goals", pointsArgs));
dictionary speedArgs;
speedArgs.set("status", get_speed_status());
options.insert_last(trf("system.character.info.speed", speedArgs));
int goalsOptionIndex = options.length();
options.insert_last(tr("system.character.info.goals_menu"));
if (petActive) {
dictionary petArgs;
petArgs.set("pet", get_pet_display_name());
petArgs.set("health", petHealth);
petArgs.set("max_health", get_pet_max_health());
petArgs.set("max_health", PET_HEALTH_MAX);
petArgs.set("loyalty", petLoyalty);
petArgs.set("max_loyalty", PET_LOYALTY_MAX);
string petInfo = trf("system.character.info.pet", petArgs);
@@ -223,11 +215,6 @@ void run_character_info_menu() {
continue;
int optionIndex = filtered_indices[selection];
if (optionIndex == goalsOptionIndex) {
play_menu_select_sound();
run_goals_menu();
return;
}
if (optionIndex == petOptionIndex && petActive) {
if (is_pet_knocked_out()) {
dictionary args;
+1 -8
View File
@@ -4,8 +4,7 @@
// Check if player has any equipment (including runed items)
bool has_any_equipment() {
// Check unruned items
if (get_personal_count(ITEM_SPEARS) > 0 || get_personal_count(ITEM_GREAT_SPEARS) > 0 ||
get_personal_count(ITEM_AXES) > 0 ||
if (get_personal_count(ITEM_SPEARS) > 0 || get_personal_count(ITEM_AXES) > 0 ||
get_personal_count(ITEM_SLINGS) > 0 || get_personal_count(ITEM_BOWS) > 0 ||
get_personal_count(ITEM_FISHING_POLES) > 0 || get_personal_count(ITEM_SKIN_HATS) > 0 ||
get_personal_count(ITEM_SKIN_GLOVES) > 0 || get_personal_count(ITEM_SKIN_PANTS) > 0 ||
@@ -74,12 +73,6 @@ void run_equipment_menu() {
equipment_types.insert_last(EQUIP_SPEAR);
rune_types.insert_last(RUNE_NONE);
}
if (get_personal_count(ITEM_GREAT_SPEARS) > 0) {
string status = get_equipment_menu_equipped_suffix(is_runed_item_equipped(EQUIP_GREAT_SPEAR, RUNE_NONE));
options.insert_last(get_full_equipment_name(EQUIP_GREAT_SPEAR, RUNE_NONE) + status);
equipment_types.insert_last(EQUIP_GREAT_SPEAR);
rune_types.insert_last(RUNE_NONE);
}
if (get_personal_count(ITEM_SLINGS) > 0) {
string status = get_equipment_menu_equipped_suffix(is_runed_item_equipped(EQUIP_SLING, RUNE_NONE));
options.insert_last(get_full_equipment_name(EQUIP_SLING, RUNE_NONE) + status);
+9 -54
View File
@@ -237,7 +237,7 @@ string get_health_report() {
dictionary petArgs;
petArgs.set("pet", get_pet_display_name());
petArgs.set("health", petHealth);
petArgs.set("max", get_pet_max_health());
petArgs.set("max", PET_HEALTH_MAX);
petArgs.set("loyalty", petLoyalty);
petArgs.set("max_loyalty", PET_LOYALTY_MAX);
report += ", " + trf("system.character.report.pet", petArgs);
@@ -375,7 +375,7 @@ void knock_out_pet() {
if (!petActive)
return;
petHealth = 0;
petKnockoutHoursRemaining = get_pet_knockout_cooldown_hours();
petKnockoutHoursRemaining = PET_KNOCKOUT_COOLDOWN_HOURS;
petOut = false;
petPositionValid = false;
stop_pet_travel();
@@ -537,18 +537,11 @@ void clamp_pet_loyalty() {
petLoyalty = 0;
if (petLoyalty > PET_LOYALTY_MAX)
petLoyalty = PET_LOYALTY_MAX;
if (taming_mastery_prevents_pet_hunger() && petActive)
petLoyalty = PET_LOYALTY_MAX;
}
void adjust_pet_loyalty(int delta) {
if (!petActive)
return;
if (taming_mastery_prevents_pet_hunger() && delta < 0) {
petLoyalty = PET_LOYALTY_MAX;
petHungryWarned = false;
return;
}
petLoyalty += delta;
clamp_pet_loyalty();
if (petLoyalty <= 0) {
@@ -618,20 +611,19 @@ void adopt_pet(const string& in soundPath) {
petSoundPath = soundPath;
petType = get_pet_name_from_sound_path(soundPath);
petGender = (random(0, 1) == 0) ? "Male" : "Female";
petLoyalty = taming_mastery_prevents_pet_hunger() ? PET_LOYALTY_MAX : PET_START_LOYALTY;
petLoyalty = PET_START_LOYALTY;
petHungryWarned = false;
petOut = false;
petRecallRequested = false;
petPosition = 0;
petPositionValid = false;
petHealth = get_pet_max_health();
petHealth = PET_HEALTH_MAX;
petKnockoutHoursRemaining = 0;
petAttackTimer.restart();
petRetrieveTimer.restart();
petTravelTimer.restart();
dictionary joinsArgs;
joinsArgs.set("pet", get_pet_display_name());
complete_goal(GOAL_TAME_PET);
speak_with_history(trf("system.pet.joins_you", joinsArgs), true);
}
@@ -852,8 +844,6 @@ void update_pet_travel() {
hit = damage_undead_at(petTravelTargetPos, damage);
} else if (petTravelTargetKind == 2) {
hit = damage_boar_at(petTravelTargetPos, damage);
} else if (petTravelTargetKind == 3) {
hit = damage_corpse_worm_at(petTravelTargetPos, damage);
}
}
if (hit) {
@@ -869,7 +859,7 @@ void update_pet_travel() {
string nextTargetLabel = "";
int nextTargetKind = -1;
bool hasNextTarget = find_pet_attack_target(nextTargetPos, nextTargetLabel, nextTargetKind);
if (!hasNextTarget && taming_mastery_allows_retrieval()) {
if (!hasNextTarget) {
WorldDrop @drop = find_pet_drop_target();
if (drop !is null) {
petRetrieveTimer.restart();
@@ -1080,8 +1070,6 @@ WorldDrop @find_pet_drop_target() {
void update_pet_retrieval() {
if (!petActive)
return;
if (!taming_mastery_allows_retrieval())
return;
if (!petOut)
return;
if (petLoyalty <= 0)
@@ -1153,18 +1141,6 @@ bool find_pet_attack_target(int& out targetPos, string& out targetLabel, int& ou
}
}
for (uint i = 0; i < corpse_worms.length(); i++) {
int distance = abs(corpse_worms[i].position - origin);
if (distance > PET_RANGE)
continue;
if (distance < bestDistance) {
bestDistance = distance;
targetPos = corpse_worms[i].position;
targetLabel = i18n_text("corpse worm");
targetKind = 3;
}
}
return targetPos != -1;
}
@@ -1213,17 +1189,6 @@ bool find_pet_attack_target_by_kind(int targetKind, int referencePos, int& out t
targetPos = ground_games[i].position;
}
}
} else if (targetKind == 3) {
for (uint i = 0; i < corpse_worms.length(); i++) {
int distanceToOrigin = abs(corpse_worms[i].position - origin);
if (distanceToOrigin > PET_RANGE)
continue;
int distance = abs(corpse_worms[i].position - referencePos);
if (distance < bestDistance) {
bestDistance = distance;
targetPos = corpse_worms[i].position;
}
}
}
return targetPos != -1;
@@ -1265,11 +1230,9 @@ void update_pet_follow() {
if (petTravelActive)
return;
if (taming_mastery_allows_retrieval()) {
WorldDrop @drop = find_pet_drop_target();
if (drop !is null)
return;
}
int targetPos = -1;
string targetLabel = "";
@@ -1318,25 +1281,17 @@ void handle_pet_hourly_update(int hour) {
petKnockoutHoursRemaining--;
if (petKnockoutHoursRemaining <= 0) {
petKnockoutHoursRemaining = 0;
petHealth = get_pet_max_health();
petHealth = PET_HEALTH_MAX;
dictionary recoveredArgs;
recoveredArgs.set("pet", get_pet_display_name());
notify(trf("system.pet.recovered_from_injuries", recoveredArgs));
}
}
int maxHealth = get_pet_max_health();
if (petKnockoutHoursRemaining <= 0 && !petOut && petHealth > 0 && petHealth < maxHealth) {
if (petKnockoutHoursRemaining <= 0 && !petOut && petHealth > 0 && petHealth < PET_HEALTH_MAX) {
petHealth += 1;
if (petHealth > maxHealth)
petHealth = maxHealth;
}
if (taming_mastery_prevents_pet_hunger()) {
petLoyalty = PET_LOYALTY_MAX;
petHungryWarned = false;
attempt_pet_random_find();
return;
if (petHealth > PET_HEALTH_MAX)
petHealth = PET_HEALTH_MAX;
}
if (petOut) {
-1
View File
@@ -187,7 +187,6 @@ void apply_quest_reward(int score) {
scoreArgs.set("score", score);
message += "\n" + trf("system.quest.rewards.score_line", scoreArgs);
text_reader(message, tr("system.quest.rewards.title"), true);
complete_goal(GOAL_COMPLETE_QUEST);
attempt_pet_offer_from_quest(score);
}
+2 -9
View File
@@ -175,13 +175,8 @@ bool withdraw_runed_item(int equip_type, int rune_type) {
}
// Get the rune type on equipped item for a given slot
bool is_weapon_equipment_type(int equip_type) {
return equip_type == EQUIP_SPEAR || equip_type == EQUIP_GREAT_SPEAR || equip_type == EQUIP_AXE ||
equip_type == EQUIP_SLING || equip_type == EQUIP_BOW;
}
int get_equipped_rune_for_slot(int equip_type) {
if (is_weapon_equipment_type(equip_type)) {
if (equip_type == EQUIP_SPEAR || equip_type == EQUIP_AXE || equip_type == EQUIP_SLING || equip_type == EQUIP_BOW) {
return equipped_weapon_rune;
}
if (equip_type == EQUIP_HAT)
@@ -201,7 +196,7 @@ int get_equipped_rune_for_slot(int equip_type) {
// Set the rune on an equipped item slot
void set_equipped_rune_for_slot(int equip_type, int rune_type) {
if (is_weapon_equipment_type(equip_type)) {
if (equip_type == EQUIP_SPEAR || equip_type == EQUIP_AXE || equip_type == EQUIP_SLING || equip_type == EQUIP_BOW) {
equipped_weapon_rune = rune_type;
return;
}
@@ -240,7 +235,6 @@ void clear_equipped_rune_for_slot(int equip_type) {
int[] get_runeable_equipment_types() {
int[] types;
types.insert_last(EQUIP_SPEAR);
types.insert_last(EQUIP_GREAT_SPEAR);
types.insert_last(EQUIP_AXE);
types.insert_last(EQUIP_SLING);
types.insert_last(EQUIP_BOW);
@@ -258,7 +252,6 @@ int[] get_runeable_equipment_types_for_rune(int rune_type) {
if (rune_type == RUNE_DESTRUCTION) {
int[] types;
types.insert_last(EQUIP_SPEAR);
types.insert_last(EQUIP_GREAT_SPEAR);
types.insert_last(EQUIP_AXE);
types.insert_last(EQUIP_SLING);
types.insert_last(EQUIP_BOW);
+8 -100
View File
@@ -554,7 +554,6 @@ void clear_world_objects() {
clear_zombies();
clear_bandits();
clear_corpse_worms();
clear_flying_creatures();
clear_mountains();
clear_world_drops();
@@ -625,14 +624,11 @@ void reset_game_state() {
blessing_search_active = false;
reset_fylgja_state();
reset_pet_state();
reset_goal_state();
// Reset inventory using the registry system
reset_inventory();
reset_rune_data();
spear_equipped = false;
great_spear_equipped = false;
axe_equipped = false;
sling_equipped = false;
bow_equipped = false;
@@ -720,7 +716,6 @@ void start_new_game() {
if (current_save_file == "") {
current_save_file = get_save_filename_for_name(player_name);
}
queue_current_goal_announcement(false);
save_game_state();
}
@@ -881,7 +876,6 @@ bool save_game_state() {
saveData.set("storage_fish_weights", join_string_array(storageFishWeightsData));
saveData.set("equipment_spear_equipped", spear_equipped);
saveData.set("equipment_great_spear_equipped", great_spear_equipped);
saveData.set("equipment_axe_equipped", axe_equipped);
saveData.set("equipment_sling_equipped", sling_equipped);
saveData.set("equipment_bow_equipped", bow_equipped);
@@ -980,14 +974,6 @@ bool save_game_state() {
}
saveData.set("quest_queue", join_string_array(questData));
saveData.set("goals_completed", goals_serialize_completed());
saveData.set("goal_points_unspent", goalPointsUnspent);
saveData.set("goal_points_earned", goalPointsEarned);
saveData.set("crafting_mastery_level", craftingMasteryLevel);
saveData.set("leadership_mastery_level", leadershipMasteryLevel);
saveData.set("taming_mastery_level", tamingMasteryLevel);
saveData.set("trees_chopped", treesChopped);
saveData.set("weather_data", serialize_weather());
saveData.set("world_map_size", MAP_SIZE);
@@ -1230,21 +1216,16 @@ bool load_game_state_from_file(const string& in filename) {
if (petActive) {
if (petKnockoutHoursRemaining < 0)
petKnockoutHoursRemaining = 0;
int knockoutCooldown = get_pet_knockout_cooldown_hours();
if (petKnockoutHoursRemaining > knockoutCooldown) {
petKnockoutHoursRemaining = knockoutCooldown;
if (petKnockoutHoursRemaining > PET_KNOCKOUT_COOLDOWN_HOURS) {
petKnockoutHoursRemaining = PET_KNOCKOUT_COOLDOWN_HOURS;
}
if (petKnockoutHoursRemaining > 0) {
petHealth = 0;
} else {
if (petHealth <= 0)
petHealth = get_pet_max_health();
if (petHealth > get_pet_max_health())
petHealth = get_pet_max_health();
}
if (taming_mastery_prevents_pet_hunger()) {
petLoyalty = PET_LOYALTY_MAX;
petHungryWarned = false;
petHealth = PET_HEALTH_MAX;
if (petHealth > PET_HEALTH_MAX)
petHealth = PET_HEALTH_MAX;
}
petAttackTimer.restart();
petRetrieveTimer.restart();
@@ -1333,7 +1314,6 @@ bool load_game_state_from_file(const string& in filename) {
}
spear_equipped = get_bool(saveData, "equipment_spear_equipped", false);
great_spear_equipped = get_bool(saveData, "equipment_great_spear_equipped", false);
axe_equipped = get_bool(saveData, "equipment_axe_equipped", false);
sling_equipped = get_bool(saveData, "equipment_sling_equipped", false);
bow_equipped = get_bool(saveData, "equipment_bow_equipped", false);
@@ -1352,7 +1332,7 @@ bool load_game_state_from_file(const string& in filename) {
slot_count = quick_slots.length();
for (uint i = 0; i < slot_count; i++) {
int slot_value = parse_int(loadedQuickSlots[i]);
if (slot_value >= EQUIP_NONE && slot_value <= EQUIP_GREAT_SPEAR) {
if (slot_value >= EQUIP_NONE && slot_value <= EQUIP_FISHING_POLE) {
quick_slots[i] = slot_value;
}
}
@@ -1425,8 +1405,6 @@ bool load_game_state_from_file(const string& in filename) {
// Validate equipped items now that runed items are loaded
if (!equipment_available(EQUIP_SPEAR))
spear_equipped = false;
if (!equipment_available(EQUIP_GREAT_SPEAR))
great_spear_equipped = false;
if (!equipment_available(EQUIP_AXE))
axe_equipped = false;
if (!equipment_available(EQUIP_SLING))
@@ -1437,8 +1415,7 @@ bool load_game_state_from_file(const string& in filename) {
fishing_pole_equipped = false;
bool any_weapon_equipped =
spear_equipped || great_spear_equipped || axe_equipped || sling_equipped || bow_equipped ||
fishing_pole_equipped;
spear_equipped || axe_equipped || sling_equipped || bow_equipped || fishing_pole_equipped;
if (!any_weapon_equipped)
equipped_weapon_rune = RUNE_NONE;
@@ -1583,60 +1560,6 @@ bool load_game_state_from_file(const string& in filename) {
}
}
init_goal_state();
string loadedGoals;
if (saveData.get("goals_completed", loadedGoals)) {
goals_deserialize_completed(loadedGoals);
}
goalPointsUnspent = int(get_number(saveData, "goal_points_unspent", 0));
goalPointsEarned = int(get_number(saveData, "goal_points_earned", 0));
craftingMasteryLevel = int(get_number(saveData, "crafting_mastery_level", 0));
leadershipMasteryLevel = int(get_number(saveData, "leadership_mastery_level", 0));
tamingMasteryLevel = int(get_number(saveData, "taming_mastery_level", 0));
treesChopped = int(get_number(saveData, "trees_chopped", 0));
if (goalPointsUnspent < 0)
goalPointsUnspent = 0;
if (goalPointsEarned < goalPointsUnspent)
goalPointsEarned = goalPointsUnspent;
if (craftingMasteryLevel < 0)
craftingMasteryLevel = 0;
if (craftingMasteryLevel > MASTERY_MAX_LEVEL)
craftingMasteryLevel = MASTERY_MAX_LEVEL;
if (leadershipMasteryLevel < 0)
leadershipMasteryLevel = 0;
if (leadershipMasteryLevel > MASTERY_MAX_LEVEL)
leadershipMasteryLevel = MASTERY_MAX_LEVEL;
if (tamingMasteryLevel < 0)
tamingMasteryLevel = 0;
if (tamingMasteryLevel > MASTERY_MAX_LEVEL)
tamingMasteryLevel = MASTERY_MAX_LEVEL;
if (treesChopped < 0)
treesChopped = 0;
if (current_day >= 9) {
complete_goal_silent(GOAL_SURVIVE_DAY_9);
}
if (petActive) {
complete_goal_silent(GOAL_TAME_PET);
}
if (petActive) {
int knockoutCooldown = get_pet_knockout_cooldown_hours();
if (petKnockoutHoursRemaining > knockoutCooldown)
petKnockoutHoursRemaining = knockoutCooldown;
if (petKnockoutHoursRemaining > 0) {
petHealth = 0;
} else {
int maxPetHealth = get_pet_max_health();
if (petHealth <= 0)
petHealth = maxPetHealth;
if (petHealth > maxPetHealth)
petHealth = maxPetHealth;
}
if (taming_mastery_prevents_pet_hunger()) {
petLoyalty = PET_LOYALTY_MAX;
petHungryWarned = false;
}
}
if (current_hour < 0)
current_hour = 0;
if (current_hour > 23)
@@ -1644,7 +1567,7 @@ bool load_game_state_from_file(const string& in filename) {
if (current_day < 1)
current_day = 1;
is_daytime = is_day_hour_for_day(current_hour, current_day);
is_daytime = (current_hour >= 6 && current_hour < 19);
hour_timer.restart();
string weather_data;
@@ -1718,9 +1641,6 @@ bool load_game_state_from_file(const string& in filename) {
for (uint i = 0; i < herbPositions.length(); i++) {
add_world_herb_garden(parse_int(herbPositions[i]));
}
if (world_herb_gardens.length() > 0) {
complete_goal_silent(GOAL_BUILD_HERB_GARDEN);
}
string[] storagePositions = get_string_list_or_split(saveData, "storages_positions");
for (uint i = 0; i < storagePositions.length(); i++) {
@@ -1732,29 +1652,17 @@ bool load_game_state_from_file(const string& in filename) {
} else {
storage_level = (world_storages.length() > 0) ? STORAGE_LEVEL_UPGRADE_1 : STORAGE_LEVEL_BASE;
}
if (storage_level >= STORAGE_LEVEL_UPGRADE_1) {
complete_goal_silent(GOAL_BUILD_STORAGE);
}
if (storage_level >= STORAGE_LEVEL_UPGRADE_2) {
complete_goal_silent(GOAL_UPGRADE_STORAGE_2);
}
ensure_base_storage();
string[] pasturePositions = get_string_list_or_split(saveData, "pastures_positions");
for (uint i = 0; i < pasturePositions.length(); i++) {
add_world_pasture(parse_int(pasturePositions[i]));
}
if (world_pastures.length() > 0) {
complete_goal_silent(GOAL_BUILD_PASTURE);
}
string[] stablePositions = get_string_list_or_split(saveData, "stables_positions");
for (uint i = 0; i < stablePositions.length(); i++) {
add_world_stable(parse_int(stablePositions[i]));
}
if (world_stables.length() > 0) {
complete_goal_silent(GOAL_BUILD_STABLE);
}
string[] altarPositions = get_string_list_or_split(saveData, "altars_positions");
for (uint i = 0; i < altarPositions.length(); i++) {
-2
View File
@@ -34,8 +34,6 @@ void configure_project_learn_sounds() {
learn_sounds_add_description("sounds/enemies/invasion.ogg", i18n_text("The war drums pound! Prepare for combat!"));
learn_sounds_add_description("sounds/items/miscellaneous.ogg",
i18n_text("You picked up an item for which there is no specific sound."));
learn_sounds_add_description("sounds/enemies/corpse_worm.ogg",
i18n_text("A weak crawling enemy that starts appearing outside the base after day 1."));
learn_sounds_add_description("sounds/enemies/goblin1.ogg", i18n_text("Inhabits mountainous regions."));
learn_sounds_add_description("sounds/enemies/undead_resident1.ogg",
i18n_text("Not quite a zombie nor a vampyr. These undead remember they used to have a home, and "
+20 -94
View File
@@ -1,9 +1,6 @@
// Time System
// 1 real minute = 1 in-game hour
const int MS_PER_HOUR = 60000;
const int DAY_START_HOUR = 6;
const int NIGHT_START_BASE_HOUR = 19;
const int NIGHT_START_SHIFT_DAYS = 9;
int current_hour = 8; // Start at 8 AM
int current_day = 1; // Track current day
@@ -125,11 +122,6 @@ void resolve_pending_player_item_break() {
return;
if (x > BASE_END)
return;
if (crafting_mastery_prevents_personal_wear()) {
playerItemBreakPending = false;
playerItemBreakPendingType = -1;
return;
}
if (playerItemBreakPendingType == -1) {
playerItemBreakPending = false;
return;
@@ -146,8 +138,6 @@ void resolve_pending_player_item_break() {
void attempt_player_item_break_check() {
if (playerItemBreakPending)
return;
if (crafting_mastery_prevents_personal_wear())
return;
if (playerItemBreaksToday >= PLAYER_ITEM_BREAKS_PER_DAY)
return;
@@ -157,8 +147,7 @@ void attempt_player_item_break_check() {
return;
int roll = random(1, PLAYER_ITEM_BREAK_ROLL_MAX);
float masteryMultiplier = get_crafting_mastery_break_multiplier();
int checkChance = int(playerItemBreakChance * masteryMultiplier); // Floor for comparison
int checkChance = int(playerItemBreakChance); // Floor for comparison
if (roll <= checkChance) {
int pickIndex = random(0, int(breakableItems.length()) - 1);
int itemType = breakableItems[pickIndex];
@@ -364,24 +353,6 @@ void start_invasion() {
notify(trf("system.time.event.invasion_start", args));
}
int get_undead_resident_raid_count() {
int count = UNDEAD_RESIDENT_RAID_BASE_COUNT + (current_day / UNDEAD_RESIDENT_RAID_DAYS_PER_EXTRA);
if (count > UNDEAD_RESIDENT_RAID_MAX_COUNT)
count = UNDEAD_RESIDENT_RAID_MAX_COUNT;
return count;
}
void start_undead_resident_raid() {
int count = get_undead_resident_raid_count();
for (int i = 0; i < count; i++) {
spawn_undead("undead_resident", false);
}
dictionary args;
args.set("count", count);
notify(trf("system.time.event.undead_resident_raid", args));
}
void update_invasion_chance_for_new_day() {
if (current_day == 2) {
invasion_chance = 100;
@@ -406,52 +377,17 @@ int get_random_invasion_hour(int min_hour) {
return random(min_hour, 11);
}
int get_night_start_hour_for_day(int day) {
if (day < 1)
day = 1;
int nightStartHour = NIGHT_START_BASE_HOUR - (day / NIGHT_START_SHIFT_DAYS);
if (nightStartHour < DAY_START_HOUR)
nightStartHour = DAY_START_HOUR;
return nightStartHour;
}
int get_current_night_start_hour() {
return get_night_start_hour_for_day(current_day);
}
bool is_night_hour_for_day(int hour, int day) {
int nightStartHour = get_night_start_hour_for_day(day);
return hour < DAY_START_HOUR || hour >= nightStartHour;
}
bool is_night_hour(int hour) {
return is_night_hour_for_day(hour, current_day);
}
bool is_day_hour_for_day(int hour, int day) {
return !is_night_hour_for_day(hour, day);
}
bool is_day_hour(int hour) {
return !is_night_hour(hour);
}
bool has_daylight_for_day(int day) {
return get_night_start_hour_for_day(day) > DAY_START_HOUR;
}
bool has_daylight_today() {
return has_daylight_for_day(current_day);
return hour < 6 || hour >= 19;
}
int get_random_zombie_swarm_hour(int min_hour) {
if (!is_night_hour(min_hour))
return -1;
int nightStartHour = get_current_night_start_hour();
if (min_hour >= nightStartHour) {
if (min_hour >= 19) {
return random(min_hour, 23);
}
return random(min_hour, DAY_START_HOUR - 1);
return random(min_hour, 5);
}
void schedule_invasion() {
@@ -472,11 +408,7 @@ void check_scheduled_invasion() {
if (current_hour == invasion_scheduled_hour) {
invasion_scheduled_hour = -1;
invasion_triggered_today = true;
if (is_daytime) {
start_invasion();
} else {
start_undead_resident_raid();
}
} else if (current_hour > 11) {
invasion_scheduled_hour = -1;
}
@@ -887,13 +819,9 @@ void update_time() {
if (hour_timer.elapsed >= MS_PER_HOUR) {
hour_timer.restart();
current_hour++;
allow_delayed_goal_announcement();
if (current_hour >= 24) {
current_hour = 0;
current_day++;
if (current_day >= 9) {
complete_goal(GOAL_SURVIVE_DAY_9);
}
area_expanded_today = false; // Reset for new day
update_invasion_chance_for_new_day();
invasion_triggered_today = false;
@@ -906,24 +834,22 @@ void update_time() {
playerItemBreaksToday = 0;
}
// Residents consume food on the interval controlled by Leadership Mastery.
if (current_hour % get_resident_food_interval_hours() == 0) {
// Residents consume food every 8 hours (at midnight, 8am, 4pm)
if (current_hour % 8 == 0) {
consume_food_for_residents();
}
handle_pet_hourly_update(current_hour);
int nightStartHour = get_current_night_start_hour();
int sunsetWarningHour = nightStartHour - 1;
if (has_daylight_today() && current_hour == sunsetWarningHour && !sun_setting_warned) {
if (current_hour == 18 && !sun_setting_warned) {
notify(tr("system.time.event.sun_setting"));
sun_setting_warned = true;
} else if (current_hour == nightStartHour) {
} else if (current_hour == 19) {
sun_setting_warned = false;
}
if (has_daylight_today() && current_hour == DAY_START_HOUR - 1 && !sunrise_warned) {
if (current_hour == 5 && !sunrise_warned) {
notify(tr("system.time.event.sky_brightening"));
sunrise_warned = true;
} else if (current_hour == DAY_START_HOUR) {
} else if (current_hour == 6) {
sunrise_warned = false;
}
@@ -934,7 +860,7 @@ void update_time() {
check_ambience_transition();
// Safety: if crossfade failed or was skipped, align day/night with the current hour.
if (!crossfade_active) {
bool expected_daytime = is_day_hour(current_hour);
bool expected_daytime = (current_hour >= 6 && current_hour < 19);
if (expected_daytime != is_daytime) {
is_daytime = expected_daytime;
update_ambience(true);
@@ -942,7 +868,7 @@ void update_time() {
}
if (is_daytime && residents_count > 0 && barricade_health < BARRICADE_MAX_HEALTH) {
const int day_start_hour = DAY_START_HOUR;
const int day_start_hour = 6;
const int day_end_hour = 18; // Exclusive for repair scheduling (12-hour window)
if (current_hour >= day_start_hour && current_hour < day_end_hour) {
int repair_window_hours = day_end_hour - day_start_hour;
@@ -963,7 +889,7 @@ void update_time() {
}
}
if (current_hour == DAY_START_HOUR) {
if (current_hour == 6) {
if (undead_residents_pending > 0) {
undead_residents_count += undead_residents_pending;
undead_residents_pending = 0;
@@ -995,7 +921,7 @@ void update_time() {
attempt_resident_fishing();
attempt_resident_fish_smoking();
attempt_livestock_production();
if (current_hour == DAY_START_HOUR) {
if (current_hour == 6) {
save_game_state();
}
}
@@ -1086,16 +1012,16 @@ string get_time_string() {
}
void check_ambience_transition() {
int nightStartHour = get_current_night_start_hour();
if (!has_daylight_today())
return;
// Day is 6 (6AM) to 18 (6PM inclusive, so transition starts at hour 18)
// Night is 19 (7PM) to 5 (5AM inclusive, so transition starts at hour 5)
// Crossfade begins at hour 18 (sunset) and hour 5 (sunrise)
// Start crossfade to night one hour before the current day's night boundary.
if (current_hour == nightStartHour - 1 && is_daytime && !crossfade_active) {
// Start crossfade to night at hour 18
if (current_hour == 18 && is_daytime && !crossfade_active) {
start_crossfade(true); // Fade to night
}
// Start crossfade to day at hour 5
else if (current_hour == DAY_START_HOUR - 1 && !is_daytime && !crossfade_active) {
else if (current_hour == 5 && !is_daytime && !crossfade_active) {
start_crossfade(false); // Fade to day
}
}
-2
View File
@@ -28,8 +28,6 @@ int get_current_weapon_range() {
return BOW_RANGE;
if (spear_equipped)
return 1;
if (great_spear_equipped)
return get_great_spear_range();
if (axe_equipped)
return 0;
return -1;
-1
View File
@@ -102,7 +102,6 @@ class WorldSnare {
snareCaughtArgs.set("catch_type", i18n_translate_fragment_value(catch_type));
snareCaughtArgs.set("position", position);
notify(trf("system.snare.caught_at", snareCaughtArgs));
complete_goal(GOAL_CATCH_SNARE);
}
}
}