Bestiary in the title and pause menu; attacks look bigger with the unit level
- tabs: creatures, humans (incl. cave dwarves), dungeon buildings and towers, ranks - every unit at every level: sprite with gear, rank badge, health, attack, range, speed, wage or bounty, what attracts it - Crookfinger's texts: loving about the creatures, disgusted about the humans (EN/DE) - projectiles, hit sparks and splashes grow with the attacker's level, with halos from Lv 5 and glow at Lv 9+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9a9f04ae1f
commit
1016ee5d6c
8 files changed
+514
-12
No files matched your search
+21
@@ -12,6 +12,8 @@ use crate::settings::{all_actions, key_name, Action, Settings};
|
||||
use crate::ui::{grid_center, grid_center_y, mouse, sh, sw, tool_info, wrap, CH, CW, DIM, FRAME, FRAME_HI, GOLD, S, SMALL, TITLE, TOOLS, TXT};
|
||||
use macroquad::prelude::*;
|
||||
|
||||
mod bestiary;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||
pub enum Page {
|
||||
Title,
|
||||
@@ -24,6 +26,7 @@ pub enum Page {
|
||||
Briefing { mission: usize, ingame: bool }, // story and goals of a mission
|
||||
Login, // login to the savegame service (before the title)
|
||||
Account, // password, logout, users (admin)
|
||||
Bestiary { tab: usize, sel: usize, level: u32, from_title: bool }, // units, buildings, ranks
|
||||
}
|
||||
|
||||
pub const TABS: [&str; 5] = ["set.tab.sound", "set.tab.camera", "set.tab.graphics", "set.tab.game", "set.tab.keys"];
|
||||
@@ -214,6 +217,11 @@ enum Btn {
|
||||
Logout,
|
||||
CreateUser,
|
||||
DeleteUser(usize),
|
||||
Bestiary,
|
||||
BestTab(usize),
|
||||
BestSel(i32),
|
||||
BestPick(usize),
|
||||
BestLevel(i32),
|
||||
}
|
||||
|
||||
pub const REPO_URL: &str = "https://git.familie-zink.org/zink/dungeoncraft";
|
||||
@@ -325,6 +333,8 @@ impl Menu {
|
||||
Some(Page::Campaign) => Some(Page::Title),
|
||||
Some(Page::Login) => Some(Page::Login),
|
||||
Some(Page::Account) => Some(Page::Title),
|
||||
Some(Page::Bestiary { from_title: true, .. }) => Some(Page::Title),
|
||||
Some(Page::Bestiary { from_title: false, .. }) => Some(Page::Pause),
|
||||
Some(Page::Briefing { ingame: true, .. }) => Some(Page::Pause),
|
||||
Some(Page::Briefing { ingame: false, .. }) => Some(Page::Campaign),
|
||||
Some(Page::Pause) => None,
|
||||
@@ -547,6 +557,14 @@ impl Menu {
|
||||
}
|
||||
MenuAction::Consumed
|
||||
}
|
||||
Some(Btn::Bestiary) => {
|
||||
self.open_bestiary(from_title);
|
||||
MenuAction::Consumed
|
||||
}
|
||||
Some(b @ (Btn::BestTab(_) | Btn::BestSel(_) | Btn::BestPick(_) | Btn::BestLevel(_))) => {
|
||||
self.bestiary_click(b);
|
||||
MenuAction::Consumed
|
||||
}
|
||||
Some(Btn::FileSave) => MenuAction::FileSave,
|
||||
Some(Btn::FileLoad) => MenuAction::FileLoad,
|
||||
}
|
||||
@@ -568,6 +586,7 @@ impl Menu {
|
||||
Page::Login => self.draw_login(gfx, cloud),
|
||||
Page::Account => self.draw_account(gfx, cloud),
|
||||
Page::Briefing { mission, ingame } => self.draw_briefing(gfx, mission, ingame),
|
||||
Page::Bestiary { tab, sel, level, .. } => self.draw_bestiary(gfx, tab, sel, level),
|
||||
Page::KeyCapture { action, .. } => {
|
||||
self.draw_settings(gfx, settings, 4);
|
||||
self.buttons.clear();
|
||||
@@ -629,6 +648,7 @@ impl Menu {
|
||||
items.push((Btn::Account, trf("menu.account", &[s.name.clone()])));
|
||||
items.push((Btn::Standalone, tr("menu.standalone")));
|
||||
}
|
||||
items.push((Btn::Bestiary, tr("menu.bestiary")));
|
||||
items.push((Btn::Help, tr("menu.help")));
|
||||
let w = 26.0 * CW();
|
||||
let y = ty + GH * big + CH() * 4.0;
|
||||
@@ -725,6 +745,7 @@ impl Menu {
|
||||
(Btn::Save, tr("menu.save")),
|
||||
(Btn::Load, tr("menu.load")),
|
||||
(Btn::Settings, tr("menu.settings")),
|
||||
(Btn::Bestiary, tr("menu.bestiary")),
|
||||
(Btn::Help, tr("menu.help")),
|
||||
(Btn::MainMenu, tr("menu.main")),
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user