diff --git a/.gitignore b/.gitignore index 907268af10f10f824da5eda815d54f22b3d2cb1d..c8d928f684e2816ea99ef0147ee92c4e55825012 100644 --- a/.gitignore +++ b/.gitignore @@ -26,5 +26,8 @@ game/engines/default/modules/boot/data/gfx/ts-gfx* debug-recompile.sh profiling-recompile.sh recompile.sh - +*.exe +*.dll +te4_log.txt +debug.log /.idea/ diff --git a/game/engines/default/data/font/WenQuanYiMicroHei.ttf b/game/engines/default/data/font/WenQuanYiMicroHei.ttf new file mode 100644 index 0000000000000000000000000000000000000000..61e2583a6c231b9c31b2131694a427b91bc82fa8 Binary files /dev/null and b/game/engines/default/data/font/WenQuanYiMicroHei.ttf differ diff --git a/game/engines/default/data/font/WenQuanYiMicroHeiMono.ttf b/game/engines/default/data/font/WenQuanYiMicroHeiMono.ttf new file mode 100644 index 0000000000000000000000000000000000000000..151f24fee1ba0247d071f310988744aa494740f6 Binary files /dev/null and b/game/engines/default/data/font/WenQuanYiMicroHeiMono.ttf differ diff --git a/game/engines/default/data/font/packages/default.lua b/game/engines/default/data/font/packages/default.lua index 031fc3b428309aee7852c965cfb127b60fb545a9..6646b1199a2ad9b6472cf874d2bfc9ab533c0c7b 100644 --- a/game/engines/default/data/font/packages/default.lua +++ b/game/engines/default/data/font/packages/default.lua @@ -26,6 +26,9 @@ newPackage{ id = "basic", name = "Basic", weight = 1, bignews = {font="/data/font/VeraMono.ttf", normal=30}, resources_normal = {font="/data/font/Vera.ttf", bold=true, normal=12}, resources_small = {font="/data/font/Vera.ttf", bold=true, normal=10}, + classic = {font="/data/font/Vera.ttf", normal=12, small=10, big=14}, + classic_mono = {font="/data/font/VeraMono.ttf", normal=12, small=10, big=14}, + insular = {font="/data/font/INSULA__.ttf", normal=14, small=12, big=16}, } newPackage{ id = "web", name = "Web", weight = 10, @@ -39,6 +42,9 @@ newPackage{ id = "web", name = "Web", weight = 10, bignews = {font="/data/font/DroidSansMono.ttf", normal=30}, resources_normal = {font="/data/font/DroidSans.ttf", bold=true, normal=12}, resources_small = {font="/data/font/DroidSans.ttf", bold=true, normal=10}, + classic = {font="/data/font/USENET_.ttf", normal=16, small=14, big=18}, + classic_mono = {font="/data/font/SVBasicManual.ttf", normal=14, small=10, big=16}, + insular = {font="/data/font/INSULA__.ttf", normal=14, small=12, big=16}, } newPackage{ id = "fantasy", name = "Fantasy", weight = 100, @@ -51,4 +57,22 @@ newPackage{ id = "fantasy", name = "Fantasy", weight = 100, bignews = {font="/data/font/Salsa-Regular.ttf", normal=30}, resources_normal = {font="/data/font/Salsa-Regular.ttf", normal=14}, resources_small = {font="/data/font/Salsa-Regular.ttf", normal=12}, + classic = {font="/data/font/USENET_.ttf", normal=16, small=14, big=18}, + classic_mono = {font="/data/font/SVBasicManual.ttf", normal=14, small=10, big=16}, + insular = {font="/data/font/INSULA__.ttf", normal=14, small=12, big=16}, +} + + +newPackage{ id = "chinese", name = "Chinese", weight = 100, + small = {font="/data/font/WenQuanYiMicroHei.ttf", normal=12, small=10, big=14}, + default = {font="/data/font/WenQuanYiMicroHei.ttf", normal=16, small=12, big=18}, + bold = {font="/data/font/WenQuanYiMicroHei.ttf", normal=16, small=12, big=18}, + mono = {font="/data/font/WenQuanYiMicroHeiMono.ttf", normal=16, small=12, big=18}, + mono_small = {font="/data/font/WenQuanYiMicroHeiMono.ttf", normal=14, small=10, big=16}, + flyer = {font="/data/font/WenQuanYiMicroHei.ttf", normal=14, small=12, big=16}, + bignews = {font="/data/font/WenQuanYiMicroHei.ttf", normal=30}, + resources_normal = {font="/data/font/WenQuanYiMicroHei.ttf", normal=16}, + resources_small = {font="/data/font/WenQuanYiMicroHei.ttf", normal=14}, + classic = {font="/data/font/WenQuanYiMicroHei.ttf", normal=16, small=14, big=18}, + classic_mono = {font="/data/font/WenQuanYiMicroHeiMono.ttf", normal=14, small=10, big=16}, } diff --git a/game/engines/default/data/keybinds/actions.lua b/game/engines/default/data/keybinds/actions.lua index a06bf242ded3d1e48e61fbeca418db95998f64a5..cc8e24dfac2ceb4b55c8a50bdc714b42b6f556ec 100644 --- a/game/engines/default/data/keybinds/actions.lua +++ b/game/engines/default/data/keybinds/actions.lua @@ -21,109 +21,109 @@ defineAction{ default = { "uni:<", "uni:>" }, type = "CHANGE_LEVEL", group = "actions", - name = "Go to next/previous level", + name = _t"Go to next/previous level", } defineAction{ default = { "sym:=p:false:false:false:false", "sym:=g:false:true:false:false" }, type = "LEVELUP", group = "actions", - name = "Levelup window", + name = _t"Levelup window", } defineAction{ default = { "sym:=m:false:false:false:false" }, type = "USE_TALENTS", group = "actions", - name = "Use talents", + name = _t"Use talents", } defineAction{ default = { "sym:=j:false:false:false:false", "sym:_q:true:false:false:false" }, type = "SHOW_QUESTS", group = "actions", - name = "Show quests", + name = _t"Show quests", } defineAction{ default = { "sym:=r:false:false:false:false", "sym:=r:false:true:false:false" }, type = "REST", group = "actions", - name = "Rest for a while", + name = _t"Rest for a while", } defineAction{ default = { "sym:_s:true:false:false:false" }, type = "SAVE_GAME", group = "actions", - name = "Save game", + name = _t"Save game", } defineAction{ default = { "sym:_x:true:false:false:false" }, type = "QUIT_GAME", group = "actions", - name = "Quit game", + name = _t"Quit game", } defineAction{ default = { "sym:_t:false:true:false:false" }, type = "TACTICAL_DISPLAY", group = "actions", - name = "Tactical display on/off", + name = _t"Tactical display on/off", } defineAction{ default = { "sym:=l:false:false:false:false" }, type = "LOOK_AROUND", group = "actions", - name = "Look around", + name = _t"Look around", } defineAction{ default = { "sym:_HOME:true:false:false:false"}, type = "CENTER_ON_PLAYER", group = "actions", - name = "Center the view on the player", + name = _t"Center the view on the player", } defineAction{ default = { "sym:_TAB:false:false:false:false" }, type = "TOGGLE_MINIMAP", group = "actions", - name = "Toggle minimap", + name = _t"Toggle minimap", } defineAction{ default = { "sym:=t:true:false:false:false" }, type = "SHOW_TIME", group = "actions", - name = "Show game calendar", + name = _t"Show game calendar", } defineAction{ default = { "sym:=c:false:false:false:false", "sym:=c:false:true:false:false" }, type = "SHOW_CHARACTER_SHEET", group = "actions", - name = "Show character sheet", + name = _t"Show character sheet", } defineAction{ default = { "sym:_s:false:false:true:false" }, type = "SWITCH_GFX", group = "actions", - name = "Switch graphical modes", + name = _t"Switch graphical modes", } defineAction{ default = { "sym:_RETURN:false:false:false:false", "sym:_KP_ENTER:false:false:false:false" }, type = "ACCEPT", group = "actions", - name = "Accept action", + name = _t"Accept action", } defineAction{ default = { "sym:_ESCAPE:false:false:false:false" }, type = "EXIT", group = "actions", - name = "Exit menu", + name = _t"Exit menu", } diff --git a/game/engines/default/data/keybinds/chat.lua b/game/engines/default/data/keybinds/chat.lua index a9fa65d0eac5d98e48b13d60597323b56c1e2a54..f0af0b26fad5e7f5bcb7064f42d2c125c4da7bfa 100644 --- a/game/engines/default/data/keybinds/chat.lua +++ b/game/engines/default/data/keybinds/chat.lua @@ -21,19 +21,19 @@ defineAction{ default = { "sym:_SPACE:false:false:false:false" }, type = "USERCHAT_TALK", group = "user chat", - name = "Talk to people", + name = _t"Talk to people", } defineAction{ default = { "sym:_SPACE:true:false:false:false" }, type = "USERCHAT_SHOW_TALK", group = "user chat", - name = "Display chat log", + name = _t"Display chat log", } defineAction{ default = { "sym:_SPACE:false:true:false:false" }, type = "USERCHAT_SWITCH_CHANNEL", group = "user chat", - name = "Cycle chat channels", + name = _t"Cycle chat channels", } diff --git a/game/engines/default/data/keybinds/debug.lua b/game/engines/default/data/keybinds/debug.lua index a779e3291ba3559e0d08dee9dfa119f56f380b15..4a0db37bba6054eed2357c4b843fc55912faba56 100644 --- a/game/engines/default/data/keybinds/debug.lua +++ b/game/engines/default/data/keybinds/debug.lua @@ -21,7 +21,7 @@ defineAction{ default = { "sym:_l:true:false:false:false" }, type = "LUA_CONSOLE", group = "debug", - name = "Show Lua console", + name = _t"Show Lua console", only_on_cheat = true, } @@ -29,6 +29,6 @@ defineAction{ default = { "sym:_a:true:false:false:false" }, type = "DEBUG_MODE", group = "debug", - name = "Debug Mode", + name = _t"Debug Mode", only_on_cheat = true, } diff --git a/game/engines/default/data/keybinds/hotkeys.lua b/game/engines/default/data/keybinds/hotkeys.lua index 20670bcf7436efe97de634700244aef83e89a349..f972e764214065f2f4b82e05d24510682838b830 100644 --- a/game/engines/default/data/keybinds/hotkeys.lua +++ b/game/engines/default/data/keybinds/hotkeys.lua @@ -22,73 +22,73 @@ defineAction{ default = { "sym:_1:false:false:false:false" }, type = "HOTKEY_1", group = "hotkeys", - name = "Hotkey 1", + name = _t"Hotkey 1", } defineAction{ default = { "sym:_2:false:false:false:false" }, type = "HOTKEY_2", group = "hotkeys", - name = "Hotkey 2", + name = _t"Hotkey 2", } defineAction{ default = { "sym:_3:false:false:false:false" }, type = "HOTKEY_3", group = "hotkeys", - name = "Hotkey 3", + name = _t"Hotkey 3", } defineAction{ default = { "sym:_4:false:false:false:false" }, type = "HOTKEY_4", group = "hotkeys", - name = "Hotkey 4", + name = _t"Hotkey 4", } defineAction{ default = { "sym:_5:false:false:false:false" }, type = "HOTKEY_5", group = "hotkeys", - name = "Hotkey 5", + name = _t"Hotkey 5", } defineAction{ default = { "sym:_6:false:false:false:false" }, type = "HOTKEY_6", group = "hotkeys", - name = "Hotkey 6", + name = _t"Hotkey 6", } defineAction{ default = { "sym:_7:false:false:false:false" }, type = "HOTKEY_7", group = "hotkeys", - name = "Hotkey 7", + name = _t"Hotkey 7", } defineAction{ default = { "sym:_8:false:false:false:false" }, type = "HOTKEY_8", group = "hotkeys", - name = "Hotkey 8", + name = _t"Hotkey 8", } defineAction{ default = { "sym:_9:false:false:false:false" }, type = "HOTKEY_9", group = "hotkeys", - name = "Hotkey 9", + name = _t"Hotkey 9", } defineAction{ default = { "sym:_0:false:false:false:false" }, type = "HOTKEY_10", group = "hotkeys", - name = "Hotkey 10", + name = _t"Hotkey 10", } defineAction{ default = { "sym:_MINUS:false:false:false:false" }, type = "HOTKEY_11", group = "hotkeys", - name = "Hotkey 11", + name = _t"Hotkey 11", } defineAction{ default = { "sym:_EQUALS:false:false:false:false" }, type = "HOTKEY_12", group = "hotkeys", - name = "Hotkey 12", + name = _t"Hotkey 12", } -- Ctrl + Hotkeys @@ -96,73 +96,73 @@ defineAction{ default = { "sym:_1:true:false:false:false" }, type = "HOTKEY_SECOND_1", group = "hotkeys", - name = "Secondary Hotkey 1", + name = _t"Secondary Hotkey 1", } defineAction{ default = { "sym:_2:true:false:false:false" }, type = "HOTKEY_SECOND_2", group = "hotkeys", - name = "Secondary Hotkey 2", + name = _t"Secondary Hotkey 2", } defineAction{ default = { "sym:_3:true:false:false:false" }, type = "HOTKEY_SECOND_3", group = "hotkeys", - name = "Secondary Hotkey 3", + name = _t"Secondary Hotkey 3", } defineAction{ default = { "sym:_4:true:false:false:false" }, type = "HOTKEY_SECOND_4", group = "hotkeys", - name = "Secondary Hotkey 4", + name = _t"Secondary Hotkey 4", } defineAction{ default = { "sym:_5:true:false:false:false" }, type = "HOTKEY_SECOND_5", group = "hotkeys", - name = "Secondary Hotkey 5", + name = _t"Secondary Hotkey 5", } defineAction{ default = { "sym:_6:true:false:false:false" }, type = "HOTKEY_SECOND_6", group = "hotkeys", - name = "Secondary Hotkey 6", + name = _t"Secondary Hotkey 6", } defineAction{ default = { "sym:_7:true:false:false:false" }, type = "HOTKEY_SECOND_7", group = "hotkeys", - name = "Secondary Hotkey 7", + name = _t"Secondary Hotkey 7", } defineAction{ default = { "sym:_8:true:false:false:false" }, type = "HOTKEY_SECOND_8", group = "hotkeys", - name = "Secondary Hotkey 8", + name = _t"Secondary Hotkey 8", } defineAction{ default = { "sym:_9:true:false:false:false" }, type = "HOTKEY_SECOND_9", group = "hotkeys", - name = "Secondary Hotkey 9", + name = _t"Secondary Hotkey 9", } defineAction{ default = { "sym:_0:true:false:false:false" }, type = "HOTKEY_SECOND_10", group = "hotkeys", - name = "Secondary Hotkey 10", + name = _t"Secondary Hotkey 10", } defineAction{ default = { "sym:_MINUS:true:false:false:false" }, type = "HOTKEY_SECOND_11", group = "hotkeys", - name = "Secondary Hotkey 11", + name = _t"Secondary Hotkey 11", } defineAction{ default = { "sym:_EQUALS:true:false:false:false" }, type = "HOTKEY_SECOND_12", group = "hotkeys", - name = "Secondary Hotkey 12", + name = _t"Secondary Hotkey 12", } -- Shift + Hotkeys @@ -170,73 +170,73 @@ defineAction{ default = { "sym:_1:false:true:false:false" }, type = "HOTKEY_THIRD_1", group = "hotkeys", - name = "Third Hotkey 1", + name = _t"Third Hotkey 1", } defineAction{ default = { "sym:_2:false:true:false:false" }, type = "HOTKEY_THIRD_2", group = "hotkeys", - name = "Third Hotkey 2", + name = _t"Third Hotkey 2", } defineAction{ default = { "sym:_3:false:true:false:false" }, type = "HOTKEY_THIRD_3", group = "hotkeys", - name = "Third Hotkey 3", + name = _t"Third Hotkey 3", } defineAction{ default = { "sym:_4:false:true:false:false" }, type = "HOTKEY_THIRD_4", group = "hotkeys", - name = "Third Hotkey 4", + name = _t"Third Hotkey 4", } defineAction{ default = { "sym:_5:false:true:false:false" }, type = "HOTKEY_THIRD_5", group = "hotkeys", - name = "Third Hotkey 5", + name = _t"Third Hotkey 5", } defineAction{ default = { "sym:_6:false:true:false:false" }, type = "HOTKEY_THIRD_6", group = "hotkeys", - name = "Third Hotkey 6", + name = _t"Third Hotkey 6", } defineAction{ default = { "sym:_7:false:true:false:false" }, type = "HOTKEY_THIRD_7", group = "hotkeys", - name = "Third Hotkey 7", + name = _t"Third Hotkey 7", } defineAction{ default = { "sym:_8:false:true:false:false" }, type = "HOTKEY_THIRD_8", group = "hotkeys", - name = "Third Hotkey 8", + name = _t"Third Hotkey 8", } defineAction{ default = { "sym:_9:false:true:false:false" }, type = "HOTKEY_THIRD_9", group = "hotkeys", - name = "Third Hotkey 9", + name = _t"Third Hotkey 9", } defineAction{ default = { "sym:_0:false:true:false:false" }, type = "HOTKEY_THIRD_10", group = "hotkeys", - name = "Third Hotkey 10", + name = _t"Third Hotkey 10", } defineAction{ default = { "sym:_MINUS:false:true:false:false" }, type = "HOTKEY_THIRD_11", group = "hotkeys", - name = "Third Hotkey 11", + name = _t"Third Hotkey 11", } defineAction{ default = { "sym:_EQUALS:false:true:false:false" }, type = "HOTKEY_THIRD_12", group = "hotkeys", - name = "Third Hotkey 12", + name = _t"Third Hotkey 12", } -- Alt + Hotkeys @@ -244,73 +244,73 @@ defineAction{ default = { "sym:_1:false:false:true:false" }, type = "HOTKEY_FOURTH_1", group = "hotkeys", - name = "Fourth Hotkey 1", + name = _t"Fourth Hotkey 1", } defineAction{ default = { "sym:_2:false:false:true:false" }, type = "HOTKEY_FOURTH_2", group = "hotkeys", - name = "Fourth Hotkey 2", + name = _t"Fourth Hotkey 2", } defineAction{ default = { "sym:_3:false:false:true:false" }, type = "HOTKEY_FOURTH_3", group = "hotkeys", - name = "Fourth Hotkey 3", + name = _t"Fourth Hotkey 3", } defineAction{ default = { "sym:_4:false:false:true:false" }, type = "HOTKEY_FOURTH_4", group = "hotkeys", - name = "Fourth Hotkey 4", + name = _t"Fourth Hotkey 4", } defineAction{ default = { "sym:_5:false:false:true:false" }, type = "HOTKEY_FOURTH_5", group = "hotkeys", - name = "Fourth Hotkey 5", + name = _t"Fourth Hotkey 5", } defineAction{ default = { "sym:_6:false:false:true:false" }, type = "HOTKEY_FOURTH_6", group = "hotkeys", - name = "Fourth Hotkey 6", + name = _t"Fourth Hotkey 6", } defineAction{ default = { "sym:_7:false:false:true:false" }, type = "HOTKEY_FOURTH_7", group = "hotkeys", - name = "Fourth Hotkey 7", + name = _t"Fourth Hotkey 7", } defineAction{ default = { "sym:_8:false:false:true:false" }, type = "HOTKEY_FOURTH_8", group = "hotkeys", - name = "Fourth Hotkey 8", + name = _t"Fourth Hotkey 8", } defineAction{ default = { "sym:_9:false:false:true:false" }, type = "HOTKEY_FOURTH_9", group = "hotkeys", - name = "Fourth Hotkey 9", + name = _t"Fourth Hotkey 9", } defineAction{ default = { "sym:_0:false:false:true:false" }, type = "HOTKEY_FOURTH_10", group = "hotkeys", - name = "Fourth Hotkey 10", + name = _t"Fourth Hotkey 10", } defineAction{ default = { "sym:_MINUS:false:false:true:false" }, type = "HOTKEY_FOURTH_11", group = "hotkeys", - name = "Fourth Hotkey 11", + name = _t"Fourth Hotkey 11", } defineAction{ default = { "sym:_EQUALS:false:false:true:false" }, type = "HOTKEY_FOURTH_12", group = "hotkeys", - name = "Fourth Hotkey 12", + name = _t"Fourth Hotkey 12", } -- Alt + Shift + Hotkeys @@ -318,86 +318,86 @@ defineAction{ default = { "sym:_1:false:true:true:false" }, type = "HOTKEY_FIFTH_1", group = "hotkeys", - name = "Fifth Hotkey 1", + name = _t"Fifth Hotkey 1", } defineAction{ default = { "sym:_2:false:true:true:false" }, type = "HOTKEY_FIFTH_2", group = "hotkeys", - name = "Fifth Hotkey 2", + name = _t"Fifth Hotkey 2", } defineAction{ default = { "sym:_3:false:true:true:false" }, type = "HOTKEY_FIFTH_3", group = "hotkeys", - name = "Fifth Hotkey 3", + name = _t"Fifth Hotkey 3", } defineAction{ default = { "sym:_4:false:true:true:false" }, type = "HOTKEY_FIFTH_4", group = "hotkeys", - name = "Fifth Hotkey 4", + name = _t"Fifth Hotkey 4", } defineAction{ default = { "sym:_5:false:true:true:false" }, type = "HOTKEY_FIFTH_5", group = "hotkeys", - name = "Fifth Hotkey 5", + name = _t"Fifth Hotkey 5", } defineAction{ default = { "sym:_6:false:true:true:false" }, type = "HOTKEY_FIFTH_6", group = "hotkeys", - name = "Fifth Hotkey 6", + name = _t"Fifth Hotkey 6", } defineAction{ default = { "sym:_7:false:true:true:false" }, type = "HOTKEY_FIFTH_7", group = "hotkeys", - name = "Fifth Hotkey 7", + name = _t"Fifth Hotkey 7", } defineAction{ default = { "sym:_8:false:true:true:false" }, type = "HOTKEY_FIFTH_8", group = "hotkeys", - name = "Fifth Hotkey 8", + name = _t"Fifth Hotkey 8", } defineAction{ default = { "sym:_9:false:true:true:false" }, type = "HOTKEY_FIFTH_9", group = "hotkeys", - name = "Fifth Hotkey 9", + name = _t"Fifth Hotkey 9", } defineAction{ default = { "sym:_0:false:true:true:false" }, type = "HOTKEY_FIFTH_10", group = "hotkeys", - name = "Fifth Hotkey 10", + name = _t"Fifth Hotkey 10", } defineAction{ default = { "sym:_MINUS:false:true:true:false" }, type = "HOTKEY_FIFTH_11", group = "hotkeys", - name = "Fifth Hotkey 11", + name = _t"Fifth Hotkey 11", } defineAction{ default = { "sym:_EQUALS:false:true:true:false" }, type = "HOTKEY_FIFTH_12", group = "hotkeys", - name = "Fifth Hotkey 12", + name = _t"Fifth Hotkey 12", } defineAction{ default = { "sym:_PAGEUP:false:false:false:false" }, type = "HOTKEY_PREV_PAGE", group = "hotkeys", - name = "Previous Hotkey Page", + name = _t"Previous Hotkey Page", } defineAction{ default = { "sym:_PAGEDOWN:false:false:false:false" }, type = "HOTKEY_NEXT_PAGE", group = "hotkeys", - name = "Next Hotkey Page", + name = _t"Next Hotkey Page", } defineAction{ @@ -406,7 +406,7 @@ defineAction{ updown = true, single_key = true, group = "hotkeys", - name = "Quick switch to Hotkey Page 2", + name = _t"Quick switch to Hotkey Page 2", } defineAction{ default = { "sym:_LSHIFT:false:false:false:false" }, @@ -414,5 +414,5 @@ defineAction{ updown = true, single_key = true, group = "hotkeys", - name = "Quick switch to Hotkey Page 3", + name = _t"Quick switch to Hotkey Page 3", } diff --git a/game/engines/default/data/keybinds/interface.lua b/game/engines/default/data/keybinds/interface.lua index 0c48fb7d2ad718fcabd63ff65121f9f5ff41a79c..8f92148766598b5306974fc3e3aa8b80ba8816c0 100644 --- a/game/engines/default/data/keybinds/interface.lua +++ b/game/engines/default/data/keybinds/interface.lua @@ -21,33 +21,33 @@ defineAction{ default = { "sym:_TAB:true:false:false:false" }, type = "TOGGLE_NPC_LIST", group = "actions", - name = "Toggle list of seen creatures", + name = _t"Toggle list of seen creatures", } defineAction{ default = { "sym:=h:false:false:false:false", "sym:=m:true:false:false:false" }, type = "SHOW_MESSAGE_LOG", group = "actions", - name = "Show message log", + name = _t"Show message log", } defineAction{ default = { "sym:_PRINTSCREEN:false:false:false:false" }, type = "SCREENSHOT", group = "actions", - name = "Take a screenshot", + name = _t"Take a screenshot", } defineAction{ default = { "sym:_TAB:false:false:false:false" }, type = "SHOW_MAP", group = "actions", - name = "Show map", + name = _t"Show map", } defineAction{ default = { "sym:_CAPSLOCK:false:false:false:false" }, type = "SCROLL_MAP", group = "actions", - name = "Scroll map mode", + name = _t"Scroll map mode", } diff --git a/game/engines/default/data/keybinds/inventory.lua b/game/engines/default/data/keybinds/inventory.lua index 5040ca780acc0f5725757614468655b303d55dcb..8cdddf9e9fc7a76f819fbfe40c6156719a3583c6 100644 --- a/game/engines/default/data/keybinds/inventory.lua +++ b/game/engines/default/data/keybinds/inventory.lua @@ -21,51 +21,51 @@ defineAction{ default = { "sym:=i:false:false:false:false", }, type = "SHOW_INVENTORY", group = "inventory", - name = "Show inventory", + name = _t"Show inventory", } defineAction{ default = { "sym:=e:false:false:false:false", }, type = "SHOW_EQUIPMENT", group = "inventory", - name = "Show equipment", + name = _t"Show equipment", } defineAction{ default = { "sym:=g:false:false:false:false" }, type = "PICKUP_FLOOR", group = "inventory", - name = "Pickup items", + name = _t"Pickup items", } defineAction{ default = { "sym:=d:false:false:false:false" }, type = "DROP_FLOOR", group = "inventory", - name = "Drop items", + name = _t"Drop items", } defineAction{ default = { "sym:=w:false:false:false:false", }, type = "WEAR_ITEM", group = "inventory", - name = "Wield/wear items", + name = _t"Wield/wear items", } defineAction{ default = { "sym:=t:false:false:false:false", }, type = "TAKEOFF_ITEM", group = "inventory", - name = "Takeoff items", + name = _t"Takeoff items", } defineAction{ default = { "sym:=u:false:false:false:false", }, type = "USE_ITEM", group = "inventory", - name = "Use items", + name = _t"Use items", } defineAction{ default = { "sym:=q:false:false:false:false", }, type = "QUICK_SWITCH_WEAPON", group = "inventory", - name = "Quick switch weapons set", + name = _t"Quick switch weapons set", } diff --git a/game/engines/default/data/keybinds/move.lua b/game/engines/default/data/keybinds/move.lua index c6f1afde279b2d69c691fabf24a53fd51d12e535..d78305859a8483ef7b07d3e6cd3dc9bdc25a5f39 100644 --- a/game/engines/default/data/keybinds/move.lua +++ b/game/engines/default/data/keybinds/move.lua @@ -22,56 +22,56 @@ defineAction{ default = { "sym:_LEFT:false:false:false:false", "sym:_KP_4:false:false:false:false" }, type = "MOVE_LEFT", group = "movement", - name = "Move left", + name = _t"Move left", } defineAction{ default = { "sym:_RIGHT:false:false:false:false", "sym:_KP_6:false:false:false:false" }, type = "MOVE_RIGHT", group = "movement", - name = "Move right", + name = _t"Move right", } defineAction{ default = { "sym:_UP:false:false:false:false", "sym:_KP_8:false:false:false:false" }, type = "MOVE_UP", group = "movement", - name = "Move up", + name = _t"Move up", } defineAction{ default = { "sym:_DOWN:false:false:false:false", "sym:_KP_2:false:false:false:false" }, type = "MOVE_DOWN", group = "movement", - name = "Move down", + name = _t"Move down", } defineAction{ default = { "sym:_KP_7:false:false:false:false" }, type = "MOVE_LEFT_UP", group = "movement", - name = "Move diagonally left and up", + name = _t"Move diagonally left and up", } defineAction{ default = { "sym:_KP_9:false:false:false:false" }, type = "MOVE_RIGHT_UP", group = "movement", - name = "Move diagonally right and up", + name = _t"Move diagonally right and up", } defineAction{ default = { "sym:_KP_1:false:false:false:false" }, type = "MOVE_LEFT_DOWN", group = "movement", - name = "Move diagonally left and down", + name = _t"Move diagonally left and down", } defineAction{ default = { "sym:_KP_3:false:false:false:false" }, type = "MOVE_RIGHT_DOWN", group = "movement", - name = "Move diagonally right and down", + name = _t"Move diagonally right and down", } defineAction{ default = { "sym:_KP_5:false:false:false:false" }, type = "MOVE_STAY", group = "movement", - name = "Stay for a turn", + name = _t"Stay for a turn", } -- Running @@ -79,59 +79,59 @@ defineAction{ default = { "sym:=.:false:false:false:false" }, type = "RUN", group = "movement", - name = "Run", + name = _t"Run", } defineAction{ default = { "sym:_LEFT:false:true:false:false", "sym:_KP_4:false:true:false:false" }, type = "RUN_LEFT", group = "movement", - name = "Run left", + name = _t"Run left", } defineAction{ default = { "sym:_RIGHT:false:true:false:false", "sym:_KP_6:false:true:false:false" }, type = "RUN_RIGHT", group = "movement", - name = "Run right", + name = _t"Run right", } defineAction{ default = { "sym:_UP:false:true:false:false", "sym:_KP_8:false:true:false:false" }, type = "RUN_UP", group = "movement", - name = "Run up", + name = _t"Run up", } defineAction{ default = { "sym:_DOWN:false:true:false:false", "sym:_KP_2:false:true:false:false" }, type = "RUN_DOWN", group = "movement", - name = "Run down", + name = _t"Run down", } defineAction{ default = { "sym:_KP_7:false:true:false:false" }, type = "RUN_LEFT_UP", group = "movement", - name = "Run diagonally left and up", + name = _t"Run diagonally left and up", } defineAction{ default = { "sym:_KP_9:false:true:false:false" }, type = "RUN_RIGHT_UP", group = "movement", - name = "Run diagonally right and up", + name = _t"Run diagonally right and up", } defineAction{ default = { "sym:_KP_1:false:true:false:false" }, type = "RUN_LEFT_DOWN", group = "movement", - name = "Run diagonally left and down", + name = _t"Run diagonally left and down", } defineAction{ default = { "sym:_KP_3:false:true:false:false" }, type = "RUN_RIGHT_DOWN", group = "movement", - name = "Run diagonally right and down", + name = _t"Run diagonally right and down", } defineAction{ default = { "sym:_z:false:false:false:false" }, type = "RUN_AUTO", group = "movement", - name = "Auto-explore", + name = _t"Auto-explore", } diff --git a/game/engines/default/data/keybinds/mtxn.lua b/game/engines/default/data/keybinds/mtxn.lua index a0021fbfd8b19c36a59adecc0b5d0f3154ca6af6..e1b8ef9104164c883fcad34cd8c38340ee1e05ca 100644 --- a/game/engines/default/data/keybinds/mtxn.lua +++ b/game/engines/default/data/keybinds/mtxn.lua @@ -21,7 +21,7 @@ defineAction{ default = { "sym:_y:true:false:false:false" }, type = "MTXN_PURCHASE", group = "microtransactions - cosmetic", - name = "List purchasable", + name = _t"List purchasable", check = function() return profile:canMTXN() end, } @@ -29,6 +29,6 @@ defineAction{ default = { "sym:_y:false:false:true:false" }, type = "MTXN_USE", group = "microtransactions - cosmetic", - name = "Use purchased", + name = _t"Use purchased", check = function() return profile:canMTXN() end, } diff --git a/game/engines/default/engine/Actor.lua b/game/engines/default/engine/Actor.lua index c074a23d39176826d1c2a70eb77380da72eb0144..ec3f62c7133762bedfcad9dffbb8df1c9b42a006 100644 --- a/game/engines/default/engine/Actor.lua +++ b/game/engines/default/engine/Actor.lua @@ -611,3 +611,7 @@ function _M:him_her() return string.him_her(self) end --- he/she/self formatting -- @return string.his_her_self(self) function _M:his_her_self() return string.his_her_self(self) end + +function _M:getName() + return _t(self.name) +end \ No newline at end of file diff --git a/game/engines/default/engine/ActorsSeenDisplay.lua b/game/engines/default/engine/ActorsSeenDisplay.lua index ae7dfffc57ad112990e88dd216a738ce0db42ec9..731b1a03e23494e8b67f67cfada54ae49b936b9a 100644 --- a/game/engines/default/engine/ActorsSeenDisplay.lua +++ b/game/engines/default/engine/ActorsSeenDisplay.lua @@ -108,7 +108,7 @@ function _M:display() local x, y = 0, 0 for i, a in ipairs(l) do - self.surface:drawColorStringBlended(self.font, ("%s (%d)#WHITE#; distance [%s]"):format(a.name, a.nb, table.concat(a.dist, ",")), x, y, a.color[1], a.color[2], a.color[3]) + self.surface:drawColorStringBlended(self.font, ("%s (%d)#WHITE#; distance [%s]"):tformat(a.name, a.nb, table.concat(a.dist, ",")), x, y, a.color[1], a.color[2], a.color[3]) y = y + self.font_h if y + self.font_h >= self.h then y = 0 x = x + math.floor(self.w / self.nb_cols) end end diff --git a/game/engines/default/engine/Birther.lua b/game/engines/default/engine/Birther.lua index 19ce4c6badc3d9c382f5434e2ea90138fba94d77..f9a140286b003c5c75a517d08de599dba3e71b68 100644 --- a/game/engines/default/engine/Birther.lua +++ b/game/engines/default/engine/Birther.lua @@ -66,7 +66,7 @@ function _M:newBirthDescriptor(t) assert(t.type, "no birth type") t.short_name = t.short_name or t.name t.short_name = t.short_name:upper():gsub("[ ]", "_") - t.display_name = t.display_name or t.name + t.display_name = t.display_name or _t(t.name, "birth descriptor name") assert(t.desc, "no birth description") if type(t.desc) == "table" then t.desc = table.concat(t.desc, "\n") end t.desc = t.desc:gsub("\n\t+", "\n") @@ -103,7 +103,7 @@ function _M:init(title, actor, order, at_end, quickbirth, w, h) self.order = order if order.get_name then self.at_end = function() - game:registerDialog(require('engine.dialogs.GetText').new("Enter your character's name", "Name", 2, 25, function(text) + game:registerDialog(require('engine.dialogs.GetText').new(_t"Enter your character's name", _t"Name", 2, 25, function(text) game:setPlayerName(text) at_end() end, function() @@ -114,22 +114,22 @@ function _M:init(title, actor, order, at_end, quickbirth, w, h) self.at_end = at_end end - Dialog.init(self, title and title or ("Character Creation: "..actor.name), w or 600, h or 400) + Dialog.init(self, title and title or ("Character Creation: %s"):tformat(actor:getName()), w or 600, h or 400) self.descriptors = {} self.descriptors_by_type = {} - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - 10), height=1, auto_height=true, no_color_bleed=true, text=[[ + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - 10), height=1, auto_height=true, no_color_bleed=true, text=_t[[ Keyboard: #00FF00#up key/down key#FFFFFF# to select an option; #00FF00#Enter#FFFFFF# to accept; #00FF00#Backspace#FFFFFF# to go back. Mouse: #00FF00#Left click#FFFFFF# to accept; #00FF00#right click#FFFFFF# to go back. ]]} - self.c_random = Button.new{text="Random", width=math.floor(self.iw / 2 - 40), fct=function() self:randomSelect() end} - self.c_desc = Textzone.new{width=math.floor(self.iw / 2 - 10), height=self.ih - self.c_tut.h - 20, scrollbar=true, no_color_bleed=true, text=""} + self.c_random = Button.new{text=_t"Random", width=math.floor(self.iw / 2 - 40), fct=function() self:randomSelect() end} + self.c_desc = Textzone.new{width=math.floor(self.iw / 2 - 10), height=self.ih - self.c_tut.h - 20, scrollbar=true, no_color_bleed=true, text=_t""} self.c_list = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - 10 - self.c_random.h, scrollbar=true, all_clicks=true, columns={ - {name="", width=8, display_prop="char"}, - {name="", width=92, display_prop="display_name"}, + {name=_t"", width=8, display_prop="char"}, + {name=_t"", width=92, display_prop="display_name"}, }, list={}, fct=function(item, sel, button, event) self.sel = sel if (event == "key" or event == "button") and button == "left" then self:next() @@ -178,12 +178,12 @@ function _M:on_register() self.do_quickbirth = true self:quickBirth() else - self:yesnoPopup("Quick Birth", "Do you want to recreate the same character?", function(ret) + self:yesnoPopup(_t"Quick Birth", _t"Do you want to recreate the same character?", function(ret) if ret then self.do_quickbirth = true self:quickBirth() end - end, "Recreate", "New character") + end, _t"Recreate", _t"New character") end end end diff --git a/game/engines/default/engine/Calendar.lua b/game/engines/default/engine/Calendar.lua index 9a458fe731bf7610af4ee7669c988bad308db39a..d2eee14a8dbb167aefc43543dda40181d5984c88 100644 --- a/game/engines/default/engine/Calendar.lua +++ b/game/engines/default/engine/Calendar.lua @@ -67,7 +67,7 @@ end function _M:getTimeDate(turn, dstr) local doy, year = self:getDayOfYear(turn) local hour, min = self:getTimeOfDay(turn) - return (dstr or self.datestring):format(tostring(self:getDayOfMonth(doy)):ordinal(), self:getMonthName(doy), tostring(year):ordinal(), hour, min) + return (dstr or self.datestring):tformat(tostring(self:getDayOfMonth(doy)):ordinal(), self:getMonthName(doy), tostring(year):ordinal(), hour, min) end --- Get what day of the year it is based on turn diff --git a/game/engines/default/engine/Chat.lua b/game/engines/default/engine/Chat.lua index e3b306c17f2d43a1b4f92805921654b67ec018f3..bc73baff25c2f756195c836ca0f4a6ff482f9cfe 100644 --- a/game/engines/default/engine/Chat.lua +++ b/game/engines/default/engine/Chat.lua @@ -127,7 +127,7 @@ end --- Replace some keywords in the given text -- @string text @playername@, @npcname@, @playerdescriptor.(.-)@ function _M:replace(text) - text = text:gsub("@playername@", self.player.name):gsub("@npcname@", self.npc.name) - text = text:gsub("@playerdescriptor.(.-)@", function(what) return self.player.descriptor["fake_"..what] or self.player.descriptor[what] end) + text = text:noun_sub("@playername@", self.player:getName()):noun_sub("@npcname@", self.npc.getName and self.npc:getName() or _t(self.npc.name, "entity name")) + text = text:gsub("@playerdescriptor.(.-)@", function(what) return _t(self.player.descriptor["fake_"..what] or self.player.descriptor[what]) end) return text end diff --git a/game/engines/default/engine/DebugConsole.lua b/game/engines/default/engine/DebugConsole.lua index 3661dedfaf575ec580c9266268773beb2da54303..ec9b4a6908c2720e5f63586bd6f7912cf654d6f6 100644 --- a/game/engines/default/engine/DebugConsole.lua +++ b/game/engines/default/engine/DebugConsole.lua @@ -19,6 +19,7 @@ require "engine.class" require "engine.Dialog" +local FontPackage = require "engine.FontPackage" --- Debug Console -- @classmod engine.DebugConsole @@ -133,7 +134,7 @@ function _M:init() self.blink_period = 20 self.blink = self.blink_period local w, h = core.display.size() - engine.Dialog.init(self, "Lua Console", w, h, 0, 0, nil, core.display.newFont("/data/font/DroidSansMono.ttf", 12)) + engine.Dialog.init(self, _t"Lua Console", w, h, 0, 0, nil, core.display.newFont(FontPackage:getFont("mono"), 12)) game:onTickEnd(function() self.key:unicodeInput(true) end) self:keyCommands{ _RETURN = function() diff --git a/game/engines/default/engine/Dialog.lua b/game/engines/default/engine/Dialog.lua index bc1cd4155d0840940d7d6918dfe0067755619706..2635568210deb407b774e4029e8c62ca2ce71a55 100644 --- a/game/engines/default/engine/Dialog.lua +++ b/game/engines/default/engine/Dialog.lua @@ -110,11 +110,11 @@ function _M:yesnoPopup(title, text, fct, yes_text, no_text) d.drawDialog = function(self, s) s:drawColorStringCentered(self.font, text, 2, 2, self.iw - 2, 25 - 2) if d.sel == 0 then - s:drawColorStringCentered(self.font, yes_text or "Yes", 2, 25, self.iw / 2 - 2, 50 - 2, 0, 255, 255) - s:drawColorStringCentered(self.font, no_text or "No", 2 + self.iw / 2, 25, self.iw / 2 - 2, 50 - 2, 255, 255, 255) + s:drawColorStringCentered(self.font, yes_text or _t"Yes", 2, 25, self.iw / 2 - 2, 50 - 2, 0, 255, 255) + s:drawColorStringCentered(self.font, no_text or _t"No", 2 + self.iw / 2, 25, self.iw / 2 - 2, 50 - 2, 255, 255, 255) else - s:drawColorStringCentered(self.font, yes_text or "Yes", 2, 25, self.iw / 2 - 2, 50 - 2, 255, 255, 255) - s:drawColorStringCentered(self.font, no_text or "No", 2 + self.iw / 2, 25, self.iw / 2 - 2, 50 - 2, 0, 255, 255) + s:drawColorStringCentered(self.font, yes_text or _t"Yes", 2, 25, self.iw / 2 - 2, 50 - 2, 255, 255, 255) + s:drawColorStringCentered(self.font, no_text or _t"No", 2 + self.iw / 2, 25, self.iw / 2 - 2, 50 - 2, 0, 255, 255) end self.changed = false end @@ -157,11 +157,11 @@ function _M:yesnoLongPopup(title, text, w, fct, yes_text, no_text) end if d.sel == 0 then - s:drawColorStringCentered(self.font, yes_text or "Yes", 2, 10 + h, self.iw / 2 - 2, 50 - 2, 0, 255, 255) - s:drawColorStringCentered(self.font, no_text or "No", 2 + self.iw / 2, 10 + h, self.iw / 2 - 2, 50 - 2, 255, 255, 255) + s:drawColorStringCentered(self.font, yes_text or _t"Yes", 2, 10 + h, self.iw / 2 - 2, 50 - 2, 0, 255, 255) + s:drawColorStringCentered(self.font, no_text or _t"No", 2 + self.iw / 2, 10 + h, self.iw / 2 - 2, 50 - 2, 255, 255, 255) else - s:drawColorStringCentered(self.font, yes_text or "Yes", 2, 10 + h, self.iw / 2 - 2, 50 - 2, 255, 255, 255) - s:drawColorStringCentered(self.font, no_text or "No", 2 + self.iw / 2, 10 + h, self.iw / 2 - 2, 50 - 2, 0, 255, 255) + s:drawColorStringCentered(self.font, yes_text or _t"Yes", 2, 10 + h, self.iw / 2 - 2, 50 - 2, 255, 255, 255) + s:drawColorStringCentered(self.font, no_text or _t"No", 2 + self.iw / 2, 10 + h, self.iw / 2 - 2, 50 - 2, 0, 255, 255) end self.changed = false end diff --git a/game/engines/default/engine/Emote.lua b/game/engines/default/engine/Emote.lua index a01745b77a2af0b95bb9910e16b7d9bb357cddd4..91efb228b42790545fe3ea2ed51b9ad96727802e 100644 --- a/game/engines/default/engine/Emote.lua +++ b/game/engines/default/engine/Emote.lua @@ -19,6 +19,7 @@ require "engine.class" local Base = require "engine.ui.Base" +local FontPackage = require "engine.FontPackage" --- Emotes for actors -- @classmod engine.Emote @@ -38,12 +39,14 @@ function _M:init(text, dur, color, font) self.color = color or colors.BLACK self.use_font = font - Base.init(self, {font = self.use_font or {"/data/font/DroidSans-Bold.ttf", 16}}) + -- I18N emote font. + Base.init(self, {font = self.use_font or {FontPackage:getFont("bold"), 16}}) end --- on loaded function _M:loaded() - Base.init(self, {font = self.use_font or {"/data/font/DroidSans-Bold.ttf", 16}}) + -- I18N emote font. + Base.init(self, {font = self.use_font or {FontPackage:getFont("bold"), 16}}) end --- Serialization diff --git a/game/engines/default/engine/Faction.lua b/game/engines/default/engine/Faction.lua index 624cc52d402908ddd49ed43f2de0fa987373184d..b7bb61013ab702064cd996148c7b0ed4e115ac9c 100644 --- a/game/engines/default/engine/Faction.lua +++ b/game/engines/default/engine/Faction.lua @@ -36,6 +36,8 @@ _M.factions = {} function _M:add(t) assert(t.name, "no faction name") t.short_name = t.short_name or t.name:lower():gsub(" ", "-") + -- I18N faction + t.name = _t(t.name) if self.factions[t.short_name] then print("[FACTION] tried to redefine", t.name) return t.short_name end local r = {} diff --git a/game/engines/default/engine/FontPackage.lua b/game/engines/default/engine/FontPackage.lua index 542b7c9186b556ad235ef66a7b3364f6c46c7d92..52f842d797999c5a21858463cd407ae715465df2 100644 --- a/game/engines/default/engine/FontPackage.lua +++ b/game/engines/default/engine/FontPackage.lua @@ -48,13 +48,24 @@ end --- Default font id, "default" local cur_id = "default" + +--- Forced id, usuly only needed by some translations +local forced_id = nil + --- Set default font to use -- @string id if it can't find it, then the font will be "basic" function _M:setDefaultId(id) + if forced_id then id = forced_id end if not packages[id] then id = "basic" end cur_id = id end +--- Force all fonts to use this package, no matter what is actually requested +function _M:forceId(id) + cur_id = id + forced_id = id +end + --- Resolves a font -- @string name -- @string orname diff --git a/game/engines/default/engine/Game.lua b/game/engines/default/engine/Game.lua index 10323be8a534283f85ed70a4df8d68aeb4aecfe8..e4abc2aad8278865901c642fdbdc260fd240f724 100644 --- a/game/engines/default/engine/Game.lua +++ b/game/engines/default/engine/Game.lua @@ -645,7 +645,7 @@ function _M:onResolutionChange() end -- Are you sure you want to save these settings? Somewhat obnoxious... --- self.change_res_dialog = require("engine.ui.Dialog"):yesnoPopup("Resolution changed", "Accept the new resolution?", function(ret) +-- self.change_res_dialog = require("engine.ui.Dialog"):yesnoPopup(_t"Resolution changed", _t"Accept the new resolution?", function(ret) -- if ret then -- if not self.creating_player then self:saveGame() end -- util.showMainMenu(false, nil, nil, self.__mod_info.short_name, self.save_name, false) @@ -655,7 +655,7 @@ function _M:onResolutionChange() -- self.change_res_dialog = nil -- self.change_res_dialog_oldw, self.change_res_dialog_oldh, self.change_res_dialog_oldf = nil, nil, nil -- end --- end, "Accept", "Revert") +-- end, _t"Accept", _t"Revert") print("onResolutionChange: (Would have) created popup.") end @@ -799,9 +799,9 @@ function _M:saveScreenshot() if core.steam then local desc = self:getSaveDescription() core.steam.screenshot(file, self.w, self.h, desc.description) - Dialog:simpleLongPopup("Screenshot taken!", "Screenshot should appear in your Steam client's #LIGHT_GREEN#Screenshots Library#LAST#.\nAlso available on disk: "..fs.getRealPath(file), 600) + Dialog:simpleLongPopup(_t"Screenshot taken!", ("Screenshot should appear in your Steam client's #LIGHT_GREEN#Screenshots Library#LAST#.\nAlso available on disk: %s"):tformat(fs.getRealPath(file)), 600) else - Dialog:simplePopup("Screenshot taken!", "File: "..fs.getRealPath(file)) + Dialog:simplePopup(_t"Screenshot taken!", ("File: %s"):tformat(fs.getRealPath(file))) end end diff --git a/game/engines/default/engine/HotkeysDisplay.lua b/game/engines/default/engine/HotkeysDisplay.lua index c7282c266cb087f18711325f8b861a622bc2c18f..5f27f7a5083569385a02d9070bc53be09690bf02 100644 --- a/game/engines/default/engine/HotkeysDisplay.lua +++ b/game/engines/default/engine/HotkeysDisplay.lua @@ -221,7 +221,7 @@ function _M:onMouse(button, mx, my, click, on_over, on_click) text:merge(self.actor:getTalentFullDescription(t)) elseif a.hotkey[i] and a.hotkey[i][1] == "inventory" then local o = a:findInAllInventories(a.hotkey[i][2]) - if o then text = o:getDesc() else text = "Missing!" end + if o then text = o:getDesc() else text = _t"Missing!" end end on_over(text) end diff --git a/game/engines/default/engine/HotkeysIconsDisplay.lua b/game/engines/default/engine/HotkeysIconsDisplay.lua index 5646cc88658f9a55c739b90f62d14e311f4f9f0f..5acfab8376cf7c6369a16ccc48a9636e798c7bcb 100644 --- a/game/engines/default/engine/HotkeysIconsDisplay.lua +++ b/game/engines/default/engine/HotkeysIconsDisplay.lua @@ -412,7 +412,7 @@ function _M:onMouse(button, mx, my, click, on_over, on_click) local o = a:findInAllInventories(a.hotkey[i][2], {no_add_name=true, force_id=true, no_count=true}) if o then text = o:getDesc() - else text = "Missing!" end + else text = _t"Missing!" end end on_over(text) end diff --git a/game/engines/default/engine/I18N.lua b/game/engines/default/engine/I18N.lua new file mode 100644 index 0000000000000000000000000000000000000000..19d4052151e4d5f6c704421165b99fd0d0e82c2c --- /dev/null +++ b/game/engines/default/engine/I18N.lua @@ -0,0 +1,169 @@ +-- TE4 - T-Engine 4 +-- Copyright (C) 2009 - 2018 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +require "engine.class" + +--- Can be used to make a module internationalizable +-- @classmod engine.I18N +module(..., package.seeall, class.make) + +local locales = {} +local locales_args = {} +local locales_special = {} +local cur_locale_name = "en_US" +local cur_locale = {} +local cur_locale_args = {} +local cur_locale_special = {} +local cur_unlocalized = {} +local flags = {} +local cur_flags = {} + +_G._getFlagI18N = function (flag) + return cur_flags[flag] or nil +end + +local function get(table, key, tag) + tag = tag or "nil" + table["nil"] = table["nil"] or {} + table[tag] = table[tag] or {} + if table[tag][key] then + return table[tag][key] + else + return table["nil"][key] + end +end + +local function set(table, key, tag, value) + tag = tag or "nil" + table["nil"] = table["nil"] or {} + table[tag] = table[tag] or {} + table[tag][key] = value + table["nil"][key] = value +end + +_G._t = function(s, tag) + if not s then + return nil + end + return get(cur_locale, s, tag or "_t") or s +end + +_G.default_tformat = function(s, tag, ...) + local args_order = get(cur_locale_args, s, tag) + if args_order then + local sargs = {...} + local args = {} + for sidx, didx in pairs(args_order) do + args[sidx] = sargs[didx] + end + s = _t(s, tag) + return s:format(unpack(args)) + else + s = _t(s, tag) + return s:format(...) + end +end +function string.tformat(s, ...) + if cur_locale_special[s] then + local args_proc = _getFlagI18N("tformat_special") or default_tformat + return args_proc(s, "tformat", get(cur_locale_args, s, nil), get(cur_locale_special, s, "tformat"), ...) + end + return default_tformat(s, "tformat", ...) +end + +function _M:loadLocale(file) + if not fs.exists(file) then print("[I18N] Warning, localization file does not exists:", file) return end + local lc = nil + local env = setmetatable({ + locale = function(s) lc = s; locales[lc] = locales[lc] or {} locales_args[lc] = locales_args[lc] or {} end, + section = function(s) end, -- Not used ingame + t = function(src, dst, tag, args_order, special) self:t(lc, src, dst, tag, args_order, special) end, + setFlag = function(flag, data) + self.setFlag(lc, flag, data) + end, + forceFontPackage = function(id) + local FontPackage = require "engine.FontPackage" + FontPackage:forceId(id) + end, + }, {__index=getfenv(2)}) + local f, err = util.loadfilemods(file, env) + if not f and err then error(err) end + f() +end + +function _M:setLocale(lc) + cur_locale_name = lc + cur_locale = locales[lc] or {} + cur_locale_args = locales_args[lc] or {} + cur_locale_special = locales_special[lc] or {} + cur_flags = flags[lc] or {} +end + +function _M:t(lc, src, dst, tag, args_order, special) + locales[lc] = locales[lc] or {} + set(locales[lc], src, tag, dst) + if args_order then + locales_args[lc] = locales_args[lc] or {} + set(locales_args[lc], src, tag, args_order) + end + if special then + locales_special[lc] = locales_special[lc] or {} + set(locales_special[lc], src, tag, special) + end +end + +function _M:dumpUnknowns() + local f = fs.open("/i18n_unknown_"..cur_locale_name..".lua", "w") + f:write(('locale "%s"\n\n\n'):format(cur_locale_name)) + + local slist = table.keys(cur_unlocalized) + table.sort(slist) + for _, section in ipairs(slist) do + f:write('------------------------------------------------\n') + f:write(('section %q\n\n'):format(section)) + + local list = table.keys(cur_unlocalized[section]) + table.sort(list) + for _, s in ipairs(list) do + f:write(('t(%q, "")\n'):format(s)) + end + f:write('\n\n') + end + f:close() +end + +function _M.setFlag(lc, flag, data) + if flag and data then + flags[lc] = flags[lc] or {} + flags[lc][flag] = data + end +end + +function _M:test() + self:loadLocale("/data/locales/fr_FR.lua") + self:setLocale("fr_FR") + + print'===================' + print'===================' + print(("Testing arg one %d and two %d"):tformat(1, 2)) + print'===================' + print'===================' + + os.crash() +end diff --git a/game/engines/default/engine/LogDisplay.lua b/game/engines/default/engine/LogDisplay.lua index 7cdd240fb71325d467f960992c6121a4587de732..bf7f9ea55497b78abd7711bb008bf4559ffd7256 100644 --- a/game/engines/default/engine/LogDisplay.lua +++ b/game/engines/default/engine/LogDisplay.lua @@ -108,7 +108,7 @@ end --- Make a dialog popup with the full log function _M:showLogDialog(title, shadow) local log = self:getLog() - local d = require_first("mod.dialogs.ShowLog", "engine.dialogs.ShowLog").new(title or "Message Log", shadow, {log=log}) + local d = require_first("mod.dialogs.ShowLog", "engine.dialogs.ShowLog").new(title or _t"Message Log", shadow, {log=log}) game:registerDialog(d) end @@ -121,7 +121,8 @@ local urlmatch = lpeg.anywhere(lpeg.C(urlfind)) -- log("foo %s", s) function _M:call(str, ...) str = str or "" - str = str:format(...) + -- I18N + str = str:tformat(...) print("[LOG]", str) local tstr = str:toString() if self.out_f then self.out_f:write(tstr:removeColorCodes()) self.out_f:write("\n") end diff --git a/game/engines/default/engine/Map.lua b/game/engines/default/engine/Map.lua index 9c36baaf2f7afedc63ae56e0b4494ec09e5857e4..e2debc27f6ba612cb395630329e4e586f4a43ae7 100644 --- a/game/engines/default/engine/Map.lua +++ b/game/engines/default/engine/Map.lua @@ -1483,6 +1483,7 @@ end -- Returns the compass direction from a vector -- dx, dy = x change (+ is east), y change (+ is south) +-- I18N-TODO: It should be done with I18n support version function _M:compassDirection(dx, dy) local dir = "" if dx == 0 and dy == 0 then @@ -1493,7 +1494,7 @@ function _M:compassDirection(dx, dy) if dxdy < -0.5 then dir = dir.."west" elseif dxdy > 0.5 then dir = dir.."east" end end - return dir + return _t(dir) end ------------------------------------------------------------- ------------------------------------------------------------- diff --git a/game/engines/default/engine/MicroTxn.lua b/game/engines/default/engine/MicroTxn.lua index 035464bacf06cc6d25cffbf068e67fdad9a332bb..3685cfc23f8eedf99143a4ae2338b1f226b6fa1a 100644 --- a/game/engines/default/engine/MicroTxn.lua +++ b/game/engines/default/engine/MicroTxn.lua @@ -26,7 +26,7 @@ function _M:init() end function _M:addItem(id) - self.cart[#self.cart+1] = { name="Test", desc="Test desc", kind="cosmetic", cost=100 } + self.cart[#self.cart+1] = { name=_t"Test", desc="Test desc", kind="cosmetic", cost=100 } end function _M:purchase() diff --git a/game/engines/default/engine/Module.lua b/game/engines/default/engine/Module.lua index 2c57411a1d5f646a6699b3fc78613fa0b5c3d922..0802bca18da80ddb6bef26adf347838c709b80a4 100644 --- a/game/engines/default/engine/Module.lua +++ b/game/engines/default/engine/Module.lua @@ -18,6 +18,7 @@ -- darkgod@te4.org require "engine.class" +local I18N = require "engine.I18N" local Savefile = require "engine.Savefile" local UIBase = require "engine.ui.Base" local FontPackage = require "engine.FontPackage" @@ -764,7 +765,7 @@ function _M:loadScreen(mod) local i = core.display.loadImage(l.image) if i then img = {i:glTexture()} end end - local text = bfont:draw(l.text, dw - (img and img[6] or 0), 255, 255, 255) + local text = bfont:draw(_t(l.text), dw - (img and img[6] or 0), 255, 255, 255) local text_h = #text * text[1].h local Base = require "engine.ui.Base" @@ -919,7 +920,7 @@ function _M:instanciate(mod, name, new_game, no_reboot, extra_module_info) core.game.resetLocale() -- Reset white space breaking - core.display.breakTextAllCharacter(false) + core.display.breakTextAllCharacter(true) -- Turn based by default core.game.setRealtime(0) @@ -937,6 +938,16 @@ function _M:instanciate(mod, name, new_game, no_reboot, extra_module_info) fs.mount(engine.homepath, "/") mod.load("setup") + -- Load localizations + if mod.i18n_support then + local locale = config.settings.locale or "en_US" + I18N:setLocale(locale) + I18N:loadLocale("/data/i18n/"..locale..".lua") + end + + -- I18N:loadLocale("/data/locales/zh_hans.lua") + -- I18N:setLocale("zh_hans") + -- Load font packages FontPackage:loadDefinition("/data/font/packages/default.lua") if mod.font_packages_definitions then FontPackage:loadDefinition(mod.font_packages_definitions) end diff --git a/game/engines/default/engine/Object.lua b/game/engines/default/engine/Object.lua index fda16c42aca05f1d951b92f2c279f913a402ecbe..03aa983af61c37a811dde22be35be4071b4b07c5 100644 --- a/game/engines/default/engine/Object.lua +++ b/game/engines/default/engine/Object.lua @@ -213,14 +213,14 @@ function _M:getRequirementDesc(who) local req = rawget(self, "require") if not req then return nil end - local str = tstring{"Requires:", true} + local str = tstring{_t"Requires:", true} if req.flag then for _, flag in ipairs(req.flag) do if type(flag) == "table" then local name = self.requirement_flags_names[flag[1]] or flag[1] local c = (who:attr(flag[1]) and who:attr(flag[1]) >= flag[2]) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, "- ", ("%s (level %d)"):format(name, flag[2]), {"color", "LAST"}, true) + str:add(c, "- ", ("%s (level %d)"):tformat(name, flag[2]), {"color", "LAST"}, true) else local name = self.requirement_flags_names[flag] or flag local c = who:attr(flag) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} @@ -236,16 +236,16 @@ function _M:getRequirementDesc(who) end if req.level then local c = (who.level >= req.level) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, "- ", ("Level %d"):format(req.level), {"color", "LAST"}, true) + str:add(c, "- ", ("Level %d"):tformat(req.level), {"color", "LAST"}, true) end if req.talent then for _, tid in ipairs(req.talent) do if type(tid) == "table" then local c = (who:getTalentLevelRaw(tid[1]) >= tid[2]) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, "- ", ("Talent %s (level %d)"):format(who:getTalentFromId(tid[1]).name, tid[2]), {"color", "LAST"}, true) + str:add(c, "- ", ("Talent %s (level %d)"):tformat(who:getTalentFromId(tid[1]).name, tid[2]), {"color", "LAST"}, true) else local c = who:knowTalent(tid) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, "- ", ("Talent %s"):format(who:getTalentFromId(tid).name), {"color", "LAST"}, true) + str:add(c, "- ", ("Talent %s"):tformat(who:getTalentFromId(tid).name), {"color", "LAST"}, true) end end end diff --git a/game/engines/default/engine/PlayerProfile.lua b/game/engines/default/engine/PlayerProfile.lua index d7f20c2815267297b9f6994f22c0778681943ce1..1848971e1c44e83577b51c1b67df0301d685fe6d 100644 --- a/game/engines/default/engine/PlayerProfile.lua +++ b/game/engines/default/engine/PlayerProfile.lua @@ -792,43 +792,43 @@ end function _M:checkModuleHash(module, md5) self.hash_valid = false - if not self.auth then return nil, "no online profile active" end - if config.settings.cheat then return nil, "cheat mode active" end - if game and game:isTainted() then return nil, "savefile tainted" end + if not self.auth then return nil, _t"no online profile active" end + if config.settings.cheat then return nil, _t"cheat mode active" end + if game and game:isTainted() then return nil, _t"savefile tainted" end core.profile.pushOrder(table.serialize{o="CheckModuleHash", module=module, md5=md5}) local ok = false self:waitEvent("CheckModuleHash", function(e) ok = e.ok end, 10000) - if not ok then return nil, "bad game version" end + if not ok then return nil, _t"bad game version" end print("[ONLINE PROFILE] module hash is valid") self.hash_valid = true return true end function _M:checkAddonHash(module, addon, md5) - if not self.auth then return nil, "no online profile active" end - if config.settings.cheat then return nil, "cheat mode active" end - if game and game:isTainted() then return nil, "savefile tainted" end + if not self.auth then return nil, _t"no online profile active" end + if config.settings.cheat then return nil, _t"cheat mode active" end + if game and game:isTainted() then return nil, _t"savefile tainted" end core.profile.pushOrder(table.serialize{o="CheckAddonHash", module=module, addon=addon, md5=md5}) local ok = false self:waitEvent("CheckAddonHash", function(e) ok = e.ok end, 10000) - if not ok then return nil, "bad game addon version" end + if not ok then return nil, _t"bad game addon version" end print("[ONLINE PROFILE] addon hash is valid") return true end function _M:checkAddonUpdates(list) - if not self.auth then return nil, "no online profile active" end - if #list == 0 then return nil, "nothing to update" end + if not self.auth then return nil, _t"no online profile active" end + if #list == 0 then return nil, _t"nothing to update" end core.profile.pushOrder(table.serialize{o="CheckAddonUpdates", list=list}) local ok = false self:waitEvent("CheckAddonUpdates", function(e) ok = e.ok end, 10000) - if not ok then return nil, "bad game addon version" end + if not ok then return nil, _t"bad game addon version" end ok = ok:unserialize() print("[ONLINE PROFILE] addon update list returned") table.print(ok) @@ -836,16 +836,16 @@ function _M:checkAddonUpdates(list) end function _M:checkBatchHash(list) - if not self.auth then return nil, "no online profile active" end - if config.settings.cheat then return nil, "cheat mode active" end - if game and game:isTainted() then return nil, "savefile tainted" end + if not self.auth then return nil, _t"no online profile active" end + if config.settings.cheat then return nil, _t"cheat mode active" end + if game and game:isTainted() then return nil, _t"savefile tainted" end core.profile.pushOrder(table.serialize{o="CheckBatchHash", data=list}) local ok = false local error = nil self:waitEvent("CheckBatchHash", function(e) ok = e.ok error = e.error end, 10000) - if not ok then return nil, error or "unknown error" end + if not ok then return nil, error or _t"unknown error" end print("[ONLINE PROFILE] all hashes are valid") self.hash_valid = true return true @@ -875,7 +875,7 @@ end function _M:registerNewCharacter(module) if not self.auth or not self.hash_valid then return end - local dialog = Dialog:simpleWaiter("Registering character", "Character is being registered on https://te4.org/") + local dialog = Dialog:simpleWaiter(_t"Registering character", _t"Character is being registered on https://te4.org/") core.display.forceRedraw() core.profile.pushOrder(table.serialize{o="RegisterNewCharacter", module=module}) @@ -890,7 +890,7 @@ end function _M:getCharball(id_profile, uuid) if not self.auth then return end - local dialog = Dialog:simpleWaiter("Retrieving data from the server", "Retrieving...") + local dialog = Dialog:simpleWaiter(_t"Retrieving data from the server", _t"Retrieving...") core.display.forceRedraw() local data = nil diff --git a/game/engines/default/engine/Quest.lua b/game/engines/default/engine/Quest.lua index 233903225c7150c5a37c922d3df9e49e112b5056..5c98513e72dbcbba909db2c046e9de1310e2d669 100644 --- a/game/engines/default/engine/Quest.lua +++ b/game/engines/default/engine/Quest.lua @@ -29,10 +29,10 @@ DONE = 100 FAILED = 101 status_text = { - [PENDING] = "active", - [COMPLETED] = "completed", - [DONE] = "done", - [FAILED] = "failed", + [PENDING] = _t"active", + [COMPLETED] = _t"completed", + [DONE] = _t"done", + [FAILED] = _t"failed", } function _M:init(q, who) diff --git a/game/engines/default/engine/Savefile.lua b/game/engines/default/engine/Savefile.lua index df8b9a8080dcd266b31de3e5543f9373ef8b5562..cbbbe5cdf9968406c82d5955c1c4f8c83c593386 100644 --- a/game/engines/default/engine/Savefile.lua +++ b/game/engines/default/engine/Savefile.lua @@ -180,7 +180,7 @@ function _M:saveWorld(world, no_dialog) local popup if not no_dialog then - popup = Dialog:simpleWaiter("Saving world", "Please wait while saving the world...") + popup = Dialog:simpleWaiter(_t"Saving world", _t"Please wait while saving the world...") end core.display.forceRedraw() @@ -259,7 +259,7 @@ function _M:saveGame(game, no_dialog) local popup if not no_dialog then - popup = Dialog:simpleWaiter("Saving game", "Please wait while saving the game...") + popup = Dialog:simpleWaiter(_t"Saving game", _t"Please wait while saving the game...") end core.display.forceRedraw() @@ -353,7 +353,7 @@ function _M:saveZone(zone, no_dialog) local popup if not no_dialog then - popup = Dialog:simpleWaiter("Saving zone", "Please wait while saving the zone...") + popup = Dialog:simpleWaiter(_t"Saving zone", _t"Please wait while saving the zone...") end core.display.forceRedraw() @@ -390,7 +390,7 @@ function _M:saveLevel(level, no_dialog) local popup if not no_dialog then - popup = Dialog:simpleWaiter("Saving level", "Please wait while saving the level...") + popup = Dialog:simpleWaiter(_t"Saving level", _t"Please wait while saving the level...") end core.display.forceRedraw() @@ -424,7 +424,7 @@ function _M:saveEntity(e, no_dialog) local popup if not no_dialog then - popup = Dialog:simpleWaiter("Saving entity", "Please wait while saving the entity...") + popup = Dialog:simpleWaiter(_t"Saving entity", _t"Please wait while saving the entity...") end core.display.forceRedraw() @@ -497,7 +497,7 @@ function _M:loadWorld() fs.mount(path, self.load_dir) - local popup = Dialog:simpleWaiter("Loading world", "Please wait while loading the world...") + local popup = Dialog:simpleWaiter(_t"Loading world", _t"Please wait while loading the world...") core.display.forceRedraw() local loadedWorld = self:loadReal("main") @@ -553,7 +553,7 @@ function _M:loadGame() fs.mount(path, self.load_dir) - local popup = Dialog:simpleWaiter("Loading game", "Please wait while loading the game...") + local popup = Dialog:simpleWaiter(_t"Loading game", _t"Please wait while loading the game...") core.display.forceRedraw() local loadedGame = self:loadReal("main") @@ -622,7 +622,7 @@ function _M:loadZone(zone) f:close() end - local popup = Dialog:simpleWaiter("Loading zone", "Please wait while loading the zone...", nil, nil, nb > 0 and nb) + local popup = Dialog:simpleWaiter(_t"Loading zone", _t"Please wait while loading the zone...", nil, nil, nb > 0 and nb) core.wait.enableManualTick(true) core.display.forceRedraw() @@ -666,7 +666,7 @@ function _M:loadLevel(zone, level) f:close() end - local popup = Dialog:simpleWaiter("Loading level", "Please wait while loading the level...", nil, nil, nb > 0 and nb) + local popup = Dialog:simpleWaiter(_t"Loading level", _t"Please wait while loading the level...", nil, nil, nb > 0 and nb) core.display.forceRedraw() local loadedLevel = self:loadReal("main") @@ -707,7 +707,7 @@ function _M:loadEntity(name) f:close() end - local popup = Dialog:simpleWaiter("Loading entity", "Please wait while loading the entity...", nil, nil, nb > 0 and nb) + local popup = Dialog:simpleWaiter(_t"Loading entity", _t"Please wait while loading the entity...", nil, nil, nb > 0 and nb) core.display.forceRedraw() local loadedEntity = self:loadReal("main") diff --git a/game/engines/default/engine/SavefilePipe.lua b/game/engines/default/engine/SavefilePipe.lua index d1b3e3cada8fa22ba9bbc1c881f24bde17c46477..83a3a05b872630d57d1b3b7a899eb9a22932cfe8 100644 --- a/game/engines/default/engine/SavefilePipe.lua +++ b/game/engines/default/engine/SavefilePipe.lua @@ -251,7 +251,7 @@ function _M:forceWait() print("[SAVEFILE PIPE] force waiting") if #self.pipe == 0 and (not self.waiton or not next(self.waiton)) then return end - local popup = Dialog:simpleWaiter("Saving...", "Please wait while saving...", nil, 1000, self.total_nb) + local popup = Dialog:simpleWaiter(_t"Saving...", _t"Please wait while saving...", nil, 1000, self.total_nb) core.display.forceRedraw() local cnt = 0 diff --git a/game/engines/default/engine/Store.lua b/game/engines/default/engine/Store.lua index 880f6397f60471c24c3a82f4c27d602634f10fdb..1db81feaf2d142fd36fb4586fe94c6810aa36cde 100644 --- a/game/engines/default/engine/Store.lua +++ b/game/engines/default/engine/Store.lua @@ -121,7 +121,7 @@ end -- @param[opt] name display name of the store function _M:interact(who, name) local store, inven = self:getInven("INVEN"), who:getInven("INVEN") - local d; d = ShowStore.new("Store: "..(name or self.name), store, inven, self.store.store_filter, self.store.actor_filter, function(what, o, item) + local d; d = ShowStore.new(("Store: %s"):tformat(name or self.name), store, inven, self.store.store_filter, self.store.actor_filter, function(what, o, item) if what == "buy" then if o:getNumber() > 1 then local q = GetQuantity.new(nil, nil, o:getNumber(), o:getNumber(), function(qty) self:doBuy(who, o, item, qty, d) end) @@ -161,12 +161,12 @@ function _M:doBuy(who, o, item, nb, store_dialog) nb = math.min(nb, o:getNumber()) nb = self:tryBuy(who, o, item, nb) if nb then - Dialog:yesnoPopup("Buy", ("Buy %d %s"):format(nb, o:getName{do_color=true, no_count=true}), function(ok) if ok then + Dialog:yesnoPopup(_t"Buy", ("Buy %d %s"):tformat(nb, o:getName{do_color=true, no_count=true}), function(ok) if ok then self:onBuy(who, o, item, nb, true) self:transfer(self, who, item, nb) self:onBuy(who, o, item, nb, false) if store_dialog then store_dialog:updateStore() end - end end, "Buy", "Cancel") + end end, _t"Buy", _t"Cancel") end end @@ -174,12 +174,12 @@ function _M:doSell(who, o, item, nb, store_dialog) nb = math.min(nb, o:getNumber()) nb = self:trySell(who, o, item, nb) if nb then - Dialog:yesnoPopup("Sell", ("Sell %d %s"):format(nb, o:getName{do_color=true, no_count=true}), function(ok) if ok then + Dialog:yesnoPopup(_t"Sell", ("Sell %d %s"):tformat(nb, o:getName{do_color=true, no_count=true}), function(ok) if ok then self:onSell(who, o, item, nb, true) self:transfer(who, self, item, nb) self:onSell(who, o, item, nb, false) if store_dialog then store_dialog:updateStore() end - end end, "Sell", "Cancel") + end end, _t"Sell", _t"Cancel") end end diff --git a/game/engines/default/engine/Trap.lua b/game/engines/default/engine/Trap.lua index 9f3f12cbddaf39e6f001105d12eef58961ed0c56..6672bcdd306d76cb3f0e30e545b7b23c1c0218e0 100644 --- a/game/engines/default/engine/Trap.lua +++ b/game/engines/default/engine/Trap.lua @@ -102,10 +102,10 @@ end --- Try to disarm the trap function _M:disarm(x, y, who) if not self:canDisarm(x, y, who) then - if not self.no_disarm_message then game.logSeen(who, "%s fails to disarm a trap (%s).", who.name:capitalize(), self:getName()) end + if not self.no_disarm_message then game.logSeen(who, "%s fails to disarm a trap (%s).", who:getName():capitalize(), self:getName()) end return false end - game.logSeen(who, "%s disarms a trap (%s).", who.name:capitalize(), self:getName()) + game.logSeen(who, "%s disarms a trap (%s).", who:getName():capitalize(), self:getName()) game.level.map:remove(x, y, Map.TRAP) if self.removed then self:removed(x, y, who) @@ -127,11 +127,11 @@ function _M:trigger(x, y, who) if not self:canTrigger(x, y, who) then return end if self.message == nil then - game.logSeen(who, "%s triggers a trap (%s)!", who.name:capitalize(), self:getName()) + game.logSeen(who, "%s triggers a trap (%s)!", who:getName():capitalize(), self:getName()) elseif self.message == false then -- Nothing else - local tname = who.name + local tname = who:getName() local str =self.message str = str:gsub("@target@", tname) str = str:gsub("@Target@", tname:capitalize()) diff --git a/game/engines/default/engine/UserChat.lua b/game/engines/default/engine/UserChat.lua index f596769df0301c2f40aff2aa4c5548edb2fea0f4..7c7802e06c08348976fb3402c0e7dbcd08cd7b89 100644 --- a/game/engines/default/engine/UserChat.lua +++ b/game/engines/default/engine/UserChat.lua @@ -251,15 +251,15 @@ Your Item Vault has #TEAL#%d slots#WHITE#. Again, thank you, and enjoy Eyal! -#{italic}#Your malevolent local god of darkness, #GOLD#DarkGod#{normal}#]]):format(data.donated, data.donated * 10, data.items_vault_slots) - Dialog:simpleLongPopup("Thank you!", text, 600) +#{italic}#Your malevolent local god of darkness, #GOLD#DarkGod#{normal}#]]):tformat(data.donated, data.donated * 10, data.items_vault_slots) + Dialog:simpleLongPopup(_t"Thank you!", text, 600) end elseif e.se == "SelfJoin" then - self:addMessage("join", e.channel, profile.auth.login, e.channel, "#{italic}#Joined channel#{normal}#", nil, true) + self:addMessage("join", e.channel, profile.auth.login, e.channel, _t"#{italic}#Joined channel#{normal}#", nil, true) self:updateChanList() self:saveChannels() elseif e.se == "SelfPart" then - self:addMessage("join", e.channel, profile.auth.login, e.channel, "#{italic}#Left channel#{normal}#", nil, true) + self:addMessage("join", e.channel, profile.auth.login, e.channel, _t"#{italic}#Left channel#{normal}#", nil, true) self.channels[e.channel] = nil self:updateChanList() self:saveChannels() @@ -269,7 +269,7 @@ Again, thank you, and enjoy Eyal! self.channels[e.channel] = self.channels[e.channel] or {users={}, log={}} self.channels[e.channel].users[e.login] = {name=e.name, donator=e.donator, status=e.status, login=e.login} self.channels_changed = true - self:addMessage("join", e.channel, e.login, {uname, color}, "#{italic}##FIREBRICK#has joined the channel#{normal}#", nil, true) + self:addMessage("join", e.channel, e.login, {uname, color}, _t"#{italic}##FIREBRICK#has joined the channel#{normal}#", nil, true) if type(game) == "table" and game.logChat and e.channel == self.cur_channel then game.logChat("#{italic}##FIREBRICK#%s has joined channel %s (press space to talk).#{normal}#", e.login, e.channel) end @@ -280,7 +280,7 @@ Again, thank you, and enjoy Eyal! self.channels[e.channel] = self.channels[e.channel] or {users={}, log={}} self.channels[e.channel].users[e.login] = nil self.channels_changed = true - self:addMessage("join", e.channel, e.login, {uname, color}, "#{italic}##FIREBRICK#has left the channel#{normal}#", nil, true) + self:addMessage("join", e.channel, e.login, {uname, color}, _t"#{italic}##FIREBRICK#has left the channel#{normal}#", nil, true) if type(game) == "table" and game.logChat and e.channel == self.cur_channel then game.logChat("#{italic}##FIREBRICK#%s has left channel %s.#{normal}#", e.login, e.channel) end @@ -473,7 +473,7 @@ end function _M:showUserInfo(login) if not profile.auth then return end - local popup = Dialog:simpleWaiter("Requesting...", "Requesting user info...") + local popup = Dialog:simpleWaiter(_t"Requesting...", _t"Requesting user info...") core.display.forceRedraw() core.profile.pushOrder(string.format("o='ChatUserInfo' login=%q", login)) @@ -483,7 +483,7 @@ function _M:showUserInfo(login) popup:done() if not data then - Dialog:simplePopup("Error", "The server does not know about this player.") + Dialog:simplePopup(_t"Error", _t"The server does not know about this player.") return end data = zlib.decompress(data):unserialize() @@ -496,7 +496,7 @@ end function _M:getUserInfo(login) if not profile.auth then return end - local popup = Dialog:simpleWaiter("Requesting...", "Requesting user info...") + local popup = Dialog:simpleWaiter(_t"Requesting...", _t"Requesting user info...") core.display.forceRedraw() core.profile.pushOrder(string.format("o='ChatUserInfo' login=%q", login)) diff --git a/game/engines/default/engine/Zone.lua b/game/engines/default/engine/Zone.lua index 74014d090b5a3da2ffd0d35190115955fe014746..bfaee44f356d8a3873cf939299d051b6078308fd 100644 --- a/game/engines/default/engine/Zone.lua +++ b/game/engines/default/engine/Zone.lua @@ -534,11 +534,12 @@ function _M:applyEgo(e, ego, type, no_name_change) if not e.__original then e.__original = e:clone() end print("ego", ego.__CLASSNAME, ego.name, getmetatable(ego)) ego = ego:clone() - local newname = e.name + -- I18N Change name + local newname = _t(e.name) if not no_name_change then - local display = ego.display_string or ego.name - if ego.prefix or ego.display_prefix then newname = display .. e.name - else newname = e.name .. display end + local display = ego.display_string or _t(ego.name) + if _getFlagI18N("ego_always_prefix") or ego.prefix or ego.display_prefix then newname = display .. _t(e.name) + else newname = _t(e.name) .. display end end print("applying ego", ego.name, "to ", e.name, "::", newname, "///", e.unided_name, ego.unided_name) -- The ego requested instant resolving before merge ? @@ -557,6 +558,7 @@ function _M:applyEgo(e, ego, type, no_name_change) table.ruleMergeAppendAdd(e, ego, self.ego_rules[type] or {}) e.name = newname + e.display_name = newdisplayname if not ego.fake_ego then e.egoed = true e.egos_number = (e.egos_number or 0) + 1 @@ -918,7 +920,7 @@ function _M:getLevel(game, lev, old_lev, no_close) -- Load persistent level? if type(level_data.persistent) == "string" and level_data.persistent == "zone_temporary" then forceprint("Loading zone temporary level", self.short_name, lev) - local popup = Dialog:simpleWaiterTip("Loading level", "Please wait while loading the level... ", self:getLoadTips(), nil, 10000) + local popup = Dialog:simpleWaiterTip(_t"Loading level", _t"Please wait while loading the level... ", self:getLoadTips(), nil, 10000) core.display.forceRedraw() self.temp_memory_levels = self.temp_memory_levels or {} @@ -934,7 +936,7 @@ function _M:getLevel(game, lev, old_lev, no_close) popup:done() elseif type(level_data.persistent) == "string" and level_data.persistent == "zone" and not self.save_per_level then forceprint("Loading zone persistance level", self.short_name, lev) - local popup = Dialog:simpleWaiterTip("Loading level", "Please wait while loading the level... ", self:getLoadTips(), nil, 10000) + local popup = Dialog:simpleWaiterTip(_t"Loading level", _t"Please wait while loading the level... ", self:getLoadTips(), nil, 10000) core.display.forceRedraw() self.memory_levels = self.memory_levels or {} @@ -950,7 +952,7 @@ function _M:getLevel(game, lev, old_lev, no_close) popup:done() elseif type(level_data.persistent) == "string" and level_data.persistent == "memory" then forceprint("Loading memory persistance level", self.short_name, lev) - local popup = Dialog:simpleWaiterTip("Loading level", "Please wait while loading the level... ", self:getLoadTips(), nil, 10000) + local popup = Dialog:simpleWaiterTip(_t"Loading level", _t"Please wait while loading the level... ", self:getLoadTips(), nil, 10000) core.display.forceRedraw() game.memory_levels = game.memory_levels or {} @@ -966,7 +968,7 @@ function _M:getLevel(game, lev, old_lev, no_close) popup:done() elseif level_data.persistent then forceprint("Loading level persistance level", self.short_name, lev) - local popup = Dialog:simpleWaiterTip("Loading level", "Please wait while loading the level... ", self:getLoadTips(), nil, 10000) + local popup = Dialog:simpleWaiterTip(_t"Loading level", _t"Please wait while loading the level... ", self:getLoadTips(), nil, 10000) core.display.forceRedraw() -- Try to load from a savefile @@ -982,7 +984,7 @@ function _M:getLevel(game, lev, old_lev, no_close) -- In any case, make one if none was found if not level then forceprint("Creating level", self.short_name, lev) - local popup = Dialog:simpleWaiterTip("Generating level", "Please wait while generating the level... ", self:getLoadTips(), nil, 10000) + local popup = Dialog:simpleWaiterTip(_t"Generating level", _t"Please wait while generating the level... ", self:getLoadTips(), nil, 10000) core.display.forceRedraw() self._level_generation_count = 0 diff --git a/game/engines/default/engine/dialogs/Achievement.lua b/game/engines/default/engine/dialogs/Achievement.lua index e8ed38054ba83775adb334ccf2785d53bff376ff..986a05761529f6c933c1543e8509c3801dfc038f 100644 --- a/game/engines/default/engine/dialogs/Achievement.lua +++ b/game/engines/default/engine/dialogs/Achievement.lua @@ -22,7 +22,7 @@ local Shader = require "engine.Shader" local Dialog = require "engine.ui.Dialog" local Image = require "engine.ui.Image" local Textzone = require "engine.ui.Textzone" - +local FontPackage = require "engine.FontPackage" --- A sub dialog for defining an achievement -- -- See also: @{ShowAchievements} @@ -33,7 +33,7 @@ function _M:init(title, a) local c_frame = Image.new{file="achievement-ui/runes_inner.png", width=154, height=154} local c_image = Image.new{file=a.image or "trophy_gold.png", width=128, height=128} local color = a.huge and "#GOLD#" or "#LIGHT_GREEN#" - local c_desc = Textzone.new{width=500, auto_height=true, text=color..a.name.."#LAST#\n"..a.desc, font={"/data/font/DroidSans-Bold.ttf", 26}} + local c_desc = Textzone.new{width=500, auto_height=true, text=color..a.name.."#LAST#\n"..a.desc, font={FontPackage:getFont("bold"), 26}} c_desc:setTextShadow(1) c_desc:setShadowShader(Shader.default.textoutline and Shader.default.textoutline.shad, 1.2) self:setTitleShadowShader(Shader.default.textoutline and Shader.default.textoutline.shad, 1.5) diff --git a/game/engines/default/engine/dialogs/AudioOptions.lua b/game/engines/default/engine/dialogs/AudioOptions.lua index 76e1d7523f4e9b0d8205c0967d67f3ba43ec00a0..bcc9582c69c3fb1d3f8c2a98b83c036b4056b8e2 100644 --- a/game/engines/default/engine/dialogs/AudioOptions.lua +++ b/game/engines/default/engine/dialogs/AudioOptions.lua @@ -30,12 +30,12 @@ local Separator = require "engine.ui.Separator" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "Audio Options", 400, 300) + Dialog.init(self, _t"Audio Options", 400, 300) - self.c_enable = Checkbox.new{title="Enable audio", default=config.settings.audio.enable, fct=function() end, on_change=function(s) self:sfxEnable(s) end} + self.c_enable = Checkbox.new{title=_t"Enable audio", default=config.settings.audio.enable, fct=function() end, on_change=function(s) self:sfxEnable(s) end} - self.c_music_vol = NumberSlider.new{title="Music: ", size_title="Effects: ", w=400, max=100, min=0, value=config.settings.audio.music_volume, on_change = function(v) self:sfxVolume("music", v) end} - self.c_effects_vol = NumberSlider.new{title="Effects: ", w=400, max=100, min=0, value=config.settings.audio.effects_volume, on_change = function(v) self:sfxVolume("effects", v) end} + self.c_music_vol = NumberSlider.new{title=_t"Music: ", size_title=_t"Effects: ", w=400, max=100, min=0, value=config.settings.audio.music_volume, on_change = function(v) self:sfxVolume("music", v) end} + self.c_effects_vol = NumberSlider.new{title=_t"Effects: ", w=400, max=100, min=0, value=config.settings.audio.effects_volume, on_change = function(v) self:sfxVolume("effects", v) end} self:loadUI{ {left=0, top=0, ui=self.c_enable}, diff --git a/game/engines/default/engine/dialogs/Chat.lua b/game/engines/default/engine/dialogs/Chat.lua index 22f99abd0b37d203a29dab44878b143e22b7ebe1..1142d10945826e2e6bbc5fd897376f8046535a7f 100644 --- a/game/engines/default/engine/dialogs/Chat.lua +++ b/game/engines/default/engine/dialogs/Chat.lua @@ -37,7 +37,7 @@ function _M:init(chat, id, width) self.npc = chat.npc self.player = chat.player self.no_offscreen = "bottom" - Dialog.init(self, self.npc.name, width or 500, 400) + Dialog.init(self, self.npc.getName and self.npc:getName() or self.npc.name, width or 500, 400) local xoff = 0 if self.show_portraits then diff --git a/game/engines/default/engine/dialogs/ChatChannels.lua b/game/engines/default/engine/dialogs/ChatChannels.lua index 854e683eb474a61240c1da40183f3290dbc47369..f8cae690dba4a002c9613d76e72154a04394d29f 100644 --- a/game/engines/default/engine/dialogs/ChatChannels.lua +++ b/game/engines/default/engine/dialogs/ChatChannels.lua @@ -27,13 +27,13 @@ local Textzone = require "engine.ui.Textzone" module(..., package.seeall, class.inherit(Dialog)) function _M:init(chat) - Dialog.init(self, "Chat channels", 500, 400) + Dialog.init(self, _t"Chat channels", 500, 400) local mod = game.__mod_info.short_name local list = { - {name = "Global", kind = "global"}, - {name = game.__mod_info.long_name, kind = mod}, - {name = game.__mod_info.long_name.." [spoilers]", kind = mod.."-spoiler"}, + {name = _t"Global", kind = "global"}, + {name = _t(game.__mod_info.long_name), kind = mod}, + {name = _t(game.__mod_info.long_name).._t" [spoilers]", kind = mod.."-spoiler"}, } for i, l in pairs(profile.chat.channels) do if i ~= "global" and i ~= mod and i ~= mod.."-spoiler" then @@ -41,7 +41,7 @@ function _M:init(chat) end end - local c_desc = Textzone.new{width=self.iw - 10, height=1, auto_height=true, text="Select which channels to listen to. You can join new channels by typing '/join <channelname>' in the talkbox and leave channels by typing '/part <channelname>'"} + local c_desc = Textzone.new{width=self.iw - 10, height=1, auto_height=true, text=_t"Select which channels to listen to. You can join new channels by typing '/join <channelname>' in the talkbox and leave channels by typing '/part <channelname>'"} local uis = { {left=0, top=0, ui=c_desc} } for i, l in ipairs(list) do local l = l diff --git a/game/engines/default/engine/dialogs/ChatFilter.lua b/game/engines/default/engine/dialogs/ChatFilter.lua index 16087f5720acc14dc746830d093c02e0afeb2a3b..b05afc2fbe173e150cfbf31c618b4ae48ec4dede 100644 --- a/game/engines/default/engine/dialogs/ChatFilter.lua +++ b/game/engines/default/engine/dialogs/ChatFilter.lua @@ -27,20 +27,20 @@ local Textzone = require "engine.ui.Textzone" module(..., package.seeall, class.inherit(Dialog)) function _M:init(adds) - Dialog.init(self, "Chat filters", 500, 400) + Dialog.init(self, _t"Chat filters", 500, 400) local list = { - {name = "Public chat", kind = "talk"}, - {name = "Private whispers", kind = "whisper"}, - {name = "Join/part messages", kind = "join"}, - {name = "First time achievements (recommended to keep them on)", kind = "achievement_first"}, - {name = "Important achievements (recommended to keep them on)", kind = "achievement_huge"}, - {name = "Other achievements", kind = "achievement_other"}, + {name = _t"Public chat", kind = "talk"}, + {name = _t"Private whispers", kind = "whisper"}, + {name = _t"Join/part messages", kind = "join"}, + {name = _t"First time achievements (recommended to keep them on)", kind = "achievement_first"}, + {name = _t"Important achievements (recommended to keep them on)", kind = "achievement_huge"}, + {name = _t"Other achievements", kind = "achievement_other"}, } for i, l in ipairs(adds or {}) do list[#list+1] = l end self:triggerHook{"ChatFilters:list", list=list} - local c_desc = Textzone.new{width=self.iw - 10, height=1, auto_height=true, text="Select which types of chat events to see or not."} + local c_desc = Textzone.new{width=self.iw - 10, height=1, auto_height=true, text=_t"Select which types of chat events to see or not."} local uis = { {left=0, top=0, ui=c_desc} } for i, l in ipairs(list) do local l = l diff --git a/game/engines/default/engine/dialogs/ChatIgnores.lua b/game/engines/default/engine/dialogs/ChatIgnores.lua index ab0568c75c7d29709871e7fc5be86fde3f09ab60..dd5438c8af9abba7fba5287ec6a9955cc2194ffa 100644 --- a/game/engines/default/engine/dialogs/ChatIgnores.lua +++ b/game/engines/default/engine/dialogs/ChatIgnores.lua @@ -27,19 +27,19 @@ local Textzone = require "engine.ui.Textzone" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "Chat ignore list", 500, 400) + Dialog.init(self, _t"Chat ignore list", 500, 400) local list = {} for l, _ in pairs(config.settings.chat.ignores) do if _ then list[#list+1] = {name=l} end end local c_list = List.new{width=self.iw - 10, height=400, scrollbar=true, list=list, fct=function(item) - Dialog:yesnoPopup("Stop ignoring", "Really stop ignoring: "..item.name, function(ret) if ret then + Dialog:yesnoPopup(_t"Stop ignoring", ("Really stop ignoring: %s"):tformat(item.name), function(ret) if ret then config.settings.chat.ignores[item.name] = nil self:regen() end end) end} - local c_desc = Textzone.new{width=self.iw - 10, height=1, auto_height=true, text="Click a user to stop ignoring her/his messages."} + local c_desc = Textzone.new{width=self.iw - 10, height=1, auto_height=true, text=_t"Click a user to stop ignoring her/his messages."} local uis = { {left=0, top=0, ui=c_desc}, {left=0, top=c_desc.h+5, ui=c_list}, diff --git a/game/engines/default/engine/dialogs/DisplayResolution.lua b/game/engines/default/engine/dialogs/DisplayResolution.lua index 3f363c73bf04de2455f937a3d0c33bb04252511a..39a8ce30f717196f4f1cfc489b0a80d60b0a4947 100644 --- a/game/engines/default/engine/dialogs/DisplayResolution.lua +++ b/game/engines/default/engine/dialogs/DisplayResolution.lua @@ -32,18 +32,18 @@ function _M:init(on_change) local w, h, fullscreen, borderless = core.display.size() - Dialog.init(self, "Switch Resolution", 300, 20) + Dialog.init(self, _t"Switch Resolution", 300, 20) self.c_list = List.new{width=self.iw, nb_items=#self.list, list=self.list, fct=function(item) self:use(item) end} - self.c_fs = Checkbox.new{title="Fullscreen", default=fullscreen, + self.c_fs = Checkbox.new{title=_t"Fullscreen", default=fullscreen, fct=function() end, on_change=function(s) if s then self.c_wn.checked = false self.c_bl.checked = false end end } - self.c_bl = Checkbox.new{title="Borderless", default=borderless, + self.c_bl = Checkbox.new{title=_t"Borderless", default=borderless, fct=function() end, on_change=function(s) if s then self.c_wn.checked = false self.c_fs.checked = false end end } - self.c_wn = Checkbox.new{title="Windowed", default=not borderless and not fullscreen, + self.c_wn = Checkbox.new{title=_t"Windowed", default=not borderless and not fullscreen, fct=function() end, on_change=function(s) if s then self.c_fs.checked = false self.c_bl.checked = false end end } @@ -73,12 +73,12 @@ function _M:use(item) -- See if we need a restart (confirm). if core.display.setWindowSizeRequiresRestart(w, h, self.c_fs.checked , self.c_bl.checked) then - Dialog:yesnoPopup("Engine Restart Required" - , "Continue?" .. (game.creating_player and "" or " (progress will be saved)") + Dialog:yesnoPopup(_t"Engine Restart Required" + , ("Continue? %s"):tformat(game.creating_player and "" or _t" (progress will be saved)") , function(restart) if restart then - local resetPos = Dialog:yesnoPopup("Reset Window Position?" - , "Simply restart or restart+reset window position?" + local resetPos = Dialog:yesnoPopup(_t"Reset Window Position?" + , _t"Simply restart or restart+reset window position?" , function(simplyRestart) if not simplyRestart then core.display.setWindowPos(0, 0) @@ -90,9 +90,9 @@ function _M:use(item) util.showMainMenu(false, nil, nil , game.__mod_info.short_name, game.save_name , false) - end, "Restart", "Restart with reset") + end, _t"Restart", _t"Restart with reset") end - end, "Yes", "No") + end, _t"Yes", _t"No") else game:setResolution(r, true) end diff --git a/game/engines/default/engine/dialogs/Downloader.lua b/game/engines/default/engine/dialogs/Downloader.lua index cde74b542fd754d37d9434305d187d5e78167ab8..f541d7d73f645cdfc8a72d03915290b06b131578 100644 --- a/game/engines/default/engine/dialogs/Downloader.lua +++ b/game/engines/default/engine/dialogs/Downloader.lua @@ -108,8 +108,8 @@ function _M:makeDownloadbox(downid, file) local Waitbar = require "engine.ui.Waitbar" local Button = require "engine.ui.Button" - local d = Dialog.new(self.title or "Download: "..file, 600, 100) - local b = Button.new{text="Cancel", fct=function() self.view:downloadAction(downid, false) game:unregisterDialog(d) end} + local d = Dialog.new(self.title or ("Download: %s"):tformat(file), 600, 100) + local b = Button.new{text=_t"Cancel", fct=function() self.view:downloadAction(downid, false) game:unregisterDialog(d) end} local w = Waitbar.new{size=600, text=file} d:loadUI{ {left=0, top=0, ui=w}, diff --git a/game/engines/default/engine/dialogs/GameMenu.lua b/game/engines/default/engine/dialogs/GameMenu.lua index b2555335c7c5e31856a792f2c28d5f0c493ac6b5..996b00b31f2b1c8beedb1bd9a2586df7cd0d80aa 100644 --- a/game/engines/default/engine/dialogs/GameMenu.lua +++ b/game/engines/default/engine/dialogs/GameMenu.lua @@ -28,7 +28,7 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(actions) self:generateList(actions) - Dialog.init(self, "Game Menu", 300, 20) + Dialog.init(self, _t"Game Menu", 300, 20) self.c_list = List.new{width=self.iw, nb_items=#self.list, list=self.list, fct=function(item) self:use(item) end} @@ -49,33 +49,33 @@ end function _M:generateList(actions) local default_actions = { - resume = { "Resume", function() game:unregisterDialog(self) end }, - keybinds = { "Key Bindings", function() + resume = { _t"Resume", function() game:unregisterDialog(self) end }, + keybinds = { _t"Key Bindings", function() game:unregisterDialog(self) local menu = require("engine.dialogs.KeyBinder").new(game.normal_key, nil, game.gestures) game:registerDialog(menu) end }, - keybinds_all = { "Key Bindings", function() + keybinds_all = { _t"Key Bindings", function() game:unregisterDialog(self) local menu = require("engine.dialogs.KeyBinder").new(game.normal_key, true, game.gestures) game:registerDialog(menu) end }, - video = { "Video Options", function() + video = { _t"Video Options", function() game:unregisterDialog(self) local menu = require("engine.dialogs.VideoOptions").new() game:registerDialog(menu) end }, - resolution = { "Display Resolution", function() + resolution = { _t"Display Resolution", function() game:unregisterDialog(self) local menu = require("engine.dialogs.DisplayResolution").new() game:registerDialog(menu) end }, - achievements = { "Show Achievements", function() + achievements = { _t"Show Achievements", function() game:unregisterDialog(self) local menu = require("engine.dialogs.ShowAchievements").new(nil, game:getPlayer()) game:registerDialog(menu) end }, - sound = { "Audio Options", function() + sound = { _t"Audio Options", function() game:unregisterDialog(self) local menu = require("engine.dialogs.AudioOptions").new() game:registerDialog(menu) @@ -90,16 +90,16 @@ function _M:generateList(actions) local menu = require("engine.dialogs.SteamOptions").new() game:registerDialog(menu) end }, - cheatmode = { "#GREY#Developer Mode", function() + cheatmode = { _t"#GREY#Developer Mode", function() game:unregisterDialog(self) if config.settings.cheat then - Dialog:yesnoPopup("Developer Mode", "Disable developer mode?", function(ret) if ret then + Dialog:yesnoPopup(_t"Developer Mode", _t"Disable developer mode?", function(ret) if ret then config.settings.cheat = false game:saveSettings("cheat", "cheat = nil\n") util.showMainMenu() end end, nil, nil, true) else - Dialog:yesnoLongPopup("Developer Mode", [[Enable developer mode? + Dialog:yesnoLongPopup(_t"Developer Mode", _t[[Enable developer mode? Developer Mode is a special game mode used to debug and create addons. Using it will #CRIMSON#invalidate#LAST# any savefiles loaded. When activated you will have access to special commands: @@ -110,13 +110,13 @@ When activated you will have access to special commands: config.settings.cheat = true game:saveSettings("cheat", "cheat = true\n") util.showMainMenu() - end end, "No", "Yes", true) + end end, _t"No", _t"Yes", true) end end }, - save = { "Save Game", function() game:unregisterDialog(self) game:saveGame() end }, - quit = { "Main Menu", function() game:unregisterDialog(self) game:onQuit() end }, - exit = { "Exit Game", function() game:unregisterDialog(self) game:onExit() end }, + save = { _t"Save Game", function() game:unregisterDialog(self) game:saveGame() end }, + quit = { _t"Main Menu", function() game:unregisterDialog(self) game:onQuit() end }, + exit = { _t"Exit Game", function() game:unregisterDialog(self) game:onExit() end }, } -- Makes up the list diff --git a/game/engines/default/engine/dialogs/GetQuantity.lua b/game/engines/default/engine/dialogs/GetQuantity.lua index b53c7e0903a68b7ebd680e3a849184d809efaaf9..9bc4604d22432118e0583d819e9419ac620b1c84 100644 --- a/game/engines/default/engine/dialogs/GetQuantity.lua +++ b/game/engines/default/engine/dialogs/GetQuantity.lua @@ -30,12 +30,12 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(title, prompt, default, max, action, min) self.action = action - Dialog.init(self, title or "Quantity", 320, 110) + Dialog.init(self, title or _t"Quantity", 320, 110) local c_box = Numberbox.new{title=prompt and (prompt..": ") or "", number=default or 0, max=max, min=min, chars=10, fct=function(text) self:okclick() end} self.c_box = c_box - local ok = require("engine.ui.Button").new{text="Accept", fct=function() self:okclick() end} - local cancel = require("engine.ui.Button").new{text="Cancel", fct=function() self:cancelclick() end} + local ok = require("engine.ui.Button").new{text=_t"Accept", fct=function() self:okclick() end} + local cancel = require("engine.ui.Button").new{text=_t"Cancel", fct=function() self:cancelclick() end} self:loadUI{ {left=0, top=0, padding_h=10, ui=c_box}, @@ -56,7 +56,7 @@ function _M:okclick() game:unregisterDialog(self) self.action(self.qty) else - Dialog:simplePopup("Error", "Enter a quantity.") + Dialog:simplePopup(_t"Error", _t"Enter a quantity.") end end diff --git a/game/engines/default/engine/dialogs/GetQuantitySlider.lua b/game/engines/default/engine/dialogs/GetQuantitySlider.lua index 2b9d43a5badf2a9f3633ea003a0dffdf4e5d0f05..07eb818ffb0711591e5c130bf44a31dba7d6e545 100644 --- a/game/engines/default/engine/dialogs/GetQuantitySlider.lua +++ b/game/engines/default/engine/dialogs/GetQuantitySlider.lua @@ -30,12 +30,12 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(title, prompt, default, min, max, step, action) self.action = action - Dialog.init(self, title or "Quantity", 320, 110) + Dialog.init(self, title or _t"Quantity", 320, 110) local c_box = NumberSlider.new{title=prompt and (prompt..": ") or "", value=default or 0, max=max, min=min, step=step, size=400, fct=function() self:okclick() end} self.c_box = c_box - local ok = require("engine.ui.Button").new{text="Accept", fct=function() self:okclick() end} - local cancel = require("engine.ui.Button").new{text="Cancel", fct=function() self:cancelclick() end} + local ok = require("engine.ui.Button").new{text=_t"Accept", fct=function() self:okclick() end} + local cancel = require("engine.ui.Button").new{text=_t"Cancel", fct=function() self:cancelclick() end} self:loadUI{ {left=0, top=0, padding_h=10, ui=c_box}, @@ -56,7 +56,7 @@ function _M:okclick() game:unregisterDialog(self) self.action(self.qty) else - Dialog:simplePopup("Error", "Enter a quantity.") + Dialog:simplePopup(_t"Error", _t"Enter a quantity.") end end diff --git a/game/engines/default/engine/dialogs/GetText.lua b/game/engines/default/engine/dialogs/GetText.lua index 25e9099f6d83a9670c17cdcef25ed8422dc7aef6..941333cfcbde5d55b1529f436f14482de3be0cac 100644 --- a/game/engines/default/engine/dialogs/GetText.lua +++ b/game/engines/default/engine/dialogs/GetText.lua @@ -36,10 +36,10 @@ function _M:init(title, text, min, max, action, cancel, absolute) Dialog.init(self, title, 320, 110) - local c_box = Textbox.new{title=text..": ", text="", chars=30, max_len=max, fct=function(text) self:okclick() end} + local c_box = Textbox.new{title=text..": ", text=_t"", chars=30, max_len=max, fct=function(text) self:okclick() end} self.c_box = c_box - local ok = require("engine.ui.Button").new{text="Accept", fct=function() self:okclick() end} - local cancel = require("engine.ui.Button").new{text="Cancel", fct=function() self:cancelclick() end} + local ok = require("engine.ui.Button").new{text=_t"Accept", fct=function() self:okclick() end} + local cancel = require("engine.ui.Button").new{text=_t"Cancel", fct=function() self:cancelclick() end} self:loadUI{ {left=0, top=0, padding_h=10, ui=c_box}, @@ -64,7 +64,7 @@ function _M:okclick() game:unregisterDialog(self) self.action(self.name) else - Dialog:simplePopup("Error", ("Must be between %i and %i characters."):format(self.min, self.max)) + Dialog:simplePopup(_t"Error", ("Must be between %i and %i characters."):tformat(self.min, self.max)) end end diff --git a/game/engines/default/engine/dialogs/KeyBinder.lua b/game/engines/default/engine/dialogs/KeyBinder.lua index 86710557c281a133e9643d0e647c47d0ea20cf24..ee920d1bc83ece1f86b3acada38b02035ead3a9a 100644 --- a/game/engines/default/engine/dialogs/KeyBinder.lua +++ b/game/engines/default/engine/dialogs/KeyBinder.lua @@ -31,7 +31,7 @@ local GetText = require "engine.dialogs.GetText" module(..., package.seeall, class.inherit(Dialog)) function _M:init(key_source, force_all, gesture_source) - Dialog.init(self, "Key bindings", 800, game.h * 0.9) + Dialog.init(self, _t"Key bindings", 800, game.h * 0.9) self.gesture = gesture_source self.key_source = key_source @@ -79,7 +79,7 @@ function _M:use(item) -- Make a dialog to ask for the key -- if curcol == 1 or curcol == 2 then - local title = " Press a key (escape to cancel, backspace to remove) for: "..tostring(t.name) + local title = (" Press a key (escape to cancel, backspace to remove) for: %s"):tformat(tostring(t.name)) local font = self.font local w, h = font:size(title:removeColorCodes()) local d = engine.Dialog.new(title, w + 20, h + 25, nil, nil, nil, font) @@ -128,14 +128,14 @@ function _M:use(item) } d.drawDialog = function(self, s) - s:drawColorStringBlendedCentered(self.font, curcol == 1 and "Bind key" or "Bind alternate key", 2, 2, self.iw - 2, self.ih - 2) + s:drawColorStringBlendedCentered(self.font, curcol == 1 and _t"Bind key" or _t"Bind alternate key", 2, 2, self.iw - 2, self.ih - 2) end game:registerDialog(d) elseif curcol == 3 then - local title = "Make gesture (using right mouse button) or type it (or escape) for: "..tostring(t.name) + local title = ("Make gesture (using right mouse button) or type it (or escape) for: %s"):tformat(tostring(t.name)) local font = self.font local w, h = font:size(title) - local d = GetText.new(title, "Gesture", 0, 10, + local d = GetText.new(title, _t"Gesture", 0, 10, function(gesture) if item.g and item.g ~= "--" then self.gesture:removeGesture(item.g) diff --git a/game/engines/default/engine/dialogs/ShowAchievements.lua b/game/engines/default/engine/dialogs/ShowAchievements.lua index e5a33a1046c63a1414da4a6e2c1db34e009462b8..8ac3f9aed0077e2f5402d66110756bf2ff3ecb34 100644 --- a/game/engines/default/engine/dialogs/ShowAchievements.lua +++ b/game/engines/default/engine/dialogs/ShowAchievements.lua @@ -38,11 +38,11 @@ function _M:init(title, player) local nb = 0 for id, data in pairs(world.achieved) do nb = nb + 1 end - Dialog.init(self, (title or "Achievements").." ("..nb.."/"..total..")", game.w * 0.8, game.h * 0.8) + Dialog.init(self, title or ("Achievements(%s/%s)"):tformat(nb, total), game.w * 0.8, game.h * 0.8) - self.c_self = Checkbox.new{title="Yours only", default=false, fct=function() end, on_change=function(s) if s then self:switchTo("self") end end} - self.c_main = Checkbox.new{title="All achieved", default=true, fct=function() end, on_change=function(s) if s then self:switchTo("main") end end} - self.c_all = Checkbox.new{title="Everything", default=false, fct=function() end, on_change=function(s) if s then self:switchTo("all") end end} + self.c_self = Checkbox.new{title=_t"Yours only", default=false, fct=function() end, on_change=function(s) if s then self:switchTo("self") end end} + self.c_main = Checkbox.new{title=_t"All achieved", default=true, fct=function() end, on_change=function(s) if s then self:switchTo("main") end end} + self.c_all = Checkbox.new{title=_t"Everything", default=false, fct=function() end, on_change=function(s) if s then self:switchTo("all") end end} self.c_image = Image.new{file="trophy_gold.png", width=128, height=128, shadow=true} self.c_desc = TextzoneList.new{scrollbar=true, width=math.floor(self.iw * 0.4 - 10), height=self.ih - self.c_self.h} @@ -70,11 +70,11 @@ function _M:init(title, player) end self.c_list = ListColumns.new{width=math.floor(self.iw * 0.6 - 10), height=self.ih - 10 - self.c_self.h, floating_headers = true, scrollbar=true, sortable=true, columns={ - {name="", width={24,"fixed"}, display_prop="--", direct_draw=direct_draw}, - {name="Achievement", width=50, display_prop="name", sort="name"}, - {name="Category", width=20, display_prop="category", sort="category"}, - {name="When", width=15, display_prop="when", sort="when"}, - {name="Who", width=15, display_prop="who", sort="who"}, + {name=_t"", width={24,"fixed"}, display_prop="--", direct_draw=direct_draw}, + {name=_t"Achievement", width=50, display_prop="name", sort="name"}, + {name=_t"Category", width=20, display_prop="category", sort="category"}, + {name=_t"When", width=15, display_prop="when", sort="when"}, + {name=_t"Who", width=15, display_prop="who", sort="who"}, }, list=self.list, fct=function(item) end, select=function(item, sel) self:select(item) end} local sep = Separator.new{dir="horizontal", size=self.ih - 10 - self.c_self.h} @@ -112,15 +112,15 @@ function _M:select(item) if item then local also = "" if self.player and self.player.achievements and self.player.achievements[item.id] then - also = "#GOLD#Also achieved by your current character#LAST#\n" + also = _t"#GOLD#Also achieved by your current character#LAST#\n" end self.c_image.item = item.tex self.c_image.iw = item.tex[6] self.c_image.ih = item.tex[7] local track = self:getTrack(item.a) - local desc = ("#GOLD#Achieved on:#LAST# %s\n#GOLD#Achieved by:#LAST# %s\n%s\n#GOLD#Description:#LAST# %s"):format(item.when, item.who, also, item.desc):toTString() + local desc = ("#GOLD#Achieved on:#LAST# %s\n#GOLD#Achieved by:#LAST# %s\n%s\n#GOLD#Description:#LAST# %s"):tformat(item.when, item.who, also, item.desc):toTString() if track then - desc:add(true, true, {"color","GOLD"}, "Progress: ", {"color","LAST"}) + desc:add(true, true, {"color","GOLD"}, _t"Progress: ", {"color","LAST"}) desc:merge(track) end self.c_desc:switchItem(item, desc) @@ -176,9 +176,9 @@ function _M:generateList(kind) if a.show == "full" or not data.notdone then list[#list+1] = { name=a.name, color=color, desc=a.desc, category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } elseif a.show == "none" then - list[#list+1] = { name="???", color=color, desc="-- Unknown --", category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } + list[#list+1] = { name=_t"???", color=color, desc=_t"-- Unknown --", category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } elseif a.show == "name" then - list[#list+1] = { name=a.name, color=color, desc="-- Unknown --", category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } + list[#list+1] = { name=a.name, color=color, desc=_t"-- Unknown --", category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } else list[#list+1] = { name=a.name, color=color, desc=a.desc, category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } end diff --git a/game/engines/default/engine/dialogs/ShowEquipInven.lua b/game/engines/default/engine/dialogs/ShowEquipInven.lua index 3e71cf9815142705bdb0645733d40619c01fbe8d..3a2fdd2f54c420c6444723f28ca61e9a18f90e06 100644 --- a/game/engines/default/engine/dialogs/ShowEquipInven.lua +++ b/game/engines/default/engine/dialogs/ShowEquipInven.lua @@ -34,26 +34,26 @@ function _M:init(title, actor, filter, action, on_select) self.actor = actor self.on_select = on_select - Dialog.init(self, title or "Inventory", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) + Dialog.init(self, title or _t"Inventory", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) self.max_h = 0 -- self.c_desc = TextzoneList.new{width=self.iw, height=self.max_h*self.font_h, no_color_bleed=true} self.c_inven = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - self.max_h*self.font_h - 10, sortable=true, scrollbar=true, columns={ - {name="", width={20,"fixed"}, display_prop="char", sort="id"}, - {name="", width={24,"fixed"}, display_prop="object", sort="sortname", direct_draw=function(item, x, y) if item.object then item.object:toScreen(nil, x+4, y, 16, 16) end end}, - {name="Inventory", width=72, display_prop="name", sort="sortname"}, - {name="Category", width=20, display_prop="cat", sort="cat"}, - {name="Enc.", width=8, display_prop="encumberance", sort="encumberance"}, + {name=_t"", width={20,"fixed"}, display_prop="char", sort="id"}, + {name=_t"", width={24,"fixed"}, display_prop="object", sort="sortname", direct_draw=function(item, x, y) if item.object then item.object:toScreen(nil, x+4, y, 16, 16) end end}, + {name=_t"Inventory", width=72, display_prop="name", sort="sortname"}, + {name=_t"Category", width=20, display_prop="cat", sort="cat"}, + {name=_t"Enc.", width=8, display_prop="encumberance", sort="encumberance"}, }, list={}, fct=function(item, sel, button, event) self:use(item, button, event) end, select=function(item, sel) self:select(item) end, on_drag=function(item) if self.on_drag then self.on_drag(item) end end} self.c_equip = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - self.max_h*self.font_h - 10, scrollbar=true, columns={ - {name="", width={20,"fixed"}, display_prop="char"}, - {name="", width={8+16,"fixed"}, display_prop="object", direct_draw=function(item, x, y) if item.object then item.object:toScreen(nil, x+4, y, 16, 16) end end}, - {name="Equipment", width=72, display_prop="name"}, - {name="Category", width=20, display_prop="cat"}, - {name="Enc.", width=8, display_prop="encumberance"}, + {name=_t"", width={20,"fixed"}, display_prop="char"}, + {name=_t"", width={8+16,"fixed"}, display_prop="object", direct_draw=function(item, x, y) if item.object then item.object:toScreen(nil, x+4, y, 16, 16) end end}, + {name=_t"Equipment", width=72, display_prop="name"}, + {name=_t"Category", width=20, display_prop="cat"}, + {name=_t"Enc.", width=8, display_prop="encumberance"}, }, list={}, fct=function(item, sel, button, event) self:use(item, button, event) end, select=function(item, sel) self:select(item) end, on_drag=function(item) if self.on_drag then self.on_drag(item) end end} self:generateList() @@ -104,7 +104,7 @@ function _M:defineHotkey(id) if not item or not item.object then return end self.actor.hotkey[id] = {"inventory", item.object:getName{no_add_name=true, no_count=true}} - self:simplePopup("Hotkey "..id.." assigned", item.object:getName{no_add_name=true, no_count=true}:capitalize().." assigned to hotkey "..id) + self:simplePopup(("Hotkey %s assigned"):tformat(id), ("%s assigned to hotkey %s"):tformat(item.object:getName{no_add_name=true, no_count=true}:capitalize(), id)) self.actor.changed = true end @@ -149,7 +149,8 @@ function _M:generateList(no_update) local enc = 0 o:forAllStack(function(o) enc=enc+o.encumber end) - list[#list+1] = { id=#list+1, char=char, name=o:getName(), sortname=o:getName():toString():removeColorCodes(), color=o:getDisplayColor(), object=o, inven=inven_id, item=item, cat=o.subtype, encumberance=enc, desc=o:getDesc() } + list[#list+1] = { id=#list+1, char=char, name=o:getName(), sortname=o:getName():toString():removeColorCodes(), + color=o:getDisplayColor(), object=o, inven=inven_id, item=item, cat=_t(o.subtype, "entity subtype"), encumberance=enc, desc=o:getDesc() } chars[char] = #list i = i + 1 end @@ -170,8 +171,7 @@ function _M:generateList(no_update) local enc = 0 o:forAllStack(function(o) enc=enc+o.encumber end) - - list[#list+1] = { id=#list+1, char=char, name=o:getName(), sortname=o:getName():toString():removeColorCodes(), color=o:getDisplayColor(), object=o, inven=self.actor.INVEN_INVEN, item=item, cat=o.subtype, encumberance=enc, desc=o:getDesc() } + list[#list+1] = { id=#list+1, char=char, name=o:getName(), sortname=o:getName():toString():removeColorCodes(), color=o:getDisplayColor(), object=o, inven=self.actor.INVEN_INVEN, item=item, cat=_t(o.subtype, "entity subtype"), encumberance=enc, desc=o:getDesc() } chars[char] = #list i = i + 1 end diff --git a/game/engines/default/engine/dialogs/ShowEquipment.lua b/game/engines/default/engine/dialogs/ShowEquipment.lua index 01eff7f8fbb1b59cb72dfbf1658a3c5540b876ee..57f191166c8a868502b8a8681ef291cf0ed8db5e 100644 --- a/game/engines/default/engine/dialogs/ShowEquipment.lua +++ b/game/engines/default/engine/dialogs/ShowEquipment.lua @@ -32,16 +32,16 @@ function _M:init(title, actor, filter, action) self.actor = actor self.filter = filter self.action = action - Dialog.init(self, title or "Equipment", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) + Dialog.init(self, title or _t"Equipment", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - 10), height=self.ih, no_color_bleed=true} self.c_list = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - 10, scrollbar=true, columns={ - {name="", width={20,"fixed"}, display_prop="char"}, - {name="", width={24,"fixed"}, display_prop="object", direct_draw=function(item, x, y) if item.object then item.object:toScreen(nil, x+4, y, 16, 16) end end}, - {name="Equipment", width=72, display_prop="name"}, - {name="Category", width=20, display_prop="cat"}, - {name="Enc.", width=8, display_prop="encumberance"}, + {name=_t"", width={20,"fixed"}, display_prop="char"}, + {name=_t"", width={24,"fixed"}, display_prop="object", direct_draw=function(item, x, y) if item.object then item.object:toScreen(nil, x+4, y, 16, 16) end end}, + {name=_t"Equipment", width=72, display_prop="name"}, + {name=_t"Category", width=20, display_prop="cat"}, + {name=_t"Enc.", width=8, display_prop="encumberance"}, }, list={}, fct=function(item) self:use(item) end, select=function(item, sel) self:select(item) end} self:generateList() @@ -102,7 +102,7 @@ function _M:generateList() local enc = 0 o:forAllStack(function(o) enc=enc+o.encumber end) - list[#list+1] = { id=#list+1, char=char, name=o:getName(), color=o:getDisplayColor(), object=o, inven=inven_id, item=item, cat=o.subtype, encumberance=enc, desc=o:getDesc() } + list[#list+1] = { id=#list+1, char=char, name=o:getName(), color=o:getDisplayColor(), object=o, inven=inven_id, item=item, cat=_t(o.subtype, "entity subtype"), encumberance=enc, desc=o:getDesc() } chars[char] = #list i = i + 1 end diff --git a/game/engines/default/engine/dialogs/ShowErrorStack.lua b/game/engines/default/engine/dialogs/ShowErrorStack.lua index b9e1bc5ecebd4025feec2d1894fdab64e58bd447..3cae3c9bcedf2e09f7ea01787c053d02f5a070e8 100644 --- a/game/engines/default/engine/dialogs/ShowErrorStack.lua +++ b/game/engines/default/engine/dialogs/ShowErrorStack.lua @@ -48,7 +48,7 @@ function _M:init(errs) self.errs_t = errs errs = table.concat(errs, "\n") self.errs = errs - Dialog.init(self, "Lua Error", 700, 500) + Dialog.init(self, _t"Lua Error", 700, 500) local md5 = require "md5" local errmd5 = md5.sumhexa(errs) @@ -67,13 +67,13 @@ function _M:init(errs) local realpath_errfile = nil - local reason = "If you already reported that error, you do not have to do it again (unless you feel the situation is different)." + local reason = _t"If you already reported that error, you do not have to do it again (unless you feel the situation is different)." if infos.loaded then - if infos.reported then reason = "You #LIGHT_GREEN#already reported#WHITE# that error, you do not have to do it again (unless you feel the situation is different)." - else reason = "You have already got this error but #LIGHT_RED#never reported#WHITE# it, please do." + if infos.reported then reason = _t"You #LIGHT_GREEN#already reported#WHITE# that error, you do not have to do it again (unless you feel the situation is different)." + else reason = _t"You have already got this error but #LIGHT_RED#never reported#WHITE# it, please do." end else - reason = "You have #LIGHT_RED#never seen#WHITE# that error, please report it." + reason = _t"You have #LIGHT_RED#never seen#WHITE# that error, please report it." print(pcall(function() fs.mkdir("/error-logs") @@ -98,16 +98,16 @@ function _M:init(errs) self:saveError(true, infos.reported) - local errmsg = Textzone.new{text=[[#{bold}#Oh my! It seems there was an error! + local errmsg = Textzone.new{text=_t[[#{bold}#Oh my! It seems there was an error! The game might still work but this is suspect, please type in your current situation and click on "Send" to send an error report to the game creator. If you are not currently connected to the internet, please report this bug when you can on the forums at http://forums.te4.org/ ]]..reason..[[#{normal}#]], width=690, auto_height=true} local errzone = Textzone.new{text=display_errs, width=690, height=300} - self.what = Textbox.new{title="What happened?: ", text="", chars=60, max_len=1000, fct=function(text) self:send() end} - local ok = require("engine.ui.Button").new{text="Send", fct=function() self:send() end} - local cancel = require("engine.ui.Button").new{text="Close", fct=function() game:unregisterDialog(self) end} - local cancel_all = require("engine.ui.Button").new{text="Close All", fct=function() + self.what = Textbox.new{title=_t"What happened?: ", text=_t"", chars=60, max_len=1000, fct=function(text) self:send() end} + local ok = require("engine.ui.Button").new{text=_t"Send", fct=function() self:send() end} + local cancel = require("engine.ui.Button").new{text=_t"Close", fct=function() game:unregisterDialog(self) end} + local cancel_all = require("engine.ui.Button").new{text=_t"Close All", fct=function() for i = #game.dialogs, 1, -1 do local d = game.dialogs[i] if d.__CLASSNAME == "engine.dialogs.ShowErrorStack" then @@ -132,7 +132,7 @@ If you are not currently connected to the internet, please report this bug when end if realpath_errfile then - local realpath_errfile_t = Textzone.new{text="Log saved to file (click to copy to clipboard):#LIGHT_BLUE#"..realpath_errfile, width=self.iw, auto_height=true, fct=function() core.key.setClipboard(realpath_errfile) game.log("File location copied to clipboard.") end} + local realpath_errfile_t = Textzone.new{text=("Log saved to file (click to copy to clipboard):#LIGHT_BLUE#%s"):tformat(realpath_errfile), width=self.iw, auto_height=true, fct=function() core.key.setClipboard(realpath_errfile) game.log("File location copied to clipboard.") end} for i, ui in ipairs(uis) do if ui.bottom then ui.bottom = ui.bottom + realpath_errfile_t.h end end table.insert(uis, 1, {left=0, bottom=0, ui=realpath_errfile_t}) end diff --git a/game/engines/default/engine/dialogs/ShowInventory.lua b/game/engines/default/engine/dialogs/ShowInventory.lua index c37d211b482332613118ca5c7ed448c940bbe58b..19f62f7033937ea18b1cd80d407ad82a532df4ac 100644 --- a/game/engines/default/engine/dialogs/ShowInventory.lua +++ b/game/engines/default/engine/dialogs/ShowInventory.lua @@ -33,16 +33,16 @@ function _M:init(title, inven, filter, action, actor) self.filter = filter self.action = action self.actor = actor - Dialog.init(self, title or "Inventory", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) + Dialog.init(self, title or _t"Inventory", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - 10), height=self.ih, no_color_bleed=true} self.c_list = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - 10, sortable=true, scrollbar=true, columns={ - {name="", width={20,"fixed"}, display_prop="char", sort="id"}, - {name="", width={24,"fixed"}, display_prop="object", sort="sortname", direct_draw=function(item, x, y) item.object:toScreen(nil, x+4, y, 16, 16) end}, - {name="Inventory", width=72, display_prop="name", sort="sortname"}, - {name="Category", width=20, display_prop="cat", sort="cat"}, - {name="Enc.", width=8, display_prop="encumberance", sort="encumberance"}, + {name=_t"", width={20,"fixed"}, display_prop="char", sort="id"}, + {name=_t"", width={24,"fixed"}, display_prop="object", sort="sortname", direct_draw=function(item, x, y) item.object:toScreen(nil, x+4, y, 16, 16) end}, + {name=_t"Inventory", width=72, display_prop="name", sort="sortname"}, + {name=_t"Category", width=20, display_prop="cat", sort="cat"}, + {name=_t"Enc.", width=8, display_prop="encumberance", sort="encumberance"}, }, list={}, fct=function(item) self:use(item) end, select=function(item, sel) self:select(item) end} self:generateList() @@ -98,7 +98,7 @@ function _M:generateList() local enc = 0 o:forAllStack(function(o) enc=enc+o.encumber end) - list[#list+1] = { id=i, char=char, name=o:getName(), sortname=o:getName():toString():removeColorCodes(), color=o:getDisplayColor(), object=o, item=item, cat=o.subtype, encumberance=enc, desc=o:getDesc() } + list[#list+1] = { id=i, char=char, name=o:getName(), sortname=o:getName():toString():removeColorCodes(), color=o:getDisplayColor(), object=o, item=item, cat=_t(o.subtype, "entity subtype"), encumberance=enc, desc=o:getDesc() } list.chars[char] = #list i = i + 1 end diff --git a/game/engines/default/engine/dialogs/ShowPickupFloor.lua b/game/engines/default/engine/dialogs/ShowPickupFloor.lua index a84465cca0a69e4d21661eae0d5e91b8e3c49a5d..4582dae9a0cc3b7fd5c1f50f9981a51be59c481b 100644 --- a/game/engines/default/engine/dialogs/ShowPickupFloor.lua +++ b/game/engines/default/engine/dialogs/ShowPickupFloor.lua @@ -34,18 +34,18 @@ function _M:init(title, x, y, filter, action, takeall, actor) self.filter = filter self.action = action self.actor = actor - Dialog.init(self, title or "Pickup", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) + Dialog.init(self, title or _t"Pickup", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) - local takeall = Button.new{text=takeall or "(*) Take all", width=self.iw - 40, fct=function() self:takeAll() end} + local takeall = Button.new{text=takeall or _t"(*) Take all", width=self.iw - 40, fct=function() self:takeAll() end} self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - 10), height=self.ih - takeall.h, no_color_bleed=true} self.c_list = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - 10 - takeall.h, scrollbar=true, columns={ - {name="", width={20,"fixed"}, display_prop="char"}, - {name="", width={24,"fixed"}, display_prop="object", sort="sortname", direct_draw=function(item, x, y) item.object:toScreen(nil, x+4, y, 16, 16) end}, - {name="Item", width=72, display_prop="sortname"}, - {name="Category", width=20, display_prop="cat"}, - {name="Enc.", width=8, display_prop="encumberance"}, + {name=_t"", width={20,"fixed"}, display_prop="char"}, + {name=_t"", width={24,"fixed"}, display_prop="object", sort="sortname", direct_draw=function(item, x, y) item.object:toScreen(nil, x+4, y, 16, 16) end}, + {name=_t"Item", width=72, display_prop="sortname"}, + {name=_t"Category", width=20, display_prop="cat"}, + {name=_t"Enc.", width=8, display_prop="encumberance"}, }, list={}, fct=function(item) self:use(item) end, select=function(item, sel) self:select(item) end} self:generateList() @@ -125,7 +125,7 @@ function _M:generateList() local enc = 0 o:forAllStack(function(o) enc=enc+o.encumber end) - list[#list+1] = { char=char, name=o:getName(), sortname=o:getName():toString():removeColorCodes(), color=o:getDisplayColor(), object=o, item=idx, cat=o.subtype, encumberance=enc, desc=o:getDesc() } + list[#list+1] = { char=char, name=o:getName(), sortname=o:getName():toString():removeColorCodes(), color=o:getDisplayColor(), object=o, item=idx, cat=_t(o.subtype, "entity subtype"), encumberance=enc, desc=o:getDesc() } i = i + 1 end idx = idx + 1 diff --git a/game/engines/default/engine/dialogs/ShowQuests.lua b/game/engines/default/engine/dialogs/ShowQuests.lua index 88339f42cdd84492368771961b78fb02d26ab898..73fc2f448dbcd4b8c5141413ae5233a54208ea35 100644 --- a/game/engines/default/engine/dialogs/ShowQuests.lua +++ b/game/engines/default/engine/dialogs/ShowQuests.lua @@ -29,15 +29,15 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(actor, select_id) self.actor = actor - Dialog.init(self, "Quest Log for "..actor.name, game.w * 0.8, game.h * 0.8) + Dialog.init(self, ("Quest Log for %s"):tformat(actor:getName()), game.w * 0.8, game.h * 0.8) self.c_desc = TextzoneList.new{scrollbar=true, width=math.floor(self.iw / 2 - 10), height=self.ih} self:generateList() self.c_list = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - 10, scrollbar=true, sortable=true, columns={ - {name="Quest", width=70, display_prop="name", sort="name"}, - {name="Status", width=30, display_prop="status", sort="status_order"}, + {name=_t"Quest", width=70, display_prop="name", sort="name"}, + {name=_t"Status", width=30, display_prop="status", sort="status_order"}, }, list=self.list, fct=function(item) end, select=function(item, sel) self:select(item) end} self:loadUI{ diff --git a/game/engines/default/engine/dialogs/ShowStore.lua b/game/engines/default/engine/dialogs/ShowStore.lua index 9e973fe6028b2aa2a90e107f6267068c3e6a1f02..76ac01b20c1a7b4ef22d339bbd666230c1cd7ab1 100644 --- a/game/engines/default/engine/dialogs/ShowStore.lua +++ b/game/engines/default/engine/dialogs/ShowStore.lua @@ -38,22 +38,22 @@ function _M:init(title, store_inven, actor_inven, store_filter, actor_filter, ac self.actor_inven = actor_inven self.store_filter = store_filter self.actor_filter = actor_filter - Dialog.init(self, title or "Store", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) + Dialog.init(self, title or _t"Store", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) self.c_inven = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - 10, sortable=true, scrollbar=true, columns={ - {name="", width={20,"fixed"}, display_prop="char", sort="id"}, - {name="", width={24,"fixed"}, display_prop="object", direct_draw=function(item, x, y) item.object:toScreen(nil, x+4, y, 16, 16) end}, - {name="Inventory", width=80, display_prop="name", sort="name"}, - {name="Category", width=20, display_prop="cat", sort="cat"}, - {name="Price", width={50,"fixed"}, display_prop="desc_price", sort=function(a, b) return descprice("sell", a.object) <descprice("sell", b.object) end}, + {name=_t"", width={20,"fixed"}, display_prop="char", sort="id"}, + {name=_t"", width={24,"fixed"}, display_prop="object", direct_draw=function(item, x, y) item.object:toScreen(nil, x+4, y, 16, 16) end}, + {name=_t"Inventory", width=80, display_prop="name", sort="name"}, + {name=_t"Category", width=20, display_prop="cat", sort="cat"}, + {name=_t"Price", width={50,"fixed"}, display_prop="desc_price", sort=function(a, b) return descprice("sell", a.object) <descprice("sell", b.object) end}, }, list={}, fct=function(item, sel) self:use(item) end, select=function(item, sel) self:select(item) end} self.c_store = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - 10, sortable=true, scrollbar=true, columns={ - {name="", width={20,"fixed"}, display_prop="char", sort="id"}, - {name="", width={24,"fixed"}, display_prop="object", direct_draw=function(item, x, y) item.object:toScreen(nil, x+4, y, 16, 16) end}, - {name="Store", width=80, display_prop="name"}, - {name="Category", width=20, display_prop="cat"}, - {name="Price", width={50,"fixed"}, display_prop="desc_price", sort=function(a, b) return descprice("buy", a.object) <descprice("buy", b.object) end}, + {name=_t"", width={20,"fixed"}, display_prop="char", sort="id"}, + {name=_t"", width={24,"fixed"}, display_prop="object", direct_draw=function(item, x, y) item.object:toScreen(nil, x+4, y, 16, 16) end}, + {name=_t"Store", width=80, display_prop="name"}, + {name=_t"Category", width=20, display_prop="cat"}, + {name=_t"Price", width={50,"fixed"}, display_prop="desc_price", sort=function(a, b) return descprice("buy", a.object) <descprice("buy", b.object) end}, }, list={}, fct=function(item) self:use(item) end, select=function(item, sel) self:select(item) end} self:generateList() @@ -126,7 +126,7 @@ function _M:generateList() for item, o in ipairs(self.store_inven) do if not self.store_filter or self.store_filter(o) then local char = self:makeKeyChar(i) - list[#list+1] = { id=#list+1, char=char, name=o:getName(), color=o:getDisplayColor(), object=o, item=item, cat=o.subtype, cost=o.cost, desc=o:getDesc(), desc_price=self.descprice("buy", o) } + list[#list+1] = { id=#list+1, char=char, name=o:getName(), color=o:getDisplayColor(), object=o, item=item, cat=_t(o.subtype, "entity subtype"), cost=o.cost, desc=o:getDesc(), desc_price=self.descprice("buy", o) } list.chars[char] = #list i = i + 1 end @@ -140,7 +140,7 @@ function _M:generateList() for item, o in ipairs(self.actor_inven) do if not self.actor_filter or self.actor_filter(o) then local char = self:makeKeyChar(i) - list[#list+1] = { id=#list+1, char=char, name=o:getName(), color=o:getDisplayColor(), object=o, item=item, cat=o.subtype, cost=o.cost, desc=o:getDesc(), desc_price=self.descprice("sell", o) } + list[#list+1] = { id=#list+1, char=char, name=o:getName(), color=o:getDisplayColor(), object=o, item=item, cat=_t(o.subtype, "entity subtype"), cost=o.cost, desc=o:getDesc(), desc_price=self.descprice("sell", o) } list.chars[char] = #list i = i + 1 end diff --git a/game/engines/default/engine/dialogs/ShowText.lua b/game/engines/default/engine/dialogs/ShowText.lua index 49bffde4636cdfb9069f75026c5d35060bd6d1e4..862ef5906cd94e3655939d564fc8412fc84a53ff 100644 --- a/game/engines/default/engine/dialogs/ShowText.lua +++ b/game/engines/default/engine/dialogs/ShowText.lua @@ -30,7 +30,7 @@ function _M:init(title, file, replace, w, h, on_exit, accept_key) w = math.floor(w or game.w * 0.6) h = math.floor(h or game.h * 0.8) - Dialog.init(self, title or "Text", w, h) + Dialog.init(self, title or _t"Text", w, h) self:generateList(file, replace) diff --git a/game/engines/default/engine/dialogs/SteamOptions.lua b/game/engines/default/engine/dialogs/SteamOptions.lua index 493b723c118acf09378cde6bf0f53c38a4e74052..1bf4d60532c6685da2c3b847e2c02a009467a684 100644 --- a/game/engines/default/engine/dialogs/SteamOptions.lua +++ b/game/engines/default/engine/dialogs/SteamOptions.lua @@ -29,9 +29,9 @@ local GetQuantity = require "engine.dialogs.GetQuantity" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "Steam Options", game.w * 0.8, game.h * 0.8) + Dialog.init(self, _t"Steam Options", game.w * 0.8, game.h * 0.8) - self.c_desc = Textzone.new{width=math.floor(self.iw / 2 - 10), height=self.ih, text=""} + self.c_desc = Textzone.new{width=math.floor(self.iw / 2 - 10), height=self.ih, text=_t""} self:generateList() @@ -74,22 +74,22 @@ function _M:generateList() local list = {} local i = 0 - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enable Steam Cloud saves.\nYour saves will be put on steam cloud and always be available everywhere.\nDisable if you have bandwidth limitations.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Cloud Saves#WHITE##{normal}#", status=function(item) - return tostring(core.steam.isCloudEnabled(true) and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enable Steam Cloud saves.\nYour saves will be put on steam cloud and always be available everywhere.\nDisable if you have bandwidth limitations.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Cloud Saves#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(core.steam.isCloudEnabled(true) and _t"enabled" or _t"disabled") end, fct=function(item) game:saveSettings("steam_cloud_choose", "steam_cloud_choose = true\n") core.steam.cloudEnable(not core.steam.isCloudEnabled(true)) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Purge all Steam Cloud saves.\nThis will remove all saves from the cloud cloud (but not your local copy). Only use if you somehow encounter storage problems on it (which should not happen, the game automatically manages it for you).#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Purge Cloud Saves#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Purge all Steam Cloud saves.\nThis will remove all saves from the cloud cloud (but not your local copy). Only use if you somehow encounter storage problems on it (which should not happen, the game automatically manages it for you).#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Purge Cloud Saves#WHITE##{normal}#"):toTString(), status=function(item) return "purge" end, fct=function(item) - Dialog:yesnoPopup("Steam Cloud Purge", "Confirm purge?", function(ret) if ret then + Dialog:yesnoPopup(_t"Steam Cloud Purge", _t"Confirm purge?", function(ret) if ret then self:purgeCloud() - Dialog:simplePopup("Steam Cloud Purge", "All data purged from the cloud.") + Dialog:simplePopup(_t"Steam Cloud Purge", _t"All data purged from the cloud.") end end) end,} diff --git a/game/engines/default/engine/dialogs/Talkbox.lua b/game/engines/default/engine/dialogs/Talkbox.lua index 0fce4f0b2ba30d06dbaba6a38157b8e2dac64a67..91c5aaa74e433f7090c1caea60c5e4e3e1953bea 100644 --- a/game/engines/default/engine/dialogs/Talkbox.lua +++ b/game/engines/default/engine/dialogs/Talkbox.lua @@ -41,13 +41,13 @@ function _M:init(chat, on_end, only_friends) Dialog.init(self, self:getTitle(), 320, 110, nil, nil, nil, nil, false) - local c_box = Textbox.new{title="Say: ", text="", chars=60, max_len=max, + local c_box = Textbox.new{title=_t"Say: ", text=_t"", chars=60, max_len=max, fct=function(text) self:okclick() end, on_change = function(text) self:checkTarget(text) end, } self.c_box = c_box - local ok = Button.new{text="Accept", fct=function() self:okclick() end} - local cancel = Button.new{text="Cancel", fct=function() self:cancelclick() end} + local ok = Button.new{text=_t"Accept", fct=function() self:okclick() end} + local cancel = Button.new{text=_t"Cancel", fct=function() self:cancelclick() end} local list = self:getTargets(only_friends) if #list == 0 then self.nobody = true end @@ -59,7 +59,7 @@ function _M:init(chat, on_end, only_friends) end end - self.c_list_text = Textzone.new{auto_width=true, auto_height=true, text="Target: "} + self.c_list_text = Textzone.new{auto_width=true, auto_height=true, text=_t"Target: "} self.c_list = Dropdown.new{width=250, fct=function(item) if not item then return end self:checkTarget(item.id..":") self:setFocus(c_box) end, list=list, nb_items=math.min(#list, 10), scrollbar=true} self:loadUI{ @@ -103,14 +103,14 @@ end function _M:getTargets(only_friends) local list = {} if not only_friends then - for name, _ in pairs(self.chat.channels) do list[#list+1] = {name="Channel: "..name, id=name} end + for name, _ in pairs(self.chat.channels) do list[#list+1] = {name=("Channel: %s"):tformat(name), id=name} end end local name_added = {} - for login, data in pairs(self.chat.friends) do list[#list+1] = {name="Friend: "..data.name, id=data.name} name_added[data.name] = true end + for login, data in pairs(self.chat.friends) do list[#list+1] = {name=("Friend: %s"):tformat(data.name), id=data.name} name_added[data.name] = true end if not only_friends and self.chat.channels[self.chat.cur_channel] then - for login, data in pairs(self.chat.channels[self.chat.cur_channel].users) do if not name_added[data.name] then list[#list+1] = {name="User: "..data.name, id=data.name} name_added[data.name] = true end end + for login, data in pairs(self.chat.channels[self.chat.cur_channel].users) do if not name_added[data.name] then list[#list+1] = {name=("User: %s"):tformat(data.name), id=data.name} name_added[data.name] = true end end end return list end diff --git a/game/engines/default/engine/dialogs/UseTalents.lua b/game/engines/default/engine/dialogs/UseTalents.lua index eda7dd4121b32179b0d93ca25f7aa4b03411e986..099bd13b1b796f7a71be508bdac556467b2a46a9 100644 --- a/game/engines/default/engine/dialogs/UseTalents.lua +++ b/game/engines/default/engine/dialogs/UseTalents.lua @@ -31,9 +31,9 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(actor) self.actor = actor actor.hotkey = actor.hotkey or {} - Dialog.init(self, "Use Talents: "..actor.name, game.w * 0.7, game.h * 0.7) + Dialog.init(self, ("Use Talents: "):tformat(actor:getName()), game.w * 0.7, game.h * 0.7) - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - 10), height=1, auto_height=true, no_color_bleed=true, text=[[ + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - 10), height=1, auto_height=true, no_color_bleed=true, text=_t[[ You can bind a talent to a hotkey be pressing the corresponding hotkey while selecting a talent. Check out the keybinding screen in the game menu to bind hotkeys to a key (default is 1-0 plus control or shift). ]]} @@ -42,9 +42,9 @@ Check out the keybinding screen in the game menu to bind hotkeys to a key (defau self:generateList() self.c_list = ListColumns.new{width=math.floor(self.iw / 2 - 10), height=self.ih - 10, sortable=true, scrollbar=true, columns={ - {name="", width={20,"fixed"}, display_prop="char", sort="id"}, - {name="Talent", width=80, display_prop="name", sort="name"}, - {name="Status", width=20, display_prop="status", sort="status"}, + {name=_t"", width={20,"fixed"}, display_prop="char", sort="id"}, + {name=_t"Talent", width=80, display_prop="name", sort="name"}, + {name=_t"Status", width=20, display_prop="status", sort="status"}, }, list=self.list, fct=function(item) self:use(item) end, select=function(item, sel) self:select(item) end} self:loadUI{ @@ -79,7 +79,7 @@ function _M:defineHotkey(id) if not item or not item.talent then return end self.actor.hotkey[id] = {"talent", item.talent} - self:simplePopup("Hotkey "..id.." assigned", self.actor:getTalentFromId(item.talent).name:capitalize().." assigned to hotkey "..id) + self:simplePopup(("Hotkey %s assigned"):tformat(id), ("%s assigned to hotkey %s"):tformat(self.actor:getTalentFromId(item.talent).name:capitalize(), id)) self.actor.changed = true end @@ -122,7 +122,7 @@ function _M:generateList() end if added then - table.insert(list, where+1, { char="", name=tstring{{"font","bold"}, cat:capitalize().." / "..tt.name:capitalize(), {"font","normal"}}, type=tt.type, color={0x80, 0x80, 0x80}, status="", desc=tt.description }) + table.insert(list, where+1, { char="", name=tstring{{"font","bold"}, _t(cat):capitalize().." / "..tt.name:capitalize(), {"font","normal"}}, type=tt.type, color={0x80, 0x80, 0x80}, status="", desc=tt.description }) end end for i = 1, #list do list[i].id = i end diff --git a/game/engines/default/engine/dialogs/UserInfo.lua b/game/engines/default/engine/dialogs/UserInfo.lua index 8b91d029890f3788d1c456a8397cc3fa45ade1ca..071ceb83b5119717c79d799ec50a43c82f36a5c2 100644 --- a/game/engines/default/engine/dialogs/UserInfo.lua +++ b/game/engines/default/engine/dialogs/UserInfo.lua @@ -27,23 +27,23 @@ local Textzone = require "engine.ui.Textzone" module(..., package.seeall, class.inherit(Dialog)) function _M:init(data) - Dialog.init(self, "User: "..data.name, 1,1) + Dialog.init(self, ("User: %s"):tformat(data.name), 1,1) data.current_char = data.current_char or {} local str = tstring{{"color","GOLD"}, {"font","bold"}, data.name, {"color","LAST"}, {"font","normal"}, true, true} - str:add({"color","ANTIQUE_WHITE"}, "Currently playing: ", {"color", "LAST"}) + str:add({"color","ANTIQUE_WHITE"}, _t"Currently playing: ", {"color", "LAST"}) if data.char_link then - str:add({"font","italic"},{"color","LIGHT_BLUE"},data.current_char.title or "unknown",{"font","normal"},{"color","LAST"},true) + str:add({"font","italic"},{"color","LIGHT_BLUE"},data.current_char.title or _t"unknown",{"font","normal"},{"color","LAST"},true) else - str:add(data.current_char.title or "unknown",true) + str:add(data.current_char.title or _t"unknown",true) end - str:add({"color","ANTIQUE_WHITE"}, "Game: ", {"color", "LAST"}, data.current_char.module or "unknown", true) - str:add({"color","ANTIQUE_WHITE"}, "Validation: ", {"color", "LAST"}, data.current_char.valid and "Game has been validated by the server" or "Game is not validated by the server", true) + str:add({"color","ANTIQUE_WHITE"}, _t"Game: ", {"color", "LAST"}, data.current_char.module or "unknown", true) + str:add({"color","ANTIQUE_WHITE"}, _t"Validation: ", {"color", "LAST"}, data.current_char.valid and _t"Game has been validated by the server" or _t"Game is not validated by the server", true) self.c_desc = Textzone.new{width=400, height=1, auto_height=true, text=str} - local b_profile = require("engine.ui.Button").new{text="Go to online profile", fct=function() util.browserOpenUrl(data.profile, {is_external=true}) end} - local b_char = require("engine.ui.Button").new{text="Go to online charsheet", fct=function() util.browserOpenUrl(data.char_link, {is_external=true}) end} + local b_profile = require("engine.ui.Button").new{text=_t"Go to online profile", fct=function() util.browserOpenUrl(data.profile, {is_external=true}) end} + local b_char = require("engine.ui.Button").new{text=_t"Go to online charsheet", fct=function() util.browserOpenUrl(data.char_link, {is_external=true}) end} local ui = { {left=0, top=0, ui=self.c_desc}, diff --git a/game/engines/default/engine/dialogs/VideoOptions.lua b/game/engines/default/engine/dialogs/VideoOptions.lua index 6f27615adf2a7ddc25fbd787d8dabecfa225c44f..fce7d710059de7d103d42fa6897d442eb59492fc 100644 --- a/game/engines/default/engine/dialogs/VideoOptions.lua +++ b/game/engines/default/engine/dialogs/VideoOptions.lua @@ -30,9 +30,9 @@ local GetQuantitySlider = require "engine.dialogs.GetQuantitySlider" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "Video Options", game.w * 0.8, game.h * 0.8) + Dialog.init(self, _t"Video Options", game.w * 0.8, game.h * 0.8) - self.c_desc = Textzone.new{width=math.floor(self.iw / 2 - 10), height=self.ih, text=""} + self.c_desc = Textzone.new{width=math.floor(self.iw / 2 - 10), height=self.ih, text=_t""} self:generateList() @@ -65,19 +65,19 @@ function _M:generateList() local list = {} local i = 0 - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text="Display resolution."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Resolution#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=_t"Display resolution."} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Resolution#WHITE##{normal}#"):toTString(), status=function(item) return config.settings.window.size end, fct=function(item) local menu = require("engine.dialogs.DisplayResolution").new(function() self.c_list:drawItem(item) end) game:registerDialog(menu) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"If you have a very high DPI screen you may want to raise this value. Requires a restart to take effect.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Screen Zoom#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"If you have a very high DPI screen you may want to raise this value. Requires a restart to take effect.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Screen Zoom#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.screen_zoom * 100).."%" end, fct=function(item) - game:registerDialog(GetQuantitySlider.new("Enter Zoom %", "From 50 to 400", math.floor(config.settings.screen_zoom * 100), 50, 400, 5, function(qty) + game:registerDialog(GetQuantitySlider.new(_t"Enter Zoom %", _t"From 50 to 400", math.floor(config.settings.screen_zoom * 100), 50, 400, 5, function(qty) qty = util.bound(qty, 50, 400) game:saveSettings("screen_zoom", ("screen_zoom = %f\n"):format(qty / 100)) config.settings.screen_zoom = qty / 100 @@ -85,11 +85,11 @@ function _M:generateList() end)) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Request this display refresh rate.\nSet it lower to reduce CPU load, higher to increase interface responsiveness.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Requested FPS#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Request this display refresh rate.\nSet it lower to reduce CPU load, higher to increase interface responsiveness.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Requested FPS#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.display_fps) end, fct=function(item) - game:registerDialog(GetQuantitySlider.new("Enter density", "From 5 to 60", config.settings.display_fps, 5, 60, 1, function(qty) + game:registerDialog(GetQuantitySlider.new(_t"Enter density", _t"From 5 to 60", config.settings.display_fps, 5, 60, 1, function(qty) qty = util.bound(qty, 5, 60) game:saveSettings("display_fps", ("display_fps = %d\n"):format(qty)) config.settings.display_fps = qty @@ -98,20 +98,20 @@ function _M:generateList() end)) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Controls the particle effects density.\nThis option allows to change the density of the many particle effects in the game.\nIf the game is slow when displaying spell effects try to lower this setting.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Particle effects density#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Controls the particle effects density.\nThis option allows to change the density of the many particle effects in the game.\nIf the game is slow when displaying spell effects try to lower this setting.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Particle effects density#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.particles_density).."%" end, fct=function(item) - game:registerDialog(GetQuantitySlider.new("Enter density", "From 0 to 100", config.settings.particles_density, 0, 100, 1, function(qty) + game:registerDialog(GetQuantitySlider.new(_t"Enter density", _t"From 0 to 100", config.settings.particles_density, 0, 100, 1, function(qty) game:saveSettings("particles_density", ("particles_density = %d\n"):format(qty)) config.settings.particles_density = qty self.c_list:drawItem(item) end)) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Activates antialiased texts.\nTexts will look nicer but it can be slower on some computers.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Antialiased texts#WHITE##{normal}#", status=function(item) - return tostring(core.display.getTextBlended() and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Activates antialiased texts.\nTexts will look nicer but it can be slower on some computers.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Antialiased texts#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(core.display.getTextBlended() and _t"enabled" or _t"disabled") end, fct=function(item) local state = not core.display.getTextBlended() core.display.setTextBlended(state) @@ -119,11 +119,11 @@ function _M:generateList() self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Apply a global scaling to all fonts.\nApplies after restarting the game"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Font Scale#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Apply a global scaling to all fonts.\nApplies after restarting the game"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Font Scale#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.font_scale).."%" end, fct=function(item) - game:registerDialog(GetQuantity.new("Font Scale %", "From 50 to 300", config.settings.font_scale, 300, function(qty) + game:registerDialog(GetQuantity.new(_t"Font Scale %", _t"From 50 to 300", config.settings.font_scale, 300, function(qty) qty = util.bound(qty, 50, 300) game:saveSettings("font_scale", ("font_scale = %d\n"):format(qty)) config.settings.font_scale = qty @@ -131,54 +131,54 @@ function _M:generateList() end, 50)) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Activates framebuffers.\nThis option allows for some special graphical effects.\nIf you encounter weird graphical glitches try to disable it.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Framebuffers#WHITE##{normal}#", status=function(item) - return tostring(config.settings.fbo_active and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Activates framebuffers.\nThis option allows for some special graphical effects.\nIf you encounter weird graphical glitches try to disable it.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Framebuffers#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.fbo_active and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.fbo_active = not config.settings.fbo_active game:saveSettings("fbo_active", ("fbo_active = %s\n"):format(tostring(config.settings.fbo_active))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Activates OpenGL Shaders.\nThis option allows for some special graphical effects.\nIf you encounter weird graphical glitches try to disable it.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#OpenGL Shaders#WHITE##{normal}#", status=function(item) - return tostring(config.settings.shaders_active and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Activates OpenGL Shaders.\nThis option allows for some special graphical effects.\nIf you encounter weird graphical glitches try to disable it.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#OpenGL Shaders#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.shaders_active and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.shaders_active = not config.settings.shaders_active game:saveSettings("shaders_active", ("shaders_active = %s\n"):format(tostring(config.settings.shaders_active))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Activates advanced shaders.\nThis option allows for advanced effects (like water surfaces, ...). Disabling it can improve performance.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#OpenGL Shaders: Advanced#WHITE##{normal}#", status=function(item) - return tostring(config.settings.shaders_kind_adv and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Activates advanced shaders.\nThis option allows for advanced effects (like water surfaces, ...). Disabling it can improve performance.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#OpenGL Shaders: Advanced#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.shaders_kind_adv and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.shaders_kind_adv = not config.settings.shaders_kind_adv game:saveSettings("shaders_kind_adv", ("shaders_kind_adv = %s\n"):format(tostring(config.settings.shaders_kind_adv))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Activates distorting shaders.\nThis option allows for distortion effects (like spell effects doing a visual distortion, ...). Disabling it can improve performance.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#OpenGL Shaders: Distortions#WHITE##{normal}#", status=function(item) - return tostring(config.settings.shaders_kind_distort and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Activates distorting shaders.\nThis option allows for distortion effects (like spell effects doing a visual distortion, ...). Disabling it can improve performance.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#OpenGL Shaders: Distortions#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.shaders_kind_distort and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.shaders_kind_distort = not config.settings.shaders_kind_distort game:saveSettings("shaders_kind_distort", ("shaders_kind_distort = %s\n"):format(tostring(config.settings.shaders_kind_distort))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Activates volumetric shaders.\nThis option allows for volumetricion effects (like deep starfields). Enabling it will severely reduce performance when shaders are displayed.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#OpenGL Shaders: Volumetric#WHITE##{normal}#", status=function(item) - return tostring(config.settings.shaders_kind_volumetric and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Activates volumetric shaders.\nThis option allows for volumetricion effects (like deep starfields). Enabling it will severely reduce performance when shaders are displayed.\n\n#LIGHT_RED#You must restart the game for it to take effect.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#OpenGL Shaders: Volumetric#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.shaders_kind_volumetric and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.shaders_kind_volumetric = not config.settings.shaders_kind_volumetric game:saveSettings("shaders_kind_volumetric", ("shaders_kind_volumetric = %s\n"):format(tostring(config.settings.shaders_kind_volumetric))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Use the custom cursor.\nDisabling it will use your normal operating system cursor.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Mouse cursor#WHITE##{normal}#", status=function(item) - return tostring(config.settings.mouse_cursor and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Use the custom cursor.\nDisabling it will use your normal operating system cursor.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Mouse cursor#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.mouse_cursor and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.mouse_cursor = not config.settings.mouse_cursor game:updateMouseCursor() @@ -186,11 +186,11 @@ function _M:generateList() self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Gamma correction setting.\nIncrease this to get a brighter display.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Gamma correction#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Gamma correction setting.\nIncrease this to get a brighter display.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Gamma correction#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.gamma_correction) end, fct=function(item) - game:registerDialog(GetQuantitySlider.new("Gamma correction", "From 50 to 300", config.settings.gamma_correction, 50, 300, 5, function(qty) + game:registerDialog(GetQuantitySlider.new(_t"Gamma correction", _t"From 50 to 300", config.settings.gamma_correction, 50, 300, 5, function(qty) qty = util.bound(qty, 50, 300) game:saveSettings("gamma_correction", ("gamma_correction = %d\n"):format(qty)) config.settings.gamma_correction = qty @@ -199,9 +199,9 @@ function _M:generateList() end)) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enable/disable usage of tilesets.\nIn some rare cases on very slow machines with bad GPUs/drivers it can be detrimental."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Use tilesets#WHITE##{normal}#", status=function(item) - return tostring(config.settings.disable_tilesets and "disabled" or "enabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enable/disable usage of tilesets.\nIn some rare cases on very slow machines with bad GPUs/drivers it can be detrimental."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Use tilesets#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.disable_tilesets and _t"disabled" or _t"enabled") end, fct=function(item) config.settings.disable_tilesets = not config.settings.disable_tilesets game:saveSettings("disable_tilesets", ("disable_tilesets = %s\n"):format(tostring(config.settings.disable_tilesets))) @@ -211,8 +211,8 @@ function _M:generateList() -- *Requested* Window Position -- SDL tends to lie about where windows are positioned in fullscreen mode, -- so always store the position requests, not the actual positions. - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text="Request a specific origin point for the game window.\nThis point corresponds to where the upper left corner of the window will be located.\nUseful when dealing with multiple monitors and borderless windows.\n\nThe default origin is (0,0).\n\nNote: This value will automatically revert after ten seconds if not confirmed by the user.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Requested Window Position#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=_t"Request a specific origin point for the game window.\nThis point corresponds to where the upper left corner of the window will be located.\nUseful when dealing with multiple monitors and borderless windows.\n\nThe default origin is (0,0).\n\nNote: This value will automatically revert after ten seconds if not confirmed by the user.#WHITE#"} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Requested Window Position#WHITE##{normal}#"):toTString(), status=function(item) config.settings.window.pos = config.settings.window.pos or {x=0, y=0} local curX, curY = config.settings.window.pos.x, config.settings.window.pos.y return table.concat({"(", curX, ",", curY, ")"}) @@ -227,10 +227,10 @@ function _M:generateList() self.c_list:drawItem(itemRef) end -- TODO: Maybe change this to a GetText and parse? - game:registerDialog(GetQuantity.new("Window Origin: X-Coordinate", "Enter the x-coordinate", oldX, 99999 + game:registerDialog(GetQuantity.new(_t"Window Origin: X-Coordinate", _t"Enter the x-coordinate", oldX, 99999 , function(qty) newX=util.bound(qty, -99999, 99999) - game:registerDialog(GetQuantity.new("Window Origin: Y-Coordinate", "Enter the y-coordinate", oldY, 99999 + game:registerDialog(GetQuantity.new(_t"Window Origin: Y-Coordinate", _t"Enter the y-coordinate", oldY, 99999 , function(qty) newY = util.bound(qty, -99999, 99999) core.display.setWindowPos(newX, newY) @@ -238,7 +238,7 @@ function _M:generateList() config.settings.window.pos.y = newY self.c_list:drawItem(itemRef) local userAnswered = false - local confirmDialog = Dialog:yesnoPopup("Position changed.", "Save position?" + local confirmDialog = Dialog:yesnoPopup(_t"Position changed.", _t"Save position?" , function(ret) userAnswered = true if ret then @@ -249,7 +249,7 @@ function _M:generateList() revertMove() end end - , "Accept", "Revert") + , _"Accept", _"Revert") game:registerTimer(10 , function() -- Blast out changes if no response diff --git a/game/engines/default/engine/dialogs/ViewHighScores.lua b/game/engines/default/engine/dialogs/ViewHighScores.lua index 10ccb683092f4e18717458a76da9c1669251b426..013c98541fe52ee5c396afc9a20b4bf6e2514890 100644 --- a/game/engines/default/engine/dialogs/ViewHighScores.lua +++ b/game/engines/default/engine/dialogs/ViewHighScores.lua @@ -27,7 +27,7 @@ local HighScores = require "engine.HighScores" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "High Scores", game.w * 0.8, game.h * 0.8) + Dialog.init(self, _t"High Scores", game.w * 0.8, game.h * 0.8) game:registerHighscore() diff --git a/game/engines/default/engine/dialogs/microtxn/MTXMain.lua b/game/engines/default/engine/dialogs/microtxn/MTXMain.lua index b3ed5c791b6669afee1cedfb16c4eab88d6c40db..e8f92406ded5547df66bb0eff8fe3c9bd1158406 100644 --- a/game/engines/default/engine/dialogs/microtxn/MTXMain.lua +++ b/game/engines/default/engine/dialogs/microtxn/MTXMain.lua @@ -27,7 +27,7 @@ module(..., package.seeall, class.inherit(Dialog)) _M.force_ui_inside = "microtxn" function _M:init(mode) - self.base_title_text = game.__mod_info.long_name.." #GOLD#Purchasables#LAST#" + self.base_title_text = ("%s #GOLD#Purchasables#LAST#"):tformat(_t(game.__mod_info.long_name)) Dialog.init(self, self.base_title_text, 200, game.h * 0.8) local do_purchase = ButtonImage.new{alpha_unfocus=1, file="microtxn-ui/action_purchase.png", fct=function() game:unregisterDialog(self) game.key:triggerVirtual("MTXN_PURCHASE") end} @@ -52,7 +52,7 @@ function _M:init(mode) config.settings.mtxn_explain_seen = true Dialog:forceNextDialogUI("microtxn") - self:simpleLongPopup("Online Store", [[Welcome! + self:simpleLongPopup(_t"Online Store", _t[[Welcome! I am #{italic}##ANTIQUE_WHITE#DarkGod#LAST##{normal}#, the creator of the game and before you go on your merry way I wish to take a few seconds of your time to explain why there are microtransactions in the game. diff --git a/game/engines/default/engine/dialogs/microtxn/ShowPurchasable.lua b/game/engines/default/engine/dialogs/microtxn/ShowPurchasable.lua index d5e92c6f83fa3b148a4b05a090835c475f2a2465..b9c7fe1dc2c6bf2c32b11fe61cc0729feeba97fe 100644 --- a/game/engines/default/engine/dialogs/microtxn/ShowPurchasable.lua +++ b/game/engines/default/engine/dialogs/microtxn/ShowPurchasable.lua @@ -33,11 +33,11 @@ local WebView = require "engine.ui.WebView" module(..., package.seeall, class.inherit(Dialog)) -local bonus_vault_slots_text = "#{italic}##UMBER#Bonus vault slots from this order: #ROYAL_BLUE#%d#{normal}#" -local bonus_vault_slots_tooltip = "For every purchase of #{italic}##GREY#%s#LAST##{normal}# you gain a permanent additional vault slot.\n#GOLD##{italic}#Because why not!#{normal}#" +local bonus_vault_slots_text = _t"#{italic}##UMBER#Bonus vault slots from this order: #ROYAL_BLUE#%d#{normal}#" +local bonus_vault_slots_tooltip = _t"For every purchase of #{italic}##GREY#%s#LAST##{normal}# you gain a permanent additional vault slot.\n#GOLD##{italic}#Because why not!#{normal}#" -local coins_balance_text = "#{italic}##UMBER#Voratun Coins available from your donations: #ROYAL_BLUE#%d#{normal}#" -local coins_balance_tooltip = "For every donations you've ever made you have earned voratun coins. These can be spent purchasing expansions or options on the online store. This is the amount you have left, if your purchase total is below this number you'll instantly get your purchase validated, if not you'll need to donate some more first.\n#GOLD##{italic}#Thanks for your support, every little bit helps the game survive for years on!#{normal}#" +local coins_balance_text = _t"#{italic}##UMBER#Voratun Coins available from your donations: #ROYAL_BLUE#%d#{normal}#" +local coins_balance_tooltip = _t"For every donations you've ever made you have earned voratun coins. These can be spent purchasing expansions or options on the online store. This is the amount you have left, if your purchase total is below this number you'll instantly get your purchase validated, if not you'll need to donate some more first.\n#GOLD##{italic}#Thanks for your support, every little bit helps the game survive for years on!#{normal}#" _M.force_ui_inside = "microtxn" @@ -48,7 +48,7 @@ function _M:init(mode) self.cart = {} - self.base_title_text = game.__mod_info.long_name.." #GOLD#Online Store#LAST#" + self.base_title_text = ("%s #GOLD#Online Store#LAST#"):tformat(_t(game.__mod_info.long_name)) Dialog.init(self, self.base_title_text, game.w * 0.8, game.h * 0.8) game.tooltip:generate() @@ -70,7 +70,7 @@ function _M:init(mode) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} - self.c_waiter = Textzone.new{auto_width=1, auto_height=1, text="#YELLOW#-- connecting to server... --"} + self.c_waiter = Textzone.new{auto_width=1, auto_height=1, text=_t"#YELLOW#-- connecting to server... --"} local last_displayed_item = nil self.c_list = VariableList.new{width=self.iw - 350 - vsep.w, max_height=self.ih, scrollbar=true, sortable=true, @@ -127,12 +127,12 @@ function _M:init(mode) end end - self.c_do_purchase = Button.new{text="Purchase", fct=function() self:doPurchase() end} + self.c_do_purchase = Button.new{text=_t"Purchase", fct=function() self:doPurchase() end} self.c_recap = ListColumns.new{width=350, height=self.ih - self.c_do_purchase.h - 15 - math.max(self.c_bonus_vault_slots.h, self.c_coins_available.h), scrollbar=true, columns={ - {name="Name", width=50, display_prop="recap_name"}, - {name="Price", width=35, display_prop="recap_price"}, - {name="Qty", width=15, display_prop="recap_qty"}, + {name=_t"Name", width=50, display_prop="recap_name"}, + {name=_t"Price", width=35, display_prop="recap_price"}, + {name=_t"Qty", width=15, display_prop="recap_qty"}, }, list=self.recap, all_clicks=true, fct=function(item, _, button) if item.total then return end if button == "left" then button = "right" @@ -185,24 +185,24 @@ end function _M:checks() game:onTickEnd(function() if not profile.auth then game:unregisterDialog(self) - Dialog:simplePopup("Online Store", "You need to be logged in before using the store. Please go back to the main menu and login.") + Dialog:simplePopup(_t"Online Store", _t"You need to be logged in before using the store. Please go back to the main menu and login.") return end if self.mode == "steam" then if not profile.auth.steamid then game:unregisterDialog(self) - Dialog:yesnoPopup("Online Store", "Steam users need to link their profiles to their steam account. This is very easy in just a few clicks. Once this is done, simply restart the game.", function(ret) if ret then + Dialog:yesnoPopup(_t"Online Store", _t"Steam users need to link their profiles to their steam account. This is very easy in just a few clicks. Once this is done, simply restart the game.", function(ret) if ret then util.browserOpenUrl("https://te4.org/user/"..profile.auth.drupid.."/steam", {is_external=true}) - end end, "Let's do it! (Opens in your browser)", "Not now") + end end, _t"Let's do it! (Opens in your browser)", _t"Not now") end elseif self.mode == "te4" then -- Handle me more smoothly if profile.auth.donated < 6 then game:unregisterDialog(self) - Dialog:yesnoPopup("Online Store", "The Online Store (and expansions) are only purchasable by players that bought the game. Plaese go have a look at the donation page for more explanations.", function(ret) if ret then + Dialog:yesnoPopup(_t"Online Store", _t"The Online Store (and expansions) are only purchasable by players that bought the game. Plaese go have a look at the donation page for more explanations.", function(ret) if ret then util.browserOpenUrl("https://te4.org/donate", {is_external=true}) - end end, "Let's go! (Opens in your browser)", "Not now") + end end, _t"Let's go! (Opens in your browser)", _t"Not now") end end end) end @@ -242,9 +242,9 @@ end function _M:currencyDisplay(v) if self.user_currency then - return ("%0.2f %s"):format(v, self.user_currency) + return ("%0.2f %s"):tformat(v, self.user_currency) else - return ("%d coins"):format(v) + return ("%d coins"):tformat(v) end end @@ -276,14 +276,14 @@ function _M:updateCart() end end table.sort(self.recap, "sort_name") self.recap[#self.recap+1] = { - recap_name = "#{bold}#TOTAL#{normal}#", + recap_name = _t"#{bold}#TOTAL#{normal}#", recap_price = self:currencyDisplay(total_sum), recap_qty = nb_items, total = true, } self.c_recap:setList(self.recap, true) - self:updateTitle(self.base_title_text..(" (%d items in cart, %s)"):format(nb_items, self:currencyDisplay(total_sum))) + self:updateTitle(self.base_title_text..(" (%d items in cart, %s)"):tformat(nb_items, self:currencyDisplay(total_sum))) self:toggleDisplay(self.c_do_purchase, nb_items > 0) @@ -292,7 +292,7 @@ function _M:updateCart() end function _M:doPurchase() - if table.count(self.cart) == 0 then self:simplePopup("Cart", "Cart is empty!") return end + if table.count(self.cart) == 0 then self:simplePopup(_t"Cart", _t"Cart is empty!") return end self.in_paying_ui = true if core.steam then self:doPurchaseSteam() @@ -302,7 +302,7 @@ end function _M:installShimmer(item) if not core.webview then - Dialog:simpleLongPopup(item.name, "In-game browser is inoperant or disabled, impossible to auto-install shimmer pack.\nPlease go to https://te4.org/ to download it manually.", 600) + Dialog:simpleLongPopup(item.name, _t"In-game browser is inoperant or disabled, impossible to auto-install shimmer pack.\nPlease go to https://te4.org/ to download it manually.", 600) return end @@ -318,12 +318,12 @@ function _M:installShimmer(item) dofile("/data/gfx/mtx-shimmers/"..item.effect..".lua") - Dialog:simplePopup(item.name, [[Shimmer pack installed!]]) + Dialog:simplePopup(item.name, _t[[Shimmer pack installed!]]) break end end if not found then - Dialog:simpleLongPopup(item.name, [[Could not dynamically link addon to current character, maybe the installation weng wrong. + Dialog:simpleLongPopup(item.name, _t[[Could not dynamically link addon to current character, maybe the installation weng wrong. You can fix that by manually downloading the shimmer addon from https://te4.org/ and placing it in game/addons/ folder.]], 600) end end @@ -331,7 +331,7 @@ You can fix that by manually downloading the shimmer addon from https://te4.org/ local co co = coroutine.create(function() local filename = ("/addons/%s-cosmetic-%s.teaa"):format(game.__mod_info.short_name, item.effect) print("==> downloading", "https://te4.org/download-mtx/"..item.id_purchasable, filename) - local d = Downloader.new{title="Downloading cosmetic pack: #LIGHT_GREEN#"..item.name, co=co, dest=filename..".tmp", url="https://te4.org/download-mtx/"..item.id_purchasable, allow_downloads={addons=true}} + local d = Downloader.new{title=("Downloading cosmetic pack: #LIGHT_GREEN#%s"):tformat(item.name), co=co, dest=filename..".tmp", url="https://te4.org/download-mtx/"..item.id_purchasable, allow_downloads={addons=true}} local ok = d:start() if ok then local wdir = fs.getWritePath() @@ -357,16 +357,16 @@ function _M:paymentSuccess() local item = self.purchasables[id] if item.is_shimmer then self:installShimmer(item) - list[#list+1] = ("- #{bold}##ROYAL_BLUE#%s #SLATE#x%d#WHITE##{normal}#: The pack should be downloading or even finished by now."):format(item.name, item.nb_purchase) + list[#list+1] = ("- #{bold}##ROYAL_BLUE#%s #SLATE#x%d#WHITE##{normal}#: The pack should be downloading or even finished by now."):tformat(item.name, item.nb_purchase) elseif item.self_event or item.community_event then - list[#list+1] = ("- #{bold}##ROYAL_BLUE#%s #SLATE#x%d#WHITE##{normal}#: You can now trigger it whenever you are ready."):format(item.name, item.nb_purchase) + list[#list+1] = ("- #{bold}##ROYAL_BLUE#%s #SLATE#x%d#WHITE##{normal}#: You can now trigger it whenever you are ready."):tformat(item.name, item.nb_purchase) elseif item.effect == "vaultspace" then - list[#list+1] = ("- #{bold}##ROYAL_BLUE#%s #SLATE#x%d#WHITE##{normal}#: Your available vault space has increased."):format(item.name, item.nb_purchase) + list[#list+1] = ("- #{bold}##ROYAL_BLUE#%s #SLATE#x%d#WHITE##{normal}#: Your available vault space has increased."):tformat(item.name, item.nb_purchase) end end end game:unregisterDialog(self) - Dialog:simpleLongPopup("Payment", "Payment accepted.\n"..table.concat(list, "\n"), 700) + Dialog:simpleLongPopup(_t"Payment", ("Payment accepted.\n%s"):tformat(table.concat(list, "\n")), 700) end function _M:paymentFailure() @@ -378,7 +378,7 @@ function _M:paymentCancel() end function _M:doPurchaseSteam() - local popup = Dialog:simplePopup("Connecting to Steam", "Steam Overlay should appear, if it does not please make sure it you have not disabled it.", nil, true) + local popup = Dialog:simplePopup(_t"Connecting to Steam", _t"Steam Overlay should appear, if it does not please make sure it you have not disabled it.", nil, true) local cart = {} for id, ok in pairs(self.cart) do if ok then @@ -390,14 +390,14 @@ function _M:doPurchaseSteam() end end local function onMTXResult(id_cart, ok) - local finalpopup = Dialog:simplePopup("Connecting to Steam", "Finalizing transaction with Steam servers...", nil, true) + local finalpopup = Dialog:simplePopup(_t"Connecting to Steam", _t"Finalizing transaction with Steam servers...", nil, true) profile:registerTemporaryEventHandler("MicroTxnSteamFinalizeCartResult", function(e) game:unregisterDialog(finalpopup) if e.success then if e.new_donated then profile.auth.donated = e.new_donated end self:paymentSuccess() else - Dialog:simplePopup("Payment", "Payment refused, you have not been billed.") + Dialog:simplePopup(_t"Payment", _t"Payment refused, you have not been billed.") self:paymentFailure() end end) @@ -409,7 +409,7 @@ function _M:doPurchaseSteam() if e.success then core.steam.waitMTXResult(onMTXResult) else - Dialog:simplePopup("Payment", "Payment refused, you have not been billed.") + Dialog:simplePopup(_t"Payment", _t"Payment refused, you have not been billed.") self:paymentFailure() end end) @@ -417,7 +417,7 @@ function _M:doPurchaseSteam() end function _M:doPurchaseTE4() - local popup = Dialog:simplePopup("Connecting to server", "Please wait...", nil, true) + local popup = Dialog:simplePopup(_t"Connecting to server", _t"Please wait...", nil, true) local cart = {} for id, ok in pairs(self.cart) do if ok then @@ -429,14 +429,14 @@ function _M:doPurchaseTE4() end end local function finalizePurchase(id_cart) - local finalpopup = Dialog:simplePopup("Connecting to server", "Please wait...", nil, true) + local finalpopup = Dialog:simplePopup(_t"Connecting to server", _t"Please wait...", nil, true) profile:registerTemporaryEventHandler("MicroTxnTE4FinalizeCartResult", function(e) game:unregisterDialog(finalpopup) if e.success then if e.new_donated then profile.auth.donated = e.new_donated end self:paymentSuccess() else - Dialog:simplePopup("Payment", "Payment refused, you have not been billed.") + Dialog:simplePopup(_t"Payment", _t"Payment refused, you have not been billed.") self:paymentFailure() end end) @@ -448,18 +448,18 @@ function _M:doPurchaseTE4() if e.success and e.info then if e.info:prefix("instant_buy:") then local id_cart = tonumber(e.info:sub(13)) - Dialog:yesnoPopup("Online Store", "You have enough coins to instantly purchase those options. Confirm?", function(ret) if ret then + Dialog:yesnoPopup(_t"Online Store", _t"You have enough coins to instantly purchase those options. Confirm?", function(ret) if ret then finalizePurchase(id_cart) - end end, "Purchase", "Cancel") + end end, _t"Purchase", _t"Cancel") elseif e.info:prefix("requires:") then local more = tonumber(e.info:sub(10)) - Dialog:yesnoPopup("Online Store", "You need "..more.." more coins to purchase those options. Do you want to go to the donation page now?", function(ret) if ret then + Dialog:yesnoPopup(_t"Online Store", ("You need %s more coins to purchase those options. Do you want to go to the donation page now?"):tformat(more), function(ret) if ret then util.browserOpenUrl("https://te4.org/donate", {is_external=true}) - end end, "Let's go! (Opens in your browser)", "Not now") + end end, _t"Let's go! (Opens in your browser)", _t"Not now") self:paymentCancel() end else - Dialog:simplePopup("Payment", "Payment refused, you have not been billed.") + Dialog:simplePopup(_t"Payment", _t"Payment refused, you have not been billed.") self:paymentFailure() end end) @@ -469,26 +469,26 @@ end function _M:buildTooltip(item) local text = {} if item.community_event then - text[#text+1] = [[#{bold}##GOLD#Community Online Event#WHITE##{normal}#: Once you have purchased a community event you will be able to trigger it at any later date, on whichever character you choose. + text[#text+1] = _t[[#{bold}##GOLD#Community Online Event#WHITE##{normal}#: Once you have purchased a community event you will be able to trigger it at any later date, on whichever character you choose. Community events once triggered will activate for #{bold}#every player currently logged on#{normal}# including yourself. Every player receiving it will know you sent it and thus that you are to thank for it. To activate it you will need to have your online events option set to "all" (which is the default value).]] end if item.self_event then - text[#text+1] = [[#{bold}##GOLD#Event#WHITE##{normal}#: Once you have purchased an event you will be able to trigger it at any later date, on whichever character you choose. + text[#text+1] = _t[[#{bold}##GOLD#Event#WHITE##{normal}#: Once you have purchased an event you will be able to trigger it at any later date, on whichever character you choose. To activate it you will need to have your online events option set to "all" (which is the default value).]] end if item.non_immediate then - text[#text+1] = [[#{bold}##GOLD#Non Immediate#WHITE##{normal}#: This events adds new content that you have to find by exploration. If you die before finding it, there can be no refunds.]] + text[#text+1] = _t[[#{bold}##GOLD#Non Immediate#WHITE##{normal}#: This events adds new content that you have to find by exploration. If you die before finding it, there can be no refunds.]] end if item.once_per_character then - text[#text+1] = [[#{bold}##GOLD#Once per Character#WHITE##{normal}#: This event can only be received #{bold}#once per character#{normal}#. Usualy because it adds a new zone or effect to the game that would not make sense to duplicate.]] + text[#text+1] = _t[[#{bold}##GOLD#Once per Character#WHITE##{normal}#: This event can only be received #{bold}#once per character#{normal}#. Usualy because it adds a new zone or effect to the game that would not make sense to duplicate.]] end if item.is_shimmer then - text[#text+1] = [[#{bold}##GOLD#Shimmer Pack#WHITE##{normal}#: Once purchased the game will automatically install the shimmer pack to your game and enable it for your current character too (you will still need to use the Mirror of Reflection to switch them on). + text[#text+1] = _t[[#{bold}##GOLD#Shimmer Pack#WHITE##{normal}#: Once purchased the game will automatically install the shimmer pack to your game and enable it for your current character too (you will still need to use the Mirror of Reflection to switch them on). #LIGHT_GREEN#Bonus perk:#LAST# purchasing any shimmer pack will also give your characters a portable Mirror of Reflection to be able to change your appearance anywhere, anytime!]] end if item.effect == "vaultspace" then - text[#text+1] = [[#{bold}##GOLD#Vault Space#WHITE##{normal}#: Once purchased your vault space is permanently increased.]] + text[#text+1] = _t[[#{bold}##GOLD#Vault Space#WHITE##{normal}#: Once purchased your vault space is permanently increased.]] end return table.concat(text, '\n') end @@ -496,7 +496,7 @@ end function _M:generateList() profile:registerTemporaryEventHandler("MicroTxnListPurchasables", function(e) if e.error then - Dialog:simplePopup("Online Store", e.error:capitalize()) + Dialog:simplePopup(_t"Online Store", e.error:capitalize()) game:unregisterDialog(self) return end diff --git a/game/engines/default/engine/dialogs/microtxn/UsePurchased.lua b/game/engines/default/engine/dialogs/microtxn/UsePurchased.lua index 290beba0041b7fcd2bd9b3bb7641255e511ba1be..93285929888018760a95ce4502cbef2d5b15dae5 100644 --- a/game/engines/default/engine/dialogs/microtxn/UsePurchased.lua +++ b/game/engines/default/engine/dialogs/microtxn/UsePurchased.lua @@ -35,7 +35,7 @@ function _M:init(mode) self.cart = {} - self.base_title_text = game.__mod_info.long_name.." #GOLD#Purchased Options#LAST#" + self.base_title_text = ("%s #GOLD#Purchased Options#LAST#"):tformat(_t(game.__mod_info.long_name)) Dialog.init(self, self.base_title_text, 600, game.h * 0.8) self.categories_icons = { @@ -48,10 +48,10 @@ function _M:init(mode) self:generateList() - self.c_waiter = Textzone.new{auto_width=1, auto_height=1, text="#YELLOW#-- connecting to server... --"} + self.c_waiter = Textzone.new{auto_width=1, auto_height=1, text=_t"#YELLOW#-- connecting to server... --"} self.c_list = ListColumns.new{width=self.iw, height=200, scrollbar=true, sortable=true, columns={ - {name="Name", width=80, display_prop="display_name"}, - {name="Available", width=20, display_prop="nb_available"}, + {name=_t"Name", width=80, display_prop="display_name"}, + {name=_t"Available", width=20, display_prop="nb_available"}, }, list=self.list, all_clicks=true, fct=function(item, _, button) self:use(item, button) end, select=function(item, sel) end} self:loadUI{ @@ -73,17 +73,17 @@ function _M:use(item, button) if not item then return end if game.zone.wilderness then - Dialog:simplePopup(item.name, "Please use purchased options when not on the worldmap.") + Dialog:simplePopup(item.name, _t"Please use purchased options when not on the worldmap.") return end if item.once_per_character and game.state["has_"..item.effect] then - Dialog:simplePopup(item.name, "This option may only be used once per character to prevent wasting it.") + Dialog:simplePopup(item.name, _t"This option may only be used once per character to prevent wasting it.") return end if (item.community_event or item.self_event) and not game.state:allowOnlineEvent() then - Dialog:simpleLongPopup(item.name, [[This option requires you to accept to receive events from the server. + Dialog:simpleLongPopup(item.name, _t[[This option requires you to accept to receive events from the server. Either you have the option currently disabled or you are playing a campaign that can not support these kind of events (mainly the Arena). Make sure you have #GOLD##{bold}#Allow online events#WHITE##{normal}# in the #GOLD##{bold}#Online#WHITE##{normal}# section of the game options set to "all". You can set it back to your own setting once you have received the event. ]], 600) @@ -93,7 +93,7 @@ Make sure you have #GOLD##{bold}#Allow online events#WHITE##{normal}# in the #GO if item.is_shimmer then game:unregisterDialog(self) if item.is_installed then - Dialog:simplePopup(item.name, "This pack is already installed and in use for your character.") + Dialog:simplePopup(item.name, _t"This pack is already installed and in use for your character.") else local ShowPurchasable = require("engine.dialogs.microtxn.ShowPurchasable") ShowPurchasable:installShimmer(item) @@ -102,16 +102,16 @@ Make sure you have #GOLD##{bold}#Allow online events#WHITE##{normal}# in the #GO end Dialog:forceNextDialogUI("microtxn") - Dialog:yesnoPopup(item.name, ("You are about to use a charge of this option. You currently have %d charges remaining."):format(item.nb_available), function(ret) if ret then - local popup = Dialog:simplePopup(item.name, "Please wait while contacting the server...", nil, true) + Dialog:yesnoPopup(item.name, ("You are about to use a charge of this option. You currently have %d charges remaining."):tformat(item.nb_available), function(ret) if ret then + local popup = Dialog:simplePopup(item.name, _t"Please wait while contacting the server...", nil, true) profile:registerTemporaryEventHandler("MicroTxnUseActionable", function(e) game:unregisterDialog(popup) game:unregisterDialog(self) if e.success then - Dialog:simplePopup(item.name, "The option has been activated.") + Dialog:simplePopup(item.name, _t"The option has been activated.") else - Dialog:simplePopup(item.name, "There was an error from the server: "..tostring(e.error)) + Dialog:simplePopup(item.name, ("There was an error from the server: %s"):tformat(tostring(e.error))) end end) core.profile.pushOrder(string.format("o='MicroTxn' suborder='use_actionable' module=%q id_purchasable=%d", game.__mod_info.short_name, item.id_purchasable)) @@ -123,7 +123,7 @@ function _M:generateList() profile:registerTemporaryEventHandler("MicroTxnListActionables", function(e) if e.error then - Dialog:simplePopup("Online Store", e.error:capitalize()) + Dialog:simplePopup(_t"Online Store", e.error:capitalize()) game:unregisterDialog(self) return end @@ -138,10 +138,10 @@ function _M:generateList() if item.is_shimmer then local pack_name = "cosmetic-"..item.effect if game.__mod_info.addons and game.__mod_info.addons[pack_name] then - item.nb_available = "#LIGHT_GREEN#Installed" + item.nb_available = _t"#LIGHT_GREEN#Installed" item.is_installed = true else - item.nb_available = "#YELLOW#Installable" + item.nb_available = _t"#YELLOW#Installable" item.can_install = pack_name end end @@ -155,7 +155,7 @@ function _M:generateList() if #list == 0 then game:unregisterDialog(self) - Dialog:yesnoPopup("Online Store", "You have not purchased any usable options yet. Would you like to see the store?", function(ret) if ret then + Dialog:yesnoPopup(_t"Online Store", _t"You have not purchased any usable options yet. Would you like to see the store?", function(ret) if ret then package.loaded["engine.dialogs.microtxn.ShowPurchasable"] = nil game:registerDialog(require("engine.dialogs.microtxn.ShowPurchasable").new()) end end) diff --git a/game/engines/default/engine/init.lua b/game/engines/default/engine/init.lua index 4b683bb6cd7df88e991dc3fbb939afcdfc820f1e..f2399cef300a749ea3a5c40faa9a2c2b6dda3c53 100644 --- a/game/engines/default/engine/init.lua +++ b/game/engines/default/engine/init.lua @@ -27,6 +27,7 @@ dofile("/engine/colors.lua") dofile("/engine/resolvers.lua") require "config" +local I18N = require "engine.I18N" require "engine.Game" require "engine.version" require "engine.interface.GameMusic" @@ -124,6 +125,10 @@ if core.display.safeMode() then config.settings.window = {size='800x600 Windowed'} end +-- I18N:loadLocale("/data/locales/zh_hans.lua") +-- I18N:setLocale("zh_hans") + + -- Default resolution as big as possible if not config.settings.window or not config.settings.window.size then local list = core.display.getModesList() @@ -196,5 +201,6 @@ core.game.setFPS(config.settings.display_fps) if config.settings.disable_discord then core.discord = nil end if core.discord then core.discord.init() end -util.showMainMenu(true) +-- I18N:test() +util.showMainMenu(true) diff --git a/game/engines/default/engine/interface/ActorInventory.lua b/game/engines/default/engine/interface/ActorInventory.lua index edb716ca60913ab7e540b0bc9331d3877d8e1232..5414d153f98f3f8f2766f9f0e30b379eea19caee 100644 --- a/game/engines/default/engine/interface/ActorInventory.lua +++ b/game/engines/default/engine/interface/ActorInventory.lua @@ -247,10 +247,10 @@ function _M:pickupFloor(i, vocal, no_sort) slot = self:itemPosition(self.INVEN_INVEN, newo, true) or 1 local letter = ShowPickupFloor:makeKeyChar(slot) - if vocal then game.logSeen(self, "%s picks up (%s.): %s%s.", self.name:capitalize(), letter, num>1 and ("%d "):format(num) or "", o:getName{do_color=true, no_count = true}) end + if vocal then game.logSeen(self, "%s picks up (%s.): %s%s.", self:getName():capitalize(), letter, num>1 and ("%d "):format(num) or "", o:getName{do_color=true, no_count = true}) end return inven[slot], num else - if vocal then game.logSeen(self, "%s has no room for: %s.", self.name:capitalize(), o:getName{do_color=true}) end + if vocal then game.logSeen(self, "%s has no room for: %s.", self:getName():capitalize(), o:getName{do_color=true}) end return end elseif prepickup == "skip" then @@ -350,7 +350,7 @@ function _M:dropFloor(inven, item, vocal, all) local ok, idx = game.level.map:addObject(self.x, self.y, o) - if vocal then game.logSeen(self, "%s drops on the floor: %s.", self.name:capitalize(), o:getName{do_color=true}) end + if vocal then game.logSeen(self, "%s drops on the floor: %s.", self:getName():capitalize(), o:getName{do_color=true}) end if ok and game.level.map.attrs(self.x, self.y, "on_drop") then game.level.map.attrs(self.x, self.y, "on_drop")(self, self.x, self.y, idx, o) end @@ -409,7 +409,7 @@ function _M:canWearObject(o, try_slot) -- check if the slot matches dammit if try_slot and try_slot ~= o.slot and try_slot ~= self:getObjectOffslot(o) then - return nil, "wrong equipment slot" + return nil, _t"wrong equipment slot" end -- Check prerequisites @@ -417,7 +417,7 @@ function _M:canWearObject(o, try_slot) -- Obviously this requires the ActorStats interface if req.stat then for s, v in pairs(req.stat) do - if self:getStat(s) < v then return nil, "not enough stat" end + if self:getStat(s) < v then return nil, _t"not enough stat" end end end if req.flag then @@ -425,25 +425,25 @@ function _M:canWearObject(o, try_slot) if type(flag) == "table" then if not self:attr(flag[1]) or self:attr(flag[1]) < flag[2] then local name = o.requirement_flags_names and o.requirement_flags_names[flag[1]] or flag[1] - return nil, "missing "..tostring(name).." (level "..tostring(flag[2])..")" + return nil, ("missing %s (level %s )"):tformat(tostring(name), tostring(flag[2])) end else if not self:attr(flag) then local name = o.requirement_flags_names and o.requirement_flags_names[flag] or flag - return nil, "missing "..tostring(name) + return nil, ("missing %s"):tformat(tostring(name)) end end end end if req.level and self.level < req.level then - return nil, "not enough levels" + return nil, _t"not enough levels" end if req.talent then for _, tid in ipairs(req.talent) do if type(tid) == "table" then - if self:getTalentLevelRaw(tid[1]) < tid[2] then return nil, "missing dependency" end + if self:getTalentLevelRaw(tid[1]) < tid[2] then return nil, _t"missing dependency" end else - if not self:knowTalent(tid) then return nil, "missing dependency" end + if not self:knowTalent(tid) then return nil, _t"missing dependency" end end end end @@ -454,7 +454,7 @@ function _M:canWearObject(o, try_slot) local inven = self:getInven(o.slot_forbid) -- If the object cant coexist with that inventory slot and it exists and is not empty, refuse wearing if inven and #inven > 0 then - return nil, "cannot use currently due to an other worn object" + return nil, _t"cannot use currently due to an other worn object" end end @@ -465,7 +465,7 @@ function _M:canWearObject(o, try_slot) print("fight: ", o.name, wo.name, "::", wo.slot_forbid, try_slot or o.slot) if wo.slot_forbid and self:slotForbidCheck(wo, id) and wo.slot_forbid == (try_slot or o.slot) then print(" impossible => ", o.name, wo.name, "::", wo.slot_forbid, try_slot or o.slot) - return nil, "cannot use currently due to an other worn object" + return nil, _t"cannot use currently due to an other worn object" end end end @@ -513,14 +513,14 @@ function _M:wearObject(o, replace, vocal, force_inven, force_item) return false end if not inven then - if vocal then game.logSeen(self, "%s can not wear %s.", self.name, o_name) end + if vocal then game.logSeen(self, "%s can not wear %s.", self:getName(), o_name) end return false end local ok, err = self:canWearObject(o, inven.name) if not ok then - if vocal then game.logSeen(self, "%s can not wear (%s): %s (%s).", self.name:capitalize(), self.inven_def[inven.name].name:lower(), o_name, err) end + if vocal then game.logSeen(self, "%s can not wear (%s): %s (%s).", self:getName():capitalize(), self.inven_def[inven.name].name:lower(), o_name, err) end return false end if o:check("on_canwear", self, inven) then return false end @@ -528,10 +528,10 @@ function _M:wearObject(o, replace, vocal, force_inven, force_item) local added, slot, stack = self:addObject(inven_id, o, nil, force_item) if added then - if vocal then game.logSeen(self, "%s wears: %s.", self.name:capitalize(), o_name) end + if vocal then game.logSeen(self, "%s wears: %s.", self:getName():capitalize(), o_name) end return true, stack elseif not force_inven and offslot and self:getInven(offslot) and #(self:getInven(offslot)) < self:getInven(offslot).max and self:canWearObject(o, offslot) then - if vocal then game.logSeen(self, "%s wears (offslot): %s.", self.name:capitalize(), o:getName{do_color=true}) end + if vocal then game.logSeen(self, "%s wears (offslot): %s.", self:getName():capitalize(), o:getName{do_color=true}) end added, slot, stack = self:addObject(offslot, o) return added, stack elseif replace then -- no room but replacement is allowed @@ -540,18 +540,18 @@ function _M:wearObject(o, replace, vocal, force_inven, force_item) -- Check if we still can wear it, to prevent the replace-abuse local ok, err = self:canWearObject(o, inven.name) if not ok then - if vocal then game.logSeen(self, "%s can not wear (%s): %s (%s).", self.name:capitalize(), self.inven_def[inven.name].name:lower(), o_name, err) end + if vocal then game.logSeen(self, "%s can not wear (%s): %s (%s).", self:getName():capitalize(), self.inven_def[inven.name].name:lower(), o_name, err) end if ro then self:addObject(inven_id, ro, true, force_item) end return false end added, slot, stack = self:addObject(inven_id, o, nil, force_item) - if vocal then game.logSeen(self, "%s wears (replacing %s): %s.", self.name:capitalize(), ro:getName{do_color=true}, o_name) end + if vocal then game.logSeen(self, "%s wears (replacing %s): %s.", self:getName():capitalize(), ro:getName{do_color=true}, o_name) end if stack and ro:stack(stack) then -- stack remaining stack with old if possible (ignores stack limits) stack = nil end return ro, stack -- caller handles the replaced object and remaining stack if any else - if vocal then game.logSeen(self, "%s can not wear: %s.", self.name:capitalize(), o:getName{do_color=true}) end + if vocal then game.logSeen(self, "%s can not wear: %s.", self:getName():capitalize(), o:getName{do_color=true}) end return false end end diff --git a/game/engines/default/engine/interface/ActorLife.lua b/game/engines/default/engine/interface/ActorLife.lua index 3f8397500633a4a4e121cff79f0af7ba26a13f68..d1fe0dd289dd94cd38ec7d10d67f79118be65eb7 100644 --- a/game/engines/default/engine/interface/ActorLife.lua +++ b/game/engines/default/engine/interface/ActorLife.lua @@ -74,7 +74,7 @@ function _M:takeHit(value, src, death_note) self.changed = true if self.life <= self.die_at and not self.dead then if src and src.on_kill and src:on_kill(self) then return false, value end - game.logSeen(self, "#{bold}#%s killed %s!#{normal}#", src and src.name:capitalize() or "something", self.name) + game.logSeen(self, "#{bold}#%s killed %s!#{normal}#", src and src:getName():capitalize() or _t"something", self:getName()) return self:die(src, death_note), value end return false, value @@ -99,6 +99,6 @@ end -- @param x placeholder -- @param y placeholder function _M:attack(target, x, y) - game.logSeen(target, "%s attacks %s.", self.name:capitalize(), target.name:capitalize()) + game.logSeen(target, "%s attacks %s.", self.name:capitalize(), target:getName():capitalize()) target:takeHit(10, self) end diff --git a/game/engines/default/engine/interface/ActorStats.lua b/game/engines/default/engine/interface/ActorStats.lua index 3296aad3e97bb87f2cda6e624bb8cac95f3434e7..3f28782730e765484cfc24fe2234c41a36ccb1f7 100644 --- a/game/engines/default/engine/interface/ActorStats.lua +++ b/game/engines/default/engine/interface/ActorStats.lua @@ -33,13 +33,16 @@ function _M:defineStat(name, short_name, default_value, min, max, desc) local no_max = false if type(max) == "table" then no_max = max.no_max; max = max[1] end table.insert(self.stats_def, { - name = name, + name = _t(name), short_name = short_name, description = desc, def = default_value or 10, min = min or 1, max = max or 100, no_max = no_max, + -- I18N I have added a new property. + display_short_name = _t(short_name), + original_name = name, }) self.stats_def[#self.stats_def].id = #self.stats_def self.stats_def[short_name] = self.stats_def[#self.stats_def] diff --git a/game/engines/default/engine/interface/ActorTalents.lua b/game/engines/default/engine/interface/ActorTalents.lua index f1ef1b90532fdbe7dea622ded3b0faf27cf87462..583a7202e6ea4cc236da329d1a3abab282a4efab 100644 --- a/game/engines/default/engine/interface/ActorTalents.lua +++ b/game/engines/default/engine/interface/ActorTalents.lua @@ -53,6 +53,8 @@ function _M:newTalentType(t) t.description = t.description or "" t.category = t.category or t.type:gsub("/.*", "") t.points = t.points or 1 + -- I18N + t.name = _t(t.name) t.talents = {} table.insert(self.talents_types_def, t) self.talents_types_def[t.type] = self.talents_types_def[t.type] or t @@ -82,6 +84,9 @@ function _M:newTalent(t) local info = t.info t.info = function(self, t) return info(self, t):gsub("\n\t+", "\n") end + -- I18N + t.name = _t(t.name) + t.id = "T_"..t.short_name self.talents_def[t.id] = t assert(not self[t.id], "talent already exists with id T_"..t.short_name) @@ -305,7 +310,7 @@ function _M:useTalent(id, who, force_level, ignore_cd, force_target, silent, no_ end) if not no_confirm and self:isTalentConfirmable(ab) then local abname = game:getGenericTextTiles(ab)..tostring(self:getTalentDisplayName(ab)) - require "engine.ui.Dialog":yesnoPopup("Talent Use Confirmation", ("Use %s?"):format(abname), + require "engine.ui.Dialog":yesnoPopup(_t"Talent Use Confirmation", ("Use %s?"):tformat(abname), function(quit) if quit ~= false then cancel = true @@ -317,7 +322,7 @@ function _M:useTalent(id, who, force_level, ignore_cd, force_target, silent, no_ error(ret) end end, - "Cancel","Continue") + _t"Cancel",_t"Continue") else success, ret = coroutine.resume(co_wrapper) -- cancel checked in coroutine end @@ -343,12 +348,12 @@ function _M:useTalentMessage(ab) if not ab.message then return nil end local str = util.getval(ab.message, self, ab) local _, _, target = self:getTarget() - local tname = "unknown" - if target then tname = target.name end - str = str:gsub("@Source@", self.name:capitalize()) - str = str:gsub("@source@", self.name) - str = str:gsub("@target@", tname) - str = str:gsub("@Target@", tname:capitalize()) + local tname = _t"unknown" + if target then tname = target:getName() end + str = str:noun_sub("@Source@", self:getName():capitalize()) + str = str:noun_sub("@source@", self:getName()) + str = str:noun_sub("@target@", tname) + str = str:noun_sub("@Target@", tname:capitalize()) str = str:gsub("@hisher@", string.his_her(self)) return str end @@ -363,9 +368,9 @@ function _M:logTalentMessage(ab) elseif ab.message then game.logSeen(self, "%s", self:useTalentMessage(ab)) elseif ab.mode == "sustained" then - game.logSeen(self, "%s %s %s.", self.name:capitalize(), self:isTalentActive(ab.id) and "deactivates" or "activates", ab.name) + game.logSeen(self, "%s %s %s.", self:getName():capitalize(), self:isTalentActive(ab.id) and _t"deactivates" or _t"activates", ab.name) else - game.logSeen(self, "%s uses %s.", self.name:capitalize(), ab.name) + game.logSeen(self, "%s uses %s.", self:getName():capitalize(), ab.name) end end @@ -725,12 +730,12 @@ function _M:canLearnTalent(t, offset, ignore_special) if req.stat then for s, v in pairs(req.stat) do v = util.getval(v, tlev) - if self:getStat(s) < v then return nil, "not enough stat: "..s:upper() end + if self:getStat(s) < v then return nil, ("not enough stat: %s"):tformat(s:upper()) end end end if req.level then if self.level < util.getval(req.level, tlev) then - return nil, "not enough levels" + return nil, _t"not enough levels" end end if req.special and not ignore_special then @@ -752,28 +757,28 @@ function _M:canLearnTalent(t, offset, ignore_special) for _, tid in ipairs(req.talent) do if type(tid) == "table" then if type(tid[2]) == "boolean" and tid[2] == false then - if self:knowTalent(tid[1]) then return nil, "missing dependency" end + if self:knowTalent(tid[1]) then return nil, _t"missing dependency" end else - if self:getTalentLevelRaw(tid[1]) < tid[2] then return nil, "missing dependency" end + if self:getTalentLevelRaw(tid[1]) < tid[2] then return nil, _t"missing dependency" end end else - if not self:knowTalent(tid) then return nil, "missing dependency" end + if not self:knowTalent(tid) then return nil, _t"missing dependency" end end end end if req.birth_descriptors then for _, d in ipairs(req.birth_descriptors) do - if not self.descriptor or self.descriptor[d[1]] ~= d[2] then return nil, ("is not %s"):format(d[2]) end + if not self.descriptor or self.descriptor[d[1]] ~= d[2] then return nil, ("is not %s"):tformat(_t(d[2])) end end end end - if not self:knowTalentType(t.type[1]) and not t.type_no_req then return nil, "unknown talent type" end + if not self:knowTalentType(t.type[1]) and not t.type_no_req then return nil, _t"unknown talent type" end -- Check talent type local known = self:numberKnownTalent(t.type[1], t.id, t.type[2]) if t.type[2] and known < t.type[2] - 1 then - return nil, "not enough talents of this type known" + return nil, _t"not enough talents of this type known" end -- Ok! @@ -794,13 +799,13 @@ function _M:getTalentReqDesc(t_id, levmod) local str = tstring{} if not t.type_no_req then - str:add((self:knowTalentType(t.type[1]) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00}), "- Talent category known", true) + str:add((self:knowTalentType(t.type[1]) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00}), _t"- Talent category known", true) end if t.type[2] and t.type[2] > 1 then local known = self:numberKnownTalent(t.type[1], t.id, t.type[2]) local c = (known >= t.type[2] - 1) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, ("- Lower talents of the same category: %d"):format(t.type[2] - 1), true) + str:add(c, ("- Lower talents of the same category: %d"):tformat(t.type[2] - 1), true) end -- Obviously this requires the ActorStats interface @@ -814,7 +819,7 @@ function _M:getTalentReqDesc(t_id, levmod) if req.level then local v = util.getval(req.level, tlev) local c = (self.level >= v) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, ("- Level %d"):format(v), true) + str:add(c, ("- Level %d"):tformat(v), true) end if req.special then local c = (req.special.fct(self, t, offset)) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} @@ -833,21 +838,21 @@ function _M:getTalentReqDesc(t_id, levmod) if type(tid) == "table" then if type(tid[2]) == "boolean" and tid[2] == false then local c = (not self:knowTalent(tid[1])) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, ("- Talent %s (not known)"):format(self:getTalentFromId(tid[1]).name), true) + str:add(c, ("- Talent %s (not known)"):tformat(self:getTalentFromId(tid[1]).name), true) else local c = (self:getTalentLevelRaw(tid[1]) >= tid[2]) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, ("- Talent %s (%d)"):format(self:getTalentFromId(tid[1]).name, tid[2]), true) + str:add(c, ("- Talent %s (%d)"):tformat(self:getTalentFromId(tid[1]).name, tid[2]), true) end else local c = self:knowTalent(tid) and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, ("- Talent %s"):format(self:getTalentFromId(tid).name), true) + str:add(c, ("- Talent %s"):tformat(self:getTalentFromId(tid).name), true) end end end if req.birth_descriptors then for _, d in ipairs(req.birth_descriptors) do local c = self.descriptor and self.descriptor[d[1]] == d[2] and {"color", 0x00,0xff,0x00} or {"color", 0xff,0x00,0x00} - str:add(c, ("- Is %s"):format(d[2]), true) + str:add(c, ("- Is %s"):tformat(_t(d[2])), true) end end diff --git a/game/engines/default/engine/interface/ActorTemporaryEffects.lua b/game/engines/default/engine/interface/ActorTemporaryEffects.lua index b579a15aed4f82443e35e018b1f26f9473461d7e..1efe74245ad872cecbd8f09ba1cf5e9b90153564 100644 --- a/game/engines/default/engine/interface/ActorTemporaryEffects.lua +++ b/game/engines/default/engine/interface/ActorTemporaryEffects.lua @@ -53,6 +53,9 @@ function _M:newEffect(t) t.status = t.status or "detrimental" t.decrease = t.decrease or 1 + -- I18N + t.desc = _t(t.desc) + self.tempeffect_def["EFF_"..t.name] = t t.id = "EFF_"..t.name self["EFF_"..t.name] = "EFF_"..t.name @@ -145,7 +148,7 @@ function _M:setEffect(eff_id, dur, p, silent) local ret, fly = ed.on_gain(self, p) if not silent and not had then if ret then - game.logSeen(self, ret:gsub("#Target#", self.name:capitalize()):gsub("#target#", self.name):gsub("#himher#", self.female and "her" or "him"):gsub("#hisher#", self.female and "her" or "his")) + game.logSeen(self, ret:noun_sub("#Target#", self:getName():capitalize()):noun_sub("#target#", self:getName()):gsub("#himher#", self:him_her()):gsub("#hisher#", self:his_her())) end if fly and game.flyers and self.x and self.y and game.level.map.seens(self.x, self.y) then if fly == true then fly = "+"..ed.desc end @@ -206,7 +209,7 @@ function _M:removeEffect(eff, silent, force) local ret, fly = ed.on_lose(self, p) if not silent then if ret then - game.logSeen(self, ret:gsub("#Target#", self.name:capitalize()):gsub("#target#", self.name):gsub("#himher#", self.female and "her" or "him")) + game.logSeen(self, ret:noun_sub("#Target#", self:getName():capitalize()):noun_sub("#target#", self:getName()):gsub("#himher#", self:him_her())) end if fly and game.flyers and self.x and self.y then if fly == true then fly = "-"..ed.desc end diff --git a/game/engines/default/engine/interface/GameTargeting.lua b/game/engines/default/engine/interface/GameTargeting.lua index f224a72f062101d16f6971bfcfa4696a176d8732..32694d59a803ff2f7f666557376fea59f8417322 100644 --- a/game/engines/default/engine/interface/GameTargeting.lua +++ b/game/engines/default/engine/interface/GameTargeting.lua @@ -112,7 +112,7 @@ function _M:targetMode(v, msg, co, typ) if not v then Map:setViewerFaction((self.always_target == true or self.always_target == "old") and self.player.faction or nil) - if msg then self.log(type(msg) == "string" and msg or "Tactical display disabled. Press shift+'t' to enable.") end + if msg then self.log(type(msg) == "string" and msg or _t"Tactical display disabled. Press shift+'t' to enable.") end self.level.map.changed = true self.targetmode_trigger_hotkey = nil self.target:setActive(false) @@ -138,14 +138,14 @@ function _M:targetMode(v, msg, co, typ) end end if self.target_warning and self.target.target.x == self.player.x and self.target.target.y == self.player.y then - Dialog:yesnoPopup(type(self.target_warning) == "string" and self.target_warning or "Target yourself?", "Are you sure you want to target yourself?", fct, "No", "Yes", nil, true) + Dialog:yesnoPopup(type(self.target_warning) == "string" and self.target_warning or _t"Target yourself?", _t"Are you sure you want to target yourself?", fct, _t"No", _t"Yes", nil, true) else fct(false) end end else Map:setViewerFaction(self.player.faction) - if msg then self.log(type(msg) == "string" and msg or "Tactical display enabled. Press shift+'t' to disable.") end + if msg then self.log(type(msg) == "string" and msg or _t"Tactical display enabled. Press shift+'t' to disable.") end self.level.map.changed = true self.target:setActive(true, typ) self.target_style = "lock" diff --git a/game/engines/default/engine/interface/ObjectActivable.lua b/game/engines/default/engine/interface/ObjectActivable.lua index b1103fc86ee1fd13837ad2d26e169ce1efe49fac..6932d8329e22ba714485930999f7cfda63f08eea 100644 --- a/game/engines/default/engine/interface/ObjectActivable.lua +++ b/game/engines/default/engine/interface/ObjectActivable.lua @@ -47,17 +47,17 @@ end function _M:getUseDesc() if self.use_power then if self.show_charges then - return ("It can be used to %s, with %d charges out of %d."):format(self.use_power.name, math.floor(self.power / self.use_power.power), math.floor(self.max_power / self.use_power.power)) + return ("It can be used to %s, with %d charges out of %d."):tformat(self.use_power.name, math.floor(self.power / self.use_power.power), math.floor(self.max_power / self.use_power.power)) else - return ("It can be used to %s, costing %d power out of %d/%d."):format(self.use_power.name, self.use_power.power, self.power, self.max_power) + return ("It can be used to %s, costing %d power out of %d/%d."):tformat(self.use_power.name, self.use_power.power, self.power, self.max_power) end elseif self.use_simple then return ("It can be used to %s."):format(self.use_simple.name) elseif self.use_talent then if not self.use_talent.power then - return ("It can be used to activate talent: %s (level %d)."):format(self:getTalentFromId(self.use_talent.id).name, self.use_talent.level) + return ("It can be used to activate talent: %s (level %d)."):tformat(self:getTalentFromId(self.use_talent.id).name, self.use_talent.level) else - return ("It can be used to activate talent: %s (level %d), costing %d power out of %d/%d."):format(self:getTalentFromId(self.use_talent.id).name, self.use_talent.level, self.use_talent.power, self.power, self.max_power) + return ("It can be used to activate talent: %s (level %d), costing %d power out of %d/%d."):tformat(self:getTalentFromId(self.use_talent.id).name, self.use_talent.level, self.use_talent.power, self.power, self.max_power) end end end diff --git a/game/engines/default/engine/interface/ObjectIdentify.lua b/game/engines/default/engine/interface/ObjectIdentify.lua index 09bc689aa8537dcefd6eeb195126e264ef6f9b90..93b9e0591d014934ad459e00678e6bbda730f3c8 100644 --- a/game/engines/default/engine/interface/ObjectIdentify.lua +++ b/game/engines/default/engine/interface/ObjectIdentify.lua @@ -34,7 +34,7 @@ end --- Defines the default IDed status function _M:resolveIdentify() if not self.unided_name then - self.unided_name = self.name + self.unided_name = _t(self.name) end end diff --git a/game/engines/default/engine/interface/PlayerExplore.lua b/game/engines/default/engine/interface/PlayerExplore.lua index f26351cc976b7f4c2c7e623575b11e176ec23c30..9e8956869d448d1979928b075ecfeeeea2f39f24 100644 --- a/game/engines/default/engine/interface/PlayerExplore.lua +++ b/game/engines/default/engine/interface/PlayerExplore.lua @@ -425,7 +425,7 @@ function _M:autoExplore() self.running = { path = path, cnt = 1, - dialog = Dialog:simplePopup("Running...", "You are exploring, press any key to stop.", function() + dialog = Dialog:simplePopup(_t"Running...", _t"You are exploring, press any key to stop.", function() self:runStop() end, false, true), explore = target_type, @@ -463,7 +463,7 @@ function _M:checkAutoExplore() if self.running.explore == "unseen" then return self:autoExplore() else - self:runStop("the path is blocked") + self:runStop(_t"the path is blocked") return false end end diff --git a/game/engines/default/engine/interface/PlayerHotkeys.lua b/game/engines/default/engine/interface/PlayerHotkeys.lua index 99d1f4a35219dcc0c16d4d17452edecc03c0aed1..f133d656c98bd7b91935a538a653bbf715606fa3 100644 --- a/game/engines/default/engine/interface/PlayerHotkeys.lua +++ b/game/engines/default/engine/interface/PlayerHotkeys.lua @@ -161,7 +161,7 @@ function _M:activateHotkey(id) if self.hotkey[id] then self["hotkey"..self.hotkey[id][1]:capitalize()](self, self.hotkey[id][2]) else - Dialog:simplePopup("Hotkey not defined", "You may define a hotkey by pressing 'm' and following the instructions there.") + Dialog:simplePopup(_t"Hotkey not defined", _t"You may define a hotkey by pressing 'm' and following the instructions there.") end end @@ -174,7 +174,7 @@ end function _M:hotkeyInventory(name) local o, item, inven = self:findInAllInventories(name) if not o then - Dialog:simplePopup("Item not found", "You do not have any "..name..".") + Dialog:simplePopup(_t"Item not found", ("You do not have any %s ."):tformat(name)) else self:playerUseItem(o, item, inven) end diff --git a/game/engines/default/engine/interface/PlayerRest.lua b/game/engines/default/engine/interface/PlayerRest.lua index 89f0325248184f6ab743bc6917464a16fbb5def0..d6edcb3e6accb48003dce49d55a2d52ccf2677cf 100644 --- a/game/engines/default/engine/interface/PlayerRest.lua +++ b/game/engines/default/engine/interface/PlayerRest.lua @@ -26,21 +26,21 @@ module(..., package.seeall, class.make) --- Initializes resting function _M:restInit(turns, what, past, on_end, on_very_end) - what = what or "resting" - past = past or "rested" + what = what or _t"resting" + past = past or _t"rested" self.resting = { rest_turns = turns, past = past, on_end = on_end, on_very_end = on_very_end, cnt = 0, - dialog = Dialog:simplePopup(what:capitalize().."...", "You are "..what..", press Enter to stop.", function() + dialog = Dialog:simplePopup(("%s..."):tformat(what:capitalize()), ("You are %s, press Enter to stop."):tformat(what), function() self:restStop() end), } self.resting.dialog.__showup = nil - game.log(what:capitalize().." starts...") + game.log("%s starts...", what:capitalize()) self:onRestStart() @@ -99,9 +99,9 @@ function _M:restStop(msg) game:unregisterDialog(self.resting.dialog) if msg then - game.log(self.resting.past:capitalize().." for %d turns (stop reason: %s).", self.resting.cnt, msg) + game.log("%s for %d turns (stop reason: %s).", self.resting.past:capitalize(), self.resting.cnt, msg) else - game.log(self.resting.past:capitalize().." for %d turns.", self.resting.cnt) + game.log("%s for %d turns.", self.resting.past:capitalize(), self.resting.cnt) end local finish = self.resting.cnt and self.resting.rest_turns and self.resting.cnt > self.resting.rest_turns diff --git a/game/engines/default/engine/interface/PlayerRun.lua b/game/engines/default/engine/interface/PlayerRun.lua index adabd61aee70a391918eefb4b497c610b1a57094..2e6c3a6fdc678781a3d42fac59fd214ca189c654 100644 --- a/game/engines/default/engine/interface/PlayerRun.lua +++ b/game/engines/default/engine/interface/PlayerRun.lua @@ -46,7 +46,7 @@ function _M:runInit(dir) block_hard_left = false, block_hard_right = false, cnt = 1, - dialog = Dialog:simplePopup("Running...", "You are running, press Enter to stop.", function() + dialog = Dialog:simplePopup(_t"Running...", _t"You are running, press Enter to stop.", function() self:runStop() end, false, true), } @@ -96,7 +96,7 @@ function _M:runFollow(path) self.running = { path = runpath, cnt = 1, - dialog = Dialog:simplePopup("Running...", "You are running, press any key to stop.", function() + dialog = Dialog:simplePopup(_t"Running...", _t"You are running, press any key to stop.", function() self:runStop() end, false, true), } @@ -138,7 +138,7 @@ function _M:runStep() self:runMoved() -- Did not move ? no use in running unless we were busy if self.running and not self.running.busy and self.x == oldx and self.y == oldy then - self:runStop("didn't move") + self:runStop(_t"didn't move") end end if not self.running then return false end @@ -180,7 +180,7 @@ function _M:runStep() self.running = running_bak -- Can't run around the trap if not ret2 then - self:runStop("trap spotted") + self:runStop(_t"trap spotted") return false end end @@ -199,7 +199,7 @@ function _M:runStep() self.running.ignore_left = nil -- We do this check here because it is path/time dependent, not terrain configuration dependent if dir_is_cardinal and self:checkRunDir(sides.left) and self:checkRunDir(self.running.dir, 2) then - self:runStop("terrain change on the left") + self:runStop(_t"terrain change on the left") return false end end @@ -212,7 +212,7 @@ function _M:runStep() self.running.ignore_right = nil -- We do this check here because it is path/time dependent, not terrain configuration dependent if dir_is_cardinal and self:checkRunDir(sides.right) and self:checkRunDir(self.running.dir, 2) then - self:runStop("terrain change on the right") + self:runStop(_t"terrain change on the right") return false end end @@ -371,7 +371,7 @@ function _M:runStop(msg) game:unregisterDialog(self.running.dialog) if not msg and self.running.explore and self.running.path and self.running.cnt == #self.running.path + 1 then - msg = "at " .. self.running.explore + msg = ("at %s"):tformat(_t(self.running.explore)) end if msg then game.log("Ran for %d turns (stop reason: %s).", self.running.cnt, msg) diff --git a/game/engines/default/engine/interface/WorldAchievements.lua b/game/engines/default/engine/interface/WorldAchievements.lua index db3860d250e68c3e8776991a5ee259bf40203e8e..d7c21fda4b6e8f1e8c697dce321c9827c3297c28 100644 --- a/game/engines/default/engine/interface/WorldAchievements.lua +++ b/game/engines/default/engine/interface/WorldAchievements.lua @@ -110,8 +110,8 @@ function _M:gainPersonalAchievement(silent, id, src, ...) src.achievements[id] = {turn=game.turn, who=self:achievementWho(src), when=os.date("%Y-%m-%d %H:%M:%S")} if not silent then local color = a.huge and "GOLD" or "LIGHT_GREEN" - game.log("#"..color.."#Personal New Achievement: %s!", a.name) - self:showAchievement("Personal New Achievement: #"..color.."#"..a.name, a) + game.log("#%s#Personal New Achievement: %s!", color, a.name) + self:showAchievement(("Personal New Achievement: #%s#%s"):tformat(color, a.name), a) if not a.no_chat_broadcast then profile.chat:achievement(a.name, a.huge, false) end end if a.on_gain then a:on_gain(src, true) end @@ -152,8 +152,8 @@ function _M:gainAchievement(id, src, ...) self.achieved[id] = {turn=game.turn, who=self:achievementWho(src), when=os.date("%Y-%m-%d %H:%M:%S")} if not config.settings.cheat then profile:saveModuleProfile("achievements", {id=id, turn=game.turn, who=self:achievementWho(src), gained_on=os.date("%Y-%m-%d %H:%M:%S")}) end local color = a.huge and "GOLD" or "LIGHT_GREEN" - game.log("#"..color.."#New Achievement: %s!", a.name) - self:showAchievement("New Achievement: #"..color.."#"..a.name, a) + game.log("#%s#New Achievement: %s!", color, a.name) + self:showAchievement(("New Achievement: #%s#%s"):tformat(color, a.name), a) if not a.no_chat_broadcast then profile.chat:achievement(a.name, a.huge, true) end if a.on_gain then a:on_gain(src) end @@ -174,7 +174,7 @@ end --- Show an achievement gain dialog function _M:showAchievement(title, a) if not config.settings.cheat then - game:registerDialog(Achievement.new("New Achievement", a)) + game:registerDialog(Achievement.new(_t"New Achievement", a)) end end diff --git a/game/engines/default/engine/ui/Dialog.lua b/game/engines/default/engine/ui/Dialog.lua index 7f65c552fb82572070e6b887bc620c9115f28ab6..909791aa3855cde079722576709541760e086ab6 100644 --- a/game/engines/default/engine/ui/Dialog.lua +++ b/game/engines/default/engine/ui/Dialog.lua @@ -114,7 +114,7 @@ function _M:simplePopup(title, text, fct, no_leave, any_leave) if not no_leave then d.key:addBind("EXIT", function() game:unregisterDialog(d) if fct then fct() end end) if any_leave then d.key:addCommand("__DEFAULT", function() game:unregisterDialog(d) if fct then fct() end end) end - local close = require("engine.ui.Button").new{text="Close", fct=function() d.key:triggerVirtual("EXIT") end} + local close = require("engine.ui.Button").new{text=_t"Close", fct=function() d.key:triggerVirtual("EXIT") end} d:loadUI{no_reset=true, {hcenter = 0, bottom = 3, ui=close}} d:setFocus(close) end @@ -135,7 +135,7 @@ function _M:simpleLongPopup(title, text, w, fct, no_leave, force_height) d:loadUI{{left = 3, top = 3, ui=textzone}} if not no_leave then d.key:addBind("EXIT", function() game:unregisterDialog(d) if fct then fct() end end) - local close = require("engine.ui.Button").new{text="Close", fct=function() d.key:triggerVirtual("EXIT") end} + local close = require("engine.ui.Button").new{text=_t"Close", fct=function() d.key:triggerVirtual("EXIT") end} d:loadUI{no_reset=true, {hcenter = 0, bottom = 3, ui=close}} d:setFocus(close) end @@ -150,8 +150,8 @@ function _M:yesnoPopup(title, text, fct, yes_text, no_text, no_leave, escape, pr local d = new(title, 1, 1) -- d.key:addBind("EXIT", function() game:unregisterDialog(d) fct(false) end) - local ok = require("engine.ui.Button").new{text=yes_text or "Yes", fct=function() if preexit_fct then preexit_fct(true) end game:unregisterDialog(d) fct(true) end} - local cancel = require("engine.ui.Button").new{text=no_text or "No", fct=function() if preexit_fct then preexit_fct(false) end game:unregisterDialog(d) fct(false) end} + local ok = require("engine.ui.Button").new{text=yes_text or _t"Yes", fct=function() if preexit_fct then preexit_fct(true) end game:unregisterDialog(d) fct(true) end} + local cancel = require("engine.ui.Button").new{text=no_text or _t"No", fct=function() if preexit_fct then preexit_fct(false) end game:unregisterDialog(d) fct(false) end} if not no_leave then d.key:addBind("EXIT", function() if preexit_fct then preexit_fct(escape) end game:unregisterDialog(d) fct(escape) end) end d:loadUI{ {left = 3, top = 3, ui=require("engine.ui.Textzone").new{width=w+20, height=h+5, text=text}}, @@ -168,8 +168,8 @@ end --- Requests a long yes-no dialog function _M:yesnoLongPopup(title, text, w, fct, yes_text, no_text, no_leave, escape, preexit_fct) local d - local ok = require("engine.ui.Button").new{text=yes_text or "Yes", fct=function() if preexit_fct then preexit_fct(true) end game:unregisterDialog(d) fct(true) end} - local cancel = require("engine.ui.Button").new{text=no_text or "No", fct=function() if preexit_fct then preexit_fct(false) end game:unregisterDialog(d) fct(false) end} + local ok = require("engine.ui.Button").new{text=yes_text or _t"Yes", fct=function() if preexit_fct then preexit_fct(true) end game:unregisterDialog(d) fct(true) end} + local cancel = require("engine.ui.Button").new{text=no_text or _t"No", fct=function() if preexit_fct then preexit_fct(false) end game:unregisterDialog(d) fct(false) end} w = math.max(w + 20, ok.w + cancel.w + 10) @@ -195,9 +195,9 @@ function _M:yesnocancelPopup(title, text, fct, yes_text, no_text, cancel_text, n local d = new(title, 1, 1) -- d.key:addBind("EXIT", function() game:unregisterDialog(d) fct(false) end) - local ok = require("engine.ui.Button").new{text=yes_text or "Yes", fct=function() if preexit_fct then preexit_fct(true, false) end game:unregisterDialog(d) fct(true, false) end} - local no = require("engine.ui.Button").new{text=no_text or "No", fct=function() if preexit_fct then preexit_fct(false, false) end game:unregisterDialog(d) fct(false, false) end} - local cancel = require("engine.ui.Button").new{text=cancel_text or "Cancel", fct=function() if preexit_fct then preexit_fct(false, true) end game:unregisterDialog(d) fct(false, true) end} + local ok = require("engine.ui.Button").new{text=yes_text or _t"Yes", fct=function() if preexit_fct then preexit_fct(true, false) end game:unregisterDialog(d) fct(true, false) end} + local no = require("engine.ui.Button").new{text=no_text or _t"No", fct=function() if preexit_fct then preexit_fct(false, false) end game:unregisterDialog(d) fct(false, false) end} + local cancel = require("engine.ui.Button").new{text=cancel_text or _t"Cancel", fct=function() if preexit_fct then preexit_fct(false, true) end game:unregisterDialog(d) fct(false, true) end} if not no_leave then d.key:addBind("EXIT", function() if preexit_fct then preexit_fct(false, not escape) end game:unregisterDialog(d) fct(false, not escape) end) end d:loadUI{ {left = 3, top = 3, ui=require("engine.ui.Textzone").new{width=w+20, height=h + 5, text=text}}, @@ -217,9 +217,9 @@ function _M:yesnocancelLongPopup(title, text, w, fct, yes_text, no_text, cancel_ local d = new(title, 1, 1) -- d.key:addBind("EXIT", function() game:unregisterDialog(d) fct(false) end) - local ok = require("engine.ui.Button").new{text=yes_text or "Yes", fct=function() if preexit_fct then preexit_fct(true, false) end game:unregisterDialog(d) fct(true, false) end} - local no = require("engine.ui.Button").new{text=no_text or "No", fct=function() if preexit_fct then preexit_fct(false, false) end game:unregisterDialog(d) fct(false, false) end} - local cancel = require("engine.ui.Button").new{text=cancel_text or "Cancel", fct=function() if preexit_fct then preexit_fct(false, true) end game:unregisterDialog(d) fct(false, true) end} + local ok = require("engine.ui.Button").new{text=yes_text or _t"Yes", fct=function() if preexit_fct then preexit_fct(true, false) end game:unregisterDialog(d) fct(true, false) end} + local no = require("engine.ui.Button").new{text=no_text or _t"No", fct=function() if preexit_fct then preexit_fct(false, false) end game:unregisterDialog(d) fct(false, false) end} + local cancel = require("engine.ui.Button").new{text=cancel_text or _t"Cancel", fct=function() if preexit_fct then preexit_fct(false, true) end game:unregisterDialog(d) fct(false, true) end} if not no_leave then d.key:addBind("EXIT", function() game:unregisterDialog(d) if preexit_fct then preexit_fct(false, not escape) end game:unregisterDialog(d) fct(false, not escape) end) end d:loadUI{ {left = 3, top = 3, ui=require("engine.ui.Textzone").new{width=w+20, auto_height=true, text=text}}, @@ -335,7 +335,7 @@ function _M:webPopup(url) local url = w.cur_url:gsub("%?_te4&", "?"):gsub("%?_te4", ""):gsub("&_te4", "") core.key.setClipboard(url) print("[WEBVIEW] url copy", url) - self:simplePopup("Copy URL", "URL copied to your clipboard.") + self:simplePopup(_t"Copy URL", _t"URL copied to your clipboard.") end end} w.on_title = function(title) d:updateTitle(title) end diff --git a/game/engines/default/engine/ui/Gestures.lua b/game/engines/default/engine/ui/Gestures.lua index 8298117b75e1c671c43e8b22c7bccc888e1b2bde..ba95490dad772eaa036556faf699194ddc41c509 100644 --- a/game/engines/default/engine/ui/Gestures.lua +++ b/game/engines/default/engine/ui/Gestures.lua @@ -272,7 +272,7 @@ end function _M:gestureTutorial() local Dialog = require "engine.ui.Dialog" - Dialog:simpleLongPopup("Mouse Gestures", [[ + Dialog:simpleLongPopup(_t"Mouse Gestures", _t[[ You have started to draw a mouse gesture for the first time! Gestures allow you to use talents or keyboard action by a simple movement of the mouse. To draw one you simply #{bold}#hold right click + move#{normal}#. By default no bindings are done for gesture so if you want to use them go to the Keybinds and add some, it's easy and fun! diff --git a/game/engines/default/engine/ui/Inventory.lua b/game/engines/default/engine/ui/Inventory.lua index a2e04deb5aa858a76e6d5b29854644f1617f42e5..c1d631bd26b0c5baf55fe4a45212336d14210315 100644 --- a/game/engines/default/engine/ui/Inventory.lua +++ b/game/engines/default/engine/ui/Inventory.lua @@ -127,11 +127,11 @@ function _M:generate() end self.c_inven = ListColumns.new{width=self.w, height=self.h - (self.c_tabs and self.c_tabs.h or 0), sortable=true, scrollbar=true, columns=self.columns or { - {name="", width={33,"fixed"}, display_prop="char", sort="id"}, - {name="", width={24,"fixed"}, display_prop="object", sort="sortname", direct_draw=direct_draw}, - {name="Inventory", width=72, display_prop="name", sort="sortname"}, - {name="Category", width=20, display_prop="cat", sort="cat"}, - {name="Enc.", width=8, display_prop="encumberance", sort="encumberance"}, + {name=_t"", width={33,"fixed"}, display_prop="char", sort="id"}, + {name=_t"", width={24,"fixed"}, display_prop="object", sort="sortname", direct_draw=direct_draw}, + {name=_t"Inventory", width=72, display_prop="name", sort="sortname"}, + {name=_t"Category", width=20, display_prop="cat", sort="cat"}, + {name=_t"Enc.", width=8, display_prop="encumberance", sort="encumberance"}, }, list={}, fct=function(item, sel, button, event) if self.fct then self.fct(item, button, event) end end, select=self.on_select, @@ -286,7 +286,7 @@ function _M:generateList(no_update) local enc = 0 o:forAllStack(function(o) enc=enc+o.encumber end) - list[#list+1] = { id=#list+1, char=char, name=o:getName(), sortname=o:getName():toString():removeColorCodes(), color=o:getDisplayColor(), object=o, inven=self.actor.INVEN_INVEN, item=item, cat=o.subtype, encumberance=enc, special_bg=self.special_bg } + list[#list+1] = { id=#list+1, char=char, name=o:getName(), sortname=o:getName():toString():removeColorCodes(), color=o:getDisplayColor(), object=o, inven=self.actor.INVEN_INVEN, item=item, cat=_t(o.subtype, "entity subtype"), encumberance=enc, special_bg=self.special_bg } chars[char] = #list i = i + 1 end diff --git a/game/engines/default/engine/ui/WebView.lua b/game/engines/default/engine/ui/WebView.lua index 93fa9e1e5b4f5593c84eabf14ce13ccbbbb7b1b0..e86fa62e677807796891ae372e1443791fb03b82 100644 --- a/game/engines/default/engine/ui/WebView.lua +++ b/game/engines/default/engine/ui/WebView.lua @@ -168,8 +168,8 @@ function _M:makeDownloadbox(downid, file) local Waitbar = require "engine.ui.Waitbar" local Button = require "engine.ui.Button" - local d = Dialog.new("Download: "..file, 600, 100) - local b = Button.new{text="Cancel", fct=function() self.view:downloadAction(downid, false) game:unregisterDialog(d) end} + local d = Dialog.new(("Download: "):tformat(file), 600, 100) + local b = Button.new{text=_t"Cancel", fct=function() self.view:downloadAction(downid, false) game:unregisterDialog(d) end} local w = Waitbar.new{size=600, text=file} d:loadUI{ {left=0, top=0, ui=w}, @@ -196,7 +196,7 @@ function _M:onDownload(handlers) if path then local name = file if self._next_download_name and os.time() - self._next_download_name.time <= 3 then name = self._next_download_name.name self._next_download_name = nil end - Dialog:yesnoPopup("Confirm addon install/update", "Are you sure you want to install this addon: #LIGHT_GREEN##{bold}#"..name.."#{normal}##LAST# ?", function(ret) + Dialog:yesnoPopup(_t"Confirm addon install/update", _t("Are you sure you want to install this addon: #LIGHT_GREEN##{bold}#%s#{normal}##LAST# ?"):tformat(name), function(ret) if ret then print("Accepting addon download to:", path..file) self.download_dialog = self:makeDownloadbox(downid, file) @@ -214,7 +214,7 @@ function _M:onDownload(handlers) if path then local name = file if self._next_download_name and os.time() - self._next_download_name.time <= 3 then name = self._next_download_name.name self._next_download_name = nil end - Dialog:yesnoPopup("Confirm module install/update", "Are you sure you want to install this module: #LIGHT_GREEN##{bold}#"..name.."#{normal}##LAST# ?", function(ret) + Dialog:yesnoPopup(_t"Confirm module install/update", ("Are you sure you want to install this module: #LIGHT_GREEN##{bold}#%s#{normal}##LAST#?"):tformat(name), function(ret) if ret then print("Accepting module download to:", path..file) self.download_dialog = self:makeDownloadbox(downid, file) @@ -240,9 +240,9 @@ function _M:onDownload(handlers) if not self.download_dialog then return end game:unregisterDialog(self.download_dialog) if self.download_dialog.install_kind == "Addon" then - Dialog:simplePopup("Addon installed!", "Addon installation successful. New addons are only active for new characters.") + Dialog:simplePopup(_t"Addon installed!", _t"Addon installation successful. New addons are only active for new characters.") elseif self.download_dialog.install_kind == "Game Module" then - Dialog:simplePopup("Game installed!", "Game installation successful. Have fun!") + Dialog:simplePopup(_t"Game installed!", _t"Game installation successful. Have fun!") end self.download_dialog = nil end diff --git a/game/engines/default/engine/utils.lua b/game/engines/default/engine/utils.lua index b42e3a6c89ba900886ea04fb2b9a5be1f9d582e2..aa73293149be0677f888d17e5fb26c49ef3250cb 100644 --- a/game/engines/default/engine/utils.lua +++ b/game/engines/default/engine/utils.lua @@ -362,6 +362,43 @@ function table.keys(t) return tt end +function table.ts(t, tag) + local tt = {} + for i, e in ipairs(t) do tt[i] = _t(e, tag) end + return tt +end + +function table.lower(t) + local tt = {} + for i, e in ipairs(t) do tt[i] = e:lower() end + return tt +end + +function table.capitalize(t) + local tt = {} + for i, e in ipairs(t) do tt[i] = e:capitalize() end + return tt +end + +function string.tslash(str, tag) + if str:find("/") then + local pos, _ = str:find("/") + return _t(str:sub(1, pos - 1), tag) .. "/" .. string.tslash(str:sub(pos + 1), tag) + else + return _t(str, tag) + end +end + +function string.ttype(str, type) + if str:find("/") then + local pos, _ = str:find("/") + return _t(str:sub(1, pos - 1), type.. " type") .. "/" .. _t(str:sub(pos + 1), type.." subtype") + else + return _t(str, type.." type") + end +end + + function table.values(t) local tt = {} for k, e in pairs(t) do tt[#tt+1] = e end @@ -807,17 +844,17 @@ end string.nextUTF = core.display.stringNextUTF function string.ordinal(number) - local suffix = "th" + local suffix = _t"%dth" number = tonumber(number) local base = number % 10 if base == 1 then - suffix = "st" + suffix = _t"%dst" elseif base == 2 then - suffix = "nd" + suffix = _t"%dnd" elseif base == 3 then - suffix = "rd" + suffix = _t"%drd" end - return number..suffix + return (suffix):tformat(number) end function string.trim(str) @@ -826,35 +863,35 @@ end function string.a_an(str) local first = str:sub(1, 1) - if first == "a" or first == "e" or first == "i" or first == "o" or first == "u" or first == "y" then return "an "..str - else return "a "..str end + if first == "a" or first == "e" or first == "i" or first == "o" or first == "u" or first == "y" then return _t"an "..str + else return _t"a "..str end end function string.he_she(actor) - if actor.female then return "she" - elseif actor.neuter then return "it" - else return "he" + if actor.female then return _t"she" + elseif actor.neuter then return _t"it" + else return _t"he" end end function string.his_her(actor) - if actor.female then return "her" - elseif actor.neuter then return "its" - else return "his" + if actor.female then return _t"her" + elseif actor.neuter then return _t"its" + else return _t"his" end end function string.him_her(actor) - if actor.female then return "her" - elseif actor.neuter then return "it" - else return "him" + if actor.female then return _t"her" + elseif actor.neuter then return _t"it" + else return _t"him" end end function string.his_her_self(actor) - if actor.female then return "herself" - elseif actor.neuter then return "itself" - else return "himself" + if actor.female then return _t"herself" + elseif actor.neuter then return _t"itself" + else return _t"himself" end end @@ -888,6 +925,14 @@ function string.bookCapitalize(str) return table.concat(words, " ") end +local function default_noun_sub(str, type, noun) + return str:gsub(type, noun) +end +function string.noun_sub(str, type, noun) + local proc = _getFlagI18N("noun_target_sub") or default_noun_sub + return proc(str, type, noun) +end + function string.lpegSub(s, patt, repl) patt = lpeg.P(patt) patt = lpeg.Cs((patt / repl + 1)^0) @@ -1118,7 +1163,7 @@ function string.fromValue(v, recurse, offset, prefix, suffix) local abv = {} if v.__CLASSNAME then abv[#abv+1] = "__CLASSNAME="..tostring(v.__CLASSNAME) end if v.__ATOMIC then abv[#abv+1] = "ATOMIC" end - vs = ("%s\"%s%s%s\"%s"):format(prefix, v, v.__CLASSNAME and ", __CLASSNAME="..tostring(v.__CLASSNAME) or "", v.__ATOMIC and ", ATOMIC" or "", suffix) + vs = ("%s\"%s%s%s\"%s"):format(prefix, v, v.__CLASSNAME and ", __CLASSname=_t"..tostring(v.__CLASSNAME) or "", v.__ATOMIC and ", ATOMIC" or "", suffix) elseif recurse > 0 then -- get recursive string vs = string.fromTable(v, recurse - 1, offset, prefix, suffix) else vs = prefix.."\""..tostring(v).."\""..suffix diff --git a/game/engines/default/modules/boot/class/Game.lua b/game/engines/default/modules/boot/class/Game.lua index 21d4f6709715f5d522f1513c2fc992dbd756a7f0..5ce9d152519ad975d141f6296cefac194af1d796 100644 --- a/game/engines/default/modules/boot/class/Game.lua +++ b/game/engines/default/modules/boot/class/Game.lua @@ -75,10 +75,11 @@ function _M:init() end self:handleEvents() + local default_font, _ = FontPackage:getFont("default") if not profile.connected then core.webview, core.webview_inactive = nil, core.webview end - if not core.webview then self.tooltip = Tooltip.new(nil, 14, nil, colors.DARK_GREY, 380) end + if not core.webview then self.tooltip = Tooltip.new(default_font, 14, nil, colors.DARK_GREY, 380) end - self.floating_tooltip = Tooltip.new(nil, 14, nil, colors.DARK_GREY, 467) + self.floating_tooltip = Tooltip.new(default_font, 14, nil, colors.DARK_GREY, 467) -- self.refuse_threads = true self.normal_key = self.key @@ -108,7 +109,8 @@ function _M:makeWebtooltip() } if self.webtooltip.unusable then self.webtooltip = nil - self.tooltip = Tooltip.new(nil, 14, nil, colors.DARK_GREY, 380) + local default_font, _ = FontPackage:getFont("default") + self.tooltip = Tooltip.new(default_font, 14, nil, colors.DARK_GREY, 380) end end @@ -155,8 +157,8 @@ function _M:run() -- Get news if not self.news then self.news = { - title = "Welcome to T-Engine and the Tales of Maj'Eyal", - text = [[#GOLD#"Tales of Maj'Eyal"#WHITE# is the main game, you can also install more addons or modules by going to https://te4.org/ + title = _t"Welcome to T-Engine and the Tales of Maj'Eyal", + text = _t[[#GOLD#"Tales of Maj'Eyal"#WHITE# is the main game, you can also install more addons or modules by going to https://te4.org/ When inside a module remember you can press Escape to bring up a menu to change keybindings, resolution and other module specific options. @@ -192,7 +194,7 @@ Now go and have some fun!]] if not config.settings.upgrades or not config.settings.upgrades.v1_0_5 then if not config.settings.background_saves or (config.settings.tome and config.settings.tome.save_zone_levels) then - Dialog:simpleLongPopup("Upgrade to 1.0.5", [[The way the engine manages saving has been reworked for v1.0.5. + Dialog:simpleLongPopup(_t"Upgrade to 1.0.5", _t[[The way the engine manages saving has been reworked for v1.0.5. The background saves should no longer lag horribly and as such it is highly recommended that you use the option. The upgrade turned it on for you. @@ -213,7 +215,7 @@ For the same reason the save per level option should not be used unless you have util.removeForceSafeBoot() if core.display.safeMode() then - Dialog:simpleLongPopup("Safe Mode", [[Oops! Either you activated safe mode manually or the game detected it did not start correctly last time and thus you are in #LIGHT_GREEN#safe mode#WHITE#. + Dialog:simpleLongPopup(_t"Safe Mode", _t[[Oops! Either you activated safe mode manually or the game detected it did not start correctly last time and thus you are in #LIGHT_GREEN#safe mode#WHITE#. Safe Mode disabled all graphical options and sets a low FPS. It is not advisable to play this way (as it will be very painful and ugly). Please go to the Video Options and try enabling/disabling options and then restarting until you do not get this message. @@ -222,13 +224,13 @@ A usual problem is shaders and thus should be your first target to disable.]], 7 local reboot_message = core.game.getRebootMessage() if reboot_message then - Dialog:simpleLongPopup("Message", reboot_message, 700) + Dialog:simpleLongPopup(_t"Message", reboot_message, 700) end self:checkBootLoginRegister() if __module_extra_info.duplicate_addon then - Dialog:simpleLongPopup("Duplicate Addon", ([[Oops! It seems like you have the same addon/dlc installed twice. + Dialog:simpleLongPopup(_t"Duplicate Addon", (_t[[Oops! It seems like you have the same addon/dlc installed twice. This is unsupported and would make many things explode. Please remove one of the copies. Addon name: #YELLOW#%s#LAST# @@ -304,7 +306,7 @@ function _M:grabAddons() local co co = coroutine.create(function() for i, add in ipairs(update_list) do if core.webview then - local d = Downloader.new{title="Updating addon: #LIGHT_GREEN#"..list[add.name].long_name, co=co, dest=add.file..".tmp", url=add.download_url, allow_downloads={addons=true}} + local d = Downloader.new{title=("Updating addon: #LIGHT_GREEN#%s"):tformat(list[add.name].long_name), co=co, dest=add.file..".tmp", url=add.download_url, allow_downloads={addons=true}} local ok = d:start() if ok then local wdir = fs.getWritePath() @@ -569,13 +571,13 @@ end --- Ask if we really want to close, if so, save the game first function _M:onQuit() if self.is_quitting then return end - self.is_quitting = Dialog:yesnoPopup("Quit", "Really exit T-Engine/ToME?", function(ok) + self.is_quitting = Dialog:yesnoPopup(_t"Quit", _t"Really exit T-Engine/ToME?", function(ok) self.is_quitting = false if ok then core.game.exit_engine() end - end, "Quit", "Continue") + end, _t"Quit", _t"Continue") end -profile_help_text = [[Welcome to #LIGHT_GREEN#Tales of Maj'Eyal#LAST#! +profile_help_text = _t[[Welcome to #LIGHT_GREEN#Tales of Maj'Eyal#LAST#! Before you can start dying in many innovative ways we need to ask you about online play. @@ -625,28 +627,28 @@ end function _M:createProfile(loginItem) if not loginItem.create then self.auth_tried = nil - local d = Dialog:simpleWaiter("Login in...", "Please wait...") core.display.forceRedraw() + local d = Dialog:simpleWaiter(_t"Login in...", _t"Please wait...") core.display.forceRedraw() profile:performlogin(loginItem.login, loginItem.pass) profile:waitFirstAuth() d:done() if profile.auth then - Dialog:simplePopup("Profile logged in!", "Your online profile is now active. Have fun!", function() end ) + Dialog:simplePopup(_t"Profile logged in!", _t"Your online profile is now active. Have fun!", function() end ) else - Dialog:simplePopup("Login failed!", "Check your login and password or try again in in a few moments.", function() end ) + Dialog:simplePopup(_t"Login failed!", _t"Check your login and password or try again in in a few moments.", function() end ) end else self.auth_tried = nil - local d = Dialog:simpleWaiter("Registering...", "Registering on https://te4.org/, please wait...") core.display.forceRedraw() + local d = Dialog:simpleWaiter(_t"Registering...", _t"Registering on https://te4.org/, please wait...") core.display.forceRedraw() local ok, err = profile:newProfile(loginItem.login, loginItem.name, loginItem.pass, loginItem.email, loginItem.news) profile:waitFirstAuth() d:done() if profile.auth then - Dialog:simplePopup(self.justlogin and "Logged in!" or "Profile created!", "Your online profile is now active. Have fun!", function() end ) + Dialog:simplePopup(self.justlogin and _t"Logged in!" or _t"Profile created!", _t"Your online profile is now active. Have fun!", function() end ) else if err ~= "unknown" and err then - Dialog:simplePopup("Profile creation failed!", "Creation failed: "..err.." (you may also register on https://te4.org/)", function() end ) + Dialog:simplePopup(_t"Profile creation failed!", ("Creation failed: %s (you may also register on https://te4.org/)"):tformat(err), function() end ) else - Dialog:simplePopup("Profile creation failed!", "Try again in in a few moments, or try online at https://te4.org/", function() end ) + Dialog:simplePopup(_t"Profile creation failed!", _t"Try again in in a few moments, or try online at https://te4.org/", function() end ) end end end diff --git a/game/engines/default/modules/boot/class/Player.lua b/game/engines/default/modules/boot/class/Player.lua index f943de4c9215ad3d917d3486bbbd10d2402eb789..f2dd0e2b77a36ecbf612303d10790c6669cf6a95 100644 --- a/game/engines/default/modules/boot/class/Player.lua +++ b/game/engines/default/modules/boot/class/Player.lua @@ -110,7 +110,7 @@ function _M:onTalentCooledDown(tid) local t = self:getTalentFromId(tid) local x, y = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(x, y, 30, -0.3, -3.5, ("%s available"):format(t.name:capitalize()), {0,255,00}) + game.flyers:add(x, y, 30, -0.3, -3.5, ("%s available"):tformat(t.name:capitalize()), {0,255,00}) game.log("#00ff00#Talent %s is ready to use.", t.name) end @@ -118,5 +118,5 @@ function _M:levelup() mod.class.NPC.levelup(self) local x, y = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(x, y, 80, 0.5, -2, "LEVEL UP!", {0,255,255}) + game.flyers:add(x, y, 80, 0.5, -2, _t"LEVEL UP!", {0,255,255}) end diff --git a/game/engines/default/modules/boot/data/damage_types.lua b/game/engines/default/modules/boot/data/damage_types.lua index 3252d611e2fae5e2786e3f96a779ceebb6928a9e..3e6f84924b7b7b073f62bac9c17af48fe24c341b 100644 --- a/game/engines/default/modules/boot/data/damage_types.lua +++ b/game/engines/default/modules/boot/data/damage_types.lua @@ -25,7 +25,7 @@ setDefaultProjector(function(src, x, y, type, dam) local sx, sy = game.level.map:getTileToScreen(x, y, true) if target:takeHit(dam, src) then if src == game.player or target == game.player then - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, "Kill!", {255,0,255}) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, _t"Kill!", {255,0,255}) end else if src == game.player then diff --git a/game/engines/default/modules/boot/data/general/npcs/canine.lua b/game/engines/default/modules/boot/data/general/npcs/canine.lua index 788b7fbb8bc48807819886717df6706d667eec70..dc5395d945d8484179de29c5fe0bbbd7832d4be0 100644 --- a/game/engines/default/modules/boot/data/general/npcs/canine.lua +++ b/game/engines/default/modules/boot/data/general/npcs/canine.lua @@ -33,7 +33,7 @@ newEntity{ newEntity{ base = "BASE_NPC_CANINE", name = "wolf", color=colors.UMBER, image="npc/canine_w.png", - desc = [[Lean, mean, and shaggy, it stares at you with hungry eyes.]], + desc = _t[[Lean, mean, and shaggy, it stares at you with hungry eyes.]], rarity = 1, max_life = resolvers.rngavg(40,70), combat_armor = 1, combat_def = 3, @@ -42,7 +42,7 @@ newEntity{ base = "BASE_NPC_CANINE", newEntity{ base = "BASE_NPC_CANINE", name = "white wolf", color=colors.WHITE, image="npc/canine_ww.png", - desc = [[A large and muscled wolf from the northern wastes. Its breath is cold and icy and its fur coated in frost.]], + desc = _t[[A large and muscled wolf from the northern wastes. Its breath is cold and icy and its fur coated in frost.]], rarity = 3, max_life = resolvers.rngavg(70,100), combat_armor = 3, combat_def = 4, @@ -51,7 +51,7 @@ newEntity{ base = "BASE_NPC_CANINE", newEntity{ base = "BASE_NPC_CANINE", name = "warg", color=colors.BLACK, image="npc/canine_warg.png", - desc = [[It is a large wolf with eyes full of cunning.]], + desc = _t[[It is a large wolf with eyes full of cunning.]], rarity = 4, max_life = resolvers.rngavg(60,100), combat_armor = 5, combat_def = 7, @@ -60,7 +60,7 @@ newEntity{ base = "BASE_NPC_CANINE", newEntity{ base = "BASE_NPC_CANINE", name = "fox", color=colors.RED, image="npc/canine_fox.png", - desc = [[The quick brown fox jumps over the lazy dog.]], + desc = _t[[The quick brown fox jumps over the lazy dog.]], rarity = 3, max_life = resolvers.rngavg(40,50), combat_armor = 1, combat_def = 3, diff --git a/game/engines/default/modules/boot/data/general/npcs/troll.lua b/game/engines/default/modules/boot/data/general/npcs/troll.lua index a34e0e2a0b9be4d94582a4a11dedd0c4a4ba9689..d73f627dbf1107ecffe9202320196d7d206aa2c8 100644 --- a/game/engines/default/modules/boot/data/general/npcs/troll.lua +++ b/game/engines/default/modules/boot/data/general/npcs/troll.lua @@ -34,7 +34,7 @@ newEntity{ newEntity{ base = "BASE_NPC_TROLL", name = "forest troll", color=colors.YELLOW_GREEN, image="npc/troll_f.png", - desc = [[Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists.]], + desc = _t[[Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists.]], rarity = 1, max_life = resolvers.rngavg(100,120), combat_armor = 4, combat_def = 0, @@ -42,7 +42,7 @@ newEntity{ base = "BASE_NPC_TROLL", newEntity{ base = "BASE_NPC_TROLL", name = "stone troll", color=colors.DARK_SLATE_GRAY, image="npc/troll_s.png", - desc = [[A giant troll with scabrous black skin. With a shudder, you notice the belt of dwarf skulls around his massive waist.]], + desc = _t[[A giant troll with scabrous black skin. With a shudder, you notice the belt of dwarf skulls around his massive waist.]], rarity = 1, max_life = resolvers.rngavg(120,140), combat_armor = 7, combat_def = 0, @@ -50,7 +50,7 @@ newEntity{ base = "BASE_NPC_TROLL", newEntity{ base = "BASE_NPC_TROLL", name = "cave troll", color=colors.SLATE, image="npc/troll_c.png", - desc = [[This huge troll wields a massive spear and has a disturbingly intelligent look in its piggy eyes.]], + desc = _t[[This huge troll wields a massive spear and has a disturbingly intelligent look in its piggy eyes.]], rarity = 2, max_life = resolvers.rngavg(120,140), combat_armor = 9, combat_def = 3, @@ -58,7 +58,7 @@ newEntity{ base = "BASE_NPC_TROLL", newEntity{ base = "BASE_NPC_TROLL", name = "mountain troll", color=colors.UMBER, image="npc/troll_m.png", - desc = [[A large and athletic troll with an extremely tough and warty hide.]], + desc = _t[[A large and athletic troll with an extremely tough and warty hide.]], rarity = 3, max_life = resolvers.rngavg(120,140), combat_armor = 12, combat_def = 4, @@ -66,7 +66,7 @@ newEntity{ base = "BASE_NPC_TROLL", newEntity{ base = "BASE_NPC_TROLL", name = "mountain troll thunderer", color=colors.AQUAMARINE, image="npc/troll_mt.png", - desc = [[A large and athletic troll with an extremely tough and warty hide.]], + desc = _t[[A large and athletic troll with an extremely tough and warty hide.]], rarity = 5, rank = 3, max_life = resolvers.rngavg(120,140), diff --git a/game/engines/default/modules/boot/data/timed_effects.lua b/game/engines/default/modules/boot/data/timed_effects.lua index 7432305e48fe2c1bff724240d5ab30c8cbf6d360..ee801cd8e1cb08a9c79b372e4e375f6975956bb4 100644 --- a/game/engines/default/modules/boot/data/timed_effects.lua +++ b/game/engines/default/modules/boot/data/timed_effects.lua @@ -22,12 +22,12 @@ local Particles = require "engine.Particles" newEffect{ name = "ACIDBURN", - desc = "Burning from acid", + desc = _t"Burning from acid", type = "physical", status = "detrimental", parameters = { power=1 }, - on_gain = function(self, err) return "#Target# is covered in acid!", "+Acid" end, - on_lose = function(self, err) return "#Target# is free from the acid.", "-Acid" end, + on_gain = function(self, err) return _t"#Target# is covered in acid!", _t"+Acid" end, + on_lose = function(self, err) return _t"#Target# is free from the acid.", _t"-Acid" end, on_timeout = function(self, eff) DamageType:get(DamageType.ACID).projector(eff.src or self, self.x, self.y, DamageType.ACID, eff.power) end, @@ -35,7 +35,7 @@ newEffect{ newEffect{ name = "SUNSHIELD", - desc = "Sunshield", + desc = _t"Sunshield", type = "magical", status = "beneficial", activate = function(self, eff) diff --git a/game/engines/default/modules/boot/data/zones/dungeon/zone.lua b/game/engines/default/modules/boot/data/zones/dungeon/zone.lua index 5fd835d97b214ac92f7974388133a4d7f98c4c42..5a761835cce41611db48d2be86b8f95fd4cc587f 100644 --- a/game/engines/default/modules/boot/data/zones/dungeon/zone.lua +++ b/game/engines/default/modules/boot/data/zones/dungeon/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Forest", + name = _t"Forest", level_range = {1, 5}, level_scheme = "player", max_level = 5, diff --git a/game/engines/default/modules/boot/dialogs/Addons.lua b/game/engines/default/modules/boot/dialogs/Addons.lua index d0b7f5e3c1213f0fd0ad5e097c32c4aa3daa5330..2851c907dedb03b197dab9068146b027afe27228 100644 --- a/game/engines/default/modules/boot/dialogs/Addons.lua +++ b/game/engines/default/modules/boot/dialogs/Addons.lua @@ -29,7 +29,7 @@ local Button = require "engine.ui.Button" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "Configure Addons", game.w * 0.8, game.h * 0.8) + Dialog.init(self, _t"Configure Addons", game.w * 0.8, game.h * 0.8) local webaddonload = function() local method, d = util.browserOpenUrl("https://te4.org/addons/tome", {steam=true}) @@ -40,40 +40,42 @@ function _M:init() if method == "webview" and d then d.unload = function() self:regen() end end end - local url1 = Textzone.new{text="You can get new addons at #LIGHT_BLUE##{underline}#Te4.org Addons#{normal}#", auto_height=true, auto_width=true, fct=webaddonload} - local url2 = Textzone.new{text=" and #LIGHT_BLUE##{underline}#Te4.org DLCs#{normal}#", auto_height=true, auto_width=true, fct=webdlcload} + local url1 = Textzone.new{text=_t"You can get new addons at #LIGHT_BLUE##{underline}#Te4.org Addons#{normal}#", auto_height=true, auto_width=true, fct=webaddonload} + local url2 = Textzone.new{text=_t" and #LIGHT_BLUE##{underline}#Te4.org DLCs#{normal}#", auto_height=true, auto_width=true, fct=webdlcload} local url3 = Textzone.new{text=" ", auto_height=true, auto_width=true, fct=function()end} if core.steam then - url1 = Textzone.new{text="You can get new addons on #LIGHT_BLUE##{underline}#Steam Workshop#{normal}#", auto_height=true, auto_width=true, fct=function() util.browserOpenUrl("http://steamcommunity.com/app/"..core.steam.appid().."/workshop/", {webview=true}) end} - url2 = Textzone.new{text=", #LIGHT_BLUE##{underline}#Te4.org Addons#{normal}#", auto_height=true, auto_width=true, fct=webaddonload} - url3 = Textzone.new{text=" and #LIGHT_BLUE##{underline}#Te4.org DLCs#{normal}#", auto_height=true, auto_width=true, fct=webdlcload} + url1 = Textzone.new{text=_t"You can get new addons on #LIGHT_BLUE##{underline}#Steam Workshop#{normal}#", auto_height=true, auto_width=true, fct=function() util.browserOpenUrl("http://steamcommunity.com/app/"..core.steam.appid().."/workshop/", {webview=true}) end} + url2 = Textzone.new{text=_t", #LIGHT_BLUE##{underline}#Te4.org Addons#{normal}#", auto_height=true, auto_width=true, fct=webaddonload} + url3 = Textzone.new{text=_t" and #LIGHT_BLUE##{underline}#Te4.org DLCs#{normal}#", auto_height=true, auto_width=true, fct=webdlcload} end - self.c_compat = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title="Show incompatible", on_change=function() self:switch() end} - self.c_auto_update = Checkbox.new{default=not config.settings.no_auto_update_addons, width=math.floor(self.iw / 3 - 40), title="Auto-update on start", on_change=function() self:switchAuto() end} + self.c_compat = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title=_t"Show incompatible", on_change=function() self:switch() end} + self.c_auto_update = Checkbox.new{default=not config.settings.no_auto_update_addons, width=math.floor(self.iw / 3 - 40), title=_t"Auto-update on start", on_change=function() self:switchAuto() end} self:generateList() self.c_list = ListColumns.new{width=math.floor(self.iw / 3 - 10), height=self.ih - 10 - self.c_compat.h, scrollbar=true, columns={ - {name="Game Module", width=75, display_prop="name"}, - {name="Version", width=25, display_prop="version_txt"}, + {name=_t"Game Module", width=75, display_prop="name"}, + {name=_t"Version", width=25, display_prop="version_txt"}, }, list=self.list, fct=function(item) end, select=function(item, sel) self:select(item) end} self.c_adds = ListColumns.new{width=math.floor(self.iw * 2 / 3 - 10), height=self.ih - 10 - self.c_compat.h, scrollbar=true, columns={ - {name="Addon", width=50, display_prop="long_name"}, - {name="Active", width=20, display_prop=function(item) + {name=_t"Addon", width=50, display_prop=function(item) + return _t(item.long_name) + end}, + {name=_t"Active", width=20, display_prop=function(item) if item.cheat_only and not config.settings.cheat then - return "#GREY#Developer tool" + return _t"#GREY#Developer tool" elseif item.dlc == "no" then - return "#LIGHT_RED#Donator Status: Disabled" + return _t"#LIGHT_RED#Donator Status: Disabled" elseif config.settings.addons[item.for_module] and config.settings.addons[item.for_module][item.short_name] ~= nil then - return (config.settings.addons[item.for_module][item.short_name] and "#LIGHT_GREEN#Manual: Active" or "#LIGHT_RED#Manual: Disabled"):toTString() + return (config.settings.addons[item.for_module][item.short_name] and _t"#LIGHT_GREEN#Manual: Active" or _t"#LIGHT_RED#Manual: Disabled"):toTString() else - return (item.natural_compatible and "#LIGHT_GREEN#Auto: Active" or "#LIGHT_RED#Auto: Incompatible"):toTString() + return (item.natural_compatible and _t"#LIGHT_GREEN#Auto: Active" or _t"#LIGHT_RED#Auto: Incompatible"):toTString() end end}, - {name="Addon Version", width=15, display_prop="addon_version_txt"}, - {name="Game Version", width=15, display_prop="version_txt"}, + {name=_t"Addon Version", width=15, display_prop="addon_version_txt"}, + {name=_t"Game Version", width=15, display_prop="version_txt"}, }, list={}, fct=function(item) self:switchAddon(item) end, select=function(item, sel) self:select(item) end} local sep = Separator.new{dir="horizontal", size=self.ih - 10} diff --git a/game/engines/default/modules/boot/dialogs/Credits.lua b/game/engines/default/modules/boot/dialogs/Credits.lua index 45006d51250f939b7dd9b7849562ce884821d5d1..bbc84cd98e043bdcc8c357a8f8e0e73798530f9e 100644 --- a/game/engines/default/modules/boot/dialogs/Credits.lua +++ b/game/engines/default/modules/boot/dialogs/Credits.lua @@ -47,17 +47,17 @@ local credits = { {"by"}, {img="/data/gfx/background/netcore-logo.png"}, false, - {"Project Lead", title=1}, + {_t"Project Lead", title=1}, {"Nicolas 'DarkGod' Casalini"}, false, false, - {"Lead Coder", title=2}, + {_t"Lead Coder", title=2}, {"Nicolas 'DarkGod' Casalini"}, false, false, - {"World Builders", title=1}, + {_t"World Builders", title=1}, {"Aaron 'Sage Acrin' Vandegrift"}, {"Alexander '0player' Sedov"}, {"Ben 'Razakai' Pope"}, @@ -78,7 +78,7 @@ local credits = { false, false, - {"Graphic Artists", title=2}, + {_t"Graphic Artists", title=2}, {"Assen 'Rexorcorum' Kanev"}, {"Matt 'Amagad' Hill"}, {"Jeffrey 'Jotwebe' Buschhorn"}, @@ -87,25 +87,25 @@ local credits = { false, false, - {"Expert Shaders Design", title=1}, + {_t"Expert Shaders Design", title=1}, {"Alex 'Suslik' Sannikov"}, false, false, - {"Soundtracks", title=2}, + {_t"Soundtracks", title=2}, {"Anne van Schothorst"}, {"Carlos Saura"}, {"Matti Paalanen - 'Celestial Aeon Project'"}, false, false, - {"Sound Designer", title=1}, + {_t"Sound Designer", title=1}, {"Kenneth 'Elvisman2001' Toomey"}, -- {"Ryan Sim"}, false, false, - {"Lore Creation and Writing", title=2}, + {_t"Lore Creation and Writing", title=2}, {"Burb Lulls"}, {"Darren Grey"}, {"David Mott"}, @@ -115,7 +115,7 @@ local credits = { false, false, - {"Code Helpers", title=1}, + {_t"Code Helpers", title=1}, {"Antagonist"}, {"Bunny"}, {"Graziel"}, @@ -134,7 +134,7 @@ local credits = { false, false, - {"Community Managers", title=2}, + {_t"Community Managers", title=2}, {"Bradley 'AuraOfTheDawn' Kersey"}, {"Faeryan"}, {"Erik 'Lord Xandor' Tillford"}, @@ -147,14 +147,14 @@ local credits = { false, false, - {"Text Editors", title=1}, + {_t"Text Editors", title=1}, {"Brian Jeffears"}, {"Greg Wooledge"}, {"Ralph Versteegen"}, false, false, - {"The Community", title=2}, + {_t"The Community", title=2}, {"A huge global thank to all members"}, {"of the community, for being supportive,"}, {"fun and full of great ideas."}, @@ -162,7 +162,7 @@ local credits = { false, false, - {"Others", title=1}, + {_t"Others", title=1}, {"J.R.R Tolkien - making the world an interesting place"}, {"Lua Creators - making the world a better place"}, {"Lua - http://lua.org/"}, diff --git a/game/engines/default/modules/boot/dialogs/FirstRun.lua b/game/engines/default/modules/boot/dialogs/FirstRun.lua index b87d2f0c7630774fc7c411782f0cfe1e16f46c29..611cd8e5f99aeebbbe76adfee2622ea5a81232e1 100644 --- a/game/engines/default/modules/boot/dialogs/FirstRun.lua +++ b/game/engines/default/modules/boot/dialogs/FirstRun.lua @@ -28,14 +28,14 @@ local Button = require "engine.ui.Button" module(..., package.seeall, class.inherit(Dialog)) function _M:init(text) - Dialog.init(self, "Welcome to Tales of Maj'Eyal", math.min(800, game.w * 0.9), 200) + Dialog.init(self, _t"Welcome to Tales of Maj'Eyal", math.min(800, game.w * 0.9), 200) local c_desc = Textzone.new{width=self.iw, auto_height=true, text=text} - local c_register = Button.new{text="Register now!", fct=function() self:doRegister() end} - local c_login = Button.new{text="Login existing account", fct=function() self:doLogin() end} - local c_later = Button.new{text="Maybe later", fct=function() self:doLater() end} - local c_disable = Button.new{text="#RED#Disable all online features", fct=function() self:doDisable() end} + local c_register = Button.new{text=_t"Register now!", fct=function() self:doRegister() end} + local c_login = Button.new{text=_t"Login existing account", fct=function() self:doLogin() end} + local c_later = Button.new{text=_t"Maybe later", fct=function() self:doLater() end} + local c_disable = Button.new{text=_t"#RED#Disable all online features", fct=function() self:doDisable() end} self:loadUI{ {left=0, top=0, ui=c_desc}, @@ -48,7 +48,7 @@ function _M:init(text) end function _M:doDisable() - Dialog:yesnoLongPopup("Disable all connectivity", [[You are about to disable all connectivity to the network. + Dialog:yesnoLongPopup(_t"Disable all connectivity", _t[[You are about to disable all connectivity to the network. This includes, but is not limited to: - Player profiles: You will not be able to login, register - Characters vault: You will not be able to upload any character to the online vault to show your glory @@ -67,7 +67,7 @@ If you disable this option you can always re-activate it in the Online category game:saveSettings("disable_all_connectivity", ("disable_all_connectivity = true\n")) game:saveSettings("firstrun_gdpr", ("firstrun_gdpr = true\n")) util.showMainMenu() - end end, "Cancel", "#RED#Disable all!", true) + end end, _t"Cancel", _t"#RED#Disable all!", true) end function _M:doLater() diff --git a/game/engines/default/modules/boot/dialogs/LoadGame.lua b/game/engines/default/modules/boot/dialogs/LoadGame.lua index 87fb34a65492769aa219636dcdd4b726386fa3f0..8f50d6fdc7a25a7f25b56df6fa8bb9c0c5962c13 100644 --- a/game/engines/default/modules/boot/dialogs/LoadGame.lua +++ b/game/engines/default/modules/boot/dialogs/LoadGame.lua @@ -31,12 +31,12 @@ local Downloader = require "engine.dialogs.Downloader" module(..., package.seeall, class.inherit(Dialog)) function _M:init(force_compat) - Dialog.init(self, "Load Game", game.w * 0.8, game.h * 0.8) + Dialog.init(self, _t"Load Game", game.w * 0.8, game.h * 0.8) - self.c_compat = Checkbox.new{default=force_compat, width=math.floor(self.iw / 3 - 40), title="Show older versions", on_change=function() self:switch() end} - self.c_force_addons = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title="Ignore unloadable addons"} - self.c_play = Button.new{text=" Play! ", fct=function(text) self:playSave() end} - self.c_delete = Button.new{text="Delete", fct=function(text) self:deleteSave() end} + self.c_compat = Checkbox.new{default=force_compat, width=math.floor(self.iw / 3 - 40), title=_t"Show older versions", on_change=function() self:switch() end} + self.c_force_addons = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title=_t"Ignore unloadable addons"} + self.c_play = Button.new{text=_t" Play! ", fct=function(text) self:playSave() end} + self.c_delete = Button.new{text=_t"Delete", fct=function(text) self:deleteSave() end} self.c_desc = Textzone.new{width=math.floor(self.iw / 3 * 2 - 10), height=self.ih - self.c_delete.h - 10, text=""} self:generateList() @@ -115,7 +115,7 @@ function _M:generateList() save.zone = Textzone.new{ width=self.c_desc.w, height=self.c_desc.h, - text=("#{bold}##GOLD#%s: %s#WHITE##{normal}#\nGame version: %d.%d.%d\nRequires addons: %s\n\n%s"):format(mod.long_name, save.name, save.module_version and save.module_version[1] or -1, save.module_version and save.module_version[2] or -1, save.module_version and save.module_version[3] or -1, save.addons and table.concat(addons, ", ") or "none", save.description) + text=("#{bold}##GOLD#%s: %s#WHITE##{normal}#\nGame version: %d.%d.%d\nRequires addons: %s\n\n%s"):tformat(mod.long_name, save.name, save.module_version and save.module_version[1] or -1, save.module_version and save.module_version[2] or -1, save.module_version and save.module_version[3] or -1, save.addons and table.concat(addons, ", ") or "none", save.description) } if save.screenshot then local w, h = save.screenshot:getSize() @@ -178,40 +178,26 @@ end function _M:playSave(ignore_mod_compat) if not self.save_sel then return end - if self.save_sel.module == "tome" and engine.version_compare(self.save_sel.module_version, {1, 2, 0}) == "lower" then - Dialog:yesnoLongPopup("Incompatible savefile", [[Due to huge changes in 1.2.0 all previous savefiles will not work with it. -This savefile requires a game version lower than 1.2.0 and thus can not be loaded. - -But despair not, if you wish to finish it you can simply download the old version corresponding to the savefile on #{italic}##LIGHT_BLUE#https://te4.org/download#WHITE##{normal}#. - -We apologize for the annoyance, most of the time we try to keep compatibility but this once it was simply not possible.]], - 700, function(ret) if ret then - util.browserOpenUrl("https://te4.org/download", {webview=true, steam=true}) - end end, "Go to download in your browser", "Cancel" - ) - return - end - local save_v = engine.version_from_string(self.save_sel.module_string) local save_m = engine.version_from_string(self.save_sel.mod.version_string) if not ignore_mod_compat and not engine.version_patch_same(save_m, save_v) and save_m.name == save_v.name then - local howgrabold = "You can simply grab an older version of the game from where you downloaded it." + local howgrabold = _t"You can simply grab an older version of the game from where you downloaded it." if core.steam then - howgrabold = [[You can downgrade the version by selecting it in the Steam's "Beta" properties of the game.]] + howgrabold = _t[[You can downgrade the version by selecting it in the Steam's "Beta" properties of the game.]] end - Dialog:yesnoLongPopup("Original game version not found", ("This savefile was created with game version %s. You can try loading it with the current version if you wish but it is recommended you play it with the old version to ensure compatibility\n%s"):format(self.save_sel.module_string, howgrabold), 500, function(ret) + Dialog:yesnoLongPopup(_t"Original game version not found", ("This savefile was created with game version %s. You can try loading it with the current version if you wish but it is recommended you play it with the old version to ensure compatibility\n%s"):tformat(self.save_sel.module_string, howgrabold), 500, function(ret) if ret then else self:playSave(true) end - end, "Cancel", "Run with newer version", true) + end, _t"Cancel", _t"Run with newer version", true) return end if config.settings.cheat and not self.save_sel.cheat then - Dialog:yesnoPopup("Developer Mode", "#LIGHT_RED#WARNING: #LAST#Loading a savefile while in developer mode will permanently invalidate it. Proceed?", function(ret) if not ret then + Dialog:yesnoPopup(_t"Developer Mode", _t"#LIGHT_RED#WARNING: #LAST#Loading a savefile while in developer mode will permanently invalidate it. Proceed?", function(ret) if not ret then Module:instanciate(self.save_sel.mod, self.save_sel.base_name, false) - end end, "Cancel", "Load anyway", true) + end end, _t"Cancel", _t"Load anyway", true) else local extra_info = nil if self.c_force_addons.checked then extra_info = "ignore_addons_not_loading=true" end @@ -222,7 +208,7 @@ end function _M:deleteSave() if not self.save_sel then return end - Dialog:yesnoPopup("Delete savefile", "Really delete #{bold}##GOLD#"..self.cur_sel.name.."#WHITE##{normal}#", function(ret) + Dialog:yesnoPopup(_t"Delete savefile", ("Really delete #{bold}##GOLD#%s#WHITE##{normal}#"):tformat(self.cur_sel.name), function(ret) if ret then local base = Module:setupWrite(self.save_sel.mod) local save = Savefile.new(self.save_sel.base_name) @@ -236,7 +222,7 @@ function _M:deleteSave() d.__showup = false game:replaceDialog(self, d) end - end, "Delete", "Cancel") + end, _t"Delete", _t"Cancel") end function _M:installOldGame(version_string) @@ -260,7 +246,7 @@ function _M:installOldGame(version_string) end if #dls == 0 then - Dialog:simplePopup("Old game data", "No data available for this game version.") + Dialog:simplePopup(_t"Old game data", _t"No data available for this game version.") return end @@ -269,7 +255,7 @@ function _M:installOldGame(version_string) for i, dl in ipairs(dls) do local modfile = "/modules/"..dl.name print("[OLD MODULE] download file from", dl.url, "to", modfile) - local d = Downloader.new{title="Downloading old game data: #LIGHT_GREEN#"..dl.name, co=co, dest=modfile..".tmp", url=dl.url, allow_downloads={modules=true}} + local d = Downloader.new{title=_t"Downloading old game data: #LIGHT_GREEN#"..dl.name, co=co, dest=modfile..".tmp", url=dl.url, allow_downloads={modules=true}} local ok = d:start() if ok then local wdir = fs.getWritePath() @@ -283,8 +269,8 @@ function _M:installOldGame(version_string) else all_ok = false end end - if all_ok then Dialog:simplePopup("Old game data", "Old game data for "..version_string.." correctly installed. You can now play.") self:regen() - else Dialog:simplePopup("Old game data", "Failed to install.") end + if all_ok then Dialog:simplePopup(_t"Old game data", ("Old game data for %s correctly installed. You can now play."):tformat(version_string)) self:regen() + else Dialog:simplePopup(_t"Old game data", _t"Failed to install.") end end) print(coroutine.resume(co)) end diff --git a/game/engines/default/modules/boot/dialogs/MainMenu.lua b/game/engines/default/modules/boot/dialogs/MainMenu.lua index ee6e9ca98eef0cc6af78be580a6a14f94c3298fc..94ecb19beef9478cfa3867bba7eb8ae3b3ac4329 100644 --- a/game/engines/default/modules/boot/dialogs/MainMenu.lua +++ b/game/engines/default/modules/boot/dialogs/MainMenu.lua @@ -34,25 +34,21 @@ local Module = require "engine.Module" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "Main Menu", 250, 400, 450, 50) + Dialog.init(self, _t"Main Menu", 250, 400, 450, 50) self.__showup = false self.__main_menu = true self.absolute = true local l = {} self.list = l - l[#l+1] = {name="New Game", fct=function() game:registerDialog(require("mod.dialogs.NewGame").new()) end} - l[#l+1] = {name="Load Game", fct=function() game:registerDialog(require("mod.dialogs.LoadGame").new()) end} --- l[#l+1] = {name="Online Profile", fct=function() game:registerDialog(require("mod.dialogs.Profile").new()) end} - -- l[#l+1] = {name="View High Scores", fct=function() game:registerDialog(require("mod.dialogs.ViewHighScores").new()) end} - l[#l+1] = {name="Addons", fct=function() game:registerDialog(require("mod.dialogs.Addons").new()) end} --- if config.settings.install_remote then l[#l+1] = {name="Install Module", fct=function() end} end --- l[#l+1] = {name="Update", fct=function() game:registerDialog(require("mod.dialogs.UpdateAll").new()) end} - l[#l+1] = {name="Options", fct=function() + l[#l+1] = {name=_t"New Game", fct=function() game:registerDialog(require("mod.dialogs.NewGame").new()) end} + l[#l+1] = {name=_t"Load Game", fct=function() game:registerDialog(require("mod.dialogs.LoadGame").new()) end} + l[#l+1] = {name=_t"Addons", fct=function() game:registerDialog(require("mod.dialogs.Addons").new()) end} + l[#l+1] = {name=_t"Options", fct=function() local list = { "resume", "keybinds_all", - {"Game Options", function() + {_t"Game Options", function() -- OMFG this is such a nasty hack, I'm nearly pround of it ! local mod = Module:listModules().tome if not mod then return end @@ -76,15 +72,15 @@ function _M:init() local menu = require("engine.dialogs.GameMenu").new(list) game:registerDialog(menu) end} - l[#l+1] = {name="Credits", fct=function() game:registerDialog(require("mod.dialogs.Credits").new()) end} - l[#l+1] = {name="Exit", fct=function() game:onQuit() end} - if config.settings.cheat then l[#l+1] = {name="Reboot", fct=function() util.showMainMenu() end} end + l[#l+1] = {name=_t"Credits", fct=function() game:registerDialog(require("mod.dialogs.Credits").new()) end} + l[#l+1] = {name=_t"Exit", fct=function() game:onQuit() end} + if config.settings.cheat then l[#l+1] = {name=_t"Reboot", fct=function() util.showMainMenu() end} end -- if config.settings.cheat then l[#l+1] = {name="webtest", fct=function() util.browserOpenUrl("http://google.com") end} end -- if config.settings.cheat then l[#l+1] = {name="webtest", fct=function() util.browserOpenUrl("asset://te4/html/test.html") end} end - self.c_background = Checkbox.new{title="Disable animated background", default=config.settings.boot_menu_background and true or false, on_change=function() self:switchBackground() end} + self.c_background = Checkbox.new{title=_t"Disable animated background", default=config.settings.boot_menu_background and true or false, on_change=function() self:switchBackground() end} -- self.c_background = Button.new{text=game.stopped and "Enable background" or "Disable background", fct=function() self:switchBackground() end} - self.c_version = Textzone.new{font={FontPackage:getFont("default"), 10}, auto_width=true, auto_height=true, text=("#{bold}##B9E100#T-Engine4 version: %d.%d.%d"):format(engine.version[1], engine.version[2], engine.version[3])} + self.c_version = Textzone.new{font={FontPackage:getFont("default"), 10}, auto_width=true, auto_height=true, text=("#{bold}##B9E100#T-Engine4 version: %d.%d.%d"):tformat(engine.version[1], engine.version[2], engine.version[3])} self.c_list = List.new{width=self.iw, nb_items=#self.list, list=self.list, fct=function(item) end, font={FontPackage:getFont("default")}} @@ -135,7 +131,7 @@ function _M:setupDLCButtons() self.c_dlc_ashes.on_focus_change = function(self, v) if v then game:floatingTooltip(self.last_display_x, self.last_display_y, "top", { Image.new{file="dlcs-icons/ashes-banner.png", width=467, height=181}, -[[#{bold}##GOLD#Ashes of Urh'Rok - Expansion#LAST##{normal}# +_t[[#{bold}##GOLD#Ashes of Urh'Rok - Expansion#LAST##{normal}# #{italic}##ANTIQUE_WHITE#Many in Maj'Eyal have heard of "demons", sadistic creatures who appear seemingly from nowhere, leaving a trail of suffering and destruction wherever they go.#{normal}##LAST# #{bold}#Features#{normal}#: @@ -144,14 +140,14 @@ function _M:setupDLCButtons() #LIGHT_UMBER#New race:#WHITE# Doomelves. Shalore who've taken to the demonic alterations especially well, corrupting their typical abilities into a darker form. #LIGHT_UMBER#New artifacts, lore, zones, events...#WHITE# For your demonic delight! -]]..(has_ashes and "\n#LIGHT_GREEN#Installed" or "#YELLOW#Not installed - Click to download / purchase")}) +]]..(has_ashes and _t"#LIGHT_GREEN#Installed" or _t"#YELLOW#Not installed - Click to download / purchase")}) else game:floatingTooltip(nil) end end self.c_dlc_embers.on_focus_change = function(self, v) if v then game:floatingTooltip(self.last_display_x, self.last_display_y, "top", { Image.new{file="dlcs-icons/embers-banner.png", width=467, height=181}, -[[#{bold}##GOLD#Embers of Rage - Expansion#LAST##{normal}# +_t[[#{bold}##GOLD#Embers of Rage - Expansion#LAST##{normal}# #{italic}##ANTIQUE_WHITE#One year has passed since the one the Orcs call the "Scourge from the West" came and single-handedly crushed the Orc Prides of Grushnak, Vor, Gorbat, and Rak'Shor. The Allied Kingdoms, now linked by farportal to their distant, long-lost Sunwall allies, have helped them conquer most of Var'Eyal. The few remnants of the ravaged Prides are caged... but one Pride remains.#{normal}##LAST# #{bold}#Features#{normal}#: @@ -162,14 +158,14 @@ function _M:setupDLCButtons() #LIGHT_UMBER#Salves:#WHITE# Bound to the tinker system, create powerful medical salves to inject into your skin, replacing the infusions§runes system. #LIGHT_UMBER#A ton#WHITE# of artifacts, lore, zones, events... -]]..(has_embers and "\n#LIGHT_GREEN#Installed" or "#YELLOW#Not installed - Click to download / purchase")}) +]]..(has_embers and _t"#LIGHT_GREEN#Installed" or _t"#YELLOW#Not installed - Click to download / purchase")}) else game:floatingTooltip(nil) end end self.c_dlc_cults.on_focus_change = function(self, v) if v then game:floatingTooltip(self.last_display_x, self.last_display_y, "top", { Image.new{file="dlcs-icons/cults-banner.png", width=467, height=181}, -[[#{bold}##GOLD#Forgotten Cults - Expansion#LAST##{normal}# +_t[[#{bold}##GOLD#Forgotten Cults - Expansion#LAST##{normal}# #{italic}##ANTIQUE_WHITE#Not all adventurers seek fortune, not all that defend the world have good deeds in mind. Lately the number of sightings of horrors have grown tremendously. People wander off the beaten paths only to be found years later, horribly mutated and partly insane, if they are found at all. It is becoming evident something is stirring deep below Maj'Eyal. That something is you.#{normal}##LAST# #{bold}#Features#{normal}#: @@ -182,7 +178,7 @@ function _M:setupDLCButtons() #LIGHT_UMBER#Sick of your own head:#WHITE# Replace it with a nice cozy horror! #LIGHT_UMBER#A ton#WHITE# of artifacts, lore, events... -]]..(has_cults and "\n#LIGHT_GREEN#Installed" or "#YELLOW#Not installed - Click to download / purchase")}) +]]..(has_cults and _t"#LIGHT_GREEN#Installed" or _t"#YELLOW#Not installed - Click to download / purchase")}) else game:floatingTooltip(nil) end end @@ -228,11 +224,11 @@ end function _M:uiLogin(uis) if core.steam then return self:uiLoginSteam(uis) end - local str = Textzone.new{auto_width=true, auto_height=true, text="#GOLD#Online Profile"} - local bt = Button.new{text="Login", width=50, fct=function() self:login() end} - local btr = Button.new{text="Register", fct=function() self:register() end} - self.c_login = Textbox.new{title="Username: ", text="", chars=16, max_len=200, fct=function(text) self:login() end} - self.c_pass = Textbox.new{title="Password: ", size_title=self.c_login.title, text="", chars=16, max_len=200, hide=true, fct=function(text) self:login() end} + local str = Textzone.new{auto_width=true, auto_height=true, text=_t"#GOLD#Online Profile"} + local bt = Button.new{text=_t"Login", width=50, fct=function() self:login() end} + local btr = Button.new{text=_t"Register", fct=function() self:register() end} + self.c_login = Textbox.new{title=_t"Username: ", text="", chars=16, max_len=200, fct=function(text) self:login() end} + self.c_pass = Textbox.new{title=_t"Password: ", size_title=self.c_login.title, text="", chars=16, max_len=200, hide=true, fct=function(text) self:login() end} uis[#uis+1] = {left=10, bottom=bt.h + self.c_login.h + self.c_pass.h + str.h, ui=Separator.new{dir="vertical", size=self.iw - 20}} uis[#uis+1] = {hcenter=0, bottom=bt.h + self.c_login.h + self.c_pass.h, ui=str} @@ -243,8 +239,8 @@ function _M:uiLogin(uis) end function _M:uiLoginSteam(uis) - local str = Textzone.new{auto_width=true, auto_height=true, text="#GOLD#Online Profile"} - local bt = Button.new{text="Login with Steam", fct=function() self:loginSteam() end} + local str = Textzone.new{auto_width=true, auto_height=true, text=_t"#GOLD#Online Profile"} + local bt = Button.new{text=_t"Login with Steam", fct=function() self:loginSteam() end} uis[#uis+1] = {left=10, bottom=bt.h + str.h, ui=Separator.new{dir="vertical", size=self.iw - 20}} uis[#uis+1] = {hcenter=0, bottom=bt.h, ui=str} @@ -253,10 +249,10 @@ end function _M:uiStats(uis) self.logged_url = "https://te4.org/users/"..profile.auth.page - local str1 = Textzone.new{auto_width=true, auto_height=true, text="#GOLD#Online Profile#WHITE#"} - local str2 = Textzone.new{auto_width=true, auto_height=true, text="#LIGHT_BLUE##{underline}#"..self.logged_url.."#LAST##{normal}#", fct=function() util.browserOpenUrl(self.logged_url, {is_external=true}) end} + local str1 = Textzone.new{auto_width=true, auto_height=true, text=_t"#GOLD#Online Profile#WHITE#"} + local str2 = Textzone.new{auto_width=true, auto_height=true, text=("#LIGHT_BLUE##{underline}#%s#LAST##{normal}#"):tformat(self.logged_url), fct=function() util.browserOpenUrl(self.logged_url, {is_external=true}) end} - local logoff = Textzone.new{text="#LIGHT_BLUE##{underline}#Logout", auto_height=true, width=50, fct=function() self:logout() end} + local logoff = Textzone.new{text=_t"#LIGHT_BLUE##{underline}#Logout", auto_height=true, width=50, fct=function() self:logout() end} uis[#uis+1] = {left=10, bottom=logoff.h + str2.h + str1.h, ui=Separator.new{dir="vertical", size=self.iw - 20}} uis[#uis+1] = {hcenter=0, bottom=logoff.h + str2.h, ui=str1} @@ -266,22 +262,22 @@ end function _M:login() if self.c_login.text:len() < 2 then - Dialog:simplePopup("Username", "Your username is too short") + Dialog:simplePopup(_t"Username", _t"Your username is too short") return end if self.c_pass.text:len() < 4 then - Dialog:simplePopup("Password", "Your password is too short") + Dialog:simplePopup(_t"Password", _t"Your password is too short") return end game:createProfile({create=false, login=self.c_login.text, pass=self.c_pass.text}) end function _M:loginSteam() - local d = self:simpleWaiter("Login...", "Login in your account, please wait...") core.display.forceRedraw() - d:timeout(10, function() Dialog:simplePopup("Steam", "Steam client not found.") end) + local d = self:simpleWaiter(_t"Login...", _t"Login in your account, please wait...") core.display.forceRedraw() + d:timeout(10, function() Dialog:simplePopup("Steam", _t"Steam client not found.") end) core.steam.sessionTicket(function(ticket) if not ticket then - Dialog:simplePopup("Steam", "Steam client not found.") + Dialog:simplePopup("Steam", _t"Steam client not found.") d:done() return end diff --git a/game/engines/default/modules/boot/dialogs/NewGame.lua b/game/engines/default/modules/boot/dialogs/NewGame.lua index 6c809bb6d7be76cd9b472bf711d0952dc34799da..038c0d623c019b193a1a34ac30cc406fade31241 100644 --- a/game/engines/default/modules/boot/dialogs/NewGame.lua +++ b/game/engines/default/modules/boot/dialogs/NewGame.lua @@ -29,20 +29,20 @@ local Button = require "engine.ui.Button" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "New Game", game.w * 0.8, game.h * 0.8) + Dialog.init(self, _t"New Game", game.w * 0.8, game.h * 0.8) self.c_desc = Textzone.new{width=math.floor(self.iw / 3 * 2 - 10), height=self.ih, text=""} - self.c_switch = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title="Show all versions", on_change=function() self:switch() end} - self.c_compat = Checkbox.new{default=true, width=math.floor(self.iw / 3 - 40), title="Show incompatible", on_change=function() self:switch() end} + self.c_switch = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title=_t"Show all versions", on_change=function() self:switch() end} + self.c_compat = Checkbox.new{default=true, width=math.floor(self.iw / 3 - 40), title=_t"Show incompatible", on_change=function() self:switch() end} - local url = Textzone.new{text="You can get new games at\n#LIGHT_BLUE##{underline}#https://te4.org/games#{normal}#", auto_height=true, auto_width=true, fct=function() util.browserOpenUrl("https://te4.org/games") end} + local url = Textzone.new{text=_t"You can get new games at\n#LIGHT_BLUE##{underline}#https://te4.org/games#{normal}#", auto_height=true, auto_width=true, fct=function() util.browserOpenUrl("https://te4.org/games") end} self:generateList() self.c_list = ListColumns.new{width=math.floor(self.iw / 3 - 10), height=self.ih - 10 - self.c_switch.h - self.c_compat.h - url.h, scrollbar=true, columns={ - {name="Game Module", width=80, display_prop="name"}, - {name="Version", width=20, display_prop="version_txt"}, + {name=_t"Game Module", width=80, display_prop="name"}, + {name=_t"Version", width=20, display_prop="version_txt"}, }, list=self.list, fct=function(item) end, select=function(item, sel) self:select(item) end} local sep = Separator.new{dir="horizontal", size=self.ih - 10} @@ -90,12 +90,12 @@ function _M:generateList() if mod.no_get_name then Module:instanciate(mod, "player", true, false) else - game:registerDialog(require('engine.dialogs.GetText').new("Enter your character's name", "Name", 2, 25, function(text) + game:registerDialog(require('engine.dialogs.GetText').new(_t"Enter your character's name", "Name", 2, 25, function(text) local savename = text:gsub("[^a-zA-Z0-9_-.]", "_") if fs.exists(("/%s/save/%s/game.teag"):format(mod.short_name, savename)) then - Dialog:yesnoPopup("Overwrite character?", "There is already a character with this name, do you want to overwrite it?", function(ret) + Dialog:yesnoPopup(_t"Overwrite character?", _t"There is already a character with this name, do you want to overwrite it?", function(ret) if not ret then Module:instanciate(mod, text, true) end - end, "No", "Yes") + end, _t"No", _t"Yes") else Module:instanciate(mod, text, true) end @@ -103,10 +103,10 @@ function _M:generateList() end end mod.version_txt = ("%d.%d.%d"):format(mod.version[1], mod.version[2], mod.version[3]) - local tstr = tstring{{"font","bold"}, {"color","GOLD"}, mod.long_name, true, true} - if mod.incompatible then tstr:add({"font","bold"}, {"color","LIGHT_RED"}, "This game is not compatible with your version of T-Engine, you can still try it but it might break.", true, true) end + local tstr = tstring{{"font","bold"}, {"color","GOLD"}, _t(mod.long_name), true, true} + if mod.incompatible then tstr:add({"font","bold"}, {"color","LIGHT_RED"}, _t"This game is not compatible with your version of T-Engine, you can still try it but it might break.", true, true) end tstr:add({"font","normal"}, {"color","WHITE"}) - tstr:merge(mod.description:toTString()) + tstr:merge(_t(mod.description):toTString()) mod.zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=tstr} if self.c_compat.checked or not mod.incompatible then diff --git a/game/engines/default/modules/boot/dialogs/Profile.lua b/game/engines/default/modules/boot/dialogs/Profile.lua index f9c197c3a836cf488755d04d429b549c105c8cda..21f52c229431395a75f61a6802031ff6ff25eb45 100644 --- a/game/engines/default/modules/boot/dialogs/Profile.lua +++ b/game/engines/default/modules/boot/dialogs/Profile.lua @@ -27,28 +27,28 @@ local Separator = require "engine.ui.Separator" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "Player Profile", 400, 200) + Dialog.init(self, _t"Player Profile", 400, 200) self.c_desc = Textzone.new{width=300, height=self.ih, text=""} self.list = {} if profile.auth then - self.list[#self.list+1] = {name="Logout", fct=function() - Dialog:yesnoPopup("You are logged in", "Do you want to log out?", function(ret) + self.list[#self.list+1] = {name=_t"Logout", fct=function() + Dialog:yesnoPopup(_t"You are logged in", _t"Do you want to log out?", function(ret) if ret then profile:logOut() end - end, "Log out", "Cancel") + end, _t"Log out", _t"Cancel") end} else - self.list[#self.list+1] = {name="Login", fct=function() + self.list[#self.list+1] = {name=_t"Login", fct=function() local dialogdef = {} dialogdef.fct = function(login) self:setPlayerLogin(login) end dialogdef.name = "login" dialogdef.justlogin = true game:registerDialog(require('mod.dialogs.ProfileLogin').new(dialogdef, game.profile_help_text)) end} - self.list[#self.list+1] = {name="Create Account", fct=function() + self.list[#self.list+1] = {name=_t"Create Account", fct=function() local dialogdef = {} dialogdef.fct = function(login) self:setPlayerLogin(login) end dialogdef.name = "creation" diff --git a/game/engines/default/modules/boot/dialogs/ProfileLogin.lua b/game/engines/default/modules/boot/dialogs/ProfileLogin.lua index 73a18595ffd56fbd9b7ab74d1969de8b60ba3a3d..e0851065ce6563b33ddcfa6495309a28e7021e5a 100644 --- a/game/engines/default/modules/boot/dialogs/ProfileLogin.lua +++ b/game/engines/default/modules/boot/dialogs/ProfileLogin.lua @@ -27,7 +27,7 @@ local Textzone = require "engine.ui.Textzone" module(..., package.seeall, class.inherit(Dialog)) function _M:init(dialogdef, profile_help_text) - Dialog.init(self, "Online profile "..dialogdef.name, math.min(800, game.w * 0.9), 400) + Dialog.init(self, _t"Online profile "..dialogdef.name, math.min(800, game.w * 0.9), 400) self.profile_help_text = profile_help_text self.dialogdef = dialogdef self.alpha = 230 @@ -46,10 +46,10 @@ function _M:init(dialogdef, profile_help_text) end if self.justlogin then - self.c_login = Textbox.new{title="Username: ", text="", chars=30, max_len=200, fct=function(text) self:okclick() end} - self.c_pass = Textbox.new{title="Password: ", text="", chars=30, max_len=200, hide=true, fct=function(text) self:okclick() end} - local ok = require("engine.ui.Button").new{text="Login", fct=function() self:okclick() end} - local cancel = require("engine.ui.Button").new{text="Cancel", fct=function() self:cancelclick() end} + self.c_login = Textbox.new{title=_t"Username: ", text="", chars=30, max_len=200, fct=function(text) self:okclick() end} + self.c_pass = Textbox.new{title=_t"Password: ", text="", chars=30, max_len=200, hide=true, fct=function(text) self:okclick() end} + local ok = require("engine.ui.Button").new{text=_t"Login", fct=function() self:okclick() end} + local cancel = require("engine.ui.Button").new{text=_t"Cancel", fct=function() self:cancelclick() end} self:loadUI{ {left=0, top=0, ui=self.c_desc}, @@ -60,16 +60,16 @@ function _M:init(dialogdef, profile_help_text) } self:setFocus(self.c_login) else - local pwa = "Password again: " - self.c_login = Textbox.new{title="Username: ", size_title=pwa, text="", chars=30, max_len=20, filter=login_filter, fct=function(text) self:okclick() end} - self.c_pass = Textbox.new{title="Password: ", size_title=pwa, text="", chars=30, max_len=40, hide=true, filter=pass_filter, fct=function(text) self:okclick() end} + local pwa = _t"Password again: " + self.c_login = Textbox.new{title=_t"Username: ", size_title=pwa, text="", chars=30, max_len=20, filter=login_filter, fct=function(text) self:okclick() end} + self.c_pass = Textbox.new{title=_t"Password: ", size_title=pwa, text="", chars=30, max_len=40, hide=true, filter=pass_filter, fct=function(text) self:okclick() end} self.c_pass2 = Textbox.new{title=pwa, text="", size_title=pwa, chars=30, max_len=40, hide=true, filter=pass_filter, fct=function(text) self:okclick() end} - self.c_email = Textbox.new{title="Email: ", size_title=pwa, text="", chars=30, max_len=80, filter=pass_filter, fct=function(text) self:okclick() end} - self.c_news = Checkbox.new{title="Accept to receive #{bold}#very infrequent#{normal}# (a few per year) mails about important game events from us.", default=false, fct=function() self:okclick() end} - self.c_age = Checkbox.new{title="You at least 16 years old, or have parental authorization to play the game.", default=false, fct=function() self:okclick() end} - local ok = require("engine.ui.Button").new{text="Create", fct=function() self:okclick() end} - local privacy = require("engine.ui.Button").new{text="Privacy Policy (opens in browser)", fct=function() self:privacypolicy() end} - local cancel = require("engine.ui.Button").new{text="Cancel", fct=function() self:cancelclick() end} + self.c_email = Textbox.new{title=_t"Email: ", size_title=pwa, text="", chars=30, max_len=80, filter=pass_filter, fct=function(text) self:okclick() end} + self.c_news = Checkbox.new{title=_t"Accept to receive #{bold}#very infrequent#{normal}# (a few per year) mails about important game events from us.", default=false, fct=function() self:okclick() end} + self.c_age = Checkbox.new{title=_t"You at least 16 years old, or have parental authorization to play the game.", default=false, fct=function() self:okclick() end} + local ok = require("engine.ui.Button").new{text=_t"Create", fct=function() self:okclick() end} + local privacy = require("engine.ui.Button").new{text=_t"Privacy Policy (opens in browser)", fct=function() self:privacypolicy() end} + local cancel = require("engine.ui.Button").new{text=_t"Cancel", fct=function() self:cancelclick() end} self:loadUI{ {left=0, top=0, ui=self.c_desc}, @@ -95,23 +95,23 @@ end function _M:okclick() if self.c_pass2 and self.c_pass.text ~= self.c_pass2.text then - self:simplePopup("Password", "Password mismatch!") + self:simplePopup(_t"Password", _t"Password mismatch!") return end if self.c_login.text:len() < 2 then - self:simplePopup("Username", "Your username is too short") + self:simplePopup(_t"Username", _t"Your username is too short") return end if self.c_pass.text:len() < 4 then - self:simplePopup("Password", "Your password is too short") + self:simplePopup(_t"Password", _t"Your password is too short") return end if self.c_email and (self.c_email.text:len() < 6 or not self.c_email.text:find("@")) then - self:simplePopup("Email", "Your email seems invalid") + self:simplePopup(_t"Email", _t"Your email seems invalid") return end if not self.c_age.checked then - self:simplePopup("Age Check", "You need to be 16 years old or more or to have parental authorization to play this game.") + self:simplePopup(_t"Age Check", _t"You need to be 16 years old or more or to have parental authorization to play this game.") return end diff --git a/game/engines/default/modules/boot/dialogs/ProfileSteamRegister.lua b/game/engines/default/modules/boot/dialogs/ProfileSteamRegister.lua index 4269e189d98b2a3638fa1371848afe8bbb981147..a628ca2365a1b82f50aa688b635bed207f357f99 100644 --- a/game/engines/default/modules/boot/dialogs/ProfileSteamRegister.lua +++ b/game/engines/default/modules/boot/dialogs/ProfileSteamRegister.lua @@ -27,10 +27,10 @@ local Textzone = require "engine.ui.Textzone" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "Steam User Account", math.min(800, game.w * 0.9), 400) + Dialog.init(self, _t"Steam User Account", math.min(800, game.w * 0.9), 400) self.alpha = 230 - self.c_desc = Textzone.new{width=math.floor(self.iw - 10), auto_height=true, text=[[Welcome to #GOLD#Tales of Maj'Eyal#LAST#. + self.c_desc = Textzone.new{width=math.floor(self.iw - 10), auto_height=true, text=_t[[Welcome to #GOLD#Tales of Maj'Eyal#LAST#. To enjoy all the features the game has to offer it is #{bold}#highly#{normal}# recommended that you register your steam account. Luckily this is very easy to do: you only require a profile name and optionally an email (we send very few email, maybe two a year at most). ]]} @@ -41,13 +41,13 @@ Luckily this is very easy to do: you only require a profile name and optionally return nil end - self.c_login = Textbox.new{title="Username: ", text="", chars=30, max_len=20, fct=function(text) self:okclick() end} - self.c_email = Textbox.new{title="Email: ", size_title=self.c_login.title, text="", chars=30, max_len=60, fct=function(text) self:okclick() end} - self.c_news = Checkbox.new{title="Accept to receive #{bold}#very infrequent#{normal}# (a few per year) mails about important game events from us.", default=false, fct=function() self:okclick() end} - self.c_age = Checkbox.new{title="You at least 16 years old, or have parental authorization to play the game.", default=false, fct=function() self:okclick() end} - local ok = require("engine.ui.Button").new{text="Register", fct=function() self:okclick() end} - local cancel = require("engine.ui.Button").new{text="Cancel", fct=function() self:cancelclick() end} - local privacy = require("engine.ui.Button").new{text="Privacy Policy (opens in browser)", fct=function() self:privacypolicy() end} + self.c_login = Textbox.new{title=_t"Username: ", text="", chars=30, max_len=20, fct=function(text) self:okclick() end} + self.c_email = Textbox.new{title=_t"Email: ", size_title=self.c_login.title, text="", chars=30, max_len=60, fct=function(text) self:okclick() end} + self.c_news = Checkbox.new{title=_t"Accept to receive #{bold}#very infrequent#{normal}# (a few per year) mails about important game events from us.", default=false, fct=function() self:okclick() end} + self.c_age = Checkbox.new{title=_t"You at least 16 years old, or have parental authorization to play the game.", default=false, fct=function() self:okclick() end} + local ok = require("engine.ui.Button").new{text=_t"Register", fct=function() self:okclick() end} + local cancel = require("engine.ui.Button").new{text=_t"Cancel", fct=function() self:cancelclick() end} + local privacy = require("engine.ui.Button").new{text=_t"Privacy Policy (opens in browser)", fct=function() self:privacypolicy() end} self:loadUI{ {left=0, top=0, ui=self.c_desc}, {left=0, top=self.c_desc.h, ui=self.c_login}, @@ -69,23 +69,23 @@ end function _M:okclick() if self.c_login.text:len() < 2 then - self:simplePopup("Username", "Your username is too short") + self:simplePopup(_t"Username", _t"Your username is too short") return end if self.c_email.text:len() > 0 and not self.c_email.text:find("..@..") then - self:simplePopup("Email", "Your email does not look right.") + self:simplePopup(_t"Email", _t"Your email does not look right.") return end if not self.c_age.checked then - self:simplePopup("Age Check", "You need to be 16 years old or more or to have parental authorization to play this game.") + self:simplePopup(_t"Age Check", _t"You need to be 16 years old or more or to have parental authorization to play this game.") return end - local d = self:simpleWaiter("Registering...", "Registering on https://te4.org/, please wait...") core.display.forceRedraw() - d:timeout(30, function() Dialog:simplePopup("Steam", "Steam client not found.") end) + local d = self:simpleWaiter(_t"Registering...", _t"Registering on https://te4.org/, please wait...") core.display.forceRedraw() + d:timeout(30, function() Dialog:simplePopup("Steam", _t"Steam client not found.") end) core.steam.sessionTicket(function(ticket) if not ticket then - Dialog:simplePopup("Steam", "Steam client not found.") + Dialog:simplePopup("Steam", _t"Steam client not found.") return end @@ -94,7 +94,7 @@ function _M:okclick() d:done() if not profile.auth and profile.auth_last_error then if profile.auth_last_error == "already exists" then - self:simplePopup("Error", "Username or Email already taken, please select an other one.") + self:simplePopup(_t"Error", _t"Username or Email already taken, please select an other one.") end elseif profile.auth then game:unregisterDialog(self) diff --git a/game/engines/default/modules/boot/dialogs/UpdateAll.lua b/game/engines/default/modules/boot/dialogs/UpdateAll.lua index 8e55ad967c8a3df38efd4cc7fd447f7ab2f4e35b..fc9269c61e1fb5d68a6d4f55923f1a8659ca08ee 100644 --- a/game/engines/default/modules/boot/dialogs/UpdateAll.lua +++ b/game/engines/default/modules/boot/dialogs/UpdateAll.lua @@ -28,17 +28,17 @@ local DownloadDialog = require "engine.dialogs.DownloadDialog" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "Update all game modules", game.w / 3, game.h * 0.5) + Dialog.init(self, _t"Update all game modules", game.w / 3, game.h * 0.5) self:generateList() - self.c_desc = Textzone.new{width=self.iw, auto_height=1, text=[[ + self.c_desc = Textzone.new{width=self.iw, auto_height=1, text=_t[[ All those components will be updated: ]]} self.c_list = ListColumns.new{width=self.iw, height=self.ih - self.c_desc.h, scrollbar=true, columns={ - {name="Component", width=80, display_prop="name"}, - {name="Version", width=20, display_prop="version_string"}, + {name=_t"Component", width=80, display_prop="name"}, + {name=_t"Version", width=20, display_prop="version_string"}, }, list=self.list or {}, fct=function(item) end, select=function(item, sel) end} self.c_ok = Button.new{width=self.iw - 20, text="Update All", fct=function() self:updateAll() end} @@ -77,14 +77,14 @@ do return end end if #dllist == 0 then - Dialog:simplePopup("Nothing to update", "All your game modules are up to date.") + Dialog:simplePopup(_t"Nothing to update", _t"All your game modules are up to date.") return end local engs = {} local list = {} for i, mod in ipairs(dllist) do - list[#list+1] = { name="Game: #{bold}##GOLD#"..mod.name.."#{normal}##WHITE#", mod=mod, version_string=("%d.%d.%d"):format(mod.version[1], mod.version[2], mod.version[3]) } + list[#list+1] = { name=_t"Game: #{bold}##GOLD#"..mod.name.."#{normal}##WHITE#", mod=mod, version_string=("%d.%d.%d"):format(mod.version[1], mod.version[2], mod.version[3]) } -- Check for the required engine local ename, ev1, ev2, ev3 = mod.engine[4] or "te4", mod.engine[1], mod.engine[2], mod.engine[3] @@ -104,7 +104,7 @@ do return end end for name, eng in pairs(engs) do - list[#list+1] = { name="Engine: #{italic}##LIGHT_BLUE#"..eng[4].."#{normal}##WHITE#", eng=eng, version_string=("%d.%d.%d"):format(eng[1], eng[2], eng[3]) } + list[#list+1] = { name=_t"Engine: #{italic}##LIGHT_BLUE#"..eng[4].."#{normal}##WHITE#", eng=eng, version_string=("%d.%d.%d"):format(eng[1], eng[2], eng[3]) } end self.list = list end @@ -149,7 +149,7 @@ function _M:updateAll() files[#files+1] = fname do_next() end, function(error) - Dialog:simplePopup("Error!", "There was an error while downloading:\n"..error) + Dialog:simplePopup(_t"Error!", _t"There was an error while downloading:\n"..error) game:unregisterDialog(self) end) @@ -157,7 +157,7 @@ function _M:updateAll() d:startDownload() end, function(error) - Dialog:simplePopup("Error!", "There was an error while downloading:\n"..error) + Dialog:simplePopup(_t"Error!", _t"There was an error while downloading:\n"..error) game:unregisterDialog(self) end) @@ -171,14 +171,14 @@ function _M:updateAll() local fname = ("/tmp-dl/modules/%s-%d.%d.%d.team"):format(mod.short_name, mod.version[1], mod.version[2], mod.version[3]) local f = fs.open(fname, "w") - local d = DownloadDialog.new("Downloading: "..next.name, mod.download, function(chunk) + local d = DownloadDialog.new(_t"Downloading: "..next.name, mod.download, function(chunk) f:write(chunk) end, function(di, data) f:close() files[#files+1] = fname do_next() end, function(error) - Dialog:simplePopup("Error!", "There was an error while downloading:\n"..error) + Dialog:simplePopup(_t"Error!", _t"There was an error while downloading:\n"..error) game:unregisterDialog(self) end) game:registerDialog(d) @@ -194,7 +194,7 @@ function _M:updateAll() end if restore then fs.setWritePath(restore) end - Dialog:simplePopup("Update", "All updates installed, the game will now restart", function() + Dialog:simplePopup(_t"Update", _t"All updates installed, the game will now restart", function() util.showMainMenu() end) end diff --git a/game/engines/default/modules/boot/dialogs/ViewHighScores.lua b/game/engines/default/modules/boot/dialogs/ViewHighScores.lua index 395c3f48e6f60cfb7f04d2d3603fbb0fecf8ee7c..4821161bc1a93cd98ef242f1b4f590c5c0058077 100644 --- a/game/engines/default/modules/boot/dialogs/ViewHighScores.lua +++ b/game/engines/default/modules/boot/dialogs/ViewHighScores.lua @@ -33,7 +33,7 @@ require "engine.PlayerProfile" module(..., package.seeall, class.inherit(Dialog)) function _M:init() - Dialog.init(self, "View High Scores", game.w * 0.8, game.h * 0.8) + Dialog.init(self, _t"View High Scores", game.w * 0.8, game.h * 0.8) -- high score table on right self.c_desc = Textzone.new{width=math.floor(self.iw / 3 * 2 - 10), height=self.ih, text=""} @@ -43,13 +43,13 @@ function _M:init() self:generateList() self.c_list = ListColumns.new{width=math.floor(self.iw / 3 - 10), height=math.floor(self.ih / 2), scrollbar=true, columns={ - {name="Game Module", width=80, display_prop="name"}, - {name="Version", width=20, display_prop="version_txt"}, + {name=_t"Game Module", width=80, display_prop="name"}, + {name=_t"Version", width=20, display_prop="version_txt"}, }, list=self.list, fct=function(item) end, select=function(item, sel) self:changemodules(item) end} -- list of campaigns/worlds on left (bottom) self.c_sublist = ListColumns.new{width=math.floor(self.iw / 3 - 10), height=math.floor(self.ih / 2), - columns = {{name="World",width=100,display_prop="world"}}, + columns = {{name=_t"World",width=100,display_prop="world"}}, list={}, select=function(item,sel) self:changeworlds(item) end, fct=function(item) end} local sep = Separator.new{dir="horizontal", size=self.ih - 10} @@ -94,7 +94,7 @@ function _M:generateList() mod.highscores[world] = HighScores.createHighScoreTable(world,formatter) end end - mod.zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text="#{bold}##GOLD#"..mod.long_name.."#GREEN# High Scores#WHITE##{normal}#\n\n"} + mod.zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=("#{bold}##GOLD#%s#GREEN# High Scores#WHITE##{normal}#\n\n"):tformat(mod.long_name)} table.insert(self.list, mod) end end @@ -111,7 +111,7 @@ function _M:changemodules(item) self.c_sublist:setList(worlds) if #worlds > 0 then -- show text from first world - item.zone.text = "#{bold}##GOLD#"..item.long_name.."("..worlds[1].world..")".."#GREEN# High Scores#WHITE##{normal}#\n\n" + item.zone.text = ("#{bold}##GOLD#%s(%s)#GREEN# High Scores#WHITE##{normal}#\n\n"):tformat(item.long_name, worlds[1].world) item.zone.text = item.zone.text .. item.highscores[worlds[1].world] item.zone:generate() end @@ -121,7 +121,7 @@ end function _M:changeworlds(item) if item and self.uis[2] then world = item.world; - self.cur_sel.zone.text = "#{bold}##GOLD#"..self.cur_sel.long_name.."("..world..")".."#GREEN# High Scores#WHITE##{normal}#\n\n" + self.cur_sel.zone.text = ("#{bold}##GOLD#%s(%s)#GREEN# High Scores#WHITE##{normal}#\n\n"):tformat(self.cur_sel.long_name, world) self.cur_sel.zone.text = self.cur_sel.zone.text .. self.cur_sel.highscores[world] self.cur_sel.zone:generate() end diff --git a/game/modules/example/class/Game.lua b/game/modules/example/class/Game.lua index bf0741d5ee1f6b897b7ea344a4e9a7a7eeaed709..883b079eac7de9b886a32bdd62e8447c1444719f 100644 --- a/game/modules/example/class/Game.lua +++ b/game/modules/example/class/Game.lua @@ -258,7 +258,7 @@ function _M:setupCommands() collectgarbage("collect") local nb = 0 for k, e in pairs(__uids) do nb = nb + 1 end - game.log("NB: " .. nb) + game.log("NB: %d", nb) end end, } self.key:addBinds diff --git a/game/modules/example/class/Player.lua b/game/modules/example/class/Player.lua index 271f32bd94601d6f84b540632febb156854aba63..4da3be195d8bb962b7986a8f85ee649f35142435 100644 --- a/game/modules/example/class/Player.lua +++ b/game/modules/example/class/Player.lua @@ -105,12 +105,12 @@ end --- Called before taking a hit, overload mod.class.Actor:onTakeHit() to stop resting and running function _M:onTakeHit(value, src) - self:runStop("taken damage") - self:restStop("taken damage") + self:runStop(_t"taken damage") + self:restStop(_t"taken damage") local ret = mod.class.Actor.onTakeHit(self, value, src) if self.life < self.max_life * 0.3 then local sx, sy = game.level.map:getTileToScreen(self.x, self.y) - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, 2, "LOW HEALTH!", {255,0,0}, true) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, 2, _t"LOW HEALTH!", {255,0,0}, true) end return ret end @@ -144,7 +144,7 @@ function _M:levelup() mod.class.Actor.levelup(self) local x, y = game.level.map:getTileToScreen(self.x, self.y) - game.flyers:add(x, y, 80, 0.5, -2, "LEVEL UP!", {0,255,255}) + game.flyers:add(x, y, 80, 0.5, -2, _t"LEVEL UP!", {0,255,255}) game.log("#00ffff#Welcome to level %d.", self.level) end diff --git a/game/modules/example/data/damage_types.lua b/game/modules/example/data/damage_types.lua index 7739bbbdcfd4e8faf888795fdae47b93686984eb..2b42ef33a91cc3848bdbacf4c6fe4f1c0827cdf9 100644 --- a/game/modules/example/data/damage_types.lua +++ b/game/modules/example/data/damage_types.lua @@ -29,7 +29,7 @@ setDefaultProjector(function(src, x, y, type, dam) local sx, sy = game.level.map:getTileToScreen(x, y) if target:takeHit(dam, src) then if src == game.player or target == game.player then - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, "Kill!", {255,0,255}) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, _t"Kill!", {255,0,255}) end else if src == game.player then diff --git a/game/modules/example/data/general/npcs/kobold.lua b/game/modules/example/data/general/npcs/kobold.lua index 92f3626e875a0834663c9cf8dac7e55d6b14c8cd..ace1097eb72ed4c37d814f5ee85b6c474e5071d6 100644 --- a/game/modules/example/data/general/npcs/kobold.lua +++ b/game/modules/example/data/general/npcs/kobold.lua @@ -23,7 +23,7 @@ newEntity{ define_as = "BASE_NPC_KOBOLD", type = "humanoid", subtype = "kobold", display = "k", color=colors.WHITE, - desc = [[Ugly and green!]], + desc = _t[[Ugly and green!]], ai = "dumb_talented_simple", ai_state = { talent_in=3, }, stats = { str=5, dex=5, con=5 }, diff --git a/game/modules/example/data/zones/dungeon/zone.lua b/game/modules/example/data/zones/dungeon/zone.lua index f5a8c9d0fbc0d2f848f1085e6c00717198516f6f..254ebb31fc9ebdf3d96a89b8e6862bc2833dfec3 100644 --- a/game/modules/example/data/zones/dungeon/zone.lua +++ b/game/modules/example/data/zones/dungeon/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Old ruins", + name = _t"Old ruins", level_range = {1, 1}, max_level = 10, decay = {300, 800}, diff --git a/game/modules/example/dialogs/DeathDialog.lua b/game/modules/example/dialogs/DeathDialog.lua index 70cf86ef1687a447e691dfadc969c0bbeee7d2c2..cd4c42eccaf7c532af1334e1facabce74223eba3 100644 --- a/game/modules/example/dialogs/DeathDialog.lua +++ b/game/modules/example/dialogs/DeathDialog.lua @@ -29,7 +29,7 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(actor) self.actor = actor - Dialog.init(self, "Death!", 500, 300) + Dialog.init(self, _t"Death!", 500, 300) self:generateList() diff --git a/game/modules/example/dialogs/Quit.lua b/game/modules/example/dialogs/Quit.lua index b4a92e5e5082c2a2e7ad3baeb2f4662fac9be099..e2e694cd47969531f52a03ab481828ea6b4ce5ce 100644 --- a/game/modules/example/dialogs/Quit.lua +++ b/game/modules/example/dialogs/Quit.lua @@ -24,7 +24,7 @@ local Savefile = require "engine.Savefile" module(..., package.seeall, class.inherit(engine.Dialog)) function _M:init() - engine.Dialog.init(self, "Really exit Example Module?", 300, 100) + engine.Dialog.init(self, _t"Really exit Example Module?", 300, 100) self:keyCommands({ __DEFAULT = function() game:unregisterDialog(self) diff --git a/game/modules/example_realtime/class/Player.lua b/game/modules/example_realtime/class/Player.lua index 15a96cfd06b7e64f9a374ccac57e7d236e082a89..f036243a0a664f65ef7d63dafe030831f1549d88 100644 --- a/game/modules/example_realtime/class/Player.lua +++ b/game/modules/example_realtime/class/Player.lua @@ -97,12 +97,12 @@ end --- Called before taking a hit, overload mod.class.Actor:onTakeHit() to stop resting and running function _M:onTakeHit(value, src) - self:runStop("taken damage") - self:restStop("taken damage") + self:runStop(_t"taken damage") + self:restStop(_t"taken damage") local ret = mod.class.Actor.onTakeHit(self, value, src) if self.life < self.max_life * 0.3 then local sx, sy = game.level.map:getTileToScreen(self.x, self.y) - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, 2, "LOW HEALTH!", {255,0,0}, true) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, 2, _t"LOW HEALTH!", {255,0,0}, true) end return ret end @@ -136,7 +136,7 @@ function _M:levelup() mod.class.Actor.levelup(self) local x, y = game.level.map:getTileToScreen(self.x, self.y) - game.flyers:add(x, y, 80, 0.5, -2, "LEVEL UP!", {0,255,255}) + game.flyers:add(x, y, 80, 0.5, -2, _t"LEVEL UP!", {0,255,255}) game.log("#00ffff#Welcome to level %d.", self.level) end diff --git a/game/modules/example_realtime/data/damage_types.lua b/game/modules/example_realtime/data/damage_types.lua index 7739bbbdcfd4e8faf888795fdae47b93686984eb..2b42ef33a91cc3848bdbacf4c6fe4f1c0827cdf9 100644 --- a/game/modules/example_realtime/data/damage_types.lua +++ b/game/modules/example_realtime/data/damage_types.lua @@ -29,7 +29,7 @@ setDefaultProjector(function(src, x, y, type, dam) local sx, sy = game.level.map:getTileToScreen(x, y) if target:takeHit(dam, src) then if src == game.player or target == game.player then - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, "Kill!", {255,0,255}) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, _t"Kill!", {255,0,255}) end else if src == game.player then diff --git a/game/modules/example_realtime/data/general/npcs/kobold.lua b/game/modules/example_realtime/data/general/npcs/kobold.lua index 92f3626e875a0834663c9cf8dac7e55d6b14c8cd..ace1097eb72ed4c37d814f5ee85b6c474e5071d6 100644 --- a/game/modules/example_realtime/data/general/npcs/kobold.lua +++ b/game/modules/example_realtime/data/general/npcs/kobold.lua @@ -23,7 +23,7 @@ newEntity{ define_as = "BASE_NPC_KOBOLD", type = "humanoid", subtype = "kobold", display = "k", color=colors.WHITE, - desc = [[Ugly and green!]], + desc = _t[[Ugly and green!]], ai = "dumb_talented_simple", ai_state = { talent_in=3, }, stats = { str=5, dex=5, con=5 }, diff --git a/game/modules/example_realtime/data/zones/dungeon/zone.lua b/game/modules/example_realtime/data/zones/dungeon/zone.lua index f5a8c9d0fbc0d2f848f1085e6c00717198516f6f..254ebb31fc9ebdf3d96a89b8e6862bc2833dfec3 100644 --- a/game/modules/example_realtime/data/zones/dungeon/zone.lua +++ b/game/modules/example_realtime/data/zones/dungeon/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Old ruins", + name = _t"Old ruins", level_range = {1, 1}, max_level = 10, decay = {300, 800}, diff --git a/game/modules/example_realtime/dialogs/DeathDialog.lua b/game/modules/example_realtime/dialogs/DeathDialog.lua index 70cf86ef1687a447e691dfadc969c0bbeee7d2c2..cd4c42eccaf7c532af1334e1facabce74223eba3 100644 --- a/game/modules/example_realtime/dialogs/DeathDialog.lua +++ b/game/modules/example_realtime/dialogs/DeathDialog.lua @@ -29,7 +29,7 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(actor) self.actor = actor - Dialog.init(self, "Death!", 500, 300) + Dialog.init(self, _t"Death!", 500, 300) self:generateList() diff --git a/game/modules/example_realtime/dialogs/Quit.lua b/game/modules/example_realtime/dialogs/Quit.lua index b4a92e5e5082c2a2e7ad3baeb2f4662fac9be099..e2e694cd47969531f52a03ab481828ea6b4ce5ce 100644 --- a/game/modules/example_realtime/dialogs/Quit.lua +++ b/game/modules/example_realtime/dialogs/Quit.lua @@ -24,7 +24,7 @@ local Savefile = require "engine.Savefile" module(..., package.seeall, class.inherit(engine.Dialog)) function _M:init() - engine.Dialog.init(self, "Really exit Example Module?", 300, 100) + engine.Dialog.init(self, _t"Really exit Example Module?", 300, 100) self:keyCommands({ __DEFAULT = function() game:unregisterDialog(self) diff --git a/game/modules/tome/ai/escort.lua b/game/modules/tome/ai/escort.lua index 7b117526a939398c5430bd360e136b47b5004791..8a5cef4acba90f224ca3cbe59cf4d02db546ce19 100644 --- a/game/modules/tome/ai/escort.lua +++ b/game/modules/tome/ai/escort.lua @@ -44,7 +44,7 @@ newAI("escort_quest", function(self) self.ai_state.fleeing_msg = true local enemy = self.ai_target.actor local dir = game.level.map:compassDirection(enemy.x-self.x, enemy.y-self.y) - self:doEmote("Help!"..(dir and (" %s to the %s!"):format(self:canSee(enemy) and string.capitalize(enemy.name) or "Something", dir) or "")) + self:doEmote(_t"Help!"..(dir and (" %s to the %s!"):tformat(self:canSee(enemy) and string.capitalize(enemy:getName()) or _t"Something", dir) or "")) end else self:runAI("move_escort") diff --git a/game/modules/tome/ai/quests.lua b/game/modules/tome/ai/quests.lua index 1ab49fc496ebed9bd2231751e94c75bf327b1bf0..422a7578ada5aabaa0fd7477299b10be4f903a16 100644 --- a/game/modules/tome/ai/quests.lua +++ b/game/modules/tome/ai/quests.lua @@ -42,9 +42,9 @@ newAI("move_quest_limmir", function(self) else game.level.turn_counter = 370 * 10 game.level.max_turn_counter = 370 * 10 - game.level.turn_counter_desc = "Protect Limmir from the demons coming from north-east. Hold them off!" + game.level.turn_counter_desc = _t"Protect Limmir from the demons coming from north-east. Hold them off!" game.player.changed = true self.ai = "none" - self:doEmote("This place is corrupted! I will cleanse it! Protect me while I do it!", 120) + self:doEmote(_t"This place is corrupted! I will cleanse it! Protect me while I do it!", 120) end end) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index da24c665038d91d9b2608f2a107600cebf3cebab..ae0b786e577a5af92f0aaf5cc17d2d4a6f2865c1 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -602,7 +602,7 @@ function _M:actBase() if air_level then if not air_condition or not self.can_breath[air_condition] or self.can_breath[air_condition] <= 0 then self.is_suffocating = true - self:suffocate(-air_level, self, air_condition == "water" and "drowned to death" or nil) + self:suffocate(-air_level, self, air_condition == "water" and _t"drowned to death" or nil) self.force_suffocate = nil end end @@ -716,7 +716,7 @@ function _M:act() else -- We are saved for this turn self.paralyzed_counter = self.paralyzed_counter - 100 - game.logSeen(self, "%s temporarily fights the paralyzation.", self.name:capitalize()) + game.logSeen(self, "%s temporarily fights the paralyzation.", self:getName():capitalize()) end end if self:attr("stoned") then self.energy.value = 0 end @@ -1652,8 +1652,8 @@ function _M:teleportRandom(x, y, dist, min_dist) self:move(pos[1], pos[2], true) teleported = true - if self.runStop then self:runStop("teleported") end - if self.restStop then self:restStop("teleported") end + if self.runStop then self:runStop(_t"teleported") end + if self.restStop then self:restStop(_t"teleported") end -- after moving if self:attr("defense_on_teleport") or self:attr("resist_all_on_teleport") or self:attr("effect_reduction_on_teleport") then @@ -1859,27 +1859,27 @@ function _M:allowedRanks() end function _M:TextRank() - local rank, color = "normal", "#ANTIQUE_WHITE#" - if self.rank == 1 then rank, color = "critter", "#C0C0C0#" - elseif self.rank == 2 then rank, color = "normal", "#ANTIQUE_WHITE#" - elseif self.rank == 3 then rank, color = "elite", "#YELLOW#" - elseif self.rank == 3.2 then rank, color = "rare", "#SALMON#" - elseif self.rank == 3.5 then rank, color = "unique", "#SANDY_BROWN#" - elseif self.rank == 4 then rank, color = "boss", "#ORANGE#" - elseif self.rank == 5 then rank, color = "elite boss", "#GOLD#" - elseif self.rank >= 10 then rank, color = "god", "#FF4000#" + local rank, color = _t"normal", "#ANTIQUE_WHITE#" + if self.rank == 1 then rank, color = _t"critter", "#C0C0C0#" + elseif self.rank == 2 then rank, color = _t"normal", "#ANTIQUE_WHITE#" + elseif self.rank == 3 then rank, color = _t"elite", "#YELLOW#" + elseif self.rank == 3.2 then rank, color = _t"rare", "#SALMON#" + elseif self.rank == 3.5 then rank, color = _t"unique", "#SANDY_BROWN#" + elseif self.rank == 4 then rank, color = _t"boss", "#ORANGE#" + elseif self.rank == 5 then rank, color = _t"elite boss", "#GOLD#" + elseif self.rank >= 10 then rank, color = _t"god", "#FF4000#" end return rank, color end function _M:TextSizeCategory() - local sizecat = "medium" - if self.size_category <= 1 then sizecat = "tiny" - elseif self.size_category == 2 then sizecat = "small" - elseif self.size_category == 3 then sizecat = "medium" - elseif self.size_category == 4 then sizecat = "big" - elseif self.size_category == 5 then sizecat = "huge" - elseif self.size_category >= 6 then sizecat = "gargantuan" + local sizecat = _t"medium" + if self.size_category <= 1 then sizecat = _t"tiny" + elseif self.size_category == 2 then sizecat = _t"small" + elseif self.size_category == 3 then sizecat = _t"medium" + elseif self.size_category == 4 then sizecat = _t"big" + elseif self.size_category == 5 then sizecat = _t"huge" + elseif self.size_category >= 6 then sizecat = _t"gargantuan" end return sizecat end @@ -1961,12 +1961,17 @@ function _M:getCombatStats(type, inven_id, item) if type == "psionic" then self:attr("use_psi_combat", -1) end return {obj=o, atk=atk, dmg=dmg, apr=apr, crit=crit, crit_power=crit_power or 0, aspeed=aspeed, range=range, mspeed=mspeed, archery=archery, mean=mean, ammo=ammo, block=mean.block, talented=mean.talented} end - +-- Gets the full name of the Actor +function _M:getName() + -- I18N actor names. + local name = _t(self.name) or _t"actor" + return name +end function _M:tooltip(x, y, seen_by) if seen_by and not seen_by:canSee(self) then return end - local factcolor, factstate, factlevel = "#ANTIQUE_WHITE#", "neutral", Faction:factionReaction(self.faction, game.player.faction) - if factlevel < 0 then factcolor, factstate = "#LIGHT_RED#", "hostile" - elseif factlevel > 0 then factcolor, factstate = "#LIGHT_GREEN#", "friendly" + local factcolor, factstate, factlevel = "#ANTIQUE_WHITE#", _t"neutral", Faction:factionReaction(self.faction, game.player.faction) + if factlevel < 0 then factcolor, factstate = "#LIGHT_RED#", _t"hostile" + elseif factlevel > 0 then factcolor, factstate = "#LIGHT_GREEN#", _t"friendly" end -- Debug feature, mousing over with ctrl pressed will give detailed FOV info @@ -1981,57 +1986,57 @@ function _M:tooltip(x, y, seen_by) print("==============================================") end - local pfactcolor, pfactstate, pfactlevel = "#ANTIQUE_WHITE#", "neutral", self:reactionToward(game.player) - if pfactlevel < 0 then pfactcolor, pfactstate = "#LIGHT_RED#", "hostile" - elseif pfactlevel > 0 then pfactcolor, pfactstate = "#LIGHT_GREEN#", "friendly" + local pfactcolor, pfactstate, pfactlevel = "#ANTIQUE_WHITE#", _t"neutral", self:reactionToward(game.player) + if pfactlevel < 0 then pfactcolor, pfactstate = "#LIGHT_RED#", _t"hostile" + elseif pfactlevel > 0 then pfactcolor, pfactstate = "#LIGHT_GREEN#", _t"friendly" end local rank, rank_color = self:TextRank() local ts = tstring{} - ts:add({"uid",self.uid}) ts:merge(rank_color:toTString()) ts:add(self.name, {"color", "WHITE"}) - if self.type == "humanoid" or self.type == "giant" then ts:add({"font","italic"}, "(", self.female and "female" or "male", ")", {"font","normal"}, true) else ts:add(true) end - ts:add(self.type:capitalize(), " / ", self.subtype:capitalize(), true) - ts:add("Rank: ") ts:merge(rank_color:toTString()) ts:add(rank, {"color", "WHITE"}, true) - if self.hide_level_tooltip then ts:add({"color", 0, 255, 255}, "Level: unknown", {"color", "WHITE"}, true) - else ts:add({"color", 0, 255, 255}, ("Level: %d"):format(self.level), {"color", "WHITE"}, true) end - if self:attr("invulnerable") then ts:add({"color", "PURPLE"}, "INVULNERABLE!", true) end - ts:add({"color", 255, 0, 0}, ("HP: %d (%d%%) #GREEN#+%0.2f#LAST#"):format(self.life, self.life * 100 / self.max_life, self.life_regen * util.bound(self.healing_factor or 1)), {"color", "WHITE"}) + ts:add({"uid",self.uid}) ts:merge(rank_color:toTString()) ts:add(self:getName(), {"color", "WHITE"}) + if self.type == "humanoid" or self.type == "giant" then ts:add({"font","italic"}, "(", self.female and _t"female" or _t"male", ")", {"font","normal"}, true) else ts:add(true) end + ts:add(_t(self.type):capitalize(), " / ", _t(self.subtype):capitalize(), true) + ts:add(_t"Rank: ") ts:merge(rank_color:toTString()) ts:add(rank, {"color", "WHITE"}, true) + if self.hide_level_tooltip then ts:add({"color", 0, 255, 255}, _t"Level: unknown", {"color", "WHITE"}, true) + else ts:add({"color", 0, 255, 255}, ("Level: %d"):tformat(self.level), {"color", "WHITE"}, true) end + if self:attr("invulnerable") then ts:add({"color", "PURPLE"}, _t"INVULNERABLE!", true) end + ts:add({"color", 255, 0, 0}, ("HP: %d (%d%%) #GREEN#+%0.2f#LAST#"):tformat(self.life, self.life * 100 / self.max_life, self.life_regen * util.bound(self.healing_factor or 1)), {"color", "WHITE"}) -- Avoid cluttering tooltip if resources aren't relevant (add menu option?) if game.player:knowTalentType("wild-gift/antimagic") then if self:knowTalent(self.T_MANA_POOL) then - ts:add(("\nMana: "..self.resources_def.mana.color.."%d / %d#LAST#"):format(self.mana, self.max_mana, true)) + ts:add(("\nMana: %s%d / %d#LAST#"):tformat(self.resources_def.mana.color, self.mana, self.max_mana, true)) end if self:knowTalent(self.T_VIM_POOL) then - ts:add(("\nVim: "..self.resources_def.vim.color.."%d / %d#LAST#"):format(self.vim, self.max_vim, true)) + ts:add(("\nVim: %s%d / %d#LAST#"):tformat(self.resources_def.vim.color, self.vim, self.max_vim, true)) end if self:knowTalent(self.T_POSITIVE_POOL) then - ts:add(("\nPositive: "..self.resources_def.positive.color.."%d / %d#LAST#"):format(self.positive, self.max_positive, true)) + ts:add(("\nPositive: %s%d / %d#LAST#"):tformat(self.resources_def.positive.color, self.positive, self.max_positive, true)) end if self:knowTalent(self.T_NEGATIVE_POOL) then - ts:add(("\nNegative: "..self.resources_def.negative.color.."%d / %d#LAST#"):format(self.negative, self.max_negative, true)) + ts:add(("\nNegative: %s%d / %d#LAST#"):tformat(self.resources_def.negative.color,self.negative, self.max_negative, true)) end end if self:knowTalent(self.T_SOLIPSISM) then local psi_percent = 100*self.psi/self.max_psi - ts:add((("#7fffd4# / %d")):format(self.psi), (" (%d%%)"):format(psi_percent),{"color", "WHITE"}) + ts:add((("#7fffd4# / %d")):format(self.psi), (" (%d%%)"):tformat(psi_percent),{"color", "WHITE"}) end ts:add(true) if self:attr("encased_in_ice") then local eff = self:hasEffect(self.EFF_FROZEN) - ts:add({"color", 0, 255, 128}, ("Iceblock: %d"):format(eff.hp), {"color", "WHITE"}, true) + ts:add({"color", 0, 255, 128}, ("Iceblock: %d"):tformat(eff.hp), {"color", "WHITE"}, true) end if game.player:knowTalent(self.T_VIM_POOL) then - ts:add({"color", 0, 255, 128}, ("%sVim Value: %d#LAST#"):format(self.resources_def.vim.color, (game.player:getWil() * 0.5 + 1) * self.rank), {"color", "WHITE"}, true) + ts:add({"color", 0, 255, 128}, ("%sVim Value: %d#LAST#"):tformat(self.resources_def.vim.color, (game.player:getWil() * 0.5 + 1) * self.rank), {"color", "WHITE"}, true) end if game.player:knowTalent(self.T_PREDATOR) then local predatorcount = game.player.predator_type_history and game.player.predator_type_history[self.type] or 0 local tp = game.player:getTalentFromId(game.player.T_PREDATOR) local predatorATK = tp.getATK(game.player, tp) * predatorcount local predatorAPR = tp.getAPR(game.player, tp) * predatorcount - ts:add({"color", 0, 255, 128}, ("#ffa0ff#Predator: +%d acc, +%d apr#LAST#"):format(predatorATK, predatorAPR), {"color", "WHITE"}, true) + ts:add({"color", 0, 255, 128}, ("#ffa0ff#Predator: +%d acc, +%d apr#LAST#"):tformat(predatorATK, predatorAPR), {"color", "WHITE"}, true) end --ts:add(("Stats: %d / %d / %d / %d / %d / %d"):format(self:getStr(), self:getDex(), self:getCon(), self:getMag(), self:getWil(), self:getCun()), true) @@ -2045,11 +2050,11 @@ function _M:tooltip(x, y, seen_by) local resists = tstring{} local first = true - ts:add({"color", "ANTIQUE_WHITE"}, "Resists: ") + ts:add({"color", "ANTIQUE_WHITE"}, _t"Resists: ") for t, _ in table.orderedPairs2(self.resists or {}, dt_order) do local v = self:combatGetResist(t) if t == "all" or t == "absolute" then - ts:add({"color", "LIGHT_BLUE"}, tostring(math.floor(v)) .. "%", " ", {"color", "LAST"}, t..", ") + ts:add({"color", "LIGHT_BLUE"}, tostring(math.floor(v)) .. "%", " ", {"color", "LAST"}, _t(t)..", ") elseif type(t) == "string" and math.abs(v) >= 20 then local res = tostring(math.floor(v)) .. "%" if first then first = false else ts:add(", ") end @@ -2070,32 +2075,32 @@ function _M:tooltip(x, y, seen_by) if ts[#ts] == ", " then table.remove(ts) end ts:add(true) - ts:add("Hardiness/Armour: ", tostring(math.floor(self:combatArmorHardiness())), '% / ', tostring(math.floor(self:combatArmor())), true) - ts:add("Size: ", {"color", "ANTIQUE_WHITE"}, self:TextSizeCategory(), {"color", "WHITE"}, true) - - ts:add("#FFD700#Accuracy#FFFFFF#: ", self:colorStats("combatAttack"), " ") - ts:add("#0080FF#Defense#FFFFFF#: ", self:colorStats("combatDefense"), true) - ts:add("#FFD700#P. power#FFFFFF#: ", self:colorStats("combatPhysicalpower"), " ") - ts:add("#0080FF#P. save#FFFFFF#: ", self:colorStats("combatPhysicalResist"), true) - ts:add("#FFD700#S. power#FFFFFF#: ", self:colorStats("combatSpellpower"), " ") - ts:add("#0080FF#S. save#FFFFFF#: ", self:colorStats("combatSpellResist"), true) - ts:add("#FFD700#M. power#FFFFFF#: ", self:colorStats("combatMindpower"), " ") - ts:add("#0080FF#M. save#FFFFFF#: ", self:colorStats("combatMentalResist"), true) + ts:add(_t"Hardiness/Armour: ", tostring(math.floor(self:combatArmorHardiness())), '% / ', tostring(math.floor(self:combatArmor())), true) + ts:add(_t"Size: ", {"color", "ANTIQUE_WHITE"}, self:TextSizeCategory(), {"color", "WHITE"}, true) + + ts:add(_t"#FFD700#Accuracy#FFFFFF#: ", self:colorStats("combatAttack"), " ") + ts:add(_t"#0080FF#Defense#FFFFFF#: ", self:colorStats("combatDefense"), true) + ts:add(_t"#FFD700#P. power#FFFFFF#: ", self:colorStats("combatPhysicalpower"), " ") + ts:add(_t"#0080FF#P. save#FFFFFF#: ", self:colorStats("combatPhysicalResist"), true) + ts:add(_t"#FFD700#S. power#FFFFFF#: ", self:colorStats("combatSpellpower"), " ") + ts:add(_t"#0080FF#S. save#FFFFFF#: ", self:colorStats("combatSpellResist"), true) + ts:add(_t"#FFD700#M. power#FFFFFF#: ", self:colorStats("combatMindpower"), " ") + ts:add(_t"#0080FF#M. save#FFFFFF#: ", self:colorStats("combatMentalResist"), true) self:triggerHook{"Actor:tooltip", ts=ts, x=x, y=y, seen_by=seen_by} ts:add({"color", "WHITE"}) if (150 + (self.combat_critical_power or 0) ) > 150 then - ts:add("Critical Mult: ", ("%d%%"):format(150 + (self.combat_critical_power or 0) ), true ) + ts:add(_t"Critical Mult: ", ("%d%%"):format(150 + (self.combat_critical_power or 0) ), true ) end if self.summon_time then - ts:add("Time left: ", {"color", "ANTIQUE_WHITE"}, ("%d"):format(self.summon_time), {"color", "WHITE"}, true) + ts:add(_t"Time left: ", {"color", "ANTIQUE_WHITE"}, ("%d"):format(self.summon_time), {"color", "WHITE"}, true) end -- Short names of wielded weapons/ammo if self:getInven("MAINHAND") then for i, o in ipairs(self:getInven("MAINHAND")) do - local tst = ("#LIGHT_BLUE#Main:#LAST#"..o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString() + local tst = ("#LIGHT_BLUE#Main:#LAST#%s"):tformat(o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString() tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2) tst = tst:extractLines(true)[1] local stats = self:getCombatStats("mainhand", self.INVEN_MAINHAND, i ) @@ -2106,7 +2111,7 @@ function _M:tooltip(x, y, seen_by) end if self:getInven("OFFHAND") then for i, o in ipairs(self:getInven("OFFHAND")) do - local tst = ("#LIGHT_BLUE#Off :#LAST#"..o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString() + local tst = ("#LIGHT_BLUE#Off :#LAST#%s"):tformat(o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString() tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2) tst = tst:extractLines(true)[1] local stats = self:getCombatStats("offhand", self.INVEN_OFFHAND, i) @@ -2117,7 +2122,7 @@ function _M:tooltip(x, y, seen_by) end if self:getInven("PSIONIC_FOCUS") and self:attr("psi_focus_combat") then for i, o in ipairs(self:getInven("PSIONIC_FOCUS")) do - local tst = ("#LIGHT_BLUE#Psi :#LAST#"..o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString() + local tst = ("#LIGHT_BLUE#Psi :#LAST#%s"):tformat(o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString() tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2) tst = tst:extractLines(true)[1] local stats = self:getCombatStats("psionic", self.INVEN_PSIONIC_FOCUS, i) @@ -2128,7 +2133,7 @@ function _M:tooltip(x, y, seen_by) end if self:getInven("QUIVER") then for i, o in ipairs(self:getInven("QUIVER")) do - local tst = ("#LIGHT_BLUE#Ammo:#LAST#"..o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString() + local tst = ("#LIGHT_BLUE#Ammo:#LAST#%s"):tformat(o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString() tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2) tst = tst:extractLines(true)[1] table.append(ts, tst) @@ -2139,7 +2144,7 @@ function _M:tooltip(x, y, seen_by) if self:getInven("HANDS") then -- Gloves merge to the Actor.combat table so we have to special case this to display the object but look at self.combat for the damage for i, o in ipairs(self:getInven("HANDS")) do - local tst = ("#LIGHT_BLUE#Unarmed:#LAST#"..o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString() + local tst = ("#LIGHT_BLUE#Unarmed:#LAST#%s"):tformat(o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString() tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2) tst = tst:extractLines(true)[1] local stats = self:getCombatStats("barehand", self.INVEN_MAINHAND, i) @@ -2149,7 +2154,7 @@ function _M:tooltip(x, y, seen_by) end else -- We have no gloves, just list the damage - local tst = ("#LIGHT_BLUE#Unarmed:#LAST#"):toTString() + local tst = (_t"#LIGHT_BLUE#Unarmed:#LAST#"):toTString() tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2) tst = tst:extractLines(true)[1] local stats = self:getCombatStats("barehand", self.INVEN_MAINHAND, i) @@ -2167,11 +2172,11 @@ function _M:tooltip(x, y, seen_by) end end - if retal > 0 then ts:add("Melee Retaliation: ", {"color", "RED"}, tostring(math.floor(retal)), {"color", "WHITE"}, true ) end + if retal > 0 then ts:add(_t"Melee Retaliation: ", {"color", "RED"}, tostring(math.floor(retal)), {"color", "WHITE"}, true ) end if self.desc then ts:add(self.desc, true) end if self.descriptor and self.descriptor.classes then - ts:add("Classes: ", table.concat(self.descriptor.classes or {}, ","), true) + ts:add(_t"Classes: ", table.concat(table.ts(self.descriptor.classes or {}, "birth descriptor name"), ","), true) end if self.custom_tooltip then @@ -2182,16 +2187,16 @@ function _M:tooltip(x, y, seen_by) end end - if self.faction and Faction.factions[self.faction] then ts:add("Faction: ") ts:merge(factcolor:toTString()) ts:add(("%s (%s, %d)"):format(Faction.factions[self.faction].name, factstate, factlevel), {"color", "WHITE"}, true) end - if game.player ~= self then ts:add("Personal reaction: ") ts:merge(pfactcolor:toTString()) ts:add(("%s, %d"):format(pfactstate, pfactlevel), {"color", "WHITE"} ) end + if self.faction and Faction.factions[self.faction] then ts:add(_t"Faction: ") ts:merge(factcolor:toTString()) ts:add(("%s (%s, %d)"):format(Faction.factions[self.faction].name, factstate, factlevel), {"color", "WHITE"}, true) end + if game.player ~= self then ts:add(_t"Personal reaction: ") ts:merge(pfactcolor:toTString()) ts:add(("%s, %d"):format(pfactstate, pfactlevel), {"color", "WHITE"} ) end - ts:add(true, {"color", "ORANGE"}, "Sustained Talents: ",{"color", "WHITE"}) + ts:add(true, {"color", "ORANGE"}, _t"Sustained Talents: ",{"color", "WHITE"}) for tid, act in pairs(self.sustain_talents) do if act then ts:add(true, "- ", {"color", "LIGHT_GREEN"}, self:getTalentFromId(tid) and self:getTalentFromId(tid).name or "???", {"color", "WHITE"} ) end end - if ts[#ts-1] == "Sustained Talents: " then table.remove(ts) table.remove(ts) table.remove(ts) table.remove(ts) end + if ts[#ts-1] == _t"Sustained Talents: " then table.remove(ts) table.remove(ts) table.remove(ts) table.remove(ts) end - ts:add(true, {"color", "ORANGE"}, "Temporary Status Effects: ",{"color", "WHITE"}) + ts:add(true, {"color", "ORANGE"}, _t"Temporary Status Effects: ",{"color", "WHITE"}) local effmental = tstring{} local effphysical = tstring{} @@ -2325,9 +2330,9 @@ function _M:onHeal(value, src) game.flyers:add(sx, sy, 30, rng.float(-3, -2), (rng.range(0,2)-1) * 0.5, tostring(math.ceil(value)), {255,255,0}) end if psi_heal > 0 then - game:delayedLogDamage(src or self, self, -value-psi_heal, ("#LIGHT_GREEN#%d healing #LAST##AQUAMARINE#(%d psi heal)#LAST#"):format(value, psi_heal), false) + game:delayedLogDamage(src or self, self, -value-psi_heal, ("#LIGHT_GREEN#%d healing #LAST##AQUAMARINE#(%d psi heal)#LAST#"):tformat(value, psi_heal), false) else - game:delayedLogDamage(src or self, self, -value, ("#LIGHT_GREEN#%d healing#LAST#"):format(value), false) + game:delayedLogDamage(src or self, self, -value, ("#LIGHT_GREEN#%d healing#LAST#"):tformat(value), false) end end return value @@ -2384,7 +2389,7 @@ function _M:onTakeHit(value, src, death_note) local ox, oy = self.x, self.y self:move(nx, ny, true) game.level.map:particleEmitter(ox, oy, math.max(math.abs(nx-ox), math.abs(ny-oy)), "lightning", {tx=nx-ox, ty=ny-oy}) - game:delayedLogDamage(src or {}, self, 0, ("#STEEL_BLUE#(%d shifted)#LAST#"):format(value), nil) + game:delayedLogDamage(src or {}, self, 0, ("#STEEL_BLUE#(%d shifted)#LAST#"):tformat(value), nil) return 0 end end @@ -2392,7 +2397,7 @@ function _M:onTakeHit(value, src, death_note) if self:attr("retribution") then -- Absorb damage into the retribution local absorb = math.min(value/2, self.retribution_absorb) - game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):format(absorb), false) + game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):tformat(absorb), false) if absorb < self.retribution_absorb then self.retribution_absorb = self.retribution_absorb - absorb value = value - absorb @@ -2406,7 +2411,7 @@ function _M:onTakeHit(value, src, death_note) self:startTalentCooldown(self.T_RETRIBUTION) -- Explode! - game.logSeen(self, "%s unleashes the stored damage in retribution!", self.name:capitalize()) + game.logSeen(self, "%s unleashes the stored damage in retribution!", self:getName():capitalize()) local tg = {type="ball", range=0, radius=self:getTalentRange(self:getTalentFromId(self.T_RETRIBUTION)), selffire=false, talent=t} local grids = self:project(tg, self.x, self.y, DamageType.LIGHT, dam) game.level.map:particleEmitter(self.x, self.y, tg.radius, "sunburst", {radius=tg.radius, grids=grids, tx=self.x, ty=self.y}) @@ -2465,8 +2470,8 @@ function _M:onTakeHit(value, src, death_note) game:delayedLogMessage(self, src, "displacement_shield"..(self.displacement_shield_target.uid or ""), "#CRIMSON##Source# teleports some damage to #Target#!") local displaced = math.min(value, self.displacement_shield) self.displacement_shield_target:takeHit(displaced, src) - game:delayedLogDamage(src, self, 0, ("#CRIMSON#(%d teleported)#LAST#"):format(displaced), false) - game:delayedLogDamage(src, self.displacement_shield_target, displaced, ("#CRIMSON#%d teleported#LAST#"):format(displaced), false) + game:delayedLogDamage(src, self, 0, ("#CRIMSON#(%d teleported)#LAST#"):tformat(displaced), false) + game:delayedLogDamage(src, self.displacement_shield_target, displaced, ("#CRIMSON#%d teleported#LAST#"):tformat(displaced), false) if self.displacement_shield and displaced < self.displacement_shield then self.displacement_shield = self.displacement_shield - displaced value = 0 @@ -2480,7 +2485,7 @@ function _M:onTakeHit(value, src, death_note) if value > 0 and self:attr("time_shield") then -- Absorb damage into the time shield self.time_shield_absorb = self.time_shield_absorb or 0 - game:delayedLogDamage(src, self, 0, ("#STEEL_BLUE#(%d to time)#LAST#"):format(math.min(value, self.time_shield_absorb)), false) + game:delayedLogDamage(src, self, 0, ("#STEEL_BLUE#(%d to time)#LAST#"):tformat(math.min(value, self.time_shield_absorb)), false) if value < self.time_shield_absorb then self.time_shield_absorb = self.time_shield_absorb - value value = 0 @@ -2519,7 +2524,7 @@ function _M:onTakeHit(value, src, death_note) adjusted_value = self.damage_shield_absorb self.damage_shield_absorb = 0 end - game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):format(adjusted_value), false) + game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):tformat(adjusted_value), false) if reflection and reflect_damage and reflection > 0 and reflect_damage > 0 and src.y and src.x and not src.dead and not self.__damage_shield_reflect_running then local a = game.level.map(src.x, src.y, Map.ACTOR) if a and self:reactionToward(a) < 0 then @@ -2527,7 +2532,7 @@ function _M:onTakeHit(value, src, death_note) self.__damage_shield_reflect_running = true a:takeHit(reflected, self) self.__damage_shield_reflect_running = nil - game:delayedLogDamage(self, src, reflected, ("#SLATE#%d reflected#LAST#"):format(reflected), false) + game:delayedLogDamage(self, src, reflected, ("#SLATE#%d reflected#LAST#"):tformat(reflected), false) game:delayedLogMessage(self, src, "reflection" ,"#CRIMSON##Source# reflects damage back to #Target#!#LAST#") end end @@ -2552,8 +2557,8 @@ function _M:onTakeHit(value, src, death_note) game:delayedLogMessage(self, src, "displacement_shield"..(shadow.uid or ""), "#CRIMSON##Source# shares some damage with a shadow!") local displaced = math.min(value * self.shadow_empathy / 100, shadow.life) shadow:takeHit(displaced, src) - game:delayedLogDamage(src, self, 0, ("#PINK#(%d linked)#LAST#"):format(displaced), false) - game:delayedLogDamage(src, shadow, displaced, ("#PINK#%d linked#LAST#"):format(displaced), false) + game:delayedLogDamage(src, self, 0, ("#PINK#(%d linked)#LAST#"):tformat(displaced), false) + game:delayedLogDamage(src, shadow, displaced, ("#PINK#%d linked#LAST#"):tformat(displaced), false) value = value - displaced end end @@ -2573,7 +2578,7 @@ function _M:onTakeHit(value, src, death_note) local oldval = value value = self:callTalent(self.T_DEFLECTION, "do_onTakeHit", tal, value) if value ~= oldval then - game:delayedLogDamage(src, self, 0, ("#SLATE#(%d deflected)#LAST#"):format(oldval - value), false) + game:delayedLogDamage(src, self, 0, ("#SLATE#(%d deflected)#LAST#"):tformat(oldval - value), false) end end end @@ -2605,7 +2610,7 @@ function _M:onTakeHit(value, src, death_note) absorb = absorb - absorb * (util.bound(src:attr("iceblock_pierce") or 0, 0, 100)) / 100 end eff.hp = eff.hp - value * absorb - game:delayedLogDamage(src or {}, self, 0, ("#STEEL_BLUE#(%d to ice)#LAST#"):format(value*absorb), nil) + game:delayedLogDamage(src or {}, self, 0, ("#STEEL_BLUE#(%d to ice)#LAST#"):tformat(value*absorb), nil) value = value * (1 - absorb) if eff.hp < 0 and not eff.begone then game:onTickEnd(function() self:removeEffect(self.EFF_FROZEN) end) @@ -2642,7 +2647,7 @@ function _M:onTakeHit(value, src, death_note) -- Resonance Field, must be called after Feedback gains if self:attr("resonance_field") then local absorb = math.min(value/2, self.resonance_field_absorb) - game:delayedLogDamage(src, self, 0, ("#SLATE#(%d resonance)#LAST#"):format(absorb), false) + game:delayedLogDamage(src, self, 0, ("#SLATE#(%d resonance)#LAST#"):tformat(absorb), false) if absorb < self.resonance_field_absorb then self.resonance_field_absorb = self.resonance_field_absorb - absorb else @@ -2700,7 +2705,7 @@ function _M:onTakeHit(value, src, death_note) if self:attr("stoned") and value >= self.max_life * 0.3 then -- Make the damage high enough to kill it value = self.max_life + 1 - game.logSeen(self, "%s shatters into pieces!", self.name:capitalize()) + game.logSeen(self, "%s shatters into pieces!", self:getName():capitalize()) end -- Adds hate @@ -2711,19 +2716,19 @@ function _M:onTakeHit(value, src, death_note) if value / self.max_life >= 0.15 then -- you take a big hit..adds 2 + 2 for each 5% over 15% hateGain = hateGain + 2 + (((value / self.max_life) - 0.15) * 100 * 0.5) - hateMessage = "#F53CBE#You fight through the pain!" + hatemessage = _t"#F53CBE#You fight through the pain!" end if value / self.max_life >= 0.05 and (self.life - value) / self.max_life < 0.25 then -- you take a hit with low health hateGain = hateGain + 4 - hateMessage = "#F53CBE#Your hatred grows even as your life fades!" + hatemessage = _t"#F53CBE#Your hatred grows even as your life fades!" end if hateGain >= 1 then self:incHate(hateGain) if hateMessage then - game.logPlayer(self, hateMessage.." (+%d hate)", hateGain) + game.logPlayer(self, ("%s (+%d hate)"):tformat(hateMessage), hateGain) end end end @@ -2735,13 +2740,13 @@ function _M:onTakeHit(value, src, death_note) if value / src.max_life > 0.33 then -- you deliver a big hit hateGain = hateGain + src.hate_per_powerful_hit - hateMessage = "#F53CBE#Your powerful attack feeds your madness!" + hatemessage = _t"#F53CBE#Your powerful attack feeds your madness!" end if hateGain >= 0.1 then src.hate = math.min(src.max_hate, src.hate + hateGain) if hateMessage then - game.logPlayer(src, hateMessage.." (+%d hate)", hateGain) + game.logPlayer(src, ("%s (+%d hate)"):tformat(hateMessage), hateGain) end end end @@ -2767,7 +2772,7 @@ function _M:onTakeHit(value, src, death_note) a:removeAllMOs() a.x, a.y = nil, nil game.zone:addEntity(game.level, a, "actor", x, y) - game.logSeen(self, "%s splits in two!", self.name:capitalize()) + game.logSeen(self, "%s splits in two!", self:getName():capitalize()) value = value / 2 end end @@ -2784,8 +2789,8 @@ function _M:onTakeHit(value, src, death_note) self:incPsi(-damage_to_psi) end local mindcolor = DamageType:get(DamageType.MIND).text_color or "#aaaaaa#" - game:delayedLogMessage(self, nil, "Solipsism hit", mindcolor.."#Source# converts some damage to Psi!") - game:delayedLogDamage(src, self, damage_to_psi*psi_damage_resist, ("%s%d %s#LAST#"):format(mindcolor, damage_to_psi*psi_damage_resist, "to psi"), false) + game:delayedLogMessage(self, nil, "Solipsism hit", ("%s#Source# converts some damage to Psi!"):tformat(mindcolor)) + game:delayedLogDamage(src, self, damage_to_psi*psi_damage_resist, ("%s%d %s#LAST#"):tformat(mindcolor, damage_to_psi*psi_damage_resist, _t"to psi"), false) value = value - damage_to_psi end @@ -2827,7 +2832,7 @@ function _M:onTakeHit(value, src, death_note) self.life = 1 self:forceUseTalent(self.T_SECOND_LIFE, {ignore_energy=true}) local value = self:heal(sl, self) - game.logSeen(self, "#YELLOW#%s has been healed by a blast of positive energy!#LAST#", self.name:capitalize()) + game.logSeen(self, "#YELLOW#%s has been healed by a blast of positive energy!#LAST#", self:getName():capitalize()) if value > 0 then if self.player then self:setEmote(require("engine.Emote").new("The Sun Protects!", 45)) @@ -2848,7 +2853,7 @@ function _M:onTakeHit(value, src, death_note) if rng.percent(t.getChance(self, t)) then value = 0 self.life = self.max_life - game.logSeen(self, "%s fades for a moment and then reforms whole again!", self.name:capitalize()) + game.logSeen(self, "%s fades for a moment and then reforms whole again!", self:getName():capitalize()) game.level.map:particleEmitter(self.x, self.y, 1, "teleport_out") game:playSoundNear(self, "talents/heal") game.level.map:particleEmitter(self.x, self.y, 1, "teleport_in") @@ -2938,7 +2943,7 @@ function _M:onTakeHit(value, src, death_note) value = value - abs self:removeEffect(self.EFF_ELDRITCH_STONE) end - game:delayedLogDamage(src, self, 0, ("#SLATE#(%d to stone)#LAST#"):format(abs), false) + game:delayedLogDamage(src, self, 0, ("#SLATE#(%d to stone)#LAST#"):tformat(abs), false) end if self:knowTalent(self.T_STONESHIELD) and not self.turn_procs.stoneshield then @@ -2955,9 +2960,9 @@ function _M:onTakeHit(value, src, death_note) self:removeEffect(self.EFF_STONE_LINK) else game:delayedLogMessage(eff.src, self, "stone_link"..(self.uid or ""), "#OLIVE_DRAB##Source# redirects damage from #Target# to %s!#LAST#", string.his_her_self(eff.src)) - game:delayedLogDamage(src, self, 0, ("#OLIVE_DRAB#(%d redirected)#LAST#"):format(value), false) + game:delayedLogDamage(src, self, 0, ("#OLIVE_DRAB#(%d redirected)#LAST#"):tformat(value), false) eff.src:takeHit(value, src) - game:delayedLogDamage(src, eff.src, value, ("#OLIVE_DRAB#%d redirected#LAST#"):format(value), false) + game:delayedLogDamage(src, eff.src, value, ("#OLIVE_DRAB#%d redirected#LAST#"):tformat(value), false) value = 0 end end @@ -2992,7 +2997,7 @@ function _M:onTakeHit(value, src, death_note) -- Needs to be done last, will break if any damage is taken between doing this and updating the actor's life if self:attr("unstoppable") then if value > self.life - 1 then - game:delayedLogDamage(src, self, 0, ("#RED#(%d refused)#LAST#"):format(value - (self.life - 1)), false) + game:delayedLogDamage(src, self, 0, ("#RED#(%d refused)#LAST#"):tformat(value - (self.life - 1)), false) value = self.life - 1 if self.life <= 1 then value = 0 end game:delayedLogMessage(self, nil, "unstoppable", "#RED##Source# is unstoppable!") @@ -3100,9 +3105,9 @@ function _M:die(src, death_note) if self:attr("self_resurrect") and not self.no_resurrect then self.in_resurrect = true self:attr("self_resurrect", -1) - game.logSeen(self, self.self_resurrect_msg or "#LIGHT_RED#%s rises from the dead!", self.name:capitalize()) -- src, not self as the source, to make sure the player knows his doom ;> + game.logSeen(self, self.self_resurrect_msg or "#LIGHT_RED#%s rises from the dead!", self:getName():capitalize()) -- src, not self as the source, to make sure the player knows his doom ;> local sx, sy = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, "RESURRECT!", {255,120,0}) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, _t"RESURRECT!", {255,120,0}) local effs = {} @@ -3275,7 +3280,7 @@ function _M:die(src, death_note) if src and src.summoner and src.summoner_hate_per_kill then if src.summoner.knowTalent and src.summoner:knowTalent(src.summoner.T_HATE_POOL) then src.summoner.hate = math.min(src.summoner.max_hate, src.summoner.hate + src.summoner_hate_per_kill) - game.logPlayer(src.summoner, "%s feeds you hate from its latest victim. (+%d hate)", src.name:capitalize(), src.summoner_hate_per_kill) + game.logPlayer(src.summoner, "%s feeds you hate from its latest victim. (+%d hate)", src:getName():capitalize(), src.summoner_hate_per_kill) end end @@ -3906,7 +3911,7 @@ function _M:levelup() if self.level == 25 or self.level == 42 then self.unused_prodigies = self.unused_prodigies + 1 if self.player and not config.settings.cheat and not self.silent_levelup then - Dialog:simpleLongPopup("Prodigy!", ("You have achieved #LIGHT_GREEN#level %d#WHITE# and gained a #LIGHT_GREEN#prodigy point#LAST#!\n\nProdigies are powerful talents with unique requirements that cannot be unlearned."):format(self.level), 400) + Dialog:simpleLongPopup(_t"Prodigy!", ("You have achieved #LIGHT_GREEN#level %d#WHITE# and gained a #LIGHT_GREEN#prodigy point#LAST#!\n\nProdigies are powerful talents with unique requirements that cannot be unlearned."):tformat(self.level), 400) end end if self.level == 50 then @@ -3914,7 +3919,7 @@ function _M:levelup() self.unused_talents = self.unused_talents + 3 self.unused_generics = self.unused_generics + 3 if self.player and not config.settings.cheat and not self.silent_levelup then - Dialog:simpleLongPopup("Level 50!", "You have achieved #LIGHT_GREEN#level 50#WHITE#, congratulations!\n\nThis level is special, it granted you #LIGHT_GREEN#10#WHITE# more stat points, #LIGHT_GREEN#3#WHITE# more class talent points and #LIGHT_GREEN#3#WHITE# more generic talent points.\nNow go forward boldly and triumph!", 400) + Dialog:simpleLongPopup(_t"Level 50!", _t"You have achieved #LIGHT_GREEN#level 50#WHITE#, congratulations!\n\nThis level is special, it granted you #LIGHT_GREEN#10#WHITE# more stat points, #LIGHT_GREEN#3#WHITE# more class talent points and #LIGHT_GREEN#3#WHITE# more generic talent points.\nNow go forward boldly and triumph!", 400) end end elseif type(self.no_points_on_levelup) == "function" then @@ -3986,17 +3991,17 @@ function _M:levelup() -- Notify party levelups if self.x and self.y and game.party:hasMember(self) and not self.silent_levelup then local x, y = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(x, y, 80, 0.5, -2, "LEVEL UP!", {0,255,255}) - game.log("#00ffff#Welcome to level %d [%s].", self.level, self.name:capitalize()) - local more = "Press p to use them." - if game.player ~= self then more = "Select "..self.name.. " in the party list and press G to use them." end + game.flyers:add(x, y, 80, 0.5, -2, _t"LEVEL UP!", {0,255,255}) + game.log("#00ffff#Welcome to level %d [%s].", self.level, self:getName():capitalize()) + local more = _t"Press p to use them." + if game.player ~= self then more = ("Select %s in the party list and press G to use them."):tformat(self.name) end local points = {} - if self.unused_stats > 0 then points[#points+1] = ("%d stat point(s)"):format(self.unused_stats) end - if self.unused_talents > 0 then points[#points+1] = ("%d class talent point(s)"):format(self.unused_talents) end - if self.unused_generics > 0 then points[#points+1] = ("%d generic talent point(s)"):format(self.unused_generics) end - if self.unused_talents_types > 0 then points[#points+1] = ("%d category point(s)"):format(self.unused_talents_types) end - if self.unused_prodigies > 0 then points[#points+1] = ("#VIOLET#%d prodigies point(s)#WHITE#"):format(self.unused_prodigies) end - if #points > 0 then game.log("%s has %s to spend. %s", self.name:capitalize(), table.concat(points, ", "), more) end + if self.unused_stats > 0 then points[#points+1] = ("%d stat point(s)"):tformat(self.unused_stats) end + if self.unused_talents > 0 then points[#points+1] = ("%d class talent point(s)"):tformat(self.unused_talents) end + if self.unused_generics > 0 then points[#points+1] = ("%d generic talent point(s)"):tformat(self.unused_generics) end + if self.unused_talents_types > 0 then points[#points+1] = ("%d category point(s)"):tformat(self.unused_talents_types) end + if self.unused_prodigies > 0 then points[#points+1] = ("#VIOLET#%d prodigies point(s)#WHITE#"):tformat(self.unused_prodigies) end + if #points > 0 then game.log("%s has %s to spend. %s", self:getName():capitalize(), table.concat(points, ", "), more) end if self.level == 10 then world:gainAchievement("LEVEL_10", self) end if self.level == 20 then world:gainAchievement("LEVEL_20", self) end @@ -4131,7 +4136,7 @@ function _M:checkEncumbrance() if self.x and self.y then local sx, sy = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, rng.float(-2.5, -1.5), "+ENCUMBERED!", {255,0,0}, true) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, rng.float(-2.5, -1.5), _t"+ENCUMBERED!", {255,0,0}, true) end elseif self.encumbered and enc <= max then self:removeTemporaryValue("never_move", self.encumbered) @@ -4140,7 +4145,7 @@ function _M:checkEncumbrance() if self.x and self.y then local sx, sy = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, rng.float(-2.5, -1.5), "-ENCUMBERED!", {255,0,0}, true) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, rng.float(-2.5, -1.5), _t"-ENCUMBERED!", {255,0,0}, true) end end end @@ -4444,11 +4449,11 @@ function _M:quickSwitchWeapons(free_swap, message, silent) end end -- Special Messages - if #names == 0 then names = "unarmed" end + if #names == 0 then names = _t"unarmed" end if message == "warden" then - game.logSeen(self, "%s warps space-time to equip: %s.", self.name:capitalize(), names) + game.logSeen(self, "%s warps space-time to equip: %s.", self:getName():capitalize(), names) else - game.logSeen(self, "%s switches %s weapons to: %s.", self.name:capitalize(), self:his_her(), names) + game.logSeen(self, "%s switches %s weapons to: %s.", self:getName():capitalize(), self:his_her(), names) end end -- Make sure sustains are still active @@ -4910,7 +4915,7 @@ function _M:wearAllInventory(force, ...) self:addObject(self.INVEN_INVEN, worn) end if party then - game.logSeen(self, "%s wears %s%s.", self.name:capitalize(), o:getName({do_color=true, no_add_name=true}), type(worn) == "table" and (" (replacing %s)"):format(worn:getName({no_add_name=true})) or "") + game.logSeen(self, "%s wears %s%s.", self:getName():capitalize(), o:getName({do_color=true, no_add_name=true}), type(worn) == "table" and (" (replacing %s)"):format(worn:getName({no_add_name=true})) or "") end break end @@ -4957,7 +4962,7 @@ end --- Can we wear this item? function _M:canWearObject(o, try_slot) if self:attr("forbid_arcane") and o.power_source and o.power_source.arcane then - return nil, "antimagic" + return nil, _t"antimagic" end local oldreq @@ -5332,7 +5337,7 @@ function _M:paradoxDoAnomaly(chance, paradox, def) -- Be sure we found an anomaly first if ts[1] then local anom = rng.table(ts) - game.logSeen(self, "%s #LIGHT_STEEL_BLUE#Triggers an Anomaly! (%s).", self.name:capitalize(), self:getTalentDisplayName(self:getTalentFromId(anom))) + game.logSeen(self, "%s #LIGHT_STEEL_BLUE#Triggers an Anomaly! (%s).", self:getName():capitalize(), self:getTalentDisplayName(self:getTalentFromId(anom))) if anomaly_type ~= "major" then if self:attr("no_minor_anomalies") then anomaly_triggered = false @@ -5623,7 +5628,7 @@ function _M:preUseTalent(ab, silent, fake) end if self.forbid_talents and self.forbid_talents[ab.id] then - if not silent then game.logSeen(self, self.forbid_talents[ab.id] or "%s can not use %s.", self.name:capitalize(), ab.name) end + if not silent then game.logSeen(self, self.forbid_talents[ab.id] or "%s can not use %s.", self:getName():capitalize(), ab.name) end return false end @@ -5634,12 +5639,12 @@ function _M:preUseTalent(ab, silent, fake) return false end if not ab.never_fail and self:attr("feared") and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) then - if not silent then game.logSeen(self, "%s is too afraid to use %s.", self.name:capitalize(), ab.name) end + if not silent then game.logSeen(self, "%s is too afraid to use %s.", self:getName():capitalize(), ab.name) end return false end -- When silenced you can deactivate spells but not activate them if ab.no_silence and self:attr("silence") and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) then - if not silent then game.logSeen(self, "%s is silenced and cannot use %s.", self.name:capitalize(), ab.name) end + if not silent then game.logSeen(self, "%s is silenced and cannot use %s.", self:getName():capitalize(), ab.name) end return false end if ab.is_spell and self:attr("forbid_arcane") and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) then @@ -5648,16 +5653,16 @@ function _M:preUseTalent(ab, silent, fake) end -- Nature is forbidden to undead (just wild-gifts for now) if ab.is_nature and self:attr("forbid_nature") and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) then - if not silent then game.logSeen(self, "%s is too disconnected from Nature to use %s.", self.name:capitalize(), ab.name) end + if not silent then game.logSeen(self, "%s is too disconnected from Nature to use %s.", self:getName():capitalize(), ab.name) end return false end if ab.is_inscription and self.inscription_restrictions and not self.inscription_restrictions[ab.type[1]] then - if not silent then game.logSeen(self, "%s is unable to use this kind of inscription.", self.name:capitalize()) end + if not silent then game.logSeen(self, "%s is unable to use this kind of inscription.", self:getName():capitalize()) end return false end if ab.is_inscription and self.inscription_forbids and self.inscription_forbids[ab.type[1]] then - if not silent then game.logSeen(self, "%s is unable to use this kind of inscription.", self.name:capitalize()) end + if not silent then game.logSeen(self, "%s is unable to use this kind of inscription.", self:getName():capitalize()) end return false end @@ -5665,18 +5670,18 @@ function _M:preUseTalent(ab, silent, fake) if ab.is_unarmed and not (ab.mode == "sustained" and self:isTalentActive(ab.id)) then -- first check for heavy and massive armor if self:hasMassiveArmor() then - if not silent then game.logSeen(self, "%s is too heavily armoured to use this talent.", self.name:capitalize()) end + if not silent then game.logSeen(self, "%s is too heavily armoured to use this talent.", self:getName():capitalize()) end return false -- next make sure we're unarmed elseif not self:isUnarmed() then - if not silent then game.logSeen(self, "%s can't use this talent while holding a weapon or shield.", self.name:capitalize()) end + if not silent then game.logSeen(self, "%s can't use this talent while holding a weapon or shield.", self:getName():capitalize()) end return false end end -- Sleeping prevents the use of all non-instant talents if self:attr("sleep") and not self:attr("lucid_dreamer") and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) and util.getval(ab.no_energy, self, ab) ~= (true or "fake") then - if not silent then game.logPlayer(self, "%s is sleeping and unable to do this.", self.name:capitalize(), ab.name) end + if not silent then game.logPlayer(self, "%s is sleeping and unable to do this.", self:getName():capitalize(), ab.name) end return false end @@ -5693,7 +5698,7 @@ function _M:preUseTalent(ab, silent, fake) cost = self:alterTalentCost(ab, res_def.sustain_prop, cost) rmin, rmax = self[res_def.getMinFunction](self), self[res_def.getMaxFunction](self) if cost ~= 0 and self[res_def.minname] and self[res_def.maxname] and self[res_def.minname] + cost > self[res_def.maxname] then - if not silent then game.logPlayer(self, "You %s %s to activate %s.", res_def.invert_values and "have too much committed" or "do not have enough uncommitted", res_def.name, ab.name) end + if not silent then game.logPlayer(self, "You %s %s to activate %s.", res_def.invert_values and _t"have too much committed" or _t"do not have enough uncommitted", res_def.name, ab.name) end return false end end @@ -5763,7 +5768,7 @@ function _M:preUseTalent(ab, silent, fake) -- Spells can fail if (ab.is_spell and not self:isTalentActive(ab.id)) and not fake and self:attr("spell_failure") then if rng.percent(self:attr("spell_failure")) then - if not silent then game.logSeen(self, "%s's %s has been disrupted by #ORCHID#anti-magic forces#LAST#!", self.name:capitalize(), ab.name) end + if not silent then game.logSeen(self, "%s's %s has been disrupted by #ORCHID#anti-magic forces#LAST#!", self:getName():capitalize(), ab.name) end if not util.getval(ab.no_energy, self, ab) then if self:attr("scoundrel_failure") then local eff = self:hasEffect(self.EFF_FUMBLE) @@ -5782,7 +5787,7 @@ function _M:preUseTalent(ab, silent, fake) -- Nature can fail if (ab.is_nature and not self:isTalentActive(ab.id)) and not fake and self:attr("nature_failure") then if rng.percent(self:attr("nature_failure")) then - if not silent then game.logSeen(self, "%s's %s has been disrupted by #ORCHID#anti-nature forces#LAST#!", self.name:capitalize(), ab.name) end + if not silent then game.logSeen(self, "%s's %s has been disrupted by #ORCHID#anti-nature forces#LAST#!", self:getName():capitalize(), ab.name) end if not util.getval(ab.no_energy, self, ab) then self:useEnergy() else @@ -5814,7 +5819,7 @@ function _M:preUseTalent(ab, silent, fake) -- Confused ? lose a turn! if self:attr("confused") and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) and util.getval(ab.no_energy, self, ab) ~= true and not fake and not self:attr("force_talent_ignore_ressources") then if rng.percent(util.bound(self:attr("confused"), 0, 50)) then - if not silent then game.logSeen(self, "%s is confused and fails to use %s.", self.name:capitalize(), ab.name) end + if not silent then game.logSeen(self, "%s is confused and fails to use %s.", self:getName():capitalize(), ab.name) end if self:attr("scoundrel_failure") then local eff = self:hasEffect(self.EFF_FUMBLE) if eff then self:callEffect(self.EFF_FUMBLE, "do_Fumble") end @@ -5828,7 +5833,7 @@ function _M:preUseTalent(ab, silent, fake) if self:attr("talent_fail_chance") and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) and util.getval(ab.no_energy, self, ab) ~= true and not fake and not self:attr("force_talent_ignore_ressources") and not ab.innate then if rng.percent(self:attr("talent_fail_chance")) then -- Should this trigger callbackOnTalentDisturbed? - if not silent then game.logSeen(self, "%s fails to use %s.", self.name:capitalize(), ab.name) end + if not silent then game.logSeen(self, "%s fails to use %s.", self:getName():capitalize(), ab.name) end if self:attr("scoundrel_failure") then local eff = self:hasEffect(self.EFF_FUMBLE) if eff then self:callEffect(self.EFF_FUMBLE, "do_Fumble") end @@ -5842,7 +5847,7 @@ function _M:preUseTalent(ab, silent, fake) if self:attr("scoundrel_failure") and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) and util.getval(ab.no_energy, self, ab) ~= true and not fake and not self:attr("force_talent_ignore_ressources") then local eff = self:hasEffect(self.EFF_FUMBLE) if rng.percent(self:attr("scoundrel_failure")) then - if not silent then game.logSeen(self, "%s fumbles and fails to use %s, injuring %s!", self.name:capitalize(), ab.name, self:his_her_self()) end + if not silent then game.logSeen(self, "%s fumbles and fails to use %s, injuring %s!", self:getName():capitalize(), ab.name, self:his_her_self()) end self:useEnergy() self:fireTalentCheck("callbackOnTalentDisturbed", ab, eff) return false @@ -5850,7 +5855,7 @@ function _M:preUseTalent(ab, silent, fake) end if self:hasEffect(self.EFF_SENTINEL) and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) and util.getval(ab.no_energy, self, ab) ~= true and not fake and not self:attr("force_talent_ignore_ressources") then - if not silent then game.logSeen(self, "%s's %s is interrupted by the shot!", self.name:capitalize(), ab.name) end + if not silent then game.logSeen(self, "%s's %s is interrupted by the shot!", self:getName():capitalize(), ab.name) end self.tempeffect_def[self.EFF_SENTINEL].do_proc(self, self:hasEffect(self.EFF_SENTINEL)) self:useEnergy() self:fireTalentCheck("callbackOnTalentDisturbed", t) @@ -5887,18 +5892,18 @@ function _M:logTalentMessage(ab) end game.logSeen(self, color.."#{bold}#%s#{normal}##LAST#", self:useTalentMessage(ab)) elseif ab.mode == "sustained" then - game.logSeen(self, "%s %s #{bold}##ORANGE#%s#LAST#.", self.name:capitalize(), self:isTalentActive(ab.id) and "deactivates" or "activates", ab.name) + game.logSeen(self, "%s %s #{bold}##ORANGE#%s#LAST#.#{normal}#", self:getName():capitalize(), self:isTalentActive(ab.id) and _t"deactivates" or _t"activates", ab.name) elseif ab.is_spell then if ab.is_inscription then color = "#GREEN#" else color = "#PURPLE#" end - game.logSeen(self, "%s casts #{bold}#"..color.."%s.#{normal}##LAST#", self.name:capitalize(), ab.name) + game.logSeen(self, "%s casts #{bold}#%s%s.#{normal}##LAST#", self:getName():capitalize(), color, ab.name) else if ab.is_mind then color = "#YELLOW#" elseif ab.is_melee then color = "#RED#" elseif ab.is_inscription then color = "#GREEN#" end - game.logSeen(self, "%s uses #{bold}#"..color.."%s.#{normal}##LAST#", self.name:capitalize(), ab.name) + game.logSeen(self, "%s uses #{bold}#%s%s.#{normal}##LAST#", self:getName():capitalize(), color, ab.name) end end end @@ -6398,7 +6403,7 @@ function _M:postUseTalent(ab, ret, silent) end for t in rng.tableSampleIterator(tids, self:attr("random_talent_cooldown_on_use_nb")) do self:startTalentCooldown(t.id, self:attr("random_talent_cooldown_on_use_turns")) - game.logSeen(self, "%s talent '%s%s' is disrupted by the mind parasite.", self.name:capitalize(), (t.display_entity and t.display_entity:getDisplayString() or ""), t.name) + game.logSeen(self, "%s talent '%s%s' is disrupted by the mind parasite.", self:getName():capitalize(), (t.display_entity and t.display_entity:getDisplayString() or ""), t.name) end end @@ -6554,12 +6559,12 @@ function _M:getTalentFullDescription(t, addlevel, config, fake_mastery) end local d = tstring{} - d:add({"color",0x6f,0xff,0x83}, "Effective talent level: ", {"color",0x00,0xFF,0x00}, ("%.1f"):format(self:getTalentLevel(t)), true) + d:add({"color",0x6f,0xff,0x83}, _t"Effective talent level: ", {"color",0x00,0xFF,0x00}, ("%.1f"):format(self:getTalentLevel(t)), true) if not config.ignore_mode then - if t.mode == "passive" then d:add({"color",0x6f,0xff,0x83}, "Use mode: ", {"color",0x00,0xFF,0x00}, "Passive", true) - elseif t.mode == "sustained" then d:add({"color",0x6f,0xff,0x83}, "Use mode: ", {"color",0x00,0xFF,0x00}, "Sustained", true) - else d:add({"color",0x6f,0xff,0x83}, "Use mode: ", {"color",0x00,0xFF,0x00}, "Activated", true) + if t.mode == "passive" then d:add({"color",0x6f,0xff,0x83}, _t"Use mode: ", {"color",0x00,0xFF,0x00}, _t"Passive", true) + elseif t.mode == "sustained" then d:add({"color",0x6f,0xff,0x83}, _t"Use mode: ", {"color",0x00,0xFF,0x00}, _t"Sustained", true) + else d:add({"color",0x6f,0xff,0x83}, _t"Use mode: ", {"color",0x00,0xFF,0x00}, _t"Activated", true) end end @@ -6568,9 +6573,9 @@ function _M:getTalentFullDescription(t, addlevel, config, fake_mastery) d:add(true) end if not config.ignore_ressources then - if t.feedback then d:add({"color",0x6f,0xff,0x83}, "Feedback cost: ", {"color",0xFF, 0xFF, 0x00}, ""..math.round(util.getval(t.feedback, self, t) * (100 + 2 * self:combatFatigue()) / 100, 0.1), true) end - if t.fortress_energy then d:add({"color",0x6f,0xff,0x83}, "Fortress Energy cost: ", {"color",0x00,0xff,0xa0}, ""..math.round(t.fortress_energy, 0.1), true) end - if t.sustain_feedback then d:add({"color",0x6f,0xff,0x83}, "Sustain feedback cost: ", {"color",0xFF, 0xFF, 0x00}, ""..(util.getval(t.sustain_feedback, self, t)), true) end + if t.feedback then d:add({"color",0x6f,0xff,0x83}, _t"Feedback cost: ", {"color",0xFF, 0xFF, 0x00}, ""..math.round(util.getval(t.feedback, self, t) * (100 + 2 * self:combatFatigue()) / 100, 0.1), true) end + if t.fortress_energy then d:add({"color",0x6f,0xff,0x83}, _t"Fortress Energy cost: ", {"color",0x00,0xff,0xa0}, ""..math.round(t.fortress_energy, 0.1), true) end + if t.sustain_feedback then d:add({"color",0x6f,0xff,0x83}, _t"Sustain feedback cost: ", {"color",0xFF, 0xFF, 0x00}, ""..(util.getval(t.sustain_feedback, self, t)), true) end -- resource costs? for res, res_def in ipairs(_M.resources_def) do @@ -6580,22 +6585,22 @@ function _M:getTalentFullDescription(t, addlevel, config, fake_mastery) cost = self:alterTalentCost(t, res_def.short_name, cost) if cost ~= 0 then cost = cost * (util.getval(res_def.cost_factor, self, t, false, cost) or 1) - d:add({"color",0x6f,0xff,0x83}, ("%s %s: "):format(res_def.name:capitalize(), cost >= 0 and "cost" or "gain"), res_def.color or {"color",0xff,0xa8,0xa8}, ""..math.round(math.abs(cost), .1), true) + d:add({"color",0x6f,0xff,0x83}, ("%s %s: "):tformat(res_def.name:capitalize(), cost >= 0 and _t"cost" or _t"gain"), res_def.color or {"color",0xff,0xa8,0xa8}, ""..math.round(math.abs(cost), .1), true) end -- list sustain cost cost = t[res_def.sustain_prop] and util.getval(t[res_def.sustain_prop], self, t) or 0 cost = self:alterTalentCost(t, res_def.sustain_prop, cost) if cost ~= 0 then - d:add({"color",0x6f,0xff,0x83}, ("Sustain %s cost: "):format(res_def.name:lower()), res_def.color or {"color",0xff,0xa8,0xa8}, ""..math.round(cost, .1), true) + d:add({"color",0x6f,0xff,0x83}, ("Sustain %s cost: "):tformat(res_def.name:lower()), res_def.color or {"color",0xff,0xa8,0xa8}, ""..math.round(cost, .1), true) end -- list drain cost cost = t[res_def.drain_prop] and util.getval(t[res_def.drain_prop], self, t) or 0 cost = self:alterTalentCost(t, res_def.drain_prop, cost) if cost ~= 0 then if res_def.invert_values then - d:add({"color",0x6f,0xff,0x83}, ("%s %s: "):format(cost > 0 and "Generates" or "Removes", res_def.name:lower()), res_def.color or {"color",0xff,0xa8,0xa8}, ""..math.round(math.abs(cost), .1), true) + d:add({"color",0x6f,0xff,0x83}, ("%s %s: "):tformat(cost > 0 and _t"Generates" or _t"Removes", res_def.name:lower()), res_def.color or {"color",0xff,0xa8,0xa8}, ""..math.round(math.abs(cost), .1), true) else - d:add({"color",0x6f,0xff,0x83}, ("%s %s: "):format(cost > 0 and "Drains" or "Replenishes", res_def.name:lower()), res_def.color or {"color",0xff,0xa8,0xa8}, ""..math.round(math.abs(cost), .1), true) + d:add({"color",0x6f,0xff,0x83}, ("%s %s: "):tformat(cost > 0 and _t"Drains" or _t"Replenishes", res_def.name:lower()), res_def.color or {"color",0xff,0xa8,0xa8}, ""..math.round(math.abs(cost), .1), true) end end end @@ -6603,35 +6608,35 @@ function _M:getTalentFullDescription(t, addlevel, config, fake_mastery) self:triggerHook{"Actor:getTalentFullDescription:ressources", str=d, t=t, addlevel=addlevel, config=config, fake_mastery=fake_mastery} end if t.mode ~= "passive" then - if self:getTalentRange(t) > 1 then d:add({"color",0x6f,0xff,0x83}, "Range: ", {"color",0xFF,0xFF,0xFF}, ("%d"):format(self:getTalentRange(t)), true) - else d:add({"color",0x6f,0xff,0x83}, "Range: ", {"color",0xFF,0xFF,0xFF}, "melee/personal", true) + if self:getTalentRange(t) > 1 then d:add({"color",0x6f,0xff,0x83}, _t"Range: ", {"color",0xFF,0xFF,0xFF}, ("%d"):format(self:getTalentRange(t)), true) + else d:add({"color",0x6f,0xff,0x83}, _t"Range: ", {"color",0xFF,0xFF,0xFF}, _t"melee/personal", true) end if not config.ignore_ressources then - if self:getTalentCooldown(t) then d:add({"color",0x6f,0xff,0x83}, ("%sCooldown: "):format(t.fixed_cooldown and "Fixed " or ""), {"color",0xFF,0xFF,0xFF}, ""..self:getTalentCooldown(t), true) end + if self:getTalentCooldown(t) then d:add({"color",0x6f,0xff,0x83}, ("%sCooldown: "):tformat(t.fixed_cooldown and _t"Fixed " or ""), {"color",0xFF,0xFF,0xFF}, ""..self:getTalentCooldown(t), true) end end local speed = self:getTalentProjectileSpeed(t) - if speed then d:add({"color",0x6f,0xff,0x83}, "Travel Speed: ", {"color",0xFF,0xFF,0xFF}, ""..(speed * 100).."% of base", true) - else d:add({"color",0x6f,0xff,0x83}, "Travel Speed: ", {"color",0xFF,0xFF,0xFF}, "instantaneous", true) + if speed then d:add({"color",0x6f,0xff,0x83}, _t"Travel Speed: ", {"color",0xFF,0xFF,0xFF}, ("%d%% of base"):tformat(speed * 100), true) + else d:add({"color",0x6f,0xff,0x83}, _t"Travel Speed: ", {"color",0xFF,0xFF,0xFF}, _t"instantaneous", true) end if not config.ignore_use_time then - local uspeed = "Full Turn" + local uspeed = _t"Full Turn" local no_energy = util.getval(t.no_energy, self, t) local display_speed = util.getval(t.display_speed, self, t) if display_speed then uspeed = display_speed elseif no_energy and type(no_energy) == "boolean" and no_energy == true then - uspeed = "Instant (#LIGHT_GREEN#0%#LAST# of a turn)" + uspeed = _t"Instant (#LIGHT_GREEN#0%#LAST# of a turn)" else local speed = self:getTalentSpeed(t) local speed_type = self:getTalentSpeedType(t) if type(speed_type) == "string" then - speed_type = speed_type:capitalize() + speed_type = _t(speed_type):capitalize() else - speed_type = 'Special' + speed_type = _t'Special' end - uspeed = ("%s (#LIGHT_GREEN#%d%%#LAST# of a turn)"):format(speed_type, speed * 100) + uspeed = ("%s (#LIGHT_GREEN#%d%%#LAST# of a turn)"):tformat(speed_type, speed * 100) end - d:add({"color",0x6f,0xff,0x83}, "Usage Speed: ", {"color",0xFF,0xFF,0xFF}, uspeed, true) + d:add({"color",0x6f,0xff,0x83}, _t"Usage Speed: ", {"color",0xFF,0xFF,0xFF}, uspeed, true) if t.no_break_stealth ~= nil and no_energy ~= true and self:knowTalent(self.T_STEALTH) then local nbs, chance = t.no_break_stealth if type(t.no_break_stealth) == "function" then @@ -6642,13 +6647,13 @@ function _M:getTalentFullDescription(t, addlevel, config, fake_mastery) else chance = nbs and 100 or 0 end if chance > 0 then - d:add({"color",0x6f,0xff,0x83}, "Won't Break Stealth: ", {"color",0xFF,0xFF,0xFF}, ("%d%%"):format(chance), true) + d:add({"color",0x6f,0xff,0x83}, _t"Won't Break Stealth: ", {"color",0xFF,0xFF,0xFF}, ("%d%%"):format(chance), true) end end end else if not config.ignore_ressources then - if self:getTalentCooldown(t) then d:add({"color",0x6f,0xff,0x83}, ("%sCooldown: "):format(t.fixed_cooldown and "Fixed " or ""), {"color",0xFF,0xFF,0xFF}, ""..self:getTalentCooldown(t), true) end + if self:getTalentCooldown(t) then d:add({"color",0x6f,0xff,0x83}, ("%sCooldown: "):tformat(t.fixed_cooldown and _t"Fixed " or ""), {"color",0xFF,0xFF,0xFF}, ""..self:getTalentCooldown(t), true) end end end @@ -6657,20 +6662,20 @@ function _M:getTalentFullDescription(t, addlevel, config, fake_mastery) if t[is] then is_a[#is_a+1] = desc end end if #is_a > 0 then - d:add({"color",0x6f,0xff,0x83}, "Is: ", {"color",0xFF,0xFF,0xFF}, table.concatNice(is_a, ", ", " and "), true) + d:add({"color",0x6f,0xff,0x83}, _t"Is: ", {"color",0xFF,0xFF,0xFF}, table.concatNice(is_a, ", ", _t" and "), true) end if t.mode == 'sustained' then local replaces = self:getReplacedSustains(t) if #replaces > 0 then for k, v in pairs(replaces) do replaces[k] = self:getTalentFromId(v).name end - d:add({"color",0x6f,0xff,0x83}, "Will Deactivate: ", {"color",0xFF,0xFF,0xFF}, table.concat(replaces, ', '), true) + d:add({"color",0x6f,0xff,0x83}, _t"Will Deactivate: ", {"color",0xFF,0xFF,0xFF}, table.concat(replaces, ', '), true) end end self:triggerHook{"Actor:getTalentFullDescription", str=d, t=t, addlevel=addlevel, config=config, fake_mastery=fake_mastery} - d:add({"color",0x6f,0xff,0x83}, "Description: ", {"color",0xFF,0xFF,0xFF}) + d:add({"color",0x6f,0xff,0x83}, _t"Description: ", {"color",0xFF,0xFF,0xFF}) d:merge(t.info(self, t):toTString():tokenize(" ()[]")) self.talents[t.id] = old @@ -6792,31 +6797,31 @@ function _M:checkSetTalentAuto(tid, v, opt) if v then local doit = function() self:setTalentAuto(tid, true, opt) - Dialog:simplePopup("Automatic use enabled", t.name:capitalize().." will now be used as often as possible automatically.") + Dialog:simplePopup(_t"Automatic use enabled", ("%s will now be used as often as possible automatically."):tformat(t.name:capitalize())) end local list = {} - if util.getval(t.no_energy, self, t) ~= true then list[#list+1] = "- requires a turn to use" end - if self:getTalentRequiresTarget(t) then list[#list+1] = "- requires a target, your last hostile one will be automatically used" end + if util.getval(t.no_energy, self, t) ~= true then list[#list+1] = _t"- requires a turn to use" end + if self:getTalentRequiresTarget(t) then list[#list+1] = _t"- requires a target, your last hostile one will be automatically used" end if t.auto_use_warning then list[#list+1] = t.auto_use_warning end if opt == 2 then - list[#list+1] = "- will only trigger if no enemies are visible" - list[#list+1] = "- will automatically target you if a target is required" + list[#list+1] = _t"- will only trigger if no enemies are visible" + list[#list+1] = _t"- will automatically target you if a target is required" end - if opt == 3 then list[#list+1] = "- will only trigger if enemies are visible" end - if opt == 4 then list[#list+1] = "- will only trigger if enemies are visible and adjacent" end - if opt == 5 then list[#list+1] = "- will only trigger if you are not in combat" end + if opt == 3 then list[#list+1] = _t"- will only trigger if enemies are visible" end + if opt == 4 then list[#list+1] = _t"- will only trigger if enemies are visible and adjacent" end + if opt == 5 then list[#list+1] = _t"- will only trigger if you are not in combat" end if #list == 0 then doit() else - Dialog:yesnoLongPopup("Automatic use", t.name:capitalize()..":\n"..table.concat(list, "\n").."\n Are you sure?", 500, function(ret) + Dialog:yesnoLongPopup(_t"Automatic use", ("%s:\n%s\n Are you sure?"):tformat(t.name:capitalize(), table.concat(list, "\n")), 500, function(ret) if ret then doit() end end) end else self:setTalentAuto(tid, false) - Dialog:simplePopup("Automatic use disabled", t.name:capitalize().." will not be automatically used.") + Dialog:simplePopup(_t"Automatic use disabled", ("%s will not be automatically used."):tformat(t.name:capitalize())) end end @@ -7080,7 +7085,7 @@ function _M:suffocate(value, src, death_message) if self.air <= 0 then self.air = 0 if not self:hasEffect(self.EFF_SUFFOCATING) then - game.logSeen(self, "#LIGHT_RED#%s starts suffocating to death!", self.name:capitalize()) + game.logSeen(self, "#LIGHT_RED#%s starts suffocating to death!", self:getName():capitalize()) self:setEffect(self.EFF_SUFFOCATING, 1, {dam=20}) end return false, true @@ -7343,9 +7348,9 @@ function _M:on_set_temporary_effect(eff_id, e, p) local save_type = nil if p.apply_save then save_type = p.apply_save else save_type = save_for_effects[e.type] end - if save_type == "combatPhysicalResist" then p.save_string = "Physical save" - elseif save_type == "combatMentalResist" then p.save_string = "Mental save" - elseif save_type == "combatSpellResist" then p.save_string = "Spell save" + if save_type == "combatPhysicalResist" then p.save_string = _t"Physical save" + elseif save_type == "combatMentalResist" then p.save_string = _t"Mental save" + elseif save_type == "combatSpellResist" then p.save_string = _t"Spell save" end if e.status == "detrimental" then @@ -7359,11 +7364,11 @@ function _M:on_set_temporary_effect(eff_id, e, p) self:fireTalentCheck("callbackOnEffectSave", hd) saved, eff_id, e, p = hd.saved, hd.eff_id, hd.e, hd.p if saved then - self:logCombat(p.src, "#ORANGE#%s shrugs off %s '%s'!", self.name:capitalize(), p.src and "#Target#'s" or "the effect", e.desc) + self:logCombat(p.src, "#ORANGE#%s shrugs off %s '%s'!", self:getName():capitalize(), p.src and _t"#Target#'s" or _t"the effect", e.desc) return true end else - self:logCombat(p.src, "#LIGHT_UMBER#%s resists %s '%s'!", self.name:capitalize(), p.src and "#Target#'s" or "the effect", e.desc) + self:logCombat(p.src, "#LIGHT_UMBER#%s resists %s '%s'!", self:getName():capitalize(), p.src and _t"#Target#'s" or _t"the effect", e.desc) return true end end @@ -7471,9 +7476,9 @@ function _M:on_project_acquire(tx, ty, who, t, x, y, damtype, dam, particles, is local dir = game.level.map:compassDirection(mods.x-x, mods.y-y) if not dir then - dir = "but fumbles!" + dir = _t"but fumbles!" else - dir = "to the "..dir.."!" + dir = ("to the %s!"):tformat(dir) end self:logCombat(who, "#Source# deflects the projectile from #Target# %s", dir) return true @@ -7485,7 +7490,7 @@ end function _M:on_project(tx, ty, who, t, x, y, damtype, dam, particles) -- Spell reflect if self:attr("spell_reflect") and (t.talent and t.talent.reflectable and t.talent.is_spell) and rng.percent(self:attr("spell_reflect")) then - game.logSeen(self, "%s reflects the spell!", self.name:capitalize()) + game.logSeen(self, "%s reflects the spell!", self:getName():capitalize()) -- Setup the bypass so it does not eternally reflect between two actors t.bypass = true who:project(t, x, y, damtype, dam, particles) @@ -7494,7 +7499,7 @@ function _M:on_project(tx, ty, who, t, x, y, damtype, dam, particles) -- Spell absorb if self:attr("spell_absorb") and (t.talent and t.talent.is_spell) and rng.percent(self:attr("spell_absorb")) then - game.logSeen(self, "%s ignores the spell!", self.name:capitalize()) + game.logSeen(self, "%s ignores the spell!", self:getName():capitalize()) return true end @@ -7634,7 +7639,7 @@ function _M:doDrop(inven, item, on_done, nb) end if game.zone.wilderness then - Dialog:yesnoLongPopup("Warning", "Any item dropped on the world map will be lost forever.", 300, function(ret) + Dialog:yesnoLongPopup(_t"Warning", _t"Any item dropped on the world map will be lost forever.", 300, function(ret) -- The test is reversed because the buttons are reversed, to prevent mistakes if not ret then local o = self:getInven(inven) and self:getInven(inven)[item] @@ -7649,14 +7654,14 @@ function _M:doDrop(inven, item, on_done, nb) game.logPlayer(self, "You can not destroy %s.", o:getName{do_colour=true}) end end - end, "Cancel", "Destroy", true) + end, _t"Cancel", _t"Destroy", true) return end if nb == nil or nb >= self:getInven(inven)[item]:getNumber() then self:dropFloor(inven, item, true, true) else local stack = self:removeObject(inven, item, nb) - game.logSeen(self, "%s drops on the floor: %s.", self.name:capitalize(), stack:getName{do_color=true, do_count=true}) + game.logSeen(self, "%s drops on the floor: %s.", self:getName():capitalize(), stack:getName{do_color=true, do_count=true}) game.level.map:addObject(self.x, self.y, stack) end self:sortInven(inven) @@ -7775,7 +7780,7 @@ function _M:getEncumberTitleUpdator(title) elseif enc > max * 0.9 then color = "#ff8a00#" elseif enc > max * 0.75 then color = "#fcff00#" end - return ("%s - %sEncumbrance %d/%d"):format(title, color, enc, max) + return ("%s - %sEncumbrance %d/%d"):tformat(title, color, enc, max) end end @@ -7818,15 +7823,15 @@ function _M:transmoGetNumberItems() end function _M:transmoHelpPopup() - Dialog:simplePopup("Transmogrification Chest", "When you close the inventory window, all items in the chest will be transmogrified.") + Dialog:simplePopup(_t"Transmogrification Chest", _t"When you close the inventory window, all items in the chest will be transmogrified.") end function _M:transmoGetName() - return "Transmogrification Chest" + return _t"Transmogrification Chest" end function _M:transmoGetWord() - return "transmogrify" + return _t"transmogrify" end function _M:canUseTinker(tinker) diff --git a/game/modules/tome/class/BigNews.lua b/game/modules/tome/class/BigNews.lua index 1bc6794af3a8dc8e80dbe9092084a764c8113388..4384d2d57b4ed6ac2e2237d3ddfdaf2925ab543a 100644 --- a/game/modules/tome/class/BigNews.lua +++ b/game/modules/tome/class/BigNews.lua @@ -44,7 +44,7 @@ function _M:saySimple(time, txt, ...) end function _M:easingSimple(time, easing, txt, ...) - txt = txt:format(...) + txt = txt:tformat(...) self.max_time = time or 60 self.list, self.max_lines, self.max_w = self.font:draw(txt:toString(), math.floor(game.w * 0.8), 255, 255, 255) diff --git a/game/modules/tome/class/FortressPC.lua b/game/modules/tome/class/FortressPC.lua index ed6ef126b8499f7dbd85edf5525254b4d131ba69..49a574330e0f78d3663f565be81abd037732c408 100644 --- a/game/modules/tome/class/FortressPC.lua +++ b/game/modules/tome/class/FortressPC.lua @@ -29,7 +29,7 @@ module(..., package.seeall, class.inherit(mod.class.Player)) function _M:init(t, no_default) mod.class.Player.init(self, t, no_default) - self.name = "Yiilkgur, the Sher'Tul Fortress" + self.name = _t"Yiilkgur, the Sher'Tul Fortress" self.type = "construct" self.subtype = "fortress" self.size_category = 10 @@ -70,7 +70,7 @@ function _M:init(t, no_default) end function _M:tooltip(x, y, seen_by) - return tstring{{"color", "GOLD"}, self.name, {"color", "WHITE"}} + return tstring{{"color", "GOLD"}, self:getName(), {"color", "WHITE"}} end function _M:die(src, death_note) @@ -248,9 +248,9 @@ end -- Do not touch! function _M:block_move(x, y, e, act) if act and e == game.player then - Dialog:yesnoPopup(self.name, "Do you wish to teleport to the fortress?", function(ret) if ret then + Dialog:yesnoPopup(self.name, _t"Do you wish to teleport to the fortress?", function(ret) if ret then if not game.zone.wilderness then - Dialog:simplePopup(self.name, "The teleport fizzles!") + Dialog:simplePopup(self.name, _t"The teleport fizzles!") return end self:takeControl(e) diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 50f961bcae68a3a08bdce2ae75be5ccf50a38e93..42b231e35e5f80f6949b031ff0e20f3466cb8c03 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -101,7 +101,7 @@ end function _M:runReal() self.delayed_log_damage = {} self.delayed_log_messages = {} - self.calendar = Calendar.new("/data/calendar_allied.lua", "Today is the % %s of the %s year of the Age of Ascendancy of Maj'Eyal.\nThe time is %02d:%02d.", 122, 167, 11) + self.calendar = Calendar.new("/data/calendar_allied.lua", "Today is the %s %s of the %s year of the Age of Ascendancy of Maj'Eyal.\nThe time is %02d:%02d.", 122, 167, 11) self.uiset:activate() @@ -155,7 +155,7 @@ function _M:runReal() -- Create the map scroll text overlay local lfont = FontPackage:get("bignews", true) lfont:setStyle("bold") - local s = core.display.drawStringBlendedNewSurface(lfont, "<Scroll mode, press direction keys to scroll, press again to exit>", unpack(colors.simple(colors.GOLD))) + local s = core.display.drawStringBlendedNewSurface(lfont, _t"<Scroll mode, press direction keys to scroll, press again to exit>", unpack(colors.simple(colors.GOLD))) lfont:setStyle("normal") self.caps_scroll = {s:glTexture()} self.caps_scroll.w, self.caps_scroll.h = s:getSize() @@ -205,7 +205,7 @@ function _M:newGame() self.party:addMember(player, { control="full", type="player", - title="Main character", + title=_t"Main character", main=true, orders = {target=true, anchor=true, behavior=true, leash=true, talents=true}, }) @@ -261,12 +261,12 @@ function _M:newGame() local nb_unlocks, max_unlocks, categories = self:countBirthUnlocks() local unlocks_order = { class=1, race=2, cometic=3, other=4 } local unlocks = {} - for cat, d in pairs(categories) do unlocks[#unlocks+1] = {desc=d.nb.."/"..d.max.." "..cat, order=unlocks_order[cat] or 99} end + for cat, d in pairs(categories) do unlocks[#unlocks+1] = {desc=d.nb.."/"..d.max.." ".._t(cat), order=unlocks_order[cat] or 99} end table.sort(unlocks, "order") self.creating_player = true self.extra_birth_option_defs = {} self:triggerHook{"ToME:extraBirthOptions", options = self.extra_birth_option_defs} - local birth; birth = Birther.new("Character Creation ("..table.concat(table.extract_field(unlocks, "desc", ipairs), ", ").." unlocked options)", self.player, {"base", "world", "difficulty", "permadeath", "race", "subrace", "sex", "class", "subclass" }, function(loaded) + local birth; birth = Birther.new(("Character Creation ( %s unlocked options)"):tformat(table.concat(table.extract_field(unlocks, "desc", ipairs), ", ")), self.player, {"base", "world", "difficulty", "permadeath", "race", "subrace", "sex", "class", "subclass" }, function(loaded) if not loaded then self.calendar = Calendar.new("/data/calendar_"..(self.player.calendar or "allied")..".lua", "Today is the %s %s of the %s year of the Age of Ascendancy of Maj'Eyal.\nThe time is %02d:%02d.", 122, 167, 11) self.player:check("make_tile") @@ -308,7 +308,7 @@ function _M:newGame() self.paused = true print("[PLAYER BIRTH] resolved!") local birthend = function() - local d = require("engine.dialogs.ShowText").new("Welcome to #LIGHT_BLUE#Tales of Maj'Eyal", "intro-"..self.player.starting_intro, {name=self.player.name}, nil, nil, function() + local d = require("engine.dialogs.ShowText").new(_t"Welcome to #LIGHT_BLUE#Tales of Maj'Eyal", "intro-"..self.player.starting_intro, {name=self.player.name}, nil, nil, function() self.player:resetToFull() self.player:registerCharacterPlayed() self.player:onBirth(birth) @@ -790,10 +790,10 @@ function _M:getSaveDescription() description = ([[%s the level %d %s %s. Difficulty: %s / %s Campaign: %s -Exploring level %s of %s.]]):format( - player.name, player.level, player.descriptor.subrace, player.descriptor.subclass, - player.descriptor.difficulty, player.descriptor.permadeath, - player.descriptor.world, +Exploring level %s of %s.]]):tformat( + player.name, player.level, _t(player.descriptor.subrace), _t(player.descriptor.subclass), + _t(player.descriptor.difficulty), _t(player.descriptor.permadeath), + _t(player.descriptor.world), self.level and self.level.level or "--", self.zone and self.zone.name or "--" ), } @@ -802,14 +802,14 @@ end function _M:getVaultDescription(e) e = e:findMember{main=true} -- Because vault "chars" are actualy parties for tome return { - name = ([[%s the %s %s]]):format(e.name, e.descriptor.subrace, e.descriptor.subclass), + name = ([[%s the %s %s]]):tformat(e.name, _t(e.descriptor.subrace), _t(e.descriptor.subclass)), descriptors = e.descriptor, description = ([[%s the %s %s. Difficulty: %s / %s -Campaign: %s]]):format( - e.name, e.descriptor.subrace, e.descriptor.subclass, - e.descriptor.difficulty, e.descriptor.permadeath, - e.descriptor.world +Campaign: %s]]):tformat( + e.name, _t(e.descriptor.subrace), _t(e.descriptor.subclass), + _t(e.descriptor.difficulty), _t(e.descriptor.permadeath), + _t(e.descriptor.world) ), } end @@ -971,11 +971,11 @@ function _M:changeLevelFailure(lev, zone, params, level, old_zone, old_level) local to_re_add_actors = self.to_re_add_actors print("=====Level Generation Failure: Unable to create level", lev, "of zone:", failed_zone.short_name, "===") - local choices = {{name=("Stay: level %s of %s"):format(old_level.level, old_zone.name), choice="stay"}, - {name=("Keep Trying: level %s of %s"):format(lev, failed_zone.name), choice="try"}, - {name=("Log the problem, Stay: level %s of %s"):format(old_level.level, old_zone.name), choice="log"}} + local choices = {{name=("Stay: level %s of %s"):tformat(old_level.level, old_zone.name), choice="stay"}, + {name=("Keep Trying: level %s of %s"):tformat(lev, failed_zone.name), choice="try"}, + {name=("Log the problem, Stay: level %s of %s"):tformat(old_level.level, old_zone.name), choice="log"}} if config.settings.cheat then - table.insert(choices, {name="Debug the problem (move to the failed zone/level)", choice="debug"}) + table.insert(choices, {name=_t"Debug the problem (move to the failed zone/level)", choice="debug"}) end local function generation_dump() print("\n=====START Level Generation Failure Log=====\n") @@ -998,7 +998,7 @@ function _M:changeLevelFailure(lev, zone, params, level, old_zone, old_level) print("[changeLevelFailure]", sel.name) generation_dump() - Dialog:simplePopup("Information logged", "Information on the failed zone and level dumped to the log file.") + Dialog:simplePopup(_t"Information logged", _t"Information on the failed zone and level dumped to the log file.") elseif sel.choice == "debug" then print("[changeLevelFailure]", sel.name) generation_dump() @@ -1012,8 +1012,8 @@ function _M:changeLevelFailure(lev, zone, params, level, old_zone, old_level) print("[changeLevelFailure]", sel.name) end end - local text = ("The game could not generate level %s of %s after %s attempts. What do you want to do?"):format(lev, failed_zone.name, failed_zone._level_generation_count-1) - Dialog:multiButtonPopup("Level Generation Failure", text, + local text = ("The game could not generate level %s of %s after %s attempts. What do you want to do?"):tformat(lev, failed_zone.name, failed_zone._level_generation_count-1) + Dialog:multiButtonPopup(_t"Level Generation Failure", text, choices, math.max(500, game.w/2), nil, choice_handler, false, 1 -- default to stay on the previous level @@ -1095,7 +1095,7 @@ function _M:changeLevelReal(lev, zone, params) end end elseif params.temporary_zone_shift_back then -- We switch back - popup = Dialog:simpleWaiter("Loading level", "Please wait while loading the level...", nil, 10000) + popup = Dialog:simpleWaiter(_t"Loading level", _t"Please wait while loading the level...", nil, 10000) core.display.forceRedraw() if self.zone.zone_party then self.change_level_party_back = true end @@ -1145,9 +1145,9 @@ function _M:changeLevelReal(lev, zone, params) if self.zone.tier1 then if lev == 1 and game.state:tier1Killed(game.state.birth.start_tier1_skip or 3) then self.zone.tier1 = nil - Dialog:yesnoPopup("Easy!", "This zone is so easy for you that you can stroll to the last area with ease.", function(ret) if ret then + Dialog:yesnoPopup(_t"Easy!", _t"This zone is so easy for you that you can stroll to the last area with ease.", function(ret) if ret then game:changeLevel(self.zone.max_level) - end end, "Stroll", "Stay there") + end end, _t"Stroll", _t"Stay there") end end if type(self.zone.save_per_level) == "nil" then self.zone.save_per_level = config.settings.tome.save_zone_levels and true or false end @@ -1363,11 +1363,11 @@ function _M:changeLevelReal(lev, zone, params) local lev = self.zone.base_level + self.level.level - 1 if self.zone.level_adjust_level then lev = self.zone:level_adjust_level(self.level) end local diff = lev - self.player.level - if diff >= 5 then feeling = "You feel a thrill of terror and your heart begins to pound in your chest. You feel terribly threatened upon entering this area." - elseif diff >= 2 then feeling = "You feel mildly anxious, and walk with caution." + if diff >= 5 then feeling = _t"You feel a thrill of terror and your heart begins to pound in your chest. You feel terribly threatened upon entering this area." + elseif diff >= 2 then feeling = _t"You feel mildly anxious, and walk with caution." elseif diff >= -2 then feeling = nil - elseif diff >= -5 then feeling = "You feel very confident walking into this place." - else feeling = "You stride into this area without a second thought, while stifling a yawn. You feel your time might be better spent elsewhere." + elseif diff >= -5 then feeling = _t"You feel very confident walking into this place." + else feeling = _t"You stride into this area without a second thought, while stifling a yawn. You feel your time might be better spent elsewhere." end end if feeling then self.log("#TEAL#%s", feeling) end @@ -1450,7 +1450,7 @@ end function _M:chronoClone(name) self:getPlayer(true):attr("time_travel_times", 1) - local d = Dialog:simpleWaiter("Chronomancy", "Folding the space time structure...") + local d = Dialog:simpleWaiter(_t"Chronomancy", _t"Folding the space time structure...") local to_reload = {} for uid, e in pairs(self.level.entities) do @@ -1482,7 +1482,7 @@ function _M:chronoRestore(name, remove) else ngame = name end if not ngame then return false end - local d = Dialog:simpleWaiter("Chronomancy", "Unfolding the space time structure...") + local d = Dialog:simpleWaiter(_t"Chronomancy", _t"Unfolding the space time structure...") _G.game = ngame ngame:cloneReloaded() @@ -1623,30 +1623,31 @@ end -- @param style the message to display -- @param ... arguments to be passed to format for style -- @return the string with certain fields replaced: --- #source#|#Source# -> <displayString>..self.name|self.name:capitalize() --- #target#|#Target# -> target.name|target.name:capitalize() +-- #source#|#Source# -> <displayString>..self.name|self:getName():capitalize() +-- #target#|#Target# -> target.name|target:getName():capitalize() function _M:logMessage(source, srcSeen, target, tgtSeen, style, ...) - style = style:format(...) - local srcname = "something" + -- I18N + style = style:tformat(...) + local srcname = _t"something" local Dstring if source.player then srcname = "#fbd578#"..source.name.."#LAST#" elseif srcSeen then - srcname = engine.Entity.check(source, "getName") or source.name or "unknown" + srcname = engine.Entity.check(source, "getName") or source.name or _t"unknown" end - if srcname ~= "something" then Dstring = source.__is_actor and source.getDisplayString and source:getDisplayString() end - style = style:gsub("#source#", srcname) - style = style:gsub("#Source#", (Dstring or "")..srcname:capitalize()) - local tgtname = "something" + if srcname ~= _t"something" then Dstring = source.__is_actor and source.getDisplayString and source:getDisplayString() end + style = style:noun_sub("#source#", srcname) + style = style:noun_sub("#Source#", (Dstring or "")..srcname:capitalize()) + local tgtname = _t"something" if target then if target.player then tgtname = "#fbd578#"..target.name.."#LAST#" elseif tgtSeen then - tgtname = engine.Entity.check(target, "getName") or target.name or "unknown" + tgtname = engine.Entity.check(target, "getName") or target.name or _t"unknown" end end - style = style:gsub("#target#", tgtname) - style = style:gsub("#Target#", tgtname:capitalize()) + style = style:noun_sub("#target#", tgtname) + style = style:noun_sub("#Target#", tgtname:capitalize()) return style end @@ -1687,7 +1688,7 @@ function _M:displayDelayedLogDamage() for src, tgts in pairs(psrcs) do for target, dams in pairs(tgts) do if #dams.descs > 1 then - game.uiset.logdisplay(self:logMessage(src, dams.srcSeen, target, dams.tgtSeen, "#Source# hits #Target# for %s (#RED##{bold}#%0.0f#LAST##{normal}# total damage)%s.", table.concat(dams.descs, ", "), dams.total, dams.healing<0 and (" #LIGHT_GREEN#[%0.0f healing]#LAST#"):format(-dams.healing) or "")) + game.uiset.logdisplay(self:logMessage(src, dams.srcSeen, target, dams.tgtSeen, "#Source# hits #Target# for %s (#RED##{bold}#%0.0f#LAST##{normal}# total damage)%s.", table.concat(dams.descs, ", "), dams.total, dams.healing<0 and (" #LIGHT_GREEN#[%0.0f healing]#LAST#"):tformat(-dams.healing) or "")) else if dams.healing >= 0 then game.uiset.logdisplay(self:logMessage(src, dams.srcSeen, target, dams.tgtSeen, "#Source# hits #Target# for %s damage.", table.concat(dams.descs, ", "))) @@ -1703,8 +1704,8 @@ function _M:displayDelayedLogDamage() local sx, sy = self.level.map:getTileToScreen(x, y, true) if target.dead then if dams.tgtSeen and (rsrc == self.player or rtarget == self.player or self.party:hasMember(rsrc) or self.party:hasMember(rtarget)) then - self.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, rng.float(-2.5, -1.5), ("Kill (%d)!"):format(dams.total), {255,0,255}, true) - self:delayedLogMessage(target, nil, "death", self:logMessage(src, dams.srcSeen, target, dams.tgtSeen, "#{bold}##Source# killed #Target#!#{normal}#")) + self.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, rng.float(-2.5, -1.5), ("Kill (%d)!"):tformat(dams.total), {255,0,255}, true) + self:delayedLogMessage(target, nil, "death", self:logMessage(src, dams.srcSeen, target, dams.tgtSeen, _t"#{bold}##Source# killed #Target#!#{normal}#")) end elseif dams.total > 0 or dams.healing == 0 then if dams.tgtSeen and (rsrc == self.player or self.party:hasMember(rsrc)) then @@ -1942,8 +1943,8 @@ function _M:onRegisterDialog(d) self.tooltip2_x, self.tooltip2_y = nil, nil if self.player then self.player:updateMainShader() end --- if self.player and self.player.runStop then self.player:runStop("dialog poping up") end --- if self.player and self.player.restStop then self.player:restStop("dialog poping up") end +-- if self.player and self.player.runStop then self.player:runStop(_t"dialog poping up") end +-- if self.player and self.player.restStop then self.player:restStop(_t"dialog poping up") end end function _M:onUnregisterDialog(d) -- Clean up tooltip @@ -2123,7 +2124,7 @@ do return end self.log("You may not auto-explore this level.") elseif #seen > 0 then local dir = game.level.map:compassDirection(seen[1].x - self.player.x, seen[1].y - self.player.y) - self.log("You may not auto-explore with enemies in sight (%s to the %s%s)!", seen[1].actor.name, dir, self.level.map:isOnScreen(seen[1].x, seen[1].y) and "" or " - offscreen") + self.log("You may not auto-explore with enemies in sight (%s to the %s%s)!", seen[1].actor:getName(), dir, self.level.map:isOnScreen(seen[1].x, seen[1].y) and "" or " - offscreen") for _, node in ipairs(seen) do node.actor:addParticles(engine.Particles.new("notice_enemy", 1)) end @@ -2224,7 +2225,7 @@ do return end SHOW_INVENTORY = function() if self.player.no_inventory_access then return end local d - local titleupdator = self.player:getEncumberTitleUpdator("Inventory") + local titleupdator = self.player:getEncumberTitleUpdator(_t"Inventory") d = self.player:showEquipInven(titleupdator(), nil, function(o, inven, item, button, event) if not o then return end local ud = require("mod.dialogs.UseItemDialog").new(event == "button", self.player, o, item, inven, function(_, _, _, stop) @@ -2271,13 +2272,13 @@ do return end TOGGLE_AUTOTALENT = function() self.player.no_automatic_talents = not self.player.no_automatic_talents - game.log("#GOLD#Automatic talent usage: %s", not self.player.no_automatic_talents and "#LIGHT_GREEN#enabled" or "#LIGHT_RED#disabled") + game.log("#GOLD#Automatic talent usage: %s", not self.player.no_automatic_talents and _t"#LIGHT_GREEN#enabled" or _t"#LIGHT_RED#disabled") end, TOGGLE_AUTOACCEPT_TARGET = function() config.settings.auto_accept_target = not config.settings.auto_accept_target game:saveSettings("auto_accept_target", ("auto_accept_target = %s\n"):format(tostring(config.settings.auto_accept_target))) - game.log("#GOLD#Automatic accept target mode: %s", config.settings.auto_accept_target and "#LIGHT_GREEN#enabled" or "#LIGHT_RED#disabled") + game.log("#GOLD#Automatic accept target mode: %s", config.settings.auto_accept_target and _t"#LIGHT_GREEN#enabled" or _t"#LIGHT_RED#disabled") end, SAVE_GAME = function() @@ -2304,7 +2305,7 @@ do return end end, SHOW_MESSAGE_LOG = function() - self:registerDialog(require("mod.dialogs.ShowChatLog").new("Message Log", 0.6, self.uiset.logdisplay, profile.chat)) + self:registerDialog(require("mod.dialogs.ShowChatLog").new(_t"Message Log", 0.6, self.uiset.logdisplay, profile.chat)) end, -- Show time @@ -2353,14 +2354,14 @@ do return end local menu local l = { "resume", - { "Show Achievements", function() self:unregisterDialog(menu) self:registerDialog(require("mod.dialogs.ShowAchievements").new("Tales of Maj'Eyal Achievements", self.player)) end }, - { "Show known Lore", function() self:unregisterDialog(menu) self:registerDialog(require("mod.dialogs.ShowLore").new("Tales of Maj'Eyal Lore", self.party)) end }, - { "Show ingredients", function() self:unregisterDialog(menu) self:registerDialog(require("mod.dialogs.ShowIngredients").new(self.party)) end }, + { _t"Show Achievements", function() self:unregisterDialog(menu) self:registerDialog(require("mod.dialogs.ShowAchievements").new(_t"Tales of Maj'Eyal Achievements", self.player)) end }, + { _t"Show known Lore", function() self:unregisterDialog(menu) self:registerDialog(require("mod.dialogs.ShowLore").new(_t"Tales of Maj'Eyal Lore", self.party)) end }, + { _t"Show ingredients", function() self:unregisterDialog(menu) self:registerDialog(require("mod.dialogs.ShowIngredients").new(self.party)) end }, "highscores", - { "Inventory", function() self:unregisterDialog(menu) self.key:triggerVirtual("SHOW_INVENTORY") end }, - { "Character Sheet", function() self:unregisterDialog(menu) self.key:triggerVirtual("SHOW_CHARACTER_SHEET") end }, + { _t"Inventory", function() self:unregisterDialog(menu) self.key:triggerVirtual("SHOW_INVENTORY") end }, + { _t"Character Sheet", function() self:unregisterDialog(menu) self.key:triggerVirtual("SHOW_CHARACTER_SHEET") end }, "keybinds", - {"Game Options", function() self:unregisterDialog(menu) self:registerDialog(require("mod.dialogs.GameOptions").new()) end}, + {_t"Game Options", function() self:unregisterDialog(menu) self:registerDialog(require("mod.dialogs.GameOptions").new()) end}, "video", "sound", "save", @@ -2533,7 +2534,7 @@ function _M:setupMouse(reset) if config.settings.cheat then if button == "right" and core.key.modState("ctrl") and core.key.modState("shift") and core.key.modState("alt") and not xrel and not yrel and event == "button" and self.zone and not self.zone.wilderness then local target = game.level.map(tmx, tmy, Map.ACTOR) - if target then game._cheat_move_actor = target game.log("#GOLD#CHEAT MOVE ACTOR %s: ctrl+shift+alt+right click on an empty map spot to move it", target.name) + if target then game._cheat_move_actor = target game.log("#GOLD#CHEAT MOVE ACTOR %s: ctrl+shift+alt+right click on an empty map spot to move it", target:getName()) elseif game._cheat_move_actor then game._cheat_move_actor:move(tmx, tmy, true) end return elseif button == "right" and core.key.modState("ctrl") and core.key.modState("shift") and not xrel and not yrel and event == "button" and self.zone and not self.zone.wilderness then @@ -2625,11 +2626,11 @@ end --- Ask if we really want to close, if so, save the game first function _M:onQuit() - self.player:runStop("quitting") - self.player:restStop("quitting") + self.player:runStop(_t"quitting") + self.player:restStop(_t"quitting") if not self.quit_dialog and not self.player.dead and not self:hasDialogUp() then - self.quit_dialog = Dialog:yesnoPopup("Save and go back to main menu?", "Save and go back to main menu?", function(ok) + self.quit_dialog = Dialog:yesnoPopup(_t"Save and go back to main menu?", _t"Save and go back to main menu?", function(ok) if ok then -- savefile_pipe is created as a global by the engine self:saveGame() @@ -2641,11 +2642,11 @@ function _M:onQuit() end function _M:onExit() - self.player:runStop("quitting") - self.player:restStop("quitting") + self.player:runStop(_t"quitting") + self.player:restStop(_t"quitting") if not self.quit_dialog and not self.player.dead and not self:hasDialogUp() then - self.quit_dialog = Dialog:yesnoPopup("Save and exit game?", "Save and exit game?", function(ok) + self.quit_dialog = Dialog:yesnoPopup(_t"Save and exit game?", _t"Save and exit game?", function(ok) if ok then -- savefile_pipe is created as a global by the engine self:saveGame() @@ -2680,8 +2681,8 @@ end --- When a save is being made, stop running/resting function _M:onSavefilePush() - self.player:runStop("saving") - self.player:restStop("saving") + self.player:runStop(_t"saving") + self.player:restStop(_t"saving") end --- When a save has been done, if it's a zone or level, also save the main game @@ -2793,7 +2794,7 @@ end function _M:unlockBackground(kind, name) if not config.settings['unlock_background_'..kind] then - game.log("#ANTIQUE_WHITE#Splash screen unlocked: #GOLD#"..name) + game.log("#ANTIQUE_WHITE#Splash screen unlocked: #GOLD#%s", name) end config.settings['unlock_background_'..kind] = true local save = {} diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index 1fe2aacc195f0ab711815eb2ace5251736e5a3df..ca08d3532c9a81c4420f700c461d6d321522c8a8 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -236,7 +236,7 @@ local randart_name_rules = { } --- Unided name possibilities for randarts -local unided_names = {"glowing","scintillating","rune-covered","unblemished","jewel-encrusted","humming","gleaming","immaculate","flawless","crackling","glistening","plated","twisted","silvered","faceted","faded","sigiled","shadowy","laminated"} +local unided_names = {_t"glowing",_t"scintillating",_t"rune-covered",_t"unblemished",_t"jewel-encrusted",_t"humming",_t"gleaming",_t"immaculate",_t"flawless",_t"crackling",_t"glistening",_t"plated",_t"twisted",_t"silvered",_t"faceted",_t"faded",_t"sigiled",_t"shadowy",_t"laminated"} --- defined power themes, affects equipment generation _M.power_themes = { @@ -372,6 +372,9 @@ function _M:updatePowers(forbid_ps, allow_ps, randthemes, force_themes) return not_ps, yes_ps, themes end +function _M:getRandartNameRule() + return _getFlagI18N("randart_name_rules") or randart_name_rules +end --- Generate randarts for this state with optional parameters: -- @param data.base = base object to add powers to (base.randart_able must be defined) <random object> -- @param data.base_filter = filter passed to makeEntity when making base object @@ -483,7 +486,7 @@ function _M:generateRandart(data) for i = 1, nb_powers do local p = game.zone:pickEntity(lst) if p then - for t, _ in pairs(p.theme) do if themes[t] and randart_name_rules[t] then power_themes[t] = (power_themes[t] or 0) + 1 end end + for t, _ in pairs(p.theme) do if themes[t] and self:getRandartNameRule()[t] then power_themes[t] = (power_themes[t] or 0) + 1 end end powers[#powers+1] = p:clone() end end @@ -496,25 +499,25 @@ function _M:generateRandart(data) ----------------------------------------------------------- local themename = power_themes[#power_themes] themename = themename and themename[1] or nil - local ngd = NameGenerator.new(rng.chance(2) and randart_name_rules.default or randart_name_rules.default2) - local ngt = (themename and randart_name_rules[themename] and NameGenerator.new(randart_name_rules[themename])) or ngd + local ngd = NameGenerator.new(rng.chance(2) and self:getRandartNameRule().default or self:getRandartNameRule().default2) + local ngt = (themename and self:getRandartNameRule()[themename] and NameGenerator.new(self:getRandartNameRule()[themename])) or ngd local name local namescheme = data.namescheme or ((ngt ~= ngd) and rng.range(1, 4) or rng.range(1, 3)) if namescheme == 1 then - name = "%s '"..ngt:generate().."'" + name = ("%s '%s'"):tformat("%s", ngt:generate()) elseif namescheme == 2 then - name = ngt:generate().." the %s" + name = ("%s the %s"):tformat(ngt:generate(),"%s") elseif namescheme == 3 then name = ngt:generate() elseif namescheme == 4 then - name = ngd:generate().." the "..ngt:generate() + name = ("%s the %s"):tformat(ngd:generate(),ngt:generate()) end o.unided_namescheme = rng.table(unided_names).." %s" - o.unided_name = o.unided_namescheme:format(o.unided_name or o.name) + o.unided_name = o.unided_namescheme:format(_t(o.unided_name) or _t(o.name)) o.namescheme = name o.define_as = name:format(o.name):upper():gsub("[^A-Z]", "_") o.unique = name:format(o.name) - o.name = name:format(o.name) + o.name = name:format(o:getName{trans_only=true}) o.randart = true o.no_unique_lore = true o.rarity = rng.range(200, 290) @@ -811,7 +814,7 @@ function _M:spawnWorldAmbush(enc, dx, dy, kind) terrains[gen.up].change_level_shift_back = true local zone = mod.class.Zone.new("ambush", { - name = "Ambush!", + name = _t"Ambush!", level_range = {game.player.level, game.player.level}, level_scheme = "player", max_level = 1, @@ -859,7 +862,7 @@ function _M:spawnWorldAmbush(enc, dx, dy, kind) game.player.energy.value = game.energy_to_act game.paused = true game:changeLevel(1, zone, {temporary_zone_shift=true}) - engine.ui.Dialog:simplePopup("Ambush!", "You have been ambushed!") + engine.ui.Dialog:simplePopup(_t"Ambush!", _t"You have been ambushed!") end) end @@ -1975,7 +1978,7 @@ function _M:createRandomZone(zbase) ------------------------------------------------------------ -- Name ------------------------------------------------------------ - local ngd = NameGenerator.new(randart_name_rules.default2) + local ngd = NameGenerator.new(self:getRandartNameRule().default2) local name = ngd:generate() local short_name = name:lower():gsub("[^a-z]", "_") @@ -2310,13 +2313,13 @@ function _M:createRandomBoss(base, data) ngd = NameGenerator2.new("/data/languages/names/"..base.random_name_def:gsub("#sex#", base.female and "female" or "male")..".txt") name = ngd:generate(nil, base.random_name_min_syllables, base.random_name_max_syllables) else - ngd = NameGenerator.new(randart_name_rules.default) + ngd = NameGenerator.new(self:getRandartNameRule().default) name = ngd:generate() end if data.name_scheme then - b.name = data.name_scheme:gsub("#rng#", name):gsub("#base#", b.name) + b.name = data.name_scheme:gsub("#rng#", name):gsub("#base#", _t(b.name)) else - b.name = name.." the "..b.name + b.name = ("%s the %s"):tformat(name,_t(b.name)) end print("[createRandomBoss] Creating random boss ", b.name, data.level, "level", data.nb_classes, "classes") if data.force_classes then print(" * force_classes:", (string.fromTable(data.force_classes))) end @@ -2688,13 +2691,13 @@ function _M:createRandomBossNew(base, data) ngd = NameGenerator2.new("/data/languages/names/"..base.random_name_def:gsub("#sex#", base.female and "female" or "male")..".txt") name = ngd:generate(nil, base.random_name_min_syllables, base.random_name_max_syllables) else - ngd = NameGenerator.new(randart_name_rules.default) + ngd = NameGenerator.new(self:getRandartNameRule().default) name = ngd:generate() end if data.name_scheme then - b.name = data.name_scheme:gsub("#rng#", name):gsub("#base#", b.name) + b.name = data.name_scheme:gsub("#rng#", name):gsub("#base#", _t(b.name)) else - b.name = name.." the "..b.name + b.name = ("%s the %s"):tformat(name, _t(b.name)) end print("Creating random boss ", b.name, data.level, "level", data.nb_classes, "classes") if data.force_classes then print(" * force_classes:", (string.fromTable(data.force_classes))) end @@ -3251,7 +3254,7 @@ function _M:makeChallengeQuest(level, name, desc, data, alter_effect) if p:hasQuest(qid) then return end -- sanity check local q = { id = qid, - name = "Infinite Dungeon Challenge (Level "..level.level.."): "..name, + name = ("Infinite Dungeon Challenge (Level %s): %s"):tformat(level.level, name), use_ui = "quest-idchallenge", challenge_desc = desc, check_level = level, -- level the quest is granted for @@ -3323,7 +3326,7 @@ function _M:infiniteDungeonChallengeFinish(zone, level) if id_challenge == "pacifist" then level.data.record_player_kills = 0 - self:makeChallengeQuest(level, "Pacifist", "Leave the level (to the next level) without killing a single creature. You will get #{italic}#two#{normal}# rewards.", { + self:makeChallengeQuest(level, _t"Pacifist", _t"Leave the level (to the next level) without killing a single creature. You will get #{italic}#two#{normal}# rewards.", { on_exit_check = function(self, who) if not self.check_level then return end if self.check_level.data.record_player_kills == 0 then who:setQuestStatus(self.id, self.COMPLETED) end @@ -3342,12 +3345,12 @@ function _M:infiniteDungeonChallengeFinish(zone, level) end return nb end - self:makeChallengeQuest(level, "Exterminator", "Exterminate every foe on the level.", { + self:makeChallengeQuest(level, _t"Exterminator", _t"Exterminate every foe on the level.", { enemies_left = enemies_left, dynamic_desc = function(self, desc, who) if not self.check_level then return end local nb = self:enemies_left(who) - desc[#desc+1] = "Foes left: #LIGHT_RED#"..nb + desc[#desc+1] = ("Foes left: #LIGHT_RED#%s"):tformat(nb) end, on_grant = function(self, who) game:onTickEnd(function() @@ -3355,7 +3358,7 @@ function _M:infiniteDungeonChallengeFinish(zone, level) for uid, e in pairs(self.check_level.entities) do if who:reactionToward(e) < 0 then e[self.id] = true - e.desc = "#LIGHT_RED#EXTERMINATE THIS FOE#LAST#\n"..(e.desc or "") + e.desc = ("#LIGHT_RED#EXTERMINATE THIS FOE#LAST#\n%s"):tformat(e.desc or "") end end end) @@ -3376,10 +3379,10 @@ function _M:infiniteDungeonChallengeFinish(zone, level) local path = a:calc(level.default_up.x, level.default_up.y, level.default_down.x, level.default_down.y) if path and #path > 5 then local turns = #path * 3 + 20 - self:makeChallengeQuest(level, "Rush Hour ("..turns..")", "Proceed directly to the next Infinite Dungeon level in less than "..turns.." turns (an exit is revealed on your map).", { + self:makeChallengeQuest(level, ("Rush Hour (%d)"):tformat(turns), ("Proceed directly to the next Infinite Dungeon level in less than %d turns (an exit is revealed on your map)."):tformat(turns), { turns_left = turns, dynamic_desc = function(self, desc) - desc[#desc+1] = "Turns left: #LIGHT_GREEN#"..self.turns_left + desc[#desc+1] = ("Turns left: #LIGHT_GREEN#%d"):tformat(self.turns_left) end, on_exit_check = function(self, who) if self.turns_left >= 0 then @@ -3403,7 +3406,7 @@ function _M:infiniteDungeonChallengeFinish(zone, level) self:locationRevealAround(level.default_down.x, level.default_down.y) level.turn_counter = turns * 10 level.max_turn_counter = turns * 10 - level.turn_counter_desc = "Proceed to the next Infinite Dungeon level! An exit has been marked on your map." + level.turn_counter_desc = _t"Proceed to the next Infinite Dungeon level! An exit has been marked on your map." end elseif id_challenge == "dream-horror" then local m = zone:makeEntity(level, "actor", {name="dreaming horror", random_boss=true}, nil, true) @@ -3415,7 +3418,7 @@ function _M:infiniteDungeonChallengeFinish(zone, level) tries = tries + 1 end if tries < 100 then - local q = self:makeChallengeQuest(level, "Dream Hunter", "Wake up and kill the dreaming horror boss '"..m.name.."'.", { + local q = self:makeChallengeQuest(level, _t"Dream Hunter", ("Wake up and kill the dreaming horror boss '%s'."):tformat(m.name), { on_exit_check = function(self, who) if not self:isEnded() then who:setQuestStatus(self.id, self.FAILED) end end @@ -3435,7 +3438,7 @@ function _M:infiniteDungeonChallengeFinish(zone, level) ) if x and y then print("[Infinite Dungeon Challenge] spawning Mirror-Match at", x, y) - local q = self:makeChallengeQuest(level, "Mirror Match", "Find, challenge, and kill your mirror clone on the level.", { + local q = self:makeChallengeQuest(level, _t"Mirror Match", _t"Find, challenge, and kill your mirror clone on the level.", { on_exit_check = function(self, who) if not self:isEnded() then who:setQuestStatus(self.id, self.FAILED) end end, @@ -3450,9 +3453,9 @@ function _M:infiniteDungeonChallengeFinish(zone, level) a.energy.value = 0 a.player = nil a.rank = 4 - a.desc = "An evil twin of "..a.name..(a.desc and ":\n"..a.desc or "") - a.name = "Mirror Challenge of "..a.name - a.killer_message = "but nobody knew why #sex# suddenly became evil" + a.desc = ("An evil twin of %s%s"):tformat(a.name, (a.desc and ":\n"..a.desc or "")) + a.name = ("Mirror Challenge of %s"):tformat(a.name) + a.killer_message = _t"but nobody knew why #sex# suddenly became evil" a.color_r = 150 a.color_g = 150 a.color_b = 150 a:removeAllMOs() a.ai = "none" @@ -3470,10 +3473,10 @@ function _M:infiniteDungeonChallengeFinish(zone, level) a.on_bump = function(self, who) local p = game:getPlayer(true) if who ~= p then - game.logPlayer(who, "#ORCHID#%s does not recognize you.", self.name:capitalize()) + game.logPlayer(who, "#ORCHID#%s does not recognize you.", self:getName():capitalize()) return end - require("engine.ui.Dialog"):yesnoPopup("Challenge: #PURPLE#Mirror Match", "Challenge your mirror clone and triumph!", function(r) if not r then + require("engine.ui.Dialog"):yesnoPopup(_t"Challenge: #PURPLE#Mirror Match", _t"Challenge your mirror clone and triumph!", function(r) if not r then self:attr("invulnerable", -1) self:attr("negative_status_effect_immune", -1) self:attr("stealth", 1000) @@ -3483,7 +3486,7 @@ function _M:infiniteDungeonChallengeFinish(zone, level) self:setTarget(p) self:teleportRandom(p.x, p.y, 20, 10) game.bignews:say(60, "#CRIMSON#The Fight Is Joined!") - end end, "Refuse", "Accept", true) + end end, _t"Refuse", _t"Accept", true) end a.on_die = function(self, who) who:setQuestStatus(self.id_challenge_quest, engine.Quest.COMPLETED) @@ -3508,21 +3511,21 @@ function _M:infiniteDungeonChallengeFinish(zone, level) end end elseif id_challenge == "near-sighted" then - Dialog:yesnoPopup("Challenge: #PURPLE#Near Sighted", "Proceed to the next Infinite Dungeon level with -7 sight range for a reward.", function(r) if not r then - self:makeChallengeQuest(level, "Near Sighted", "Proceed to the next Infinite Dungeon level with -7 sight range.", { + Dialog:yesnoPopup(_t"Challenge: #PURPLE#Near Sighted", _t"Proceed to the next Infinite Dungeon level with -7 sight range for a reward.", function(r) if not r then + self:makeChallengeQuest(level, _t"Near Sighted", _t"Proceed to the next Infinite Dungeon level with -7 sight range.", { on_exit_check = function(self, who) who:setQuestStatus(self.id, self.COMPLETED) end, }, function(actor, eff) actor:effectTemporaryValue(eff, "sight", -7) end) - end end, "Refuse", "Accept", true) + end end, _t"Refuse", _t"Accept", true) elseif id_challenge == "multiplicity" then local turns = level.map.h + level.map.w - Dialog:yesnoPopup("Challenge: #PURPLE#Multiplicity", "All foes (including bosses) gain the ability to multiply up to 3 times. You must survive for at least "..turns.." turns before exiting.", function(r) if not r then - self:makeChallengeQuest(level, "Multiplicity", "All foes have the multiply talent!", { + Dialog:yesnoPopup(_t"Challenge: #PURPLE#Multiplicity", ("All foes (including bosses) gain the ability to multiply up to 3 times. You must survive for at least %d turns before exiting."):tformat(turns), function(r) if not r then + self:makeChallengeQuest(level, _t"Multiplicity", _t"All foes have the multiply talent!", { turns_left = turns, dynamic_desc = function(self, desc) - desc[#desc+1] = "Turns left: #LIGHT_GREEN#"..math.max(0, self.turns_left) + desc[#desc+1] = ("Turns left: #LIGHT_GREEN#%d"):tformat(math.max(0, self.turns_left)) end, on_exit_check = function(self, who) if who.dead and not self:isEnded() then who:setQuestStatus(self.id, self.FAILED); return end @@ -3554,8 +3557,8 @@ function _M:infiniteDungeonChallengeFinish(zone, level) end) level.turn_counter = turns * 10 level.max_turn_counter = turns * 10 - level.turn_counter_desc = "Survive the multiplicative madness!." - end end, "Refuse", "Accept", true) + level.turn_counter_desc = _t"Survive the multiplicative madness!." + end end, _t"Refuse", _t"Accept", true) elseif id_challenge == "headhunter" then local mlist = {} -- add random elite "spawns of Urh'Rok" for i = 1, rng.range(2, 4) do @@ -3566,7 +3569,7 @@ function _M:infiniteDungeonChallengeFinish(zone, level) loot_quantity=2, nb_rares=2, -- make this difficult challenge (usually) worth trying and failing no_loot_randart=true, - name_scheme = "#rng# the Spawn of Urh'Rok", + name_scheme = _t"#rng# the Spawn of Urh'Rok", }}, nil, true) if m then local x, y = self:findEventGrid(level, function(self, level, x, y) @@ -3581,18 +3584,18 @@ function _M:infiniteDungeonChallengeFinish(zone, level) end end if #mlist > 0 then - Dialog:yesnoPopup("Challenge: #PURPLE#Headhunter", "Kill "..#mlist.." spawns of Urh'Rok on the level before killing any other elite (or higher rank) creatures, for an uncommon reward.", function(r) + Dialog:yesnoPopup(_t"Challenge: #PURPLE#Headhunter", ("Kill %d spawns of Urh'Rok on the level before killing any other elite (or higher rank) creatures, for an uncommon reward."):tformat(#mlist), function(r) if not r then - local quest = self:makeChallengeQuest(level, "Headhunter", "Kill "..#mlist.." spawns of Urh'Rok on the level before killing any elite creatures.", { + local quest = self:makeChallengeQuest(level, _t"Headhunter", ("Kill %d spawns of Urh'Rok on the level before killing any elite creatures."):tformat(#mlist), { dynamic_desc = function(self, desc) - desc[#desc+1] = ("%d / %d demon spawn killed."):format(self.nb_killed, self.to_kill) + desc[#desc+1] = ("%d / %d demon spawn killed."):tformat(self.nb_killed, self.to_kill) end, nb_killed = 0, to_kill = #mlist, mlist = mlist, on_kill_foe = function(self, who, target) if self:isEnded() then return end if target.is_headhunter_npc then -- killed target spawn self.nb_killed = self.nb_killed + 1 - game.bignews:say(60, "#ORCHID#You claim the head of "..target.name..", giving pause to all foes on the level.") + game.bignews:say(60, "#ORCHID#You claim the head of %s, giving pause to all foes on the level.", target:getName()) if self.nb_killed >= self.to_kill then who:setQuestStatus(self.id, self.COMPLETED) end @@ -3630,7 +3633,7 @@ function _M:infiniteDungeonChallengeFinish(zone, level) else for _, m in ipairs(mlist) do m:disappear() m:removed() end end - end, "Refuse", "Accept", true) + end, _t"Refuse", _t"Accept", true) end else self:triggerHook{"InfiniteDungeon:setupChallenge", id_challenge=id_challenge, zone=zone, level=level} @@ -3641,7 +3644,7 @@ end --- Grant (random) awards for an id-challenge quest function _M:infiniteDungeonChallengeReward(quest, who) local rewards = { - {name = "Random Artifact", id="randart", rarity=1, + {name = _t"Random Artifact", id="randart", rarity=1, give=function(who) local tries = 100 -- make sure randart is compatible with recipient @@ -3654,7 +3657,7 @@ function _M:infiniteDungeonChallengeReward(quest, who) o:identify(true) who:addObject(who.INVEN_INVEN, o) who:sortInven() - return "Random Artifact: "..o:getName{do_color=true} + return ("Random Artifact: %s"):tformat(o:getName{do_color=true}) end tries = tries - 1 end @@ -3662,17 +3665,17 @@ function _M:infiniteDungeonChallengeReward(quest, who) who.unused_stats = who.unused_stats + 3 return "+3 Stat Points" end}, - {name = "+3 Stat Points", id="stat_pts", rarity=3, give=function(who) who.unused_stats = who.unused_stats + 3 end}, - {name = "+1 Class Point", id="class_pt", rarity=5, give=function(who) who.unused_talents = who.unused_talents + 1 end}, - {name = "+1 Generic Point", id="generic_pt", rarity=4, give=function(who) who.unused_generics = who.unused_generics + 1 end}, - {name = "+1 Category Point", id="category_pt", + {name = _t"+3 Stat Points", id="stat_pts", rarity=3, give=function(who) who.unused_stats = who.unused_stats + 3 end}, + {name = _t"+1 Class Point", id="class_pt", rarity=5, give=function(who) who.unused_talents = who.unused_talents + 1 end}, + {name = _t"+1 Generic Point", id="generic_pt", rarity=4, give=function(who) who.unused_generics = who.unused_generics + 1 end}, + {name = _t"+1 Category Point", id="category_pt", rarity=13.5*((self.id_challenge.rewarded["category_pt"] or 1)*30/math.max(30, who.level - self.id_challenge.level_entering_id)), -- Note: rarity is adjusted to give ~ 1 category point every 30 character levels gained in the I.D. -- a rarity of 30 with a challenge every level ~= 13.5 rarity with 45% challenge frequency (avg. first 50 I.D. levels, decreases with depth) -- Rarity reduced if fewer than 1 category point has been awarded per 30 character levels give=function(who) who.unused_talents_types = who.unused_talents_types + 1 end }, - {name = "+1 Prodigy Point", id="prodigy_pt", + {name = _t"+1 Prodigy Point", id="prodigy_pt", rarity=60*((self.id_challenge.rewarded["prodigy_pt"] or 0)*5 + 1), -- make more than 1 bonus prodigy extremely rare give=function(who) who.unused_prodigies = who.unused_prodigies + 1 end }, @@ -3695,9 +3698,9 @@ function _M:infiniteDungeonChallengeReward(quest, who) self.id_challenge.rewarded[reward.id] = (self.id_challenge.rewarded[reward.id] or 0) + 1 nb = nb + 1 end - reward_name = table.concatNice(reward_name, ", ", " and ") - quest.popup_text[engine.Quest.DONE] = "#OLIVE_DRAB#Reward"..(nb>0 and "s" or "")..": "..reward_name - game.log("#LIGHT_BLUE#%s has received: %s.", who.name:capitalize(), reward_name) + reward_name = table.concatNice(reward_name, ", ", _t" and ") + quest.popup_text[engine.Quest.DONE] = ("#OLIVE_DRAB#%s: %s"):tformat((nb>0 and _t"Rewards" or _t"Reward"), reward_name) + game.log("#LIGHT_BLUE#%s has received: %s.", who:getName():capitalize(), reward_name) return reward_name end @@ -3716,7 +3719,7 @@ function _M:unlockTalent(tid, who, v) if new_unlock then -- test the unlock local unlock = self:unlockTalentCheck(tid, who) if unlock then - game.logPlayer(who, "#LIGHT_GREEN#%s", type(unlock) == "string" and unlock or ("You have unlocked a new talent: %s!"):format(t.name)) + game.logPlayer(who, "#LIGHT_GREEN#%s", type(unlock) == "string" and unlock or ("You have unlocked a new talent: %s!"):tformat(t.name)) end end end diff --git a/game/modules/tome/class/Grid.lua b/game/modules/tome/class/Grid.lua index dc97ffa0065e4b7134bf245662841ce8622942cd..225664f04654e9d903e370a75a6203a3986a2cb4 100644 --- a/game/modules/tome/class/Grid.lua +++ b/game/modules/tome/class/Grid.lua @@ -64,7 +64,7 @@ function _M:block_move(x, y, e, act, couldpass) if self.door_player_check then if e.player then - Dialog:yesnoPopup(self.name, self.door_player_check, function(ret) + Dialog:yesnoPopup(self:getName(), self.door_player_check, function(ret) if ret then game.level.map(x, y, engine.Map.TERRAIN, door_g) game:playSoundNear({x=x,y=y}, self.door_sound or {"ambient/door_creaks/creak_%d",1,4}) @@ -72,11 +72,11 @@ function _M:block_move(x, y, e, act, couldpass) if game.level.map.attrs(x, y, "vault_id") and e.openVault then e:openVault(game.level.map.attrs(x, y, "vault_id")) end end - end, "Open", "Leave") + end, _t"Open", _t"Leave") end elseif self.door_player_stop then if e.player then - Dialog:simplePopup(self.name, self.door_player_stop) + Dialog:simplePopup(self:getName(), self.door_player_stop) end else game.level.map(x, y, engine.Map.TERRAIN, door_g) @@ -152,9 +152,10 @@ end -- Gets the full name of the grid function _M:getName() - local name = self.name or "spot" + -- I18N grid names. + local name = _t(self.name) or _t"spot" if self.summoner and self.summoner.name then - return self.summoner.name:capitalize().."'s "..name + return ("%s's %s"):tformat(self.summoner:getName():capitalize(), name) else return name end @@ -164,9 +165,10 @@ function _M:tooltip(x, y) if not x or not y then return tstring("") end local tstr local dist = nil - if game.player.x and game.player.y then dist = tstring{" (range: ", {"font", "italic"}, {"color", "LIGHT_GREEN"}, tostring(core.fov.distance(game.player.x, game.player.y, x, y)), {"color", "LAST"}, {"font", "normal"}, ")"} end + if game.player.x and game.player.y then dist = tstring{_t" (range: ", {"font", "italic"}, {"color", "LIGHT_GREEN"}, tostring(core.fov.distance(game.player.x, game.player.y, x, y)), {"color", "LAST"}, {"font", "normal"}, ")"} end if self.show_tooltip then - local name = ((self.show_tooltip == true) and self.name or self.show_tooltip) + -- I18N Grid name + local name = ((self.show_tooltip == true) and self:getName() or self.show_tooltip) if self.desc then tstr = tstring{{"uid", self.uid}, name} if dist then tstr:merge(dist) end @@ -177,7 +179,7 @@ function _M:tooltip(x, y) tstr:add(true) end else - tstr = tstring{{"uid", self.uid}, self.name} + tstr = tstring{{"uid", self.uid}, self:getName()} if dist then tstr:merge(dist) end tstr:add(true) end @@ -201,27 +203,27 @@ function _M:tooltip(x, y) if p.level <= data.level_range[1] - 10 then color = "CRIMSON" elseif p.level <= data.level_range[1] - 4 then color = "ORANGE" end - tstr:add(true, {"font","bold"}, {"color", color}, "Min.level: "..data.level_range[1], {"color", "LAST"}, {"font","normal"}, true) + tstr:add(true, {"font","bold"}, {"color", color}, _t"Min.level: "..data.level_range[1], {"color", "LAST"}, {"font","normal"}, true) end end end if game.level.entrance_glow and self.change_zone and not game.visited_zones[self.change_zone] then - tstr:add(true, {"font","bold"}, {"color","CRIMSON"}, "Never visited yet", {"color", "LAST"}, {"font","normal"}, true) + tstr:add(true, {"font","bold"}, {"color","CRIMSON"}, _t"Never visited yet", {"color", "LAST"}, {"font","normal"}, true) end - if game.player:hasLOS(x, y) then tstr:add({"color", "CRIMSON"}, "In sight", {"color", "LAST"}, true) end - if game.level.map.lites(x, y) then tstr:add({"color", "YELLOW"}, "Lit", {"color", "LAST"}, true) end - if self:check("block_sight", x, y) then tstr:add({"color", "UMBER"}, "Blocks sight", {"color", "LAST"}, true) end - if self:check("block_move", x, y, game.player) then tstr:add({"color", "UMBER"}, "Blocks movement", {"color", "LAST"}, true) end - if self:attr("air_level") and self:attr("air_level") < 0 then tstr:add({"color", "LIGHT_BLUE"}, "Special breathing method required", {"color", "LAST"}, true) end - if self:attr("dig") then tstr:add({"color", "LIGHT_UMBER"}, "Diggable", {"color", "LAST"}, true) end - if game.level.map.attrs(x, y, "no_teleport") then tstr:add({"color", "VIOLET"}, "Cannot teleport to this place", {"color", "LAST"}, true) end + if game.player:hasLOS(x, y) then tstr:add({"color", "CRIMSON"}, _t"In sight", {"color", "LAST"}, true) end + if game.level.map.lites(x, y) then tstr:add({"color", "YELLOW"}, _t"Lit", {"color", "LAST"}, true) end + if self:check("block_sight", x, y) then tstr:add({"color", "UMBER"}, _t"Blocks sight", {"color", "LAST"}, true) end + if self:check("block_move", x, y, game.player) then tstr:add({"color", "UMBER"}, _t"Blocks movement", {"color", "LAST"}, true) end + if self:attr("air_level") and self:attr("air_level") < 0 then tstr:add({"color", "LIGHT_BLUE"}, _t"Special breathing method required", {"color", "LAST"}, true) end + if self:attr("dig") then tstr:add({"color", "LIGHT_UMBER"}, _t"Diggable", {"color", "LAST"}, true) end + if game.level.map.attrs(x, y, "no_teleport") then tstr:add({"color", "VIOLET"}, _t"Cannot teleport to this place", {"color", "LAST"}, true) end if config.settings.cheat then - tstr:add(true, tostring(rawget(self, "type")), " / ", tostring(rawget(self, "subtype"))) - tstr:add(true, "UID: ", tostring(self.uid), true, "Coords: ", tostring(x), "x", tostring(y)) + tstr:add(true, _t(tostring(rawget(self, "type"))), " / ", _t(tostring(rawget(self, "subtype")))) + tstr:add(true, "UID: ", tostring(self.uid), true, _t"Coords: ", tostring(x), "x", tostring(y)) -- debugging info if game.level.map.room_map then @@ -232,7 +234,7 @@ function _M:tooltip(x, y) end local attrs = game.level.map.attrs[x+y*game.level.map.w] if attrs then - tstr:add(true, {"color", "TAN"}, "map attrs: ") + tstr:add(true, {"color", "TAN"}, _t"map attrs: ") for atr, val in pairs(attrs) do tstr:add(("%s=%s%s"):format(atr,val,", ")) end diff --git a/game/modules/tome/class/MapEffects.lua b/game/modules/tome/class/MapEffects.lua index 60a963d26aa22d55770e0e35d22ca929812e90a2..ac83f9dfcc3e81dbb0d05875e10278a7ac756680 100644 --- a/game/modules/tome/class/MapEffects.lua +++ b/game/modules/tome/class/MapEffects.lua @@ -20,9 +20,9 @@ local Map = require "engine.Map" local function getEffectName(self) - local name = self.name or self.damtype and engine.DamageType.dam_def[self.damtype].name.." area effect" or "area effect" + local name = self.name or self.damtype and engine.DamageType.dam_def[self.damtype].name.._t" area effect" or _t"area effect" if self.src then - return self.src.name.."'s "..name + return ("%s's %s"):tformat(self.src:getName(), name) else return name end diff --git a/game/modules/tome/class/NPC.lua b/game/modules/tome/class/NPC.lua index 8f354712e72028444f88e6cecf6d8bbbff640721..24c166e6c7a36176539209eaef76253638286145 100644 --- a/game/modules/tome/class/NPC.lua +++ b/game/modules/tome/class/NPC.lua @@ -53,7 +53,7 @@ function _M:actBase() self.summon_time = self.summon_time - 1 if self.summon_time <= 0 then if not self.summon_quiet then - game.logPlayer(self.summoner, "#PINK#Your summoned %s disappears.", self.name) + game.logPlayer(self.summoner, "#PINK#Your summoned %s disappears.", self:getName()) end self:die() self.dead_by_unsummon = true @@ -281,7 +281,7 @@ function _M:checkAngered(src, set, value) if not was_hostile and self:reactionToward(src) < 0 then if self.anger_emote then - self:doEmote(self.anger_emote:gsub("@himher@", src.female and "her" or "him"), 30) + self:doEmote(self.anger_emote:gsub("@himher@", src.female and _t"her" or _t"him"), 30) end end end @@ -395,8 +395,8 @@ function _M:tooltip(x, y, seen_by) str:add( true, - ("Killed by you: %s"):format(killed), true, - "Target: ", target and target.name or "none" + ("Killed by you: %s"):tformat(killed), true, + _t"Target: ", target and target:getName() or _t"none" ) -- Give hints to stealthed/invisible players about where the NPC is looking (if they have LOS) if target == game.player and (game.player:attr("stealth") or game.player:attr("invisible")) and game.player:hasLOS(self.x, self.y) then @@ -404,14 +404,14 @@ function _M:tooltip(x, y, seen_by) local dx, dy = tx - self.ai_target.actor.x, ty - self.ai_target.actor.y local offset = engine.Map:compassDirection(dx, dy) if offset then - str:add(" looking " ..offset) + str:add((" looking %s"):tformat(offset)) if config.settings.cheat then str:add((" (%+d, %+d)"):format(dx, dy)) end else - str:add(" looking at you.") + str:add(_t" looking at you.") end end if config.settings.cheat then - str:add(true, "UID: "..self.uid, true, self.image) + str:add(true, _t"UID: "..self.uid, true, self.image) end return str end @@ -432,7 +432,7 @@ end --- Make emotes appear in the log too function _M:setEmote(e) - game.logSeen(self, "%s says: '%s'", self.name:capitalize(), e.text) + game.logSeen(self, "%s says: '%s'", self:getName():capitalize(), e.text) mod.class.Actor.setEmote(self, e) end diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index bd24bd8291b66db3ce4ebef9d0e1b07d1aa45693..c92055cb1097c32faaf1a85cc9436725268db602 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -45,9 +45,9 @@ _M.logCombat = Combat.logCombat _M._special_ego_rules = {special_on_hit=true, special_on_crit=true, special_on_kill=true, charm_on_use=true, on_block=true} _M.requirement_flags_names = { - allow_wear_massive = "Massive armour training", - allow_wear_heavy = "Heavy armour training", - allow_wear_shield = "Shield usage training", + allow_wear_massive = _t"Massive armour training", + allow_wear_heavy = _t"Heavy armour training", + allow_wear_shield = _t"Shield usage training", } function _M:getRequirementDesc(who) @@ -169,30 +169,30 @@ end function _M:canUseObject(who) if self.__transmo then return false end if not engine.interface.ObjectActivable.canUseObject(self, who) then - return false, "This object has no usable power." + return false, _t"This object has no usable power." end if who then if who.no_inventory_access then - return false, "You cannot use items now!" + return false, _t"You cannot use items now!" end if self.use_no_blind and who:attr("blind") then - return false, "You cannot see!" + return false, _t"You cannot see!" end if self.use_no_silence and who:attr("silence") then - return false, "You are silenced!" + return false, _t"You are silenced!" end if self:wornInven() and not self.wielded and not self.use_no_wear then - return false, "You must wear this object to use it!" + return false, _t"You must wear this object to use it!" end if who:hasEffect(self.EFF_UNSTOPPABLE) then - return false, "You can not use items during a battle frenzy!" + return false, _t"You can not use items during a battle frenzy!" end if who:attr("sleep") and not who:attr("lucid_dreamer") then - return false, "You can not use objects while sleeping!" + return false, _t"You can not use objects while sleeping!" end end - return true, "Object can be used." + return true, _t"Object can be used." end --- Does the actor have inadequate AI to use this object intelligently? @@ -391,8 +391,8 @@ function _M:tooltip(x, y, use_actor) -- local str = self:getDesc({do_color=true}, game.player:getInven(self:wornInven()), nil, use_actor) if config.settings.cheat then str:add(true, "UID: "..self.uid, true, self.image) end local nb = game.level.map:getObjectTotal(x, y) - if nb == 2 then str:add(true, "---", true, "You see one more object.") - elseif nb > 2 then str:add(true, "---", true, "You see "..(nb-1).." more objects.") + if nb == 2 then str:add(true, "---", true, _t"You see one more object.") + elseif nb > 2 then str:add(true, "---", true, ("You see %d more objects."):tformat(nb-1)) end return str end @@ -401,9 +401,9 @@ end function _M:descAttribute(attr) local power = function(c) if config.settings.tome.advanced_weapon_stats then - return math.floor(game.player:combatDamagePower(self.combat)*100).."% power" + return ("%d%% power"):tformat(math.floor(game.player:combatDamagePower(self.combat)*100)) else - return c.dam.."-"..(c.dam*(c.damrange or 1.1)).." power" + return ("%d-%d power"):tformat(c.dam, (c.dam*(c.damrange or 1.1))) end end if attr == "MASTERY" then @@ -411,8 +411,8 @@ function _M:descAttribute(attr) for ttn, i in pairs(self.wielder.talents_types_mastery) do local tt = Talents.talents_types_def[ttn] local cat = tt.type:gsub("/.*", "") - local name = cat:capitalize().." / "..tt.name:capitalize() - tms[#tms+1] = ("%0.2f %s"):format(i, name) + local name = _t(cat):capitalize().._t(" / ")..tt.name:capitalize() + tms[#tms+1] = ("%0.2f %s"):tformat(i, name) end return table.concat(tms, ",") elseif attr == "STATBONUS" then @@ -426,46 +426,46 @@ function _M:descAttribute(attr) return (i and i > 0 and "+"..i or tostring(i)).."%" elseif attr == "REGEN" then local i = self.wielder.mana_regen or self.wielder.stamina_regen or self.wielder.life_regen or self.wielder.hate_regen or self.wielder.positive_regen or self.wielder.negative_regen - return ("%s%0.2f/turn"):format(i > 0 and "+" or "-", math.abs(i)) + return ("%s%0.2f/turn"):tformat(i > 0 and "+" or "-", math.abs(i)) elseif attr == "COMBAT" then local c = self.combat - return power(c)..", "..(c.apr or 0).." apr" + return ("%s, %s apr"):tformat(power(c), (c.apr or 0)) elseif attr == "COMBAT_AMMO" then local c = self.combat - return c.shots_left.."/"..math.floor(c.capacity)..", "..power(c)..", "..(c.apr or 0).." apr" + return ("%d/%d, %s, %s apr"):tformat(c.shots_left, math.floor(c.capacity), power(c), (c.apr or 0), " apr") elseif attr == "COMBAT_DAMTYPE" then local c = self.combat - return power(c)..", "..("%d"):format((c.apr or 0)).." apr, "..DamageType:get(c.damtype).name.." damage" + return ("%s, %d apr, %s damage"):tformat(power(c), (c.apr or 0), DamageType:get(c.damtype).name) elseif attr == "COMBAT_ELEMENT" then local c = self.combat - return power(c)..", "..("%d"):format((c.apr or 0)).." apr, "..DamageType:get(c.element or DamageType.PHYSICAL).name.." element" + return ("%s, %d apr, %s element"):tformat(power(c), (c.apr or 0), DamageType:get(c.element or DamageType.PHYSICAL).name) elseif attr == "SHIELD" then local c = self.special_combat if c and (game.player:knowTalentType("technique/shield-offense") or game.player:knowTalentType("technique/shield-defense") or game.player:attr("show_shield_combat") or config.settings.tome.display_shield_stats) then - return power(c)..", "..c.block.." block" + return ("%s, %s block"):tformat(power(c), c.block) else - return c.block.." block" + return ("%s block"):tformat(c.block) end elseif attr == "ARMOR" then - return (self.wielder and self.wielder.combat_def and math.round(self.wielder.combat_def) or 0).." def, "..(self.wielder and self.wielder.combat_armor and math.round(self.wielder.combat_armor) or 0).." armour" + return ("%s def, %s armour"):tformat(self.wielder and self.wielder.combat_def and math.round(self.wielder.combat_def) or 0, self.wielder and self.wielder.combat_armor and math.round(self.wielder.combat_armor) or 0) elseif attr == "ATTACK" then - return (self.wielder and self.wielder.combat_atk or 0).." accuracy, "..(self.wielder and self.wielder.combat_apr or 0).." apr, "..(self.wielder and self.wielder.combat_dam or 0).." power" + return ("%s accuracy, %s apr, %s power"):tformat(self.wielder and self.wielder.combat_atk or 0, self.wielder and self.wielder.combat_apr or 0, self.wielder and self.wielder.combat_dam or 0) elseif attr == "MONEY" then - return ("worth %0.2f"):format(self.money_value / 10) + return ("worth %0.2f"):tformat(self.money_value / 10) elseif attr == "USE_TALENT" then return self:getTalentFromId(self.use_talent.id).name:lower() elseif attr == "DIGSPEED" then - return ("dig speed %d turns"):format(self.digspeed) + return ("dig speed %d turns"):tformat(self.digspeed) elseif attr == "CHARM" then - return (" [power %d]"):format(self:getCharmPower(game.player)) + return (" [power %d]"):tformat(self:getCharmPower(game.player)) elseif attr == "CHARGES" then local reduce = 100 - util.bound(game.player:attr("use_object_cooldown_reduce") or 0, 0, 100) if self.talent_cooldown and (self.use_power or self.use_talent) then local cd = game.player.talents_cd[self.talent_cooldown] if cd and cd > 0 then - return " ("..cd.."/"..(math.ceil((self.use_power or self.use_talent).power * reduce / 100)).." cooldown)" + return (" (%d/%d cooldown)"):tformat(cd, math.ceil((self.use_power or self.use_talent).power * reduce / 100)) else - return " ("..(math.ceil((self.use_power or self.use_talent).power * reduce / 100)).." cooldown)" + return (" (%d cooldown)"):tformat(math.ceil((self.use_power or self.use_talent).power * reduce / 100)) end elseif self.use_power or self.use_talent then return (" (%d/%d)"):format(math.floor(self.power / (math.ceil((self.use_power or self.use_talent).power * reduce / 100))), math.floor(self.max_power / (math.ceil((self.use_power or self.use_talent).power * reduce / 100)))) @@ -543,7 +543,13 @@ end function _M:getName(t) t = t or {} local qty = self:getNumber() - local name = self.name + local name = _t(self.name) or _t"object" + if t.trans_only then + return name + end + if t.raw_name then + return self.name or "object" + end if not t.no_add_name and (self.been_reshaped or self.been_imbued) then name = (type(self.been_reshaped) == "string" and self.been_reshaped or "") .. name .. (type(self.been_imbued) == "string" and self.been_imbued or "") @@ -593,17 +599,22 @@ function _M:getShortName(t) local qty = self:getNumber() local identified = t.force_id or self:isIdentified() - local name = self.short_name or "object" + local name = _t(self.short_name, "entity short_name") or _t"object" if not identified then local _, c = self:getDisplayColor(true) if self.unique then - name = self:getUnidentifiedName()..", "..c.."special#LAST#" + name = ("%s, %sspecial#LAST#"):tformat(self:getUnidentifiedName(), c) elseif self.egoed then - name = name..", "..c.."ego#LAST#" + name = ("%s, %sego#LAST#"):tformat(name, c) end elseif self.keywords and next(self.keywords) then - local k = table.keys(self.keywords) + -- I18N translate keywords. + local ks = table.keys(self.keywords) + local k = {} + for i, key in ipairs(ks) do + k[i] = _t(key, "entity keyword") + end table.sort(k) name = name..", "..table.concat(k, ', ') end @@ -632,15 +643,15 @@ function _M:descAccuracyBonus(desc, weapon, use_actor) local m = weapon.accuracy_effect_scale or 1 if kind == "sword" then - desc:add("Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(0.4, m), {"color","LAST"}, " crit mult (max 40%)", true) + desc:add(_t"Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(0.4, m), {"color","LAST"}, _t" crit mult (max 40%)", true) elseif kind == "axe" then - desc:add("Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(0.25, m), {"color","LAST"}, " crit chance (max 25%)", true) + desc:add(_t"Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(0.25, m), {"color","LAST"}, _t" crit chance (max 25%)", true) elseif kind == "mace" then - desc:add("Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(0.2, m), {"color","LAST"}, " base dam (max 20%)", true) + desc:add(_t"Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(0.2, m), {"color","LAST"}, _t" base dam (max 20%)", true) elseif kind == "staff" then - desc:add("Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(2.0, m), {"color","LAST"}, " proc dam (max 200%)", true) + desc:add(_t"Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(2.0, m), {"color","LAST"}, _t" proc dam (max 200%)", true) elseif kind == "knife" then - desc:add("Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(0.5, m), {"color","LAST"}, " APR (max 50%)", true) + desc:add(_t"Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(0.5, m), {"color","LAST"}, _t" APR (max 50%)", true) end end @@ -673,7 +684,7 @@ function _M:compareFields(item1, items, infield, field, outformat, text, mod, is if added == 0 then ret:add(" (") elseif added > 1 then - ret:add(" / ") + ret:add(_t(" / ")) end added = added + 1 add = true @@ -729,9 +740,9 @@ function _M:compareTableFields(item1, items, infield, field, outformat, text, kf if not filter or filter(k, v) then local count = 0 if isinversed then - ret:add(("%s"):format((count1 > 0) and " / " or ""), (v[1] or 0) > 0 and {"color","RED"} or {"color","LIGHT_GREEN"}, outformat:format((v[1] or 0)), {"color","LAST"}) + ret:add(("%s"):format((count1 > 0) and _t(" / ") or ""), (v[1] or 0) > 0 and {"color","RED"} or {"color","LIGHT_GREEN"}, outformat:format((v[1] or 0)), {"color","LAST"}) else - ret:add(("%s"):format((count1 > 0) and " / " or ""), (v[1] or 0) < 0 and {"color","RED"} or {"color","LIGHT_GREEN"}, outformat:format((v[1] or 0)), {"color","LAST"}) + ret:add(("%s"):format((count1 > 0) and _t(" / ") or ""), (v[1] or 0) < 0 and {"color","RED"} or {"color","LIGHT_GREEN"}, outformat:format((v[1] or 0)), {"color","LAST"}) end count1 = count1 + 1 if v[1] then @@ -742,7 +753,7 @@ function _M:compareTableFields(item1, items, infield, field, outformat, text, kf if count == 0 then ret:add("(") elseif count > 0 then - ret:add(" / ") + ret:add(_t(" / ")) end if vv ~= (v[1] or 0) then if isinversed then @@ -791,14 +802,9 @@ function _M:descCombat(use_actor, combat, compare_with, field, add_table, is_fak combat.dammod = table.mergeAdd(table.clone(combat.dammod or {}), add_table.dammod) local dammod = use_actor:getDammod(combat) for stat, i in pairs(dammod) do - local name = Stats.stats_def[stat].short_name:capitalize() - if use_actor:knowTalent(use_actor.T_STRENGTH_OF_PURPOSE) then - if name == "Str" then name = "Mag" end - end - if self.subtype == "dagger" and use_actor:knowTalent(use_actor.T_LETHALITY) then - if name == "Str" then name = "Cun" end - end - dm[#dm+1] = ("%d%% %s"):format(i * 100, name) + -- I18N Stats using display_short_name + local name = Stats.stats_def[stat].display_short_name:capitalize() + dm[#dm+1] = ("%d%% %s"):tformat(i * 100, name) end if #dm > 0 or combat.dam then local diff_count = 0 @@ -820,10 +826,10 @@ function _M:descCombat(use_actor, combat, compare_with, field, add_table, is_fak end end if any_diff then - local s = ("Power: %3d%% (%s) Range: %.1fx (%s)"):format(base_power * 100, table.concat(power_diff, " / "), base_range, table.concat(range_diff, " / ")) + local s = ("Power: %3d%% (%s) Range: %.1fx (%s)"):tformat(base_power * 100, table.concat(power_diff, _t(" / ")), base_range, table.concat(range_diff, _t(" / "))) desc:merge(s:toTString()) else - desc:add(("Power: %3d%% Range: %.1fx"):format(base_power * 100, base_range)) + desc:add(("Power: %3d%% Range: %.1fx"):tformat(base_power * 100, base_range)) end else local power_diff = {} @@ -842,46 +848,46 @@ function _M:descCombat(use_actor, combat, compare_with, field, add_table, is_fak if any_diff == false then power_diff = "" else - power_diff = ("(%s)"):format(table.concat(power_diff, " / ")) + power_diff = ("(%s)"):format(table.concat(power_diff, _t(" / "))) end - desc:add(("Base power: %.1f - %.1f"):format((combat.dam or 0) + (add_table.dam or 0), ((combat.damrange or (1.1 - (add_table.damrange or 0))) + (add_table.damrange or 0)) * ((combat.dam or 0) + (add_table.dam or 0)))) + desc:add(("Base power: %.1f - %.1f"):tformat((combat.dam or 0) + (add_table.dam or 0), ((combat.damrange or (1.1 - (add_table.damrange or 0))) + (add_table.damrange or 0)) * ((combat.dam or 0) + (add_table.dam or 0)))) desc:merge(power_diff:toTString()) end desc:add(true) - desc:add(("Uses stat%s: %s"):format(#dm > 1 and "s" or "",table.concat(dm, ', ')), true) + desc:add(("Uses %s: %s"):tformat(#dm > 1 and _t"stats" or _t"stat",table.concat(dm, ', ')), true) local col = (combat.damtype and DamageType:get(combat.damtype) and DamageType:get(combat.damtype).text_color or "#WHITE#"):toTString() - desc:add("Damage type: ", col[2],DamageType:get(combat.damtype or DamageType.PHYSICAL).name:capitalize(),{"color","LAST"}, true) + desc:add(_t"Damage type: ", col[2],DamageType:get(combat.damtype or DamageType.PHYSICAL).name:capitalize(),{"color","LAST"}, true) end if combat.talented then local t = use_actor:combatGetTraining(combat) - if t and t.name then desc:add("Mastery: ", {"color","GOLD"}, t.name, {"color","LAST"}, true) end + if t and t.name then desc:add(_t"Mastery: ", {"color","GOLD"}, t.name, {"color","LAST"}, true) end end self:descAccuracyBonus(desc, combat, use_actor) if combat.wil_attack then - desc:add("Accuracy is based on willpower for this weapon.", true) + desc:add(_t"Accuracy is based on willpower for this weapon.", true) end - compare_fields(combat, compare_with, field, "atk", "%+d", "Accuracy: ", 1, false, false, add_table) - compare_fields(combat, compare_with, field, "apr", "%+d", "Armour Penetration: ", 1, false, false, add_table) - compare_fields(combat, compare_with, field, "physcrit", "%+.1f%%", "Crit. chance: ", 1, false, false, add_table) - compare_fields(combat, compare_with, field, "crit_power", "%+.1f%%", "Crit. power: ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "atk", "%+d", _t"Accuracy: ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "apr", "%+d", _t"Armour Penetration: ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "physcrit", "%+.1f%%", _t"Crit. chance: ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "crit_power", "%+.1f%%", _t"Crit. power: ", 1, false, false, add_table) local physspeed_compare = function(orig, compare_with) orig = 100 / orig if compare_with then return ("%+.0f%%"):format(orig - 100 / compare_with) else return ("%2.0f%%"):format(orig) end end - compare_fields(combat, compare_with, field, "physspeed", physspeed_compare, "Attack speed: ", 1, false, true, add_table) + compare_fields(combat, compare_with, field, "physspeed", physspeed_compare, _t"Attack speed: ", 1, false, true, add_table) - compare_fields(combat, compare_with, field, "block", "%+d", "Block value: ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "block", "%+d", _t"Block value: ", 1, false, false, add_table) - compare_fields(combat, compare_with, field, "dam_mult", "%d%%", "Dam. multiplier: ", 100, false, false, add_table) - compare_fields(combat, compare_with, field, "range", "%+d", "Firing range: ", 1, false, false, add_table) - compare_fields(combat, compare_with, field, "capacity", "%d", "Capacity: ", 1, false, false, add_table) - compare_fields(combat, compare_with, field, "shots_reloaded_per_turn", "%+d", "Reload speed: ", 1, false, false, add_table) - compare_fields(combat, compare_with, field, "ammo_every", "%d", "Turns elapse between self-loadings: ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "dam_mult", "%d%%", _t"Dam. multiplier: ", 100, false, false, add_table) + compare_fields(combat, compare_with, field, "range", "%+d", _t"Firing range: ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "capacity", "%d", _t"Capacity: ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "shots_reloaded_per_turn", "%+d", _t"Reload speed: ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "ammo_every", "%d", _t"Turns elapse between self-loadings: ", 1, false, false, add_table) local talents = {} if combat.talent_on_hit then @@ -892,14 +898,14 @@ function _M:descCombat(use_actor, combat, compare_with, field, add_table, is_fak for i, v in ipairs(compare_with or {}) do for tid, data in pairs(v[field] and (v[field].talent_on_hit or {})or {}) do if not talents[tid] or talents[tid][1]~=data.chance or talents[tid][2]~=data.level then - desc:add({"color","RED"}, ("When this weapon hits: %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) + desc:add({"color","RED"}, ("When this weapon hits: %s (%d%% chance level %d)."):tformat(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) else talents[tid][3] = true end end end for tid, data in pairs(talents) do - desc:add(talents[tid][3] and {"color","WHITE"} or {"color","GREEN"}, ("When this weapon hits: %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) + desc:add(talents[tid][3] and {"color","WHITE"} or {"color","GREEN"}, ("When this weapon hits: %s (%d%% chance level %d)."):tformat(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) end local talents = {} @@ -911,14 +917,14 @@ function _M:descCombat(use_actor, combat, compare_with, field, add_table, is_fak for i, v in ipairs(compare_with or {}) do for tid, data in pairs(v[field] and (v[field].talent_on_crit or {})or {}) do if not talents[tid] or talents[tid][1]~=data.chance or talents[tid][2]~=data.level then - desc:add({"color","RED"}, ("When this weapon crits: %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) + desc:add({"color","RED"}, ("When this weapon crits: %s (%d%% chance level %d)."):tformat(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) else talents[tid][3] = true end end end for tid, data in pairs(talents) do - desc:add(talents[tid][3] and {"color","WHITE"} or {"color","GREEN"}, ("When this weapon crits: %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) + desc:add(talents[tid][3] and {"color","WHITE"} or {"color","GREEN"}, ("When this weapon crits: %s (%d%% chance level %d)."):tformat(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) end local special = "" @@ -1015,7 +1021,7 @@ function _M:descCombat(use_actor, combat, compare_with, field, add_table, is_fak end compare_list( - "#YELLOW#On weapon hit:#LAST#", + _t"#YELLOW#On weapon hit:#LAST#", function(combat) if not combat then return {} end local list = {} @@ -1037,7 +1043,7 @@ function _M:descCombat(use_actor, combat, compare_with, field, add_table, is_fak ) compare_list( - "#YELLOW#On weapon crit:#LAST#", + _t"#YELLOW#On weapon crit:#LAST#", function(combat) if not combat then return {} end return get_special_list(combat, 'special_on_crit') @@ -1045,7 +1051,7 @@ function _M:descCombat(use_actor, combat, compare_with, field, add_table, is_fak ) compare_list( - "#YELLOW#On weapon kill:#LAST#", + _t"#YELLOW#On weapon kill:#LAST#", function(combat) if not combat then return {} end return get_special_list(combat, 'special_on_kill') @@ -1060,82 +1066,82 @@ function _M:descCombat(use_actor, combat, compare_with, field, add_table, is_fak end if combat.no_stealth_break then - desc:add(found and {"color","WHITE"} or {"color","GREEN"},"When used from stealth a simple attack with it will not break stealth.", {"color","LAST"}, true) + desc:add(found and {"color","WHITE"} or {"color","GREEN"},_t"When used from stealth a simple attack with it will not break stealth.", {"color","LAST"}, true) elseif found then - desc:add({"color","RED"}, "When used from stealth a simple attack with it will not break stealth.", {"color","LAST"}, true) + desc:add({"color","RED"}, _t"When used from stealth a simple attack with it will not break stealth.", {"color","LAST"}, true) end if combat.crushing_blow then - desc:add({"color", "YELLOW"}, "Crushing Blows: ", {"color", "LAST"}, "Damage dealt by this weapon is increased by half your critical multiplier, if doing so would kill the target.", true) + desc:add({"color", "YELLOW"}, _t"Crushing Blows: ", {"color", "LAST"}, _t"Damage dealt by this weapon is increased by half your critical multiplier, if doing so would kill the target.", true) end - compare_fields(combat, compare_with, field, "travel_speed", "%+d%%", "Travel speed: ", 100, false, false, add_table) + compare_fields(combat, compare_with, field, "travel_speed", "%+d%%", _t"Travel speed: ", 100, false, false, add_table) - compare_fields(combat, compare_with, field, "phasing", "%+d%%", "Damage Shield penetration (this weapon only): ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "phasing", "%+d%%", _t"Damage Shield penetration (this weapon only): ", 1, false, false, add_table) - compare_fields(combat, compare_with, field, "lifesteal", "%+d%%", "Lifesteal (this weapon only): ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "lifesteal", "%+d%%", _t"Lifesteal (this weapon only): ", 1, false, false, add_table) local attack_recurse_procs_reduce_compare = function(orig, compare_with) orig = 100 - 100 / orig if compare_with then return ("%+d%%"):format(-(orig - (100 - 100 / compare_with))) else return ("%d%%"):format(-orig) end end - compare_fields(combat, compare_with, field, "attack_recurse", "%+d", "Multiple attacks: ", 1, false, false, add_table) - compare_fields(combat, compare_with, field, "attack_recurse_procs_reduce", attack_recurse_procs_reduce_compare, "Multiple attacks procs power reduction: ", 1, true, false, add_table) + compare_fields(combat, compare_with, field, "attack_recurse", "%+d", _t"Multiple attacks: ", 1, false, false, add_table) + compare_fields(combat, compare_with, field, "attack_recurse_procs_reduce", attack_recurse_procs_reduce_compare, _t"Multiple attacks procs power reduction: ", 1, true, false, add_table) if combat.tg_type and combat.tg_type == "beam" then - desc:add({"color","YELLOW"}, ("Shots beam through all targets."), {"color","LAST"}, true) + desc:add({"color","YELLOW"}, (_t"Shots beam through all targets."), {"color","LAST"}, true) end compare_table_fields( - combat, compare_with, field, "melee_project", "%+d", "Damage (Melee): ", + combat, compare_with, field, "melee_project", "%+d", _t"Damage (Melee): ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(DamageType.dam_def[item].name),{"color","LAST"} + return col[2], (" %s"):tformat(DamageType.dam_def[item].name),{"color","LAST"} end, nil, nil, function(k, v) return not DamageType.dam_def[k].tdesc end) compare_table_fields( - combat, compare_with, field, "ranged_project", "%+d", "Damage (Ranged): ", + combat, compare_with, field, "ranged_project", "%+d", _t"Damage (Ranged): ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(DamageType.dam_def[item].name),{"color","LAST"} + return col[2], (" %s"):tformat(DamageType.dam_def[item].name),{"color","LAST"} end, nil, nil, function(k, v) return not DamageType.dam_def[k].tdesc end) - compare_table_fields(combat, compare_with, field, "burst_on_hit", "%+d", "Damage (radius 1) on hit: ", function(item) + compare_table_fields(combat, compare_with, field, "burst_on_hit", "%+d", _t"Damage (radius 1) on hit: ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(DamageType.dam_def[item].name),{"color","LAST"} + return col[2], (" %s"):tformat(DamageType.dam_def[item].name),{"color","LAST"} end) - compare_table_fields(combat, compare_with, field, "burst_on_crit", "%+d", "Damage (radius 2) on crit: ", function(item) + compare_table_fields(combat, compare_with, field, "burst_on_crit", "%+d", _t"Damage (radius 2) on crit: ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(DamageType.dam_def[item].name),{"color","LAST"} + return col[2], (" %s"):tformat(DamageType.dam_def[item].name),{"color","LAST"} end) - compare_table_fields(combat, compare_with, field, "convert_damage", "%d%%", "Damage conversion: ", function(item) + compare_table_fields(combat, compare_with, field, "convert_damage", "%d%%", _t"Damage conversion: ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(DamageType.dam_def[item].name),{"color","LAST"} + return col[2], (" %s"):tformat(DamageType.dam_def[item].name),{"color","LAST"} end) - compare_table_fields(combat, compare_with, field, "inc_damage_type", "%+d%% ", "Damage against: ", function(item) + compare_table_fields(combat, compare_with, field, "inc_damage_type", "%+d%% ", _t"Damage against: ", function(item) local _, _, t, st = item:find("^([^/]+)/?(.*)$") if st and st ~= "" then - return st:capitalize() + return _t(st):capitalize() else - return t:capitalize() + return _t(t):capitalize() end end) -- resources used to attack compare_table_fields( - combat, compare_with, field, "use_resources", "%0.1f", "#ORANGE#Attacks use: #LAST#", + combat, compare_with, field, "use_resources", "%0.1f", _t"#ORANGE#Attacks use: #LAST#", function(item) local res_def = ActorResource.resources_def[item] local col = (res_def and res_def.color or "#SALMON#"):toTString() - return col[2], (" %s"):format(res_def and res_def.name or item:capitalize()),{"color","LAST"} + return col[2], (" %s"):tformat(res_def and res_def.name or item:capitalize()),{"color","LAST"} end, nil, true) @@ -1150,21 +1156,21 @@ function _M:getTextualDesc(compare_with, use_actor) compare_with = compare_with or {} local desc = tstring{} - if self.quest then desc:add({"color", "VIOLET"},"[Plot Item]", {"color", "LAST"}, true) - elseif self.cosmetic then desc:add({"color", "C578C6"},"[Cosmetic Item]", {"color", "LAST"}, true) + if self.quest then desc:add({"color", "VIOLET"},_t"[Plot Item]", {"color", "LAST"}, true) + elseif self.cosmetic then desc:add({"color", "C578C6"},_t"[Cosmetic Item]", {"color", "LAST"}, true) elseif self.unique then - if self.legendary then desc:add({"color", "FF4000"},"[Legendary]", {"color", "LAST"}, true) - elseif self.godslayer then desc:add({"color", "AAD500"},"[Godslayer]", {"color", "LAST"}, true) - elseif self.randart then desc:add({"color", "FF7700"},"[Random Unique]", {"color", "LAST"}, true) - else desc:add({"color", "FFD700"},"[Unique]", {"color", "LAST"}, true) + if self.legendary then desc:add({"color", "FF4000"},_t"[Legendary]", {"color", "LAST"}, true) + elseif self.godslayer then desc:add({"color", "AAD500"},_t"[Godslayer]", {"color", "LAST"}, true) + elseif self.randart then desc:add({"color", "FF7700"},_t"[Random Unique]", {"color", "LAST"}, true) + else desc:add({"color", "FFD700"},_t"[Unique]", {"color", "LAST"}, true) end end - desc:add(("Type: %s / %s"):format(tostring(rawget(self, 'type') or "unknown"), tostring(rawget(self, 'subtype') or "unknown"))) - if self.material_level then desc:add(" ; tier ", tostring(self.material_level)) end + desc:add(("Type: %s / %s"):tformat(_t(tostring(rawget(self, 'type')) or _t"unknown", "entity type"), _t(tostring(rawget(self, 'subtype') or _t"unknown"), "entity subtype"))) + if self.material_level then desc:add(_t" ; tier ", tostring(self.material_level)) end desc:add(true) - if self.slot_forbid == "OFFHAND" then desc:add("It must be held with both hands.", true) end - if self.double_weapon then desc:add("It can be used as a weapon and offhand.", true) end + if self.slot_forbid == "OFFHAND" then desc:add(_t"It must be held with both hands.", true) end + if self.double_weapon then desc:add(_t"It can be used as a weapon and offhand.", true) end desc:add(true) if not self:isIdentified() then -- give limited information if the item is unidentified @@ -1183,55 +1189,55 @@ function _M:getTextualDesc(compare_with, use_actor) local special = 0 if combat.talented then local t = use_actor:combatGetTraining(combat) - if t and t.name then desc:add("Mastery: ", {"color","GOLD"}, t.name, {"color","LAST"}, true) end + if t and t.name then desc:add(_t"Mastery: ", {"color","GOLD"}, t.name, {"color","LAST"}, true) end end self:descAccuracyBonus(desc, combat or {}, use_actor) if combat.wil_attack then - desc:add("Accuracy is based on willpower for this weapon.", true) + desc:add(_t"Accuracy is based on willpower for this weapon.", true) end local dt = DamageType:get(combat.damtype or DamageType.PHYSICAL) - desc:add("Weapon Damage: ", dt.text_color or "#WHITE#", dt.name:upper(),{"color","LAST"}) + desc:add(_t"Weapon Damage: ", dt.text_color or "#WHITE#", dt.name:upper(),{"color","LAST"}) for dtyp, val in pairs(combat.melee_project or combat.ranged_project or {}) do dt = DamageType:get(dtyp) if dt then if dt.tdesc then special = special + 1 else - desc:add(", ", dt.text_color or "#WHITE#", dt.name, {"color", "LAST"}) + desc:add(_t", ", dt.text_color or "#WHITE#", dt.name, {"color", "LAST"}) end end end desc:add(true) --special_on_hit count # for both melee and ranged if special>0 or combat.special_on_hit or combat.special_on_crit or combat.special_on_kill or combat.burst_on_crit or combat.burst_on_hit or combat.talent_on_hit or combat.talent_on_crit then - desc:add("#YELLOW#It can cause special effects when it strikes in combat.#LAST#", true) + desc:add(_t"#YELLOW#It can cause special effects when it strikes in combat.#LAST#", true) end if self.on_block then - desc:add("#ORCHID#It can cause special effects when a melee attack is blocked.#LAST#", true) + desc:add(_t"#ORCHID#It can cause special effects when a melee attack is blocked.#LAST#", true) end end if self.wielder then if self.wielder.lite then - desc:add(("It %s ambient light (%+d radius)."):format(self.wielder.lite >= 0 and "provides" or "dims", self.wielder.lite), true) + desc:add(("It %s ambient light (%+d radius)."):tformat(self.wielder.lite >= 0 and _t"provides" or _t"dims", self.wielder.lite), true) end end if self.wielded then if self.use_power or self.use_simple or self.use_talent then - desc:add("#ORANGE#It has an activatable power.#LAST#", true) + desc:add(_t"#ORANGE#It has an activatable power.#LAST#", true) end end ---desc:add("----END UNIDED DESC----", true) +--desc:add(_t"----END UNIDED DESC----", true) return desc end if self.set_list then - desc:add({"color","GREEN"}, "It is part of a set of items.", {"color","LAST"}, true) + desc:add({"color","GREEN"}, _t"It is part of a set of items.", {"color","LAST"}, true) if self.set_desc then for set_id, text in pairs(self.set_desc) do desc:add({"color","GREEN"}, text, {"color","LAST"}, true) end end - if self.set_complete then desc:add({"color","LIGHT_GREEN"}, "The set is complete.", {"color","LAST"}, true) end + if self.set_complete then desc:add({"color","LIGHT_GREEN"}, _t"The set is complete.", {"color","LAST"}, true) end end local compare_fields = function(item1, items, infield, field, outformat, text, mod, isinversed, isdiffinversed, add_table) @@ -1268,19 +1274,19 @@ function _M:getTextualDesc(compare_with, use_actor) local desc_wielder = function(w, compare_with, field) w = w or {} w = w[field] or {} - compare_scaled(w, compare_with, field, "combat_atk", {"combatAttack"}, "%+d #LAST#(%+d eff.)", "Accuracy: ") - compare_fields(w, compare_with, field, "combat_apr", "%+d", "Armour penetration: ") - compare_fields(w, compare_with, field, "combat_physcrit", "%+.1f%%", "Physical crit. chance: ") - compare_scaled(w, compare_with, field, "combat_dam", {"combatPhysicalpower"}, "%+d #LAST#(%+d eff.)", "Physical power: ") + compare_scaled(w, compare_with, field, "combat_atk", {"combatAttack"}, _t"%+d #LAST#(%+d eff.)", _t"Accuracy: ") + compare_fields(w, compare_with, field, "combat_apr", "%+d", _t"Armour penetration: ") + compare_fields(w, compare_with, field, "combat_physcrit", "%+.1f%%", _t"Physical crit. chance: ") + compare_scaled(w, compare_with, field, "combat_dam", {"combatPhysicalpower"}, _t"%+d #LAST#(%+d eff.)", _t"Physical power: ") - compare_fields(w, compare_with, field, "combat_armor", "%+d", "Armour: ") - compare_fields(w, compare_with, field, "combat_armor_hardiness", "%+d%%", "Armour Hardiness: ") - compare_scaled(w, compare_with, field, "combat_def", {"combatDefense", true}, "%+d #LAST#(%+d eff.)", "Defense: ") - compare_scaled(w, compare_with, field, "combat_def_ranged", {"combatDefenseRanged", true}, "%+d #LAST#(%+d eff.)", "Ranged Defense: ") + compare_fields(w, compare_with, field, "combat_armor", "%+d", _t"Armour: ") + compare_fields(w, compare_with, field, "combat_armor_hardiness", "%+d%%", _t"Armour Hardiness: ") + compare_scaled(w, compare_with, field, "combat_def", {"combatDefense", true}, _t"%+d #LAST#(%+d eff.)", _t"Defense: ") + compare_scaled(w, compare_with, field, "combat_def_ranged", {"combatDefenseRanged", true}, _t"%+d #LAST#(%+d eff.)", _t"Ranged Defense: ") - compare_fields(w, compare_with, field, "fatigue", "%+d%%", "Fatigue: ", 1, true, true) + compare_fields(w, compare_with, field, "fatigue", "%+d%%", _t"Fatigue: ", 1, true, true) - compare_fields(w, compare_with, field, "ammo_reload_speed", "%+d", "Ammo reloads per turn: ") + compare_fields(w, compare_with, field, "ammo_reload_speed", "%+d", _t"Ammo reloads per turn: ") local dt_string = tstring{} @@ -1298,7 +1304,7 @@ function _M:getTextualDesc(compare_with, use_actor) end if found then - desc:add({"color","ORANGE"}, "Effects on melee hit: ", {"color","LAST"}, true) + desc:add({"color","ORANGE"}, _t"Effects on melee hit: ", {"color","LAST"}, true) desc:merge(dt_string) end @@ -1330,29 +1336,29 @@ function _M:getTextualDesc(compare_with, use_actor) end end - compare_table_fields(combat2, compare_with, field, "melee_project", "%d", "Damage (Melee): ", function(item) + compare_table_fields(combat2, compare_with, field, "melee_project", "%d", _t"Damage (Melee): ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2],(" %s"):format(DamageType.dam_def[item].name),{"color","LAST"} + return col[2],(" %s"):tformat(DamageType.dam_def[item].name),{"color","LAST"} end) if ranged_found then - desc:add({"color","ORANGE"}, "Effects on ranged hit: ", {"color","LAST"}, true) + desc:add({"color","ORANGE"}, _t"Effects on ranged hit: ", {"color","LAST"}, true) desc:merge(ranged) end - compare_table_fields(ranged_combat, compare_with, field, "ranged_project", "%d", "Damage (Ranged): ", function(item) + compare_table_fields(ranged_combat, compare_with, field, "ranged_project", "%d", _t"Damage (Ranged): ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2],(" %s"):format(DamageType.dam_def[item].name),{"color","LAST"} + return col[2],(" %s"):tformat(DamageType.dam_def[item].name),{"color","LAST"} end) if found then - desc:add({"color","ORANGE"}, "Effects when hit in melee: ", {"color","LAST"}, true) + desc:add({"color","ORANGE"}, _t"Effects when hit in melee: ", {"color","LAST"}, true) desc:merge(onhit) end - compare_table_fields(onhit_combat, compare_with, field, "on_melee_hit", "%d", "Damage when hit (Melee): ", function(item) + compare_table_fields(onhit_combat, compare_with, field, "on_melee_hit", "%d", _t"Damage when hit (Melee): ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2],(" %s"):format(DamageType.dam_def[item].name),{"color","LAST"} + return col[2],(" %s"):tformat(DamageType.dam_def[item].name),{"color","LAST"} end) -- get_items takes the object table and returns a table of items to print. @@ -1446,79 +1452,80 @@ function _M:getTextualDesc(compare_with, use_actor) end compare_list( - "#YELLOW#On shield block:#LAST#", + _t"#YELLOW#On shield block:#LAST#", function(o) if not o then return {} end return get_special_list(o, 'on_block') end ) - compare_table_fields(w, compare_with, field, "inc_stats", "%+d", "Changes stats: ", function(item) - return (" %s"):format(Stats.stats_def[item].short_name:capitalize()) - end) - compare_table_fields(w, compare_with, field, "resists", "%+d%%", "Changes resistances: ", function(item) + compare_table_fields(w, compare_with, field, "inc_stats", "%+d", _t"Changes stats: ", function(item) + -- I18N Stats using display_short_name + return (" %s"):tformat(Stats.stats_def[item].display_short_name:capitalize()) + end) + compare_table_fields(w, compare_with, field, "resists", "%+d%%", _t"Changes resistances: ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(item == "all" and "all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} + return col[2], (" %s"):tformat(item == "all" and _t"all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} end) - compare_table_fields(w, compare_with, field, "resists_cap", "%+d%%", "Changes resistances cap: ", function(item) + compare_table_fields(w, compare_with, field, "resists_cap", "%+d%%", _t"Changes resistances cap: ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(item == "all" and "all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} + return col[2], (" %s"):tformat(item == "all" and _t"all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} end) - compare_table_fields(w, compare_with, field, "flat_damage_armor", "%+d", "Reduce damage by fixed amount: ", function(item) + compare_table_fields(w, compare_with, field, "flat_damage_armor", "%+d", _t"Reduce damage by fixed amount: ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(item == "all" and "all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} + return col[2], (" %s"):tformat(item == "all" and _t"all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} end) - compare_table_fields(w, compare_with, field, "wards", "%+d", "Maximum wards: ", function(item) + compare_table_fields(w, compare_with, field, "wards", "%+d", _t"Maximum wards: ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(item == "all" and "all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} + return col[2], (" %s"):tformat(item == "all" and _t"all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} end) - compare_table_fields(w, compare_with, field, "resists_pen", "%+d%%", "Changes resistances penetration: ", function(item) + compare_table_fields(w, compare_with, field, "resists_pen", "%+d%%", _t"Changes resistances penetration: ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(item == "all" and "all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} + return col[2], (" %s"):tformat(item == "all" and _t"all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} end) - compare_table_fields(w, compare_with, field, "inc_damage", "%+d%%", "Changes damage: ", function(item) + compare_table_fields(w, compare_with, field, "inc_damage", "%+d%%", _t"Changes damage: ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(item == "all" and "all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} + return col[2], (" %s"):tformat(item == "all" and _t"all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} end) - compare_table_fields(w, compare_with, field, "inc_damage_actor_type", "%+d%% ", "Damage against: ", function(item) + compare_table_fields(w, compare_with, field, "inc_damage_actor_type", "%+d%% ", _t"Damage against: ", function(item) local _, _, t, st = item:find("^([^/]+)/?(.*)$") if st and st ~= "" then - return st:capitalize() + return _t(st):capitalize() else - return t:capitalize() + return _t(t):capitalize() end end) - compare_table_fields(w, compare_with, field, "resists_actor_type", "%+d%% ", "Reduced damage from: ", function(item) + compare_table_fields(w, compare_with, field, "resists_actor_type", "%+d%% ", _t"Reduced damage from: ", function(item) local _, _, t, st = item:find("^([^/]+)/?(.*)$") if st and st ~= "" then - return st:capitalize() + return _t(st):capitalize() else - return t:capitalize() + return _t(t):capitalize() end end) - compare_table_fields(w, compare_with, field, "talents_mastery_bonus", "+%0.2f ", "Talent category bonus: ", function(item) + compare_table_fields(w, compare_with, field, "talents_mastery_bonus", "+%0.2f ", _t"Talent category bonus: ", function(item) local _, _, t, st = item:find("^([^/]+)/?(.*)$") if st and st ~= "" then - return st:capitalize() + return _t(st):capitalize() else - return t:capitalize() + return _t(t):capitalize() end end) - compare_table_fields(w, compare_with, field, "damage_affinity", "%+d%%", "Damage affinity(heal): ", function(item) + compare_table_fields(w, compare_with, field, "damage_affinity", "%+d%%", _t"Damage affinity(heal): ", function(item) local col = (DamageType.dam_def[item] and DamageType.dam_def[item].text_color or "#WHITE#"):toTString() - return col[2], (" %s"):format(item == "all" and "all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} + return col[2], (" %s"):tformat(item == "all" and _t"all" or (DamageType.dam_def[item] and DamageType.dam_def[item].name or "??")), {"color","LAST"} end) - compare_fields(w, compare_with, field, "esp_range", "%+d", "Change telepathy range by : ") + compare_fields(w, compare_with, field, "esp_range", "%+d", _t"Change telepathy range by : ") local any_esp = false local esps_compare = {} @@ -1544,7 +1551,7 @@ function _M:getTextualDesc(compare_with, use_actor) local esps = {} if w.esp_all and w.esp_all > 0 then - esps[#esps+1] = "All" + esps[#esps+1] = _t"All" esps_compare[esps[#esps]] = esps_compare[esps[#esps]] or {} esps_compare[esps[#esps]][2] = true any_esp = true @@ -1552,16 +1559,16 @@ function _M:getTextualDesc(compare_with, use_actor) for type, i in pairs(w.esp or {}) do if i and i > 0 then local _, _, t, st = type:find("^([^/]+)/?(.*)$") if st and st ~= "" then - esps[#esps+1] = t:capitalize().."/"..st:capitalize() + esps[#esps+1] = _t(t):capitalize().."/".._t(st):capitalize() else - esps[#esps+1] = t:capitalize() + esps[#esps+1] = _t(t):capitalize() end esps_compare[esps[#esps]] = esps_compare[esps[#esps]] or {} esps_compare[esps[#esps]][2] = true any_esp = true end end if any_esp then - desc:add("Grants telepathy: ") + desc:add(_t"Grants telepathy: ") for esp, isin in pairs(esps_compare) do if isin[2] then desc:add(isin[1] and {"color","WHITE"} or {"color","GREEN"}, ("%s "):format(esp), {"color","LAST"}) @@ -1589,12 +1596,12 @@ function _M:getTextualDesc(compare_with, use_actor) any_mastery = any_mastery + 1 end if any_mastery > 0 then - desc:add(("Talent master%s: "):format(any_mastery > 1 and "ies" or "y")) + desc:add(("Talent %s: "):tformat(any_mastery > 1 and _t"masteries" or _t"mastery")) for ttn, ttid in pairs(masteries) do local tt = Talents.talents_types_def[ttn] if tt then local cat = tt.type:gsub("/.*", "") - local name = cat:capitalize().." / "..tt.name:capitalize() + local name = _t(cat):capitalize().._t(" / ")..tt.name:capitalize() local diff = (ttid[2] or 0) - (ttid[1] or 0) if diff ~= 0 then if ttid[1] then @@ -1627,17 +1634,17 @@ function _M:getTextualDesc(compare_with, use_actor) any_cd_reduction = any_cd_reduction + 1 end if any_cd_reduction > 0 then - desc:add(("Talent%s cooldown:"):format(any_cd_reduction > 1 and "s" or "")) + desc:add(("%s cooldown:"):tformat(any_cd_reduction > 1 and _t"Talents" or _t"Talent")) for tid, cds in pairs(cd_reductions) do local diff = (cds[2] or 0) - (cds[1] or 0) if diff ~= 0 then if cds[1] then - desc:add((" %s ("):format(Talents.talents_def[tid].name), ("(%+d"):format(-(cds[2] or 0)), diff < 0 and {"color","RED"} or {"color","LIGHT_GREEN"}, ("(%+d) "):format(-diff), {"color","LAST"}, ("turn%s)"):format(((cds[2] or 0) > 1) and "s" or "")) + desc:add((" %s ("):format(Talents.talents_def[tid].name), ("(%+d"):format(-(cds[2] or 0)), diff < 0 and {"color","RED"} or {"color","LIGHT_GREEN"}, ("(%+d) "):format(-diff), {"color","LAST"}, ("%s)"):tformat(((cds[2] or 0) > 1) and _t"turns" or _t"turn")) else - desc:add((" %s ("):format(Talents.talents_def[tid].name), {"color","LIGHT_GREEN"}, ("%+d"):format(-(cds[2] or 0)), {"color","LAST"}, (" turn%s)"):format((cds[2] > 1) and "s" or "")) + desc:add((" %s ("):format(Talents.talents_def[tid].name), {"color","LIGHT_GREEN"}, ("%+d"):format(-(cds[2] or 0)), {"color","LAST"}, (" %s)"):tformat((cds[2] > 1) and _t"turns" or _t"turn")) end else - desc:add({"color","WHITE"}, (" %s (%+d(-) turn%s)"):format(Talents.talents_def[tid].name, -(cds[2] or cds[1]), ((cds[2] or 0) > 1) and "s" or ""), {"color","LAST"}) + desc:add({"color","WHITE"}, (" %s (%+d(-) %s)"):tformat(Talents.talents_def[tid].name, -(cds[2] or cds[1]), ((cds[2] or 0) > 1) and _t"turns" or _t"turn"), {"color","LAST"}) end end desc:add(true) @@ -1661,7 +1668,7 @@ function _M:getTextualDesc(compare_with, use_actor) any_learn_talent = any_learn_talent + 1 end end if any_learn_talent > 0 then - desc:add(("Talent%s granted: "):format(any_learn_talent > 1 and "s" or "")) + desc:add(("%s granted: "):tformat(any_learn_talent > 1 and _t"Talents" or _t"Talent")) for tid, tl in pairs(learn_talents) do local diff = (tl[2] or 0) - (tl[1] or 0) local name = Talents.talents_def[tid].name @@ -1695,191 +1702,191 @@ function _M:getTextualDesc(compare_with, use_actor) any_breath = any_breath + 1 end if any_breath > 0 then - desc:add("Allows you to breathe in: ") + desc:add(_t"Allows you to breathe in: ") for what, isin in pairs(breaths) do if isin[2] then - desc:add(isin[1] and {"color","WHITE"} or {"color","GREEN"}, ("%s "):format(what), {"color","LAST"}) + desc:add(isin[1] and {"color","WHITE"} or {"color","GREEN"}, ("%s "):format(_t(what)), {"color","LAST"}) else - desc:add({"color","RED"}, ("%s "):format(what), {"color","LAST"}) + desc:add({"color","RED"}, ("%s "):format(_t(what)), {"color","LAST"}) end end desc:add(true) end - compare_fields(w, compare_with, field, "combat_critical_power", "%+.2f%%", "Critical mult.: ") - compare_fields(w, compare_with, field, "ignore_direct_crits", "%-.2f%%", "Reduces incoming crit damage: ") - compare_fields(w, compare_with, field, "combat_crit_reduction", "%-d%%", "Reduces opponents crit chance: ") - - compare_fields(w, compare_with, field, "disarm_bonus", "%+d", "Trap disarming bonus: ") - compare_fields(w, compare_with, field, "inc_stealth", "%+d", "Stealth bonus: ") - compare_fields(w, compare_with, field, "max_encumber", "%+d", "Maximum encumbrance: ") - - compare_scaled(w, compare_with, field, "combat_physresist", {"combatPhysicalResist", true}, "%+d #LAST#(%+d eff.)", "Physical save: ") - compare_scaled(w, compare_with, field, "combat_spellresist", {"combatSpellResist", true}, "%+d #LAST#(%+d eff.)", "Spell save: ") - compare_scaled(w, compare_with, field, "combat_mentalresist", {"combatMentalResist", true}, "%+d #LAST#(%+d eff.)", "Mental save: ") - - compare_fields(w, compare_with, field, "blind_immune", "%+d%%", "Blindness immunity: ", 100) - compare_fields(w, compare_with, field, "poison_immune", "%+d%%", "Poison immunity: ", 100) - compare_fields(w, compare_with, field, "disease_immune", "%+d%%", "Disease immunity: ", 100) - compare_fields(w, compare_with, field, "cut_immune", "%+d%%", "Cut immunity: ", 100) - - compare_fields(w, compare_with, field, "silence_immune", "%+d%%", "Silence immunity: ", 100) - compare_fields(w, compare_with, field, "disarm_immune", "%+d%%", "Disarm immunity: ", 100) - compare_fields(w, compare_with, field, "confusion_immune", "%+d%%", "Confusion immunity: ", 100) - compare_fields(w, compare_with, field, "sleep_immune", "%+d%%", "Sleep immunity: ", 100) - compare_fields(w, compare_with, field, "pin_immune", "%+d%%", "Pinning immunity: ", 100) - - compare_fields(w, compare_with, field, "stun_immune", "%+d%%", "Stun/Freeze immunity: ", 100) - compare_fields(w, compare_with, field, "fear_immune", "%+d%%", "Fear immunity: ", 100) - compare_fields(w, compare_with, field, "knockback_immune", "%+d%%", "Knockback immunity: ", 100) - compare_fields(w, compare_with, field, "instakill_immune", "%+d%%", "Instant-death immunity: ", 100) - compare_fields(w, compare_with, field, "teleport_immune", "%+d%%", "Teleport immunity: ", 100) + compare_fields(w, compare_with, field, "combat_critical_power", "%+.2f%%", _t"Critical mult.: ") + compare_fields(w, compare_with, field, "ignore_direct_crits", "%-.2f%%", _t"Reduces incoming crit damage: ") + compare_fields(w, compare_with, field, "combat_crit_reduction", "%-d%%", _t"Reduces opponents crit chance: ") + + compare_fields(w, compare_with, field, "disarm_bonus", "%+d", _t"Trap disarming bonus: ") + compare_fields(w, compare_with, field, "inc_stealth", "%+d", _t"Stealth bonus: ") + compare_fields(w, compare_with, field, "max_encumber", "%+d", _t"Maximum encumbrance: ") + + compare_scaled(w, compare_with, field, "combat_physresist", {"combatPhysicalResist", true}, _t"%+d #LAST#(%+d eff.)", _t"Physical save: ") + compare_scaled(w, compare_with, field, "combat_spellresist", {"combatSpellResist", true}, _t"%+d #LAST#(%+d eff.)", _t"Spell save: ") + compare_scaled(w, compare_with, field, "combat_mentalresist", {"combatMentalResist", true}, _t"%+d #LAST#(%+d eff.)", _t"Mental save: ") + + compare_fields(w, compare_with, field, "blind_immune", "%+d%%", _t"Blindness immunity: ", 100) + compare_fields(w, compare_with, field, "poison_immune", "%+d%%", _t"Poison immunity: ", 100) + compare_fields(w, compare_with, field, "disease_immune", "%+d%%", _t"Disease immunity: ", 100) + compare_fields(w, compare_with, field, "cut_immune", "%+d%%", _t"Cut immunity: ", 100) + + compare_fields(w, compare_with, field, "silence_immune", "%+d%%", _t"Silence immunity: ", 100) + compare_fields(w, compare_with, field, "disarm_immune", "%+d%%", _t"Disarm immunity: ", 100) + compare_fields(w, compare_with, field, "confusion_immune", "%+d%%", _t"Confusion immunity: ", 100) + compare_fields(w, compare_with, field, "sleep_immune", "%+d%%", _t"Sleep immunity: ", 100) + compare_fields(w, compare_with, field, "pin_immune", "%+d%%", _t"Pinning immunity: ", 100) + + compare_fields(w, compare_with, field, "stun_immune", "%+d%%", _t"Stun/Freeze immunity: ", 100) + compare_fields(w, compare_with, field, "fear_immune", "%+d%%", _t"Fear immunity: ", 100) + compare_fields(w, compare_with, field, "knockback_immune", "%+d%%", _t"Knockback immunity: ", 100) + compare_fields(w, compare_with, field, "instakill_immune", "%+d%%", _t"Instant-death immunity: ", 100) + compare_fields(w, compare_with, field, "teleport_immune", "%+d%%", _t"Teleport immunity: ", 100) - compare_fields(w, compare_with, field, "life_regen", "%+.2f", "Life regen: ") - compare_fields(w, compare_with, field, "stamina_regen", "%+.2f", "Stamina each turn: ") - compare_fields(w, compare_with, field, "mana_regen", "%+.2f", "Mana each turn: ") - compare_fields(w, compare_with, field, "hate_regen", "%+.2f", "Hate each turn: ") - compare_fields(w, compare_with, field, "psi_regen", "%+.2f", "Psi each turn: ") - compare_fields(w, compare_with, field, "equilibrium_regen", "%+.2f", "Equilibrium each turn: ", nil, true, true) - compare_fields(w, compare_with, field, "vim_regen", "%+.2f", "Vim each turn: ") - compare_fields(w, compare_with, field, "positive_regen", "%+.2f", "P.Energy each turn: ") - compare_fields(w, compare_with, field, "negative_regen", "%+.2f", "N.Energy each turn: ") + compare_fields(w, compare_with, field, "life_regen", "%+.2f", _t"Life regen: ") + compare_fields(w, compare_with, field, "stamina_regen", "%+.2f", _t"Stamina each turn: ") + compare_fields(w, compare_with, field, "mana_regen", "%+.2f", _t"Mana each turn: ") + compare_fields(w, compare_with, field, "hate_regen", "%+.2f", _t"Hate each turn: ") + compare_fields(w, compare_with, field, "psi_regen", "%+.2f", _t"Psi each turn: ") + compare_fields(w, compare_with, field, "equilibrium_regen", "%+.2f", _t"Equilibrium each turn: ", nil, true, true) + compare_fields(w, compare_with, field, "vim_regen", "%+.2f", _t"Vim each turn: ") + compare_fields(w, compare_with, field, "positive_regen", "%+.2f", _t"P.Energy each turn: ") + compare_fields(w, compare_with, field, "negative_regen", "%+.2f", _t"N.Energy each turn: ") - compare_fields(w, compare_with, field, "stamina_regen_when_hit", "%+.2f", "Stamina when hit: ") - compare_fields(w, compare_with, field, "mana_regen_when_hit", "%+.2f", "Mana when hit: ") - compare_fields(w, compare_with, field, "equilibrium_regen_when_hit", "%+.2f", "Equilibrium when hit: ") - compare_fields(w, compare_with, field, "psi_regen_when_hit", "%+.2f", "Psi when hit: ") - compare_fields(w, compare_with, field, "hate_regen_when_hit", "%+.2f", "Hate when hit: ") - compare_fields(w, compare_with, field, "vim_regen_when_hit", "%+.2f", "Vim when hit: ") + compare_fields(w, compare_with, field, "stamina_regen_when_hit", "%+.2f", _t"Stamina when hit: ") + compare_fields(w, compare_with, field, "mana_regen_when_hit", "%+.2f", _t"Mana when hit: ") + compare_fields(w, compare_with, field, "equilibrium_regen_when_hit", "%+.2f", _t"Equilibrium when hit: ") + compare_fields(w, compare_with, field, "psi_regen_when_hit", "%+.2f", _t"Psi when hit: ") + compare_fields(w, compare_with, field, "hate_regen_when_hit", "%+.2f", _t"Hate when hit: ") + compare_fields(w, compare_with, field, "vim_regen_when_hit", "%+.2f", _t"Vim when hit: ") - compare_fields(w, compare_with, field, "vim_on_melee", "%+.2f", "Vim when hitting in melee: ") + compare_fields(w, compare_with, field, "vim_on_melee", "%+.2f", _t"Vim when hitting in melee: ") - compare_fields(w, compare_with, field, "mana_on_crit", "%+.2f", "Mana when firing critical spell: ") - compare_fields(w, compare_with, field, "vim_on_crit", "%+.2f", "Vim when firing critical spell: ") - compare_fields(w, compare_with, field, "spellsurge_on_crit", "%+d", "Spellpower on spell critical (stacks up to 3 times): ") + compare_fields(w, compare_with, field, "mana_on_crit", "%+.2f", _t"Mana when firing critical spell: ") + compare_fields(w, compare_with, field, "vim_on_crit", "%+.2f", _t"Vim when firing critical spell: ") + compare_fields(w, compare_with, field, "spellsurge_on_crit", "%+d", _t"Spellpower on spell critical (stacks up to 3 times): ") - compare_fields(w, compare_with, field, "hate_on_crit", "%+.2f", "Hate when firing a critical mind attack: ") - compare_fields(w, compare_with, field, "psi_on_crit", "%+.2f", "Psi when firing a critical mind attack: ") - compare_fields(w, compare_with, field, "equilibrium_on_crit", "%+.2f", "Equilibrium when firing a critical mind attack: ") + compare_fields(w, compare_with, field, "hate_on_crit", "%+.2f", _t"Hate when firing a critical mind attack: ") + compare_fields(w, compare_with, field, "psi_on_crit", "%+.2f", _t"Psi when firing a critical mind attack: ") + compare_fields(w, compare_with, field, "equilibrium_on_crit", "%+.2f", _t"Equilibrium when firing a critical mind attack: ") - compare_fields(w, compare_with, field, "hate_per_kill", "+%0.2f", "Hate per kill: ") - compare_fields(w, compare_with, field, "psi_per_kill", "+%0.2f", "Psi per kill: ") - compare_fields(w, compare_with, field, "vim_on_death", "%+.2f", "Vim per kill: ") + compare_fields(w, compare_with, field, "hate_per_kill", "+%0.2f", _t"Hate per kill: ") + compare_fields(w, compare_with, field, "psi_per_kill", "+%0.2f", _t"Psi per kill: ") + compare_fields(w, compare_with, field, "vim_on_death", "%+.2f", _t"Vim per kill: ") - compare_fields(w, compare_with, field, "die_at", "%+.2f life", "Only die when reaching: ", 1, true, true) - compare_fields(w, compare_with, field, "max_life", "%+.2f", "Maximum life: ") - compare_fields(w, compare_with, field, "max_mana", "%+.2f", "Maximum mana: ") - compare_fields(w, compare_with, field, "max_soul", "%+.2f", "Maximum souls: ") - compare_fields(w, compare_with, field, "max_stamina", "%+.2f", "Maximum stamina: ") - compare_fields(w, compare_with, field, "max_hate", "%+.2f", "Maximum hate: ") - compare_fields(w, compare_with, field, "max_psi", "%+.2f", "Maximum psi: ") - compare_fields(w, compare_with, field, "max_vim", "%+.2f", "Maximum vim: ") - compare_fields(w, compare_with, field, "max_positive", "%+.2f", "Maximum pos.energy: ") - compare_fields(w, compare_with, field, "max_negative", "%+.2f", "Maximum neg.energy: ") - compare_fields(w, compare_with, field, "max_air", "%+.2f", "Maximum air capacity: ") + compare_fields(w, compare_with, field, "die_at", _t"%+.2f life", _t"Only die when reaching: ", 1, true, true) + compare_fields(w, compare_with, field, "max_life", "%+.2f", _t"Maximum life: ") + compare_fields(w, compare_with, field, "max_mana", "%+.2f", _t"Maximum mana: ") + compare_fields(w, compare_with, field, "max_soul", "%+.2f", _t"Maximum souls: ") + compare_fields(w, compare_with, field, "max_stamina", "%+.2f", _t"Maximum stamina: ") + compare_fields(w, compare_with, field, "max_hate", "%+.2f", _t"Maximum hate: ") + compare_fields(w, compare_with, field, "max_psi", "%+.2f", _t"Maximum psi: ") + compare_fields(w, compare_with, field, "max_vim", "%+.2f", _t"Maximum vim: ") + compare_fields(w, compare_with, field, "max_positive", "%+.2f", _t"Maximum pos.energy: ") + compare_fields(w, compare_with, field, "max_negative", "%+.2f", _t"Maximum neg.energy: ") + compare_fields(w, compare_with, field, "max_air", "%+.2f", _t"Maximum air capacity: ") - compare_scaled(w, compare_with, field, "combat_spellpower", {"combatSpellpower"}, "%+d #LAST#(%+d eff.)", "Spellpower: ") - compare_fields(w, compare_with, field, "combat_spellcrit", "%+d%%", "Spell crit. chance: ") - compare_fields(w, compare_with, field, "spell_cooldown_reduction", "%d%%", "Lowers spell cool-downs by: ", 100) + compare_scaled(w, compare_with, field, "combat_spellpower", {"combatSpellpower"}, _t"%+d #LAST#(%+d eff.)", _t"Spellpower: ") + compare_fields(w, compare_with, field, "combat_spellcrit", "%+d%%", _t"Spell crit. chance: ") + compare_fields(w, compare_with, field, "spell_cooldown_reduction", "%d%%", _t"Lowers spell cool-downs by: ", 100) - compare_scaled(w, compare_with, field, "combat_mindpower", {"combatMindpower"}, "%+d #LAST#(%+d eff.)", "Mindpower: ") - compare_fields(w, compare_with, field, "combat_mindcrit", "%+d%%", "Mental crit. chance: ") + compare_scaled(w, compare_with, field, "combat_mindpower", {"combatMindpower"}, _t"%+d #LAST#(%+d eff.)", _t"Mindpower: ") + compare_fields(w, compare_with, field, "combat_mindcrit", "%+d%%", _t"Mental crit. chance: ") - compare_fields(w, compare_with, field, "lite", "%+d", "Light radius: ") - compare_fields(w, compare_with, field, "infravision", "%+d", "Infravision radius: ") - compare_fields(w, compare_with, field, "heightened_senses", "%+d", "Heightened senses radius: ") - compare_fields(w, compare_with, field, "sight", "%+d", "Sight radius: ") + compare_fields(w, compare_with, field, "lite", "%+d", _t"Light radius: ") + compare_fields(w, compare_with, field, "infravision", "%+d", _t"Infravision radius: ") + compare_fields(w, compare_with, field, "heightened_senses", "%+d", _t"Heightened senses radius: ") + compare_fields(w, compare_with, field, "sight", "%+d", _t"Sight radius: ") - compare_fields(w, compare_with, field, "see_stealth", "%+d", "See stealth: ") + compare_fields(w, compare_with, field, "see_stealth", "%+d", _t"See stealth: ") - compare_fields(w, compare_with, field, "see_invisible", "%+d", "See invisible: ") - compare_fields(w, compare_with, field, "invisible", "%+d", "Invisibility: ") + compare_fields(w, compare_with, field, "see_invisible", "%+d", _t"See invisible: ") + compare_fields(w, compare_with, field, "invisible", "%+d", _t"Invisibility: ") - compare_fields(w, compare_with, field, "global_speed_add", "%+d%%", "Global speed: ", 100) - compare_fields(w, compare_with, field, "movement_speed", "%+d%%", "Movement speed: ", 100) - compare_fields(w, compare_with, field, "combat_physspeed", "%+d%%", "Combat speed: ", 100) - compare_fields(w, compare_with, field, "combat_spellspeed", "%+d%%", "Casting speed: ", 100) - compare_fields(w, compare_with, field, "combat_mindspeed", "%+d%%", "Mental speed: ", 100) + compare_fields(w, compare_with, field, "global_speed_add", "%+d%%", _t"Global speed: ", 100) + compare_fields(w, compare_with, field, "movement_speed", "%+d%%", _t"Movement speed: ", 100) + compare_fields(w, compare_with, field, "combat_physspeed", "%+d%%", _t"Combat speed: ", 100) + compare_fields(w, compare_with, field, "combat_spellspeed", "%+d%%", _t"Casting speed: ", 100) + compare_fields(w, compare_with, field, "combat_mindspeed", "%+d%%", _t"Mental speed: ", 100) - compare_fields(w, compare_with, field, "healing_factor", "%+d%%", "Healing mod.: ", 100) - compare_fields(w, compare_with, field, "heal_on_nature_summon", "%+d", "Heals friendly targets nearby when you use a nature summon: ") + compare_fields(w, compare_with, field, "healing_factor", "%+d%%", _t"Healing mod.: ", 100) + compare_fields(w, compare_with, field, "heal_on_nature_summon", "%+d", _t"Heals friendly targets nearby when you use a nature summon: ") - compare_fields(w, compare_with, field, "life_leech_chance", "%+d%%", "Life leech chance: ") - compare_fields(w, compare_with, field, "life_leech_value", "%+d%%", "Life leech: ") + compare_fields(w, compare_with, field, "life_leech_chance", "%+d%%", _t"Life leech chance: ") + compare_fields(w, compare_with, field, "life_leech_value", "%+d%%", _t"Life leech: ") - compare_fields(w, compare_with, field, "resource_leech_chance", "%+d%%", "Resource leech chance: ") - compare_fields(w, compare_with, field, "resource_leech_value", "%+d", "Resource leech: ") + compare_fields(w, compare_with, field, "resource_leech_chance", "%+d%%", _t"Resource leech chance: ") + compare_fields(w, compare_with, field, "resource_leech_value", "%+d", _t"Resource leech: ") - compare_fields(w, compare_with, field, "damage_shield_penetrate", "%+d%%", "Damage Shield penetration: ") + compare_fields(w, compare_with, field, "damage_shield_penetrate", "%+d%%", _t"Damage Shield penetration: ") - compare_fields(w, compare_with, field, "projectile_evasion", "%+d%%", "Deflect projectiles away: ") - compare_fields(w, compare_with, field, "evasion", "%+d%%", "Chance to avoid attacks: ") - compare_fields(w, compare_with, field, "cancel_damage_chance", "%+d%%", "Chance to avoid any damage: ") + compare_fields(w, compare_with, field, "projectile_evasion", "%+d%%", _t"Deflect projectiles away: ") + compare_fields(w, compare_with, field, "evasion", "%+d%%", _t"Chance to avoid attacks: ") + compare_fields(w, compare_with, field, "cancel_damage_chance", "%+d%%", _t"Chance to avoid any damage: ") - compare_fields(w, compare_with, field, "defense_on_teleport", "%+d", "Defense after a teleport: ") - compare_fields(w, compare_with, field, "resist_all_on_teleport", "%+d%%", "Resist all after a teleport: ") - compare_fields(w, compare_with, field, "effect_reduction_on_teleport", "%+d%%", "New effects duration reduction after a teleport: ") + compare_fields(w, compare_with, field, "defense_on_teleport", "%+d", _t"Defense after a teleport: ") + compare_fields(w, compare_with, field, "resist_all_on_teleport", "%+d%%", _t"Resist all after a teleport: ") + compare_fields(w, compare_with, field, "effect_reduction_on_teleport", "%+d%%", _t"New effects duration reduction after a teleport: ") - compare_fields(w, compare_with, field, "damage_resonance", "%+d%%", "Damage Resonance (when hit): ") + compare_fields(w, compare_with, field, "damage_resonance", "%+d%%", _t"Damage Resonance (when hit): ") - compare_fields(w, compare_with, field, "size_category", "%+d", "Size category: ") + compare_fields(w, compare_with, field, "size_category", "%+d", _t"Size category: ") - compare_fields(w, compare_with, field, "nature_summon_max", "%+d", "Max wilder summons: ") - compare_fields(w, compare_with, field, "nature_summon_regen", "%+.2f", "Life regen bonus (wilder-summons): ") + compare_fields(w, compare_with, field, "nature_summon_max", "%+d", _t"Max wilder summons: ") + compare_fields(w, compare_with, field, "nature_summon_regen", "%+.2f", _t"Life regen bonus (wilder-summons): ") - compare_fields(w, compare_with, field, "shield_dur", "%+d", "Damage Shield Duration: ") - compare_fields(w, compare_with, field, "shield_factor", "%+d%%", "Damage Shield Power: ") + compare_fields(w, compare_with, field, "shield_dur", "%+d", _t"Damage Shield Duration: ") + compare_fields(w, compare_with, field, "shield_factor", "%+d%%", _t"Damage Shield Power: ") - compare_fields(w, compare_with, field, "iceblock_pierce", "%+d%%", "Ice block penetration: ") + compare_fields(w, compare_with, field, "iceblock_pierce", "%+d%%", _t"Ice block penetration: ") - compare_fields(w, compare_with, field, "slow_projectiles", "%+d%%", "Slows Projectiles: ") + compare_fields(w, compare_with, field, "slow_projectiles", "%+d%%", _t"Slows Projectiles: ") - compare_fields(w, compare_with, field, "shield_windwall", "%+d", "Bonus block near projectiles: ") + compare_fields(w, compare_with, field, "shield_windwall", "%+d", _t"Bonus block near projectiles: ") - compare_fields(w, compare_with, field, "paradox_reduce_anomalies", "%+d", "Reduces paradox anomalies(equivalent to willpower): ") + compare_fields(w, compare_with, field, "paradox_reduce_anomalies", "%+d", _t"Reduces paradox anomalies(equivalent to willpower): ") - compare_fields(w, compare_with, field, "damage_backfire", "%+d%%", "Damage Backlash: ", nil, true) + compare_fields(w, compare_with, field, "damage_backfire", "%+d%%", _t"Damage Backlash: ", nil, true) - compare_fields(w, compare_with, field, "resist_unseen", "%-d%%", "Reduce all damage from unseen attackers: ") + compare_fields(w, compare_with, field, "resist_unseen", "%-d%%", _t"Reduce all damage from unseen attackers: ") if w.undead then - desc:add("The wearer is treated as an undead.", true) + desc:add(_t"The wearer is treated as an undead.", true) end if w.demon then - desc:add("The wearer is treated as a demon.", true) + desc:add(_t"The wearer is treated as a demon.", true) end if w.blind then - desc:add("The wearer is blinded.", true) + desc:add(_t"The wearer is blinded.", true) end if w.sleep then - desc:add("The wearer is asleep.", true) + desc:add(_t"The wearer is asleep.", true) end if w.blind_fight then - desc:add({"color", "YELLOW"}, "Blind-Fight: ", {"color", "LAST"}, "This item allows the wearer to attack unseen targets without any penalties.", true) + desc:add({"color", "YELLOW"}, _t"Blind-Fight: ", {"color", "LAST"}, _t"This item allows the wearer to attack unseen targets without any penalties.", true) end if w.lucid_dreamer then - desc:add({"color", "YELLOW"}, "Lucid Dreamer: ", {"color", "LAST"}, "This item allows the wearer to act while sleeping.", true) + desc:add({"color", "YELLOW"}, _t"Lucid Dreamer: ", {"color", "LAST"}, _t"This item allows the wearer to act while sleeping.", true) end if w.no_breath then - desc:add("The wearer no longer has to breathe.", true) + desc:add(_t"The wearer no longer has to breathe.", true) end if w.quick_weapon_swap then - desc:add({"color", "YELLOW"}, "Quick Weapon Swap:", {"color", "LAST"}, "This item allows the wearer to swap to their secondary weapon without spending a turn.", true) + desc:add({"color", "YELLOW"}, _t"Quick Weapon Swap:", {"color", "LAST"}, _t"This item allows the wearer to swap to their secondary weapon without spending a turn.", true) end if w.avoid_pressure_traps then - desc:add({"color", "YELLOW"}, "Avoid Pressure Traps: ", {"color", "LAST"}, "The wearer never triggers traps that require pressure.", true) + desc:add({"color", "YELLOW"}, _t"Avoid Pressure Traps: ", {"color", "LAST"}, _t"The wearer never triggers traps that require pressure.", true) end if w.speaks_shertul then - desc:add("Allows you to speak and read the old Sher'Tul language.", true) + desc:add(_t"Allows you to speak and read the old Sher'Tul language.", true) end self:triggerHook{"Object:descWielder", compare_with=compare_with, compare_fields=compare_fields, compare_scaled=compare_scaled, compare_table_fields=compare_table_fields, desc=desc, w=w, field=field} @@ -1897,11 +1904,11 @@ function _M:getTextualDesc(compare_with, use_actor) end if (w and w.combat or can_combat_unarmed) and (use_actor:knowTalent(use_actor.T_EMPTY_HAND) or use_actor:attr("show_gloves_combat") or config.settings.tome.display_glove_stats) then - desc:add({"color","YELLOW"}, "When used to modify unarmed attacks:", {"color", "LAST"}, true) + desc:add({"color","YELLOW"}, _t"When used to modify unarmed attacks:", {"color", "LAST"}, true) compare_tab = { dam=1, atk=1, apr=0, physcrit=0, physspeed =(use_actor:knowTalent(use_actor.T_EMPTY_HAND) and 0.8 or 1), dammod={str=1}, damrange=1.1 } desc_combat(w, compare_unarmed, "combat", compare_tab, true) elseif (w and w.combat or can_combat_unarmed) then - desc:add({"color","LIGHT_BLUE"}, "Learn an unarmed attack talent or enable 'Always show glove combat' to see combat stats.", {"color", "LAST"}, true) + desc:add({"color","LIGHT_BLUE"}, _t"Learn an unarmed attack talent or enable 'Always show glove combat' to see combat stats.", {"color", "LAST"}, true) end end local can_combat = false @@ -1933,10 +1940,10 @@ function _M:getTextualDesc(compare_with, use_actor) end if (self.special_combat or can_special_combat) and (use_actor:knowTalentType("technique/shield-offense") or use_actor:knowTalentType("technique/shield-defense") or use_actor:attr("show_shield_combat") or config.settings.tome.display_shield_stats) then - desc:add({"color","YELLOW"}, "When used to attack (with talents):", {"color", "LAST"}, true) + desc:add({"color","YELLOW"}, _t"When used to attack (with talents):", {"color", "LAST"}, true) desc_combat(self, compare_with, "special_combat") elseif (self.special_combat or can_special_combat) then - desc:add({"color","LIGHT_BLUE"}, "Learn shield attack talent or enable 'Always show shield combat' to see combat stats.", {"color", "LAST"}, true) + desc:add({"color","LIGHT_BLUE"}, _t"Learn shield attack talent or enable 'Always show shield combat' to see combat stats.", {"color", "LAST"}, true) end local found = false @@ -1947,36 +1954,36 @@ function _M:getTextualDesc(compare_with, use_actor) end if self.no_teleport then - desc:add(found and {"color","WHITE"} or {"color","GREEN"}, "It is immune to teleportation, if you teleport it will fall on the ground.", {"color", "LAST"}, true) + desc:add(found and {"color","WHITE"} or {"color","GREEN"}, _t"It is immune to teleportation, if you teleport it will fall on the ground.", {"color", "LAST"}, true) elseif found then - desc:add({"color","RED"}, "It is immune to teleportation, if you teleport it will fall on the ground.", {"color", "LAST"}, true) + desc:add({"color","RED"}, _t"It is immune to teleportation, if you teleport it will fall on the ground.", {"color", "LAST"}, true) end if self.wielder or can_wielder then - desc:add({"color","YELLOW"}, "When wielded/worn:", {"color", "LAST"}, true) + desc:add({"color","YELLOW"}, _t"When wielded/worn:", {"color", "LAST"}, true) desc_wielder(self, compare_with, "wielder") if self:attr("skullcracker_mult") and use_actor:knowTalent(use_actor.T_SKULLCRACKER) then - compare_fields(self, compare_with, "wielder", "skullcracker_mult", "%+d", "Skullcracker multiplicator: ") + compare_fields(self, compare_with, "wielder", "skullcracker_mult", "%+d", _t"Skullcracker multiplicator: ") end end if self.carrier or can_carrier then - desc:add({"color","YELLOW"}, "When carried:", {"color", "LAST"}, true) + desc:add({"color","YELLOW"}, _t"When carried:", {"color", "LAST"}, true) desc_wielder(self, compare_with, "carrier") end if self.is_tinker then if self.on_type then if self.on_subtype then - desc:add("Attach on item of type '", {"color","ORANGE"}, self.on_type, " / ", self.on_subtype, {"color", "LAST"}, "'", true) + desc.add(("Attach on item of type '#ORANGE#%s / %s#LAST#'"):tformat(self.on_type, self.on_subtype):toTString(), true) else - desc:add("Attach on item of type '", {"color","ORANGE"}, self.on_type, {"color", "LAST"}, "'", true) + desc.add(("Attach on item of type '#ORANGE#%s#LAST#'"):tformat(self.on_type):toTString(), true) end end - if self.on_slot then desc:add("Attach on item worn on slot '", {"color","ORANGE"}, self.on_slot:lower():gsub('_', ' '), {"color", "LAST"}, "'", true) end + if self.on_slot then desc.add(("Attach on item worn on slot '#ORANGE#%s#LAST#'"):tformat(self.on_slot:lower():gsub('_', ' ')):toTString(), true) end if self.object_tinker and (self.object_tinker.combat or self.object_tinker.wielder) then - desc:add({"color","YELLOW"}, "When attach to an other item:", {"color", "LAST"}, true) + desc:add({"color","YELLOW"}, _t"When attach to an other item:", {"color", "LAST"}, true) if self.object_tinker.combat then desc_combat(self.object_tinker, compare_with, "combat") end if self.object_tinker.wielder then desc_wielder(self.object_tinker, compare_with, "wielder") end end @@ -1994,12 +2001,12 @@ function _M:getTextualDesc(compare_with, use_actor) if self.on_block and self.on_block.desc then local d = self.on_block.desc desc:add({"color", "ORCHID"}) - desc:add("Special effect on block: " .. d) + desc:add(_t"Special effect on block: " .. d) desc:add({"color", "LAST"}, true) end if self.imbue_powers or can_imbue_powers then - desc:add({"color","YELLOW"}, "When used to imbue an object:", {"color", "LAST"}, true) + desc:add({"color","YELLOW"}, _t"When used to imbue an object:", {"color", "LAST"}, true) desc_wielder(self, compare_with, "imbue_powers") end @@ -2010,27 +2017,27 @@ function _M:getTextualDesc(compare_with, use_actor) if a then a = a.alchemist_bomb end end if a then - desc:add({"color","YELLOW"}, "When used as an alchemist bomb:", {"color", "LAST"}, true) - if a.power then desc:add(("Bomb damage +%d%%"):format(a.power), true) end - if a.range then desc:add(("Bomb thrown range +%d"):format(a.range), true) end - if a.mana then desc:add(("Mana regain %d"):format(a.mana), true) end - if a.daze then desc:add(("%d%% chance to daze for %d turns"):format(a.daze.chance, a.daze.dur), true) end - if a.stun then desc:add(("%d%% chance to stun for %d turns"):format(a.stun.chance, a.stun.dur), true) end + desc:add({"color","YELLOW"}, _t"When used as an alchemist bomb:", {"color", "LAST"}, true) + if a.power then desc:add(("Bomb damage +%d%%"):tformat(a.power), true) end + if a.range then desc:add(("Bomb thrown range +%d"):tformat(a.range), true) end + if a.mana then desc:add(("Mana regain %d"):tformat(a.mana), true) end + if a.daze then desc:add(("%d%% chance to daze for %d turns"):tformat(a.daze.chance, a.daze.dur), true) end + if a.stun then desc:add(("%d%% chance to stun for %d turns"):tformat(a.stun.chance, a.stun.dur), true) end if a.splash then if a.splash.desc then desc:add(a.splash.desc, true) else - desc:add(("Additional %d %s damage"):format(a.splash.dam, DamageType:get(DamageType[a.splash.type]).name), true) + desc:add(("Additional %d %s damage"):tformat(a.splash.dam, DamageType:get(DamageType[a.splash.type]).name), true) end end - if a.leech then desc:add(("Life regen %d%% of max life"):format(a.leech), true) end + if a.leech then desc:add(("Life regen %d%% of max life"):tformat(a.leech), true) end end end local latent = table.get(self.color_attributes, 'damage_type') if latent then latent = DamageType:get(latent) or {} - desc:add({"color","YELLOW",}, "Latent Damage Type: ", {"color","LAST",}, + desc:add({"color","YELLOW",}, _t"Latent Damage Type: ", {"color","LAST",}, latent.text_color or "#WHITE#", latent.name:capitalize(), {"color", "LAST",}, true) end @@ -2040,7 +2047,7 @@ function _M:getTextualDesc(compare_with, use_actor) if t then local ok, tdesc = pcall(use_actor.getTalentFullDescription, use_actor, t) if ok and tdesc then - desc:add({"color","YELLOW"}, "When inscribed on your body:", {"color", "LAST"}, true) + desc:add({"color","YELLOW"}, _t"When inscribed on your body:", {"color", "LAST"}, true) desc:merge(tdesc) desc:add(true) end @@ -2058,14 +2065,14 @@ function _M:getTextualDesc(compare_with, use_actor) for _, data in ipairs(v[field] and (v[field].talent_on_spell or {})or {}) do if data.talent then local tid = data.talent if not talents[tid] or talents[tid][1]~=data.chance or talents[tid][2]~=data.level then - desc:add({"color","RED"}, ("Talent on hit(spell): %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) + desc:add({"color","RED"}, ("Talent on hit(spell): %s (%d%% chance level %d)."):tformat(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) else talents[tid][3] = true end end end end for tid, data in pairs(talents) do - desc:add(talents[tid][3] and {"color","GREEN"} or {"color","WHITE"}, ("Talent on hit(spell): %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) + desc:add(talents[tid][3] and {"color","GREEN"} or {"color","WHITE"}, ("Talent on hit(spell): %s (%d%% chance level %d)."):tformat(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) end local talents = {} @@ -2078,14 +2085,14 @@ function _M:getTextualDesc(compare_with, use_actor) for _, data in ipairs(v[field] and (v[field].talent_on_wild_gift or {})or {}) do if data.talent then local tid = data.talent if not talents[tid] or talents[tid][1]~=data.chance or talents[tid][2]~=data.level then - desc:add({"color","RED"}, ("Talent on hit(nature): %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) + desc:add({"color","RED"}, ("Talent on hit(nature): %s (%d%% chance level %d)."):tformat(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) else talents[tid][3] = true end end end end for tid, data in pairs(talents) do - desc:add(talents[tid][3] and {"color","GREEN"} or {"color","WHITE"}, ("Talent on hit(nature): %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) + desc:add(talents[tid][3] and {"color","GREEN"} or {"color","WHITE"}, ("Talent on hit(nature): %s (%d%% chance level %d)."):tformat(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) end local talents = {} @@ -2098,22 +2105,22 @@ function _M:getTextualDesc(compare_with, use_actor) for _, data in ipairs(v[field] and (v[field].talent_on_mind or {})or {}) do if data.talent then local tid = data.talent if not talents[tid] or talents[tid][1]~=data.chance or talents[tid][2]~=data.level then - desc:add({"color","RED"}, ("Talent on hit(mindpower): %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) + desc:add({"color","RED"}, ("Talent on hit(mindpower): %s (%d%% chance level %d)."):tformat(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) else talents[tid][3] = true end end end end for tid, data in pairs(talents) do - desc:add(talents[tid][3] and {"color","GREEN"} or {"color","WHITE"}, ("Talent on hit(mindpower): %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) + desc:add(talents[tid][3] and {"color","GREEN"} or {"color","WHITE"}, ("Talent on hit(mindpower): %s (%d%% chance level %d)."):tformat(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) end if self.use_no_energy and self.use_no_energy ~= "fake" then - desc:add("Activating this item is instant.", true) + desc:add(_t"Activating this item is instant.", true) elseif self.use_talent then local t = use_actor:getTalentFromId(self.use_talent.id) if util.getval(t.no_energy, use_actor, t) == true then - desc:add("Activating this item is instant.", true) + desc:add(_t"Activating this item is instant.", true) end end @@ -2140,35 +2147,35 @@ function _M:getUseDesc(use_actor) if self.use_power and not self.use_power.hidden then local desc = util.getval(self.use_power.name, self, use_actor) if self.show_charges then - ret = tstring{{"color","YELLOW"}, ("It can be used to %s, with %d charges out of %d."):format(desc, math.floor(self.power / usepower(self.use_power.power)), math.floor(self.max_power / usepower(self.use_power.power))), {"color","LAST"}} + ret = tstring{{"color","YELLOW"}, ("It can be used to %s, with %d charges out of %d."):tformat(desc, math.floor(self.power / usepower(self.use_power.power)), math.floor(self.max_power / usepower(self.use_power.power))), {"color","LAST"}} elseif self.talent_cooldown then - local t_name = self.talent_cooldown == "T_GLOBAL_CD" and "all charms" or "Talent "..use_actor:getTalentDisplayName(use_actor:getTalentFromId(self.talent_cooldown)) - ret = tstring{{"color","YELLOW"}, ("It can be used to %s\n\nActivation puts %s on cooldown for %d turns."):format(desc:format(self:getCharmPower(use_actor)), t_name, usepower(self.use_power.power)), {"color","LAST"}} + local t_name = self.talent_cooldown == "T_GLOBAL_CD" and _t"all charms" or ("Talent %s"):tformat(use_actor:getTalentDisplayName(use_actor:getTalentFromId(self.talent_cooldown))) + ret = tstring{{"color","YELLOW"}, ("It can be used to %s\n\nActivation puts %s on cooldown for %d turns."):tformat(desc:tformat(self:getCharmPower(use_actor)), t_name, usepower(self.use_power.power)), {"color","LAST"}} else - ret = tstring{{"color","YELLOW"}, ("It can be used to %s\n\nActivation costs %d power out of %d/%d."):format(desc, usepower(self.use_power.power), self.power, self.max_power), {"color","LAST"}} + ret = tstring{{"color","YELLOW"}, ("It can be used to %s\n\nActivation costs %d power out of %d/%d."):tformat(desc, usepower(self.use_power.power), self.power, self.max_power), {"color","LAST"}} end elseif self.use_simple then - ret = tstring{{"color","YELLOW"}, ("It can be used to %s."):format(util.getval(self.use_simple.name, self, use_actor)), {"color","LAST"}} + ret = tstring{{"color","YELLOW"}, ("It can be used to %s."):tformat(util.getval(self.use_simple.name, self, use_actor)), {"color","LAST"}} elseif self.use_talent then local t = use_actor:getTalentFromId(self.use_talent.id) if t then - local desc = use_actor:getTalentFullDescription(t, nil, {force_level=self.use_talent.level, ignore_cd=true, ignore_ressources=true, ignore_use_time=true, ignore_mode=true, custom=self.use_talent.power and tstring{{"color",0x6f,0xff,0x83}, "Power cost: ", {"color",0x7f,0xff,0xd4},("%d out of %d/%d."):format(usepower(self.use_talent.power), self.power, self.max_power)}}) + local desc = use_actor:getTalentFullDescription(t, nil, {force_level=self.use_talent.level, ignore_cd=true, ignore_ressources=true, ignore_use_time=true, ignore_mode=true, custom=self.use_talent.power and tstring{{"color",0x6f,0xff,0x83}, _t"Power cost: ", {"color",0x7f,0xff,0xd4},("%d out of %d/%d."):tformat(usepower(self.use_talent.power), self.power, self.max_power)}}) if self.talent_cooldown then - ret = tstring{{"color","YELLOW"}, "It can be used to activate talent ", t.name,", placing all other charms into a ", tostring(math.floor(usepower(self.use_talent.power))) ," cooldown :", {"color","LAST"}, true} + ret = tstring{{"color","YELLOW"}, ("It can be used to activate talent %s, placing all other charms into a %s cooldown :"):tformat(t.name, tostring(math.floor(usepower(self.use_talent.power)))), {"color","LAST"}, true} else - ret = tstring{{"color","YELLOW"}, "It can be used to activate talent ", t.name," (costing ", tostring(math.floor(usepower(self.use_talent.power))), " power out of ", tostring(math.floor(self.power)), "/", tostring(math.floor(self.max_power)), ") :", {"color","LAST"}, true} + ret = tstring{{"color","YELLOW"}, ("It can be used to activate talent %s (costing %s power out of %s/%s) :"):tformat(t.name, tostring(math.floor(usepower(self.use_talent.power))), tostring(math.floor(self.power)), tostring(math.floor(self.max_power))), {"color","LAST"}, true} end ret:merge(desc) end end if self.charm_on_use then - ret:add(true, "When used:", true) + ret:add(true, _t"When used:", true) for i, d in ipairs(self.charm_on_use) do -- Clean up the description if our chance to proc is 100% local percent = d[1] if percent < 100 then - ret:add({"color","ORCHID"}, "* ", tostring(d[1]), "% chance to ", d[2](self, use_actor), ".", true, {"color","LAST"}) + ret:add({"color","ORCHID"}, "* ", ("%s%% chance to %s"):tformat(tostring(d[1]), d[2](self, use_actor)), ".", true, {"color","LAST"}) else ret:add({"color","ORCHID"}, "* ", d[2](self, use_actor):capitalize(), ".", true, {"color","LAST"}) end @@ -2184,10 +2191,10 @@ function _M:getDesc(name_param, compare_with, never_compare, use_actor) local desc = tstring{} if self.__new_pickup then - desc:add({"font","bold"},{"color","LIGHT_BLUE"},"Newly picked up",{"font","normal"},{"color","LAST"},true) + desc:add({"font","bold"},{"color","LIGHT_BLUE"},_t"Newly picked up",{"font","normal"},{"color","LAST"},true) end if self.__transmo then - desc:add({"font","bold"},{"color","YELLOW"},"This item will automatically be transmogrified when you leave the level.",{"font","normal"},{"color","LAST"},true) + desc:add({"font","bold"},{"color","YELLOW"},_t"This item will automatically be transmogrified when you leave the level.",{"font","normal"},{"color","LAST"},true) end name_param = name_param or {} @@ -2201,18 +2208,21 @@ function _M:getDesc(name_param, compare_with, never_compare, use_actor) desc:merge(reqs) end + print("[DEBUG XXX power source]") + table.print(desc) if self.power_source then - if self.power_source.arcane then desc:add("Powered by ", {"color", "VIOLET"}, "arcane forces", {"color", "LAST"}, true) end - if self.power_source.nature then desc:add("Infused by ", {"color", "OLIVE_DRAB"}, "nature", {"color", "LAST"}, true) end - if self.power_source.antimagic then desc:add("Infused by ", {"color", "ORCHID"}, "arcane disrupting forces", {"color", "LAST"}, true) end - if self.power_source.technique then desc:add("Crafted by ", {"color", "LIGHT_UMBER"}, "a master", {"color", "LAST"}, true) end - if self.power_source.psionic then desc:add("Infused by ", {"color", "YELLOW"}, "psionic forces", {"color", "LAST"}, true) end - if self.power_source.unknown then desc:add("Powered by ", {"color", "CRIMSON"}, "unknown forces", {"color", "LAST"}, true) end + if self.power_source.arcane then desc:merge((_t"Powered by #VIOLET#arcane forces#LAST#\n"):toTString()) end + if self.power_source.nature then desc:merge((_t"Infused by #OLIVE_DRAB#nature#LAST#\n"):toTString()) end + if self.power_source.antimagic then desc:merge((_t"Infused by #ORCHID#arcane disrupting forces#LAST#\n"):toTString()) end + if self.power_source.technique then desc:merge((_t"Crafted by #LIGHT_UMBER#a master#LAST#\n"):toTString()) end + if self.power_source.psionic then desc:merge((_t"Infused by #YELLOW#psionic forces#LAST#\n"):toTString()) end + if self.power_source.unknown then desc:merge((_t"Powered by #CRIMSON#unknown forces#LAST#\n"):toTString()) end self:triggerHook{"Object:descPowerSource", desc=desc, object=self} end + table.print(desc) if self.encumber then - desc:add({"color",0x67,0xAD,0x00}, ("%0.2f Encumbrance."):format(self.encumber), {"color", "LAST"}) + desc:add({"color",0x67,0xAD,0x00}, ("%0.2f Encumbrance."):tformat(self.encumber), {"color", "LAST"}) end -- if self.ego_bonus_mult then -- desc:add(true, {"color",0x67,0xAD,0x00}, ("%0.2f Ego Multiplier."):format(1 + self.ego_bonus_mult), {"color", "LAST"}) @@ -2235,12 +2245,13 @@ function _M:getDesc(name_param, compare_with, never_compare, use_actor) if self.shimmer_moddable then local oname = (self.shimmer_moddable.name or "???"):toTString() - desc:add(true, {"color", "OLIVE_DRAB"}, "This object's appearance was changed to ") - desc:merge(oname) - desc:add(".", {"color","LAST"}, true) + desc:add(true, {"color", "OLIVE_DRAB"}) + desc:merge(("This object's appearance was changed to %s"):tformat(oname:toString()):toTString()) + -- desc:merge(oname) + desc:add(_t".", {"color","LAST"}, true) end - if could_compare and not never_compare then desc:add(true, {"font","italic"}, {"color","GOLD"}, "Press <control> to compare", {"color","LAST"}, {"font","normal"}) end + if could_compare and not never_compare then desc:add(true, {"font","italic"}, {"color","GOLD"}, _t"Press <control> to compare", {"color","LAST"}, {"font","normal"}) end return desc end @@ -2590,7 +2601,7 @@ function _M:commandStaff(element, flavor) end self.combat.element = element if self.combat.melee_element then self.combat.damtype = element end - if not self.unique then self.name = self.name:gsub(self.flavor_name or "staff", flavor) end + if not self.unique then self.name = _t(self.name):gsub(_t(self.flavor_name or "staff"), _t(flavor)) end self.flavor_name = flavor end diff --git a/game/modules/tome/class/Party.lua b/game/modules/tome/class/Party.lua index ea826711fe68f02900720b9a1a8cb0afcc382f33..bdc27b54a2d9c163445a27d12e3211ea6f85a37f 100644 --- a/game/modules/tome/class/Party.lua +++ b/game/modules/tome/class/Party.lua @@ -55,7 +55,7 @@ function _M:addMember(actor, def) end if type(def.control) == "nil" then def.control = "no" end - def.title = def.title or "Party member" + def.title = def.title or _t"Party member" self.members[actor] = def self.m_list[#self.m_list+1] = actor def.index = #self.m_list @@ -241,8 +241,8 @@ function _M:setPlayer(actor, bypass) if actor == game.player then return true end -- Stop!! - if game.player and game.player.runStop then game.player:runStop("Switching control") end - if game.player and game.player.restStop then game.player:restStop("Switching control") end + if game.player and game.player.runStop then game.player:runStop(_t"Switching control") end + if game.player and game.player.restStop then game.player:restStop(_t"Switching control") end local def = self.members[actor] local oldp = self.player @@ -296,7 +296,7 @@ function _M:setPlayer(actor, bypass) if not actor.hotkeys_sorted then actor:sortHotkeys() end - game.logPlayer(actor, "#MOCCASIN#Character control switched to %s.", actor.name) + game.logPlayer(actor, "#MOCCASIN#Character control switched to %s.", actor:getName()) if game.player.resetMainShader then game.player:resetMainShader() end @@ -364,9 +364,9 @@ function _M:giveOrder(actor, order) local def = self.members[actor] if order == "leash" then - game:registerDialog(GetQuantity.new("Set action radius: "..actor.name, "Set the maximum distance this creature can go from the party master", actor.ai_state.tactic_leash, actor.ai_state.tactic_leash_max or 100, function(qty) + game:registerDialog(GetQuantity.new(("Set action radius: %s"):tformat(actor:getName()), _t"Set the maximum distance this creature can go from the party master", actor.ai_state.tactic_leash, actor.ai_state.tactic_leash_max or 100, function(qty) actor.ai_state.tactic_leash = util.bound(qty, 1, actor.ai_state.tactic_leash_max or 100) - game.logPlayer(game.player, "%s maximum action radius set to %d.", actor.name:capitalize(), actor.ai_state.tactic_leash) + game.logPlayer(game.player, "%s maximum action radius set to %d.", actor:getName():capitalize(), actor.ai_state.tactic_leash) end), 1) elseif order == "anchor" then local co = coroutine.create(function() @@ -376,10 +376,10 @@ function _M:giveOrder(actor, order) if act then anchor = act else - anchor = {x=x, y=y, name="that location"} + anchor = {x=x, y=y, name=_t"that location"} end actor.ai_state.tactic_leash_anchor = anchor - game.logPlayer(game.player, "%s will stay near %s.", actor.name:capitalize(), anchor.name) + game.logPlayer(game.player, "%s will stay near %s.", actor:getName():capitalize(), _t(anchor.name)) end end) local ok, err = coroutine.resume(co) @@ -389,14 +389,14 @@ function _M:giveOrder(actor, order) local x, y, act = game.player:getTarget({type="hit", range=10}) if act then actor:setTarget(act) - game.player:logCombat(act, "%s targets #Target#.", actor.name:capitalize()) + game.player:logCombat(act, "%s targets #Target#.", actor:getName():capitalize()) end end) local ok, err = coroutine.resume(co) if not ok and err then print(debug.traceback(co)) error(err) end elseif order == "rename" then local scheme = self.members[actor].orders[order] - local d = require("engine.dialogs.GetText").new(("Change name of: %s"):format(actor.name), "Name", 2, 25, function(name) if name then + local d = require("engine.dialogs.GetText").new(("Change name of: %s"):tformat(actor:getName()), _t"Name", 2, 25, function(name) if name then actor.name = scheme(actor, name) end end) game:registerDialog(d) @@ -410,18 +410,18 @@ function _M:giveOrder(actor, order) ------------------------------------------- elseif order == "escort_rest" then -- Rest for a few turns - if actor.ai_state.tactic_escort_rest then actor:doEmote("No, we must hurry!", 40) return true end + if actor.ai_state.tactic_escort_rest then actor:doEmote(_t"No, we must hurry!", 40) return true end actor.ai_state.tactic_escort_rest = rng.range(6, 10) - actor:doEmote("Ok, but not for long.", 40) + actor:doEmote(_t"Ok, but not for long.", 40) elseif order == "escort_portal" then local dist = core.fov.distance(actor.escort_target.x, actor.escort_target.y, actor.x, actor.y) - if dist < 8 then dist = "very close" - elseif dist < 16 then dist = "close" - else dist = "still far away" + if dist < 8 then dist = _t"very close" + elseif dist < 16 then dist = _t"close" + else dist = _t"still far away" end local dir = game.level.map:compassDirection(actor.escort_target.x - actor.x, actor.escort_target.y - actor.y) - actor:doEmote(("The portal is %s, to the %s."):format(dist, dir or "???"), 45) + actor:doEmote(("The portal is %s, to the %s."):tformat(dist, dir or "???"), 45) end return true diff --git a/game/modules/tome/class/PartyMember.lua b/game/modules/tome/class/PartyMember.lua index 540230868156dadb9ae64606b9ccdbd7b84ba479..512db8f70ea3d48f51340ebe316dec9fb998d473 100644 --- a/game/modules/tome/class/PartyMember.lua +++ b/game/modules/tome/class/PartyMember.lua @@ -42,8 +42,8 @@ function _M:tooltip(x, y, seen_by) str:add( true, {"color", "TEAL"}, - ("Behavior: %s"):format(self.ai_tactic.type or "default"), true, - ("Action radius: %d"):format(self.ai_state.tactic_leash), + ("Behavior: %s"):tformat(_t(self.ai_tactic.type) or _t"default"), true, + ("Action radius: %d"):tformat(self.ai_state.tactic_leash), {"color", "WHITE"} ) return str diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 9eeea6839786ca794160efd377d7b85c1afe3ae2..1ba13723018157c058f5d89b3ced1e974ef4aa81 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -281,9 +281,9 @@ function _M:describeFloor(x, y, force) local g = game.level.map(x, y, game.level.map.TERRAIN) if g and g.change_level then - game.logPlayer(self, "#YELLOW_GREEN#There is "..g.name:a_an().." here (press '<', '>' or right click to use).") + game.logPlayer(self, "#YELLOW_GREEN#There is %s here (press '<', '>' or right click to use).", g:getName():a_an()) local sx, sy = game.level.map:getTileToScreen(x, y, true) - game.flyers:add(sx, sy, 60, 0, -1.5, ("Level change (%s)!"):format(g.name), colors.simple(colors.YELLOW_GREEN), true) + game.flyers:add(sx, sy, 60, 0, -1.5, ("Level change (%s)!"):tformat(g:getName()), colors.simple(colors.YELLOW_GREEN), true) end end @@ -366,7 +366,7 @@ function _M:actBase() if self.summon_time then self.summon_time = self.summon_time - 1 if self.summon_time <= 0 then - game.logPlayer(self, "#PINK#Your summoned %s disappears.", self.name) + game.logPlayer(self, "#PINK#Your summoned %s disappears.", self:getName()) self:die() return true end @@ -754,12 +754,12 @@ end --- Called before taking a hit, overload mod.class.Actor:onTakeHit() to stop resting and running function _M:onTakeHit(value, src, death_note) - self:runStop("taken damage") - self:restStop("taken damage") + self:runStop(_t"taken damage") + self:restStop(_t"taken damage") local ret = mod.class.Actor.onTakeHit(self, value, src, death_note) if self.life < self.max_life * 0.3 then local sx, sy = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, 2, "LOW HEALTH!", {255,0,0}, true) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, 2, _t"LOW HEALTH!", {255,0,0}, true) end -- Hit direction warning @@ -778,8 +778,8 @@ function _M:on_set_temporary_effect(eff_id, e, p) local ret = mod.class.Actor.on_set_temporary_effect(self, eff_id, e, p) if e.status == "detrimental" and not e.no_stop_resting and p.dur > 0 then - self:runStop("detrimental status effect") - self:restStop("detrimental status effect") + self:runStop(_t"detrimental status effect") + self:restStop(_t"detrimental status effect") end return ret @@ -795,8 +795,8 @@ function _M:heal(value, src) end function _M:die(src, death_note) - if self.runStop then self:runStop("died") end - if self.restStop then self:restStop("died") end + if self.runStop then self:runStop(_t"died") end + if self.restStop then self:restStop(_t"died") end return self:onPartyDeath(src, death_note) end @@ -807,16 +807,16 @@ function _M:suffocate(value, src, death_msg) if affected and value > 0 and self.runStop then -- only stop autoexplore when air is less than 75% of max. if self.air < 0.75 * self.max_air and self.air < 100 then - self:runStop("suffocating") - self:restStop("suffocating") + self:runStop(_t"suffocating") + self:restStop(_t"suffocating") end end return dead, affected end function _M:onChat() - self:runStop("chat started") - self:restStop("chat started") + self:runStop(_t"chat started") + self:restStop(_t"chat started") end function _M:setName(name) @@ -830,7 +830,7 @@ function _M:onTalentCooledDown(tid) local t = self:getTalentFromId(tid) local x, y = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(x, y, 30, -0.3, -3.5, ("%s available"):format(t.name:capitalize()), {0,255,00}) + game.flyers:add(x, y, 30, -0.3, -3.5, ("%s available"):tformat(t.name:capitalize()), {0,255,00}) game.log("#00ff00#%sTalent %s is ready to use.", (t.display_entity and t.display_entity:getDisplayString() or ""), t.name) end @@ -888,7 +888,7 @@ local function spotHostiles(self, actors_only) core.fov.calc_circle(self.x, self.y, game.level.map.w, game.level.map.h, self.sight or 10, function(_, x, y) return game.level.map:opaque(x, y) end, function(_, x, y) local actor = game.level.map(x, y, game.level.map.ACTOR) if actor and self:reactionToward(actor) < 0 and self:canSee(actor) and game.level.map.seens(x, y) then - seen[#seen + 1] = {x=x,y=y,actor=actor, entity=actor, name=actor.name} + seen[#seen + 1] = {x=x,y=y,actor=actor, entity=actor, name=actor:getName()} end end, nil) @@ -1003,7 +1003,7 @@ end -- We can rest if no hostiles are in sight, and if we need life/mana/stamina/psi (and their regen rates allows them to fully regen) -- The "callbackOnRest" callback for any talent that defines it must return true to allow further resting function _M:restCheck() - if game:hasDialogUp(1) then return false, "dialog is displayed" end + if game:hasDialogUp(1) then return false, _t"dialog is displayed" end local spotted = spotHostiles(self) if #spotted > 0 then @@ -1011,7 +1011,7 @@ function _M:restCheck() node.entity:addParticles(engine.Particles.new("notice_enemy", 1)) end local dir = game.level.map:compassDirection(spotted[1].x - self.x, spotted[1].y - self.y) - return false, ("hostile spotted to the %s (%s%s)"):format(dir or "???", spotted[1].name, game.level.map:isOnScreen(spotted[1].x, spotted[1].y) and "" or " - offscreen") + return false, ("hostile spotted to the %s (%s%s)"):tformat(dir or "???", spotted[1].name, game.level.map:isOnScreen(spotted[1].x, spotted[1].y) and "" or _t" - offscreen") end -- Resting improves regen @@ -1037,8 +1037,8 @@ function _M:restCheck() -- Check resources, make sure they CAN go up, otherwise we will never stop if not self.resting.rest_turns then - if self.air_regen < 0 then return false, "losing breath!" end - if self.life_regen <= 0 then return false, "losing health!" end + if self.air_regen < 0 then return false, _t"losing breath!" end + if self.life_regen <= 0 then return false, _t"losing health!" end if self.life < self.max_life and self.life_regen > 0 and not self:attr("no_life_regen") then return true end if self.air < self.max_air and self.air_regen > 0 and not self.is_suffocating then return true end for act, def in pairs(game.party.members) do if game.level:hasEntity(act) and not act.dead then @@ -1134,7 +1134,7 @@ function _M:restCheck() self.resting.rested_fully = true - return false, "all resources and life at maximum" + return false, _t"all resources and life at maximum" end --- The Player rests a turn @@ -1167,21 +1167,21 @@ end -- Known traps aren't interesting. We let the engine run around traps, or stop if it can't. -- 'ignore_memory' is only used when checking for paths around traps. This ensures we don't remember items "obj_seen" that we aren't supposed to function _M:runCheck(ignore_memory) - if game:hasDialogUp(1) then return false, "dialog is displayed" end + if game:hasDialogUp(1) then return false, _t"dialog is displayed" end local is_main_player = self == game:getPlayer(true) local spotted = spotHostiles(self) if #spotted > 0 then local dir = game.level.map:compassDirection(spotted[1].x - self.x, spotted[1].y - self.y) - return false, ("hostile spotted to the %s (%s%s)"):format(dir or "???", spotted[1].name, game.level.map:isOnScreen(spotted[1].x, spotted[1].y) and "" or " - offscreen") + return false, ("hostile spotted to the %s (%s%s)"):tformat(dir or "???", spotted[1].name, game.level.map:isOnScreen(spotted[1].x, spotted[1].y) and "" or _t" - offscreen") end - if self:fireTalentCheck("callbackOnRun") then return false, "talent prevented" end + if self:fireTalentCheck("callbackOnRun") then return false, _t"talent prevented" end - if self.air_regen < 0 and self.air < 0.75 * self.max_air then return false, "losing breath!" end + if self.air_regen < 0 and self.air < 0.75 * self.max_air then return false, _t"losing breath!" end -- Notice any noticeable terrain - local noticed = false + local noticed = _tfalse self:runScan(function(x, y, what) -- Objects are always interesting, only on curent spot local obj_seen = game.level.map.attrs(x, y, "obj_seen") @@ -1189,7 +1189,7 @@ function _M:runCheck(ignore_memory) local obj = game.level.map:getObject(x, y, 1) if obj then if not ignore_memory then game.level.map.attrs(x, y, "obj_seen", is_main_player and true or self) end - noticed = "object seen" + noticed = _t"object seen" return false, noticed end end @@ -1197,7 +1197,7 @@ function _M:runCheck(ignore_memory) local grid = game.level.map(x, y, Map.TERRAIN) if grid and grid.special and not grid.autoexplore_ignore and not game.level.map.attrs(x, y, "autoexplore_ignore") and self.running and self.running.path then game.level.map.attrs(x, y, "autoexplore_ignore", true) - noticed = "something interesting" + noticed = _t"something interesting" return false, noticed end @@ -1214,24 +1214,24 @@ function _M:runCheck(ignore_memory) then if grid and grid.special then game.level.map.attrs(x, y, "autoexplore_ignore", true) - noticed = "something interesting" + noticed = _t"something interesting" elseif self.running and self.running.explore and self.running.path and self.running.explore ~= "unseen" and self.running.cnt == #self.running.path + 1 then - noticed = "at " .. self.running.explore + noticed = ("at %s"):tformat(_t(self.running.explore)) else - noticed = "interesting terrain" + noticed = _t"interesting terrain" end -- let's only remember and ignore standard interesting terrain if not ignore_memory and (grid.change_level or grid.orb_portal or grid.escort_portal) then game.level.map.attrs(x, y, "noticed", true) end return false, noticed end - if grid and grid.type and grid.type == "store" then noticed = "store entrance spotted" ; return false, noticed end + if grid and grid.type and grid.type == "store" then noticed = _t"store entrance spotted" ; return false, noticed end -- Only notice interesting characters local actor = game.level.map(x, y, Map.ACTOR) - if actor and actor.can_talk then noticed = "interesting character" ; return false, noticed end + if actor and actor.can_talk then noticed = _t"interesting character" ; return false, noticed end -- We let the engine take care of traps, but we should still notice "trap" stores. - if game.level.map:checkAllEntities(x, y, "store") then noticed = "store entrance spotted" ; return false, noticed end + if game.level.map:checkAllEntities(x, y, "store") then noticed = _t"store entrance spotted" ; return false, noticed end end) if noticed then return false, noticed end local can, noticed = engine.interface.PlayerRun.runCheck(self) @@ -1324,7 +1324,7 @@ function _M:hotkeyInventory(name) local o, item, inven = find(name) if not o then - Dialog:simplePopup("Item not found", "You do not have any "..name..".") + Dialog:simplePopup(_t"Item not found", ("You do not have any %s."):tformat(name)) else -- Wear it ?? if o:wornInven() and not o.wielded and inven == self.INVEN_INVEN then @@ -1340,7 +1340,7 @@ end function _M:playerPickup() -- If 2 or more objects, display a pickup dialog, otherwise just picks up if game.level.map:getObject(self.x, self.y, 2) then - local titleupdator = self:getEncumberTitleUpdator("Pickup") + local titleupdator = self:getEncumberTitleUpdator(_t"Pickup") local d d = self:showPickupFloor(titleupdator(), nil, function(o, item) if self:attr("sleep") and not self:attr("lucid_dreamer") then game:delayedLogMessage(self, nil, "sleep pickup", "You cannot pick up items from the floor while asleep!") @@ -1368,7 +1368,7 @@ end function _M:playerDrop() if self.no_inventory_access then return end local inven = self:getInven(self.INVEN_INVEN) - local titleupdator = self:getEncumberTitleUpdator("Drop object") + local titleupdator = self:getEncumberTitleUpdator(_t"Drop object") local d d = self:showInventory(titleupdator(), inven, nil, function(o, item) self:doDrop(inven, item, function() d:updateList() end) d:updateTitle(titleupdator()) @@ -1379,7 +1379,7 @@ end function _M:playerWear() if self.no_inventory_access then return end local inven = self:getInven(self.INVEN_INVEN) - local titleupdator = self:getEncumberTitleUpdator("Wield/wear object") + local titleupdator = self:getEncumberTitleUpdator(_t"Wield/wear object") local d d = self:showInventory(titleupdator(), inven, function(o) return o:wornInven() and self:getInven(o:wornInven()) and true or false end, function(o, item) @@ -1391,7 +1391,7 @@ end function _M:playerTakeoff() if self.no_inventory_access then return end - local titleupdator = self:getEncumberTitleUpdator("Take off object") + local titleupdator = self:getEncumberTitleUpdator(_t"Take off object") local d d = self:showEquipment(titleupdator(), nil, function(o, inven, item) self:doTakeoff(inven, item, o) d:updateTitle(titleupdator()) @@ -1442,7 +1442,7 @@ function _M:playerUseItem(object, item, inven) if object and item then return use_fct(object, inven, item) end - local titleupdator = self:getEncumberTitleUpdator("Use object") + local titleupdator = self:getEncumberTitleUpdator(_t"Use object") self:showEquipInven(titleupdator(), function(o) return o:canUseObject() @@ -1546,7 +1546,7 @@ function _M:useOrbPortal(portal) local spotted = spotHostiles(self, true) if #spotted > 0 then local dir = game.level.map:compassDirection(spotted[1].x - self.x, spotted[1].y - self.y) - self:logCombat(spotted[1].actor, "You can not use the Orb with foes watching (#Target# to the %s%s)",dir, game.level.map:isOnScreen(spotted[1].x, spotted[1].y) and "" or " - offscreen") + self:logCombat(spotted[1].actor, "You can not use the Orb with foes watching (#Target# to the %s%s)",dir, game.level.map:isOnScreen(spotted[1].x, spotted[1].y) and "" or _t" - offscreen") return end if portal.on_preuse then portal:on_preuse(self) end @@ -1624,7 +1624,7 @@ end function _M:on_targeted(act) if self:attr("invisible") or self:attr("stealth") then if self:canSee(act) and game.level.map.seens(act.x, act.y) then - game.logPlayer(self, "#LIGHT_RED#%s briefly catches sight of you!", act.name:capitalize()) + game.logPlayer(self, "#LIGHT_RED#%s briefly catches sight of you!", act:getName():capitalize()) else game.logPlayer(self, "#LIGHT_RED#You sense that Something has taken notice of you ...") end diff --git a/game/modules/tome/class/Projectile.lua b/game/modules/tome/class/Projectile.lua index a66850150c8ffad1e76aa7a7dfd302ef6fffd5cf..945ddc4555218272b8bf0c2f30f00095cf3d122c 100644 --- a/game/modules/tome/class/Projectile.lua +++ b/game/modules/tome/class/Projectile.lua @@ -42,7 +42,7 @@ function _M:move(x, y, force) return moved end function _M:tooltip(x, y) - local tstr = tstring{"Projectile: ", self.name} + local tstr = tstring{_t"Projectile: ", self:getName()} if self.src and self.src.name then local hostile = self.src.faction and game.player:reactionToward(self.src) or 0 @@ -50,31 +50,31 @@ function _M:tooltip(x, y) if hostile < 0 then color = {"color", "LIGHT_RED"} elseif hostile == 0 then color = {"color", "LIGHT_BLUE"} end - tstr:add(true, "Origin: ", color, self.src.name, {"color", "LAST"}) + tstr:add(true, _t"Origin: ", color, self.src:getName(), {"color", "LAST"}) end if self.project and self.project.def and self.project.def.typ then if self.project.def.x then - tstr:add(true, ("Speed: %d%% %s"):format(self.energy.mod*100, game.level.map:compassDirection(self.project.def.x - self.x, self.project.def.y - self.y) or "")) + tstr:add(true, ("Speed: %d%% %s"):tformat(self.energy.mod*100, game.level.map:compassDirection(self.project.def.x - self.x, self.project.def.y - self.y) or "")) end if self.project.def.typ.selffire then local x = self.project.def.typ.selffire if x == true then x = 100 end - tstr:add(true, "Affect origin chance: ", tostring(x), "%") + tstr:add(true, _t"Affect origin chance: ", tostring(x), "%") end if self.project.def.typ.friendlyfire then local x = self.project.def.typ.friendlyfire if x == true then x = 100 end - tstr:add(true, "Affect origin's friends chance: ", tostring(x), "%") + tstr:add(true, _t"Affect origin's friends chance: ", tostring(x), "%") end end if config.settings.cheat then - tstr:add(true, "UID: ", tostring(self.uid), true, "Coords: ", tostring(x), "x", tostring(y)) + tstr:add(true, _t"UID: ", tostring(self.uid), true, _t"Coords: ", tostring(x), "x", tostring(y)) if self.homing then - tstr:add((" homing: %s(%s, %s)"):format(self.homing.target.name, self.homing.target.x,self.homing.target.y)) + tstr:add((" homing: %s(%s, %s)"):tformat(self.homing.target:getName(), self.homing.target.x,self.homing.target.y)) else - tstr:add(" range: ", tostring(self.project.def.typ.range or "nil"), " ==> (", tostring(self.project.def.x), ",", tostring(self.project.def.y), ")") + tstr:add(_t" range: ", tostring(self.project.def.typ.range or "nil"), " ==> (", tostring(self.project.def.x), ",", tostring(self.project.def.y), ")") end end return tstr @@ -90,9 +90,9 @@ end --gets the full name of the projectile function _M:getName() - local name = self.name or "projectile" + local name = _t(self.name) or _t"projectile" if self.src and self.src.name then - return self.src.name:capitalize().."'s "..name + return ("%s's %s"):tformat(self.src:getName():capitalize(), name) else return name end diff --git a/game/modules/tome/class/Store.lua b/game/modules/tome/class/Store.lua index a9c10613e377c1657b314938ef11f768442a641c..dba27a5093f70af67db2bfc972c1e4578c05995e 100644 --- a/game/modules/tome/class/Store.lua +++ b/game/modules/tome/class/Store.lua @@ -128,7 +128,7 @@ function _M:tryBuy(who, o, item, nb) if who.money >= price then return nb, price else - Dialog:simplePopup("Not enough gold", ("You do not have the %0.2f gold needed!"):format(price)) + Dialog:simplePopup(_t"Not enough gold", ("You do not have the %0.2f gold needed!"):tformat(price)) end end @@ -183,8 +183,8 @@ function _M:doBuy(who, o, item, nb, store_dialog) local price nb, price = self:tryBuy(who, o, item, nb) if nb then - local avg = nb > 1 and (" (%0.2f each)"):format(price/nb) or "" - Dialog:yesnoPopup("Buy", ("Buy %d %s for %0.2f gold%s?"):format(nb, o:getName{do_color=true, no_count=true}, price, avg), function(ok) if ok then + local avg = nb > 1 and (" (%0.2f each)"):tformat(price/nb) or "" + Dialog:yesnoPopup(_t"Buy", ("Buy %d %s for %0.2f gold%s?"):tformat(nb, o:getName{do_color=true, no_count=true}, price, avg), function(ok) if ok then self:onBuy(who, o, item, nb, true) -- Learn lore ? if who.player and o.lore then @@ -202,7 +202,7 @@ function _M:doBuy(who, o, item, nb, store_dialog) self:onBuy(who, o, item, nb, false) end if store_dialog then store_dialog:updateStore() end - end end, "Buy", "Cancel") + end end, _t"Buy", _t"Cancel") end end @@ -212,8 +212,8 @@ function _M:doSell(who, o, item, nb, store_dialog) local price nb, price = self:trySell(who, o, item, nb) if nb then - local avg = nb > 1 and (" (%0.2f each)"):format(price/nb) or "" - Dialog:yesnoPopup("Sell", ("Sell %d %s for %0.2f gold%s?"):format(nb, o:getName{do_color=true, no_count=true}, price, avg), function(ok) if ok then + local avg = nb > 1 and (" (%0.2f each)"):tformat(price/nb) or "" + Dialog:yesnoPopup(_t"Sell", ("Sell %d %s for %0.2f gold%s?"):tformat(nb, o:getName{do_color=true, no_count=true}, price, avg), function(ok) if ok then self:onSell(who, o, item, nb, true) self:transfer(who, self, item, nb) local o, item = self:findInInventory(self:getInven("INVEN"), o:getName()) or o @@ -223,7 +223,7 @@ function _M:doSell(who, o, item, nb, store_dialog) game.log("Sold: %s %s for %0.2f gold.", nb>1 and nb or "", o:getName{do_color=true, no_count = true}, price) end if store_dialog then store_dialog:updateStore() end - end end, "Sell", "Cancel") + end end, _t"Sell", _t"Cancel") end end @@ -234,11 +234,11 @@ end -- @return a string (possibly multiline) describing the object function _M:descObject(who, what, o) if what == "buy" then - local desc = tstring({"font", "bold"}, {"color", "GOLD"}, ("Buy for: %0.2f gold (You have %0.2f gold)"):format(self:getObjectPrice(o, "buy"), who.money), {"font", "normal"}, {"color", "LAST"}, true, true) + local desc = tstring({"font", "bold"}, {"color", "GOLD"}, ("Buy for: %0.2f gold (You have %0.2f gold)"):tformat(self:getObjectPrice(o, "buy"), who.money), {"font", "normal"}, {"color", "LAST"}, true, true) desc:merge(o:getDesc()) return desc else - local desc = tstring({"font", "bold"}, {"color", "GOLD"}, ("Sell for: %0.2f gold (You have %0.2f gold)"):format(self:getObjectPrice(o, "sell"), who.money), {"font", "normal"}, {"color", "LAST"}, true, true) + local desc = tstring({"font", "bold"}, {"color", "GOLD"}, ("Sell for: %0.2f gold (You have %0.2f gold)"):tformat(self:getObjectPrice(o, "sell"), who.money), {"font", "normal"}, {"color", "LAST"}, true, true) desc:merge(o:getDesc()) return desc end diff --git a/game/modules/tome/class/Trap.lua b/game/modules/tome/class/Trap.lua index cea67fabe657f4d9eba825082edfa43b0bbbc3b1..cca858f3f70aa54b6057f6e31e2695b26b023f66 100644 --- a/game/modules/tome/class/Trap.lua +++ b/game/modules/tome/class/Trap.lua @@ -85,10 +85,10 @@ end -- Gets the full name of the trap function _M:getName() - local name = self.name or "trap" + local name = _t(self.name) or _t"trap" if not self:isIdentified() and self:getUnidentifiedName() then name = self:getUnidentifiedName() end if self.summoner and self.summoner.name then - return self.summoner.name:capitalize().."'s "..name + return ("%s's %s"):tformat(self.summoner:getName():capitalize(), name) else return name end @@ -114,38 +114,38 @@ function _M:tooltip() if self:knownBy(game.player) then local res = tstring{{"uid", self.uid}, self:getName(), true} local id = self:isIdentified() - if self.temporary then res:add(("#LIGHT_GREEN#%d turns #WHITE#"):format(self.temporary)) end + if self.temporary then res:add(("#LIGHT_GREEN#%d turns #WHITE#"):tformat(self.temporary)) end if self.is_store then - res:add(true, {"font","italic"}, "<Store>", {"font","normal"}) + res:add(true, {"font","italic"}, _t"<Store>", {"font","normal"}) if self.store_faction then - local factcolor, factstate, factlevel = "#ANTIQUE_WHITE#", "neutral", Faction:factionReaction(self.store_faction, game.player.faction) - if factlevel < 0 then factcolor, factstate = "#LIGHT_RED#", "hostile" - elseif factlevel > 0 then factcolor, factstate = "#LIGHT_GREEN#", "friendly" + local factcolor, factstate, factlevel = "#ANTIQUE_WHITE#", _t"neutral", Faction:factionReaction(self.store_faction, game.player.faction) + if factlevel < 0 then factcolor, factstate = "#LIGHT_RED#", _t"hostile" + elseif factlevel > 0 then factcolor, factstate = "#LIGHT_GREEN#", _t"friendly" end - if Faction.factions[self.store_faction] then res:add(true, "Faction: ") res:merge(factcolor:toTString()) res:add(("%s (%s, %d)"):format(Faction.factions[self.store_faction].name, factstate, factlevel), {"color", "WHITE"}, true) end + if Faction.factions[self.store_faction] then res:add(true, _t"Faction: ") res:merge(factcolor:toTString()) res:add(("%s (%s, %d)"):format(Faction.factions[self.store_faction].name, factstate, factlevel), {"color", "WHITE"}, true) end end else if id then if self.faction then if self.beneficial_trap then if self:reactionToward(game.player) >= 0 then - res:add({"color", "LIGHT_GREEN"}, "(beneficial)", {"color", "WHITE"}) + res:add({"color", "LIGHT_GREEN"}, _t"(beneficial)", {"color", "WHITE"}) else - res:add({"color", "ORANGE"}, "(beneficial to enemies)", {"color", "WHITE"}) + res:add({"color", "ORANGE"}, _t"(beneficial to enemies)", {"color", "WHITE"}) end elseif self:reactionToward(game.player) >= 0 then - res:add({"color", "LIGHT_GREEN"}, "(safe)", {"color", "WHITE"}) + res:add({"color", "LIGHT_GREEN"}, _t"(safe)", {"color", "WHITE"}) end end if self.pressure_trap then - res:add(true, {"color", "GREEN"}, "pressure_trigger", {"color", "WHITE"}) + res:add(true, {"color", "GREEN"}, _t"pressure_trigger", {"color", "WHITE"}) end local desc = util.getval(self.desc, self) if desc then res:add(true, desc) end end - res:add(true, ("#YELLOW#Detect: %d#WHITE#"):format(self.detect_power)) + res:add(true, ("#YELLOW#Detect: %d#WHITE#"):tformat(self.detect_power)) if id or config.settings.cheat then - res:add(("#YELLOW# Disarm: %d#WHITE#"):format(self.disarm_power)) + res:add(("#YELLOW# Disarm: %d#WHITE#"):tformat(self.disarm_power)) end end if config.settings.cheat then res:add(true, "UID: "..self.uid, true) end @@ -198,7 +198,7 @@ function _M:onDisarm(x, y, who) local success, consec, msg = false, 0 local oldrestCheck = rawget(who, "restCheck") -- hack restCheck to perform action each turn who.restCheck = function(player) - if not player.resting then player.restCheck = oldrestCheck return false, "not resting" end + if not player.resting then player.restCheck = oldrestCheck return false, _t"not resting" end if player.resting.cnt >= diff_level then -- start making checks at diff_level turns if rng.percent(chance) then consec = consec + 1 @@ -206,17 +206,17 @@ function _M:onDisarm(x, y, who) consec = 0 if rng.percent(10) then -- oops! 10% chance to set it off game:onTickEnd(function() self:triggered(player.x, player.y, player) end) - msg = "You set off the trap!" + msg = _t"You set off the trap!" return false, msg end end end if consec >= diff_level then -- success after diff_level consecutive checks - msg = "You successfully dismantled the trap." + msg = _t"You successfully dismantled the trap." success = true return false, msg end local continue, reason = mod.class.Player.restCheck(player) - if not continue then msg = "You were interrupted." end + if not continue then msg = _t"You were interrupted." end return continue, reason end @@ -224,20 +224,20 @@ function _M:onDisarm(x, y, who) local dismantle = coroutine.create(function(self, who) local wait = function() local co = coroutine.running() - who:restInit(turns, "Dismantling", "dismantled", function(cnt, max) + who:restInit(turns, _t"Dismantling", _t"dismantled", function(cnt, max) -- "resting" finished, undo the restCheck hack and check results who.restCheck = oldrestCheck if not success then if cnt >= max then -- too difficult - msg = "Your level of skill was not enough to understand the workings of this trap." + msg = _t"Your level of skill was not enough to understand the workings of this trap." else -- interrupted - msg = msg or "You quit dismantling the trap." + msg = msg or _t"You quit dismantling the trap." end end coroutine.resume(co) end) coroutine.yield() - game.logPlayer(who, "#LIGHT_BLUE#%s: %s#LAST#", success and "Success" or "Failure", msg) + game.logPlayer(who, "#LIGHT_BLUE#%s: %s#LAST#", success and _t"Success" or _t"Failure", msg) return success end if not wait() then @@ -247,19 +247,19 @@ function _M:onDisarm(x, y, who) end) self:identify(true) local desc = util.getval(self.desc, self) - desc = desc and "\n#LIGHT_BLUE#Trap Description:#WHITE#\n"..desc or "" - require "engine.ui.Dialog":yesnoLongPopup(("Disarming a trap: %s"):format(self:getName()), + desc = desc and _t"\n#LIGHT_BLUE#Trap Description:#WHITE#\n"..desc or "" + require "engine.ui.Dialog":yesnoLongPopup(("Disarming a trap: %s"):tformat(self:getName()), ([[As you begin disarming the trap, you think you may be able to learn how it works by carefully dismantling it. You estimate this will take up to #YELLOW#%d#LAST# uninterrupted turns. What do you want to do? %s -]]):format(turns, desc), math.min(800, game.w*.75), +]]):tformat(turns, desc), math.min(800, game.w*.75), function(quit) if quit == true then game:playSoundNear(who, "ambient/town/town_large2") coroutine.resume(dismantle, self, who) end end, - "Dismantle Carefully", "Disarm Normally") + _t"Dismantle Carefully", _t"Disarm Normally") end end end @@ -270,15 +270,15 @@ function _M:canTrigger(x, y, who, no_random) local avoid if who:attr("avoid_traps") then - avoid = "ignore" + avoid = _t"ignore" elseif self.pressure_trap and (who:attr("levitation") or who:attr("avoid_pressure_traps")) then - avoid = "simply ignore" + avoid = _t"simply ignore" elseif not no_random and who.trap_avoidance and rng.percent(who.trap_avoidance) then - avoid = "carefully avoid" + avoid = _t"carefully avoid" elseif not self.beneficial_trap and rng.percent(self.trigger_fail) then - avoid = "somehow avoid" + avoid = _t"somehow avoid" elseif who:attr("walk_sun_path") and game.level then - for i, e in ipairs(game.level.map.effects) do if e.damtype == DamageType.SUN_PATH and e.grids[x] and e.grids[x][y] then avoid = "dodge" break end + for i, e in ipairs(game.level.map.effects) do if e.damtype == DamageType.SUN_PATH and e.grids[x] and e.grids[x][y] then avoid = _t"dodge" break end end end @@ -288,7 +288,7 @@ function _M:canTrigger(x, y, who, no_random) if who.player then if known_player then game.log("#CADET_BLUE#You %s a trap (%s).", avoid, self:getName()) end else - game.logSeen(who, "#CADET_BLUE#%s %ss %s.", who.name:capitalize(), avoid, known_player and ("a trap (%s)"):format(self:getName()) or "something on the floor") + game.logSeen(who, "#CADET_BLUE#%s %ss %s.", who:getName():capitalize(), avoid, known_player and ("a trap (%s)"):tformat(self:getName()) or _t"something on the floor") end end return false @@ -301,7 +301,7 @@ end function _M:trigger(x, y, who) engine.Trap.trigger(self, x, y, who) if who.player then self:identify(true) end - if who.runStop and self:canTrigger(x, y, who) then who:runStop("trap") end + if who.runStop and self:canTrigger(x, y, who) then who:runStop(_t"trap") end end --- Identify the trap (controls info displayed for the player) diff --git a/game/modules/tome/class/UserChatExtension.lua b/game/modules/tome/class/UserChatExtension.lua index a50a5b7815ed33a1d93c84acca1be479ebf8fa0b..69a9d86f163a02a07e52f8e3a226b38aca702019 100644 --- a/game/modules/tome/class/UserChatExtension.lua +++ b/game/modules/tome/class/UserChatExtension.lua @@ -76,13 +76,13 @@ function _M:event(e) local color, uname = self.chat:getUserColor(e) if data.kind == "object-link" then - self.chat:addMessage("link", e.channel, e.login, {uname, color}, "#ANTIQUE_WHITE#has linked an item: #WHITE# "..data.name, {mode="tooltip", tooltip=data.desc}) + self.chat:addMessage("link", e.channel, e.login, {uname, color}, ("#ANTIQUE_WHITE#has linked an item: #WHITE# %s"):tformat(data.name), {mode="tooltip", tooltip=data.desc}) elseif data.kind == "actor-link" then - self.chat:addMessage("link", e.channel, e.login, {uname, color}, "#ANTIQUE_WHITE#has linked a creature: #WHITE# "..data.name, {mode="tooltip", tooltip=data.desc}) + self.chat:addMessage("link", e.channel, e.login, {uname, color}, ("#ANTIQUE_WHITE#has linked a creature: #WHITE# %s"):tformat(data.name), {mode="tooltip", tooltip=data.desc}) elseif data.kind == "talent-link" then - self.chat:addMessage("link", e.channel, e.login, {uname, color}, "#ANTIQUE_WHITE#has linked a talent: #WHITE# "..data.name, {mode="tooltip", tooltip=data.desc}) + self.chat:addMessage("link", e.channel, e.login, {uname, color}, ("#ANTIQUE_WHITE#has linked a talent: #WHITE# %s"):tformat(data.name), {mode="tooltip", tooltip=data.desc}) elseif data.kind == "killer-link" then - self.chat:addMessage("death", e.channel, e.login, {uname, color}, "#CRIMSON#"..data.msg.."#WHITE#", data.desc and {mode="tooltip", tooltip=data.desc} or nil) + self.chat:addMessage("death", e.channel, e.login, {uname, color}, ("#CRIMSON#%s#WHITE#"):tformat(data.msg), data.desc and {mode="tooltip", tooltip=data.desc} or nil) else self:triggerHook{"UserChat:event", color=color, e=e, data=data} end diff --git a/game/modules/tome/class/World.lua b/game/modules/tome/class/World.lua index 0b92ed36ed8cf120650f0916324e81037d56f2a3..7c5dd0294844ff372d0724a01490415a03643f5c 100644 --- a/game/modules/tome/class/World.lua +++ b/game/modules/tome/class/World.lua @@ -42,7 +42,7 @@ end -- @param src the actor who did it function _M:achievementWho(src) local p = game.party:findMember{main=true} - return p.name.." the "..p.descriptor.subrace.." "..p.descriptor.subclass.." level "..p.level + return ("%s the %s %s level %s"):tformat(p.name, _t(p.descriptor.subrace), _t(p.descriptor.subclass), p.level) end --- Gain an achievement diff --git a/game/modules/tome/class/WorldNPC.lua b/game/modules/tome/class/WorldNPC.lua index 04ba3b48cb73b7b86c3305c551bf0a2ff6c1c675..9ad69ba50d7f6ab864843f107255025e67f41829 100644 --- a/game/modules/tome/class/WorldNPC.lua +++ b/game/modules/tome/class/WorldNPC.lua @@ -164,22 +164,22 @@ end function _M:tooltip(x, y, seen_by) if seen_by and not seen_by:canSee(self) then return end - local factcolor, factstate, factlevel = "#ANTIQUE_WHITE#", "neutral", self:reactionToward(game.player) - if factlevel < 0 then factcolor, factstate = "#LIGHT_RED#", "hostile" - elseif factlevel > 0 then factcolor, factstate = "#LIGHT_GREEN#", "friendly" + local factcolor, factstate, factlevel = "#ANTIQUE_WHITE#", _t"neutral", self:reactionToward(game.player) + if factlevel < 0 then factcolor, factstate = "#LIGHT_RED#", _t"hostile" + elseif factlevel > 0 then factcolor, factstate = "#LIGHT_GREEN#", _t"friendly" end local rank, rank_color = self:TextRank() local ts = tstring{} - ts:add({"uid",self.uid}) ts:merge(rank_color:toTString()) ts:add(self.name, {"color", "WHITE"}, true) - ts:add(self.type:capitalize(), " / ", self.subtype:capitalize(), true) - ts:add("Rank: ") ts:merge(rank_color:toTString()) ts:add(rank, {"color", "WHITE"}, true) + ts:add({"uid",self.uid}) ts:merge(rank_color:toTString()) ts:add(self:getName(), {"color", "WHITE"}, true) + ts:add(_t(self.type):capitalize(), " / ", _t(self.subtype):capitalize(), true) + ts:add(_t"Rank: ") ts:merge(rank_color:toTString()) ts:add(rank, {"color", "WHITE"}, true) ts:add(self.desc, true) - ts:add("Faction: ") ts:merge(factcolor:toTString()) ts:add(("%s (%s, %d)"):format(Faction.factions[self.faction].name, factstate, factlevel), {"color", "WHITE"}, true) + ts:add(_t"Faction: ") ts:merge(factcolor:toTString()) ts:add(("%s (%s, %d)"):format(Faction.factions[self.faction].name, factstate, factlevel), {"color", "WHITE"}, true) ts:add( - ("Killed by you: "):format(killed), true, - "Target: ", self.ai_target.actor and self.ai_target.actor.name or "none", true, + ("Killed by you: "):tformat(killed), true, + _t"Target: ", self.ai_target.actor and self.ai_target.actor:getName() or _t"none", true, "UID: "..self.uid ) diff --git a/game/modules/tome/class/generator/actor/Arena.lua b/game/modules/tome/class/generator/actor/Arena.lua index a2a7cb327e46805af60e5e9f5a382616b8f52959..eec1f1185ace76f5bc71335a18af4a9aba05a13c 100644 --- a/game/modules/tome/class/generator/actor/Arena.lua +++ b/game/modules/tome/class/generator/actor/Arena.lua @@ -35,7 +35,7 @@ end _M.mooks = { { entity = { type = "vermin", subtype = "rodent" }, --Wave 1 wave = 4, power = 2, delay = 3, bonus = 0.1, score = 5, entry = 2, - special = function (self) if game.level.arena.bonusMultiplier > 7 then self.entity = {name="giant crystal rat"} self.power = 4 self.wave = 6 end return self end }, + special = function (self) if game.level.arena.bonusMultiplier > 7 then self.entity = {name=_t"giant crystal rat"} self.power = 4 self.wave = 6 end return self end }, { entity = { type = "insect", subtype = "ant" }, wave = 2, power = 2, delay = 2, bonus = 0.1, score = 15 , entry = 2 }, { entity = { name = "homeless fighter" }, @@ -183,77 +183,77 @@ _M.mooks = { } _M.miniboss = { - { name = "SKELERAT", wave = 4, entry = 2, display = "Skeletal rats", score = 100, power = 5, rank = 0.1 }, - { name = "GLADIATOR", wave = 2, entry = 1, display = "Gladiators", score = 150, power = 10, rank = 0.2 }, + { name = "SKELERAT", wave = 4, entry = 2, display = _t"Skeletal rats", score = 100, power = 5, rank = 0.1 }, + { name = "GLADIATOR", wave = 2, entry = 1, display = _t"Gladiators", score = 150, power = 10, rank = 0.2 }, { nil }, - { name = "GOLDCRYSTAL", wave = 4, entry = 3, display = "Golden crystals", score = 250, power = 15, rank = 0.1 }, - { name = "MASTERSLINGER", wave = 3, entry = 2, display = "Master slingers", score = 350, power = 20, rank = 0.2 }, + { name = "GOLDCRYSTAL", wave = 4, entry = 3, display = _t"Golden crystals", score = 250, power = 15, rank = 0.1 }, + { name = "MASTERSLINGER", wave = 3, entry = 2, display = _t"Master slingers", score = 350, power = 20, rank = 0.2 }, { nil }, - { name = "MASTERALCHEMIST", wave = 1, entry = 1, display = "Master Alchemist", score = 400, power = 25, rank = 0.5 }, - { name = "MULTIHUEWYRMIC", wave = 1, entry = 1, display = "Multi-hued Wyrmic", score = 400, power = 30, rank = 0.5 }, + { name = "MASTERALCHEMIST", wave = 1, entry = 1, display = _t"Master Alchemist", score = 400, power = 25, rank = 0.5 }, + { name = "MULTIHUEWYRMIC", wave = 1, entry = 1, display = _t"Multi-hued Wyrmic", score = 400, power = 30, rank = 0.5 }, { nil }, - { name = "REAVER", wave = 2, entry = 2, display = "Reaver", score = 800, power = 40, rank = 0.3 }, - { name = "HEADLESSHORROR", wave = 1, entry = 1, display = "Headless horror", score = 1000, power = 50, rank = 1 }, + { name = "REAVER", wave = 2, entry = 2, display = _t"Reaver", score = 800, power = 40, rank = 0.3 }, + { name = "HEADLESSHORROR", wave = 1, entry = 1, display = _t"Headless horror", score = 1000, power = 50, rank = 1 }, } _M.bosses = { - { name = "ARENA_BOSS_RYAL", display = "Ryal the Towering", chat = "arena_boss_ryal", + { name = "ARENA_BOSS_RYAL", display = _t"Ryal the Towering", chat = "arena_boss_ryal", score = 1500, power = 35, start = function () local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="Boss fight!"}, game.player) + local chat = Chat.new("arena", {name=_t"Boss fight!"}, game.player) chat:invoke("ryal-entry") end, finish = function () local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="Victory!!"}, game.player) + local chat = Chat.new("arena", {name=_t"Victory!!"}, game.player) game.player:incMoney(35) chat:invoke("ryal-defeat") end }, - { name = "ARENA_BOSS_FRYJIA", display = "Fryjia the Hailstorm", chat= "arena_boss_fryjia", + { name = "ARENA_BOSS_FRYJIA", display = _t"Fryjia the Hailstorm", chat= "arena_boss_fryjia", score = 2500, power = 55, start = function () local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="Boss fight!"}, game.player) + local chat = Chat.new("arena", {name=_t"Boss fight!"}, game.player) chat:invoke("fryjia-entry") end, finish = function () local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="Victory!!"}, game.player) + local chat = Chat.new("arena", {name=_t"Victory!!"}, game.player) game.player:incMoney(50) chat:invoke("fryjia-defeat") end }, - { name = "ARENA_BOSS_RIALA", display = "Riala the Crimson", chat = "arena_boss_riala", + { name = "ARENA_BOSS_RIALA", display = _t"Riala the Crimson", chat = "arena_boss_riala", score = 3500, power = 85, start = function () local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="Boss fight!"}, game.player) + local chat = Chat.new("arena", {name=_t"Boss fight!"}, game.player) chat:invoke("riala-entry") end, finish = function () local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="Victory!!"}, game.player) + local chat = Chat.new("arena", {name=_t"Victory!!"}, game.player) game.player:incMoney(70) chat:invoke("riala-defeat") end }, - { name = "ARENA_BOSS_VALFREN", display = "Valfren the Rampage", chat = "arena_boss_valfren", + { name = "ARENA_BOSS_VALFREN", display = _t"Valfren the Rampage", chat = "arena_boss_valfren", score = 4500, power = 125, start = function () game.level.map:setShown(0.3, 0.3, 0.3, 1) game.level.map:setObscure(0.3*0.6, 0.3*0.6, 0.3*0.6, 1) local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="Boss fight!"}, game.player) + local chat = Chat.new("arena", {name=_t"Boss fight!"}, game.player) chat:invoke("valfren-entry") end, finish = function () game.level.map:setShown(1, 1, 1, 1) game.level.map:setObscure(1*0.6, 1*0.6, 1*0.6, 1) local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="Victory!!"}, game.player) + local chat = Chat.new("arena", {name=_t"Victory!!"}, game.player) game.player:incMoney(90) chat:invoke("valfren-defeat") end @@ -307,11 +307,11 @@ function _M:summonMiniboss(val) for i = 1, e.wave do self:generateMiniboss(e) end - game.level.arena.display = {game.player.name.." the "..game.level.arena.printRank(game.level.arena.rank, game.level.arena.ranks), e.display} + game.level.arena.display = {("%s the %s"):tformat(game.player.name, game.level.arena.printRank(game.level.arena.rank, game.level.arena.ranks)), e.display} local verb = "" game:playSoundNear(game.player, "talents/teleport") - if e.wave > 1 then verb = " appear!!" else verb = " appears!!" end - game.log("#LIGHT_RED#"..e.display..verb) + if e.wave > 1 then verb = _t" appear!!" else verb = _t" appears!!" end + game.log("#LIGHT_RED#%s%s", e.display, verb) end function _M:getEntrance(val) @@ -393,8 +393,8 @@ function _M:generateBoss(val) e.start() m.arenaDefeat = e.finish self.zone:addEntity(self.level, m, "actor", 7, 1) - game.level.arena.display = {game.player.name.." the "..game.level.arena.printRank(game.level.arena.rank, game.level.arena.ranks), e.display} - game.log("#LIGHT_RED#WARNING! "..e.display.." appears!!!") + game.level.arena.display = {("%s the %s"):tformat(game.player.name, game.level.arena.printRank(game.level.arena.rank, game.level.arena.ranks)), e.display} + game.log("#LIGHT_RED#WARNING! %s appears!!!", e.display) else print("[ARENA] - Boss error #1! ("..e.display..")") end end @@ -422,7 +422,7 @@ function _M:generateMaster() m:setTarget(game.player) m.on_added = function (self) local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="The final fight!"}, game.player) + local chat = Chat.new("arena", {name=_t"The final fight!"}, game.player) chat:invoke("master-entry") game.level.arena.danger = game.level.arena.danger + 1000 game.level.map:particleEmitter(self.x, self.y, 3, "teleport") @@ -437,13 +437,13 @@ function _M:generateMaster() game.level.arena.clear() self.on_die = nil local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="Congratulations!"}, game.player) + local chat = Chat.new("arena", {name=_t"Congratulations!"}, game.player) chat:invoke("master-defeat") end self.zone:addEntity(self.level, m, "actor", 7, 1) local rank = math.floor(game.level.arena.rank) - game.level.arena.display = {game.player.name.." the "..game.level.arena.printRank(game.level.arena.rank, game.level.arena.ranks), "Rej the Master of Arena"} + game.level.arena.display = {("%s the %s"):tformat(game.player.name, game.level.arena.printRank(game.level.arena.rank, game.level.arena.ranks)), _t"Rej the Master of Arena"} game.log("#LIGHT_RED#WARNING! Rej Arkatis, the master of the arena, appears!!!") else print("[ARENA] - Finale error #1! (Default master error)") end @@ -454,7 +454,7 @@ function _M:generateMaster() m:setTarget(game.player) m.on_added = function (self) local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="The final fight!"}, game.player) + local chat = Chat.new("arena", {name=_t"The final fight!"}, game.player) chat:invoke("master-entry") if self.alchemy_golem then self.alchemy_golem.dead = nil @@ -474,14 +474,14 @@ function _M:generateMaster() game.level.map:particleEmitter(self.x, self.y, 1, "ball_fire", {radius = 3}) game.level.arena.clear() local Chat = require "engine.Chat" - local chat = Chat.new("arena", {name="Congratulations!"}, game.player) + local chat = Chat.new("arena", {name=_t"Congratulations!"}, game.player) self.on_die = nil chat:invoke("master-defeat") end self.zone:addEntity(self.level, m, "actor", 7, 1) - game.level.arena.display = {game.player.name.." the "..game.level.arena.printRank(game.level.arena.rank, game.level.arena.ranks), m.name.." the Master of Arena"} - game.log("#LIGHT_RED#WARNING! "..m.name..", the master of the arena, appears!!!") + game.level.arena.display = {("%s the %s"):tformat(game.player.name, game.level.arena.printRank(game.level.arena.rank, game.level.arena.ranks)), ("%s the Master of Arena"):tformat(m.name)} + game.log("#LIGHT_RED#WARNING! %s, the master of the arena, appears!!!", m.name) end end @@ -527,13 +527,13 @@ function _M:setArenaTriggers(e, entry) if self.arenaLastHit >= self.max_life then if self.arenaLastHit >= self.max_life * 2 then local x, y = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(x, y, 90, 0, -0.5, "OVERKILL", { 231, 0, 0 }, false) - game.log("#LIGHT_GREEN#Your powerful attack completely obliterates #WHITE#"..self.name.."#LIGHT_GREEN#!") + game.flyers:add(x, y, 90, 0, -0.5, _t"OVERKILL", { 231, 0, 0 }, false) + game.log("#LIGHT_GREEN#Your powerful attack completely obliterates #WHITE#%s#LIGHT_GREEN#!", self:getName()) local val = (self.level * 0.015) if val > 0.5 then game.log("#LIGHT_GREEN#The audience cheers!") end game.level.arena.raiseRank(val) else - game.log("#LIGHT_GREEN#You destroy #WHITE#"..self.name.."#LIGHT_GREEN# in a single blow!") + game.log("#LIGHT_GREEN#You destroy #WHITE#%s#LIGHT_GREEN# in a single blow!", self.name) local val = (self.level * 0.01) if val > 0.5 then game.log("#LIGHT_GREEN#The audience cheers!") end game.level.arena.raiseRank(val) @@ -541,7 +541,7 @@ function _M:setArenaTriggers(e, entry) end game.level.arena.danger = game.level.arena.danger - self.arenaPower if game.level.arena.pinch == false then - game.log("#LIGHT_GREEN#Your score multiplier increases by #WHITE#"..self.arenaBonusMult.."#LIGHT_GREEN#!") + game.log("#LIGHT_GREEN#Your score multiplier increases by #WHITE#%d#LIGHT_GREEN#!", self.arenaBonusMult) game.level.arena.bonusMultiplier = game.level.arena.bonusMultiplier + self.arenaBonusMult else game.level.arena.bonus = game.level.arena.bonus + self.arenaScore diff --git a/game/modules/tome/class/interface/ActorAI.lua b/game/modules/tome/class/interface/ActorAI.lua index 4724b9fb6850bfe0336b05e91eb35d634d592e08..475eec35ad4a4a9d75cc02e009e534ed67cb2c91 100644 --- a/game/modules/tome/class/interface/ActorAI.lua +++ b/game/modules/tome/class/interface/ActorAI.lua @@ -756,7 +756,7 @@ function _M:aiFindSafeGrid(radius, dam_wt, air_wt, dist_weight, want_closer, ign if log_detail > 0 then print(("[aiFindSafeGrid]%s searching for safer grids [radius %s from (%s, %s), val = %s], dam_wt=%s, air_wt=%s, dist_weight=%s, want_closer=%s"):format(self.name, radius, self.x, self.y, grid.val, dam_wt, air_wt, dist_weight, want_closer)) -if log_detail > 1.4 and config.settings.cheat then game.log("%s #PINK#searching for safer grids [radius %s from (%s, %s), val = %s], dam_wt=%s, air_wt=%s, dist_weight=%s, want_closer=%s", self.name:capitalize(), radius, self.x, self.y, grid.val, dam_wt, air_wt, dist_weight, want_closer) end -- debugging +if log_detail > 1.4 and config.settings.cheat then game.log("%s #PINK#searching for safer grids [radius %s from (%s, %s), val = %s], dam_wt=%s, air_wt=%s, dist_weight=%s, want_closer=%s", self:getName():capitalize(), radius, self.x, self.y, grid.val, dam_wt, air_wt, dist_weight, want_closer) end -- debugging end local grid_count = 0 core.fov.calc_circle(self.x, self.y, game.level.map.w, game.level.map.h, radius or 10, diff --git a/game/modules/tome/class/interface/ActorObjectUse.lua b/game/modules/tome/class/interface/ActorObjectUse.lua index e1031aed01b6ecafb5c47565a92e89336d7e9e5a..51adb5fe9d9514c85fc54cdd6da38a210a4a63cd 100644 --- a/game/modules/tome/class/interface/ActorObjectUse.lua +++ b/game/modules/tome/class/interface/ActorObjectUse.lua @@ -133,9 +133,9 @@ _M.useObjectBaseTalent ={ innate = true, -- make sure this talent can't be put on cooldown by other talents or effects display_name = function(self, t) local data = self.object_talent_data and self.object_talent_data[t.id] - if not (data and data.obj and data.obj:isIdentified()) then return "Activate an object" end + if not (data and data.obj and data.obj:isIdentified()) then return _t"Activate an object" end local objname = data.obj:getName({no_add_name = true, do_color = true}) - return "Activate: "..objname + return ("Activate: %s"):tformat(objname) end, no_message = true, --messages handled by object code or action function is_object_use = true, -- flag for npc control and removing from prompts @@ -211,7 +211,7 @@ _M.useObjectBaseTalent ={ local ret local co = coroutine.create(function() if data.tid then -- replace normal talent use message - game.logSeen(self, "%s activates %s %s!", self.name:capitalize(), self:his_her(), data.obj:getName({no_add_name=true, do_color = true})) + game.logSeen(self, "%s activates %s %s!", self:getName():capitalize(), self:his_her(), data.obj:getName({no_add_name=true, do_color = true})) t.message = self:callObjectTalent(t.id, "message") local msg = self:useTalentMessage(t) t.message = nil @@ -235,16 +235,16 @@ _M.useObjectBaseTalent ={ end, info = function(self, t) local o = t.getObject(self, t) - if not (o and o:isIdentified()) then return "Activate an object." end - local objname = o:getName({do_color = true}) or "(unknown object)" + if not (o and o:isIdentified()) then return _t"Activate an object." end + local objname = o:getName({do_color = true}) or _t"(unknown object)" local usedesc = o and o:getUseDesc(self) or "" return ([[Use %s: -%s]]):format(objname, usedesc) +%s]]):tformat(objname, usedesc) end, short_info = function(self, t) local obj = t.getObject(self, t) - return ([[Activate %s]]):format(obj and obj:getName({do_color = true}) or "nothing") + return ([[Activate %s]]):tformat(obj and obj:getName({do_color = true}) or _t"nothing") end, } diff --git a/game/modules/tome/class/interface/Archery.lua b/game/modules/tome/class/interface/Archery.lua index 7e243c52b6c76774a8423297c80ef87378b6d2bc..6684a6e9b4723e878d25900d5c0338e3b6008334 100644 --- a/game/modules/tome/class/interface/Archery.lua +++ b/game/modules/tome/class/interface/Archery.lua @@ -328,7 +328,7 @@ local function archery_projectile(tx, ty, tg, self, tmp) if eff and eff.parry_ranged then deflect = target:callEffect(target.EFF_PARRY, "doDeflect", self) or 0 if deflect > 0 then - game:delayedLogDamage(self, target, 0, ("%s(%d parried#LAST#)"):format(DamageType:get(damtype).text_color or "#aaaaaa#", deflect), false) + game:delayedLogDamage(self, target, 0, ("%s(%d parried#LAST#)"):tformat(DamageType:get(damtype).text_color or "#aaaaaa#", deflect), false) dam = math.max(dam - deflect , 0) print("[ATTACK] after PARRY", dam) end diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index d52c766c00f427ff6a776ee6d91db1097653989a..ea5236bac90129638801db5881eda2f77f646f53 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -100,7 +100,7 @@ function _M:attackTarget(target, damtype, mult, noenergy, force_unarmed) self:useEnergy(game.energy_to_act) self.did_energy = true end - game.logSeen(self, "%s is too afraid to attack.", self.name:capitalize()) + game.logSeen(self, "%s is too afraid to attack.", self:getName():capitalize()) return false end @@ -109,7 +109,7 @@ function _M:attackTarget(target, damtype, mult, noenergy, force_unarmed) self:useEnergy(game.energy_to_act) self.did_energy = true end - game.logSeen(self, "%s is too terrified to attack.", self.name:capitalize()) + game.logSeen(self, "%s is too terrified to attack.", self:getName():capitalize()) return false end @@ -459,7 +459,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam) if target:knowTalent(target.T_SKIRMISHER_BUCKLER_EXPERTISE) then local t = target:getTalentFromId(target.T_SKIRMISHER_BUCKLER_EXPERTISE) if t.shouldEvade(target, t) then - game.logSeen(target, "#ORCHID#%s cleverly deflects the attack with %s shield!#LAST#", target.name:capitalize(), string.his_her(target)) + game.logSeen(target, "#ORCHID#%s cleverly deflects the attack with %s shield!#LAST#", target:getName():capitalize(), string.his_her(target)) t.onEvade(target, t, self) repelled = true end @@ -475,7 +475,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam) if target:knowTalent(target.T_BLADE_WARD) and target:hasDualWeapon() then local chance = target:callTalent(target.T_BLADE_WARD, "getChance") if rng.percent(chance) then - game.logSeen(target, "#ORCHID#%s parries the attack with %s dual weapons!#LAST#", target.name:capitalize(), string.his_her(target)) + game.logSeen(target, "#ORCHID#%s parries the attack with %s dual weapons!#LAST#", target:getName():capitalize(), string.his_her(target)) repelled = true end end @@ -487,7 +487,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam) -- Dwarves stoneskin if target:attr("auto_stoneskin") and rng.percent(15) then - game.logSeen(target, "#ORCHID#%s instinctively hardens %s skin and ignores the attack!#LAST#", target.name:capitalize(), string.his_her(target)) + game.logSeen(target, "#ORCHID#%s instinctively hardens %s skin and ignores the attack!#LAST#", target:getName():capitalize(), string.his_her(target)) target:setEffect(target.EFF_STONE_SKIN, 5, {power=target:attr("auto_stoneskin")}) repelled = true end @@ -517,7 +517,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam) if eff then deflect = target:callEffect(target.EFF_PARRY, "doDeflect", self) or 0 if deflect > 0 then - game:delayedLogDamage(self, target, 0, ("%s(%d parried#LAST#)"):format(DamageType:get(damtype).text_color or "#aaaaaa#", deflect), false) + game:delayedLogDamage(self, target, 0, ("%s(%d parried#LAST#)"):tformat(DamageType:get(damtype).text_color or "#aaaaaa#", deflect), false) dam = math.max(dam - deflect , 0) print("[ATTACK] after PARRY", dam) end @@ -526,7 +526,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam) if target.knowTalent and target:hasEffect(target.EFF_GESTURE_OF_GUARDING) and not target:attr("encased_in_ice") then local g_deflect = math.min(dam, target:callTalent(target.T_GESTURE_OF_GUARDING, "doGuard")) or 0 if g_deflect > 0 then - game:delayedLogDamage(self, target, 0, ("%s(%d gestured#LAST#)"):format(DamageType:get(damtype).text_color or "#aaaaaa#", g_deflect), false) + game:delayedLogDamage(self, target, 0, ("%s(%d gestured#LAST#)"):tformat(DamageType:get(damtype).text_color or "#aaaaaa#", g_deflect), false) dam = dam - g_deflect; deflect = deflect + g_deflect end print("[ATTACK] after GESTURE_OF_GUARDING", dam) @@ -1995,7 +1995,7 @@ function _M:spellCrit(dam, add_chance, crit_power_add) self.turn_procs.crit_power = (1.5 + crit_power_add + (self.combat_critical_power or 0) / 100) dam = dam * (1.5 + crit_power_add + (self.combat_critical_power or 0) / 100) crit = true - game.logSeen(self, "#{bold}#%s's spell attains critical power!#{normal}#", self.name:capitalize()) + game.logSeen(self, "#{bold}#%s's spell attains critical power!#{normal}#", self:getName():capitalize()) if self:attr("mana_on_crit") then self:incMana(self:attr("mana_on_crit")) end if self:attr("vim_on_crit") then self:incVim(self:attr("vim_on_crit")) end @@ -2043,7 +2043,7 @@ function _M:mindCrit(dam, add_chance, crit_power_add) self.turn_procs.crit_power = (1.5 + crit_power_add + (self.combat_critical_power or 0) / 100) dam = dam * (1.5 + crit_power_add + (self.combat_critical_power or 0) / 100) crit = true - game.logSeen(self, "#{bold}#%s's mind surges with critical power!#{normal}#", self.name:capitalize()) + game.logSeen(self, "#{bold}#%s's mind surges with critical power!#{normal}#", self:getName():capitalize()) if self:attr("hate_on_crit") then self:incHate(self:attr("hate_on_crit")) end if self:attr("psi_on_crit") then self:incPsi(self:attr("psi_on_crit")) end @@ -2761,14 +2761,14 @@ function _M:startGrapple(target) self:setEffect(self.EFF_GRAPPLING, duration, grappleParam) return true else - game.logSeen(target, "%s resists the grapple!", target.name:capitalize()) + game.logSeen(target, "%s resists the grapple!", target:getName():capitalize()) return false end end -- Display Combat log messages, highlighting the player and taking LOS and visibility into account --- #source#|#Source# -> <displayString> self.name|self.name:capitalize() --- #target#|#Target# -> target.name|target.name:capitalize() +-- #source#|#Source# -> <displayString> self.name|self:getName():capitalize() +-- #target#|#Target# -> target.name|target:getName():capitalize() function _M:logCombat(target, style, ...) if not game.uiset or not game.uiset.logdisplay then return end local src = self.__project_source or self diff --git a/game/modules/tome/class/interface/PartyDeath.lua b/game/modules/tome/class/interface/PartyDeath.lua index 1e137637b4a831e89a1632319fdadedd962a1ace..5092cbf225adef4596bd559970520168bc740775 100644 --- a/game/modules/tome/class/interface/PartyDeath.lua +++ b/game/modules/tome/class/interface/PartyDeath.lua @@ -55,7 +55,7 @@ function _M:onPartyDeath(src, death_note) game.party:setPlayer(game.party:findMember{main=true}, true) game.paused = true game.player.energy.value = game.energy_to_act - src = src or {name="unknown"} + src = src or {name=_t"unknown"} game.player.killedBy = src game.player.died_times[#game.player.died_times+1] = {name=src.name, level=game.player.level, turn=game.turn} game.player:registerDeath(game.player.killedBy) @@ -86,54 +86,54 @@ function _M:onPartyDeath(src, death_note) local msg, short_msg if not death_note.special_death_msg then - msg = "%s the level %d %s %s was %s to death by %s%s%s on level %s of %s." - short_msg = "%s(%d %s %s) was %s to death by %s%s on %s %s." - local srcname = src.unique and src.name or src.name:a_an() - local killermsg = (src.killer_message and " "..src.killer_message or ""):gsub("#sex#", game.player.female and "her" or "him") + msg = _t"%s the level %d %s %s was %s to death by %s%s%s on level %s of %s." + short_msg = _t"%s(%d %s %s) was %s to death by %s%s on %s %s." + local srcname = src.unique and src:getName() or src:getName():a_an() + local killermsg = (src.killer_message and " "..src.killer_message or ""):gsub("#sex#", game.player.female and _t"her" or _t"him") if src.name == game.player.name then - srcname = game.player.female and "herself" or "himself" + srcname = game.player.female and _t"herself" or _t"himself" killermsg = rng.table{ - " (the fool)", - " in an act of extreme incompetence", - " out of supreme humility", - ", by accident of course,", - " in some sort of fetish experiment gone wrong", - ", providing a free meal to the wildlife", - " (how embarrassing)", + _t" (the fool)", + _t" in an act of extreme incompetence", + _t" out of supreme humility", + _t", by accident of course,", + _t" in some sort of fetish experiment gone wrong", + _t", providing a free meal to the wildlife", + _t" (how embarrassing)", } end msg = msg:format( - game.player.name, game.player.level, game.player.descriptor.subrace:lower(), game.player.descriptor.subclass:lower(), - death_mean or "battered", + game.player.name, game.player.level, _t(game.player.descriptor.subrace):lower(), _t(game.player.descriptor.subclass):lower(), + death_mean or _t"battered", srcname, - src.name == top_killer and " (yet again)" or "", + src.name == top_killer and _t" (yet again)" or "", killermsg, game.level.level, game.zone.name ) short_msg = short_msg:format( - game.player.name, game.player.level, game.player.descriptor.subrace:lower(), game.player.descriptor.subclass:lower(), - death_mean or "battered", + game.player.name, game.player.level, _t(game.player.descriptor.subrace):lower(), _t(game.player.descriptor.subclass):lower(), + death_mean or _t"battered", srcname, killermsg, game.zone.name, game.level.level ) else - msg = "%s the level %d %s %s %s on level %s of %s." - short_msg = "%s(%d %s %s) %s on %s %s." + msg = _t"%s the level %d %s %s %s on level %s of %s." + short_msg = _t"%s(%d %s %s) %s on %s %s." msg = msg:format( - game.player.name, game.player.level, game.player.descriptor.subrace:lower(), game.player.descriptor.subclass:lower(), + game.player.name, game.player.level, _t(game.player.descriptor.subrace):lower(), _t(game.player.descriptor.subclass):lower(), death_note.special_death_msg, game.level.level, game.zone.name ) short_msg = short_msg:format( - game.player.name, game.player.level, game.player.descriptor.subrace:lower(), game.player.descriptor.subclass:lower(), + game.player.name, game.player.level, _t(game.player.descriptor.subrace):lower(), _t(game.player.descriptor.subclass):lower(), death_note.special_death_msg, game.zone.name, game.level.level ) end game:playSound("actions/death") - game.delayed_death_message = "#{bold}#"..msg.."#{normal}#" + game.delayed_death_message = _t"#{bold}#"..msg.."#{normal}#" if (not game.player.easy_mode_lifes or game.player.easy_mode_lifes <= 0) and not game.player.infinite_lifes then profile.chat.uc_ext:sendKillerLink(msg, short_msg, src) end diff --git a/game/modules/tome/class/interface/PartyIngredients.lua b/game/modules/tome/class/interface/PartyIngredients.lua index 361f27dda6d9989a3abbee155c087c7ff2e9abfb..843559694922dc061b84aa1f53b9324fe9651ad7 100644 --- a/game/modules/tome/class/interface/PartyIngredients.lua +++ b/game/modules/tome/class/interface/PartyIngredients.lua @@ -80,13 +80,13 @@ function _M:collectIngredient(id, nb, silent) if d.min == INFINITY then self.ingredients[id] = INFINITY - game.log("You collect a new ingredient: #LIGHT_GREEN#%s%s#WHITE#.", d.display_entity:getDisplayString(), d.name) + game.log("You collect a new ingredient: #LIGHT_GREEN#%s%s#WHITE#.", d.display_entity:getDisplayString(), _t(d.name)) else self.ingredients[id] = math.max((self.ingredients[id] or 0) + nb, d.min) if d.max ~= INFINITY then self.ingredients[id] = math.min(self.ingredients[id], d.max) end - game.log("You collect a new ingredient: #LIGHT_GREEN#%s%s (%d)#WHITE#.", d.display_entity:getDisplayString(), d.name, nb) + game.log("You collect a new ingredient: #LIGHT_GREEN#%s%s (%d)#WHITE#.", d.display_entity:getDisplayString(), _t(d.name), nb) end end diff --git a/game/modules/tome/class/interface/PartyLore.lua b/game/modules/tome/class/interface/PartyLore.lua index 9b6fa1968f9110fb9b7217f3065fe9995540de41..0c6e464764d729c2b8fb9baabb15118b54b37ed0 100644 --- a/game/modules/tome/class/interface/PartyLore.lua +++ b/game/modules/tome/class/interface/PartyLore.lua @@ -131,7 +131,7 @@ function _M:learnLore(lore, nopopup, silent, nostop) if learnt then if l.on_learn then l.on_learn(self:findMember{main=true}) end end if game.player.runStop and not nostop then - game.player:runStop("learnt lore") - game.player:restStop("learnt lore") + game.player:runStop(_t"learnt lore") + game.player:restStop(_t"learnt lore") end end diff --git a/game/modules/tome/class/interface/PlayerDumpJSON.lua b/game/modules/tome/class/interface/PlayerDumpJSON.lua index 5b67846781072a85f1bcb659e05f818067f29eef..d6c5f6dae80783c882cd65e4f446a485b58a6b12 100644 --- a/game/modules/tome/class/interface/PlayerDumpJSON.lua +++ b/game/modules/tome/class/interface/PlayerDumpJSON.lua @@ -296,7 +296,7 @@ function _M:dumpToJSON(js, bypass, nosub) local ttknown = self:knowTalentType(tt.type) if not (self.talents_types[tt.type] == nil) and ttknown then local cat = tt.type:gsub("/.*", "") - local catname = ("%s / %s"):format(cat:capitalize(), tt.name:capitalize()) + local catname = ("%s / %s"):format(_t(cat):capitalize(), tt.name:capitalize()) local td = { list={}, mastery = ("%.02f"):format(self:getTalentTypeMastery(tt.type)), kind=tt.generic and "generic" or "class" } tdef[catname] = td diff --git a/game/modules/tome/class/interface/PlayerExplore.lua b/game/modules/tome/class/interface/PlayerExplore.lua index 5a0097b6c5cde500fb0e7d0f530af8dd28d3f121..90592f160488becc6a5ea44a4e579463748c9737 100644 --- a/game/modules/tome/class/interface/PlayerExplore.lua +++ b/game/modules/tome/class/interface/PlayerExplore.lua @@ -2450,7 +2450,7 @@ function _M:autoExplore() local terrain = game.level.map(x, y, Map.TERRAIN) if target_type == "door" then if #path == 1 then - self:runStop("at door") + self:runStop(_t"at door") if terrain and (terrain.door_player_check or terrain.door_player_stop) then game.level.map.attrs(x, y, "autoexplore_ignore", true) end return false else @@ -2460,7 +2460,7 @@ function _M:autoExplore() -- don't bump into special terrain if we've already been running if target_type == "special" then if #path == 1 then - self:runStop("something interesting") + self:runStop(_t"something interesting") game.level.map.attrs(x, y, "autoexplore_ignore", true) return false end @@ -2472,7 +2472,7 @@ function _M:autoExplore() self.running.busy = { type = "opening door", do_move = true, no_energy = true } elseif not game.level.map.attrs(x, y, "noticed") then if terrain.change_level or terrain.orb_portal or terrain.escort_portal then game.level.map.attrs(x, y, "noticed", true) end - self:runStop("interesting terrain") + self:runStop(_t"interesting terrain") return false end end @@ -2511,7 +2511,7 @@ function _M:autoExplore() self.running = { path = path, cnt = 1, - dialog = Dialog:simplePopup("Running...", "You are exploring, press any key to stop.", function() + dialog = Dialog:simplePopup(_t"Running...", _t"You are exploring, press any key to stop.", function() self:runStop() end, false, true), explore = target_type, @@ -2555,7 +2555,7 @@ function _M:checkAutoExplore() if terrain and terrain.door_opened then -- we already tried to open the door but failed (always fails on vault doors) if self.running.busy and self.running.busy.type == "opening door" then - self:runStop("checked door") + self:runStop(_t"checked door") return false -- we didn't know this was a door at the time, so explore a new path elseif self.running.explore == "unseen" and self.running.cnt == #self.running.path and game.level.map.has_seens(cx, cy) then @@ -2591,7 +2591,7 @@ function _M:checkAutoExplore() end end end - self:runStop("at " .. self.running.explore) + self:runStop(("at %s"):tformat(_t(self.running.explore))) return false end end @@ -2601,16 +2601,16 @@ function _M:checkAutoExplore() -- game.level.map:checkAllEntities(cx, cy, "block_move", self) then if terrain.notice then if terrain.change_level or terrain.orb_portal or terrain.escort_portal then game.level.map.attrs(cx, cy, "noticed", true) end - self:runStop("interesting terrain") + self:runStop(_t"interesting terrain") return false elseif self.running.explore == "unseen" or self.running.explore == "object" and self.running.cnt ~= #self.running.path then return self:autoExplore() else if self.running.explore == "object" and self.running.cnt == #self.running.path then game.level.map.attrs(cx, cy, "obj_seen", true) - self:runStop("at object (diggable)") + self:runStop(_t"at object (diggable)") else - self:runStop("the path is blocked") + self:runStop(_t"the path is blocked") end return false end diff --git a/game/modules/tome/class/interface/TooltipsData.lua b/game/modules/tome/class/interface/TooltipsData.lua index 0e64ef5a8d7b937208275cae3c5621cfc8fe8e7f..eec9d48be8ee21069135131ce44ee9b44edbc7ab 100644 --- a/game/modules/tome/class/interface/TooltipsData.lua +++ b/game/modules/tome/class/interface/TooltipsData.lua @@ -25,131 +25,131 @@ module(..., package.seeall, class.make) ------------------------------------------------------------- -- Resources ------------------------------------------------------------- -TOOLTIP_GOLD = [[#GOLD#Gold#LAST# +TOOLTIP_GOLD = _t[[#GOLD#Gold#LAST# Money! With gold you can buy items in the various stores in town. You can gain money by looting it from your foes, by selling items and by doing some quests. ]] -TOOLTIP_LIVES = [[#GOLD#Lives#LAST# +TOOLTIP_LIVES = _t[[#GOLD#Lives#LAST# How many lives you have and how many you lost. Your total number of lives depends on the permadeath setting you choose. You may find other ways to save yourself but they are not considered extra lives. ]] -TOOLTIP_BLOOD_LIFE = [[#GOLD#Blood of Life#LAST# +TOOLTIP_BLOOD_LIFE = _t[[#GOLD#Blood of Life#LAST# The Blood of Life courses through your veins. This can save you from death and restore you to full health (once) if you would otherwise die. ]] -TOOLTIP_LIFE = [[#GOLD#Life#LAST# +TOOLTIP_LIFE = _t[[#GOLD#Life#LAST# This is your life force, which is reduced each time you take damage. Normally, you will die if this drops below zero, though some effects will allow you survive with negative life. Death is usually permanent so beware! It is increased by Constitution. ]] -TOOLTIP_DAMAGE_SHIELD = [[#GOLD#Damage shields#LAST# +TOOLTIP_DAMAGE_SHIELD = _t[[#GOLD#Damage shields#LAST# Various talents, items and powers can grant you a temporary damage shield. Each works in a distinct manner, but will usually intercept a certain amount of damage that would otherwise hit you before crumbling. ]] -TOOLTIP_UNNATURAL_BODY = [[#GOLD#Unnatrual Body Regeneration#LAST# +TOOLTIP_UNNATURAL_BODY = _t[[#GOLD#Unnatrual Body Regeneration#LAST# Your Unnatural Body talent allows you to feed off the life of your fallen foes. Each time you kill a creature your maximum regeneration pool increases and each turn some of it transfers into your own life. ]] -TOOLTIP_LIFE_REGEN = [[#GOLD#Life Regeneration#LAST# +TOOLTIP_LIFE_REGEN = _t[[#GOLD#Life Regeneration#LAST# How much life you regenerate per turn. This value can be improved with spells, talents, infusions, equipment. ]] -TOOLTIP_HEALING_MOD = [[#GOLD#Healing mod#LAST# +TOOLTIP_HEALING_MOD = _t[[#GOLD#Healing mod#LAST# This represents how effective healing is for you. All healing values are multiplied by this value (including life regeneration). It is increased by Constitution. ]] -TOOLTIP_AIR = [[#GOLD#Air#LAST# +TOOLTIP_AIR = _t[[#GOLD#Air#LAST# The breath counter only appears when you are suffocating. If it reaches zero you will die. Being stuck in a wall, being in deep water, ... all those kinds of situations will decrease your air. When you come back into a breathable atmosphere you will slowly regain your air level. ]] -TOOLTIP_STAMINA = [[#GOLD#Stamina#LAST# +TOOLTIP_STAMINA = _t[[#GOLD#Stamina#LAST# Stamina represents your physical fatigue. Each physical ability used reduces it. It regenerates slowly over time or when resting. It is increased by Willpower. ]] -TOOLTIP_MANA = [[#GOLD#Mana#LAST# +TOOLTIP_MANA = _t[[#GOLD#Mana#LAST# Mana represents your reserve of magical energies. Each spell cast consumes mana and each sustained spell reduces your maximum mana. It is increased by Willpower. ]] -TOOLTIP_POSITIVE = [[#GOLD#Positive Energy#LAST# +TOOLTIP_POSITIVE = _t[[#GOLD#Positive Energy#LAST# Positive energy represents your reserve of positive "celestial" power, most closely associated with the Sun. ]] -TOOLTIP_NEGATIVE = [[#GOLD#Negative Energy#LAST# +TOOLTIP_NEGATIVE = _t[[#GOLD#Negative Energy#LAST# Negative energy represents your reserve of negative "celestial" power, most closely associated with the Moon. ]] -TOOLTIP_VIM = [[#GOLD#Vim#LAST# +TOOLTIP_VIM = _t[[#GOLD#Vim#LAST# Vim represents the amount of life energy you control. Each corruption talent requires some. It does not regenerate naturally; you need to drain it from yourself or your victims. Each time you kill a creature you gain 30% of your Willpower + 1 as Vim. This value is multiplied by half the rank of the creature. If you can't pay for the Vim cost of a talent you may instead pay with life at a rate of 200% of the Vim cost. ]] -TOOLTIP_EQUILIBRIUM = [[#GOLD#Equilibrium#LAST# +TOOLTIP_EQUILIBRIUM = _t[[#GOLD#Equilibrium#LAST# Equilibrium reflects your standing in the grand balance of nature and how easily you can access Wild Gifts. The closer it is to 0 the more in-balance you are. Being too far out of balance may cause your Wild Gifts to fail when called upon. ]] -TOOLTIP_HATE = [[#GOLD#Hate#LAST# +TOOLTIP_HATE = _t[[#GOLD#Hate#LAST# Hate represents your inner rage against all that lives and dares face you. It is replenished by killing creatures and through the application of your talents. All afflicted talents are based on Hate, and many are more effective at higher levels of hate. ]] -TOOLTIP_PARADOX = [[#GOLD#Paradox#LAST# +TOOLTIP_PARADOX = _t[[#GOLD#Paradox#LAST# Paradox represents how stable the current timeline is. As your Paradox grows so does your Spellpower, but you may be shifted to a more stable timeline when you attempt to use your magic. When your modified Paradox is above 600 the shifts will become more violent. Your control over chronomancy spells increases with your Willpower. ]] -TOOLTIP_PSI = [[#GOLD#Psi#LAST# +TOOLTIP_PSI = _t[[#GOLD#Psi#LAST# Psi represents how much energy your mind can harness. Like matter, it can be neither created nor destroyed. It regenerates naturally, though slowly, as you pull minute amounts of heat and kinetic energy from your surroundings. To get meaningful amounts back in combat, you must absorb it through shields or various other talents. Your capacity for storing energy is determined by your Willpower. ]] -TOOLTIP_FEEDBACK = [[#GOLD#Feedback#LAST# +TOOLTIP_FEEDBACK = _t[[#GOLD#Feedback#LAST# Feedback represents using pain as a means of psionic grounding and it can be used to power feedback abilities. Feedback decays at the rate of 10% or 1 per turn (which ever is greater) depending on talents. All damage you take from an outside source will increase your Feedback based on to how much of your health is lost and your level. First level characters gain 100 Feedback when losing 50% health, while 50th level characters gain the same amount when losing 20% health. ]] -TOOLTIP_NECROTIC_AURA = [[#GOLD#Necrotic Aura#LAST# +TOOLTIP_NECROTIC_AURA = _t[[#GOLD#Necrotic Aura#LAST# Represents the raw materials for creating undead minions. It increases each time you or your minions kill something that is inside the aura radius. ]] -TOOLTIP_FORTRESS_ENERGY = [[#GOLD#Fortress Energy#LAST# +TOOLTIP_FORTRESS_ENERGY = _t[[#GOLD#Fortress Energy#LAST# The energy of the Sher'Tul Fortress. It is replenished by transmogrifying items and used to power all the Fortress systems. ]] -TOOLTIP_LEVEL = [[#GOLD#Level and experience#LAST# +TOOLTIP_LEVEL = _t[[#GOLD#Level and experience#LAST# Each time you kill a creature that is over your own level - 5 you gain some experience. When you reach enough experience you advance to the next level. There is a maximum of 50 levels you can gain. Each time you level you gain stat and talent points to use to improve your character. ]] -TOOLTIP_ENCUMBERED = [[#GOLD#Encumbrance#LAST# +TOOLTIP_ENCUMBERED = _t[[#GOLD#Encumbrance#LAST# Each object you carry has an encumbrance value. Your maximum carrying capacity is determined by your strength. You cannot move while encumbered; drop some items. ]] @@ -157,36 +157,36 @@ You cannot move while encumbered; drop some items. ------------------------------------------------------------- -- Talents ------------------------------------------------------------- -TOOLTIP_INSCRIPTIONS = [[#GOLD#Inscriptions#LAST# +TOOLTIP_INSCRIPTIONS = _t[[#GOLD#Inscriptions#LAST# The people of Eyal have found a way to create herbal infusions and runes that can be inscribed on the skin of a creature. More exotic types of inscriptions also exist. Those inscriptions give the bearer always-accessible powers that can be used an unlimited number of times. A simple regeneration infusion is the most common type of infusion, and the use of runes of various types is also common among arcane users. ]] -TOOLTIP_PRODIGIES = [[#GOLD#Prodigies#LAST# +TOOLTIP_PRODIGIES = _t[[#GOLD#Prodigies#LAST# Prodigies are special talents that only the most powerful of characters can acquire. All of them require at least 50 in a core stat and many also have other, very specific and/or demanding requirements to learn. Players can learn new prodigies at levels 30 and 42.]] -TOOLTIP_ITEM_TALENTS = [[#GOLD#Item Talents#LAST# +TOOLTIP_ITEM_TALENTS = _t[[#GOLD#Item Talents#LAST# Some objects bestow additional talents on the wearer or holder. These talents work like normal, learned talents, but are lost if the object granting them is taken off or dropped, even for a moment.]] -TOOLTIP_ACTIVATED = [[#GOLD#Activated Talents#LAST# +TOOLTIP_ACTIVATED = _t[[#GOLD#Activated Talents#LAST# Most talents require activation (i.e. time) to use, and create a specific effect when called upon. Specific information on each talent appears its tooltip.]] -TOOLTIP_INSTANT = [[#GOLD#Instant Talents#LAST# +TOOLTIP_INSTANT = _t[[#GOLD#Instant Talents#LAST# Some activated talents take no time to use, being activated with but a thought. Unlike most talents, instant talents are never put on cooldown from being stunned, and may be usable when most other talents are not. Specific information on each talent appears its tooltip.]] -TOOLTIP_PASSIVE = [[#GOLD#Passive Talents#LAST# +TOOLTIP_PASSIVE = _t[[#GOLD#Passive Talents#LAST# When learned, passive talents permanently alter the user in some way. The effects are always present and are usually not dispellable or removable, though other effects may counteract or negate them. Specific information on each talent appears its tooltip.]] -TOOLTIP_SUSTAINED = [[#GOLD#Sustained Talents#LAST# +TOOLTIP_SUSTAINED = _t[[#GOLD#Sustained Talents#LAST# Sustained talents are turned on and left on. While active, a sustained talent produces some effects on the user that stay in effect until the talent is deactivated. Activating most sustained talents require the user to put aside some resources, which become unavailable until the talent is turned off. Deactivating a sustained talent causes it to go on cooldown. @@ -195,28 +195,28 @@ Specific information on each talent appears its tooltip.]] ------------------------------------------------------------- -- Speeds ------------------------------------------------------------- -TOOLTIP_SPEED_GLOBAL = [[#GOLD#Global Speed#LAST# +TOOLTIP_SPEED_GLOBAL = _t[[#GOLD#Global Speed#LAST# Global speed represents how fast you are and affects everything you do. Higher is faster, so at 200% global speed you can performa twice as many actions as you would at 100% speed. Note that the amount of time to performa various actions like moving, casting spells, and attacking is also affected by their respective speeds. ]] -TOOLTIP_SPEED_MOVEMENT = [[#GOLD#Movement Speed#LAST# +TOOLTIP_SPEED_MOVEMENT = _t[[#GOLD#Movement Speed#LAST# How quickly you move compared to normal. Higher is faster, so 200% means that you move twice as fast as normal. Minimum: 40% ]] -TOOLTIP_SPEED_SPELL = [[#GOLD#Spell Speed#LAST# +TOOLTIP_SPEED_SPELL = _t[[#GOLD#Spell Speed#LAST# How quickly you cast spells. Higher is faster, so 200% means that you can cast spells twice as fast as normal. Minimum: 40% ]] -TOOLTIP_SPEED_ATTACK = [[#GOLD#Attack Speed#LAST# +TOOLTIP_SPEED_ATTACK = _t[[#GOLD#Attack Speed#LAST# How quickly you attack with weapons, either ranged or melee. Higher is faster, so 200% means that you can attack twice as fast as normal. The actual speed may also be affected by the weapon used. Minimum: 40% ]] -TOOLTIP_SPEED_MENTAL = [[#GOLD#Mental Speed#LAST# +TOOLTIP_SPEED_MENTAL = _t[[#GOLD#Mental Speed#LAST# How quickly you perform mind powers. Higher is faster, so 200% means that you can use mind powers twice as fast as normal. Minimum: 40% @@ -224,72 +224,72 @@ Minimum: 40% ------------------------------------------------------------- -- Stats ------------------------------------------------------------- -TOOLTIP_STATS = [[#GOLD#Stats#LAST# +TOOLTIP_STATS = _t[[#GOLD#Stats#LAST# Your character's primary attributes. Base: the value inherent to your character, which may be increased by applying stat points (limited by character level). Current: the base value plus any bonuses from equipment, effects, certain talents, etc. that is used to determine the overall effectiveness of the stat. ]] -TOOLTIP_STR = [[#GOLD#Strength#LAST# +TOOLTIP_STR = _t[[#GOLD#Strength#LAST# Strength defines your character's ability to apply physical force. It increases Physical Power, damage done with heavy weapons, Physical Save, and carrying capacity. ]] -TOOLTIP_DEX = [[#GOLD#Dexterity#LAST# +TOOLTIP_DEX = _t[[#GOLD#Dexterity#LAST# Dexterity defines your character's ability to be agile and alert. It increases Accuracy, Defense, chance to shrug off critical hits and your damage with light weapons. ]] -TOOLTIP_CON = [[#GOLD#Constitution#LAST# +TOOLTIP_CON = _t[[#GOLD#Constitution#LAST# Constitution defines your character's ability to withstand and resist damage. It increases your maximum life, Physical Save and Healing mod. ]] -TOOLTIP_MAG = [[#GOLD#Magic#LAST# +TOOLTIP_MAG = _t[[#GOLD#Magic#LAST# Magic defines your character's ability to manipulate the magical energy of the world. It increases your Spellpower, Spell Save, and the effect of spells and other magic items. ]] -TOOLTIP_WIL = [[#GOLD#Willpower#LAST# +TOOLTIP_WIL = _t[[#GOLD#Willpower#LAST# Willpower defines your character's ability to concentrate. It increases your mana, stamina, psi capacity, Mindpower, Spell Save, and Mental Save. ]] -TOOLTIP_CUN = [[#GOLD#Cunning#LAST# +TOOLTIP_CUN = _t[[#GOLD#Cunning#LAST# Cunning defines your character's ability to learn, think, and react. It allows you to learn many worldly abilities, and increases your Mindpower, Mental Save, and critical chance. ]] -TOOLTIP_STRDEXCON = "#AQUAMARINE#Physical stats#LAST#\n---\n"..TOOLTIP_STR.."\n---\n"..TOOLTIP_DEX.."\n---\n"..TOOLTIP_CON -TOOLTIP_MAGWILCUN = "#AQUAMARINE#Mental stats#LAST#\n---\n"..TOOLTIP_MAG.."\n---\n"..TOOLTIP_WIL.."\n---\n"..TOOLTIP_CUN +TOOLTIP_STRDEXCON = _t"#AQUAMARINE#Physical stats#LAST#\n---\n"..TOOLTIP_STR.."\n---\n"..TOOLTIP_DEX.."\n---\n"..TOOLTIP_CON +TOOLTIP_MAGWILCUN = _t"#AQUAMARINE#Mental stats#LAST#\n---\n"..TOOLTIP_MAG.."\n---\n"..TOOLTIP_WIL.."\n---\n"..TOOLTIP_CUN ------------------------------------------------------------- -- Melee ------------------------------------------------------------- -TOOLTIP_COMBAT_ATTACK = [[#GOLD#Accuracy#LAST# +TOOLTIP_COMBAT_ATTACK = _t[[#GOLD#Accuracy#LAST# Determines your chance to hit your target as well as knock your target off-balance when measured against the target's Defense. When you use Accuracy to inflict temporary physical effects on an enemy, every point your opponent's relevant saving throw exceeds your accuracy will reduce the duration of the effect by 5%. Many weapon types will have an additional "accuracy bonus" scaling per point of Accuracy greater than the targets Defense. ]] -TOOLTIP_COMBAT_PHYSICAL_POWER = [[#GOLD#Physical Power#LAST# +TOOLTIP_COMBAT_PHYSICAL_POWER = _t[[#GOLD#Physical Power#LAST# Measures your ability to deal physical damage in combat. When you use Physical Power to inflict temporary physical effects on an enemy, every point your opponent's relevant saving throw exceeds your physical power will reduce the duration of the effect by 5%. ]] -TOOLTIP_COMBAT_DAMAGE = [[#GOLD#Damage#LAST# +TOOLTIP_COMBAT_DAMAGE = _t[[#GOLD#Damage#LAST# This is the damage you inflict on your foes when you hit them. This damage can be reduced by the target's armour or by percentile damage resistances. It is improved by Strength or Dexterity, depending on your weapon. Some talents can change the stats that affect it. ]] -TOOLTIP_COMBAT_BLOCK = [[#GOLD#Shield Block Value#LAST# +TOOLTIP_COMBAT_BLOCK = _t[[#GOLD#Shield Block Value#LAST# The amount of damage a shield will block when actively used in defense. Usually this is only effective against Physical damage, but some special shields (and talents) allow the wearer to block other types. ]] -TOOLTIP_COMBAT_APR = [[#GOLD#Armour Penetration#LAST# +TOOLTIP_COMBAT_APR = _t[[#GOLD#Armour Penetration#LAST# Armour penetration allows you to ignore a part of the target's armour (this only works for armour, not damage resistance). This can never increase the damage you do beyond reducing armour, so it is only useful against armoured foes. ]] -TOOLTIP_COMBAT_CRIT = [[#GOLD#Critical chance#LAST# +TOOLTIP_COMBAT_CRIT = _t[[#GOLD#Critical chance#LAST# Each time you deal damage you have a chance to make a critical hit that deals extra damage. Some talents allow you to increase this percentage. It is improved by Cunning. ]] -TOOLTIP_COMBAT_SPEED = [[#GOLD#Attack speed#LAST# +TOOLTIP_COMBAT_SPEED = _t[[#GOLD#Attack speed#LAST# Attack speed represents how fast your attacks are compared to normal. Higher is faster, representing more attacks performed in the same amount of time. ]] -TOOLTIP_COMBAT_RANGE = [[#GOLD#Firing range#LAST# +TOOLTIP_COMBAT_RANGE = _t[[#GOLD#Firing range#LAST# The maximum distance your weapon can reach. ]] -TOOLTIP_ARCHERY_RANGE_SPEED = [[#GOLD#Archery range and speed#LAST# +TOOLTIP_ARCHERY_RANGE_SPEED = _t[[#GOLD#Archery range and speed#LAST# Archery attacks create projectiles with a maximum range, beyond which they will terminate. The projectiles travel at their own speed, measured as a percentage (higher, usually) of normal movement speed. ]] -TOOLTIP_COMBAT_AMMO = [[#GOLD#Ammo remaining#LAST# +TOOLTIP_COMBAT_AMMO = _t[[#GOLD#Ammo remaining#LAST# This is the amount of ammunition you have left. Bows and slings must be reloaded when this reaches 0, which you will do automatically each turn you rest or don't perform a non-movement action. Alchemists use specially prepared gems as ammunition to throw bombs, which must be reloaded manually. @@ -298,52 +298,52 @@ Alchemists use specially prepared gems as ammunition to throw bombs, which must ------------------------------------------------------------- -- Defense ------------------------------------------------------------- -TOOLTIP_FATIGUE = [[#GOLD#Fatigue#LAST# +TOOLTIP_FATIGUE = _t[[#GOLD#Fatigue#LAST# Fatigue is a percentile value that increases the cost of your talents and spells. It represents the fatigue created by wearing heavy equipment. Not all talents are affected; notably, Wild Gifts are not. ]] -TOOLTIP_ARMOR = [[#GOLD#Armour#LAST# +TOOLTIP_ARMOR = _t[[#GOLD#Armour#LAST# Armour value is a damage reduction from all incoming melee and ranged weapon attacks. Absorbs (hardiness)% of incoming weapon damage, up to a maximum of (armour) damage absorbed. This is countered by armour penetration and is applied before all kinds of critical damage increase, talent multipliers and damage multiplier, thus making even small amounts have greater effects. ]] -TOOLTIP_ARMOR_HARDINESS = [[#GOLD#Armour Hardiness#LAST# +TOOLTIP_ARMOR_HARDINESS = _t[[#GOLD#Armour Hardiness#LAST# Armour hardiness represents how much of each incoming blows the armour will affect. Absorbs (hardiness)% of incoming weapon damage, up to a maximum of (armour) damage absorbed. ]] -TOOLTIP_CRIT_REDUCTION = [[#GOLD#Crit Reduction#LAST# +TOOLTIP_CRIT_REDUCTION = _t[[#GOLD#Crit Reduction#LAST# Crit reduction reduces the chance an opponent has of landing a critical strike with a melee or ranged attack. ]] -TOOLTIP_CRIT_SHRUG = [[#GOLD#Crits Shrug Off#LAST# +TOOLTIP_CRIT_SHRUG = _t[[#GOLD#Crits Shrug Off#LAST# Gives a chance to ignore the bonus critical damage from any direct damage attacks (melee, spells, ranged, mind powers, ...). ]] -TOOLTIP_DEFENSE = [[#GOLD#Defense#LAST# +TOOLTIP_DEFENSE = _t[[#GOLD#Defense#LAST# Defense represents your chance to avoid melee weapon attacks and reduces the chance you'll be knocked off-balance by an enemy's attack. It is measured against the attacker's Accuracy. ]] -TOOLTIP_RDEFENSE = [[#GOLD#Ranged Defense#LAST# +TOOLTIP_RDEFENSE = _t[[#GOLD#Ranged Defense#LAST# Defense represents your chance to avoid ranged weapon attacks and reduces the chance you'll be knocked off-balance by an enemy's attack. It is measured against the attacker's Accuracy. ]] -TOOLTIP_SAVES = [[#GOLD#Saves#LAST# +TOOLTIP_SAVES = _t[[#GOLD#Saves#LAST# Saving throws represent your ability to shrug off, partially or fully, detrimental effects applied to you. Most detrimental effects will check their power (physical, spell, mental) vs your corresponding save type to determine if they take effect or not. The chance is usually ~50% when power and save are equal. ]] -TOOLTIP_PHYS_SAVE = [[#GOLD#Physical saving throw#LAST# +TOOLTIP_PHYS_SAVE = _t[[#GOLD#Physical saving throw#LAST# Increases chance to shrug off physically-induced effects. Also reduces duration of detrimental physical effects by up to 5% per point, depending on the power of the opponent's effect. ]] -TOOLTIP_SPELL_SAVE = [[#GOLD#Spell saving throw#LAST# +TOOLTIP_SPELL_SAVE = _t[[#GOLD#Spell saving throw#LAST# Increases chance to shrug off magically-induced effects. Also reduces duration of detrimental magical effects by up to 5% per point, depending on the power of the opponent's effect. ]] -TOOLTIP_MENTAL_SAVE = [[#GOLD#Mental saving throw#LAST# +TOOLTIP_MENTAL_SAVE = _t[[#GOLD#Mental saving throw#LAST# Increases chance to shrug off mentally-induced effects. Also reduces duration of detrimental mental effects by up to 5% per point, depending on the power of the opponent's effect. ]] ------------------------------------------------------------- -- Physical ------------------------------------------------------------- -TOOLTIP_PHYSICAL_POWER = [[#GOLD#Physical Power#LAST# +TOOLTIP_PHYSICAL_POWER = _t[[#GOLD#Physical Power#LAST# Your physical power represents how overwhelming your physcial abilities are. It is usually improved by Strength, but may be modified by your weapon. It is opposed by your opponent's physical save. In addition, when your physical attacks inflict temporary detrimental effects, every point your opponent's save exceeds your physical power will reduce the duration of the effect by 5%. ]] -TOOLTIP_PHYSICAL_CRIT = [[#GOLD#Physical critical chance#LAST# +TOOLTIP_PHYSICAL_CRIT = _t[[#GOLD#Physical critical chance#LAST# Each time you deal damage with a physical ability you may have a chance to perform a critical hit that deals extra damage. Some talents allow you to increase this percentage, and it may be modified by your weapon. It is improved by Cunning. @@ -351,186 +351,186 @@ It is improved by Cunning. ------------------------------------------------------------- -- Spells ------------------------------------------------------------- -TOOLTIP_SPELL_POWER = [[#GOLD#Spellpower#LAST# +TOOLTIP_SPELL_POWER = _t[[#GOLD#Spellpower#LAST# Your spellpower represents how powerful your magical spells are. It is opposed by your opponent's spell save. In addition, when your spells inflict temporary detrimental effects, every point your opponent's save exceeds your spellpower will reduce the duration of the effect by 5%. ]] -TOOLTIP_SPELL_CRIT = [[#GOLD#Spell critical chance#LAST# +TOOLTIP_SPELL_CRIT = _t[[#GOLD#Spell critical chance#LAST# Each time you deal damage with a spell you may have a chance to perform a critical hit that deals extra damage. Some talents allow you to increase this percentage. It is improved by Cunning. ]] -TOOLTIP_SPELL_SPEED = [[#GOLD#Spellcasting speed#LAST# +TOOLTIP_SPELL_SPEED = _t[[#GOLD#Spellcasting speed#LAST# Spellcasting speed represents how fast your spellcasting is compared to normal. Higher is faster - 200% means that you cast spells twice as fast as someone at 100%. ]] -TOOLTIP_SPELL_COOLDOWN = [[#GOLD#Spellcooldown#LAST# +TOOLTIP_SPELL_COOLDOWN = _t[[#GOLD#Spellcooldown#LAST# Spell cooldown represents how fast your spells will come off of cooldown. The lower it is, the more often you'll be able to use your spell talents and runes. ]] ------------------------------------------------------------- -- Mental ------------------------------------------------------------- -TOOLTIP_MINDPOWER = [[#GOLD#Mindpower#LAST# +TOOLTIP_MINDPOWER = _t[[#GOLD#Mindpower#LAST# Your mindpower represents how powerful your mental abilities are. It is opposed by your opponent's mental save. In addition, when your mental abilities inflict temporary detrimental effects, every point your opponent's save exceeds your mindpower will reduce the duration of the effect by 5%. ]] -TOOLTIP_MIND_CRIT = [[#GOLD#Mental critical chance#LAST# +TOOLTIP_MIND_CRIT = _t[[#GOLD#Mental critical chance#LAST# Each time you deal damage with a mental attack you may have a chance to perform a critical hit that deals extra damage. Some talents allow you to increase this percentage. It is improved by Cunning. ]] -TOOLTIP_MIND_SPEED = [[#GOLD#Mental speed#LAST# +TOOLTIP_MIND_SPEED = _t[[#GOLD#Mental speed#LAST# Mental speed represents how fast you use psionic abilities compared to normal. Higher is faster. ]] ------------------------------------------------------------- -- Damage and resists ------------------------------------------------------------- -TOOLTIP_INC_DAMAGE_ALL = [[#GOLD#Damage increase: all#LAST# +TOOLTIP_INC_DAMAGE_ALL = _t[[#GOLD#Damage increase: all#LAST# All damage you deal, through any means, is increased by this percentage. This stacks with individual damage type increases. ]] -TOOLTIP_INC_DAMAGE = [[#GOLD#Damage increase: specific#LAST# +TOOLTIP_INC_DAMAGE = _t[[#GOLD#Damage increase: specific#LAST# All damage of this type that you deal, through any means, is increased by this percentage. ]] -TOOLTIP_INC_DAMAGE_ACTOR = [[#GOLD#Damage increase: creature type#LAST# +TOOLTIP_INC_DAMAGE_ACTOR = _t[[#GOLD#Damage increase: creature type#LAST# All damage you deal to creatures of this type, through any means, is increased by this percentage. This is applied in addition to (stacks with) other damage modifiers. ]] -TOOLTIP_INC_CRIT_POWER = [[#GOLD#Critical multiplier#LAST# +TOOLTIP_INC_CRIT_POWER = _t[[#GOLD#Critical multiplier#LAST# All critical hits (melee, spells, ...) do this much damage compared to normal. ]] -TOOLTIP_RESIST_DAMAGE = [[#GOLD#Damage resistance#LAST# +TOOLTIP_RESIST_DAMAGE = _t[[#GOLD#Damage resistance#LAST# Whenever you take damage, the percent resistance you have to its type, if any, is checked. The damage is reduced by this percentage (which may be partially negated by the attacker's Damage Penetration) before being applied. Your effective resistance can never be higher than your resistance cap and negative resistances increase the damage you recieve (up to +100%). ]] -TOOLTIP_RESIST_ALL = [[#GOLD#Damage resistance: all#LAST# +TOOLTIP_RESIST_ALL = _t[[#GOLD#Damage resistance: all#LAST# All damage you receive, through any means, is decreased by this percentage. This stacks (multiplicatively) with individual damage type resistances up to their respective caps. (So 20% resistance: All + 50% resistance: Fire = 60% total resistance to Fire.) ]] -TOOLTIP_RESIST_ABSOLUTE = [[#GOLD#Damage resistance: absolute#LAST# +TOOLTIP_RESIST_ABSOLUTE = _t[[#GOLD#Damage resistance: absolute#LAST# All damage you receive, through any means, is decreased by this percentage. This is applied after normal damage resistance and is not affected by resistance penetration. ]] -TOOLTIP_RESIST = [[#GOLD#Damage resistance: specific#LAST# +TOOLTIP_RESIST = _t[[#GOLD#Damage resistance: specific#LAST# All damage of this type that you receive, through any means, is reduced by this percentage. ]] -TOOLTIP_RESIST_SPEED = [[#GOLD#Damage resistance: by speed#LAST# +TOOLTIP_RESIST_SPEED = _t[[#GOLD#Damage resistance: by speed#LAST# All damage you receive, through any means, is decreased by this percentage, which increases as your total movement speed (global times movement) decreases. This is applied after normal damage type resistances. ]] -TOOLTIP_RESIST_DAMAGE_ACTOR = [[#GOLD#Damage resistance: creature type#LAST# +TOOLTIP_RESIST_DAMAGE_ACTOR = _t[[#GOLD#Damage resistance: creature type#LAST# All damage you receive from creatures of this type, through any means, is decreased by this percentage. This is applied separately to (stacks with) normal resistances. ]] -TOOLTIP_AFFINITY_ALL = [[#GOLD#Damage affinity: all#LAST# +TOOLTIP_AFFINITY_ALL = _t[[#GOLD#Damage affinity: all#LAST# All damage you receive, through any means, also heals you for this percentage of the damage. This stacks with individual damage type affinities. Important: Affinity healing happens after damage has been taken, it can not prevent death. ]] -TOOLTIP_AFFINITY = [[#GOLD#Damage affinity: specific#LAST# +TOOLTIP_AFFINITY = _t[[#GOLD#Damage affinity: specific#LAST# All damage of this type that you receive, through any means, also heals you for this percentage of the damage. Important: Affinity healing happens after damage has been taken, it can not prevent death. ]] -TOOLTIP_STATUS_IMMUNE = [[#GOLD#Status resistance#LAST# +TOOLTIP_STATUS_IMMUNE = _t[[#GOLD#Status resistance#LAST# Most bad status effects can be avoided by having an appropriate immunity, represented by a percent chance to completely avoid the effect in question. This chance is applied in addition to any saving throws or other checks that may apply. ]] -TOOLTIP_SPECIFIC_IMMUNE = [[#GOLD#Effect resistance chance#LAST# +TOOLTIP_SPECIFIC_IMMUNE = _t[[#GOLD#Effect resistance chance#LAST# This represents your chance to completely resist this specific effect. ]] -TOOLTIP_STUN_IMMUNE = [[#GOLD#Stun immunity chance#LAST# +TOOLTIP_STUN_IMMUNE = _t[[#GOLD#Stun immunity chance#LAST# This represents your chance to completely avoid being stunned, dazed, or frozen. ]] -TOOLTIP_ANOMALY_IMMUNE = [[#GOLD#Anomaly immunity chance#LAST# +TOOLTIP_ANOMALY_IMMUNE = _t[[#GOLD#Anomaly immunity chance#LAST# This represents your chance to avoid most chronomatic anomaly effects. ]] -TOOLTIP_INSTAKILL_IMMUNE = [[#GOLD#Instant death resistance#LAST# +TOOLTIP_INSTAKILL_IMMUNE = _t[[#GOLD#Instant death resistance#LAST# This represents your chance to avoid being instantly killed, severely incapacitated, or controlled by certain abilities. ]] -TOOLTIP_NEGATIVE_STATUS_IMMUNE = [[#GOLD#Negative status effect immunity chance#LAST# +TOOLTIP_NEGATIVE_STATUS_IMMUNE = _t[[#GOLD#Negative status effect immunity chance#LAST# This represents your chance to completely avoid ANY persistent bad effects applied to you from others. ]] -TOOLTIP_NEGATIVE_MENTAL_STATUS_IMMUNE = [[#GOLD#Negative mental effect immunity chance#LAST# +TOOLTIP_NEGATIVE_MENTAL_STATUS_IMMUNE = _t[[#GOLD#Negative mental effect immunity chance#LAST# This represents your chance to completely avoid ANY persistent bad mental effects applied to you from others. ]] -TOOLTIP_NEGATIVE_PHYSICAL_STATUS_IMMUNE = [[#GOLD#Negative physical effect immunity chance#LAST# +TOOLTIP_NEGATIVE_PHYSICAL_STATUS_IMMUNE = _t[[#GOLD#Negative physical effect immunity chance#LAST# This represents your chance to completely avoid ANY persistent bad physical effects applied to you from others. ]] -TOOLTIP_NEGATIVE_SPELL_STATUS_IMMUNE = [[#GOLD#Negative magical effect immunity chance#LAST# +TOOLTIP_NEGATIVE_SPELL_STATUS_IMMUNE = _t[[#GOLD#Negative magical effect immunity chance#LAST# This represents your chance to completely avoid ANY persistent bad magical effects applied to you from others. ]] -TOOLTIP_ON_HIT_DAMAGE = [[#GOLD#Damage when hit#LAST# +TOOLTIP_ON_HIT_DAMAGE = _t[[#GOLD#Damage when hit#LAST# Each time a creature hits you with a melee attack, it will suffer damage or other effects. ]] -TOOLTIP_MELEE_PROJECT = [[#GOLD#Additional Melee Damage#LAST# +TOOLTIP_MELEE_PROJECT = _t[[#GOLD#Additional Melee Damage#LAST# Each time you strike a creature with a melee attack, you will deal additional damage or other effects. ]] -TOOLTIP_MELEE_PROJECT_INNATE = TOOLTIP_MELEE_PROJECT..[[ +TOOLTIP_MELEE_PROJECT_INNATE = TOOLTIP_MELEE_PROJECT.._t[[ This is separate from any special damage of your weapon. ]] -TOOLTIP_RANGED_PROJECT = [[#GOLD#Additional Ranged Damage#LAST# +TOOLTIP_RANGED_PROJECT = _t[[#GOLD#Additional Ranged Damage#LAST# Each time you strike a creature with a ranged attack, you will deal additional damage or other effects. ]] -TOOLTIP_RANGED_PROJECT_INNATE = TOOLTIP_RANGED_PROJECT..[[ +TOOLTIP_RANGED_PROJECT_INNATE = TOOLTIP_RANGED_PROJECT.._t[[ This is separate from any special damage of your weapon or ammo. ]] -TOOLTIP_RESISTS_PEN_ALL = [[#GOLD#Damage penetration: all#LAST# +TOOLTIP_RESISTS_PEN_ALL = _t[[#GOLD#Damage penetration: all#LAST# Reduces the amount of effective resistance of your foes to any damage you deal by this percent. If you have 50% penetration against a creature with 50% resistance it will have an effective resistance of 25%. This stacks with individual damage type penetrations. You can never have more than 70% penetration. ]] -TOOLTIP_RESISTS_PEN = [[#GOLD#Damage penetration: specific#LAST# +TOOLTIP_RESISTS_PEN = _t[[#GOLD#Damage penetration: specific#LAST# Reduces the effective resistance of your foes to all damage of this type you deal by this percent. If you have 50% penetration against a creature with 50% resistance it will have an effective resistance of 25%. You can never have more than 70% penetration. ]] -TOOLTIP_FLAT_RESIST = [[#GOLD#Flat resistances#LAST# +TOOLTIP_FLAT_RESIST = _t[[#GOLD#Flat resistances#LAST# Reduces each hit of a certain damage type (or all) by this amount. ]] ------------------------------------------------------------- -- Misc ------------------------------------------------------------- -TOOLTIP_ESP = [[#GOLD#Telepathy#LAST# +TOOLTIP_ESP = _t[[#GOLD#Telepathy#LAST# Allows you to sense creatures of the given type(s) even if they are not currently in your line of sight. ]] -TOOLTIP_ESP_RANGE = [[#GOLD#Telepathy range#LAST# +TOOLTIP_ESP_RANGE = _t[[#GOLD#Telepathy range#LAST# Determines the distance up to which you can sense creatures with telepathy. ]] -TOOLTIP_ESP_ALL = [[#GOLD#Telepathy#LAST# +TOOLTIP_ESP_ALL = _t[[#GOLD#Telepathy#LAST# Allows you to sense any creatures even if they are not currently in your line of sight. ]] -TOOLTIP_VISION_LITE = [[#GOLD#Lite radius#LAST# +TOOLTIP_VISION_LITE = _t[[#GOLD#Lite radius#LAST# The maximum distance your lite can light up. Anything further cannot be seen by natural means, unless the place itself is lit. ]] -TOOLTIP_VISION_SIGHT = [[#GOLD#Sight range#LAST# +TOOLTIP_VISION_SIGHT = _t[[#GOLD#Sight range#LAST# How far you can see. This only works within your lite radius, or in lit areas. ]] -TOOLTIP_VISION_INFRA = [[#GOLD#Heightened Senses#LAST# +TOOLTIP_VISION_INFRA = _t[[#GOLD#Heightened Senses#LAST# Special vision (including infravision) that works even in the dark, but only creatures can be seen this way. Only the best ability is used. ]] -TOOLTIP_VISION_STEALTH = [[#GOLD#Stealth#LAST# +TOOLTIP_VISION_STEALTH = _t[[#GOLD#Stealth#LAST# To use stealth one must possess the 'Stealth' talent. Stealth allows you to try to hide from any creatures that would otherwise see you. Even if they have seen you they will have a harder time hitting you. Any creature can try to see through your stealth. ]] -TOOLTIP_VISION_SEE_STEALTH = [[#GOLD#See stealth#LAST# +TOOLTIP_VISION_SEE_STEALTH = _t[[#GOLD#See stealth#LAST# Your power to see stealthed creatures. The higher it is, the more likely you are to see them (based on their own stealth score). ]] -TOOLTIP_VISION_INVISIBLE = [[#GOLD#Invisibility#LAST# +TOOLTIP_VISION_INVISIBLE = _t[[#GOLD#Invisibility#LAST# Invisible creatures are magically removed from the sight of all others. They can only be see by creatures that can see invisible. ]] -TOOLTIP_VISION_SEE_INVISIBLE = [[#GOLD#See invisible#LAST# +TOOLTIP_VISION_SEE_INVISIBLE = _t[[#GOLD#See invisible#LAST# Your power to see invisible creatures. The higher it is, the more likely you are to see them (based on their own invisibility score). If you do not have any see invisible score you will never be able to see invisible creatures. ]] -TOOLTIP_SEE_TRAPS = [[#GOLD#Detect Traps#LAST# +TOOLTIP_SEE_TRAPS = _t[[#GOLD#Detect Traps#LAST# Your power to find hidden traps. The higher it is, the more likely you are to notice a trap before setting it off (based on its own detection score). If you do not have any detect traps score, you can not detect traps without triggering them. ]] -TOOLTIP_ANTIMAGIC_USER = [[#GOLD#Antimagic User#LAST# +TOOLTIP_ANTIMAGIC_USER = _t[[#GOLD#Antimagic User#LAST# Dedicated to opposing and destroying magical and arcane influence in the world. The use of spells or arcane-powered equipment is impossible. ]] diff --git a/game/modules/tome/class/interface/WorldAchievements.lua b/game/modules/tome/class/interface/WorldAchievements.lua index 76c85e9f63891d8748ad9596b0f6d85a66e13a68..49fc9e8e2739ae6b9829215129f782918934a846 100644 --- a/game/modules/tome/class/interface/WorldAchievements.lua +++ b/game/modules/tome/class/interface/WorldAchievements.lua @@ -45,7 +45,8 @@ end function _M:newAchievement(t) t.id = t.id or t.name t.id = t.id:upper():gsub("[ ]", "_") - t.category = t.category or "Maj'Eyal" + t.name = _t(t.name) + t.category = t.category or _t"Maj'Eyal" findTile(t) WA.newAchievement(self, t) @@ -57,7 +58,7 @@ function _M:newAchievement(t) -- Normal local t2 = table.clone(t) t2.id = "NORMAL_ROGUELIKE_"..t2.id - t2.name = t2.name.." (Roguelike)" + t2.name = ("%s (Roguelike)"):tformat(t2.name) t2.difficulty = DIFFICULTY_NORMAL t2.permadeath = PERMADEATH_ONE findTile(t2) @@ -66,7 +67,7 @@ function _M:newAchievement(t) -- Exploration local t3 = table.clone(t) t3.id = "EXPLORATION_"..t3.id - t3.name = t3.name.." (Exploration mode)" + t3.name = ("%s (Exploration mode)"):tformat(t3.name) t3.permadeath = PERMADEATH_INFINITE findTile(t3) WA.newAchievement(self, t3) @@ -78,7 +79,7 @@ function _M:newAchievement(t) -- Nightmare local t4 = table.clone(t) t4.id = "NIGHTMARE_ADVENTURE_"..t4.id - t4.name = t4.name.." (Nightmare (Adventure) difficulty)" + t4.name = ("%s (Nightmare (Adventure) difficulty)"):tformat(t4.name) t4.difficulty = DIFFICULTY_NIGHTMARE t4.permadeath = PERMADEATH_MANY t4.autogrant = {t.id} @@ -87,7 +88,7 @@ function _M:newAchievement(t) local t5 = table.clone(t) t5.id = "NIGHTMARE_"..t5.id - t5.name = t5.name.." (Nightmare (Roguelike) difficulty)" + t5.name = ("%s (Nightmare (Roguelike) difficulty)"):tformat(t5.name) t5.difficulty = DIFFICULTY_NIGHTMARE t5.permadeath = PERMADEATH_ONE t5.autogrant = {t4.id, t2.id} @@ -97,7 +98,7 @@ function _M:newAchievement(t) -- Insane local t6 = table.clone(t) t6.id = "INSANE_ADVENTURE_"..t6.id - t6.name = t6.name.." (Insane (Adventure) difficulty)" + t6.name = ("%s (Insane (Adventure) difficulty)"):tformat(t6.name) t6.difficulty = DIFFICULTY_INSANE t6.permadeath = PERMADEATH_MANY t6.autogrant = {t4.id} @@ -106,7 +107,7 @@ function _M:newAchievement(t) local t7 = table.clone(t) t7.id = "INSANE_"..t7.id - t7.name = t7.name.." (Insane (Roguelike) difficulty)" + t7.name = ("%s (Insane (Roguelike) difficulty)"):tformat(t7.name) t7.difficulty = DIFFICULTY_INSANE t7.permadeath = PERMADEATH_ONE t7.autogrant = {t6.id, t5.id} @@ -116,7 +117,7 @@ function _M:newAchievement(t) -- Madness local t8 = table.clone(t) t8.id = "MADNESS_ADVENTURE_"..t8.id - t8.name = t8.name.." (Madness (Adventure) difficulty)" + t8.name = ("%s (Madness (Adventure) difficulty)"):tformat(t8.name) t8.difficulty = DIFFICULTY_MADNESS t8.permadeath = PERMADEATH_MANY t8.autogrant = {t6.id} @@ -125,7 +126,7 @@ function _M:newAchievement(t) local t9 = table.clone(t) t9.id = "MADNESS_"..t9.id - t9.name = t9.name.." (Madness (Roguelike) difficulty)" + t9.name = ("%s (Madness (Roguelike) difficulty)"):tformat(t9.name) t9.difficulty = DIFFICULTY_MADNESS t9.permadeath = PERMADEATH_ONE t9.autogrant = {t8.id, t7.id} diff --git a/game/modules/tome/class/uiset/Classic.lua b/game/modules/tome/class/uiset/Classic.lua index d484ef73748c64b3718ea425b54577b2f77bdb5c..7b4fa09c4470a277263cd4ff3510121220d9f365 100644 --- a/game/modules/tome/class/uiset/Classic.lua +++ b/game/modules/tome/class/uiset/Classic.lua @@ -29,6 +29,7 @@ local LogFlasher = require "engine.LogFlasher" local FlyingText = require "engine.FlyingText" local Tooltip = require "mod.class.Tooltip" local Dialog = require "engine.ui.Dialog" +local FontPackage = require "engine.FontPackage" module(..., package.seeall, class.inherit(UISet)) @@ -38,17 +39,8 @@ end function _M:activate() local size, size_mono, font, font_mono, font_mono_h, font_h - if config.settings.tome.fonts.type == "fantasy" then - size = ({normal=16, small=14, big=18})[config.settings.tome.fonts.size] - size_mono = ({normal=14, small=10, big=16})[config.settings.tome.fonts.size] - font = "/data/font/USENET_.ttf" - font_mono = "/data/font/SVBasicManual.ttf" - else - size = ({normal=12, small=10, big=14})[config.settings.tome.fonts.size] - size_mono = ({normal=12, small=10, big=14})[config.settings.tome.fonts.size] - font = "/data/font/Vera.ttf" - font_mono = "/data/font/VeraMono.ttf" - end + local font, size = FontPackage:getFont("classic") + local font_mono, size_mono = FontPackage:getFont("classic_mono") local f = core.display.newFont(font, size) font_h = f:lineSkip() f = core.display.newFont(font_mono, size_mono) @@ -260,46 +252,46 @@ function _M:mouseIcon(bx, by) key = game.key.binds_remap[virtual] ~= nil and game.key.binds_remap[virtual][1] or game.key:findBoundKeys(virtual) key = (key ~= nil and game.key:formatKeyString(key) or "unbound"):capitalize() if (not game.show_npc_list) then - game:tooltipDisplayAtMap(game.w, game.h, "Displaying talents (#{bold}##GOLD#"..key.."#LAST##{normal}#)\nToggle for creature display") + game:tooltipDisplayAtMap(game.w, game.h, ("Displaying talents (#{bold}##GOLD#%s#LAST##{normal}#)\nToggle for creature display"):tformat(key)) else - game:tooltipDisplayAtMap(game.w, game.h, "Displaying creatures (#{bold}##GOLD#"..key.."#LAST##{normal}#)\nToggle for talent display#") + game:tooltipDisplayAtMap(game.w, game.h, ("Displaying creatures (#{bold}##GOLD#%s#LAST##{normal}#)\nToggle for talent display#"):tformat(key)) end elseif bx < 2*_talents_icon_w then virtual = "SHOW_INVENTORY" key = game.key.binds_remap[virtual] ~= nil and game.key.binds_remap[virtual][1] or game.key:findBoundKeys(virtual) key = (key ~= nil and game.key:formatKeyString(key) or "unbound"):capitalize() if (key == "I") then - game:tooltipDisplayAtMap(game.w, game.h, "#{bold}##GOLD#I#LAST##{normal}#nventory") + game:tooltipDisplayAtMap(game.w, game.h, _t"#{bold}##GOLD#I#LAST##{normal}#nventory") else - game:tooltipDisplayAtMap(game.w, game.h, "Inventory (#{bold}##GOLD#"..key.."#LAST##{normal}#)") + game:tooltipDisplayAtMap(game.w, game.h, ("Inventory (#{bold}##GOLD#%s#LAST##{normal}#)"):tformat(key)) end elseif bx < 3*_talents_icon_w then virtual = "SHOW_CHARACTER_SHEET" key = game.key.binds_remap[virtual] ~= nil and game.key.binds_remap[virtual][1] or game.key:findBoundKeys(virtual) key = (key ~= nil and game.key:formatKeyString(key) or "unbound"):capitalize() if (key == "C") then - game:tooltipDisplayAtMap(game.w, game.h, "#{bold}##GOLD#C#LAST##{normal}#haracter Sheet") + game:tooltipDisplayAtMap(game.w, game.h, _t"#{bold}##GOLD#C#LAST##{normal}#haracter Sheet") else - game:tooltipDisplayAtMap(game.w, game.h, "Character Sheet (#{bold}##GOLD#"..key.."#LAST##{normal}#)") + game:tooltipDisplayAtMap(game.w, game.h, ("Character Sheet (#{bold}##GOLD#%s#LAST##{normal}#)"):tformat(key)) end elseif bx < 4*_talents_icon_w then virtual = "EXIT" key = game.key.binds_remap[virtual] ~= nil and game.key.binds_remap[virtual][1] or game.key:findBoundKeys(virtual) key = (key ~= nil and game.key:formatKeyString(key) or "unbound"):capitalize() - game:tooltipDisplayAtMap(game.w, game.h, "Main menu (#{bold}##GOLD#"..key.."#LAST##{normal}#)") + game:tooltipDisplayAtMap(game.w, game.h, ("Main menu (#{bold}##GOLD#%s#LAST##{normal}#)"):tformat(key)) elseif bx < 5*_talents_icon_w then virtual = "SHOW_MESSAGE_LOG" key = game.key.binds_remap[virtual] ~= nil and game.key.binds_remap[virtual][1] or game.key:findBoundKeys(virtual) key = (key ~= nil and game.key:formatKeyString(key) or "unbound"):capitalize() - game:tooltipDisplayAtMap(game.w, game.h, "Show message/chat log (#{bold}##GOLD#"..key.."#LAST##{normal}#)") + game:tooltipDisplayAtMap(game.w, game.h, ("Show message/chat log (#{bold}##GOLD#%s#LAST##{normal}#)"):tformat(key)) elseif bx < 6*_talents_icon_w then virtual = "TOGGLE_BUMP_ATTACK" key = game.key.binds_remap[virtual] ~= nil and game.key.binds_remap[virtual][1] or game.key:findBoundKeys(virtual) key = (key ~= nil and game.key:formatKeyString(key) or "unbound"):capitalize() if (not config.settings.tome.actor_based_movement_mode and not self.bump_attack_disabled) or (config.settings.tome.actor_based_movement_mode and not game.player.bump_attack_disabled) then - game:tooltipDisplayAtMap(game.w, game.h, "Movement: #LIGHT_GREEN#Default#LAST# (#{bold}##GOLD#"..key.."#LAST##{normal}#)\nToggle for passive mode") + game:tooltipDisplayAtMap(game.w, game.h, ("Movement: #LIGHT_GREEN#Default#LAST# (#{bold}##GOLD#%s#LAST##{normal}#)\nToggle for passive mode"):tformat(key)) else - game:tooltipDisplayAtMap(game.w, game.h, "Movement: #LIGHT_RED#Passive#LAST# (#{bold}##GOLD#"..key.."#LAST##{normal}#)\nToggle for default mode") + game:tooltipDisplayAtMap(game.w, game.h, ("Movement: #LIGHT_RED#Passive#LAST# (#{bold}##GOLD#%s#LAST##{normal}#)\nToggle for default mode"):tformat(key)) end end else @@ -310,7 +302,7 @@ function _M:mouseIcon(bx, by) virtual2 = "MTXN_USE" key2 = game.key.binds_remap[virtual2] ~= nil and game.key.binds_remap[virtual2][1] or game.key:findBoundKeys(virtual2) key2 = (key2 ~= nil and game.key:formatKeyString(key2) or "unbound"):capitalize() - game:tooltipDisplayAtMap(game.w, game.h, "Cosmetics & Events shop (#{bold}##GOLD#"..key.."#LAST##{normal}#, #{bold}##GOLD#"..key2.."#LAST##{normal}#)") + game:tooltipDisplayAtMap(game.w, game.h, ("Cosmetics & Events shop (#{bold}##GOLD#%s#LAST##{normal}#, #{bold}##GOLD#%s#LAST##{normal}#)"):tformat(key, key2)) end end end @@ -370,7 +362,7 @@ function _M:setupMouse(mouse) self.hotkeys_display:onMouse(button, mx, my, event == "button", function(text) text = text:toTString() - text:add(true, "---", true, {"font","italic"}, {"color","GOLD"}, "Left click to use", true, "Right click to configure", true, "Press 'm' to setup", {"color","LAST"}, {"font","normal"}) + text:add(true, "---", true, {"font","italic"}, {"color","GOLD"}, _t"Left click to use", true, _t"Right click to configure", true, _t"Press 'm' to setup", {"color","LAST"}, {"font","normal"}) game:tooltipDisplayAtMap(game.w, game.h, text) end, function(i, hk) @@ -379,7 +371,7 @@ function _M:setupMouse(mouse) d:use({talent=hk[2], name=game.player:getTalentFromId(hk[2]).name}, "right") return true elseif button == "right" and hk and hk[1] == "inventory" then - Dialog:yesnoPopup("Unbind "..hk[2], "Remove this object from your hotkeys?", function(ret) if ret then + Dialog:yesnoPopup(("Unbind %s"):tformat(hk[2]), _t"Remove this object from your hotkeys?", function(ret) if ret then for i = 1, 12 * game.player.nb_hotkey_pages do if game.player.hotkey[i] and game.player.hotkey[i][1] == "inventory" and game.player.hotkey[i][2] == hk[2] then game.player.hotkey[i] = nil end end @@ -415,25 +407,25 @@ function _M:setupMouse(mouse) local str = tstring{{"color","GOLD"}, {"font","bold"}, user.name, {"color","LAST"}, {"font","normal"}, true} if user.donator and user.donator ~= "none" then - local text, color = "Donator", colors.WHITE - if user.status and user.status == 'dev' then text, color = "Developer", colors.CRIMSON - elseif user.status and user.status == 'mod' then text, color = "Moderator / Helper", colors.GOLD - elseif user.donator == "oneshot" then text, color = "Donator", colors.LIGHT_GREEN - elseif user.donator == "recurring" then text, color = "Recurring Donator", colors.LIGHT_BLUE end + local text, color = _t"Donator", colors.WHITE + if user.status and user.status == 'dev' then text, color = _t"Developer", colors.CRIMSON + elseif user.status and user.status == 'mod' then text, color = _t"Moderator / Helper", colors.GOLD + elseif user.donator == "oneshot" then text, color = _t"Donator", colors.LIGHT_GREEN + elseif user.donator == "recurring" then text, color = _t"Recurring Donator", colors.LIGHT_BLUE end str:add({"color",unpack(colors.simple(color))}, text, {"color", "LAST"}, true) end - str:add({"color","ANTIQUE_WHITE"}, "Playing: ", {"color", "LAST"}, user.current_char, true) - str:add({"color","ANTIQUE_WHITE"}, "Game: ", {"color", "LAST"}, user.module, "(", user.valid, ")",true) + str:add({"color","ANTIQUE_WHITE"}, _t"Playing: ", {"color", "LAST"}, user.current_char, true) + str:add({"color","ANTIQUE_WHITE"}, _t"Game: ", {"color", "LAST"}, user.module, "(", user.valid, ")",true) local extra = {} if item.extra_data and item.extra_data.mode == "tooltip" then - local rstr = tstring{item.extra_data.tooltip, true, "---", true, "Linked by: "} + local rstr = tstring{item.extra_data.tooltip, true, "---", true, _t"Linked by: "} rstr:merge(str) extra.log_str = rstr else extra.log_str = str if button == "right" and event == "button" then - extra.add_map_action = { name="Show chat user", fct=function() profile.chat:showUserInfo(user.login) end } + extra.add_map_action = { name=_t"Show chat user", fct=function() profile.chat:showUserInfo(user.login) end } end end game.mouse:delegate(button, mx, my, xrel, yrel, nil, nil, event, "playmap", extra) diff --git a/game/modules/tome/class/uiset/ClassicPlayerDisplay.lua b/game/modules/tome/class/uiset/ClassicPlayerDisplay.lua index 015d8e19c0eb6d985eb4460e04230061a5d1a8ab..358e8bf5bcfebc303ae8d38413756fd3baafc198 100644 --- a/game/modules/tome/class/uiset/ClassicPlayerDisplay.lua +++ b/game/modules/tome/class/uiset/ClassicPlayerDisplay.lua @@ -137,7 +137,7 @@ end function _M:makePortrait(a, current, x, y) local def = game.party.members[a] - self:mouseTooltip("#GOLD##{bold}#"..a.name.."\n#WHITE##{normal}#Life: "..math.floor(100 * a.life / a.max_life).."%\nLevel: "..a.level.."\n"..def.title, 40, 40, x, y, function() + self:mouseTooltip(("#GOLD##{bold}#%s\n#WHITE##{normal}#Life: %d%%\nLevel: %d\n%s"):tformat(a.name, math.floor(100 * a.life / a.max_life), a.level, def.title), 40, 40, x, y, function() if def.control == "full" then game.party:select(a) end @@ -174,16 +174,16 @@ function _M:handleEffect(eff_id, e, p, ex, h) local dur = p.dur + 1 local name = e.desc local desc = nil - local eff_subtype = table.concat(table.keys(e.subtype), "/") + local eff_subtype = table.concat(table.ts(table.keys(e.subtype), "effect subtype"), "/") if e.display_desc then name = e.display_desc(self, p) end if p.save_string and p.amount_decreased and p.maximum and p.total_dur then - desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):format(name, e.type, eff_subtype)..e.long_desc(player, p).." "..("%s reduced the duration of this effect by %d turns, from %d to %d."):format(p.save_string, p.amount_decreased, p.maximum, p.total_dur) + desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):tformat(name, _t(e.type), eff_subtype)..e.long_desc(player, p).." "..("%s reduced the duration of this effect by %d turns, from %d to %d."):tformat(p.save_string, p.amount_decreased, p.maximum, p.total_dur) else - desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):format(name, e.type, eff_subtype)..e.long_desc(player, p) + desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):tformat(name, _t(e.type), eff_subtype)..e.long_desc(player, p) end local remove_fct = function(button) if button == "right" then - Dialog:yesnoPopup(name, "Really cancel "..name.."?", function(ret) + Dialog:yesnoPopup(name, ("Really cancel %s?"):tformat(name), function(ret) if ret then player:removeEffect(eff_id) end @@ -258,21 +258,21 @@ function _M:display() local fw = self.font:size("LEVELUP!") self:makeTexture("LEVELUP!", self.w - fw, h, colors.VIOLET.r, colors.VIOLET.g, colors.VIOLET.b, fw) self.items[#self.items].glow = true - self:mouseTooltip(("#GOLD##{bold}#%s\n#WHITE##{normal}#Unused stats: %d\nUnused class talents: %d\nUnused generic talents: %d\nUnused categories: %d"):format(player.name, player.unused_stats, player.unused_talents, player.unused_generics, player.unused_talents_types), self.w, self.font_h, 0, h, function() + self:mouseTooltip(("#GOLD##{bold}#%s\n#WHITE##{normal}#Unused stats: %d\nUnused class talents: %d\nUnused generic talents: %d\nUnused categories: %d"):tformat(player.name, player.unused_stats, player.unused_talents, player.unused_generics, player.unused_talents_types), self.w, self.font_h, 0, h, function() game.key:triggerVirtual("LEVELUP") end) h = h + self.font_h end self.font:setStyle("bold") - self:makeTexture(("%s#{normal}#"):format(player.name), 0, h, colors.GOLD.r, colors.GOLD.g, colors.GOLD.b, self.w) h = h + self.font_h + self:makeTexture(("%s#{normal}#"):tformat(player.name), 0, h, colors.GOLD.r, colors.GOLD.g, colors.GOLD.b, self.w) h = h + self.font_h self.font:setStyle("normal") - self:mouseTooltip(self.TOOLTIP_LEVEL, self:makeTexture(("Level / Exp: #00ff00#%s / %2d%%"):format(player.level, 100 * cur_exp / max_exp), x, h, 255, 255, 255)) h = h + self.font_h - self:mouseTooltip(self.TOOLTIP_GOLD, self:makeTexture(("Gold: #00ff00#%0.2f"):format(player.money or 0), x, h, 255, 255, 255)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_LEVEL, self:makeTexture(("Level / Exp: #00ff00#%s / %2d%%"):tformat(player.level, 100 * cur_exp / max_exp), x, h, 255, 255, 255)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_GOLD, self:makeTexture(("Gold: #00ff00#%0.2f"):tformat(player.money or 0), x, h, 255, 255, 255)) h = h + self.font_h --Display attack, defense, spellpower, mindpower, and saves. - local attack_stats = {{"combatAttack", "TOOLTIP_COMBAT_ATTACK", "Accuracy:"}, {"combatPhysicalpower", "TOOLTIP_COMBAT_PHYSICAL_POWER", "P. power:"}, {"combatSpellpower", "TOOLTIP_SPELL_POWER", "S. power:"}, {"combatMindpower", "TOOLTIP_MINDPOWER", "M. power:"}, {"combatDefense", "TOOLTIP_DEFENSE", "Defense:"}, {"combatPhysicalResist", "TOOLTIP_PHYS_SAVE", "P. save:"}, {"combatSpellResist", "TOOLTIP_SPELL_SAVE", "S. save:"}, {"combatMentalResist", "TOOLTIP_MENTAL_SAVE", "M. save:"}} + local attack_stats = {{"combatAttack", "TOOLTIP_COMBAT_ATTACK", _t"Accuracy:"}, {"combatPhysicalpower", "TOOLTIP_COMBAT_PHYSICAL_POWER", _t"P. power:"}, {"combatSpellpower", "TOOLTIP_SPELL_POWER", _t"S. power:"}, {"combatMindpower", "TOOLTIP_MINDPOWER", _t"M. power:"}, {"combatDefense", "TOOLTIP_DEFENSE", _t"Defense:"}, {"combatPhysicalResist", "TOOLTIP_PHYS_SAVE",_t"P. save:"}, {"combatSpellResist", "TOOLTIP_SPELL_SAVE", _t"S. save:"}, {"combatMentalResist", "TOOLTIP_MENTAL_SAVE", _t"M. save:"}} local attack_stat_color = "#FFD700#" local defense_stat_color = "#0080FF#" @@ -287,32 +287,32 @@ function _M:display() h = h + self.font_h if game.level and game.level.turn_counter then - self:makeTexture(("Turns remaining: %d"):format(game.level.turn_counter / 10), x, h, 255, 0, 0) h = h + self.font_h + self:makeTexture(("Turns remaining: %d"):tformat(game.level.turn_counter / 10), x, h, 255, 0, 0) h = h + self.font_h h = h + self.font_h end if player:getAir() < player.max_air then - self:mouseTooltip(self.TOOLTIP_AIR, self:makeTexture(("Air level: %d/%d"):format(player:getAir(), player:getMaxAir()), x, h, 255, 0, 0)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_AIR, self:makeTexture(("Air level: %d/%d"):tformat(player:getAir(), player:getMaxAir()), x, h, 255, 0, 0)) h = h + self.font_h h = h + self.font_h end if player:attr("encumbered") then - self:mouseTooltip(self.TOOLTIP_ENCUMBERED, self:makeTexture(("Encumbered! (%d/%d)"):format(player:getEncumbrance(), player:getMaxEncumbrance()), x, h, 255, 0, 0)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_ENCUMBERED, self:makeTexture(("Encumbered! (%d/%d)"):tformat(player:getEncumbrance(), player:getMaxEncumbrance()), x, h, 255, 0, 0)) h = h + self.font_h h = h + self.font_h end - self:mouseTooltip(self.TOOLTIP_STRDEXCON, self:makeTexture(("Str/Dex/Con: #00ff00#%3d/%3d/%3d"):format(player:getStr(), player:getDex(), player:getCon()), x, h, 255, 255, 255)) h = h + self.font_h - self:mouseTooltip(self.TOOLTIP_MAGWILCUN, self:makeTexture(("Mag/Wil/Cun: #00ff00#%3d/%3d/%3d"):format(player:getMag(), player:getWil(), player:getCun()), x, h, 255, 255, 255)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_STRDEXCON, self:makeTexture(("Str/Dex/Con: #00ff00#%3d/%3d/%3d"):tformat(player:getStr(), player:getDex(), player:getCon()), x, h, 255, 255, 255)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_MAGWILCUN, self:makeTexture(("Mag/Wil/Cun: #00ff00#%3d/%3d/%3d"):tformat(player:getMag(), player:getWil(), player:getCun()), x, h, 255, 255, 255)) h = h + self.font_h h = h + self.font_h - self:mouseTooltip(self.TOOLTIP_LIFE, self:makeTextureBar("#c00000#Life :", nil, player.life, player.max_life, player.life_regen * util.bound((player.healing_factor or 1), 0, 2.5), x, h, 255, 255, 255, colors.DARK_RED, colors.VERY_DARK_RED)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_LIFE, self:makeTextureBar(_t"#c00000#Life :", nil, player.life, player.max_life, player.life_regen * util.bound((player.healing_factor or 1), 0, 2.5), x, h, 255, 255, 255, colors.DARK_RED, colors.VERY_DARK_RED)) h = h + self.font_h local shield, max_shield = 0, 0 if player:attr("time_shield") then shield = shield + player.time_shield_absorb max_shield = max_shield + player.time_shield_absorb_max end if player:attr("damage_shield") then shield = shield + player.damage_shield_absorb max_shield = max_shield + player.damage_shield_absorb_max end if player:attr("displacement_shield") then shield = shield + player.displacement_shield max_shield = max_shield + player.displacement_shield_max end if max_shield > 0 then - self:mouseTooltip(self.TOOLTIP_DAMAGE_SHIELD, self:makeTextureBar("#WHITE#Shield:", nil, shield, max_shield, nil, x, h, 255, 255, 255, {r=colors.GREY.r / 3, g=colors.GREY.g / 3, b=colors.GREY.b / 3}, {r=colors.GREY.r / 6, g=colors.GREY.g / 6, b=colors.GREY.b / 6})) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_DAMAGE_SHIELD, self:makeTextureBar(_t"#WHITE#Shield:", nil, shield, max_shield, nil, x, h, 255, 255, 255, {r=colors.GREY.r / 3, g=colors.GREY.g / 3, b=colors.GREY.b / 3}, {r=colors.GREY.r / 6, g=colors.GREY.g / 6, b=colors.GREY.b / 6})) h = h + self.font_h end -- Resources @@ -322,7 +322,7 @@ function _M:display() if not tooltip then tooltip = ([[#GOLD#%s#LAST# %s -]]):format(res_def.name, res_def.description or "no description") +]]):tformat(res_def.name, res_def.description or _t"no description") end -- get resource color local res_color = res_def.color or "#WHITE#" @@ -335,7 +335,7 @@ function _M:display() r, g, b = r*255, g*255, b*255 end local status_text = res_def.status_text and res_def.status_text(player) - self:mouseTooltip(tooltip, self:makeTextureBar((res_def.color or "#WHITE#")..("%-8.8s:"):format(res_def.name), status_text, player[res_def.getFunction](player), player[res_def.getMaxFunction](player) or 100, not status_text and player[res_def.regen_prop] or 0, x, h, + self:mouseTooltip(tooltip, self:makeTextureBar((res_def.color or "#WHITE#")..("%-8.8s:"):tformat(res_def.name), status_text, player[res_def.getFunction](player), player[res_def.getMaxFunction](player) or 100, not status_text and player[res_def.regen_prop] or 0, x, h, 255, 255, 255, {r=r/2, g=g/2, b=b/2}, {r=r/5, g=g/5, b=b/5} @@ -346,7 +346,7 @@ function _M:display() -- special resources if player:knowTalent(player.T_FEEDBACK_POOL) then - self:mouseTooltip(self.TOOLTIP_FEEDBACK, self:makeTextureBar("#7fffd4#Feedback:", nil, player:getFeedback(), player:getMaxFeedback(), player:getFeedbackDecay(), x, h, 255, 255, 255, + self:mouseTooltip(self.TOOLTIP_FEEDBACK, self:makeTextureBar(_t"#7fffd4#Feedback:", nil, player:getFeedback(), player:getMaxFeedback(), player:getFeedbackDecay(), x, h, 255, 255, 255, {r=colors.YELLOW.r / 2, g=colors.YELLOW.g / 2, b=colors.YELLOW.b / 2}, {r=colors.YELLOW.r / 5, g=colors.YELLOW.g / 5, b=colors.YELLOW.b / 5} )) h = h + self.font_h @@ -354,12 +354,12 @@ function _M:display() if (player.unnatural_body_heal or 0) > 0 and player:knowTalent(player.T_UNNATURAL_BODY) then local t = player:getTalentFromId(player.T_UNNATURAL_BODY) local regen = t.getRegenRate(player, t) - self:mouseTooltip(self.TOOLTIP_UNNATURAL_BODY, self:makeTextureBar("#c00000#Un.body :", ("%0.1f (%0.1f/turn)"):format(player.unnatural_body_heal, math.min(regen, player.unnatural_body_heal)), regen, player.unnatural_body_heal, nil, x, h, 255, 255, 255, colors.DARK_RED, colors.VERY_DARK_RED)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_UNNATURAL_BODY, self:makeTextureBar(_t"#c00000#Un.body :", ("%0.1f (%0.1f/turn)"):tformat(player.unnatural_body_heal, math.min(regen, player.unnatural_body_heal)), regen, player.unnatural_body_heal, nil, x, h, 255, 255, 255, colors.DARK_RED, colors.VERY_DARK_RED)) h = h + self.font_h end if player.is_fortress then local q = game:getPlayer(true):hasQuest("shertul-fortress") if q then - self:mouseTooltip(self.TOOLTIP_FORTRESS_ENERGY, self:makeTextureBar("#LIGHT_GREEN#Fortress:", "%d", q.shertul_energy, 1000, 0, x, h, 255, 255, 255, + self:mouseTooltip(self.TOOLTIP_FORTRESS_ENERGY, self:makeTextureBar(_t"#LIGHT_GREEN#Fortress:", "%d", q.shertul_energy, 1000, 0, x, h, 255, 255, 255, {r=colors.LIGHT_GREEN.r / 2, g=colors.LIGHT_GREEN.g / 2, b=colors.LIGHT_GREEN.b / 2}, {r=colors.LIGHT_GREEN.r / 5, g=colors.LIGHT_GREEN.g / 5, b=colors.LIGHT_GREEN.b / 5} )) h = h + self.font_h @@ -376,15 +376,15 @@ function _M:display() local ammo = quiver and quiver[1] if ammo then if ammo.type == "alchemist-gem" then - self:mouseTooltip(self.TOOLTIP_COMBAT_AMMO, self:makeTexture(("#ANTIQUE_WHITE#Ammo : #ffffff#%d"):format(ammo:getNumber()), 0, h, 255, 255, 255)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_COMBAT_AMMO, self:makeTexture(("#ANTIQUE_WHITE#Ammo : #ffffff#%d"):tformat(ammo:getNumber()), 0, h, 255, 255, 255)) h = h + self.font_h else - self:mouseTooltip(self.TOOLTIP_COMBAT_AMMO, self:makeTexture(("#ANTIQUE_WHITE#Ammo : #ffffff#%d/%d"):format(ammo.combat.shots_left, ammo.combat.capacity), 0, h, 255, 255, 255)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_COMBAT_AMMO, self:makeTexture(("#ANTIQUE_WHITE#Ammo : #ffffff#%d/%d"):tformat(ammo.combat.shots_left, ammo.combat.capacity), 0, h, 255, 255, 255)) h = h + self.font_h end end if savefile_pipe.saving then h = h + self.font_h - self:makeTextureBar("Saving:", "%d%%", 100 * savefile_pipe.current_nb / savefile_pipe.total_nb, 100, nil, x, h, colors.YELLOW.r, colors.YELLOW.g, colors.YELLOW.b, + self:makeTextureBar(_t"Saving:", "%d%%", 100 * savefile_pipe.current_nb / savefile_pipe.total_nb, 100, nil, x, h, colors.YELLOW.r, colors.YELLOW.g, colors.YELLOW.b, {r=0x95 / 3, g=0xa2 / 3,b= 0x80 / 3}, {r=0x68 / 6, g=0x72 / 6, b=0x00 / 6} ) @@ -399,7 +399,7 @@ function _M:display() local t = player:getTalentFromId(tid) local displayName = t.name if t.getDisplayName then displayName = t.getDisplayName(player, t, player:isTalentActive(tid)) end - local desc = "#GOLD##{bold}#"..displayName.."#{normal}##WHITE#\n"..tostring(player:getTalentFullDescription(t)) + local desc = ("#GOLD##{bold}#%s#{normal}##WHITE#\n"):tformat(displayName)..tostring(player:getTalentFullDescription(t)) if config.settings.tome.effects_icons and t.display_entity then self:makeEntityIcon(t.display_entity, game.uiset.hotkeys_display_icons.tiles, ex, h, desc, nil, self.icon_yellow) @@ -432,39 +432,39 @@ function _M:display() h = h + self.font_h local arena = game.level.arena if arena.score > world.arena.scores[1].score then - self:makeTexture(("Score(TOP): %d"):format(arena.score), x, h, 255, 255, 100) h = h + self.font_h + self:makeTexture(("Score(TOP): %d"):tformat(arena.score), x, h, 255, 255, 100) h = h + self.font_h else - self:makeTexture(("Score: %d"):format(arena.score), x, h, 255, 255, 255) h = h + self.font_h + self:makeTexture(("Score: %d"):tformat(arena.score), x, h, 255, 255, 255) h = h + self.font_h end if arena.currentWave > world.arena.bestWave then - self:makeTexture(("Wave(TOP) %d"):format(arena.currentWave), x, h, 255, 255, 100) + self:makeTexture(("Wave(TOP) %d"):tformat(arena.currentWave), x, h, 255, 255, 100) elseif arena.currentWave > world.arena.lastScore.wave then - self:makeTexture(("Wave %d"):format(arena.currentWave), x, h, 100, 100, 255) + self:makeTexture(("Wave %d"):tformat(arena.currentWave), x, h, 100, 100, 255) else - self:makeTexture(("Wave %d"):format(arena.currentWave), x, h, 255, 255, 255) + self:makeTexture(("Wave %d"):tformat(arena.currentWave), x, h, 255, 255, 255) end if arena.event > 0 then if arena.event == 1 then - self:makeTexture((" [MiniBoss]"), x + (self.font_w * 13), h, 255, 255, 100) + self:makeTexture((_t" [MiniBoss]"), x + (self.font_w * 13), h, 255, 255, 100) elseif arena.event == 2 then - self:makeTexture((" [Boss]"), x + (self.font_w * 13), h, 255, 0, 255) + self:makeTexture((_t" [Boss]"), x + (self.font_w * 13), h, 255, 0, 255) elseif arena.event == 3 then - self:makeTexture((" [Final]"), x + (self.font_w * 13), h, 255, 10, 15) + self:makeTexture((_t" [Final]"), x + (self.font_w * 13), h, 255, 10, 15) end end h = h + self.font_h if arena.pinch == true then - self:makeTexture(("Bonus: %d (x%.1f)"):format(arena.bonus, arena.bonusMultiplier), x, h, 255, 50, 50) h = h + self.font_h + self:makeTexture(("Bonus: %d (x%.1f)"):tformat(arena.bonus, arena.bonusMultiplier), x, h, 255, 50, 50) h = h + self.font_h else - self:makeTexture(("Bonus: %d (x%.1f)"):format(arena.bonus, arena.bonusMultiplier), x, h, 255, 255, 255) h = h + self.font_h + self:makeTexture(("Bonus: %d (x%.1f)"):tformat(arena.bonus, arena.bonusMultiplier), x, h, 255, 255, 255) h = h + self.font_h end if arena.display then h = h + self.font_h self:makeTexture(arena.display[1], x, h, 255, 0, 255) h = h + self.font_h - self:makeTexture(" VS", x, h, 255, 0, 255) h = h + self.font_h + self:makeTexture(_t" VS", x, h, 255, 0, 255) h = h + self.font_h self:makeTexture(arena.display[2], x, h, 255, 0, 255) h = h + self.font_h else - self:makeTexture("Rank: "..arena.printRank(arena.rank, arena.ranks), x, h, 255, 255, 255) h = h + self.font_h + self:makeTexture(("Rank: %s"):tformat(arena.printRank(arena.rank, arena.ranks)), x, h, 255, 255, 255) h = h + self.font_h end h = h + self.font_h end diff --git a/game/modules/tome/class/uiset/Minimalist.lua b/game/modules/tome/class/uiset/Minimalist.lua index d3de5de70c6b814bf1a9335adafa17bb1d73f20f..25dfb73b4a5614b1c9b6ce6b0f2bf9635498be3b 100644 --- a/game/modules/tome/class/uiset/Minimalist.lua +++ b/game/modules/tome/class/uiset/Minimalist.lua @@ -289,7 +289,7 @@ function _M:initialize_resources() end -- generate default tooltip if needed res_gfx[rname].tooltip = _M["TOOLTIP_"..rname:upper()] or ([[#GOLD#%s#LAST# -%s]]):format(res_def.name, res_def.description or "no description") +%s]]):tformat(res_def.name, res_def.description or _t"no description") end self.res_gfx = res_gfx @@ -307,15 +307,15 @@ function _M:init() self.locked = true self.mhandle_pos = { - player = {x=296, y=73, name="Player Infos"}, - resources = {x=fshat[6] / 2 - move_handle[6], y=0, name="Resources"}, - minimap = {x=208, y=176, name="Minimap"}, - buffs = {x=40 - move_handle[6], y=0, name="Current Effects"}, - party = {x=portrait[6] - move_handle[6], y=0, name="Party Members"}, - gamelog = {x=function(self) return self.logdisplay.w - move_handle[6] end, y=function(self) return self.logdisplay.h - move_handle[6] end, name="Game Log"}, - chatlog = {x=function(self) return profile.chat.w - move_handle[6] end, y=function(self) return profile.chat.h - move_handle[6] end, name="Online Chat Log"}, - hotkeys = {x=function(self) return self.places.hotkeys.w - move_handle[6] end, y=function(self) return self.places.hotkeys.h - move_handle[6] end, name="Hotkeys"}, - mainicons = {x=0, y=0, name="Game Actions"}, + player = {x=296, y=73, name=_t"Player Infos"}, + resources = {x=fshat[6] / 2 - move_handle[6], y=0, name=_t"Resources"}, + minimap = {x=208, y=176, name=_t"Minimap"}, + buffs = {x=40 - move_handle[6], y=0, name=_t"Current Effects"}, + party = {x=portrait[6] - move_handle[6], y=0, name=_t"Party Members"}, + gamelog = {x=function(self) return self.logdisplay.w - move_handle[6] end, y=function(self) return self.logdisplay.h - move_handle[6] end, name=_t"Game Log"}, + chatlog = {x=function(self) return profile.chat.w - move_handle[6] end, y=function(self) return profile.chat.h - move_handle[6] end, name=_t"Online Chat Log"}, + hotkeys = {x=function(self) return self.places.hotkeys.w - move_handle[6] end, y=function(self) return self.places.hotkeys.h - move_handle[6] end, name=_t"Hotkeys"}, + mainicons = {x=0, y=0, name=_t"Game Actions"}, } self:resetPlaces() @@ -358,7 +358,7 @@ end function _M:getMainMenuItems() return { - {"Reset interface positions", function() Dialog:yesnoPopup("Reset UI", "Reset all the interface?", function(ret) if ret then + {_t"Reset interface positions", function() Dialog:yesnoPopup(_t"Reset UI", _t"Reset all the interface?", function(ret) if ret then self:resetPlaces() self:saveSettings() end end) end}, } @@ -579,7 +579,7 @@ function _M:uiMoveResize(what, button, mx, my, xrel, yrel, bx, by, event, mode, mode = mode or "rescale" - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, self.mhandle_pos[what].name.."\n---\nLeft mouse drag&drop to move the frame\nRight mouse drag&drop to scale up/down\nMiddle click to reset to default scale"..(add_text or "")) + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, ("%s\n---\nLeft mouse drag&drop to move the frame\nRight mouse drag&drop to scale up/down\nMiddle click to reset to default scale%s"):tformat(self.mhandle_pos[what].name, (add_text or ""))) if event == "button" and button == "middle" then self.places[what].scale = 1 self:saveSettings() elseif event == "motion" and button == "left" then self.ui_moving = what @@ -696,16 +696,16 @@ function _M:showResourceTooltip(x, y, w, h, id, desc, is_first) list[#list+1] = {name=res_def.name, id=rname} end end - if player:knowTalent(player.T_FEEDBACK_POOL) then list[#list+1] = {name="Feedback", id="feedback"} end - if player.is_fortress and player:hasQuest("shertul-fortress") then list[#list+1] = {name="Fortress Energy", id="fortress"} end + if player:knowTalent(player.T_FEEDBACK_POOL) then list[#list+1] = {name=_t"Feedback", id="feedback"} end + if player.is_fortress and player:hasQuest("shertul-fortress") then list[#list+1] = {name=_t"Fortress Energy", id="fortress"} end - Dialog:listPopup("Display/Hide resources", "Toggle:", list, 300, util.bound((8+#list)*(self.init_font_h+1), 14*(self.init_font_h+1), game.h*.75), function(sel) + Dialog:listPopup(_t"Display/Hide resources", _t"Toggle:", list, 300, util.bound((8+#list)*(self.init_font_h+1), 14*(self.init_font_h+1), game.h*.75), function(sel) if not sel or not sel.id then return end game.player["_hide_resource_"..sel.id] = not game.player["_hide_resource_"..sel.id] end) return end - self:uiMoveResize("resources", button, mx, my, xrel, yrel, bx, by, event, nil, nil, "\nRight click to toggle resources bars visibility") + self:uiMoveResize("resources", button, mx, my, xrel, yrel, bx, by, event, nil, nil, _t"\nRight click to toggle resources bars visibility") return end end @@ -917,7 +917,7 @@ function _M:displayResources(scale, bx, by, a) if not self.res.feedback or self.res.feedback.vc ~= player:getFeedback() or self.res.feedback.vm ~= player:getMaxFeedback() or self.res.feedback.vr ~= player:getFeedbackDecay() then self.res.feedback = { - hidable = "Feedback", + hidable = _t"Feedback", vc = player:getFeedback(), vm = player:getMaxFeedback(), vr = player:getFeedbackDecay(), cur = {core.display.drawStringBlendedNewSurface(font_sha, ("%d/%d"):format(player:getFeedback(), player:getMaxFeedback()), 255, 255, 255):glTexture()}, regen={core.display.drawStringBlendedNewSurface(sfont_sha, ("%+0.2f"):format(-player:getFeedbackDecay()), 255, 255, 255):glTexture()}, @@ -1048,41 +1048,41 @@ function _M:displayResources(scale, bx, by, a) surf[1]:toScreenFull(_x, _y, surf[6], surf[7], surf[2], surf[3], 1, 1, 1, a) end if arena.score > world.arena.scores[1].score then - aprint(px, py, ("Score[1st]: %d"):format(arena.score), 255, 255, 100) + aprint(px, py, ("Score[1st]: %d"):tformat(arena.score), 255, 255, 100) else - aprint(px, py, ("Score: %d"):format(arena.score), 255, 255, 255) + aprint(px, py, ("Score: %d"):tformat(arena.score), 255, 255, 255) end local _event = "" if arena.event > 0 then if arena.event == 1 then - _event = "[MiniBoss]" + _event = _t"[MiniBoss]" elseif arena.event == 2 then - _event = "[Boss]" + _event = _t"[Boss]" elseif arena.event == 3 then - _event = "[Final]" + _event = _t"[Final]" end end py = py + h if arena.currentWave > world.arena.bestWave then - aprint(px, py, ("Wave(TOP) %d %s"):format(arena.currentWave, _event), 255, 255, 100) + aprint(px, py, ("Wave(TOP) %d %s"):tformat(arena.currentWave, _event), 255, 255, 100) elseif arena.currentWave > world.arena.lastScore.wave then - aprint(px, py, ("Wave %d %s"):format(arena.currentWave, _event), 100, 100, 255) + aprint(px, py, ("Wave %d %s"):tformat(arena.currentWave, _event), 100, 100, 255) else - aprint(px, py, ("Wave %d %s"):format(arena.currentWave, _event), 255, 255, 255) + aprint(px, py, ("Wave %d %s"):tformat(arena.currentWave, _event), 255, 255, 255) end py = py + h if arena.pinch == true then - aprint(px, py, ("Bonus: %d (x%.1f)"):format(arena.bonus, arena.bonusMultiplier), 255, 50, 50) + aprint(px, py, ("Bonus: %d (x%.1f)"):tformat(arena.bonus, arena.bonusMultiplier), 255, 50, 50) else - aprint(px, py, ("Bonus: %d (x%.1f)"):format(arena.bonus, arena.bonusMultiplier), 255, 255, 255) + aprint(px, py, ("Bonus: %d (x%.1f)"):tformat(arena.bonus, arena.bonusMultiplier), 255, 255, 255) end py = py + h if arena.display then aprint(px, py, arena.display[1], 255, 0, 255) - aprint(px, py + h, " VS", 255, 0, 255) + aprint(px, py + h, _t" VS", 255, 0, 255) aprint(px, py + h + h, arena.display[2], 255, 0, 255) else - aprint(px, py, "Rank: "..arena.printRank(arena.rank, arena.ranks), 255, 255, 255) + aprint(px, py, _t"Rank: "..arena.printRank(arena.rank, arena.ranks), 255, 255, 255) end end @@ -1109,7 +1109,7 @@ function _M:displayResources(scale, bx, by, a) if not self.res.save or self.res.save.vc ~= p then self.res.save = { vc = p, - cur = {core.display.drawStringBlendedNewSurface(font_sha, ("Saving... %d%%"):format(p * 100), 255, 255, 255):glTexture()}, + cur = {core.display.drawStringBlendedNewSurface(font_sha, ("Saving... %d%%"):tformat(p * 100), 255, 255, 255):glTexture()}, } end local dt = self.res.save.cur @@ -1146,14 +1146,14 @@ function _M:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale if not self.tbuff[eff_id..":"..dur..":"..charges] then local name = e.desc local desc = nil - local eff_subtype = table.concat(table.keys(e.subtype), "/") + local eff_subtype = table.concat(table.ts(table.keys(e.subtype), "effect subtype"), "/") if e.display_desc then name = e.display_desc(self, p) end if p.save_string and p.amount_decreased and p.maximum and p.total_dur then - desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):format(name, e.type, eff_subtype)..e.long_desc(player, p).." "..("%s reduced the duration of this effect by %d turns, from %d to %d."):format(p.save_string, p.amount_decreased, p.maximum, p.total_dur) + desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):format(name, _t(e.type), eff_subtype)..e.long_desc(player, p).." "..("%s reduced the duration of this effect by %d turns, from %d to %d."):tformat(p.save_string, p.amount_decreased, p.maximum, p.total_dur) else - desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):format(name, e.type, eff_subtype)..e.long_desc(player, p) + desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):tformat(name, _t(e.type), eff_subtype)..e.long_desc(player, p) end - if allow_remove then desc = desc.."\n---\nRight click to cancel early." end + if allow_remove then desc = desc.._t"\n---\nRight click to cancel early." end local txt = nil local txt2 = nil @@ -1187,7 +1187,7 @@ function _M:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale p.dur = p.dur - 1 end elseif allow_remove and event == "button" and button == "right" then - Dialog:yesnoPopup(name, "Really cancel "..name.."?", function(ret) + Dialog:yesnoPopup(name, ("Really cancel %s?"):tformat(name), function(ret) if ret then player:removeEffect(eff_id) end @@ -1413,9 +1413,9 @@ function _M:displayParty(scale, bx, by) if not self.party[a] then local def = game.party.members[a] - local text = "#GOLD##{bold}#"..a.name.."\n#WHITE##{normal}#Life: "..math.floor(100 * a.life / a.max_life).."%\nLevel: "..a.level.."\n"..def.title + local text = ("#GOLD##{bold}#%s\n#WHITE##{normal}#Life: %d%%\nLevel: %d\n%s"):tformat(a:getName(), math.floor(100 * a.life / a.max_life), a.level, def.title) if a.summon_time then - text = text.."\nTurns remaining: "..a.summon_time + text = text..("\nTurns remaining: %s"):tformat(a.summon_time) end local is_first = is_first local desc_fct = function(button, mx, my, xrel, yrel, bx, by, event) @@ -1457,7 +1457,7 @@ function _M:displayParty(scale, bx, by) p = (game.player == a) and portrait_lev or portrait_unsel_lev end p[1]:toScreenFull(x, y, p[6], p[7], p[2], p[3]) - -- Display turns remaining on summon's portrait — Marson + -- Display turns remaining on summon's portrait ?? Marson if a.summon_time and a.name ~= "shadow" then local gtxt = self.party[a].txt_summon_time if not gtxt or self.party[a].cur_summon_time ~= a.summon_time then @@ -1560,7 +1560,7 @@ function _M:displayPlayer(scale, bx, by) if not self.res.plevel or self.res.plevel.vc ~= player.level then self.res.plevel = { vc = player.level, - cur = {core.display.drawStringBlendedNewSurface(font_sha, "Lvl "..player.level, 255, 255, 255):glTexture()}, + cur = {core.display.drawStringBlendedNewSurface(font_sha, ("Lvl %d"):tformat(player.level), 255, 255, 255):glTexture()}, } end local dt = self.res.plevel.cur @@ -1589,19 +1589,19 @@ function _M:displayPlayer(scale, bx, by) -- Attack/defend if bx >= 22 and bx <= 22 + pf_defend[6] and by >= 67 and by <= 67 + pf_defend[7] then - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Toggle for movement mode.\nDefault: when trying to move onto a creature it will attack if hostile.\nPassive: when trying to move onto a creature it will not attack (use ctrl+direction, or right click to attack manually)") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, _t"Toggle for movement mode.\nDefault: when trying to move onto a creature it will attack if hostile.\nPassive: when trying to move onto a creature it will not attack (use ctrl+direction, or right click to attack manually)") if event == "button" and button == "left" then game.key:triggerVirtual("TOGGLE_BUMP_ATTACK") end -- Character sheet elseif bx >= 22 and bx <= 22 + 40 and by >= 22 and by <= 22 + 40 then - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Show character infos") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, _t"Show character infos") if event == "button" and button == "left" then game.key:triggerVirtual("SHOW_CHARACTER_SHEET") end -- Levelup elseif bx >= 269 and bx <= 269 + pf_levelup[6] and by >= 78 and by <= 78 + pf_levelup[7] and (player.unused_stats > 0 or player.unused_talents > 0 or player.unused_generics > 0 or player.unused_talents_types > 0) then - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Click to assign stats and talents!") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, _t"Click to assign stats and talents!") if event == "button" and button == "left" then game.key:triggerVirtual("LEVELUP") end -- MTX elseif bx >= 298 + pf_mtx_x and bx <= 298 + pf_mtx_x + pf_mtx[6] and by >= 6 + pf_mtx_y and by <= 6 + pf_mtx_y + pf_mtx[7] and profile:canMTXN() then - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Show available cosmetic & fun microtransation") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, _t"Show available cosmetic & fun microtransation") if event == "button" and button == "left" then package.loaded["engine.dialogs.microtxn.MTXMain"] = nil game:registerDialog(require("engine.dialogs.microtxn.MTXMain").new()) @@ -1647,7 +1647,7 @@ function _M:displayMinimap(scale, bx, by) else self.mhandle.minimap = true end if self.no_minimap then return end - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Left mouse to move\nRight mouse to scroll\nMiddle mouse to show full map") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, _t"Left mouse to move\nRight mouse to scroll\nMiddle mouse to show full map") -- Move handle if not self.locked and bx >= self.mhandle_pos.minimap.x and bx <= self.mhandle_pos.minimap.x + move_handle[6] and by >= self.mhandle_pos.minimap.y and by <= self.mhandle_pos.minimap.y + move_handle[7] then @@ -1808,7 +1808,7 @@ function _M:displayHotkeys(scale, bx, by) self.hotkeys_display:onMouse(button, mx, my, event == "button", function(text) text = text:toTString() - text:add(true, "---", true, {"font","italic"}, {"color","GOLD"}, "Left click to use", true, "Right click to configure", true, "Press 'm' to setup", {"color","LAST"}, {"font","normal"}) + text:add(true, "---", true, {"font","italic"}, {"color","GOLD"}, _t"Left click to use", true, _t"Right click to configure", true, _t"Press 'm' to setup", {"color","LAST"}, {"font","normal"}) game:tooltipDisplayAtMap(game.w, game.h, text) end, function(i, hk) @@ -1817,7 +1817,7 @@ function _M:displayHotkeys(scale, bx, by) d:use({talent=hk[2], name=game.player:getTalentFromId(hk[2]).name}, "right") return true elseif button == "right" and hk and hk[1] == "inventory" then - Dialog:yesnoPopup("Unbind "..hk[2], "Remove this object from your hotkeys?", function(ret) if ret then + Dialog:yesnoPopup(("Unbind %s"):tformat(hk[2]), _t"Remove this object from your hotkeys?", function(ret) if ret then for i = 1, 12 * game.player.nb_hotkey_pages do if game.player.hotkey[i] and game.player.hotkey[i][1] == "inventory" and game.player.hotkey[i][2] == hk[2] then game.player.hotkey[i] = nil end end @@ -1856,7 +1856,7 @@ function _M:displayToolbar(scale, bx, by) game.mouse:unregisterZone("tb_inven") local desc_fct = function(button, mx, my, xrel, yrel, bx, by, event) if event == "out" then self.tbbuttons.inven = 0.6 return else self.tbbuttons.inven = 1 end - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Left mouse to show inventory\nRight mouse to show ingredients") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, _t"Left mouse to show inventory\nRight mouse to show ingredients") if button == "left" and not xrel and not yrel and event == "button" then game.key:triggerVirtual("SHOW_INVENTORY") elseif button == "right" and not xrel and not yrel and event == "button" then game:registerDialog(require("mod.dialogs.ShowIngredients").new(game.party)) end end @@ -1870,7 +1870,7 @@ function _M:displayToolbar(scale, bx, by) game.mouse:unregisterZone("tb_talents") local desc_fct = function(button, mx, my, xrel, yrel, bx, by, event) if event == "out" then self.tbbuttons.talents = 0.6 return else self.tbbuttons.talents = 1 end - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Left mouse to show known talents") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, _t"Left mouse to show known talents") if button == "left" and not xrel and not yrel and event == "button" then game.key:triggerVirtual("USE_TALENTS") end end game.mouse:registerZone(bx + x * scale, by +y*scale, tb_talents[6], tb_talents[7], desc_fct, nil, "tb_talents", true, scale) @@ -1883,7 +1883,7 @@ function _M:displayToolbar(scale, bx, by) game.mouse:unregisterZone("tb_quest") local desc_fct = function(button, mx, my, xrel, yrel, bx, by, event) if event == "out" then self.tbbuttons.quest = 0.6 return else self.tbbuttons.quest = 1 end - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Left mouse to show message/chat log.") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, _t"Left mouse to show message/chat log.") if button == "left" and not xrel and not yrel and event == "button" then game.key:triggerVirtual("SHOW_MESSAGE_LOG") end end game.mouse:registerZone(bx + x * scale, by +y*scale, tb_quest[6], tb_quest[7], desc_fct, nil, "tb_quest", true, scale) @@ -1896,9 +1896,9 @@ function _M:displayToolbar(scale, bx, by) game.mouse:unregisterZone("tb_lore") local desc_fct = function(button, mx, my, xrel, yrel, bx, by, event) if event == "out" then self.tbbuttons.lore = 0.6 return else self.tbbuttons.lore = 1 end - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Left mouse to show quest log.\nRight mouse to show all known lore.") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, _t"Left mouse to show quest log.\nRight mouse to show all known lore.") if button == "left" and not xrel and not yrel and event == "button" then game.key:triggerVirtual("SHOW_QUESTS") - elseif button == "right" and not xrel and not yrel and event == "button" then game:registerDialog(require("mod.dialogs.ShowLore").new("Tales of Maj'Eyal Lore", game.party)) end + elseif button == "right" and not xrel and not yrel and event == "button" then game:registerDialog(require("mod.dialogs.ShowLore").new(_t"Tales of Maj'Eyal Lore", game.party)) end end game.mouse:registerZone(bx + x * scale, by +y*scale, tb_lore[6], tb_lore[7], desc_fct, nil, "tb_lore", true, scale) end @@ -1910,7 +1910,7 @@ function _M:displayToolbar(scale, bx, by) game.mouse:unregisterZone("tb_mainmenu") local desc_fct = function(button, mx, my, xrel, yrel, bx, by, event) if event == "out" then self.tbbuttons.mainmenu = 0.6 return else self.tbbuttons.mainmenu = 1 end - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Left mouse to show main menu") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, _t"Left mouse to show main menu") if button == "left" and not xrel and not yrel and event == "button" then game.key:triggerVirtual("EXIT") end end game.mouse:registerZone(bx + x * scale, by +y*scale, tb_mainmenu[6], tb_mainmenu[7], desc_fct, nil, "tb_mainmenu", true, scale) @@ -1924,7 +1924,7 @@ function _M:displayToolbar(scale, bx, by) game.mouse:unregisterZone("padlock") local desc_fct = function(button, mx, my, xrel, yrel, bx, by, event) if event == "out" then self.tbbuttons.padlock = 0.6 return else self.tbbuttons.padlock = 1 end - game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, self.locked and "Unlock all interface elements so they can be moved and resized." or "Lock all interface elements so they can not be moved nor resized.") + game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, self.locked and _t"Unlock all interface elements so they can be moved and resized." or _t"Lock all interface elements so they can not be moved nor resized.") if button == "left" and not xrel and not yrel and event == "button" then self:switchLocked() end end game.mouse:registerZone(bx + x * scale, by +y*scale, padlock[6], padlock[7], desc_fct, nil, "padlock", true, scale) @@ -2063,7 +2063,7 @@ function _M:setupMouse(mouse) end end end if item.url then - table.append(tooltips, tstring{"Clicking will open ", {"color", "LIGHT_BLUE"}, {"font", "italic"}, item.url, {"color", "WHITE"}, {"font", "normal"}, " in your browser"}) + table.append(tooltips, (_t"Clicking will open#LIGHT_BLUE##{italic}#%s#WHITE##{normal}# in your browser"):toTString() ) end local extra = {} @@ -2079,18 +2079,18 @@ function _M:setupMouse(mouse) local str = tstring{{"color","GOLD"}, {"font","bold"}, user.name, {"color","LAST"}, {"font","normal"}, true} if (user.donator and user.donator ~= "none") or (user.status and user.status == 'dev') then - local text, color = "Donator", colors.WHITE - if user.status and user.status == 'dev' then text, color = "Developer", colors.CRIMSON - elseif user.status and user.status == 'mod' then text, color = "Moderator / Helper", colors.GOLD - elseif user.donator == "oneshot" then text, color = "Donator", colors.LIGHT_GREEN - elseif user.donator == "recurring" then text, color = "Recurring Donator", colors.LIGHT_BLUE end + local text, color = _t"Donator", colors.WHITE + if user.status and user.status == 'dev' then text, color = _t"Developer", colors.CRIMSON + elseif user.status and user.status == 'mod' then text, color = _t"Moderator / Helper", colors.GOLD + elseif user.donator == "oneshot" then text, color = _t"Donator", colors.LIGHT_GREEN + elseif user.donator == "recurring" then text, color = _t"Recurring Donator", colors.LIGHT_BLUE end str:add({"color",unpack(colors.simple(color))}, text, {"color", "LAST"}, true) end - str:add({"color","ANTIQUE_WHITE"}, "Playing: ", {"color", "LAST"}, user.current_char, true) - str:add({"color","ANTIQUE_WHITE"}, "Game: ", {"color", "LAST"}, user.module, "(", user.valid, ")",true) + str:add({"color","ANTIQUE_WHITE"}, _t"Playing: ", {"color", "LAST"}, user.current_char, true) + str:add({"color","ANTIQUE_WHITE"}, _t"Game: ", {"color", "LAST"}, user.module, "(", user.valid, ")",true) if item.url then - str:add(true, "---", true, "Clicking will open ", {"color", "LIGHT_BLUE"}, {"font", "italic"}, item.url, {"color", "WHITE"}, {"font", "normal"}, " in your browser") + str:add(true, "---", true, _t"Clicking will open ", {"color", "LIGHT_BLUE"}, {"font", "italic"}, item.url, {"color", "WHITE"}, {"font", "normal"}, " in your browser") end local extra = {} @@ -2102,20 +2102,20 @@ function _M:setupMouse(mouse) extra.log_str = str if button == "right" and event == "button" then extra.add_map_action = { - { name="Show chat user", fct=function() profile.chat:showUserInfo(user.login) end }, - { name="Whisper", fct=function() profile.chat:setCurrentTarget(false, user.login) profile.chat:talkBox() end }, - { name="Ignore", fct=function() Dialog:yesnoPopup("Ignore user", "Really ignore all messages from: "..user.login, function(ret) if ret then profile.chat:ignoreUser(user.login) end end) end }, - { name="Report user for bad behavior", fct=function() - game:registerDialog(require('engine.dialogs.GetText').new("Reason to report: "..user.login, "Reason", 4, 500, function(text) + { name=_t"Show chat user", fct=function() profile.chat:showUserInfo(user.login) end }, + { name=_t"Whisper", fct=function() profile.chat:setCurrentTarget(false, user.login) profile.chat:talkBox() end }, + { name=_t"Ignore", fct=function() Dialog:yesnoPopup(_t"Ignore user", ("Really ignore all messages from: %s"):tformat(user.login), function(ret) if ret then profile.chat:ignoreUser(user.login) end end) end }, + { name=_t"Report user for bad behavior", fct=function() + game:registerDialog(require('engine.dialogs.GetText').new(("Reason to report: %s"):tformat(user.login), _t"Reason", 4, 500, function(text) profile.chat:reportUser(user.login, text) game.log("#VIOLET#", "Report sent.") end)) end }, } if profile.chat:isFriend(user.login) then - table.insert(extra.add_map_action, 3, { name="Remove Friend", fct=function() Dialog:yesnoPopup("Remove Friend", "Really remove "..user.login.." from your friends?", function(ret) if ret then profile.chat:removeFriend(user.login, user.id) end end) end }) + table.insert(extra.add_map_action, 3, { name=_t"Remove Friend", fct=function() Dialog:yesnoPopup(_t"Remove Friend", ("Really remove %s from your friends?"):tformat(user.login), function(ret) if ret then profile.chat:removeFriend(user.login, user.id) end end) end }) else - table.insert(extra.add_map_action, 3, { name="Add Friend", fct=function() Dialog:yesnoPopup("Add Friend", "Really add "..user.login.." to your friends?", function(ret) if ret then profile.chat:addFriend(user.login, user.id) end end) end }) + table.insert(extra.add_map_action, 3, { name=_t"Add Friend", fct=function() Dialog:yesnoPopup(_t"Add Friend", ("Really add %s to your friends?"):tformat(user.login), function(ret) if ret then profile.chat:addFriend(user.login, user.id) end end) end }) end end end diff --git a/game/modules/tome/data/achievements/arena.lua b/game/modules/tome/data/achievements/arena.lua index 8f72cd381d08cdcb38181c6259a03db6df47d450..0509c21a74fe4e15697b5c23eeea4b8fe285b9fc 100644 --- a/game/modules/tome/data/achievements/arena.lua +++ b/game/modules/tome/data/achievements/arena.lua @@ -20,47 +20,47 @@ newAchievement{ name = "The Arena", show = "full", - desc = [[Unlocked Arena mode.]], + desc = _t[[Unlocked Arena mode.]], } newAchievement{ name = "Arena Battler 20", show = "full", - desc = [[Got to wave 20 in the arena.]], + desc = _t[[Got to wave 20 in the arena.]], } newAchievement{ name = "Arena Battler 50", show = "full", - desc = [[Got to wave 50 in the arena.]], + desc = _t[[Got to wave 50 in the arena.]], } newAchievement{ name = "Almost Master of Arena", show = "full", huge=true, - desc = [[Became the new master of the arena in 30-wave mode.]], + desc = _t[[Became the new master of the arena in 30-wave mode.]], } newAchievement{ name = "Master of Arena", show = "full", huge=true, - desc = [[Became the new master of the arena in 60-wave mode.]], + desc = _t[[Became the new master of the arena in 60-wave mode.]], } newAchievement{ name = "XXX the Destroyer", show = "full", - desc = [[Earned the rank of Destroyer in the arena.]], + desc = _t[[Earned the rank of Destroyer in the arena.]], } newAchievement{ name = "Grand Master", show = "full", - desc = [[Earned the rank of Grand Master in the arena.]], + desc = _t[[Earned the rank of Grand Master in the arena.]], } newAchievement{ name = "Ten at one blow", show = "full", - desc = [[Killed 10 or more enemies in one single attack in the arena.]], + desc = _t[[Killed 10 or more enemies in one single attack in the arena.]], } diff --git a/game/modules/tome/data/achievements/donator.lua b/game/modules/tome/data/achievements/donator.lua index a9d9d70109169e8a70008e0af20ad1a912a66633..4bfcd3108bfad538b431831a122a8138212fe6d8 100644 --- a/game/modules/tome/data/achievements/donator.lua +++ b/game/modules/tome/data/achievements/donator.lua @@ -19,26 +19,26 @@ newAchievement{ name = "Bronze Donator", id = "BRONZE_DONATOR", - desc = [[Donated up to 5 euros to Tales of Maj'Eyal.]], + desc = _t[[Donated up to 5 euros to Tales of Maj'Eyal.]], no_difficulty_duplicate = true, no_chat_broadcast = true, } newAchievement{ name = "Silver Donator", id = "SILVER_DONATOR", - desc = [[Donated at least 6 euros to Tales of Maj'Eyal.]], + desc = _t[[Donated at least 6 euros to Tales of Maj'Eyal.]], no_difficulty_duplicate = true, no_chat_broadcast = true, } newAchievement{ name = "Gold Donator", id = "GOLD_DONATOR", - desc = [[Donated at least 16 euros to Tales of Maj'Eyal.]], + desc = _t[[Donated at least 16 euros to Tales of Maj'Eyal.]], no_difficulty_duplicate = true, no_chat_broadcast = true, } newAchievement{ name = "Stralite Donator", id = "STRALITE_DONATOR", - desc = [[Donated at least 31 euros to Tales of Maj'Eyal.]], + desc = _t[[Donated at least 31 euros to Tales of Maj'Eyal.]], no_difficulty_duplicate = true, no_chat_broadcast = true, } newAchievement{ name = "Voratun Donator", id = "VORATUN_DONATOR", - desc = [[Donated more than 60 euros to Tales of Maj'Eyal.]], + desc = _t[[Donated more than 60 euros to Tales of Maj'Eyal.]], no_difficulty_duplicate = true, no_chat_broadcast = true, } diff --git a/game/modules/tome/data/achievements/events.lua b/game/modules/tome/data/achievements/events.lua index 58a240d6d3bf0af4ad218c5dc8965b6c34082043..4ccc4363ff9715acc71bae53f633a43435c9441e 100644 --- a/game/modules/tome/data/achievements/events.lua +++ b/game/modules/tome/data/achievements/events.lua @@ -20,77 +20,77 @@ newAchievement{ name = "The sky is falling!", id = "EVENT_METEOR", show = "name", - desc = [[Saw a huge meteor falling from the sky.]], + desc = _t[[Saw a huge meteor falling from the sky.]], } newAchievement{ name = "Demonic Invasion", id = "EVENT_FEARSCAPE", show = "name", - desc = [[Stopped a demonic invasion by closing their portal.]], + desc = _t[[Stopped a demonic invasion by closing their portal.]], } newAchievement{ name = "Invasion from the Depths", id = "EVENT_NAGA", show = "name", - desc = [[Stopped a naga invasion by closing their portal.]], + desc = _t[[Stopped a naga invasion by closing their portal.]], } newAchievement{ name = "The Restless Dead", id = "EVENT_OLDBATTLEFIELD", show = "name", - desc = [[Disturbed an old battlefield and survived the consequences.]], + desc = _t[[Disturbed an old battlefield and survived the consequences.]], } newAchievement{ name = "The Rat Lich", id = "EVENT_RATLICH", show = "name", huge=true, - desc = [[Killed the terrible Rat Lich.]], + desc = _t[[Killed the terrible Rat Lich.]], } newAchievement{ name = "Shasshhiy'Kaish", id = "EVENT_CULTISTS", show = "name", - desc = [[Killed Shasshhiy'Kaish after letting her grow as powerful as possible.]], + desc = _t[[Killed Shasshhiy'Kaish after letting her grow as powerful as possible.]], } newAchievement{ name = "Bringer of Doom", id = "EVENT_PEDESTALS", show = "name", - desc = [[Killed a Bringer of Doom.]], + desc = _t[[Killed a Bringer of Doom.]], } newAchievement{ name = "A living one!", id = "CALDIZAR", show = "name", huge=true, - desc = [[Was teleported into Caldizar's Fortress, far into the void between the stars.]], + desc = _t[[Was teleported into Caldizar's Fortress, far into the void between the stars.]], } newAchievement{ name = "Slimefest", id = "SLUDGENEST100", show = "full", - desc = [[Have 100 walls on the sludgenest turn into hostile creatures.]], + desc = _t[[Have 100 walls on the sludgenest turn into hostile creatures.]], } newAchievement{ name = "Slime killer party", id = "SLUDGENEST200", show = "full", huge=true, - desc = [[Have 200 walls on the sludgenest turn into hostile creatures.]], + desc = _t[[Have 200 walls on the sludgenest turn into hostile creatures.]], } newAchievement{ name = "Mad slime dash", id = "SLUDGENEST300", show = "full", huge=true, - desc = [[Have 300 walls on the sludgenest turn into hostile creatures.]], + desc = _t[[Have 300 walls on the sludgenest turn into hostile creatures.]], } newAchievement{ name = "Don't mind the slimy smell", id = "SLUDGENEST400", show = "full", huge=true, - desc = [[Have 400 walls on the sludgenest turn into hostile creatures.]], + desc = _t[[Have 400 walls on the sludgenest turn into hostile creatures.]], } newAchievement{ name = "In the company of slimes", id = "SLUDGENEST500", show = "full", huge=true, - desc = [[Have 500 walls on the sludgenest turn into hostile creatures.]], + desc = _t[[Have 500 walls on the sludgenest turn into hostile creatures.]], } diff --git a/game/modules/tome/data/achievements/infinite-dungeon.lua b/game/modules/tome/data/achievements/infinite-dungeon.lua index 5ec3dbb12eb46b0ff436b1a48d7e0f9cddfca821..78044312a4894cf2e1d2515f6aa55d66bba37dfb 100644 --- a/game/modules/tome/data/achievements/infinite-dungeon.lua +++ b/game/modules/tome/data/achievements/infinite-dungeon.lua @@ -20,75 +20,75 @@ newAchievement{ name = "Infinite x10", show = "full", - desc = [[Got to level 10 of the infinite dungeon.]], + desc = _t[[Got to level 10 of the infinite dungeon.]], } newAchievement{ name = "Infinite x20", show = "full", - desc = [[Got to level 20 of the infinite dungeon.]], + desc = _t[[Got to level 20 of the infinite dungeon.]], } newAchievement{ name = "Infinite x30", show = "full", - desc = [[Got to level 30 of the infinite dungeon.]], + desc = _t[[Got to level 30 of the infinite dungeon.]], } newAchievement{ name = "Infinite x40", show = "full", - desc = [[Got to level 40 of the infinite dungeon.]], + desc = _t[[Got to level 40 of the infinite dungeon.]], } newAchievement{ name = "Infinite x50", show = "full", - desc = [[Got to level 50 of the infinite dungeon.]], + desc = _t[[Got to level 50 of the infinite dungeon.]], } newAchievement{ name = "Infinite x60", show = "full", - desc = [[Got to level 60 of the infinite dungeon.]], + desc = _t[[Got to level 60 of the infinite dungeon.]], } newAchievement{ name = "Infinite x70", show = "full", - desc = [[Got to level 70 of the infinite dungeon.]], + desc = _t[[Got to level 70 of the infinite dungeon.]], } newAchievement{ name = "Infinite x80", show = "full", - desc = [[Got to level 80 of the infinite dungeon.]], + desc = _t[[Got to level 80 of the infinite dungeon.]], } newAchievement{ name = "Infinite x90", show = "full", - desc = [[Got to level 90 of the infinite dungeon.]], + desc = _t[[Got to level 90 of the infinite dungeon.]], } newAchievement{ name = "Infinite x100", show = "full", huge=true, - desc = [[Got to level 100 of the infinite dungeon.]], + desc = _t[[Got to level 100 of the infinite dungeon.]], } newAchievement{ name = "Infinite x150", show = "full", huge=true, - desc = [[Got to level 150 of the infinite dungeon.]], + desc = _t[[Got to level 150 of the infinite dungeon.]], } newAchievement{ name = "Infinite x200", show = "full", huge=true, - desc = [[Got to level 200 of the infinite dungeon.]], + desc = _t[[Got to level 200 of the infinite dungeon.]], } newAchievement{ name = "Infinite x300", show = "full", huge=true, - desc = [[Got to level 300 of the infinite dungeon.]], + desc = _t[[Got to level 300 of the infinite dungeon.]], } newAchievement{ name = "Infinite x400", show = "full", huge=true, - desc = [[Got to level 400 of the infinite dungeon.]], + desc = _t[[Got to level 400 of the infinite dungeon.]], } newAchievement{ name = "Infinite x500", show = "full", huge=true, - desc = [[Got to level 500 of the infinite dungeon.]], + desc = _t[[Got to level 500 of the infinite dungeon.]], } diff --git a/game/modules/tome/data/achievements/items.lua b/game/modules/tome/data/achievements/items.lua index d87b6644eb8436237b6577cced6f1eca32d28f3d..bbd2520093b8d9d4a5296e1341f1d1f1ef9991ed 100644 --- a/game/modules/tome/data/achievements/items.lua +++ b/game/modules/tome/data/achievements/items.lua @@ -19,7 +19,7 @@ newAchievement{ name = "Deus Ex Machina", - desc = [[Found the Blood of Life and the four unique inscriptions: Primal Infusion, Infusion of Wild Growth, Rune of Reflection and Rune of the Rift.]], + desc = _t[[Found the Blood of Life and the four unique inscriptions: Primal Infusion, Infusion of Wild Growth, Rune of Reflection and Rune of the Rift.]], mode = "player", can_gain = function(self, who, obj) if obj:getName{force_id=true} == "Blood of Life" then self.blood = true end @@ -35,7 +35,7 @@ newAchievement{ name = "Treasure Hunter", image = "object/money_large.png", show = "name", - desc = [[Amassed 1000 gold pieces.]], + desc = _t[[Amassed 1000 gold pieces.]], can_gain = function(self, who) return who.money >= 1000 end, @@ -45,7 +45,7 @@ newAchievement{ name = "Treasure Hoarder", image = "object/money_large.png", show = "name", - desc = [[Amassed 3000 gold pieces.]], + desc = _t[[Amassed 3000 gold pieces.]], can_gain = function(self, who) return who.money >= 3000 end, @@ -55,7 +55,7 @@ newAchievement{ id = "DRAGON_GREED", name = "Dragon's Greed", image = "object/money_large.png", show = "name", huge=true, - desc = [[Amassed 8000 gold pieces.]], + desc = _t[[Amassed 8000 gold pieces.]], can_gain = function(self, who) return who.money >= 8000 end, diff --git a/game/modules/tome/data/achievements/kills.lua b/game/modules/tome/data/achievements/kills.lua index d1c7a924234465646bb25673cc8a05502e8aad23..a99b9495aa43baec3c0dc577903ff1342e5807fe 100644 --- a/game/modules/tome/data/achievements/kills.lua +++ b/game/modules/tome/data/achievements/kills.lua @@ -20,12 +20,12 @@ newAchievement{ name = "That was close", show = "full", huge=true, - desc = [[Killed your target while having only 1 life left.]], + desc = _t[[Killed your target while having only 1 life left.]], } newAchievement{ name = "Size matters", show = "full", - desc = [[Did over 600 damage in one attack.]], + desc = _t[[Did over 600 damage in one attack.]], on_gain = function(_, src, personal) if src.descriptor and (src.descriptor.subclass == "Rogue" or src.descriptor.subclass == "Shadowblade") then game:setAllowedBuild("rogue_marauder", true) @@ -35,22 +35,22 @@ newAchievement{ newAchievement{ name = "Size is everything", id = "DAMAGE_1500", show = "full", huge=true, - desc = [[Did over 1500 damage in one attack.]], + desc = _t[[Did over 1500 damage in one attack.]], } newAchievement{ name = "The bigger the better!", id = "DAMAGE_3000", show = "full", huge=true, - desc = [[Did over 3000 damage in one attack.]], + desc = _t[[Did over 3000 damage in one attack.]], } newAchievement{ name = "Overpowered!", id = "DAMAGE_6000", show = "full", huge=true, - desc = [[Did over 6000 damage in one attack.]], + desc = _t[[Did over 6000 damage in one attack.]], } newAchievement{ name = "Exterminator", show = "full", - desc = [[Killed 1000 creatures.]], + desc = _t[[Killed 1000 creatures.]], mode = "player", can_gain = function(self, who) self.nb = (self.nb or 0) + 1 @@ -62,7 +62,7 @@ newAchievement{ name = "Pest Control", image = "npc/vermin_worms_green_worm_mass.png", show = "full", - desc = [[Killed 1000 reproducing vermin.]], + desc = _t[[Killed 1000 reproducing vermin.]], mode = "player", can_gain = function(self, who, target) if target:knowTalent(target.T_MULTIPLY) or target.clone_on_hit then @@ -75,7 +75,7 @@ newAchievement{ newAchievement{ name = "Reaver", show = "full", - desc = [[Killed 1000 humanoids.]], + desc = _t[[Killed 1000 humanoids.]], mode = "world", can_gain = function(self, who, target) if target.type == "humanoid" then @@ -94,7 +94,7 @@ newAchievement{ name = "Backstabbing Traitor", id = "ESCORT_KILL", image = "object/knife_stralite.png", show = "full", - desc = [[Killed 6 escorted adventurers while you were supposed to save them.]], + desc = _t[[Killed 6 escorted adventurers while you were supposed to save them.]], mode = "player", can_gain = function(self, who, target) self.nb = (self.nb or 0) + 1 @@ -106,7 +106,7 @@ newAchievement{ newAchievement{ name = "Bad Driver", id = "ESCORT_LOST", show = "full", - desc = [[Failed to save any escorted adventurers.]], + desc = _t[[Failed to save any escorted adventurers.]], mode = "player", can_gain = function(self, who, target) self.nb = (self.nb or 0) + 1 @@ -118,7 +118,7 @@ newAchievement{ newAchievement{ name = "Guiding Hand", id = "ESCORT_SAVED", show = "full", - desc = [[Saved all escorted adventurers.]], + desc = _t[[Saved all escorted adventurers.]], mode = "player", can_gain = function(self, who, target) self.nb = (self.nb or 0) + 1 @@ -130,7 +130,7 @@ newAchievement{ newAchievement{ name = "Earth Master", id = "GEOMANCER", show = "name", - desc = [[Killed Harkor'Zun and unlocked Stone magic.]], + desc = _t[[Killed Harkor'Zun and unlocked Stone magic.]], mode = "player", } @@ -138,7 +138,7 @@ newAchievement{ name = "Kill Bill!", id = "KILL_BILL", image = "object/artifact/bill_treestump.png", show = "full", huge=true, - desc = [[Killed Bill in the Trollmire without leveling beyond your starting level.]], + desc = _t[[Killed Bill in the Trollmire without leveling beyond your starting level.]], mode = "player", } @@ -146,14 +146,14 @@ newAchievement{ name = "Atamathoned!", id = "ATAMATHON", image = "npc/atamathon.png", show = "name", huge=true, - desc = [[Killed the giant golem Atamathon after foolishly reactivating it.]], + desc = _t[[Killed the giant golem Atamathon after foolishly reactivating it.]], mode = "player", } newAchievement{ name = "Huge Appetite", id = "EAT_BOSSES", show = "full", - desc = [[Ate 20 bosses.]], + desc = _t[[Ate 20 bosses.]], mode = "player", can_gain = function(self, who, target) if target.rank < 3.5 then return false end @@ -166,7 +166,7 @@ newAchievement{ newAchievement{ name = "Headbanger", id = "HEADBANG", show = "full", huge=true, - desc = [[Headbanged 20 bosses to death.]], + desc = _t[[Headbanged 20 bosses to death.]], mode = "player", can_gain = function(self, who, target) if target.rank < 3.5 then return false end @@ -180,7 +180,7 @@ newAchievement{ name = "Are you out of your mind?!", id = "UBER_WYRMS_OPEN", image = "npc/dragon_multihued_multi_hued_drake.png", show = "name", huge=true, - desc = [[Caught the attention of overpowered greater multi-hued wyrms in Vor Armoury. Perhaps fleeing is in order.]], + desc = _t[[Caught the attention of overpowered greater multi-hued wyrms in Vor Armoury. Perhaps fleeing is in order.]], mode = "player", } @@ -188,7 +188,7 @@ newAchievement{ name = "I cleared the room of death and all I got was this lousy achievement!", id = "UBER_WYRMS", image = "npc/dragon_multihued_multi_hued_drake.png", show = "name", huge=true, - desc = [[Killed the seven overpowered wyrms in the "Room of Death" in Vor Armoury.]], + desc = _t[[Killed the seven overpowered wyrms in the "Room of Death" in Vor Armoury.]], mode = "player", can_gain = function(self, who) self.nb = (self.nb or 0) + 1 @@ -200,7 +200,7 @@ newAchievement{ name = "I'm a cool hero", id = "NO_DERTH_DEATH", image = "npc/humanoid_human_human_farmer.png", show = "name", huge=true, - desc = [[Saved Derth without a single inhabitant dying.]], + desc = _t[[Saved Derth without a single inhabitant dying.]], mode = "player", } @@ -208,7 +208,7 @@ newAchievement{ name = "Kickin' it old-school", id = "FIRST_BOSS_URKIS", image = "npc/humanoid_human_urkis__the_high_tempest.png", show = "full", huge=true, - desc = [[Killed Urkis, the Tempest, causing him to drop the Rod of Recall.]], + desc = _t[[Killed Urkis, the Tempest, causing him to drop the Rod of Recall.]], mode = "player", } @@ -216,7 +216,7 @@ newAchievement{ name = "Leave the big boys alone", id = "FIRST_BOSS_MASTER", image = "npc/the_master.png", show = "full", huge=true, - desc = [[Killed The Master, causing him to drop the Rod of Recall.]], + desc = _t[[Killed The Master, causing him to drop the Rod of Recall.]], mode = "player", } @@ -224,7 +224,7 @@ newAchievement{ name = "You know who's to blame", id = "FIRST_BOSS_GRAND_CORRUPTOR", image = "npc/humanoid_shalore_grand_corruptor.png", show = "full", huge=true, - desc = [[Killed the Grand Corruptor, causing him to drop the Rod of Recall.]], + desc = _t[[Killed the Grand Corruptor, causing him to drop the Rod of Recall.]], mode = "player", } @@ -232,7 +232,7 @@ newAchievement{ name = "You know who's to blame (reprise)", id = "FIRST_BOSS_MYSSIL", image = "npc/humanoid_halfling_protector_myssil.png", show = "full", huge=true, - desc = [[Killed Myssil, causing her to drop the Rod of Recall.]], + desc = _t[[Killed Myssil, causing her to drop the Rod of Recall.]], mode = "player", } @@ -240,14 +240,14 @@ newAchievement{ name = "Now, this is impressive!", id = "LINANIIL_DEAD", image = "npc/humanoid_human_linaniil_supreme_archmage.png", show = "full", huge=true, - desc = [[Killed Linaniil, the Supreme Archmage of Angolwen.]], + desc = _t[[Killed Linaniil, the Supreme Archmage of Angolwen.]], mode = "player", } newAchievement{ name = "Fear of Fours", id = "SLIME_TUNNEL_BOSSES", show = "full", huge=true, - desc = [[Killed all four bosses of the Slime Tunnels.]], + desc = _t[[Killed all four bosses of the Slime Tunnels.]], mode = "player", can_gain = function(self, who, target) self.nb = (self.nb or 0) + 1 @@ -259,13 +259,13 @@ newAchievement{ newAchievement{ name = "Well trained", id = "TRAINING_DUMMY_1000000", show = "full", huge=true, - desc = [[Deal one million damage to training dummies in a single training session.]], + desc = _t[[Deal one million damage to training dummies in a single training session.]], mode = "player", } newAchievement{ name = "I meant to do that...", id = "AVOID_DEATH", show = "full", - desc = [[Avoid death 50 times with a life-saving talent.]], + desc = _t[[Avoid death 50 times with a life-saving talent.]], mode = "player", can_gain = function(self, who) self.nb = (self.nb or 0) + 1 diff --git a/game/modules/tome/data/achievements/lore.lua b/game/modules/tome/data/achievements/lore.lua index 681c4233e7ebade7787b63653ed91164ca6f3d54..c1035df6d91c0ee3fbb3f0f3cc1beec38864182f 100644 --- a/game/modules/tome/data/achievements/lore.lua +++ b/game/modules/tome/data/achievements/lore.lua @@ -19,7 +19,7 @@ newAchievement{ name = "Tales of the Spellblaze", id = "SPELLBLAZE_LORE", - desc = [[Learned the eight chapters of the Spellblaze Chronicles.]], + desc = _t[[Learned the eight chapters of the Spellblaze Chronicles.]], show = "full", mode = "player", can_gain = function(self, who, obj) @@ -37,7 +37,7 @@ newAchievement{ newAchievement{ name = "The Legend of Garkul", id = "GARKUL_LORE", - desc = [[Learned the five chapters of the Legend of Garkul.]], + desc = _t[[Learned the five chapters of the Legend of Garkul.]], show = "full", mode = "player", can_gain = function(self, who, obj) @@ -55,7 +55,7 @@ newAchievement{ newAchievement{ name = "A different point of view", id = "ORC_LORE", - desc = [[Learned the five chapters of Orc history through loremaster Hadak's tales.]], + desc = _t[[Learned the five chapters of Orc history through loremaster Hadak's tales.]], show = "full", mode = "player", can_gain = function(self, who, obj) diff --git a/game/modules/tome/data/achievements/player.lua b/game/modules/tome/data/achievements/player.lua index 03e883c93222bde35c7da65b9c68025043d3a5cb..2f0624bb5eb1acab4706bb3cbd7aac664d7f110a 100644 --- a/game/modules/tome/data/achievements/player.lua +++ b/game/modules/tome/data/achievements/player.lua @@ -20,45 +20,45 @@ newAchievement{ name = "Level 10", show = "full", - desc = [[Got a character to level 10.]], + desc = _t[[Got a character to level 10.]], } newAchievement{ name = "Level 20", show = "full", - desc = [[Got a character to level 20.]], + desc = _t[[Got a character to level 20.]], } newAchievement{ name = "Level 30", show = "full", - desc = [[Got a character to level 30.]], + desc = _t[[Got a character to level 30.]], } newAchievement{ name = "Level 40", show = "full", huge=true, - desc = [[Got a character to level 40.]], + desc = _t[[Got a character to level 40.]], } newAchievement{ name = "Level 50", show = "full", huge=true, - desc = [[Got a character to level 50.]], + desc = _t[[Got a character to level 50.]], } newAchievement{ name = "Unstoppable", show = "full", - desc = [[Returned from the dead.]], + desc = _t[[Returned from the dead.]], } newAchievement{ name = "Utterly Destroyed", id = "EIDOLON_DEATH", show = "name", - desc = [[Died on the Eidolon Plane.]], + desc = _t[[Died on the Eidolon Plane.]], } newAchievement{ name = "Fool of a Took!", id = "HALFLING_SUICIDE", show = "name", - desc = [[Killed oneself as a halfling.]], + desc = _t[[Killed oneself as a halfling.]], can_gain = function(self, who) if who.descriptor and who.descriptor.race == "Halfling" then return true end end @@ -68,7 +68,7 @@ newAchievement{ name = "Emancipation", id = "EMANCIPATION", image = "npc/alchemist_golem.png", show = "name", huge=true, - desc = [[Had the golem kill a boss while its master was already dead.]], + desc = _t[[Had the golem kill a boss while its master was already dead.]], mode = "player", can_gain = function(self, who, target) local p = game.party:findMember{main=true} @@ -85,7 +85,7 @@ newAchievement{ newAchievement{ name = "Take you with me", id = "BOSS_REVENGE", show = "full", huge=true, - desc = [[Killed a boss while already dead.]], + desc = _t[[Killed a boss while already dead.]], mode = "player", can_gain = function(self, who, target) local p = game.party:findMember{main=true} @@ -98,11 +98,11 @@ newAchievement{ newAchievement{ name = "Look at me, I'm playing a roguelike!", id = "SELF_CENTERED", show = "name", - desc = [[Linked yourself in the in-game chat.]], + desc = _t[[Linked yourself in the in-game chat.]], } newAchievement{ name = "Fear me not!", id = "FEARSCAPE", show = "full", - desc = [[Survived the Fearscape!]], + desc = _t[[Survived the Fearscape!]], } diff --git a/game/modules/tome/data/achievements/quests.lua b/game/modules/tome/data/achievements/quests.lua index 6b6eb9e6e18c6bf89563c7a7e63ec57f6057021d..a13d253e43670f0bdf6a2f59cda1c885df7317b8 100644 --- a/game/modules/tome/data/achievements/quests.lua +++ b/game/modules/tome/data/achievements/quests.lua @@ -20,7 +20,7 @@ --------------- Tutorial objectives newAchievement{ name = "Baby steps", id = "TUTORIAL_DONE", - desc = [[Completed ToME4 tutorial mode.]], + desc = _t[[Completed ToME4 tutorial mode.]], tutorial = true, no_difficulty_duplicate = true, on_gain = function(_, src, personal) @@ -33,33 +33,33 @@ newAchievement{ name = "Vampire crusher", image = "npc/the_master.png", show = "name", huge=true, - desc = [[Destroyed the Master in its lair of the Dreadfell.]], + desc = _t[[Destroyed the Master in its lair of the Dreadfell.]], } newAchievement{ name = "A dangerous secret", show = "name", - desc = [[Found the mysterious staff and told Last Hope about it.]], + desc = _t[[Found the mysterious staff and told Last Hope about it.]], } newAchievement{ name = "The secret city", show = "none", - desc = [[Discovered the truth about mages.]], + desc = _t[[Discovered the truth about mages.]], } newAchievement{ name = "Burnt to the ground", id="APPRENTICE_STAFF", show = "none", - desc = [[Gave the staff of absorption to the apprentice mage and watched the fireworks.]], + desc = _t[[Gave the staff of absorption to the apprentice mage and watched the fireworks.]], } newAchievement{ name = "Against all odds", id = "KILL_UKRUK", show = "name", huge=true, - desc = [[Killed Ukruk in the ambush.]], + desc = _t[[Killed Ukruk in the ambush.]], } newAchievement{ name = "Sliders", image = "object/artifact/orb_many_ways.png", show = "name", - desc = [[Activated a portal using the Orb of Many Ways.]], + desc = _t[[Activated a portal using the Orb of Many Ways.]], on_gain = function() game:onTickEnd(function() game.party:learnLore("first-farportal") end) end @@ -67,196 +67,196 @@ newAchievement{ newAchievement{ name = "Destroyer's bane", id = "DESTROYER_BANE", show = "name", - desc = [[Killed Golbug the Destroyer.]], + desc = _t[[Killed Golbug the Destroyer.]], } newAchievement{ name = "Brave new world", id = "STRANGE_NEW_WORLD", show = "name", - desc = [[Went to the Far East and took part in the war.]], + desc = _t[[Went to the Far East and took part in the war.]], } newAchievement{ name = "Race through fire", id = "CHARRED_SCAR_SUCCESS", show = "name", - desc = [[Raced through the fires of the Charred Scar to stop the Sorcerers.]], + desc = _t[[Raced through the fires of the Charred Scar to stop the Sorcerers.]], } newAchievement{ name = "Orcrist", id = "ORC_PRIDE", show = "name", - desc = [[Killed the leaders of the Orc Pride.]], + desc = _t[[Killed the leaders of the Orc Pride.]], } --------------- Wins newAchievement{ name = "Evil denied", id = "WIN_FULL", show = "name", huge=true, - desc = [[Won ToME by preventing the Void portal from opening.]], + desc = _t[[Won ToME by preventing the Void portal from opening.]], } newAchievement{ name = "The High Lady's destiny", id = "WIN_AERYN", show = "name", huge=true, - desc = [[Won ToME by closing the Void portal using Aeryn as a sacrifice.]], + desc = _t[[Won ToME by closing the Void portal using Aeryn as a sacrifice.]], } newAchievement{ name = "The Sun Still Shines", id = "WIN_AERYN_SURVIVE", show = "name", huge=true, - desc = [[Aeryn survived the last battle.]], + desc = _t[[Aeryn survived the last battle.]], } newAchievement{ name = "Selfless", id = "WIN_SACRIFICE", show = "name", huge=true, - desc = [[Won ToME by closing the Void portal using yourself as a sacrifice.]], + desc = _t[[Won ToME by closing the Void portal using yourself as a sacrifice.]], } newAchievement{ name = "Triumph of the Way", id = "YEEK_SACRIFICE", show = "name", huge=true, - desc = [[Won ToME by sacrificing yourself to forcefully spread the Way to every other sentient being on Eyal.]], + desc = _t[[Won ToME by sacrificing yourself to forcefully spread the Way to every other sentient being on Eyal.]], } newAchievement{ name = "No Way!", id = "YEEK_SELFLESS", show = "name", huge=true, - desc = [[Won ToME by closing the Void portal and letting yourself be killed by Aeryn to prevent the Way to enslave every sentient being on Eyal.]], + desc = _t[[Won ToME by closing the Void portal and letting yourself be killed by Aeryn to prevent the Way to enslave every sentient being on Eyal.]], } newAchievement{ name = "Tactical master", id = "SORCERER_NO_PORTAL", show = "name", huge=true, - desc = [[Fought the two Sorcerers without closing any invocation portals.]], + desc = _t[[Fought the two Sorcerers without closing any invocation portals.]], } newAchievement{ name = "Portal destroyer", id = "SORCERER_ONE_PORTAL", show = "name", huge=true, - desc = [[Fought the two Sorcerers and closed one invocation portal.]], + desc = _t[[Fought the two Sorcerers and closed one invocation portal.]], } newAchievement{ name = "Portal reaver", id = "SORCERER_TWO_PORTAL", show = "name", huge=true, - desc = [[Fought the two Sorcerers and closed two invocation portals.]], + desc = _t[[Fought the two Sorcerers and closed two invocation portals.]], } newAchievement{ name = "Portal ender", id = "SORCERER_THREE_PORTAL", show = "name", huge=true, - desc = [[Fought the two Sorcerers and closed three invocation portals.]], + desc = _t[[Fought the two Sorcerers and closed three invocation portals.]], } newAchievement{ name = "Portal master", id = "SORCERER_FOUR_PORTAL", show = "name", huge=true, - desc = [[Fought the two Sorcerers and closed four invocation portals.]], + desc = _t[[Fought the two Sorcerers and closed four invocation portals.]], } newAchievement{ name = "Never Look Back And There Again", id = "WIN_NEVER_WEST", show = "full", huge=true, - desc = [[Win the game without ever setting foot on Maj'Eyal.]], + desc = _t[[Win the game without ever setting foot on Maj'Eyal.]], } newAchievement{ name = "Bikining along!", id = "WIN_BIKINI", show = "full", huge=true, - desc = [[Won the game without ever taking off her bikini.]], + desc = _t[[Won the game without ever taking off her bikini.]], } newAchievement{ name = "Mankining it happen!", id = "WIN_MANKINI", show = "full", huge=true, - desc = [[Won the game without ever taking off his mankini.]], + desc = _t[[Won the game without ever taking off his mankini.]], } -------------- Other quests newAchievement{ name = "Rescuer of the lost", id = "LOST_MERCHANT_RESCUE", show = "name", - desc = [[Rescued the merchant from the assassin lord.]], + desc = _t[[Rescued the merchant from the assassin lord.]], } newAchievement{ name = "Poisonous", id = "LOST_MERCHANT_EVIL", show = "name", - desc = [[Sided with the assassin lord.]], + desc = _t[[Sided with the assassin lord.]], } newAchievement{ name = "Destroyer of the creation", id = "SLASUL_DEAD", show = "name", - desc = [[Killed Slasul.]], + desc = _t[[Killed Slasul.]], } newAchievement{ name = "Treacherous Bastard", id = "SLASUL_DEAD_PRODIGY_LEARNT", show = "name", - desc = [[Killed Slasul even though you sided with him to learn the Legacy of the Naloren prodigy.]], + desc = _t[[Killed Slasul even though you sided with him to learn the Legacy of the Naloren prodigy.]], } newAchievement{ name = "Flooder", id = "UKLLMSWWIK_DEAD", show = "name", - desc = [[Defeated Ukllmswwik while doing his own quest.]], + desc = _t[[Defeated Ukllmswwik while doing his own quest.]], } newAchievement{ name = "Gem of the Moon", id = "MASTER_JEWELER", show = "name", huge=true, - desc = [[Completed the Master Jeweler quest with Limmir.]], + desc = _t[[Completed the Master Jeweler quest with Limmir.]], } newAchievement{ name = "Curse Lifter", id = "CURSE_ERASER", show = "name", - desc = [[Killed Ben Cruthdar the Cursed.]], + desc = _t[[Killed Ben Cruthdar the Cursed.]], } newAchievement{ name = "Fast Curse Dispel", id = "CURSE_ALL", show = "name", huge=true, - desc = [[Killed Ben Cruthdar the Cursed while saving all the lumberjacks.]], + desc = _t[[Killed Ben Cruthdar the Cursed while saving all the lumberjacks.]], } newAchievement{ name = "Eye of the storm", id = "EYE_OF_THE_STORM", show = "name", - desc = [[Freed Derth from the onslaught of the mad Tempest, Urkis.]], + desc = _t[[Freed Derth from the onslaught of the mad Tempest, Urkis.]], } newAchievement{ name = "Antimagic!", id = "ANTIMAGIC", show = "name", - desc = [[Completed antimagic training in the Ziguranth camp.]], + desc = _t[[Completed antimagic training in the Ziguranth camp.]], } newAchievement{ name = "Anti-Antimagic!", id = "ANTI_ANTIMAGIC", show = "name", - desc = [[Destroyed the Ziguranth camp with your Rhaloren allies.]], + desc = _t[[Destroyed the Ziguranth camp with your Rhaloren allies.]], } newAchievement{ name = "There and back again", id = "WEST_PORTAL", show = "name", huge=true, - desc = [[Opened a portal to Maj'Eyal from the Far East.]], + desc = _t[[Opened a portal to Maj'Eyal from the Far East.]], } newAchievement{ name = "Back and there again", id = "EAST_PORTAL", show = "name", huge=true, - desc = [[Opened a portal to the Far East from Maj'Eyal.]], + desc = _t[[Opened a portal to the Far East from Maj'Eyal.]], } newAchievement{ name = "Arachnophobia", id = "SPYDRIC_INFESTATION", show = "name", - desc = [[Destroyed the spydric menace.]], + desc = _t[[Destroyed the spydric menace.]], } newAchievement{ name = "Clone War", id = "SHADOW_CLONE", show = "name", - desc = [[Destroyed your own Shade.]], + desc = _t[[Destroyed your own Shade.]], } newAchievement{ name = "Home sweet home", id = "SHERTUL_FORTRESS", show = "name", - desc = [[Dispatched the Weirdling Beast and took possession of Yiilkgur, the Sher'Tul Fortress for your own usage.]], + desc = _t[[Dispatched the Weirdling Beast and took possession of Yiilkgur, the Sher'Tul Fortress for your own usage.]], } newAchievement{ name = "Squadmate", id = "NORGAN_SAVED", show = "name", - desc = [[Escaped from Reknor alive with your squadmate Norgan.]], + desc = _t[[Escaped from Reknor alive with your squadmate Norgan.]], } newAchievement{ name = "Genocide", id = "GREATMOTHER_DEAD", show = "name", huge=true, - desc = [[Killed the Orc Greatmother in the breeding pits, thus dealing a terrible blow to the orc race.]], + desc = _t[[Killed the Orc Greatmother in the breeding pits, thus dealing a terrible blow to the orc race.]], } newAchievement{ name = "Savior of the damsels in distress", id = "MELINDA_SAVED", show = "name", - desc = [[Saved Melinda from her terrible fate in the Crypt of Kryl-Feijan.]], + desc = _t[[Saved Melinda from her terrible fate in the Crypt of Kryl-Feijan.]], } newAchievement{ name = "Impossible Death", id = "PARADOX_NOW", show = "name", - desc = [[Got killed by your future self.]], + desc = _t[[Got killed by your future self.]], on_gain = function(_, src, personal) if world:hasAchievement("PARADOX_FUTURE") then world:gainAchievement("PARADOX_FULL", src) end end, @@ -264,7 +264,7 @@ newAchievement{ newAchievement{ name = "Self-killer", id = "PARADOX_FUTURE", show = "name", - desc = [[Killed your future self.]], + desc = _t[[Killed your future self.]], on_gain = function(_, src, personal) if world:hasAchievement("PARADOX_NOW") then world:gainAchievement("PARADOX_FULL", src) end end, @@ -272,27 +272,27 @@ newAchievement{ newAchievement{ name = "Paradoxology", id = "PARADOX_FULL", show = "name", - desc = [[Both killed your future self and got killed by your future self.]], + desc = _t[[Both killed your future self and got killed by your future self.]], } newAchievement{ name = "Explorer", id = "EXPLORER", show = "name", - desc = [[Used the Sher'Tul fortress exploratory farportal at least 7 times with the same character.]], + desc = _t[[Used the Sher'Tul fortress exploratory farportal at least 7 times with the same character.]], } newAchievement{ name = "Orbituary", id = "ABASHED_EXPANSE", show = "name", - desc = [[Stabilized the Abashed Expanse to maintain it in orbit.]], + desc = _t[[Stabilized the Abashed Expanse to maintain it in orbit.]], } newAchievement{ name = "Wibbly Wobbly Timey Wimey Stuff", id = "UNHALLOWED_MORASS", show = "name", - desc = [[Killed the weaver queen and the temporal defiler.]], + desc = _t[[Killed the weaver queen and the temporal defiler.]], } newAchievement{ name = "Matrix style!", id = "ABASHED_EXPANSE_NO_BLAST", show = "full", huge=true, - desc = [[Finished the whole Abashed Expanse zone without being hit by a single void blast or manaworm. Dodging's fun!]], + desc = _t[[Finished the whole Abashed Expanse zone without being hit by a single void blast or manaworm. Dodging's fun!]], can_gain = function(self, who, zone) if not who:isQuestStatus("start-archmage", engine.Quest.DONE) then return false end if zone.void_blast_hits and zone.void_blast_hits == 0 then return true end @@ -301,13 +301,13 @@ newAchievement{ newAchievement{ name = "The Right thing to do", id = "RING_BLOOD_KILL", show = "name", - desc = [[Did the righteous thing in the ring of blood and disposed of the Blood Master.]], + desc = _t[[Did the righteous thing in the ring of blood and disposed of the Blood Master.]], } newAchievement{ name = "Thralless", id = "RING_BLOOD_FREED", show = "full", mode = "player", - desc = [[Freed at least 30 enthralled slaves in the slavers' compound.]], + desc = _t[[Freed at least 30 enthralled slaves in the slavers' compound.]], can_gain = function(self) self.nb = (self.nb or 0) + 1 if self.nb >= 30 then return true end @@ -317,12 +317,12 @@ newAchievement{ newAchievement{ name = "Lost in translation", id = "SUNWALL_LOST", show = "name", - desc = [[Destroyed the naga portal in the slazish fens and got caught in the after-effect.]], + desc = _t[[Destroyed the naga portal in the slazish fens and got caught in the after-effect.]], } newAchievement{ name = "Dreaming my dreams", id = "ALL_DREAMS", show = "full", - desc = [[Experienced and completed all the dreams in the Dogroth Caldera.]], + desc = _t[[Experienced and completed all the dreams in the Dogroth Caldera.]], mode = "world", can_gain = function(self, who, kind) self[kind] = true @@ -342,10 +342,10 @@ newAchievement{ newAchievement{ name = "Oozemancer", id = "OOZEMANCER", show = "name", - desc = [[Destroyed the corrupted oozemancer.]], + desc = _t[[Destroyed the corrupted oozemancer.]], } newAchievement{ name = "Lucky Girl", id = "MELINDA_LUCKY", show = "name", - desc = [[Saved Melinda again and invited her to the Fortress to cure her.]], + desc = _t[[Saved Melinda again and invited her to the Fortress to cure her.]], } diff --git a/game/modules/tome/data/achievements/talents.lua b/game/modules/tome/data/achievements/talents.lua index 93cbedb06b9f0d9270042094dcded766d93ace21..3ee809738288d9197de1edbf5fdeb889200c23b9 100644 --- a/game/modules/tome/data/achievements/talents.lua +++ b/game/modules/tome/data/achievements/talents.lua @@ -19,7 +19,7 @@ newAchievement{ name = "Pyromancer", - desc = [[Unlocked Archmage class and did over one million fire damage (with any item/talent/class).]], + desc = _t[[Unlocked Archmage class and did over one million fire damage (with any item/talent/class).]], show = "full", mode = "world", can_gain = function(self, who, dam) @@ -40,7 +40,7 @@ newAchievement{ } newAchievement{ name = "Cryomancer", - desc = [[Unlocked Archmage class and did over one million cold damage (with any item/talent/class).]], + desc = _t[[Unlocked Archmage class and did over one million cold damage (with any item/talent/class).]], show = "full", mode = "world", can_gain = function(self, who, dam) @@ -61,12 +61,12 @@ newAchievement{ } newAchievement{ name = "Lichform", - desc = [[Achieved your wild dreams of power and eternal life: you turned into a Lich!]], + desc = _t[[Achieved your wild dreams of power and eternal life: you turned into a Lich!]], show = "name", } newAchievement{ name = "Best album ever!", id = "THE_CURE", - desc = [[Removed 89 beneficial effects from enemies via Disintegration.]], + desc = _t[[Removed 89 beneficial effects from enemies via Disintegration.]], show = "full", mode = "player", can_gain = function(self, who) self.nb = (self.nb or 0) + 1 diff --git a/game/modules/tome/data/birth/classes/adventurer.lua b/game/modules/tome/data/birth/classes/adventurer.lua index 45d8fd2dea407801c4dc70673854ba2c0b505b72..4317ec07044316a5f184b48f1c1344c4b53f7779 100644 --- a/game/modules/tome/data/birth/classes/adventurer.lua +++ b/game/modules/tome/data/birth/classes/adventurer.lua @@ -22,8 +22,8 @@ newBirthDescriptor{ name = "Adventurer", locked = function() return profile.mod.allow_build.adventurer and true or "hide" end, desc = { - "Adventurers can learn to do a bit of everything, getting training in whatever they happen to find.", - "#{bold}##GOLD#This is a bonus class for winning the game. It is by no means balanced.#WHITE##{normal}#", + _t"Adventurers can learn to do a bit of everything, getting training in whatever they happen to find.", + _t"#{bold}##GOLD#This is a bonus class for winning the game. It is by no means balanced.#WHITE##{normal}#", }, descriptor_choices = { @@ -44,13 +44,13 @@ newBirthDescriptor{ name = "Adventurer", locked = function() return profile.mod.allow_build.adventurer and true or "hide" end, desc = { - "Adventurers can learn to do a bit of everything, getting training in whatever they happen to find.", - "#{bold}##GOLD#This is a bonus class for winning the game. It is by no means balanced.#WHITE##{normal}#", - "Their most important stats depend on what they wish to do.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +2 Strength, +2 Dexterity, +2 Constitution", - "#LIGHT_BLUE# * +2 Magic, +2 Willpower, +2 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"Adventurers can learn to do a bit of everything, getting training in whatever they happen to find.", + _t"#{bold}##GOLD#This is a bonus class for winning the game. It is by no means balanced.#WHITE##{normal}#", + _t"Their most important stats depend on what they wish to do.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +2 Strength, +2 Dexterity, +2 Constitution", + _t"#LIGHT_BLUE# * +2 Magic, +2 Willpower, +2 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, not_on_random_boss = true, stats = { str=2, con=2, dex=2, mag=2, wil=2, cun=2 }, diff --git a/game/modules/tome/data/birth/classes/afflicted.lua b/game/modules/tome/data/birth/classes/afflicted.lua index 214a325fc65bf72fe524ae65eb583e21042310ce..325827798c14886b622e8eaebd8c5ba85e20dc1a 100644 --- a/game/modules/tome/data/birth/classes/afflicted.lua +++ b/game/modules/tome/data/birth/classes/afflicted.lua @@ -23,10 +23,10 @@ newBirthDescriptor{ type = "class", name = "Afflicted", locked = function() return profile.mod.allow_build.afflicted end, - locked_desc = "Some walk in shadow, alone, unloved, unwanted. What powers they wield may be mighty, but their names are forever cursed.", + locked_desc = _t"Some walk in shadow, alone, unloved, unwanted. What powers they wield may be mighty, but their names are forever cursed.", desc = { - "Afflicted classes have been twisted by their association with evil forces.", - "They can use these forces to their advantage, but at a cost...", + _t"Afflicted classes have been twisted by their association with evil forces.", + _t"They can use these forces to their advantage, but at a cost...", }, descriptor_choices = { @@ -46,17 +46,17 @@ newBirthDescriptor{ type = "subclass", name = "Cursed", locked = function() return profile.mod.allow_build.afflicted_cursed end, - locked_desc = "Affliction can run to the soul, and hatred can fill one's entire being. Overcome someone else's hated curse to know its dreaded meaning.", + locked_desc = _t"Affliction can run to the soul, and hatred can fill one's entire being. Overcome someone else's hated curse to know its dreaded meaning.", desc = { - "Through ignorance, greed or folly the Cursed served some dark design and are now doomed to pay for their sins.", - "Their only master now is the hatred they carry for every living thing.", - "Drawing strength from the death of all they encounter, the Cursed become terrifying combatants.", - "Worse, any who approach the Cursed can be driven mad by their terrible aura.", - "Their most important stats are: Strength and Willpower", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +5 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +4 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +2", + _t"Through ignorance, greed or folly the Cursed served some dark design and are now doomed to pay for their sins.", + _t"Their only master now is the hatred they carry for every living thing.", + _t"Drawing strength from the death of all they encounter, the Cursed become terrifying combatants.", + _t"Worse, any who approach the Cursed can be driven mad by their terrible aura.", + _t"Their most important stats are: Strength and Willpower", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +5 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +4 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +2", }, power_source = {psionic=true, technique=true}, stats = { wil=4, str=5, }, @@ -116,18 +116,18 @@ newBirthDescriptor{ type = "subclass", name = "Doomed", locked = function() return profile.mod.allow_build.afflicted_doomed end, - locked_desc = "In shaded places in unknown lands thou must overcome thyself and see thy doom.", + locked_desc = _t"In shaded places in unknown lands thou must overcome thyself and see thy doom.", desc = { - "The Doomed are fallen mages who once wielded powerful magic wrought by ambition and dark bargains.", - "Stripped of their magic by the dark forces that once served them, they have learned to harness the hatred that burns in their minds.", - "Only time will tell if they can choose a new path or are doomed forever.", - "The Doomed strike from behind a veil of darkness or a host of shadows.", - "They feed upon their enemies as they unleash their minds on all who confront them.", - "Their most important stats are: Willpower and Cunning", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +4 Willpower, +5 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"The Doomed are fallen mages who once wielded powerful magic wrought by ambition and dark bargains.", + _t"Stripped of their magic by the dark forces that once served them, they have learned to harness the hatred that burns in their minds.", + _t"Only time will tell if they can choose a new path or are doomed forever.", + _t"The Doomed strike from behind a veil of darkness or a host of shadows.", + _t"They feed upon their enemies as they unleash their minds on all who confront them.", + _t"Their most important stats are: Willpower and Cunning", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +4 Willpower, +5 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, birth_example_particles = { function(actor) if core.shader.active() then diff --git a/game/modules/tome/data/birth/classes/celestial.lua b/game/modules/tome/data/birth/classes/celestial.lua index 61f3f6995cea2b42e9eb3cdd97e35a8271ec20a4..ff5dfe3155081e8176373f80942979169826365e 100644 --- a/game/modules/tome/data/birth/classes/celestial.lua +++ b/game/modules/tome/data/birth/classes/celestial.lua @@ -21,10 +21,10 @@ newBirthDescriptor{ type = "class", name = "Celestial", locked = function() return profile.mod.allow_build.divine end, - locked_desc = "The magic of the heavens is known to but a few, and that knowledge has long passed east, forgotten.", + locked_desc = _t"The magic of the heavens is known to but a few, and that knowledge has long passed east, forgotten.", desc = { - "Celestial classes are arcane users focused on the heavenly bodies.", - "Most draw their powers from the Sun and the Moons.", + _t"Celestial classes are arcane users focused on the heavenly bodies.", + _t"Most draw their powers from the Sun and the Moons.", }, descriptor_choices = { @@ -58,17 +58,17 @@ newBirthDescriptor{ type = "subclass", name = "Sun Paladin", locked = function() return profile.mod.allow_build.divine_sun_paladin end, - locked_desc = "The sun rises in the east in full glory, but you must look for it first amidst the darkest places.", + locked_desc = _t"The sun rises in the east in full glory, but you must look for it first amidst the darkest places.", desc = { - "Sun Paladins hail from the Gates of Morning, the last bastion of the free people in the Far East.", - "Their way of life is well represented by their motto 'The Sun is our giver, our purity, our essence. We carry the light into dark places, and against our strength none shall pass.'", - "They can channel the power of the Sun to smite all who seek to destroy the Sunwall.", - "Competent in both weapon and shield combat and magic, they usually burn their foes from afar before bashing them in melee.", - "Their most important stats are: Strength and Magic", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +5 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +4 Magic, +0 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +2", + _t"Sun Paladins hail from the Gates of Morning, the last bastion of the free people in the Far East.", + _t"Their way of life is well represented by their motto 'The Sun is our giver, our purity, our essence. We carry the light into dark places, and against our strength none shall pass.'", + _t"They can channel the power of the Sun to smite all who seek to destroy the Sunwall.", + _t"Competent in both weapon and shield combat and magic, they usually burn their foes from afar before bashing them in melee.", + _t"Their most important stats are: Strength and Magic", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +5 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +4 Magic, +0 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +2", }, power_source = {technique=true, arcane=true}, stats = { mag=4, str=5, }, @@ -133,17 +133,17 @@ newBirthDescriptor{ type = "subclass", name = "Anorithil", locked = function() return profile.mod.allow_build.divine_anorithil end, - locked_desc = "The balance of the heavens' powers is a daunting task. Mighty are those that stand in the twilight places, wielding both light and darkness in their mind.", + locked_desc = _t"The balance of the heavens' powers is a daunting task. Mighty are those that stand in the twilight places, wielding both light and darkness in their mind.", desc = { - "Anorithils hail from the Gates of Morning, the last bastion of the free people in the Far East.", - "Their way of life is well represented by their motto 'We stand betwixt the Sun and Moon, where light and darkness meet. In the grey twilight we seek our destiny.'", - "They can channel the power of the Sun and the Moons to burn and tear apart all who seek to destroy the Sunwall.", - "Masters of Sun and Moon magic, they usually burn their foes with Sun rays before calling the fury of the stars.", - "Their most important stats are: Magic and Cunning", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +6 Magic, +0 Willpower, +3 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"Anorithils hail from the Gates of Morning, the last bastion of the free people in the Far East.", + _t"Their way of life is well represented by their motto 'We stand betwixt the Sun and Moon, where light and darkness meet. In the grey twilight we seek our destiny.'", + _t"They can channel the power of the Sun and the Moons to burn and tear apart all who seek to destroy the Sunwall.", + _t"Masters of Sun and Moon magic, they usually burn their foes with Sun rays before calling the fury of the stars.", + _t"Their most important stats are: Magic and Cunning", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +6 Magic, +0 Willpower, +3 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, power_source = {arcane=true}, stats = { mag=6, cun=3, }, diff --git a/game/modules/tome/data/birth/classes/chronomancer.lua b/game/modules/tome/data/birth/classes/chronomancer.lua index 1f4da2ae0d1902d8a9e19906edce1437e96689f1..350105439ffdc3544dedcb6600078ab7e4939b2c 100644 --- a/game/modules/tome/data/birth/classes/chronomancer.lua +++ b/game/modules/tome/data/birth/classes/chronomancer.lua @@ -23,11 +23,11 @@ newBirthDescriptor{ type = "class", name = "Chronomancer", locked = function() return profile.mod.allow_build.chronomancer end, - locked_desc = "Some do not walk upon the straight road others follow. Seek the hidden paths outside the normal course of life.", + locked_desc = _t"Some do not walk upon the straight road others follow. Seek the hidden paths outside the normal course of life.", desc = { - "Exploiting a hole in the fabric of spacetime, Chronomancers learn to pull threads from other timelines into their own.", - "Pulling these threads creates tension and the harder they pull the more tension is produced.", - "Constantly they manage this tension, which they call Paradox, to avoid or control the anomalies they inevitably unleash on the world around them.", + _t"Exploiting a hole in the fabric of spacetime, Chronomancers learn to pull threads from other timelines into their own.", + _t"Pulling these threads creates tension and the harder they pull the more tension is produced.", + _t"Constantly they manage this tension, which they call Paradox, to avoid or control the anomalies they inevitably unleash on the world around them.", }, descriptor_choices = { @@ -59,16 +59,16 @@ newBirthDescriptor{ type = "subclass", name = "Paradox Mage", locked = function() return profile.mod.allow_build.chronomancer_paradox_mage end, - locked_desc = "A hand may clap alone if it returns to clap itself. Search for the power in the paradox.", + locked_desc = _t"A hand may clap alone if it returns to clap itself. Search for the power in the paradox.", desc = { - "A Paradox Mage studies the very fabric of spacetime, learning not just to bend it but shape it and remake it.", - "Most Paradox Mages lack basic skills that others take for granted (like general fighting sense), but they make up for it through control of cosmic forces.", - "Paradox Mages start off with knowledge of all but the most complex Chronomantic schools.", - "Their most important stats are: Magic and Willpower", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +2 Constitution", - "#LIGHT_BLUE# * +5 Magic, +2 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"A Paradox Mage studies the very fabric of spacetime, learning not just to bend it but shape it and remake it.", + _t"Most Paradox Mages lack basic skills that others take for granted (like general fighting sense), but they make up for it through control of cosmic forces.", + _t"Paradox Mages start off with knowledge of all but the most complex Chronomantic schools.", + _t"Their most important stats are: Magic and Willpower", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +2 Constitution", + _t"#LIGHT_BLUE# * +5 Magic, +2 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, power_source = {arcane=true}, random_rarity = 2, @@ -149,15 +149,15 @@ newBirthDescriptor{ type = "subclass", name = "Temporal Warden", locked = function() return profile.mod.allow_build.chronomancer_temporal_warden end, - locked_desc = "We preserve the past to protect the future. The hands of time are guarded by the arms of war.", + locked_desc = _t"We preserve the past to protect the future. The hands of time are guarded by the arms of war.", desc = { - "Their lifelines braided, Temporal Wardens have learned to work with their other selves across multiple timelines.", - "Through their study of chronomancy, they learn to blend archery and dual-weapon fighting, seamlessly switching from one to the other.", - "Their most important stats are: Magic, Dexterity, and Willpower", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +3 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +4 Magic, +2 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +2", + _t"Their lifelines braided, Temporal Wardens have learned to work with their other selves across multiple timelines.", + _t"Through their study of chronomancy, they learn to blend archery and dual-weapon fighting, seamlessly switching from one to the other.", + _t"Their most important stats are: Magic, Dexterity, and Willpower", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +3 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +4 Magic, +2 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +2", }, power_source = {technique=true, arcane=true}, random_rarity = 2, diff --git a/game/modules/tome/data/birth/classes/corrupted.lua b/game/modules/tome/data/birth/classes/corrupted.lua index 49fc3200db44cc1f347c94662ecd35240beb144f..c58658f3b49cad2343bdbbf13ba1b269e87e04d7 100644 --- a/game/modules/tome/data/birth/classes/corrupted.lua +++ b/game/modules/tome/data/birth/classes/corrupted.lua @@ -22,9 +22,9 @@ newBirthDescriptor{ type = "class", name = "Defiler", locked = function() return profile.mod.allow_build.corrupter end, - locked_desc = "Dark thoughts, black bloods, vile deeds... Those who spill their brethren's blood will find its power.", + locked_desc = _t"Dark thoughts, black bloods, vile deeds... Those who spill their brethren's blood will find its power.", desc = { - "Defilers are touched by the mark of evil. They are a blight on the world. Working to promote the cause of evil, they serve their masters, or themselves become masters.", + _t"Defilers are touched by the mark of evil. They are a blight on the world. Working to promote the cause of evil, they serve their masters, or themselves become masters.", }, descriptor_choices = { @@ -44,15 +44,15 @@ newBirthDescriptor{ type = "subclass", name = "Reaver", locked = function() return profile.mod.allow_build.corrupter_reaver end, - locked_desc = "Reap thee the souls of thine enemies, and the powers of darkness shall enter thy flesh.", + locked_desc = _t"Reap thee the souls of thine enemies, and the powers of darkness shall enter thy flesh.", desc = { - "Reavers are terrible foes, charging their enemies with a weapon in each hand.", - "They can harness the blight of evil, infecting their foes with terrible contagious diseases while crushing their skulls with devastating combat techniques.", - "Their most important stats are: Strength and Magic", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +4 Strength, +1 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +4 Magic, +0 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +2", + _t"Reavers are terrible foes, charging their enemies with a weapon in each hand.", + _t"They can harness the blight of evil, infecting their foes with terrible contagious diseases while crushing their skulls with devastating combat techniques.", + _t"Their most important stats are: Strength and Magic", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +4 Strength, +1 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +4 Magic, +0 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +2", }, birth_example_particles = { function(actor) @@ -113,16 +113,16 @@ newBirthDescriptor{ type = "subclass", name = "Corruptor", locked = function() return profile.mod.allow_build.corrupter_corruptor end, - locked_desc = "Blight and depravity hold the greatest powers. Accept temptation and become one with corruption.", + locked_desc = _t"Blight and depravity hold the greatest powers. Accept temptation and become one with corruption.", desc = { - "A corruptor is a terrible foe, wielding dark magics that can sap the very soul of her target.", - "They can harness the blight of evil, crushing souls, stealing life force to replenish themselves.", - "The most powerful corruptors can even take on some demonic aspects for themselves.", - "Their most important stats are: Magic and Willpower", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +2 Constitution", - "#LIGHT_BLUE# * +4 Magic, +3 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"A corruptor is a terrible foe, wielding dark magics that can sap the very soul of her target.", + _t"They can harness the blight of evil, crushing souls, stealing life force to replenish themselves.", + _t"The most powerful corruptors can even take on some demonic aspects for themselves.", + _t"Their most important stats are: Magic and Willpower", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +2 Constitution", + _t"#LIGHT_BLUE# * +4 Magic, +3 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, power_source = {arcane=true}, stats = { mag=4, wil=3, con=2, }, diff --git a/game/modules/tome/data/birth/classes/mage.lua b/game/modules/tome/data/birth/classes/mage.lua index 01b792bd32d88597ac66daf8bb9a4098a11663c3..5f17b376978b83f3f4c2993d7713221a2c37d37c 100644 --- a/game/modules/tome/data/birth/classes/mage.lua +++ b/game/modules/tome/data/birth/classes/mage.lua @@ -35,7 +35,7 @@ newBirthDescriptor{ type = "class", name = "Mage", desc = { - "Mages are the wielders of arcane powers, able to cast powerful spells of destruction or to heal their wounds with nothing but a thought.", + _t"Mages are the wielders of arcane powers, able to cast powerful spells of destruction or to heal their wounds with nothing but a thought.", }, descriptor_choices = { @@ -58,15 +58,15 @@ newBirthDescriptor{ type = "subclass", name = "Alchemist", desc = { - "An Alchemist is a manipulator of materials using magic.", - "They do not use the forbidden arcane arts practised by the mages of old - such perverters of nature have been shunned or actively hunted down since the Spellblaze.", - "Alchemists can transmute gems to bring forth elemental effects, turning them into balls of fire, torrents of acid, and other effects. They can also reinforce armour with magical effects using gems, and channel arcane staffs to produce bolts of energy.", - "Though normally physically weak, most alchemists are accompanied by magical golems which they construct and use as bodyguards. These golems are enslaved to their master's will, and can grow in power as their master advances through the arts.", - "Their most important stats are: Magic and Constitution", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +3 Constitution", - "#LIGHT_BLUE# * +5 Magic, +1 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# -1", + _t"An Alchemist is a manipulator of materials using magic.", + _t"They do not use the forbidden arcane arts practised by the mages of old - such perverters of nature have been shunned or actively hunted down since the Spellblaze.", + _t"Alchemists can transmute gems to bring forth elemental effects, turning them into balls of fire, torrents of acid, and other effects. They can also reinforce armour with magical effects using gems, and channel arcane staffs to produce bolts of energy.", + _t"Though normally physically weak, most alchemists are accompanied by magical golems which they construct and use as bodyguards. These golems are enslaved to their master's will, and can grow in power as their master advances through the arts.", + _t"Their most important stats are: Magic and Constitution", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +3 Constitution", + _t"#LIGHT_BLUE# * +5 Magic, +1 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# -1", }, power_source = {arcane=true}, stats = { mag=5, con=3, wil=1, }, @@ -131,7 +131,7 @@ newBirthDescriptor{ }, cosmetic_options = { golem = { - {name="Golem becomes a Drolem", on_actor=function(actor) actor.alchemist_golem_is_drolem = true end, unlock="cosmetic_class_alchemist_drolem"}, + {name=_t"Golem becomes a Drolem", on_actor=function(actor) actor.alchemist_golem_is_drolem = true end, unlock="cosmetic_class_alchemist_drolem"}, }, }, } @@ -140,17 +140,17 @@ newBirthDescriptor{ type = "subclass", name = "Archmage", locked = function() return profile.mod.allow_build.mage end, - locked_desc = "Hated, harrowed, hunted, hidden... Our ways are forbidden, but our cause is just. In our veiled valley we find solace from the world's wrath, free to study our arts. Only through charity and friendship can you earn our trust.", + locked_desc = _t"Hated, harrowed, hunted, hidden... Our ways are forbidden, but our cause is just. In our veiled valley we find solace from the world's wrath, free to study our arts. Only through charity and friendship can you earn our trust.", desc = { - "An Archmage devotes his whole life to the study of magic above anything else.", - "Most Archmagi lack basic skills that others take for granted (like general fighting sense), but they make up for it by their raw magical power.", - "Archmagi start with knowledge of many schools of magic. However, they usually refuse to have anything to do with Necromancy.", - "Most Archmagi have been trained in the secret town of Angolwen and possess a unique spell to teleport to it directly.", - "Their most important stats are: Magic and Willpower", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +5 Magic, +3 Willpower, +1 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# -4", + _t"An Archmage devotes his whole life to the study of magic above anything else.", + _t"Most Archmagi lack basic skills that others take for granted (like general fighting sense), but they make up for it by their raw magical power.", + _t"Archmagi start with knowledge of many schools of magic. However, they usually refuse to have anything to do with Necromancy.", + _t"Most Archmagi have been trained in the secret town of Angolwen and possess a unique spell to teleport to it directly.", + _t"Their most important stats are: Magic and Willpower", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +5 Magic, +3 Willpower, +1 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# -4", }, power_source = {arcane=true}, stats = { mag=5, wil=3, cun=1, }, @@ -242,15 +242,15 @@ newBirthDescriptor{ type = "subclass", name = "Necromancer", locked = function() return profile.mod.allow_build.mage_necromancer end, - locked_desc = "The road to necromancy is a macabre path indeed. Walk with the dead, and drink deeply of their black knowledge.", + locked_desc = _t"The road to necromancy is a macabre path indeed. Walk with the dead, and drink deeply of their black knowledge.", desc = { - "While most magic is viewed with suspicion since the Spellblaze, the stigma surrounding the black art of Necromancy has been around since time immemorial.", - "These dark spellcasters extinguish life, twist death, and raise armies of undead monsters to sate their lust for power and pursue their ultimate goal: Eternal life.", - "Their most important stats are: Magic and Willpower", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +5 Magic, +3 Willpower, +1 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# -3", + _t"While most magic is viewed with suspicion since the Spellblaze, the stigma surrounding the black art of Necromancy has been around since time immemorial.", + _t"These dark spellcasters extinguish life, twist death, and raise armies of undead monsters to sate their lust for power and pursue their ultimate goal: Eternal life.", + _t"Their most important stats are: Magic and Willpower", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +5 Magic, +3 Willpower, +1 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# -3", }, power_source = {arcane=true}, stats = { mag=5, wil=3, cun=1, }, diff --git a/game/modules/tome/data/birth/classes/none.lua b/game/modules/tome/data/birth/classes/none.lua index e8c88b05afc11879c0c6a4c2353064fd3bbd782e..ad1e4fa622d00ae62c58cdd161a8101d687db785 100644 --- a/game/modules/tome/data/birth/classes/none.lua +++ b/game/modules/tome/data/birth/classes/none.lua @@ -21,7 +21,7 @@ newBirthDescriptor{ type = "class", name = "None", desc = { - "Your race cannot select a class; it has its own powers.", + _t"Your race cannot select a class; it has its own powers.", }, descriptor_choices = { @@ -37,7 +37,7 @@ newBirthDescriptor{ type = "subclass", name = "None", desc = { - "Your race cannot select a class; it has its own powers.", + _t"Your race cannot select a class; it has its own powers.", }, not_on_random_boss = true, } diff --git a/game/modules/tome/data/birth/classes/psionic.lua b/game/modules/tome/data/birth/classes/psionic.lua index a8a7358672e34e8aa5674acf1b1cd7cc77530fe9..f986bdccd1a3ea3160864f8528bebb0c2c75f37c 100644 --- a/game/modules/tome/data/birth/classes/psionic.lua +++ b/game/modules/tome/data/birth/classes/psionic.lua @@ -23,9 +23,9 @@ newBirthDescriptor{ type = "class", name = "Psionic", locked = function() return profile.mod.allow_build.psionic end, - locked_desc = "Weakness of flesh can be overcome by mental prowess. Find the way and fight for the way to open the key to your mind.", + locked_desc = _t"Weakness of flesh can be overcome by mental prowess. Find the way and fight for the way to open the key to your mind.", desc = { - "Psionics find their power within themselves. Their highly trained minds can harness energy from many different sources and manipulate it to produce physical effects.", + _t"Psionics find their power within themselves. Their highly trained minds can harness energy from many different sources and manipulate it to produce physical effects.", }, descriptor_choices = { @@ -45,15 +45,15 @@ newBirthDescriptor{ type = "subclass", name = "Mindslayer", locked = function() return profile.mod.allow_build.psionic_mindslayer end, - locked_desc = "A thought can inspire; a thought can kill. After centuries of oppression, years of imprisonment, a thought shall break us free and vengeance will strike from our darkest dreams.", + locked_desc = _t"A thought can inspire; a thought can kill. After centuries of oppression, years of imprisonment, a thought shall break us free and vengeance will strike from our darkest dreams.", desc = { - "Mindslayers specialize in direct and brutal application of mental forces to their immediate surroundings.", - "When Mindslayers do battle, they will most often be found in the thick of the fighting, vast energies churning around them and telekinetically-wielded weapons hewing nearby foes at the speed of thought.", - "Their most important stats are: Willpower and Cunning", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +1 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +4 Willpower, +4 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# -2", + _t"Mindslayers specialize in direct and brutal application of mental forces to their immediate surroundings.", + _t"When Mindslayers do battle, they will most often be found in the thick of the fighting, vast energies churning around them and telekinetically-wielded weapons hewing nearby foes at the speed of thought.", + _t"Their most important stats are: Willpower and Cunning", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +1 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +4 Willpower, +4 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# -2", }, power_source = {psionic=true, technique=true}, stats = { str=1, wil=4, cun=4, }, @@ -134,16 +134,16 @@ newBirthDescriptor{ type = "subclass", name = "Solipsist", locked = function() return profile.mod.allow_build.psionic_solipsist end, - locked_desc = "Some believe that the world is the collective dream of those that live in it. Find and wake the sleeper and you'll unlock the potential of your dreams.", + locked_desc = _t"Some believe that the world is the collective dream of those that live in it. Find and wake the sleeper and you'll unlock the potential of your dreams.", desc = { - "The Solipsist believes that reality is malleable and nothing more than the collective vision of those that experience it.", - "They wield this knowledge to both create and destroy, to invade the minds of others, and to manipulate the dreams of those around them.", - "This knowledge comes with a heavy price and the Solipsist must guard his thoughts, lest he come to believe that the world exists only within his own mind.", - "Their most important stats are: Willpower and Cunning", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +5 Willpower, +4 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# -4 (*special*)", + _t"The Solipsist believes that reality is malleable and nothing more than the collective vision of those that experience it.", + _t"They wield this knowledge to both create and destroy, to invade the minds of others, and to manipulate the dreams of those around them.", + _t"This knowledge comes with a heavy price and the Solipsist must guard his thoughts, lest he come to believe that the world exists only within his own mind.", + _t"Their most important stats are: Willpower and Cunning", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +5 Willpower, +4 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# -4 (*special*)", }, power_source = {psionic=true}, random_rarity = 3, diff --git a/game/modules/tome/data/birth/classes/rogue.lua b/game/modules/tome/data/birth/classes/rogue.lua index 4dfe7be192ea1d69bdfe12cb2ca9d2b247614b93..9667ebfc27aa213bc5b5936b58acd2d9a55ee686 100644 --- a/game/modules/tome/data/birth/classes/rogue.lua +++ b/game/modules/tome/data/birth/classes/rogue.lua @@ -22,7 +22,7 @@ newBirthDescriptor{ type = "class", name = "Rogue", desc = { - "Rogues are masters of tricks; they can strike from the shadows, and lure monsters into deadly traps.", + _t"Rogues are masters of tricks; they can strike from the shadows, and lure monsters into deadly traps.", }, descriptor_choices = { @@ -44,13 +44,13 @@ newBirthDescriptor{ type = "subclass", name = "Rogue", desc = { - "Rogues are masters of tricks. A Rogue can get behind you unnoticed and stab you in the back for tremendous damage.", - "Rogues usually prefer to dual-wield daggers. They can also become trapping experts, detecting and disarming traps as well as setting them.", - "Their most important stats are: Dexterity and Cunning", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +1 Strength, +3 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +5 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"Rogues are masters of tricks. A Rogue can get behind you unnoticed and stab you in the back for tremendous damage.", + _t"Rogues usually prefer to dual-wield daggers. They can also become trapping experts, detecting and disarming traps as well as setting them.", + _t"Their most important stats are: Dexterity and Cunning", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +1 Strength, +3 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +5 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, power_source = {technique=true}, stats = { dex=3, str=1, cun=5, }, @@ -99,14 +99,14 @@ newBirthDescriptor{ type = "subclass", name = "Shadowblade", desc = { - "Shadowblades are Rogues that are touched by the gift of magic, able to kill with their daggers under a veil of stealth while casting spells to enhance their performance and survival.", - "Their use of magic is innate and not really studied; as such they do not naturally regenerate mana and must use external means of recharging.", - "They use the schools of Phantasm, Temporal, Divination and Conveyance magic to enhance their arts.", - "Their most important stats are: Dexterity, Cunning and Magic", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +3 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +3 Magic, +0 Willpower, +3 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"Shadowblades are Rogues that are touched by the gift of magic, able to kill with their daggers under a veil of stealth while casting spells to enhance their performance and survival.", + _t"Their use of magic is innate and not really studied; as such they do not naturally regenerate mana and must use external means of recharging.", + _t"They use the schools of Phantasm, Temporal, Divination and Conveyance magic to enhance their arts.", + _t"Their most important stats are: Dexterity, Cunning and Magic", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +3 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +3 Magic, +0 Willpower, +3 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, birth_example_particles = { function(actor) if core.shader.active(4) then @@ -162,15 +162,15 @@ newBirthDescriptor{ type = "subclass", name = "Marauder", locked = function() return profile.mod.allow_build.rogue_marauder end, - locked_desc = "I will not hide and I will not sneak - come dance with my blades and we'll see who's weak. Snapping bone and cracking skull, it's the sounds of battle that make life full!", + locked_desc = _t"I will not hide and I will not sneak - come dance with my blades and we'll see who's weak. Snapping bone and cracking skull, it's the sounds of battle that make life full!", desc = { - "The wilds of Maj'Eyal are not a safe place. Untamed beasts and wandering dragons may seem a great threat, but the true perils walk on two legs. Thieves and brigands, assassins and opportunistic adventurers, even mad wizards and magic-hating zealots all carry danger to those who venture beyond the safety of city walls.", - "Amidst this chaos wanders one class of rogue that has learned to take by force rather than subterfuge. With refined techniques, agile feats and brawn-backed blades the Marauder seeks out his targets and removes them by the most direct methods. He uses dual weapons backed by advanced combat training to become highly effective in battle, and he is unafraid to use the dirtiest tactics when the odds are against him.", - "Their most important stats are: Strength, Dexterity and Cunning", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +4 Strength, +4 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +1 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"The wilds of Maj'Eyal are not a safe place. Untamed beasts and wandering dragons may seem a great threat, but the true perils walk on two legs. Thieves and brigands, assassins and opportunistic adventurers, even mad wizards and magic-hating zealots all carry danger to those who venture beyond the safety of city walls.", + _t"Amidst this chaos wanders one class of rogue that has learned to take by force rather than subterfuge. With refined techniques, agile feats and brawn-backed blades the Marauder seeks out his targets and removes them by the most direct methods. He uses dual weapons backed by advanced combat training to become highly effective in battle, and he is unafraid to use the dirtiest tactics when the odds are against him.", + _t"Their most important stats are: Strength, Dexterity and Cunning", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +4 Strength, +4 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +1 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, power_source = {technique=true}, stats = { dex=4, str=4, cun=1, }, @@ -223,15 +223,15 @@ newBirthDescriptor{ type = "subclass", name = "Skirmisher", locked = function() return profile.mod.allow_build.rogue_skirmisher end, - locked_desc = "Fleet of foot and strong of throw, overwhelming every foe, from afar we counter, strike and thud, in the chaos'd skirmish spilling blood.", + locked_desc = _t"Fleet of foot and strong of throw, overwhelming every foe, from afar we counter, strike and thud, in the chaos'd skirmish spilling blood.", desc = { - "While able to take maximum advantage of their sling by using deft movements to avoid and confuse enemies that try to get close, the Skirmisher truly excels when fighting other ranged users.", - "They have mastered the use of their shield as well as their sling and are nearly impossible to defeat in a standoff.", - "Their most important stats are: Dexterity and Cunning", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +4 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +1 Willpower, +4 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"While able to take maximum advantage of their sling by using deft movements to avoid and confuse enemies that try to get close, the Skirmisher truly excels when fighting other ranged users.", + _t"They have mastered the use of their shield as well as their sling and are nearly impossible to defeat in a standoff.", + _t"Their most important stats are: Dexterity and Cunning", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +4 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +1 Willpower, +4 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, --not_on_random_boss = true, power_source = {technique=true, technique_ranged=true}, diff --git a/game/modules/tome/data/birth/classes/tutorial.lua b/game/modules/tome/data/birth/classes/tutorial.lua index c26eb5a75865fecfec167a6460c90acaf8baa513..72be66cfe24db20e7e936bc1b18ee10e608ae815 100644 --- a/game/modules/tome/data/birth/classes/tutorial.lua +++ b/game/modules/tome/data/birth/classes/tutorial.lua @@ -21,7 +21,7 @@ newBirthDescriptor{ type = "class", name = "Tutorial Adventurer", desc = { - "Adventurers have a generic talent set to teach to young ones.", + _t"Adventurers have a generic talent set to teach to young ones.", }, descriptor_choices = { @@ -46,7 +46,7 @@ newBirthDescriptor{ type = "subclass", name = "Tutorial Adventurer", desc = { - "Adventurers have a generic talent set to teach to young ones.", + _t"Adventurers have a generic talent set to teach to young ones.", }, not_on_random_boss = true, stats = { str=10, con=5, dex=8, mag=10, wil=5, cun=5 }, diff --git a/game/modules/tome/data/birth/classes/warrior.lua b/game/modules/tome/data/birth/classes/warrior.lua index 020bb9d4f7c68b89f74c713d8aa86bee154dd206..39e5c8d52cfe49efbfd04bece1b8d8395d8d0a9e 100644 --- a/game/modules/tome/data/birth/classes/warrior.lua +++ b/game/modules/tome/data/birth/classes/warrior.lua @@ -23,7 +23,7 @@ newBirthDescriptor{ type = "class", name = "Warrior", desc = { - "Warriors train in all aspects of physical combat. They can be juggernauts of destruction wielding two-handed greatswords, or massive iron-clad protectors with gleaming shields.", + _t"Warriors train in all aspects of physical combat. They can be juggernauts of destruction wielding two-handed greatswords, or massive iron-clad protectors with gleaming shields.", }, descriptor_choices = { @@ -46,13 +46,13 @@ newBirthDescriptor{ type = "subclass", name = "Berserker", desc = { - "A Berserker wields huge two-handed weapons of destruction, bringing pain and death to his foes as he cleaves them in two.", - "A Berserker usually forfeits all ideas of self-defense to concentrate on what he does best: killing things.", - "Their most important stats are: Strength and Constitution", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +5 Strength, +1 Dexterity, +3 Constitution", - "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +3", + _t"A Berserker wields huge two-handed weapons of destruction, bringing pain and death to his foes as he cleaves them in two.", + _t"A Berserker usually forfeits all ideas of self-defense to concentrate on what he does best: killing things.", + _t"Their most important stats are: Strength and Constitution", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +5 Strength, +1 Dexterity, +3 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +3", }, birth_example_particles = { function(actor) if core.shader.active() then @@ -113,13 +113,13 @@ newBirthDescriptor{ type = "subclass", name = "Bulwark", desc = { - "A Bulwark specializes in weapon and shield combat, rarely leaving the cover of her many protective techniques.", - "A good Bulwark is able to withstand terrible attacks from all sides, protected by her shield, and when the time comes lash out at her foes with incredible strength.", - "Their most important stats are: Strength and Dexterity", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +5 Strength, +2 Dexterity, +2 Constitution", - "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +6", + _t"A Bulwark specializes in weapon and shield combat, rarely leaving the cover of her many protective techniques.", + _t"A good Bulwark is able to withstand terrible attacks from all sides, protected by her shield, and when the time comes lash out at her foes with incredible strength.", + _t"Their most important stats are: Strength and Dexterity", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +5 Strength, +2 Dexterity, +2 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +6", }, birth_example_particles = { function(actor) if core.shader.active() then @@ -183,14 +183,14 @@ newBirthDescriptor{ type = "subclass", name = "Archer", desc = { - "Archers are dexterous ranged fighters, able to pin their foes to the ground and rain down a carpet of arrows on them.", - "Skilled archers can fire special shots that pierce, cripple or pin their foes.", - "Archers can become good with either longbows or slings.", - "Their most important stats are: Dexterity and Strength (when using bows) or Cunning (when using slings)", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +2 Strength, +5 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +2 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"Archers are dexterous ranged fighters, able to pin their foes to the ground and rain down a carpet of arrows on them.", + _t"Skilled archers can fire special shots that pierce, cripple or pin their foes.", + _t"Archers can become good with either longbows or slings.", + _t"Their most important stats are: Dexterity and Strength (when using bows) or Cunning (when using slings)", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +2 Strength, +5 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +2 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, unlockable_talents_types = { ["cunning/poisons"]={false, 0.0, "rogue_poisons"}, @@ -258,15 +258,15 @@ newBirthDescriptor{ type = "subclass", name = "Arcane Blade", desc = { - "The Arcane Blade is a warrior who has been touched by the gift of magic.", - "Their use of magic is innate and not really studied; as such they do not naturally regenerate mana and must use external means of recharging.", - "They can cast spells from a limited selection but have the unique capacity to 'channel' their attack spells through their melee attacks.", - "They are adept with two-handed weapons, for the sheer destruction they can bring.", - "Their most important stats are: Strength, Cunning and Magic", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +3 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +3 Magic, +0 Willpower, +3 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +2", + _t"The Arcane Blade is a warrior who has been touched by the gift of magic.", + _t"Their use of magic is innate and not really studied; as such they do not naturally regenerate mana and must use external means of recharging.", + _t"They can cast spells from a limited selection but have the unique capacity to 'channel' their attack spells through their melee attacks.", + _t"They are adept with two-handed weapons, for the sheer destruction they can bring.", + _t"Their most important stats are: Strength, Cunning and Magic", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +3 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +3 Magic, +0 Willpower, +3 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +2", }, power_source = {technique=true, arcane=true}, stats = { mag=3, str=3, cun=3}, @@ -337,18 +337,18 @@ newBirthDescriptor{ type = "subclass", name = "Brawler", locked = function() return profile.mod.allow_build.warrior_brawler end, - locked_desc = "Though you may fight alone against many, destined to fight till you die, still you do not relent. In a ring of blood you learn that a pair of fists can face the world.", + locked_desc = _t"Though you may fight alone against many, destined to fight till you die, still you do not relent. In a ring of blood you learn that a pair of fists can face the world.", desc = { - "The ravages of the Spellblaze stretched armies thin and left many unprotected. Not everyone could afford the luxury of a weapon.", - "Without steel or iron, poor communities of all races turned to the strength of their own bodies for defense against the darkness.", - "Whether a pit-fighter, a boxer, or just an amateur practitioner, the Brawler's skills are still handy today.", - "Many of the Brawler's abilities will earn combo points which they can use on finishing moves that will have added effect.", - "The unarmed fighting styles the Brawler uses rely on maneuverability and having both hands available. As such, they cannot make use of their training wearing massive armour or while a weapon or shield is equipped.", - "Their most important stats are: Strength, Dexterity, and Cunning", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +3 Strength, +3 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +3 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +2", + _t"The ravages of the Spellblaze stretched armies thin and left many unprotected. Not everyone could afford the luxury of a weapon.", + _t"Without steel or iron, poor communities of all races turned to the strength of their own bodies for defense against the darkness.", + _t"Whether a pit-fighter, a boxer, or just an amateur practitioner, the Brawler's skills are still handy today.", + _t"Many of the Brawler's abilities will earn combo points which they can use on finishing moves that will have added effect.", + _t"The unarmed fighting styles the Brawler uses rely on maneuverability and having both hands available. As such, they cannot make use of their training wearing massive armour or while a weapon or shield is equipped.", + _t"Their most important stats are: Strength, Dexterity, and Cunning", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +3 Strength, +3 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +3 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +2", }, power_source = {technique=true}, stats = { str=3, dex=3, cun=3}, diff --git a/game/modules/tome/data/birth/classes/wilder.lua b/game/modules/tome/data/birth/classes/wilder.lua index e38452618cda87b3f1add1706aeb5c7f0f749141..ff917e69c5fb50955b369ae8d488983dec2e4937 100644 --- a/game/modules/tome/data/birth/classes/wilder.lua +++ b/game/modules/tome/data/birth/classes/wilder.lua @@ -23,10 +23,10 @@ newBirthDescriptor{ type = "class", name = "Wilder", locked = function() return profile.mod.allow_build.wilder_wyrmic or profile.mod.allow_build.wilder_summoner or profile.mod.allow_build.wilder_stone_warden end, - locked_desc = "Natural abilities can go beyond mere skill. Experience the true powers of nature to learn of its amazing gifts.", + locked_desc = _t"Natural abilities can go beyond mere skill. Experience the true powers of nature to learn of its amazing gifts.", desc = { - "Wilders are one with nature, in one manner or another. There are as many different Wilders as there are aspects of nature.", - "They can take on the aspects of creatures, summon creatures to them, feel the druidic call, ...", + _t"Wilders are one with nature, in one manner or another. There are as many different Wilders as there are aspects of nature.", + _t"They can take on the aspects of creatures, summon creatures to them, feel the druidic call, ...", }, descriptor_choices = { @@ -47,20 +47,20 @@ newBirthDescriptor{ type = "subclass", name = "Summoner", locked = function() return profile.mod.allow_build.wilder_summoner end, - locked_desc = "Not all might comes from within. Hear the invocations of nature, hear its calling power. See that from without we can find our true strengths.", + locked_desc = _t"Not all might comes from within. Hear the invocations of nature, hear its calling power. See that from without we can find our true strengths.", desc = { - "Summoners never fight alone. They are always ready to summon one of their many minions to fight at their side.", - "Summons can range from a combat hound to a fire drake.", - "Their most important stats are: Willpower and Cunning", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +1 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +5 Willpower, +3 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +0", + _t"Summoners never fight alone. They are always ready to summon one of their many minions to fight at their side.", + _t"Summons can range from a combat hound to a fire drake.", + _t"Their most important stats are: Willpower and Cunning", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +1 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +5 Willpower, +3 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +0", }, power_source = {nature=true}, getStatDesc = function(stat, actor) if stat == actor.STAT_CUN then - return "Max summons: "..math.floor(actor:getCun()/10) + return ("Max summons: %d"):tformat(math.floor(actor:getCun()/10)) end end, stats = { wil=5, cun=3, dex=1, }, @@ -109,15 +109,15 @@ newBirthDescriptor{ type = "subclass", name = "Wyrmic", locked = function() return profile.mod.allow_build.wilder_wyrmic end, - locked_desc = "Sleek, majestic, powerful... In the path of dragons we walk, and their breath is our breath. See their beating hearts with your eyes and taste their majesty between your teeth.", + locked_desc = _t"Sleek, majestic, powerful... In the path of dragons we walk, and their breath is our breath. See their beating hearts with your eyes and taste their majesty between your teeth.", desc = { - "Wyrmics are fighters who have learnt how to mimic some of the aspects of the dragons.", - "They have access to talents normally belonging to the various kind of drakes.", - "Their most important stats are: Strength and Willpower", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +5 Strength, +0 Dexterity, +1 Constitution", - "#LIGHT_BLUE# * +0 Magic, +3 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +2", + _t"Wyrmics are fighters who have learnt how to mimic some of the aspects of the dragons.", + _t"They have access to talents normally belonging to the various kind of drakes.", + _t"Their most important stats are: Strength and Willpower", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +5 Strength, +0 Dexterity, +1 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +3 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +2", }, birth_example_particles = { function(actor) if core.shader.active(4) then local x, y = actor:attachementSpot("back", true) actor:addParticles(Particles.new("shader_wings", 1, {x=x, y=y, life=18, fade=-0.006, deploy_speed=14})) end end, @@ -180,21 +180,21 @@ newBirthDescriptor{ type = "subclass", name = "Oozemancer", locked = function() return profile.mod.allow_build.wilder_oozemancer end, - locked_desc = "Magic must fail, magic must lose, nothing arcane can face the ooze...", + locked_desc = _t"Magic must fail, magic must lose, nothing arcane can face the ooze...", desc = { - "Oozemancers separate themselves from normal civilisation so that they be more in harmony with Nature. Arcane force are reviled by them, and their natural attunement to the wilds lets them do battle with abusive magic-users on an equal footing.", - "They can spawn oozes to protect and attack from a distance while also being adept at harnessing the power of mindstars and psiblades.", - "Their most important stats are: Willpower and Cunning", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +5 Willpower, +4 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# -3", + _t"Oozemancers separate themselves from normal civilisation so that they be more in harmony with Nature. Arcane force are reviled by them, and their natural attunement to the wilds lets them do battle with abusive magic-users on an equal footing.", + _t"They can spawn oozes to protect and attack from a distance while also being adept at harnessing the power of mindstars and psiblades.", + _t"Their most important stats are: Willpower and Cunning", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +5 Willpower, +4 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# -3", }, power_source = {nature=true, antimagic=true}, random_rarity = 3, getStatDesc = function(stat, actor) if stat == actor.STAT_CUN then - return "Max summons: "..math.floor(actor:getCun()/10) + return ("Max summons: %d"):tformat(math.floor(actor:getCun()/10)) end end, birth_example_particles = { @@ -257,16 +257,16 @@ newBirthDescriptor{ type = "subclass", name = "Stone Warden", locked = function() return profile.mod.allow_build.wilder_stone_warden end, - locked_desc = "The Spellblaze's scars may be starting to heal,\nbut little can change how the partisans feel.\nNature and arcane could bridge their divide -\nand when it comes down to it, gold won't take sides...", + locked_desc = _t"The Spellblaze's scars may be starting to heal,\nbut little can change how the partisans feel.\nNature and arcane could bridge their divide -\nand when it comes down to it, gold won't take sides...", desc = { - "Stone Wardens are dwarves trained in both the eldritch arts and the worship of nature.", - "While other races are stuck in their belief that arcane forces and natural forces are meant to oppose, dwarves have found a way to combine them in harmony.", - "Stone Wardens are armoured fighters, dual wielding shields to channel many of their powers.", - "Their most important stats are: Strength, Magic and Willpower", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +2 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +4 Magic, +3 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# +2", + _t"Stone Wardens are dwarves trained in both the eldritch arts and the worship of nature.", + _t"While other races are stuck in their belief that arcane forces and natural forces are meant to oppose, dwarves have found a way to combine them in harmony.", + _t"Stone Wardens are armoured fighters, dual wielding shields to channel many of their powers.", + _t"Their most important stats are: Strength, Magic and Willpower", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +2 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +4 Magic, +3 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# +2", }, special_check = function(birth) if birth.descriptors_by_type.race ~= "Dwarf" then return false end diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index e728d06974af0612510e477b2da05c12fe50725f..d18485f4480d763e30a36da8101c3c49a15fc738 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -100,11 +100,11 @@ newBirthDescriptor{ never_show = true, desc = { - "#GOLD##{bold}#Tutorial mode", - "#WHITE#Start with a simplified character and discover the game in a simple quest.#{normal}#", - "All damage done to the player reduced by 20%", - "All healing for the player increased by 10%", - "No main game achievements possible.", + _t"#GOLD##{bold}#Tutorial mode", + _t"#WHITE#Start with a simplified character and discover the game in a simple quest.#{normal}#", + _t"All damage done to the player reduced by 20%", + _t"All healing for the player increased by 10%", + _t"No main game achievements possible.", }, descriptor_choices = { @@ -147,17 +147,17 @@ newBirthDescriptor{ newBirthDescriptor{ type = "difficulty", name = "Easy", - display_name = "Easier", + display_name = _t"Easier", selection_default = config.settings.tome.default_birth and config.settings.tome.default_birth.difficulty == "Easy", desc = { - "#GOLD##{bold}#Easier mode#WHITE##{normal}#", - "Provides an easier game experience.", - "Use it if you feel uneasy tackling the harder modes.", - "All damage done to the player decreased by 30%", - "All healing for the player increased by 30%", - "All detrimental status effects durations reduced by 50%", - "Achievements are not granted.", + _t"#GOLD##{bold}#Easier mode#WHITE##{normal}#", + _t"Provides an easier game experience.", + _t"Use it if you feel uneasy tackling the harder modes.", + _t"All damage done to the player decreased by 30%", + _t"All healing for the player increased by 30%", + _t"All detrimental status effects durations reduced by 50%", + _t"Achievements are not granted.", }, descriptor_choices = { @@ -175,9 +175,9 @@ newBirthDescriptor{ selection_default = (config.settings.tome.default_birth and config.settings.tome.default_birth.difficulty == "Normal") or (not config.settings.tome.default_birth) or (config.settings.tome.default_birth and not config.settings.tome.default_birth.difficulty), desc = { - "#GOLD##{bold}#Normal mode#WHITE##{normal}#", - "Provides the normal level of challenges.", - "Stairs can not be used for 2 turns after a kill.", + _t"#GOLD##{bold}#Normal mode#WHITE##{normal}#", + _t"Provides the normal level of challenges.", + _t"Stairs can not be used for 2 turns after a kill.", }, descriptor_choices = { @@ -195,14 +195,14 @@ newBirthDescriptor{ selection_default = config.settings.tome.default_birth and config.settings.tome.default_birth.difficulty == "Nightmare", desc = { - "#GOLD##{bold}#Nightmare mode#WHITE##{normal}#", - "Unfair game setting", - "All zone levels increased by 50% by the time Player reaches level 10", - "All creature talent levels increased by 30%", - "Unique (fixed) bosses advance in bonus classes 30% faster", - "Rare creatures are slightly more frequent", - "Stairs can not be used for 3 turns after a kill.", - "Player can earn Nightmare version of achievements if also playing in Roguelike or Adventure permadeath mode.", + _t"#GOLD##{bold}#Nightmare mode#WHITE##{normal}#", + _t"Unfair game setting", + _t"All zone levels increased by 50% by the time Player reaches level 10", + _t"All creature talent levels increased by 30%", + _t"Unique (fixed) bosses advance in bonus classes 30% faster", + _t"Rare creatures are slightly more frequent", + _t"Stairs can not be used for 3 turns after a kill.", + _t"Player can earn Nightmare version of achievements if also playing in Roguelike or Adventure permadeath mode.", }, descriptor_choices = { @@ -228,18 +228,18 @@ newBirthDescriptor{ type = "difficulty", name = "Insane", locked = function() return profile.mod.allow_build.difficulty_insane end, - locked_desc = "Easy is for the weak! Normal is for the weak! Nightmare is too easy! Bring on the true pain!", + locked_desc = _t"Easy is for the weak! Normal is for the weak! Nightmare is too easy! Bring on the true pain!", selection_default = config.settings.tome.default_birth and config.settings.tome.default_birth.difficulty == "Insane", desc = { - "#GOLD##{bold}#Insane mode#WHITE##{normal}#", - "Similar rules to Nightmare, but with more random bosses!", - "All zone levels increased by 50% + 1 by the time Player reaches level 10", - "All creature talent levels increased by 70%", - "Unique (fixed) bosses advance in bonus classes 70% faster", - "Rare creatures are far more frequent and random bosses start to appear", - "Stairs can not be used for 5 turns after a kill.", - "Player can earn Insane version of achievements if also playing in Roguelike or Adventure permadeath mode.", + _t"#GOLD##{bold}#Insane mode#WHITE##{normal}#", + _t"Similar rules to Nightmare, but with more random bosses!", + _t"All zone levels increased by 50% + 1 by the time Player reaches level 10", + _t"All creature talent levels increased by 70%", + _t"Unique (fixed) bosses advance in bonus classes 70% faster", + _t"Rare creatures are far more frequent and random bosses start to appear", + _t"Stairs can not be used for 5 turns after a kill.", + _t"Player can earn Insane version of achievements if also playing in Roguelike or Adventure permadeath mode.", }, descriptor_choices = { @@ -266,21 +266,21 @@ newBirthDescriptor{ type = "difficulty", name = "Madness", locked = function() return profile.mod.allow_build.difficulty_madness end, - locked_desc = "Insane is for the weak! Bring on the true mind-shattering experience!", + locked_desc = _t"Insane is for the weak! Bring on the true mind-shattering experience!", selection_default = config.settings.tome.default_birth and config.settings.tome.default_birth.difficulty == "Madness", desc = { - "#GOLD##{bold}#Madness mode#WHITE##{normal}#", - "Absolutely unfair game setting. You are really mentally ill and wish to get worse to play this mode!", - "All zone levels increased by 150% + 2 by the time Player reaches level 10", - "All creature talent levels increased by 170%", - "Unique (fixed) bosses advance in bonus classes 170% faster", - "All enemies have 200% more life", - "Rare creatures are far more frequent and random bosses start to appear", - "Stairs can not be used for 9 turns after a kill.", - "Player starts with 100 more life and 500 gold, but trust us, you'll need it!", - "Player is being hunted! Randomly all foes in a radius will get a feeling of where she/he is", - "Player can earn Madness version of achievements if also playing in Roguelike or Adventure permadeath mode.", + _t"#GOLD##{bold}#Madness mode#WHITE##{normal}#", + _t"Absolutely unfair game setting. You are really mentally ill and wish to get worse to play this mode!", + _t"All zone levels increased by 150% + 2 by the time Player reaches level 10", + _t"All creature talent levels increased by 170%", + _t"Unique (fixed) bosses advance in bonus classes 170% faster", + _t"All enemies have 200% more life", + _t"Rare creatures are far more frequent and random bosses start to appear", + _t"Stairs can not be used for 9 turns after a kill.", + _t"Player starts with 100 more life and 500 gold, but trust us, you'll need it!", + _t"Player is being hunted! Randomly all foes in a radius will get a feeling of where she/he is", + _t"Player can earn Madness version of achievements if also playing in Roguelike or Adventure permadeath mode.", }, descriptor_choices = { @@ -314,17 +314,17 @@ newBirthDescriptor{ type = "permadeath", name = "Exploration", locked = function(birther) return birther:isDonator() end, - locked_desc = "Exploration mode: Infinite lives (donator feature)", + locked_desc = _t"Exploration mode: Infinite lives (donator feature)", locked_select = function(birther) birther:selectExplorationNoDonations() end, selection_default = config.settings.tome.default_birth and config.settings.tome.default_birth.permadeath == "Exploration", desc = { - "#GOLD##{bold}#Exploration mode#WHITE#", - "Provides you with infinite lives.#{normal}#", - "This is not the way the game is meant to be played, but it allows you to have a more forgiving experience.", - "Remember though that dying is an integral part of the game and helps you become a better player.", - "Exploration version of achievements will be granted in this mode.", - "Full talent respec is always available.", + _t"#GOLD##{bold}#Exploration mode#WHITE#", + _t"Provides you with infinite lives.#{normal}#", + _t"This is not the way the game is meant to be played, but it allows you to have a more forgiving experience.", + _t"Remember though that dying is an integral part of the game and helps you become a better player.", + _t"Exploration version of achievements will be granted in this mode.", + _t"Full talent respec is always available.", }, game_state = { force_town_respec = false, @@ -340,10 +340,10 @@ newBirthDescriptor{ selection_default = (not config.settings.tome.default_birth) or (config.settings.tome.default_birth and config.settings.tome.default_birth.permadeath == "Adventure"), desc = { - "#GOLD##{bold}#Adventure mode#WHITE#", - "Provides you with limited extra lives.", - "Use it if you want normal playing conditions but do not feel ready for just one life.#{normal}#", - "At level 1,2,5,7,14,24,35 get one more 'life' that allows you to resurrect at the start of the level.", + _t"#GOLD##{bold}#Adventure mode#WHITE#", + _t"Provides you with limited extra lives.", + _t"Use it if you want normal playing conditions but do not feel ready for just one life.#{normal}#", + _t"At level 1,2,5,7,14,24,35 get one more 'life' that allows you to resurrect at the start of the level.", }, copy = { easy_mode_lifes = 1, @@ -355,10 +355,10 @@ newBirthDescriptor{ selection_default = config.settings.tome.default_birth and config.settings.tome.default_birth.permadeath == "Roguelike", desc = { - "#GOLD##{bold}#Roguelike mode#WHITE#", - "Provides the closer experience to 'classic' roguelike games.", - "You will only have one life; you *ARE* your character.#{normal}#", - "Only one life, unless ways to self-resurrect are found in-game.", + _t"#GOLD##{bold}#Roguelike mode#WHITE#", + _t"Provides the closer experience to 'classic' roguelike games.", + _t"You will only have one life; you *ARE* your character.#{normal}#", + _t"Only one life, unless ways to self-resurrect are found in-game.", }, } diff --git a/game/modules/tome/data/birth/races/construct.lua b/game/modules/tome/data/birth/races/construct.lua index 5e2c69ce9683af5f61455bedf4bd9da746f09921..f2feef3afb33986963ed5bd75df539d6bb085f49 100644 --- a/game/modules/tome/data/birth/races/construct.lua +++ b/game/modules/tome/data/birth/races/construct.lua @@ -24,10 +24,10 @@ newBirthDescriptor{ type = "race", name = "Construct", locked = function() return profile.mod.allow_build.construct and true or "hide" end, - locked_desc = "", + locked_desc = _t"", desc = { - "Constructs are not natural creatures.", - "The most usual contructs are golems, but they can vary in shape, form and abilities.", + _t"Constructs are not natural creatures.", + _t"The most usual contructs are golems, but they can vary in shape, form and abilities.", }, descriptor_choices = { @@ -45,15 +45,15 @@ newBirthDescriptor type = "subrace", name = "Runic Golem", locked = function() return profile.mod.allow_build.construct_runic_golem and true or "hide" end, - locked_desc = "", + locked_desc = _t"", desc = { - "Runic Golems are creatures made of solid rock and animated using arcane forces.", - "They cannot be of any class, but they have many intrinsic abilities.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +3 Strength, -2 Dexterity, +3 Constitution", - "#LIGHT_BLUE# * +2 Magic, +2 Willpower, -5 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# 13", - "#GOLD#Experience penalty:#LIGHT_BLUE# 25%", + _t"Runic Golems are creatures made of solid rock and animated using arcane forces.", + _t"They cannot be of any class, but they have many intrinsic abilities.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +3 Strength, -2 Dexterity, +3 Constitution", + _t"#LIGHT_BLUE# * +2 Magic, +2 Willpower, -5 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# 13", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# 25%", }, moddable_attachement_spots = "race_runic_golem", moddable_attachement_spots_sexless=true, descriptor_choices = @@ -114,39 +114,39 @@ newBirthDescriptor cosmetic_options = { skin = { - {name="Skin Color 1", file="base_01"}, - {name="Skin Color 2", file="base_02"}, - {name="Skin Color 3", file="base_03"}, - {name="Skin Color 4", file="base_04"}, - {name="Skin Color 5", file="base_05"}, + {name=_t"Skin Color 1", file="base_01"}, + {name=_t"Skin Color 2", file="base_02"}, + {name=_t"Skin Color 3", file="base_03"}, + {name=_t"Skin Color 4", file="base_04"}, + {name=_t"Skin Color 5", file="base_05"}, }, hairs = { - {name="Face 1", file="face_01"}, - {name="Face 2", file="face_02"}, - {name="Face 3", file="face_03"}, + {name=_t"Face 1", file="face_01"}, + {name=_t"Face 2", file="face_02"}, + {name=_t"Face 3", file="face_03"}, }, facial_features = { - {name="Mustache 1", file="face_mustache_01"}, - {name="Mustache 2", file="face_mustache_02"}, - {name="Mustache 3", file="face_mustache_03"}, - {name="Mustache 4", file="face_mustache_04"}, - {name="Mustache 5", file="face_mustache_05"}, - {name="Mustache 6", file="face_mustache_06"}, - {name="Mustache 7", file="face_mustache_07"}, - {name="Mustache 8", file="face_mustache_08"}, - {name="Mustache 9", file="face_mustache_09"}, + {name=_t"Mustache 1", file="face_mustache_01"}, + {name=_t"Mustache 2", file="face_mustache_02"}, + {name=_t"Mustache 3", file="face_mustache_03"}, + {name=_t"Mustache 4", file="face_mustache_04"}, + {name=_t"Mustache 5", file="face_mustache_05"}, + {name=_t"Mustache 6", file="face_mustache_06"}, + {name=_t"Mustache 7", file="face_mustache_07"}, + {name=_t"Mustache 8", file="face_mustache_08"}, + {name=_t"Mustache 9", file="face_mustache_09"}, }, tatoos = { - {name="Tatoos 1", file="tattoo_runes_01"}, - {name="Tatoos 2", file="tattoo_runes_02"}, - {name="Tatoos 3", file="tattoo_runes_03"}, - {name="Tatoos 4", file="tattoo_runes_04"}, - {name="Tatoos 5", file="tattoo_runes_05"}, - {name="Tatoos 6", file="tattoo_runes_06"}, - {name="Tatoos 7", file="tattoo_runes_07"}, + {name=_t"Tatoos 1", file="tattoo_runes_01"}, + {name=_t"Tatoos 2", file="tattoo_runes_02"}, + {name=_t"Tatoos 3", file="tattoo_runes_03"}, + {name=_t"Tatoos 4", file="tattoo_runes_04"}, + {name=_t"Tatoos 5", file="tattoo_runes_05"}, + {name=_t"Tatoos 6", file="tattoo_runes_06"}, + {name=_t"Tatoos 7", file="tattoo_runes_07"}, }, special = { - {name="Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) + {name=_t"Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) if not last then local o = birther.obj_list_by_name[birther.descriptors_by_type.sex == 'Female' and 'Bikini' or 'Mankini'] if not o then print("No bikini/mankini found!") return end actor:getInven(actor.INVEN_BODY)[1] = o:cloneFull() actor.moddable_tile_nude = 1 else actor:registerOnBirthForceWear(birther.descriptors_by_type.sex == 'Female' and "FUN_BIKINI" or "FUN_MANKINI") end end}, diff --git a/game/modules/tome/data/birth/races/dwarf.lua b/game/modules/tome/data/birth/races/dwarf.lua index bb19f63081c13f0f27c33a52205ca959dcbd49b9..150b4f58a8235ab1eacfd1a0afe66c88997ace5c 100644 --- a/game/modules/tome/data/birth/races/dwarf.lua +++ b/game/modules/tome/data/birth/races/dwarf.lua @@ -24,9 +24,9 @@ newBirthDescriptor{ type = "race", name = "Dwarf", desc = { - "Dwarves are a secretive people, hailing from their underground home of the Iron Throne.", - "They are a sturdy race and are known for their masterwork, yet they are not well loved, having left other races to fend for themselves in past conflicts.", - "All dwarves are united under the Empire and their love of money.", + _t"Dwarves are a secretive people, hailing from their underground home of the Iron Throne.", + _t"They are a sturdy race and are known for their masterwork, yet they are not well loved, having left other races to fend for themselves in past conflicts.", + _t"All dwarves are united under the Empire and their love of money.", }, descriptor_choices = { @@ -59,14 +59,14 @@ newBirthDescriptor type = "subrace", name = "Dwarf", desc = { - "Dwarves are a secretive people, hailing from their underground home of the Iron Throne.", - "They are a sturdy race and are known for their masterwork, yet they are not well loved, having left other races to fend for themselves in past conflicts.", - "They possess the #GOLD#Resilience of the Dwarves#WHITE# which allows them to increase their armour, physical and spell saves for a few turns.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +4 Strength, -2 Dexterity, +3 Constitution", - "#LIGHT_BLUE# * -2 Magic, +3 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# 14", - "#GOLD#Experience penalty:#LIGHT_BLUE# 0%", + _t"Dwarves are a secretive people, hailing from their underground home of the Iron Throne.", + _t"They are a sturdy race and are known for their masterwork, yet they are not well loved, having left other races to fend for themselves in past conflicts.", + _t"They possess the #GOLD#Resilience of the Dwarves#WHITE# which allows them to increase their armour, physical and spell saves for a few turns.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +4 Strength, -2 Dexterity, +3 Constitution", + _t"#LIGHT_BLUE# * -2 Magic, +3 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# 14", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# 0%", }, inc_stats = { str=4, con=3, wil=3, mag=-2, dex=-2 }, talents_types = { ["race/dwarf"]={true, 0} }, @@ -84,97 +84,97 @@ newBirthDescriptor resolvers.inscription("INFUSION:_HEALING", {cooldown=12, heal=50}, 3), resolvers.birth_extra_tier1_zone{name="tier1", condition=function(e) return e.starting_zone == "reknor-escape" end, "reknor-escape", "deep-bellow"}, }, - default_cosmetics = { {"hairs", "Dark Hair 1"}, {"facial_features", "Dark Beard 2", {sex="Male"}} }, + default_cosmetics = { {"hairs", _t"Dark Hair 1"}, {"facial_features", _t"Dark Beard 2", {sex="Male"}} }, cosmetic_options = { skin = { - {name="Skin Color 1", file="base_01"}, - {name="Skin Color 2", file="base_02"}, - {name="Skin Color 3", file="base_03"}, - {name="Skin Color 4", file="base_04"}, - {name="Skin Color 5", file="base_05"}, - {name="Skin Color 6", file="base_06"}, - {name="Skin Color 7", file="base_07"}, - {name="Skin Color 8", file="base_08"}, - {name="Skin Color 9", file="base_09"}, + {name=_t"Skin Color 1", file="base_01"}, + {name=_t"Skin Color 2", file="base_02"}, + {name=_t"Skin Color 3", file="base_03"}, + {name=_t"Skin Color 4", file="base_04"}, + {name=_t"Skin Color 5", file="base_05"}, + {name=_t"Skin Color 6", file="base_06"}, + {name=_t"Skin Color 7", file="base_07"}, + {name=_t"Skin Color 8", file="base_08"}, + {name=_t"Skin Color 9", file="base_09"}, }, hairs = { - {name="Dark Hair 1", file="hair_01"}, - {name="Dark Hair 2", file="hair_02"}, - {name="Dark Hair 3", file="hair_03"}, - {name="Dark Hair 4", file="hair_04", only_for={sex="Female"}}, - {name="Dark Hair 5", file="hair_05", only_for={sex="Female"}}, - {name="Dark Hair 6", file="hair_06", only_for={sex="Female"}}, - {name="Dark Hair 7", file="hair_07", only_for={sex="Female"}}, - {name="Dark Hair 8", file="hair_08", only_for={sex="Female"}}, - {name="Dark Hair 9", file="hair_09", only_for={sex="Female"}}, - {name="Dark Hair 10", file="hair_10", only_for={sex="Female"}}, - {name="Blond Hair 1", file="hair_blond_01"}, - {name="Blond Hair 2", file="hair_blond_02"}, - {name="Blond Hair 3", file="hair_blond_03"}, - {name="Blond Hair 4", file="hair_blond_04", only_for={sex="Female"}}, - {name="Blond Hair 5", file="hair_blond_05", only_for={sex="Female"}}, - {name="Blond Hair 6", file="hair_blond_06", only_for={sex="Female"}}, - {name="Blond Hair 7", file="hair_blond_07", only_for={sex="Female"}}, - {name="Blond Hair 8", file="hair_blond_08", only_for={sex="Female"}}, - {name="Blond Hair 9", file="hair_blond_09", only_for={sex="Female"}}, - {name="Blond Hair 10", file="hair_blond_10", only_for={sex="Female"}}, - {name="Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 3", file="hair_redhead_03", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 4", file="hair_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 5", file="hair_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 6", file="hair_redhead_06", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 7", file="hair_redhead_07", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 8", file="hair_redhead_08", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 9", file="hair_redhead_09", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 10", file="hair_redhead_10", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Dark Hair 1", file="hair_01"}, + {name=_t"Dark Hair 2", file="hair_02"}, + {name=_t"Dark Hair 3", file="hair_03"}, + {name=_t"Dark Hair 4", file="hair_04", only_for={sex="Female"}}, + {name=_t"Dark Hair 5", file="hair_05", only_for={sex="Female"}}, + {name=_t"Dark Hair 6", file="hair_06", only_for={sex="Female"}}, + {name=_t"Dark Hair 7", file="hair_07", only_for={sex="Female"}}, + {name=_t"Dark Hair 8", file="hair_08", only_for={sex="Female"}}, + {name=_t"Dark Hair 9", file="hair_09", only_for={sex="Female"}}, + {name=_t"Dark Hair 10", file="hair_10", only_for={sex="Female"}}, + {name=_t"Blond Hair 1", file="hair_blond_01"}, + {name=_t"Blond Hair 2", file="hair_blond_02"}, + {name=_t"Blond Hair 3", file="hair_blond_03"}, + {name=_t"Blond Hair 4", file="hair_blond_04", only_for={sex="Female"}}, + {name=_t"Blond Hair 5", file="hair_blond_05", only_for={sex="Female"}}, + {name=_t"Blond Hair 6", file="hair_blond_06", only_for={sex="Female"}}, + {name=_t"Blond Hair 7", file="hair_blond_07", only_for={sex="Female"}}, + {name=_t"Blond Hair 8", file="hair_blond_08", only_for={sex="Female"}}, + {name=_t"Blond Hair 9", file="hair_blond_09", only_for={sex="Female"}}, + {name=_t"Blond Hair 10", file="hair_blond_10", only_for={sex="Female"}}, + {name=_t"Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 3", file="hair_redhead_03", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 4", file="hair_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 5", file="hair_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 6", file="hair_redhead_06", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 7", file="hair_redhead_07", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 8", file="hair_redhead_08", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 9", file="hair_redhead_09", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 10", file="hair_redhead_10", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, }, facial_features = { - {name="Dark Beard 1", file="beard_01", only_for={sex="Male"}}, - {name="Dark Beard 2", file="beard_02", only_for={sex="Male"}}, - {name="Dark Beard 3", file="beard_03", only_for={sex="Male"}}, - {name="Dark Beard 4", file="beard_04", only_for={sex="Male"}}, - {name="Dark Beard 5", file="beard_05", only_for={sex="Male"}}, - {name="Blond Beard 1", file="beard_blond_01", only_for={sex="Male"}}, - {name="Blond Beard 2", file="beard_blond_02", only_for={sex="Male"}}, - {name="Blond Beard 3", file="beard_blond_03", only_for={sex="Male"}}, - {name="Blond Beard 4", file="beard_blond_04", only_for={sex="Male"}}, - {name="Blond Beard 5", file="beard_blond_05", only_for={sex="Male"}}, - {name="Redhead Beard 1", file="beard_redhead_01", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Beard 2", file="beard_redhead_02", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Beard 3", file="beard_redhead_03", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Beard 4", file="beard_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Beard 5", file="beard_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Dark Mustache 1", file="face_mustache_01", only_for={sex="Male"}}, - {name="Dark Mustache 2", file="face_mustache_02", only_for={sex="Male"}}, - {name="Dark Mustache 3", file="face_mustache_03", only_for={sex="Male"}}, - {name="Dark Mustache 4", file="face_mustache_04", only_for={sex="Male"}}, - {name="Blond Mustache 1", file="face_mustache_blond_01", only_for={sex="Male"}}, - {name="Blond Mustache 2", file="face_mustache_blond_02", only_for={sex="Male"}}, - {name="Blond Mustache 3", file="face_mustache_blond_03", only_for={sex="Male"}}, - {name="Blond Mustache 4", file="face_mustache_blond_04", only_for={sex="Male"}}, - {name="Redhead Mustache 1", file="face_mustache_redhead_01", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Mustache 2", file="face_mustache_redhead_02", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Mustache 3", file="face_mustache_redhead_03", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Mustache 4", file="face_mustache_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Dark Beard", file="beard_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Blond Beard", file="beard_redhead_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Redhead Beard", file="face_beard_blond_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Dark Donut", file="face_donut_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Blond Donut", file="face_donut_blond_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Redhead Donut", file="face_donut_redhead_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Dark Flip", file="face_flip_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Blond Flip", file="face_flip_blond_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Redhead Flip", file="face_flip_redhead_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Dark Mustache", file="face_mustache_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Blond Mustache", file="face_mustache_blond_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Redhead Mustache", file="face_mustache_redhead_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Dark Sideburns", file="face_sideburners_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Blond Sideburns", file="face_sideburners_blond_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, - {name="Redhead Sideburns", file="face_sideburners_redhead_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Dark Beard 1", file="beard_01", only_for={sex="Male"}}, + {name=_t"Dark Beard 2", file="beard_02", only_for={sex="Male"}}, + {name=_t"Dark Beard 3", file="beard_03", only_for={sex="Male"}}, + {name=_t"Dark Beard 4", file="beard_04", only_for={sex="Male"}}, + {name=_t"Dark Beard 5", file="beard_05", only_for={sex="Male"}}, + {name=_t"Blond Beard 1", file="beard_blond_01", only_for={sex="Male"}}, + {name=_t"Blond Beard 2", file="beard_blond_02", only_for={sex="Male"}}, + {name=_t"Blond Beard 3", file="beard_blond_03", only_for={sex="Male"}}, + {name=_t"Blond Beard 4", file="beard_blond_04", only_for={sex="Male"}}, + {name=_t"Blond Beard 5", file="beard_blond_05", only_for={sex="Male"}}, + {name=_t"Redhead Beard 1", file="beard_redhead_01", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Beard 2", file="beard_redhead_02", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Beard 3", file="beard_redhead_03", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Beard 4", file="beard_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Beard 5", file="beard_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Dark Mustache 1", file="face_mustache_01", only_for={sex="Male"}}, + {name=_t"Dark Mustache 2", file="face_mustache_02", only_for={sex="Male"}}, + {name=_t"Dark Mustache 3", file="face_mustache_03", only_for={sex="Male"}}, + {name=_t"Dark Mustache 4", file="face_mustache_04", only_for={sex="Male"}}, + {name=_t"Blond Mustache 1", file="face_mustache_blond_01", only_for={sex="Male"}}, + {name=_t"Blond Mustache 2", file="face_mustache_blond_02", only_for={sex="Male"}}, + {name=_t"Blond Mustache 3", file="face_mustache_blond_03", only_for={sex="Male"}}, + {name=_t"Blond Mustache 4", file="face_mustache_blond_04", only_for={sex="Male"}}, + {name=_t"Redhead Mustache 1", file="face_mustache_redhead_01", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Mustache 2", file="face_mustache_redhead_02", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Mustache 3", file="face_mustache_redhead_03", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Mustache 4", file="face_mustache_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Dark Beard", file="beard_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Blond Beard", file="beard_redhead_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Redhead Beard", file="face_beard_blond_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Dark Donut", file="face_donut_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Blond Donut", file="face_donut_blond_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Redhead Donut", file="face_donut_redhead_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Dark Flip", file="face_flip_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Blond Flip", file="face_flip_blond_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Redhead Flip", file="face_flip_redhead_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Dark Mustache", file="face_mustache_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Blond Mustache", file="face_mustache_blond_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Redhead Mustache", file="face_mustache_redhead_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Dark Sideburns", file="face_sideburners_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Blond Sideburns", file="face_sideburners_blond_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, + {name=_t"Redhead Sideburns", file="face_sideburners_redhead_01", unlock="cosmetic_race_dwarf_female_beard", only_for={sex="Female"}}, }, special = { - {name="Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) + {name=_t"Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) if not last then local o = birther.obj_list_by_name[birther.descriptors_by_type.sex == 'Female' and 'Bikini' or 'Mankini'] if not o then print("No bikini/mankini found!") return end actor:getInven(actor.INVEN_BODY)[1] = o:cloneFull() actor.moddable_tile_nude = 1 else actor:registerOnBirthForceWear(birther.descriptors_by_type.sex == 'Female' and "FUN_BIKINI" or "FUN_MANKINI") end end}, diff --git a/game/modules/tome/data/birth/races/elf.lua b/game/modules/tome/data/birth/races/elf.lua index ea84df8406fd3187e8d00cecb58653224cad59a9..782ecf0f2b84434a79d9175c775395905fe74648 100644 --- a/game/modules/tome/data/birth/races/elf.lua +++ b/game/modules/tome/data/birth/races/elf.lua @@ -24,10 +24,10 @@ newBirthDescriptor{ type = "race", name = "Elf", desc = { - "The elven races are usually named as a whole 'elves', but this is incorrect.", - "Elves are split into three separate races - albeit related - of which only two remain in the current age.", - "Elves usually live about one thousand years, except for the Shaloren who magically sustain themselves forever.", - "Their view of the world varies wildly across the different elven races.", + _t"The elven races are usually named as a whole 'elves', but this is incorrect.", + _t"Elves are split into three separate races - albeit related - of which only two remain in the current age.", + _t"Elves usually live about one thousand years, except for the Shaloren who magically sustain themselves forever.", + _t"Their view of the world varies wildly across the different elven races.", }, descriptor_choices = { @@ -56,35 +56,35 @@ newBirthDescriptor{ moddable_attachement_spots = "race_elf", cosmetic_options = { skin = { - {name="Skin Color 1", file="base_01"}, - {name="Skin Color 2", file="base_02"}, - {name="Skin Color 3", file="base_03"}, - {name="Skin Color 4", file="base_04"}, - {name="Skin Color 5", file="base_05"}, - {name="Skin Color 6", file="base_06"}, - {name="Skin Color 7", file="base_07"}, - {name="Skin Color 8", file="base_08"}, - {name="Skin Color 9", file="base_09"}, + {name=_t"Skin Color 1", file="base_01"}, + {name=_t"Skin Color 2", file="base_02"}, + {name=_t"Skin Color 3", file="base_03"}, + {name=_t"Skin Color 4", file="base_04"}, + {name=_t"Skin Color 5", file="base_05"}, + {name=_t"Skin Color 6", file="base_06"}, + {name=_t"Skin Color 7", file="base_07"}, + {name=_t"Skin Color 8", file="base_08"}, + {name=_t"Skin Color 9", file="base_09"}, }, hairs = { - {name="Dark Hair 1", file="hair_thalore_01"}, - {name="Dark Hair 2", file="hair_thalore_02"}, - {name="Dark Hair 3", file="hair_thalore_03"}, - {name="Dark Hair 4", file="hair_thalore_04", only_for={sex="Female"}}, - {name="Dark Hair 5", file="hair_thalore_05", only_for={sex="Female"}}, - {name="Blond Hair 1", file="hair_shalore_01"}, - {name="Blond Hair 2", file="hair_shalore_02"}, - {name="Blond Hair 3", file="hair_shalore_03"}, - {name="Blond Hair 4", file="hair_shalore_04", only_for={sex="Female"}}, - {name="Blond Hair 5", file="hair_shalore_05", only_for={sex="Female"}}, - {name="Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 3", file="hair_redhead_03", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 4", file="hair_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 5", file="hair_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Dark Hair 1", file="hair_thalore_01"}, + {name=_t"Dark Hair 2", file="hair_thalore_02"}, + {name=_t"Dark Hair 3", file="hair_thalore_03"}, + {name=_t"Dark Hair 4", file="hair_thalore_04", only_for={sex="Female"}}, + {name=_t"Dark Hair 5", file="hair_thalore_05", only_for={sex="Female"}}, + {name=_t"Blond Hair 1", file="hair_shalore_01"}, + {name=_t"Blond Hair 2", file="hair_shalore_02"}, + {name=_t"Blond Hair 3", file="hair_shalore_03"}, + {name=_t"Blond Hair 4", file="hair_shalore_04", only_for={sex="Female"}}, + {name=_t"Blond Hair 5", file="hair_shalore_05", only_for={sex="Female"}}, + {name=_t"Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 3", file="hair_redhead_03", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 4", file="hair_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 5", file="hair_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, }, special = { - {name="Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) + {name=_t"Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) if not last then local o = birther.obj_list_by_name[birther.descriptors_by_type.sex == 'Female' and 'Bikini' or 'Mankini'] if not o then print("No bikini/mankini found!") return end actor:getInven(actor.INVEN_BODY)[1] = o:cloneFull() actor.moddable_tile_nude = 1 else actor:registerOnBirthForceWear(birther.descriptors_by_type.sex == 'Female' and "FUN_BIKINI" or "FUN_MANKINI") end end}, @@ -100,20 +100,20 @@ newBirthDescriptor type = "subrace", name = "Shalore", desc = { - "Shaloren elves have close ties with the magic of the world, and produced in the past many great mages.", - "Yet they remain quiet and try to hide their magic from the world, for they remember too well the Spellblaze - and the Spellhunt that followed.", - "They possess the #GOLD#Grace of the Eternals#WHITE# talent which allows them a boost of speed every once in a while.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * -2 Strength, +1 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +2 Magic, +3 Willpower, +1 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# 9", - "#GOLD#Experience penalty:#LIGHT_BLUE# 12%", + _t"Shaloren elves have close ties with the magic of the world, and produced in the past many great mages.", + _t"Yet they remain quiet and try to hide their magic from the world, for they remember too well the Spellblaze - and the Spellhunt that followed.", + _t"They possess the #GOLD#Grace of the Eternals#WHITE# talent which allows them a boost of speed every once in a while.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * -2 Strength, +1 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +2 Magic, +3 Willpower, +1 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# 9", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# 12%", }, inc_stats = { str=-2, mag=2, wil=3, cun=1, dex=1, con=0 }, experience = 1.3, talents_types = { ["race/shalore"]={true, 0} }, talents = { [ActorTalents.T_SHALOREN_SPEED]=1 }, - default_cosmetics = { {"hairs", "Blond Hair 1"} }, + default_cosmetics = { {"hairs", _t"Blond Hair 1"} }, copy = { moddable_tile = "elf_#sex#", moddable_tile_base = "base_01.png", @@ -138,20 +138,20 @@ newBirthDescriptor type = "subrace", name = "Thalore", desc = { - "Thaloren elves have spent most of the ages hidden within their forests, seldom leaving them.", - "The ages of the world passed by and yet they remained unchanged.", - "Their affinity for nature and their reclusion have made them great protectors of the natural order, often opposing their Shaloren cousins.", - "They possess the #GOLD#Gift of the Woods#WHITE# talent, which allows them to regenerate life and increase healing once in a while.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +2 Strength, +3 Dexterity, +1 Constitution", - "#LIGHT_BLUE# * -2 Magic, +1 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# 11", - "#GOLD#Experience penalty:#LIGHT_BLUE# 0%", + _t"Thaloren elves have spent most of the ages hidden within their forests, seldom leaving them.", + _t"The ages of the world passed by and yet they remained unchanged.", + _t"Their affinity for nature and their reclusion have made them great protectors of the natural order, often opposing their Shaloren cousins.", + _t"They possess the #GOLD#Gift of the Woods#WHITE# talent, which allows them to regenerate life and increase healing once in a while.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +2 Strength, +3 Dexterity, +1 Constitution", + _t"#LIGHT_BLUE# * -2 Magic, +1 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# 11", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# 0%", }, inc_stats = { str=2, mag=-2, wil=1, cun=0, dex=3, con=1 }, talents_types = { ["race/thalore"]={true, 0} }, talents = { [ActorTalents.T_THALOREN_WRATH]=1 }, - default_cosmetics = { {"hairs", "Dark Hair 1"} }, + default_cosmetics = { {"hairs", _t"Dark Hair 1"} }, copy = { moddable_tile = "elf_#sex#", moddable_tile_base = "base_01.png", diff --git a/game/modules/tome/data/birth/races/giant.lua b/game/modules/tome/data/birth/races/giant.lua index dd4a0319d6f16b6debcecc209848e010e6c04794..34e8f5d8891ad5e81448940afa1ec43901877d1d 100644 --- a/game/modules/tome/data/birth/races/giant.lua +++ b/game/modules/tome/data/birth/races/giant.lua @@ -24,9 +24,9 @@ newBirthDescriptor{ type = "race", name = "Giant", locked = function() return profile.mod.allow_build.race_giant end, - locked_desc = "Powerful beings that tower over all, but the bigger they are, the harder they fall...", + locked_desc = _t"Powerful beings that tower over all, but the bigger they are, the harder they fall...", desc = { - [[#{italic}#"Giant"#{normal}# is a catch-all term for humanoids which are typically over eight feet in height. Their origins, cultures, and relationships to other races differ wildly, but they tend to live as refugees and outcasts, shunned by smaller sentient races who usually see them as a threat.]], + _t[[#{italic}#"Giant"#{normal}# is a catch-all term for humanoids which are typically over eight feet in height. Their origins, cultures, and relationships to other races differ wildly, but they tend to live as refugees and outcasts, shunned by smaller sentient races who usually see them as a threat.]], }, descriptor_choices = { @@ -49,22 +49,22 @@ newBirthDescriptor type = "subrace", name = "Ogre", locked = function() return profile.mod.allow_build.race_ogre end, - locked_desc = [[Forged in the hatred of ages long passed, + locked_desc = _t[[Forged in the hatred of ages long passed, made for a war that they've come to outlast. Their forgotten birthplace lies deep underground, its tunnels ruined so it wouldn't be found. Past burglars have failed, but their data's immortal; to start, look where halflings once tinkered with portals...]], desc = { - "Ogres are an altered form of Human, created in the Age of Allure as workers and warriors for the Conclave.", - "Inscriptions have granted them magical and physical power far beyond their natural limits, but their dependence on runic magic made them a favored target during the Spellhunt, forcing them to take refuge among the Shalore.", - "Their preference for simple and direct solutions has given them an undeserved reputation as dumb brutes, despite their extraordinary talent with runes and their humble, dutiful nature.", - "They possess the #GOLD#Ogric Wrath#WHITE# talent, which grants them critical chance and power, as well as resistance to confusion and stuns, when their attacks miss or are blocked.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +3 Strength, -1 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +2 Magic, -2 Willpower, +2 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# 13", - "#GOLD#Experience penalty:#LIGHT_BLUE# 15%", + _t"Ogres are an altered form of Human, created in the Age of Allure as workers and warriors for the Conclave.", + _t"Inscriptions have granted them magical and physical power far beyond their natural limits, but their dependence on runic magic made them a favored target during the Spellhunt, forcing them to take refuge among the Shalore.", + _t"Their preference for simple and direct solutions has given them an undeserved reputation as dumb brutes, despite their extraordinary talent with runes and their humble, dutiful nature.", + _t"They possess the #GOLD#Ogric Wrath#WHITE# talent, which grants them critical chance and power, as well as resistance to confusion and stuns, when their attacks miss or are blocked.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +3 Strength, -1 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +2 Magic, -2 Willpower, +2 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# 13", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# 15%", }, moddable_attachement_spots = "race_ogre", inc_stats = { str=3, mag=2, wil=-2, cun=2, dex=-1, con=0 }, @@ -89,68 +89,68 @@ to start, look where halflings once tinkered with portals...]], }, random_escort_possibilities = { {"tier1.1", 1, 2}, {"tier1.2", 1, 2}, {"daikara", 1, 2}, {"old-forest", 1, 4}, {"dreadfell", 1, 8}, {"reknor", 1, 2}, }, - default_cosmetics = { {"hairs", "Dark Hair 1"} }, + default_cosmetics = { {"hairs", _t"Dark Hair 1"} }, cosmetic_options = { skin = { - {name="Skin Color 1", file="base_01"}, - {name="Skin Color 2", file="base_02"}, - {name="Skin Color 3", file="base_03"}, - {name="Skin Color 4", file="base_04"}, - {name="Skin Color 5", file="base_05"}, - {name="Skin Color 6", file="base_06"}, - {name="Skin Color 7", file="base_07"}, - {name="Skin Color 8", file="base_08"}, - {name="Skin Color 9", file="base_09"}, + {name=_t"Skin Color 1", file="base_01"}, + {name=_t"Skin Color 2", file="base_02"}, + {name=_t"Skin Color 3", file="base_03"}, + {name=_t"Skin Color 4", file="base_04"}, + {name=_t"Skin Color 5", file="base_05"}, + {name=_t"Skin Color 6", file="base_06"}, + {name=_t"Skin Color 7", file="base_07"}, + {name=_t"Skin Color 8", file="base_08"}, + {name=_t"Skin Color 9", file="base_09"}, }, hairs = { - {name="Dark Hair 1", file="hair_01"}, - {name="Dark Hair 2", file="hair_02"}, - {name="Dark Hair 3", file="hair_03"}, - {name="Dark Hair 4", file="hair_04", only_for={sex="Female"}}, - {name="Dark Hair 5", file="hair_05", only_for={sex="Female"}}, - {name="Dark Hair 6", file="hair_06", only_for={sex="Female"}}, - {name="Dark Hair 7", file="hair_07", only_for={sex="Female"}}, - {name="Dark Hair 8", file="hair_08", only_for={sex="Female"}}, - {name="Dark Hair 9", file="hair_09", only_for={sex="Female"}}, - {name="Blond Hair 1", file="hair_blond_01"}, - {name="Blond Hair 2", file="hair_blond_02"}, - {name="Blond Hair 3", file="hair_blond_03"}, - {name="Blond Hair 4", file="hair_blond_04", only_for={sex="Female"}}, - {name="Blond Hair 5", file="hair_blond_05", only_for={sex="Female"}}, - {name="Blond Hair 6", file="hair_blond_06", only_for={sex="Female"}}, - {name="Blond Hair 7", file="hair_blond_07", only_for={sex="Female"}}, - {name="Blond Hair 8", file="hair_blond_08", only_for={sex="Female"}}, - {name="Blond Hair 9", file="hair_blond_09", only_for={sex="Female"}}, - {name="Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 3", file="hair_redhead_03", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 4", file="hair_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 5", file="hair_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 6", file="hair_redhead_06", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 7", file="hair_redhead_07", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 8", file="hair_redhead_08", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead Hair 9", file="hair_redhead_09", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Dark Hair 1", file="hair_01"}, + {name=_t"Dark Hair 2", file="hair_02"}, + {name=_t"Dark Hair 3", file="hair_03"}, + {name=_t"Dark Hair 4", file="hair_04", only_for={sex="Female"}}, + {name=_t"Dark Hair 5", file="hair_05", only_for={sex="Female"}}, + {name=_t"Dark Hair 6", file="hair_06", only_for={sex="Female"}}, + {name=_t"Dark Hair 7", file="hair_07", only_for={sex="Female"}}, + {name=_t"Dark Hair 8", file="hair_08", only_for={sex="Female"}}, + {name=_t"Dark Hair 9", file="hair_09", only_for={sex="Female"}}, + {name=_t"Blond Hair 1", file="hair_blond_01"}, + {name=_t"Blond Hair 2", file="hair_blond_02"}, + {name=_t"Blond Hair 3", file="hair_blond_03"}, + {name=_t"Blond Hair 4", file="hair_blond_04", only_for={sex="Female"}}, + {name=_t"Blond Hair 5", file="hair_blond_05", only_for={sex="Female"}}, + {name=_t"Blond Hair 6", file="hair_blond_06", only_for={sex="Female"}}, + {name=_t"Blond Hair 7", file="hair_blond_07", only_for={sex="Female"}}, + {name=_t"Blond Hair 8", file="hair_blond_08", only_for={sex="Female"}}, + {name=_t"Blond Hair 9", file="hair_blond_09", only_for={sex="Female"}}, + {name=_t"Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 3", file="hair_redhead_03", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 4", file="hair_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 5", file="hair_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 6", file="hair_redhead_06", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 7", file="hair_redhead_07", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 8", file="hair_redhead_08", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead Hair 9", file="hair_redhead_09", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, }, facial_features = { - {name="Facial Infusions 1", file="face_infusion_01"}, - {name="Facial Infusions 2", file="face_infusion_02"}, - {name="Facial Runes 1", file="face_rune_01"}, - {name="Facial Runes 2", file="face_rune_02"}, - {name="Facial Runes 3", file="face_rune_03"}, - {name="Facial Runes 4", file="face_rune_04"}, + {name=_t"Facial Infusions 1", file="face_infusion_01"}, + {name=_t"Facial Infusions 2", file="face_infusion_02"}, + {name=_t"Facial Runes 1", file="face_rune_01"}, + {name=_t"Facial Runes 2", file="face_rune_02"}, + {name=_t"Facial Runes 3", file="face_rune_03"}, + {name=_t"Facial Runes 4", file="face_rune_04"}, }, tatoos = { - {name="Body Tatoos 1", file="tattoo_runes_01"}, - {name="Body Tatoos 2", file="tattoo_runes_02"}, - {name="Body Tatoos 3", file="tattoo_runes_03"}, - {name="Body Tatoos 4", file="tattoo_runes_04"}, - {name="Body Tatoos 5", file="tattoo_runes_05"}, - {name="Body Tatoos 6", file="tattoo_runes_06"}, - {name="Body Tatoos 7", file="tattoo_runes_07"}, - {name="Body Tatoos 8", file="tattoo_runes_08"}, + {name=_t"Body Tatoos 1", file="tattoo_runes_01"}, + {name=_t"Body Tatoos 2", file="tattoo_runes_02"}, + {name=_t"Body Tatoos 3", file="tattoo_runes_03"}, + {name=_t"Body Tatoos 4", file="tattoo_runes_04"}, + {name=_t"Body Tatoos 5", file="tattoo_runes_05"}, + {name=_t"Body Tatoos 6", file="tattoo_runes_06"}, + {name=_t"Body Tatoos 7", file="tattoo_runes_07"}, + {name=_t"Body Tatoos 8", file="tattoo_runes_08"}, }, special = { - {name="Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) + {name=_t"Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) if not last then local o = birther.obj_list_by_name[birther.descriptors_by_type.sex == 'Female' and 'Bikini' or 'Mankini'] if not o then print("No bikini/mankini found!") return end actor:getInven(actor.INVEN_BODY)[1] = o:cloneFull() actor.moddable_tile_nude = 1 else actor:registerOnBirthForceWear(birther.descriptors_by_type.sex == 'Female' and "FUN_BIKINI" or "FUN_MANKINI") end end}, diff --git a/game/modules/tome/data/birth/races/halfling.lua b/game/modules/tome/data/birth/races/halfling.lua index 0a05e1636e38073a5c256586d39c9c197ab0ff87..920a70d161992cbd18d256ce8c981787b57274f2 100644 --- a/game/modules/tome/data/birth/races/halfling.lua +++ b/game/modules/tome/data/birth/races/halfling.lua @@ -24,10 +24,10 @@ newBirthDescriptor{ type = "race", name = "Halfling", desc = { - "Halflings are a race of very short stature, rarely exceeding four feet in height.", - "They are like humans in that they can do just about anything they set their minds to, yet they excel at ordering and studying things.", - "Halfling armies have brought many kingdoms to their knees and they kept a balance of power with the Human kingdoms during the Age of Allure.", - "Halflings are agile, lucky, and resilient but lacking in strength.", + _t"Halflings are a race of very short stature, rarely exceeding four feet in height.", + _t"They are like humans in that they can do just about anything they set their minds to, yet they excel at ordering and studying things.", + _t"Halfling armies have brought many kingdoms to their knees and they kept a balance of power with the Human kingdoms during the Age of Allure.", + _t"Halflings are agile, lucky, and resilient but lacking in strength.", }, descriptor_choices = { @@ -59,29 +59,29 @@ newBirthDescriptor{ moddable_attachement_spots = "race_halfling", cosmetic_options = { skin = { - {name="Skin Color 1", file="base_01"}, - {name="Skin Color 2", file="base_02"}, - {name="Skin Color 3", file="base_03"}, - {name="Skin Color 4", file="base_04"}, - {name="Skin Color 5", file="base_05"}, - {name="Skin Color 6", file="base_06"}, + {name=_t"Skin Color 1", file="base_01"}, + {name=_t"Skin Color 2", file="base_02"}, + {name=_t"Skin Color 3", file="base_03"}, + {name=_t"Skin Color 4", file="base_04"}, + {name=_t"Skin Color 5", file="base_05"}, + {name=_t"Skin Color 6", file="base_06"}, }, hairs = { - {name="Blond Hair 1", file="hair_blond_01"}, - {name="Blond Hair 2", file="hair_blond_02"}, - {name="Blond Hair 3", file="hair_blond_03"}, - {name="Blond Hair 4", file="hair_blond_04"}, - {name="Dark Hair 1", file="hair_black_01"}, - {name="Dark Hair 2", file="hair_black_02"}, - {name="Dark Hair 3", file="hair_black_03"}, - {name="Dark Hair 4", file="hair_black_04"}, - {name="Redhead 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="Redhead 3", file="hair_redhead_03", unlock="cosmetic_race_human_redhead"}, - {name="Redhead 4", file="hair_redhead_04", unlock="cosmetic_race_human_redhead"}, + {name=_t"Blond Hair 1", file="hair_blond_01"}, + {name=_t"Blond Hair 2", file="hair_blond_02"}, + {name=_t"Blond Hair 3", file="hair_blond_03"}, + {name=_t"Blond Hair 4", file="hair_blond_04"}, + {name=_t"Dark Hair 1", file="hair_black_01"}, + {name=_t"Dark Hair 2", file="hair_black_02"}, + {name=_t"Dark Hair 3", file="hair_black_03"}, + {name=_t"Dark Hair 4", file="hair_black_04"}, + {name=_t"Redhead 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead 3", file="hair_redhead_03", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead 4", file="hair_redhead_04", unlock="cosmetic_race_human_redhead"}, }, special = { - {name="Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) + {name=_t"Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) if not last then local o = birther.obj_list_by_name[birther.descriptors_by_type.sex == 'Female' and 'Bikini' or 'Mankini'] if not o then print("No bikini/mankini found!") return end actor:getInven(actor.INVEN_BODY)[1] = o:cloneFull() actor.moddable_tile_nude = 1 else actor:registerOnBirthForceWear(birther.descriptors_by_type.sex == 'Female' and "FUN_BIKINI" or "FUN_MANKINI") end end}, @@ -97,16 +97,16 @@ newBirthDescriptor type = "subrace", name = "Halfling", desc = { - "Halflings are a race of very short stature, rarely exceeding four feet in height.", - "They are like humans in that they can do just about anything they set their minds to, yet they excel at ordering and studying things.", - "Halfling armies have brought many kingdoms to their knees and they kept a balance of power with the Human kingdoms during the Age of Allure.", - "They possess the #GOLD#Luck of the Little Folk#WHITE# which allows them to increase their critical strike chance and saves for a few turns.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * -3 Strength, +3 Dexterity, +1 Constitution", - "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +3 Cunning", - "#LIGHT_BLUE# * +5 Luck", - "#GOLD#Life per level:#LIGHT_BLUE# 12", - "#GOLD#Experience penalty:#LIGHT_BLUE# 10%", + _t"Halflings are a race of very short stature, rarely exceeding four feet in height.", + _t"They are like humans in that they can do just about anything they set their minds to, yet they excel at ordering and studying things.", + _t"Halfling armies have brought many kingdoms to their knees and they kept a balance of power with the Human kingdoms during the Age of Allure.", + _t"They possess the #GOLD#Luck of the Little Folk#WHITE# which allows them to increase their critical strike chance and saves for a few turns.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * -3 Strength, +3 Dexterity, +1 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +3 Cunning", + _t"#LIGHT_BLUE# * +5 Luck", + _t"#GOLD#Life per level:#LIGHT_BLUE# 12", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# 10%", }, inc_stats = { str=-3, dex=3, con=1, cun=3, lck=5, }, experience = 1.10, @@ -114,7 +114,7 @@ newBirthDescriptor talents = { [ActorTalents.T_HALFLING_LUCK]=1, }, - default_cosmetics = { {"hairs", "Dark Hair 1", only_for={sex="Male"}}, {"hairs", "Blond Hair 1", only_for={sex="Female"}} }, + default_cosmetics = { {"hairs", _t"Dark Hair 1", only_for={sex="Male"}}, {"hairs", _t"Blond Hair 1", only_for={sex="Female"}} }, copy = { moddable_tile = "halfling_#sex#", random_name_def = "halfling_#sex#", diff --git a/game/modules/tome/data/birth/races/human.lua b/game/modules/tome/data/birth/races/human.lua index 5f7190066310242a028c85e6880baa6778ece8e1..d08a98ff975930467494db7ff65376f278176c52 100644 --- a/game/modules/tome/data/birth/races/human.lua +++ b/game/modules/tome/data/birth/races/human.lua @@ -24,10 +24,10 @@ newBirthDescriptor{ type = "race", name = "Human", desc = { - "The Humans are one of the main races on Maj'Eyal, along with the Halflings. For many thousands of years they fought each other until events, and great people, unified all the Human and Halfling nations under one rule.", - "Humans of these Allied Kingdoms have known peace for over a century now.", - "Humans are split into two categories: the Highers, and the rest. Highers have latent magic in their blood which gives them higher attributes and senses along with a longer life.", - "The rest of Humanity is gifted with quick learning and mastery. They can do and become anything they desire.", + _t"The Humans are one of the main races on Maj'Eyal, along with the Halflings. For many thousands of years they fought each other until events, and great people, unified all the Human and Halfling nations under one rule.", + _t"Humans of these Allied Kingdoms have known peace for over a century now.", + _t"Humans are split into two categories: the Highers, and the rest. Highers have latent magic in their blood which gives them higher attributes and senses along with a longer life.", + _t"The rest of Humanity is gifted with quick learning and mastery. They can do and become anything they desire.", }, descriptor_choices = { @@ -60,60 +60,60 @@ newBirthDescriptor{ moddable_attachement_spots = "race_human", cosmetic_options = { skin = { - {name="Skin Color 1", file="base_01"}, - {name="Skin Color 2", file="base_02"}, - {name="Skin Color 3", file="base_03"}, - {name="Skin Color 4", file="base_04"}, - {name="Skin Color 5", file="base_05"}, - {name="Skin Color 6", file="base_06"}, - {name="Skin Color 7", file="base_07"}, - {name="Skin Color 8", file="base_08"}, + {name=_t"Skin Color 1", file="base_01"}, + {name=_t"Skin Color 2", file="base_02"}, + {name=_t"Skin Color 3", file="base_03"}, + {name=_t"Skin Color 4", file="base_04"}, + {name=_t"Skin Color 5", file="base_05"}, + {name=_t"Skin Color 6", file="base_06"}, + {name=_t"Skin Color 7", file="base_07"}, + {name=_t"Skin Color 8", file="base_08"}, }, hairs = { - {name="Dark Hair 1", file="hair_cornac_01"}, - {name="Dark Hair 2", file="hair_cornac_02"}, - {name="Dark Hair 3", file="hair_cornac_03"}, - {name="Dark Hair 4", file="hair_cornac_04", only_for={sex="Female"}}, - {name="Dark Hair 5", file="hair_cornac_05", only_for={sex="Female"}}, - {name="Dark Hair 6", file="hair_cornac_06", only_for={sex="Female"}}, - {name="Blond Hair 1", file="hair_higher_01"}, - {name="Blond Hair 2", file="hair_higher_02"}, - {name="Blond Hair 3", file="hair_higher_03"}, - {name="Blond Hair 4", file="hair_higher_04", only_for={sex="Female"}}, - {name="Blond Hair 5", file="hair_higher_05", only_for={sex="Female"}}, - {name="Blond Hair 6", file="hair_higher_06", only_for={sex="Female"}}, - {name="Redhead 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="Redhead 3", file="hair_redhead_03", unlock="cosmetic_race_human_redhead"}, - {name="Redhead 4", file="hair_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead 5", file="hair_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, - {name="Redhead 6", file="hair_redhead_06", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Dark Hair 1", file="hair_cornac_01"}, + {name=_t"Dark Hair 2", file="hair_cornac_02"}, + {name=_t"Dark Hair 3", file="hair_cornac_03"}, + {name=_t"Dark Hair 4", file="hair_cornac_04", only_for={sex="Female"}}, + {name=_t"Dark Hair 5", file="hair_cornac_05", only_for={sex="Female"}}, + {name=_t"Dark Hair 6", file="hair_cornac_06", only_for={sex="Female"}}, + {name=_t"Blond Hair 1", file="hair_higher_01"}, + {name=_t"Blond Hair 2", file="hair_higher_02"}, + {name=_t"Blond Hair 3", file="hair_higher_03"}, + {name=_t"Blond Hair 4", file="hair_higher_04", only_for={sex="Female"}}, + {name=_t"Blond Hair 5", file="hair_higher_05", only_for={sex="Female"}}, + {name=_t"Blond Hair 6", file="hair_higher_06", only_for={sex="Female"}}, + {name=_t"Redhead 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead 3", file="hair_redhead_03", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead 4", file="hair_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead 5", file="hair_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, + {name=_t"Redhead 6", file="hair_redhead_06", unlock="cosmetic_race_human_redhead", only_for={sex="Female"}}, }, facial_features = { - {name="Dark Beard 1", file="beard_cornac_01", only_for={sex="Male"}}, - {name="Dark Beard 2", file="beard_cornac_02", only_for={sex="Male"}}, - {name="Dark Beard 3", file="beard_cornac_03", only_for={sex="Male"}}, - {name="Dark Beard 4", file="beard_cornac_04", only_for={sex="Male"}}, - {name="Dark Beard 5", file="beard_cornac_05", only_for={sex="Male"}}, - {name="Blonde Beard 1", file="beard_higher_01", only_for={sex="Male"}}, - {name="Blonde Beard 2", file="beard_higher_02", only_for={sex="Male"}}, - {name="Blonde Beard 3", file="beard_higher_03", only_for={sex="Male"}}, - {name="Blonde Beard 4", file="beard_higher_04", only_for={sex="Male"}}, - {name="Blonde Beard 5", file="beard_higher_05", only_for={sex="Male"}}, - {name="Redhead Beard 1", file="beard_redhead_01", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Beard 2", file="beard_redhead_02", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Beard 3", file="beard_redhead_03", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Beard 4", file="beard_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Beard 5", file="beard_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Dark Mustache 1", file="face_mustache_cornac_01", only_for={sex="Male"}}, - {name="Dark Mustache 2", file="face_mustache_cornac_02", only_for={sex="Male"}}, - {name="Blond Mustache 1", file="face_mustache_higher_01", only_for={sex="Male"}}, - {name="Blond Mustache 2", file="face_mustache_higher_02", only_for={sex="Male"}}, - {name="Redhead Mustache 1", file="face_mustache_redhead_01", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, - {name="Redhead Mustache 2", file="face_mustache_redhead_02", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Dark Beard 1", file="beard_cornac_01", only_for={sex="Male"}}, + {name=_t"Dark Beard 2", file="beard_cornac_02", only_for={sex="Male"}}, + {name=_t"Dark Beard 3", file="beard_cornac_03", only_for={sex="Male"}}, + {name=_t"Dark Beard 4", file="beard_cornac_04", only_for={sex="Male"}}, + {name=_t"Dark Beard 5", file="beard_cornac_05", only_for={sex="Male"}}, + {name=_t"Blonde Beard 1", file="beard_higher_01", only_for={sex="Male"}}, + {name=_t"Blonde Beard 2", file="beard_higher_02", only_for={sex="Male"}}, + {name=_t"Blonde Beard 3", file="beard_higher_03", only_for={sex="Male"}}, + {name=_t"Blonde Beard 4", file="beard_higher_04", only_for={sex="Male"}}, + {name=_t"Blonde Beard 5", file="beard_higher_05", only_for={sex="Male"}}, + {name=_t"Redhead Beard 1", file="beard_redhead_01", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Beard 2", file="beard_redhead_02", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Beard 3", file="beard_redhead_03", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Beard 4", file="beard_redhead_04", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Beard 5", file="beard_redhead_05", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Dark Mustache 1", file="face_mustache_cornac_01", only_for={sex="Male"}}, + {name=_t"Dark Mustache 2", file="face_mustache_cornac_02", only_for={sex="Male"}}, + {name=_t"Blond Mustache 1", file="face_mustache_higher_01", only_for={sex="Male"}}, + {name=_t"Blond Mustache 2", file="face_mustache_higher_02", only_for={sex="Male"}}, + {name=_t"Redhead Mustache 1", file="face_mustache_redhead_01", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, + {name=_t"Redhead Mustache 2", file="face_mustache_redhead_02", unlock="cosmetic_race_human_redhead", only_for={sex="Male"}}, }, special = { - {name="Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) + {name=_t"Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) if not last then local o = birther.obj_list_by_name[birther.descriptors_by_type.sex == 'Female' and 'Bikini' or 'Mankini'] if not o then print("No bikini/mankini found!") return end actor:getInven(actor.INVEN_BODY)[1] = o:cloneFull() actor.moddable_tile_nude = 1 else actor:registerOnBirthForceWear(birther.descriptors_by_type.sex == 'Female' and "FUN_BIKINI" or "FUN_MANKINI") end end}, @@ -129,21 +129,21 @@ newBirthDescriptor type = "subrace", name = "Higher", desc = { - "Highers are a special branch of Humans that have been imbued with latent magic since the Age of Allure.", - "They usually do not breed with other Humans, trying to keep their blood 'pure'.", - "They possess the #GOLD#Wrath of the Highborn#WHITE# which allows them to increase damage dealt and decrease damage taken once in a while.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +1 Strength, +1 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +1 Magic, +1 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# 11", - "#GOLD#Experience penalty:#LIGHT_BLUE# 0%", + _t"Highers are a special branch of Humans that have been imbued with latent magic since the Age of Allure.", + _t"They usually do not breed with other Humans, trying to keep their blood 'pure'.", + _t"They possess the #GOLD#Wrath of the Highborn#WHITE# which allows them to increase damage dealt and decrease damage taken once in a while.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +1 Strength, +1 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +1 Magic, +1 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# 11", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# 0%", }, inc_stats = { str=1, mag=1, dex=1, wil=1 }, talents_types = { ["race/higher"]={true, 0} }, talents = { [ActorTalents.T_HIGHER_HEAL]=1, }, - default_cosmetics = { {"hairs", "Blond Hair 1"} }, + default_cosmetics = { {"hairs", _t"Blond Hair 1"} }, copy = { moddable_tile = "human_#sex#", moddable_tile_base = "base_01.png", @@ -161,13 +161,13 @@ newBirthDescriptor type = "subrace", name = "Cornac", desc = { - "Cornacs are Humans from the northern parts of the Allied Kingdoms.", - "Humans are an inherently very adaptable race and as such they gain a #GOLD#talent category point#WHITE# (others only gain one at levels 10, 20 and 34) and both #GOLD#a class and a generic talent point#WHITE# at birth and every 10 levels.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# 10", - "#GOLD#Experience penalty:#LIGHT_BLUE# 0%", + _t"Cornacs are Humans from the northern parts of the Allied Kingdoms.", + _t"Humans are an inherently very adaptable race and as such they gain a #GOLD#talent category point#WHITE# (others only gain one at levels 10, 20 and 34) and both #GOLD#a class and a generic talent point#WHITE# at birth and every 10 levels.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# 10", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# 0%", }, experience = 1.0, copy_add = { @@ -175,7 +175,7 @@ newBirthDescriptor unused_talents = 1, unused_generics = 1, }, - default_cosmetics = { {"hairs", "Dark Hair 1"} }, + default_cosmetics = { {"hairs", _t"Dark Hair 1"} }, copy = { moddable_tile = "human_#sex#", moddable_tile_base = "base_01.png", diff --git a/game/modules/tome/data/birth/races/tutorial.lua b/game/modules/tome/data/birth/races/tutorial.lua index c9d88d45e5b5aeea79bb7a234e7e927a08292ebf..65813341a845d5176a2c3d31631008f3a23af2a1 100644 --- a/game/modules/tome/data/birth/races/tutorial.lua +++ b/game/modules/tome/data/birth/races/tutorial.lua @@ -24,7 +24,7 @@ newBirthDescriptor{ type = "race", name = "Tutorial Human", desc = { - "A special tutorial race.", + _t"A special tutorial race.", }, descriptor_choices = { @@ -47,7 +47,7 @@ newBirthDescriptor type = "subrace", name = "Tutorial Basic", desc = { - "A Human hailing from the northern town of Derth. A common kind of man, unremarkable in all respects.", + _t"A Human hailing from the northern town of Derth. A common kind of man, unremarkable in all respects.", }, copy = { default_wilderness = {1, 1, "wilderness"}, @@ -64,7 +64,7 @@ newBirthDescriptor type = "subrace", name = "Tutorial Stats", desc = { - "A Human hailing from the northern town of Derth. A common kind of man, unremarkable in all respects.", + _t"A Human hailing from the northern town of Derth. A common kind of man, unremarkable in all respects.", }, copy = { default_wilderness = {1, 1, "wilderness"}, diff --git a/game/modules/tome/data/birth/races/undead.lua b/game/modules/tome/data/birth/races/undead.lua index d04d4d5d683e77e51c3311333f8ed48db4ebe4c4..3c7f89fcee87427a571a3687ed183399df840191 100644 --- a/game/modules/tome/data/birth/races/undead.lua +++ b/game/modules/tome/data/birth/races/undead.lua @@ -24,10 +24,10 @@ newBirthDescriptor{ type = "race", name = "Undead", locked = function() return profile.mod.allow_build.undead end, - locked_desc = "Grave strength, dread will, this flesh cannot stay still. Kings die, masters fall, we will outlast them all.", + locked_desc = _t"Grave strength, dread will, this flesh cannot stay still. Kings die, masters fall, we will outlast them all.", desc = { - "Undead are humanoids (Humans, Elves, Dwarves, ...) that have been brought back to life by the corruption of dark magics.", - "Undead can take many forms, from ghouls to vampires and liches.", + _t"Undead are humanoids (Humans, Elves, Dwarves, ...) that have been brought back to life by the corruption of dark magics.", + _t"Undead can take many forms, from ghouls to vampires and liches.", }, descriptor_choices = { @@ -70,7 +70,7 @@ newBirthDescriptor{ cosmetic_options = { special = { - {name="Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) + {name=_t"Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) if not last then local o = birther.obj_list_by_name[birther.descriptors_by_type.sex == 'Female' and 'Bikini' or 'Mankini'] if not o then print("No bikini/mankini found!") return end actor:getInven(actor.INVEN_BODY)[1] = o:cloneFull() actor.moddable_tile_nude = 1 else actor:registerOnBirthForceWear(birther.descriptors_by_type.sex == 'Female' and "FUN_BIKINI" or "FUN_MANKINI") end end}, @@ -85,22 +85,22 @@ newBirthDescriptor type = "subrace", name = "Ghoul", locked = function() return profile.mod.allow_build.undead_ghoul end, - locked_desc = "Slow to shuffle, quick to bite, learn from master, rule the night!", + locked_desc = _t"Slow to shuffle, quick to bite, learn from master, rule the night!", desc = { - "Ghouls are dumb, but resilient, rotting undead creatures, making good fighters.", - "They have access to #GOLD#special ghoul talents#WHITE# and a wide range of undead abilities:", - "- great poison resistance", - "- bleeding immunity", - "- stun resistance", - "- fear immunity", - "- special ghoul talents: ghoulish leap, gnaw and retch", - "The rotting bodies of ghouls also force them to act a bit more slowly than most creatures.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +3 Strength, +1 Dexterity, +5 Constitution", - "#LIGHT_BLUE# * +0 Magic, -2 Willpower, -2 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# 14", - "#GOLD#Experience penalty:#LIGHT_BLUE# 12%", - "#GOLD#Speed penalty:#LIGHT_BLUE# -20%", + _t"Ghouls are dumb, but resilient, rotting undead creatures, making good fighters.", + _t"They have access to #GOLD#special ghoul talents#WHITE# and a wide range of undead abilities:", + _t"- great poison resistance", + _t"- bleeding immunity", + _t"- stun resistance", + _t"- fear immunity", + _t"- special ghoul talents: ghoulish leap, gnaw and retch", + _t"The rotting bodies of ghouls also force them to act a bit more slowly than most creatures.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +3 Strength, +1 Dexterity, +5 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, -2 Willpower, -2 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# 14", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# 12%", + _t"#GOLD#Speed penalty:#LIGHT_BLUE# -20%", }, moddable_attachement_spots = "race_ghoul", moddable_attachement_spots_sexless=true, descriptor_choices = @@ -135,44 +135,44 @@ newBirthDescriptor cosmetic_options = { skin = { - {name="Skin Color 1", file="base_01"}, - {name="Skin Color 2", file="base_02"}, - {name="Skin Color 3", file="base_03"}, - {name="Skin Color 4", file="base_04"}, - {name="Skin Color 5", file="base_05"}, - {name="Skin Color 6", file="base_06"}, - {name="Skin Color 7", file="base_07"}, - {name="Skin Color 8", file="base_08"}, - {name="Skin Color 9", file="base_09"}, + {name=_t"Skin Color 1", file="base_01"}, + {name=_t"Skin Color 2", file="base_02"}, + {name=_t"Skin Color 3", file="base_03"}, + {name=_t"Skin Color 4", file="base_04"}, + {name=_t"Skin Color 5", file="base_05"}, + {name=_t"Skin Color 6", file="base_06"}, + {name=_t"Skin Color 7", file="base_07"}, + {name=_t"Skin Color 8", file="base_08"}, + {name=_t"Skin Color 9", file="base_09"}, }, hairs = { - {name="Hair 1", file="hair_01"}, - {name="Hair 2", file="hair_02"}, - {name="Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="White Hair 1", file="hair_white_01"}, - {name="White Hair 2", file="hair_white_02"}, + {name=_t"Hair 1", file="hair_01"}, + {name=_t"Hair 2", file="hair_02"}, + {name=_t"Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"White Hair 1", file="hair_white_01"}, + {name=_t"White Hair 2", file="hair_white_02"}, }, facial_features = { - {name="Beard 1", file="beard_01"}, - {name="Beard 2", file="beard_02"}, - {name="Redhead Beard 1", file="beard_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Beard 2", file="beard_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="White Beard 1", file="beard_white_01"}, - {name="White Beard 2", file="beard_white_02"}, - {name="Alternative Face", file="face_01"}, - {name="Fangs 1", file="face_fangs_01"}, - {name="Fangs 2", file="face_fangs_02"}, - {name="Mustache", file="face_mustache_01"}, - {name="Redhead Mustache", file="face_mustache_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="White Mustache", file="face_mustache_white_01"}, + {name=_t"Beard 1", file="beard_01"}, + {name=_t"Beard 2", file="beard_02"}, + {name=_t"Redhead Beard 1", file="beard_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Beard 2", file="beard_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"White Beard 1", file="beard_white_01"}, + {name=_t"White Beard 2", file="beard_white_02"}, + {name=_t"Alternative Face", file="face_01"}, + {name=_t"Fangs 1", file="face_fangs_01"}, + {name=_t"Fangs 2", file="face_fangs_02"}, + {name=_t"Mustache", file="face_mustache_01"}, + {name=_t"Redhead Mustache", file="face_mustache_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"White Mustache", file="face_mustache_white_01"}, }, tatoos = { - {name="Bloodstains", file="tattoo_bloodstains"}, - {name="Bones", file="tattoo_bones"}, - {name="Guts", file="tattoo_guts"}, - {name="Runes 1", file="tattoo_runes_01"}, - {name="Runes 2", file="tattoo_runes_02"}, + {name=_t"Bloodstains", file="tattoo_bloodstains"}, + {name=_t"Bones", file="tattoo_bones"}, + {name=_t"Guts", file="tattoo_guts"}, + {name=_t"Runes 1", file="tattoo_runes_01"}, + {name=_t"Runes 2", file="tattoo_runes_02"}, }, }, } @@ -182,20 +182,20 @@ newBirthDescriptor type = "subrace", name = "Skeleton", locked = function() return profile.mod.allow_build.undead_skeleton end, - locked_desc = "The marching bones, each step we rattle; but servants no more, we march to battle!", + locked_desc = _t"The marching bones, each step we rattle; but servants no more, we march to battle!", desc = { - "Skeletons are animated bones, undead creatures both strong and dexterous.", - "They have access to #GOLD#special skeleton talents#WHITE# and a wide range of undead abilities:", - "- poison immunity", - "- bleeding immunity", - "- fear immunity", - "- no need to breathe", - "- special skeleton talents: bone armour, resilient bones, re-assemble", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * +3 Strength, +4 Dexterity, +0 Constitution", - "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# 12", - "#GOLD#Experience penalty:#LIGHT_BLUE# 20%", + _t"Skeletons are animated bones, undead creatures both strong and dexterous.", + _t"They have access to #GOLD#special skeleton talents#WHITE# and a wide range of undead abilities:", + _t"- poison immunity", + _t"- bleeding immunity", + _t"- fear immunity", + _t"- no need to breathe", + _t"- special skeleton talents: bone armour, resilient bones, re-assemble", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * +3 Strength, +4 Dexterity, +0 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# 12", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# 20%", }, moddable_attachement_spots = "race_skeleton", moddable_attachement_spots_sexless=true, descriptor_choices = @@ -230,47 +230,47 @@ newBirthDescriptor cosmetic_options = { skin = { - {name="Skin Color 1", file="base_01"}, - {name="Skin Color 2", file="base_02"}, - {name="Skin Color 3", file="base_03"}, - {name="Skin Color 4", file="base_04"}, - {name="Skin Color 5", file="base_05"}, - {name="Skin Color 6", file="base_06"}, - {name="Skin Color 7", file="base_07"}, - {name="Skin Color 8", file="base_08"}, + {name=_t"Skin Color 1", file="base_01"}, + {name=_t"Skin Color 2", file="base_02"}, + {name=_t"Skin Color 3", file="base_03"}, + {name=_t"Skin Color 4", file="base_04"}, + {name=_t"Skin Color 5", file="base_05"}, + {name=_t"Skin Color 6", file="base_06"}, + {name=_t"Skin Color 7", file="base_07"}, + {name=_t"Skin Color 8", file="base_08"}, }, hairs = { - {name="Hair 1", file="hair_01"}, - {name="Hair 2", file="hair_02"}, - {name="Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="White Hair 1", file="hair_white_01"}, - {name="White Hair 2", file="hair_white_02"}, + {name=_t"Hair 1", file="hair_01"}, + {name=_t"Hair 2", file="hair_02"}, + {name=_t"Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"White Hair 1", file="hair_white_01"}, + {name=_t"White Hair 2", file="hair_white_02"}, }, facial_features = { - {name="Beard 1", file="beard_01"}, - {name="Beard 2", file="beard_02"}, - {name="Redhead Beard 1", file="beard_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Beard 2", file="beard_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="White Beard 1", file="beard_white_01"}, - {name="White Beard 2", file="beard_white_02"}, - {name="Eyes 1", file="face_eyes_01"}, - {name="Eyes 2", file="face_eyes_02"}, - {name="Eyes 3", file="face_eyes_03"}, - {name="Mustache", file="face_mustache_01"}, - {name="Redhead Mustache", file="face_mustache_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="White Mustache", file="face_mustache_white_01"}, - {name="Teeth 1", file="face_teeth_01"}, - {name="Teeth 2", file="face_teeth_02"}, + {name=_t"Beard 1", file="beard_01"}, + {name=_t"Beard 2", file="beard_02"}, + {name=_t"Redhead Beard 1", file="beard_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Beard 2", file="beard_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"White Beard 1", file="beard_white_01"}, + {name=_t"White Beard 2", file="beard_white_02"}, + {name=_t"Eyes 1", file="face_eyes_01"}, + {name=_t"Eyes 2", file="face_eyes_02"}, + {name=_t"Eyes 3", file="face_eyes_03"}, + {name=_t"Mustache", file="face_mustache_01"}, + {name=_t"Redhead Mustache", file="face_mustache_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"White Mustache", file="face_mustache_white_01"}, + {name=_t"Teeth 1", file="face_teeth_01"}, + {name=_t"Teeth 2", file="face_teeth_02"}, }, tatoos = { - {name="Cracks", file="tattoo_cracks"}, - {name="Guts", file="tattoo_guts"}, - {name="Iron Bolt", file="tattoo_iron_bolt"}, - {name="Molds", file="tattoo_mold_01"}, - {name="Runes 1", file="tattoo_runes_01"}, - {name="Runes 2", file="tattoo_runes_02"}, - {name="Rust", file="tattoo_rust_01"}, + {name=_t"Cracks", file="tattoo_cracks"}, + {name=_t"Guts", file="tattoo_guts"}, + {name=_t"Iron Bolt", file="tattoo_iron_bolt"}, + {name=_t"Molds", file="tattoo_mold_01"}, + {name=_t"Runes 1", file="tattoo_runes_01"}, + {name=_t"Runes 2", file="tattoo_runes_02"}, + {name=_t"Rust", file="tattoo_rust_01"}, }, }, } @@ -284,7 +284,7 @@ newBirthDescriptor type = "subrace", name = "Lich", locked = function() return true end, - locked_desc = "You should not see this!", + locked_desc = _t"You should not see this!", desc = { }, moddable_attachement_spots = "race_skeleton", moddable_attachement_spots_sexless=true, @@ -295,60 +295,60 @@ newBirthDescriptor }, cosmetic_options = { skin = { - {name="Skin Color 1", file="base_lich_01"}, - {name="Skin Color 2", file="base_lich_02"}, - {name="Skin Color 3", file="base_lich_03"}, - {name="Skin Color 4", file="base_lich_04"}, - {name="Skin Color 5", file="base_lich_05"}, - {name="Skin Color 6", file="base_lich_06"}, - {name="Skin Color 7", file="base_lich_07"}, - {name="Skin Color 8", file="base_lich_08"}, + {name=_t"Skin Color 1", file="base_lich_01"}, + {name=_t"Skin Color 2", file="base_lich_02"}, + {name=_t"Skin Color 3", file="base_lich_03"}, + {name=_t"Skin Color 4", file="base_lich_04"}, + {name=_t"Skin Color 5", file="base_lich_05"}, + {name=_t"Skin Color 6", file="base_lich_06"}, + {name=_t"Skin Color 7", file="base_lich_07"}, + {name=_t"Skin Color 8", file="base_lich_08"}, }, hairs = { - {name="Hair 1", file="hair_01"}, - {name="Hair 2", file="hair_02"}, - {name="Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="White Hair 1", file="hair_white_01"}, - {name="White Hair 2", file="hair_white_02"}, + {name=_t"Hair 1", file="hair_01"}, + {name=_t"Hair 2", file="hair_02"}, + {name=_t"Redhead Hair 1", file="hair_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Hair 2", file="hair_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"White Hair 1", file="hair_white_01"}, + {name=_t"White Hair 2", file="hair_white_02"}, }, facial_features = { - {name="Beard 1", file="beard_01"}, - {name="Beard 2", file="beard_02"}, - {name="Redhead Beard 1", file="beard_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="Redhead Beard 2", file="beard_redhead_02", unlock="cosmetic_race_human_redhead"}, - {name="White Beard 1", file="beard_white_01"}, - {name="White Beard 2", file="beard_white_02"}, - {name="Eyes 1", file="face_eyes_01"}, - {name="Eyes 2", file="face_eyes_02"}, - {name="Eyes 3", file="face_eyes_03"}, - {name="Mustache", file="face_mustache_01"}, - {name="Redhead Mustache", file="face_mustache_redhead_01", unlock="cosmetic_race_human_redhead"}, - {name="White Mustache", file="face_mustache_white_01"}, - {name="Teeth 1", file="face_teeth_01"}, - {name="Teeth 2", file="face_teeth_02"}, - {name="Lich Eyes 1", file="face_lich_eyes_01"}, - {name="Lich Eyes 2", file="face_lich_eyes_02"}, - {name="Lich Eyes 3", file="face_lich_eyes_03"}, - {name="Lich Regalia 1", file="face_lich_regalia_01"}, - {name="Lich Regalia 2", file="face_lich_regalia_02"}, - {name="Lich Regalia 3", file="face_lich_regalia_03"}, - {name="Lich Regalia 4", file="face_lich_regalia_04"}, - {name="Lich Regalia 5", file="face_lich_regalia_05"}, - {name="Lich Regalia 6", file="face_lich_regalia_06"}, - {name="Lich Regalia 7", file="face_lich_regalia_07"}, - {name="Lich Regalia 8", file="face_lich_regalia_08"}, - {name="Lich Regalia 9", file="face_lich_regalia_09"}, - {name="Lich Regalia 10", file="face_lich_regalia_10"}, + {name=_t"Beard 1", file="beard_01"}, + {name=_t"Beard 2", file="beard_02"}, + {name=_t"Redhead Beard 1", file="beard_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redhead Beard 2", file="beard_redhead_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"White Beard 1", file="beard_white_01"}, + {name=_t"White Beard 2", file="beard_white_02"}, + {name=_t"Eyes 1", file="face_eyes_01"}, + {name=_t"Eyes 2", file="face_eyes_02"}, + {name=_t"Eyes 3", file="face_eyes_03"}, + {name=_t"Mustache", file="face_mustache_01"}, + {name=_t"Redhead Mustache", file="face_mustache_redhead_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"White Mustache", file="face_mustache_white_01"}, + {name=_t"Teeth 1", file="face_teeth_01"}, + {name=_t"Teeth 2", file="face_teeth_02"}, + {name=_t"Lich Eyes 1", file="face_lich_eyes_01"}, + {name=_t"Lich Eyes 2", file="face_lich_eyes_02"}, + {name=_t"Lich Eyes 3", file="face_lich_eyes_03"}, + {name=_t"Lich Regalia 1", file="face_lich_regalia_01"}, + {name=_t"Lich Regalia 2", file="face_lich_regalia_02"}, + {name=_t"Lich Regalia 3", file="face_lich_regalia_03"}, + {name=_t"Lich Regalia 4", file="face_lich_regalia_04"}, + {name=_t"Lich Regalia 5", file="face_lich_regalia_05"}, + {name=_t"Lich Regalia 6", file="face_lich_regalia_06"}, + {name=_t"Lich Regalia 7", file="face_lich_regalia_07"}, + {name=_t"Lich Regalia 8", file="face_lich_regalia_08"}, + {name=_t"Lich Regalia 9", file="face_lich_regalia_09"}, + {name=_t"Lich Regalia 10", file="face_lich_regalia_10"}, }, tatoos = { - {name="Cracks", file="tattoo_cracks"}, - {name="Guts", file="tattoo_guts"}, - {name="Iron Bolt", file="tattoo_iron_bolt"}, - {name="Molds", file="tattoo_mold_01"}, - {name="Runes 1", file="tattoo_runes_01"}, - {name="Runes 2", file="tattoo_runes_02"}, - {name="Rust", file="tattoo_rust_01"}, + {name=_t"Cracks", file="tattoo_cracks"}, + {name=_t"Guts", file="tattoo_guts"}, + {name=_t"Iron Bolt", file="tattoo_iron_bolt"}, + {name=_t"Molds", file="tattoo_mold_01"}, + {name=_t"Runes 1", file="tattoo_runes_01"}, + {name=_t"Runes 2", file="tattoo_runes_02"}, + {name=_t"Rust", file="tattoo_rust_01"}, }, }, } diff --git a/game/modules/tome/data/birth/races/yeek.lua b/game/modules/tome/data/birth/races/yeek.lua index 8b5d8fb8606524054b118f072c6bd38af7697bd2..1d86c1578be2f7ba79a87e9923f7954498bdae76 100644 --- a/game/modules/tome/data/birth/races/yeek.lua +++ b/game/modules/tome/data/birth/races/yeek.lua @@ -24,12 +24,12 @@ newBirthDescriptor{ type = "race", name = "Yeek", locked = function() return profile.mod.allow_build.yeek end, - locked_desc = "One race, one mind, one way. Our oppression shall end, and we shall inherit Eyal. Do not presume we are weak - our way is true, and only those who help us shall see our strength.", + locked_desc = _t"One race, one mind, one way. Our oppression shall end, and we shall inherit Eyal. Do not presume we are weak - our way is true, and only those who help us shall see our strength.", desc = { - "Yeeks are a mysterious race of small humanoids native to the tropical island of Rel.", - "Their body is covered with white fur and their disproportionate heads give them a ridiculous look.", - "Although they are now nearly unheard of in Maj'Eyal, they spent many thousand years as secret slaves to the Halfling nation of Nargol.", - "They gained their freedom during the Age of Pyre and have since then followed 'The Way' - a unity of minds enforced by their powerful psionics.", + _t"Yeeks are a mysterious race of small humanoids native to the tropical island of Rel.", + _t"Their body is covered with white fur and their disproportionate heads give them a ridiculous look.", + _t"Although they are now nearly unheard of in Maj'Eyal, they spent many thousand years as secret slaves to the Halfling nation of Nargol.", + _t"They gained their freedom during the Age of Pyre and have since then followed 'The Way' - a unity of minds enforced by their powerful psionics.", }, descriptor_choices = { @@ -62,65 +62,65 @@ newBirthDescriptor{ cosmetic_options = { skin = { - {name="Skin Color 1", file="base_01"}, - {name="Skin Color 2", file="base_02"}, - {name="Skin Color 3", file="base_03"}, - {name="Skin Color 4", file="base_04"}, - {name="Skin Color 5", file="base_05"}, - {name="Skin Color 6", file="base_06"}, - {name="Skin Color 7", file="base_07"}, - {name="Skin Color 8", file="base_08"}, - {name="Skin Color 9", file="base_09"}, - {name="Skin Color 10", file="base_10"}, + {name=_t"Skin Color 1", file="base_01"}, + {name=_t"Skin Color 2", file="base_02"}, + {name=_t"Skin Color 3", file="base_03"}, + {name=_t"Skin Color 4", file="base_04"}, + {name=_t"Skin Color 5", file="base_05"}, + {name=_t"Skin Color 6", file="base_06"}, + {name=_t"Skin Color 7", file="base_07"}, + {name=_t"Skin Color 8", file="base_08"}, + {name=_t"Skin Color 9", file="base_09"}, + {name=_t"Skin Color 10", file="base_10"}, }, hairs = { - {name="Hair 1", file="hair_01"}, - {name="Hair 2", file="hair_02"}, - {name="Hair 3", file="hair_03"}, - {name="Hair 4", file="hair_04"}, - {name="Hair 5", file="hair_05"}, - {name="Redfur Hair 1", file="hair_redfur_01", unlock="cosmetic_race_human_redhead"}, - {name="Redfur Hair 2", file="hair_redfur_02", unlock="cosmetic_race_human_redhead"}, - {name="Redfur Hair 3", file="hair_redfur_03", unlock="cosmetic_race_human_redhead"}, - {name="Redfur Hair 4", file="hair_redfur_04", unlock="cosmetic_race_human_redhead"}, - {name="Redfur Hair 5", file="hair_redfur_05", unlock="cosmetic_race_human_redhead"}, + {name=_t"Hair 1", file="hair_01"}, + {name=_t"Hair 2", file="hair_02"}, + {name=_t"Hair 3", file="hair_03"}, + {name=_t"Hair 4", file="hair_04"}, + {name=_t"Hair 5", file="hair_05"}, + {name=_t"Redfur Hair 1", file="hair_redfur_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redfur Hair 2", file="hair_redfur_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redfur Hair 3", file="hair_redfur_03", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redfur Hair 4", file="hair_redfur_04", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redfur Hair 5", file="hair_redfur_05", unlock="cosmetic_race_human_redhead"}, }, facial_features = { - {name="Beard 1", file="beard_01"}, - {name="Beard 2", file="beard_02"}, - {name="Beard 3", file="beard_03"}, - {name="Redfur Beard 1", file="beard_redfur_01", unlock="cosmetic_race_human_redhead"}, - {name="Redfur Beard 2", file="beard_redfur_02", unlock="cosmetic_race_human_redhead"}, - {name="Redfur Beard 3", file="beard_redfur_03", unlock="cosmetic_race_human_redhead"}, - {name="Eyes 1", file="face_eyes_01"}, - {name="Eyes 2", file="face_eyes_02"}, - {name="Eyes 3", file="face_eyes_03"}, - {name="Eyes 4", file="face_eyes_04"}, - {name="Eyes 5", file="face_eyes_05"}, - {name="Eyes 6", file="face_eyes_06"}, - {name="Eyes 7", file="face_eyes_07"}, - {name="Eyes 8", file="face_eyes_08"}, - {name="Eyes 9", file="face_eyes_09"}, - {name="Eyes 10", file="face_eyes_10"}, - {name="Eyes 11", file="face_eyes_11"}, - {name="Eyes 12", file="face_eyes_12"}, - {name="Eyes 13", file="face_eyes_13"}, - {name="Mustache 1", file="face_mustache_01"}, - {name="Mustache 2", file="face_mustache_02"}, - {name="Mustache 3", file="face_mustache_03"}, - {name="Redfur Mustache 1", file="face_mustache_redfur_01", unlock="cosmetic_race_human_redhead"}, - {name="Redfur Mustache 2", file="face_mustache_redfur_02", unlock="cosmetic_race_human_redhead"}, - {name="Redfur Mustache 3", file="face_mustache_redfur_03", unlock="cosmetic_race_human_redhead"}, + {name=_t"Beard 1", file="beard_01"}, + {name=_t"Beard 2", file="beard_02"}, + {name=_t"Beard 3", file="beard_03"}, + {name=_t"Redfur Beard 1", file="beard_redfur_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redfur Beard 2", file="beard_redfur_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redfur Beard 3", file="beard_redfur_03", unlock="cosmetic_race_human_redhead"}, + {name=_t"Eyes 1", file="face_eyes_01"}, + {name=_t"Eyes 2", file="face_eyes_02"}, + {name=_t"Eyes 3", file="face_eyes_03"}, + {name=_t"Eyes 4", file="face_eyes_04"}, + {name=_t"Eyes 5", file="face_eyes_05"}, + {name=_t"Eyes 6", file="face_eyes_06"}, + {name=_t"Eyes 7", file="face_eyes_07"}, + {name=_t"Eyes 8", file="face_eyes_08"}, + {name=_t"Eyes 9", file="face_eyes_09"}, + {name=_t"Eyes 10", file="face_eyes_10"}, + {name=_t"Eyes 11", file="face_eyes_11"}, + {name=_t"Eyes 12", file="face_eyes_12"}, + {name=_t"Eyes 13", file="face_eyes_13"}, + {name=_t"Mustache 1", file="face_mustache_01"}, + {name=_t"Mustache 2", file="face_mustache_02"}, + {name=_t"Mustache 3", file="face_mustache_03"}, + {name=_t"Redfur Mustache 1", file="face_mustache_redfur_01", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redfur Mustache 2", file="face_mustache_redfur_02", unlock="cosmetic_race_human_redhead"}, + {name=_t"Redfur Mustache 3", file="face_mustache_redfur_03", unlock="cosmetic_race_human_redhead"}, }, tatoos = { - {name="Bodypaint 1", file="tattoo_bodypaint_01"}, - {name="Bodypaint 2", file="tattoo_bodypaint_02"}, - {name="Tatoos 1", file="tattoo_pattern_01"}, - {name="Tatoos 2", file="tattoo_pattern_02"}, - {name="Redfur", file="tattoo_redfur", unlock="cosmetic_race_human_redhead"}, + {name=_t"Bodypaint 1", file="tattoo_bodypaint_01"}, + {name=_t"Bodypaint 2", file="tattoo_bodypaint_02"}, + {name=_t"Tatoos 1", file="tattoo_pattern_01"}, + {name=_t"Tatoos 2", file="tattoo_pattern_02"}, + {name=_t"Redfur", file="tattoo_redfur", unlock="cosmetic_race_human_redhead"}, }, special = { - {name="Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) + {name=_t"Bikini / Mankini", birth_only=true, on_actor=function(actor, birther, last) if not last then local o = birther.obj_list_by_name[birther.descriptors_by_type.sex == 'Female' and 'Bikini' or 'Mankini'] if not o then print("No bikini/mankini found!") return end actor:getInven(actor.INVEN_BODY)[1] = o:cloneFull() actor.moddable_tile_nude = 1 else actor:registerOnBirthForceWear(birther.descriptors_by_type.sex == 'Female' and "FUN_BIKINI" or "FUN_MANKINI") end end}, @@ -136,19 +136,19 @@ newBirthDescriptor type = "subrace", name = "Yeek", locked = function() return profile.mod.allow_build.yeek end, - locked_desc = "One race, one mind, one way. Our oppression shall end, and we shall inherit Eyal. Do not presume we are weak - our way is true, and only those who help us shall see our strength.", + locked_desc = _t"One race, one mind, one way. Our oppression shall end, and we shall inherit Eyal. Do not presume we are weak - our way is true, and only those who help us shall see our strength.", desc = { - "Yeeks are a mysterious race native to the tropical island of Rel.", - "Although they are now nearly unheard of in Maj'Eyal, they spent many centuries as secret slaves to the Halfling nation of Nargol.", - "They gained their freedom during the Age of Pyre and have since then followed 'The Way' - a unity of minds enforced by their powerful psionics.", - "They possess the #GOLD#Dominant Will#WHITE# talent which allows them to temporarily subvert the mind of a lesser creature. When the effect ends, the creature dies.", - "While Yeeks are not amphibians, they still have an affinity for water, allowing them to survive longer without breathing.", - "#GOLD#Stat modifiers:", - "#LIGHT_BLUE# * -3 Strength, -2 Dexterity, -5 Constitution", - "#LIGHT_BLUE# * +0 Magic, +6 Willpower, +4 Cunning", - "#GOLD#Life per level:#LIGHT_BLUE# 7", - "#GOLD#Experience penalty:#LIGHT_BLUE# -15%", - "#GOLD#Confusion resistance:#LIGHT_BLUE# 35%", + _t"Yeeks are a mysterious race native to the tropical island of Rel.", + _t"Although they are now nearly unheard of in Maj'Eyal, they spent many centuries as secret slaves to the Halfling nation of Nargol.", + _t"They gained their freedom during the Age of Pyre and have since then followed 'The Way' - a unity of minds enforced by their powerful psionics.", + _t"They possess the #GOLD#Dominant Will#WHITE# talent which allows them to temporarily subvert the mind of a lesser creature. When the effect ends, the creature dies.", + _t"While Yeeks are not amphibians, they still have an affinity for water, allowing them to survive longer without breathing.", + _t"#GOLD#Stat modifiers:", + _t"#LIGHT_BLUE# * -3 Strength, -2 Dexterity, -5 Constitution", + _t"#LIGHT_BLUE# * +0 Magic, +6 Willpower, +4 Cunning", + _t"#GOLD#Life per level:#LIGHT_BLUE# 7", + _t"#GOLD#Experience penalty:#LIGHT_BLUE# -15%", + _t"#GOLD#Confusion resistance:#LIGHT_BLUE# 35%", }, inc_stats = { str=-3, con=-5, cun=4, wil=6, mag=0, dex=-2 }, talents_types = { ["race/yeek"]={true, 0} }, diff --git a/game/modules/tome/data/birth/sexes.lua b/game/modules/tome/data/birth/sexes.lua index fb6e3af6f95a927b87ed32baee0af5a04a988e70..41cec648edf131d13b18b7c12053e5e1d4863566 100644 --- a/game/modules/tome/data/birth/sexes.lua +++ b/game/modules/tome/data/birth/sexes.lua @@ -23,8 +23,8 @@ newBirthDescriptor{ name = "Female", desc = { - "You are a female of the species.", - "There is no in-game difference between the two sexes.", + _t"You are a female of the species.", + _t"There is no in-game difference between the two sexes.", }, copy = { female=true, }, } @@ -34,8 +34,8 @@ newBirthDescriptor{ name = "Male", desc = { - "You are a male of the species.", - "There is no in-game difference between the two sexes.", + _t"You are a male of the species.", + _t"There is no in-game difference between the two sexes.", }, copy = { male=true, }, } diff --git a/game/modules/tome/data/birth/worlds.lua b/game/modules/tome/data/birth/worlds.lua index 17bb6b29f988b7d36b33f727d1d02fc3a520da24..e9ae3ca36100f14b6386472f90d454c34c5e7699 100644 --- a/game/modules/tome/data/birth/worlds.lua +++ b/game/modules/tome/data/birth/worlds.lua @@ -66,14 +66,14 @@ Birther.default_eyal_descriptors = default_eyal_descriptors newBirthDescriptor{ type = "world", name = "Maj'Eyal", - display_name = "Maj'Eyal: The Age of Ascendancy", + display_name = _t"Maj'Eyal: The Age of Ascendancy", selection_default = config.settings.tome.default_birth and config.settings.tome.default_birth.campaign == "Maj'Eyal", desc = { - "The people of Maj'Eyal: Humans, Halflings, Elves and Dwarves.", - "The known world has been at relative peace for over one hundred years, and people are prospering again.", - "You are an adventurer, setting out to find lost treasure and glory.", - "But what lurks in the shadows of the world?", + _t"The people of Maj'Eyal: Humans, Halflings, Elves and Dwarves.", + _t"The known world has been at relative peace for over one hundred years, and people are prospering again.", + _t"You are an adventurer, setting out to find lost treasure and glory.", + _t"But what lurks in the shadows of the world?", }, descriptor_choices = default_eyal_descriptors{}, game_state = { @@ -101,17 +101,17 @@ newBirthDescriptor{ newBirthDescriptor{ type = "world", name = "Infinite", - display_name = "Infinite Dungeon: The Neverending Descent", + display_name = _t"Infinite Dungeon: The Neverending Descent", locked = function() return profile.mod.allow_build.campaign_infinite_dungeon end, - locked_desc = "Ever deeper, never ending, no reprieve, keep descending. In ruins old, through barred gate, once riddle solved, find thy fate.", + locked_desc = _t"Ever deeper, never ending, no reprieve, keep descending. In ruins old, through barred gate, once riddle solved, find thy fate.", selection_default = config.settings.tome.default_birth and config.settings.tome.default_birth.campaign == "Infinite", desc = { - "Play as your favorite race and class and venture into the infinite dungeon.", - "The only limit to how far you can go is your own skill!", - "Inside the infinite dungeon you will yourself be limitless. You can level up beyond level 50 and continue to gain stat and talent points (at a reduced rate).", - "Every level after level 50 the maximum of stats will increase by one.", - "Every 10 levels after level 50 the maximum points of each talent will increase by one.", + _t"Play as your favorite race and class and venture into the infinite dungeon.", + _t"The only limit to how far you can go is your own skill!", + _t"Inside the infinite dungeon you will yourself be limitless. You can level up beyond level 50 and continue to gain stat and talent points (at a reduced rate).", + _t"Every level after level 50 the maximum of stats will increase by one.", + _t"Every 10 levels after level 50 the maximum points of each talent will increase by one.", }, descriptor_choices = default_eyal_descriptors{ difficulty = { Tutorial = "never"} }, random_escort_possibilities = { {"infinite-dungeon", 5, 40} }, @@ -177,16 +177,16 @@ newBirthDescriptor{ newBirthDescriptor{ type = "world", name = "Arena", - display_name = "The Arena: Challenge of the Master", + display_name = _t"The Arena: Challenge of the Master", locked = function() return profile.mod.allow_build.campaign_arena end, - locked_desc = "Blood spilled on sand, only the strong survive. Prove yourself worthy to enter.", + locked_desc = _t"Blood spilled on sand, only the strong survive. Prove yourself worthy to enter.", selection_default = config.settings.tome.default_birth and config.settings.tome.default_birth.campaign == "Arena", desc = { - "Play as a lone warrior facing the Arena's challenge!", - "You can use any class and race for it.", - "See how far you can go! Can you become the new Master of the Arena?", - "If so, you will battle your own champion next time!", + _t"Play as a lone warrior facing the Arena's challenge!", + _t"You can use any class and race for it.", + _t"See how far you can go! Can you become the new Master of the Arena?", + _t"If so, you will battle your own champion next time!", }, descriptor_choices = default_eyal_descriptors{ difficulty = { Tutorial = "never" }, permadeath = { Exploration = "never", Adventure = "never" } }, copy = { diff --git a/game/modules/tome/data/calendar_allied.lua b/game/modules/tome/data/calendar_allied.lua index 6aafb26ea8196f372a863cda6cb27e34f4b8c3cd..72beca63d01cfa0c4d07ffb98248a0aa588e5336 100644 --- a/game/modules/tome/data/calendar_allied.lua +++ b/game/modules/tome/data/calendar_allied.lua @@ -18,16 +18,16 @@ -- darkgod@te4.org return { - { 2, "Wintertide", }, - { 10, "Allure" }, - { 80, "Regrowth" }, - { 1, "Time of Balance" }, - { 79, "Pyre" }, - { 10, "Mirth" }, - { 3, "Summertide" }, - { 10, "Flare" }, - { 79, "Dusk" }, - { 1, "Time of Equilibrium" }, - { 80, "Haze" }, - { 10, "Decay" }, + { 2, _t("Wintertide", "calendar allied") }, + { 10, _t("Allure", "calendar allied") }, + { 80, _t("Regrowth", "calendar allied") }, + { 1, _t("Time of Balance", "calendar allied") }, + { 79, _t("Pyre", "calendar allied") }, + { 10, _t("Mirth", "calendar allied") }, + { 3, _t("Summertide", "calendar allied") }, + { 10, _t("Flare", "calendar allied") }, + { 79, _t("Dusk", "calendar allied") }, + { 1, _t("Time of Equilibrium", "calendar allied") }, + { 80, _t("Haze", "calendar allied") }, + { 10, _t("Decay", "calendar allied") }, } diff --git a/game/modules/tome/data/calendar_dwarf.lua b/game/modules/tome/data/calendar_dwarf.lua index eaec575c44b80877d648dddf544dd1c75d129c59..8eaa6afe9670447e8ea8731b0de6488ed7ab722f 100644 --- a/game/modules/tome/data/calendar_dwarf.lua +++ b/game/modules/tome/data/calendar_dwarf.lua @@ -18,15 +18,15 @@ -- darkgod@te4.org return { - { 31, "Iron", }, - { 45, "Steel", }, - { 30, "Gold", }, - { 45, "Stralite", }, - { 31, "Voratun", }, - { 3, "Acquisition", }, - { 45, "Profit", }, - { 30, "Wealth", }, - { 45, "Dearth", }, - { 30, "Loss", }, - { 30, "Shortage", }, + { 31, _t("Iron", "calendar dwarf") }, + { 45, _t("Steel", "calendar dwarf") }, + { 30, _t("Gold", "calendar dwarf") }, + { 45, _t("Stralite", "calendar dwarf") }, + { 31, _t("Voratun", "calendar dwarf") }, + { 3, _t("Acquisition", "calendar dwarf") }, + { 45, _t("Profit", "calendar dwarf") }, + { 30, _t("Wealth", "calendar dwarf") }, + { 45, _t("Dearth", "calendar dwarf") }, + { 30, _t("Loss", "calendar dwarf") }, + { 30, _t("Shortage", "calendar dwarf") }, } diff --git a/game/modules/tome/data/chats/alchemist-derth.lua b/game/modules/tome/data/chats/alchemist-derth.lua index db20ea474cfe793276c536a83a8c9aceda0d71e1..e67448b1b5e220287392b4f35584526571e6587a 100644 --- a/game/modules/tome/data/chats/alchemist-derth.lua +++ b/game/modules/tome/data/chats/alchemist-derth.lua @@ -110,9 +110,9 @@ end --Make the alchemist's reaction to your turn-in vary depending on whether he lost. local function alchemist_reaction_complete(npc, player, lose, other_alch, other_elixir) if lose == true then - return ([[Pfaugh. You're too late. %s has already finished. But I suppose it doesn't do any harm to take these and give you your undeserved reward.]]):format(other_alch) + return ([[Pfaugh. You're too late. %s has already finished. But I suppose it doesn't do any harm to take these and give you your undeserved reward.]]):tformat(_t(other_alch)) else - return ([[Ah, excellent. Hand them over, if you please. You should know that in your overlong absence, %s has managed to create a %s. I'll be most put out if he steals my rightful spot.]]):format(other_alch, other_elixir) + return ([[Ah, excellent. Hand them over, if you please. You should know that in your overlong absence, %s has managed to create a %s. I'll be most put out if he steals my rightful spot.]]):tformat(_t(other_alch), other_elixir) end end @@ -120,47 +120,47 @@ if not q or (q and not q:isCompleted(e[1].start) and not q:isCompleted(e[2].star -- Here's the dialog that pops up if the player has never worked for this alchemist before: newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A human robed in immaculate white satin opens the door and eyes you appraisingly.*#WHITE# + text = _t[[#LIGHT_GREEN#*A human robed in immaculate white satin opens the door and eyes you appraisingly.*#WHITE# Ah, an adventurer. I was just thinking that I needed a new one.]], answers = { - {"That sounds promising. And ominous.", jump="ominous"}, - {"[leave]"}, + {_t"That sounds promising. And ominous.", jump="ominous"}, + {_t"[leave]"}, } } newChat{ id="ominous", - text = [[Indeed, it is both promising and ominous. I can reward you handsomely for your efforts, but they will lead you into deadly peril to which, I assume, the previous three fellows who went off on my errand never to return can attest.]], + text = _t[[Indeed, it is both promising and ominous. I can reward you handsomely for your efforts, but they will lead you into deadly peril to which, I assume, the previous three fellows who went off on my errand never to return can attest.]], answers = { - {"What do you propose?", jump="proposal"}, + {_t"What do you propose?", jump="proposal"}, } } newChat{ id="proposal", - text = [[Good adventurer, I am an alchemist, and quite a good one. This year, for the first time, the great Brotherhood of Alchemists has invited my application to their number. I'll not try your patience with the details of the application process, but suffice to say that it is grueling. Fortunately, a mere three tasks now stand between me and acceptance.]], + text = _t[[Good adventurer, I am an alchemist, and quite a good one. This year, for the first time, the great Brotherhood of Alchemists has invited my application to their number. I'll not try your patience with the details of the application process, but suffice to say that it is grueling. Fortunately, a mere three tasks now stand between me and acceptance.]], answers = { - {"How can I help?", jump="help"}, + {_t"How can I help?", jump="help"}, } } newChat{ id="help", - text = [[I require ingredients for three potent mixtures. Obviously, since I seek your aid, none of them is to be found by simply strolling to the local herbalist's. No, they will need to be forcibly parted from their owners who will, just as obviously, put up a fight. I've yet to encounter a naga who would be persuaded to hand over his tongue! Ha! Oh, I am droll at times.]], + text = _t[[I require ingredients for three potent mixtures. Obviously, since I seek your aid, none of them is to be found by simply strolling to the local herbalist's. No, they will need to be forcibly parted from their owners who will, just as obviously, put up a fight. I've yet to encounter a naga who would be persuaded to hand over his tongue! Ha! Oh, I am droll at times.]], answers = { - {"I specialize in separating vital body parts from monsters. What do you offer in return?", jump="competition"}, + {_t"I specialize in separating vital body parts from monsters. What do you offer in return?", jump="competition"}, } } newChat{ id="competition", - text = [[Why, I will let you share in the fruits of my labors! Each of the three mixtures I shall produce in a quantity sufficient to create three doses: one for me, one for the Brotherhood and their confounded trial... and one for you. I must tell you that time is of the essence. I am not the only one who the Brotherhood invited this year, yet they will accept only one applicant-- the first to complete their trials. I know of at least three others laboring furiously to take my rightful place. Should your aid see me through, then I will reward you beyond even the remarkable elixirs. I've an ancient Lifebinding Emerald that grants great powers of health and healing when used properly. What say you?]], + text = _t[[Why, I will let you share in the fruits of my labors! Each of the three mixtures I shall produce in a quantity sufficient to create three doses: one for me, one for the Brotherhood and their confounded trial... and one for you. I must tell you that time is of the essence. I am not the only one who the Brotherhood invited this year, yet they will accept only one applicant-- the first to complete their trials. I know of at least three others laboring furiously to take my rightful place. Should your aid see me through, then I will reward you beyond even the remarkable elixirs. I've an ancient Lifebinding Emerald that grants great powers of health and healing when used properly. What say you?]], answers = { - {"I accept.", jump="choice", action = function(npc, player) player:grantQuest("brotherhood-of-alchemists") end,}, - {"I cannot aid you at this time."}, + {_t"I accept.", jump="choice", action = function(npc, player) player:grantQuest("brotherhood-of-alchemists") end,}, + {_t"I cannot aid you at this time."}, } } newChat{ id="choice", - text = [[Excellent. Now then, I've three elixirs I'm working on. I'll burden you with only one at a time, since I've learned the hard way about the hazards of overloading an adventurer's brain. Here are your options: the elixir of the fox, which makes you as nimble and cunning as a fox; the elixir of avoidance, which sharpens your natural inclinations to get out of the way of incoming harm; or the elixir of precision, which grants intuitive understanding of an enemy's most sensitive spots. Which would you like to aid me with?]], + text = _t[[Excellent. Now then, I've three elixirs I'm working on. I'll burden you with only one at a time, since I've learned the hard way about the hazards of overloading an adventurer's brain. Here are your options: the elixir of the fox, which makes you as nimble and cunning as a fox; the elixir of avoidance, which sharpens your natural inclinations to get out of the way of incoming harm; or the elixir of precision, which grants intuitive understanding of an enemy's most sensitive spots. Which would you like to aid me with?]], answers = { - {"The "..e[1].name..".", jump="list", + {("The %s."):tformat(_t(e[1].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].start) @@ -173,7 +173,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[2].name..".", jump="list", + {("The %s."):tformat(_t(e[2].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].start) @@ -186,7 +186,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[3].name..".", jump="list", + {("The %s."):tformat(_t(e[3].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].start) @@ -199,23 +199,23 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[leave]"}, + {_t"[leave]"}, } } newChat{ id="list", - text = [[Here's a list of the ingredients I'm missing. Please attempt to not lose your life in their pursuit. I'll be most put out if I must wait another year. Oh, and I suppose I should tell you that I've already a handful of adventurers out scouring the unpleasant places of the world for these ingredients. Dally and one of them shall claim the prize while you're out.]], + text = _t[[Here's a list of the ingredients I'm missing. Please attempt to not lose your life in their pursuit. I'll be most put out if I must wait another year. Oh, and I suppose I should tell you that I've already a handful of adventurers out scouring the unpleasant places of the world for these ingredients. Dally and one of them shall claim the prize while you're out.]], answers = { - {"I'll be off."}, + {_t"I'll be off."}, } } -- Quest is complete; nobody answers the door elseif q and q:isStatus(q.DONE) then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The door is locked and nobody responds to your knocks*#WHITE#]], + text = _t[[#LIGHT_GREEN#*The door is locked and nobody responds to your knocks*#WHITE#]], answers = { - {"[Leave]"}, + {_t"[Leave]"}, } } @@ -225,23 +225,23 @@ else -- Here's the dialog that pops up if the player *has* worked with this alch local other_alch, other_elixir, player_loses, alch_picked, e_picked = q:competition(player, other_alchemist_nums) newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The alchemist opens his door.*#WHITE# + text = _t[[#LIGHT_GREEN#*The alchemist opens his door.*#WHITE# Ah, you again.]], answers = { -- If not the final elixir: - {"I've returned with the ingredients for the "..e[1].name..".", jump="complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[1].name)), jump="complete", cond = function(npc, player) return turn_in(npc, player, 1) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) end, }, - {"I've returned with the ingredients for the "..e[2].name..".", jump="complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[2].name)), jump="complete", cond = function(npc, player) return turn_in(npc, player, 2) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) end, }, - {"I've returned with the ingredients for the "..e[3].name..".", jump="complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[3].name)), jump="complete", cond = function(npc, player) return turn_in(npc, player, 3) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) @@ -249,33 +249,33 @@ Ah, you again.]], }, -- If the final elixir: - {"I've returned with the ingredients for the "..e[1].name..".", jump="totally-complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[1].name)), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 1) end, }, - {"I've returned with the ingredients for the "..e[2].name..".", jump="totally-complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[2].name)), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 2) end, }, - {"I've returned with the ingredients for the "..e[3].name..".", jump="totally-complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[3].name)), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 3) end, }, -- If the elixir got made while you were out: - {"I've returned with the ingredients for the "..e[1].name..".", jump="poached", + {("I've returned with the ingredients for the %s."):tformat(_t(e[1].name)), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 1) end, }, - {"I've returned with the ingredients for the "..e[2].name..".", jump="poached", + {("I've returned with the ingredients for the %s."):tformat(_t(e[2].name)), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 2) end, }, - {"I've returned with the ingredients for the "..e[3].name..".", jump="poached", + {("I've returned with the ingredients for the %s."):tformat(_t(e[3].name)), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 3) end, }, --Don't let player work on multiple elixirs for the same alchemist. --See comments in more_aid function above for all the gory detail - {"I've come to offer more aid.", jump="choice", + {_t"I've come to offer more aid.", jump="choice", cond = function(npc, player) return more_aid(npc, player) end, }, - {"[leave]"}, + {_t"[leave]"}, } } @@ -283,51 +283,51 @@ Ah, you again.]], newChat{ id="complete", text = alchemist_reaction_complete(npc, player, player_loses, other_alch, other_elixir), answers = { - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 1) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].almost) q:remove_ingredients(player, e[1].short_name, 1) end }, - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 2) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].almost) q:remove_ingredients(player, e[2].short_name, 2) end }, - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 3) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].almost) q:remove_ingredients(player, e[3].short_name, 3) end }, --- {"Sorry, it seems I lack some stuff. I will be back."}, +-- {_t"Sorry, it seems I lack some stuff. I will be back."}, } } --Final elixir: newChat{ id="totally-complete", - text = [[#LIGHT_GREEN#*The alchemist grins and motions impatiently for the ingredients.*#WHITE# + text = _t[[#LIGHT_GREEN#*The alchemist grins and motions impatiently for the ingredients.*#WHITE# Wonderful, absolutely wonderful! The final step! Here, let me have those!]], answers = { - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 1) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].almost) q:remove_ingredients(player, e[1].short_name, 1) end }, - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 2) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].almost) q:remove_ingredients(player, e[2].short_name, 2) end }, - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 3) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].almost) @@ -340,28 +340,28 @@ Wonderful, absolutely wonderful! The final step! Here, let me have those!]], --Not final elixir: newChat{ id="complete2", - text = [[Wait here while I perform my art. I'll have your reward within the hour.]], + text = _t[[Wait here while I perform my art. I'll have your reward within the hour.]], answers = { - {"[Wait]", jump="complete3"}, + {_t"[Wait]", jump="complete3"}, } } --Final Elixir: newChat{ id="totally-complete2", - text = [[A final wait for you, my good adventurer, and then I shall return with both your rewards! Haha, complete at last!]], + text = _t[[A final wait for you, my good adventurer, and then I shall return with both your rewards! Haha, complete at last!]], answers = { - {"[Wait]", jump="totally-complete3"}, + {_t"[Wait]", jump="totally-complete3"}, } } --Not final elixir: newChat{ id="complete3", - text = [[#LIGHT_GREEN#*The alchemist finally returns and hands you a small vial of fine glass.*#WHITE# + text = _t[[#LIGHT_GREEN#*The alchemist finally returns and hands you a small vial of fine glass.*#WHITE# Enjoy your reward.]], answers = { - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[1].almost) and not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].full) @@ -369,7 +369,7 @@ Enjoy your reward.]], q:update_needed_ingredients(player) end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[2].almost) and not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].full) @@ -377,7 +377,7 @@ Enjoy your reward.]], q:update_needed_ingredients(player) end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[3].almost) and not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].full) @@ -390,10 +390,10 @@ Enjoy your reward.]], --Final elixir: newChat{ id="totally-complete3", - text = [[#LIGHT_GREEN#*The alchemist finally returns with a vial and a green gem.*#WHITE# + text = _t[[#LIGHT_GREEN#*The alchemist finally returns with a vial and a green gem.*#WHITE# Enjoy the fruits of your labors, adventurer. I know I will. To show my appreciation, I shall name my firstborn after... er, what was your name, then? Haha, I jest. Oh, I do go on when I'm giddy. Fare you well.]], answers = { - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[1].almost) and not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].full) @@ -405,7 +405,7 @@ Enjoy the fruits of your labors, adventurer. I know I will. To show my appreciat end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[2].almost) and not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].full) @@ -416,7 +416,7 @@ Enjoy the fruits of your labors, adventurer. I know I will. To show my appreciat player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.DONE) end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[3].almost) and not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].full) @@ -431,9 +431,9 @@ Enjoy the fruits of your labors, adventurer. I know I will. To show my appreciat } newChat{ id="choice", - text = [[Excellent. With which would you like to aid me?]], + text = _t[[Excellent. With which would you like to aid me?]], answers = { - {"The "..e[1].name..".", jump="list", + {("The %s."):tformat(_t(e[1].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].start) @@ -446,7 +446,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[2].name..".", jump="list", + {("The %s."):tformat(_t(e[2].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].start) @@ -459,7 +459,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[3].name..".", jump="list", + {("The %s."):tformat(_t(e[3].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].start) @@ -472,22 +472,22 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[leave]"}, + {_t"[leave]"}, } } newChat{ id="list", - text = [[Here's a list of the ingredients I'm missing. Please attempt to not lose your life in their pursuit. I'll be most put out if I must wait another year.]], + text = _t[[Here's a list of the ingredients I'm missing. Please attempt to not lose your life in their pursuit. I'll be most put out if I must wait another year.]], answers = { - {"I'll be off."}, + {_t"I'll be off."}, } } -- If the elixir got made while you were out: newChat{ id="poached", - text = [[Terribly sorry, but I've already made the elixir without your aid. I've no reward to give you, and no reason to do so if I did.]], + text = _t[[Terribly sorry, but I've already made the elixir without your aid. I've no reward to give you, and no reason to do so if I did.]], answers = { - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 1) end, action = function(npc, player) q:remove_ingredients(player, e[1].short_name, 1) @@ -495,7 +495,7 @@ newChat{ id="poached", q:update_needed_ingredients(player) end, }, - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 2) end, action = function(npc, player) q:remove_ingredients(player, e[2].short_name, 2) @@ -503,7 +503,7 @@ newChat{ id="poached", q:update_needed_ingredients(player) end, }, - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 3) end, action = function(npc, player) q:remove_ingredients(player, e[3].short_name, 3) diff --git a/game/modules/tome/data/chats/alchemist-elvala.lua b/game/modules/tome/data/chats/alchemist-elvala.lua index cfcecfd4567128ec4e89fdd22abba67be5ff1aa7..f113455e941caa7537c505450531749045d8f4f2 100644 --- a/game/modules/tome/data/chats/alchemist-elvala.lua +++ b/game/modules/tome/data/chats/alchemist-elvala.lua @@ -110,9 +110,9 @@ end --Make the alchemist's reaction to your turn-in vary depending on whether he lost. local function alchemist_reaction_complete(npc, player, lose, other_alch, other_elixir) if lose == true then - return ([[Too late! Argh, too late. %s has already finished. I'll make the elixir and reward you as promised, but only because the Brotherhood breaks the fingers of non-member alchemists who rook people. Members, on the other hand...]]):format(other_alch) + return ([[Too late! Argh, too late. %s has already finished. I'll make the elixir and reward you as promised, but only because the Brotherhood breaks the fingers of non-member alchemists who rook people. Members, on the other hand...]]):tformat(_t(other_alch)) else - return ([[Give them here. You took long enough; %s cooked up a %s in your absence. Be quicker about the next one lest I make a 'mistake' in brewing your reward.]]):format(other_alch, other_elixir) + return ([[Give them here. You took long enough; %s cooked up a %s in your absence. Be quicker about the next one lest I make a 'mistake' in brewing your reward.]]):tformat(_t(other_alch), other_elixir) end end @@ -120,48 +120,48 @@ if not q or (q and not q:isCompleted(e[1].start) and not q:isCompleted(e[2].star -- Here's the dialog that pops up if the player has never worked for this alchemist before: newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A shabbily-dressed elf opens the door, scratching his head in apparent puzzlement.*#WHITE# + text = _t[[#LIGHT_GREEN#*A shabbily-dressed elf opens the door, scratching his head in apparent puzzlement.*#WHITE# Another adventurer? Or have we met? I can't tell people apart unless they wear brightly-colored headbands. You need to help me.]], answers = { - {"I am indeed an adventurer. Go on.", jump="ominous"}, - {"[leave]"}, + {_t"I am indeed an adventurer. Go on.", jump="ominous"}, + {_t"[leave]"}, } } newChat{ id="ominous", - text = [[Three elixirs stand between me and acceptance into the Brotherhood of Alchemists, unless I've been through that already. I'm never quite sure. But I think that's the case. Bring me the ingredients.]], + text = _t[[Three elixirs stand between me and acceptance into the Brotherhood of Alchemists, unless I've been through that already. I'm never quite sure. But I think that's the case. Bring me the ingredients.]], answers = { - {"What elixirs? What ingredients?", jump="proposal"}, + {_t"What elixirs? What ingredients?", jump="proposal"}, } } newChat{ id="proposal", - text = [[The ones that I need to get before the other alchemists get them. Can't have some lesser hack sneaking into the Brotherhood.]], + text = _t[[The ones that I need to get before the other alchemists get them. Can't have some lesser hack sneaking into the Brotherhood.]], answers = { - {"You're making little sense.", jump="help"}, + {_t"You're making little sense.", jump="help"}, } } newChat{ id="help", - text = [[#LIGHT_GREEN#*He raises his voice and gestures exaggeratedly, seemingly taking you for an idiot.*#WHITE# + text = _t[[#LIGHT_GREEN#*He raises his voice and gestures exaggeratedly, seemingly taking you for an idiot.*#WHITE# Me need pieces of scary monsters for happy-making drink. You get me pieces. You probably get eaten by monsters, me have this conversation yet again with other bonehead.]], answers = { - {"I've been known to kill the occasional monster. Is there a reward in it for me?", jump="competition"}, + {_t"I've been known to kill the occasional monster. Is there a reward in it for me?", jump="competition"}, } } newChat{ id="competition", - text = [[It finally understands! You get a dose of every elixir you help me make. And if your help gets me into the Brotherhood, I've got half an Elixir of Invulnerability lying around that I'll give you. Don't try anything; I've already downed the other half.]], + text = _t[[It finally understands! You get a dose of every elixir you help me make. And if your help gets me into the Brotherhood, I've got half an Elixir of Invulnerability lying around that I'll give you. Don't try anything; I've already downed the other half.]], answers = { - {"I accept.", jump="choice", action = function(npc, player) player:grantQuest("brotherhood-of-alchemists") end,}, - {"I cannot aid you at this time."}, + {_t"I accept.", jump="choice", action = function(npc, player) player:grantQuest("brotherhood-of-alchemists") end,}, + {_t"I cannot aid you at this time."}, } } newChat{ id="choice", - text = [[Three elixirs I need. I'll show you the ingredients to one at a time. Are you interested in the Elixir of Mysticism, the Elixir of the Savior, or the Elixir of Mastery?]], + text = _t[[Three elixirs I need. I'll show you the ingredients to one at a time. Are you interested in the Elixir of Mysticism, the Elixir of the Savior, or the Elixir of Mastery?]], answers = { - {"The "..e[1].name..".", jump="list", + {("The %s."):tformat(_t(e[1].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].start) @@ -174,7 +174,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[2].name..".", jump="list", + {("The %s."):tformat(_t(e[2].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].start) @@ -187,7 +187,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[3].name..".", jump="list", + {("The %s."):tformat(_t(e[3].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].start) @@ -200,23 +200,23 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[leave]"}, + {_t"[leave]"}, } } newChat{ id="list", - text = [[Here's a list of the monster bits I need. I've already got a bunch of idiots out looking for these, by the way, so you best hurry up; they've got a head start on you and I'm not getting any saner here.]], + text = _t[[Here's a list of the monster bits I need. I've already got a bunch of idiots out looking for these, by the way, so you best hurry up; they've got a head start on you and I'm not getting any saner here.]], answers = { - {"So I see. I'll be off."}, + {_t"So I see. I'll be off."}, } } -- Quest is complete; nobody answers the door elseif q and q:isStatus(q.DONE) then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The door is locked and nobody responds to your knocks*#WHITE#]], + text = _t[[#LIGHT_GREEN#*The door is locked and nobody responds to your knocks*#WHITE#]], answers = { - {"[Leave]"}, + {_t"[Leave]"}, } } @@ -226,23 +226,23 @@ else -- Here's the dialog that pops up if the player *has* worked with this alch local other_alch, other_elixir, player_loses, alch_picked, e_picked = q:competition(player, other_alchemist_nums) newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The shabby elf opens his door.*#WHITE# + text = _t[[#LIGHT_GREEN#*The shabby elf opens his door.*#WHITE# Do I know you?]], answers = { -- If not the final elixir: - {"I've returned with the ingredients for the "..e[1].name..".", jump="complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[1].name)), jump="complete", cond = function(npc, player) return turn_in(npc, player, 1) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) end, }, - {"I've returned with the ingredients for the "..e[2].name..".", jump="complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[2].name)), jump="complete", cond = function(npc, player) return turn_in(npc, player, 2) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) end, }, - {"I've returned with the ingredients for the "..e[3].name..".", jump="complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[3].name)), jump="complete", cond = function(npc, player) return turn_in(npc, player, 3) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) @@ -250,33 +250,33 @@ Do I know you?]], }, -- If the final elixir: - {"I've returned with the ingredients for the "..e[1].name..".", jump="totally-complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[1].name)), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 1) end, }, - {"I've returned with the ingredients for the "..e[2].name..".", jump="totally-complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[2].name)), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 2) end, }, - {"I've returned with the ingredients for the "..e[3].name..".", jump="totally-complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[3].name)), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 3) end, }, -- If the elixir got made while you were out: - {"I've returned with the ingredients for the "..e[1].name..".", jump="poached", + {("I've returned with the ingredients for the %s."):tformat(_t(e[1].name)), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 1) end, }, - {"I've returned with the ingredients for the "..e[2].name..".", jump="poached", + {("I've returned with the ingredients for the %s."):tformat(_t(e[2].name)), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 2) end, }, - {"I've returned with the ingredients for the "..e[3].name..".", jump="poached", + {("I've returned with the ingredients for the %s."):tformat(_t(e[3].name)), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 3) end, }, --Don't let player work on multiple elixirs for the same alchemist. --See comments in more_aid function above for all the gory detail - {"I've come to offer more aid.", jump="choice", + {_t"I've come to offer more aid.", jump="choice", cond = function(npc, player) return more_aid(npc, player) end, }, - {"[leave]"}, + {_t"[leave]"}, } } @@ -284,51 +284,51 @@ Do I know you?]], newChat{ id="complete", text = alchemist_reaction_complete(npc, player, player_loses, other_alch, other_elixir), answers = { - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 1) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].almost) q:remove_ingredients(player, e[1].short_name, 1) end }, - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 2) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].almost) q:remove_ingredients(player, e[2].short_name, 2) end }, - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 3) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].almost) q:remove_ingredients(player, e[3].short_name, 3) end }, --- {"Sorry, it seems I lack some stuff. I will be back."}, +-- {_t"Sorry, it seems I lack some stuff. I will be back."}, } } --Final elixir: newChat{ id="totally-complete", - text = [[#LIGHT_GREEN#*The elf claps his scarred hands together.*#WHITE# + text = _t[[#LIGHT_GREEN#*The elf claps his scarred hands together.*#WHITE# Exceptional work, lackey! The final elixir awaits! Oh, yes. Membership will be mine. And revenge. Ohhhh yes.]], answers = { - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 1) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].almost) q:remove_ingredients(player, e[1].short_name, 1) end }, - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 2) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].almost) q:remove_ingredients(player, e[2].short_name, 2) end }, - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 3) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].almost) @@ -341,28 +341,28 @@ Exceptional work, lackey! The final elixir awaits! Oh, yes. Membership will be m --Not final elixir: newChat{ id="complete2", - text = [[Contain your impatience while I prepare these. I'll have the elixir within the hour.]], + text = _t[[Contain your impatience while I prepare these. I'll have the elixir within the hour.]], answers = { - {"[Wait]", jump="complete3"}, + {_t"[Wait]", jump="complete3"}, } } --Final Elixir: newChat{ id="totally-complete2", - text = [[Perfection. Wait here.]], + text = _t[[Perfection. Wait here.]], answers = { - {"[Wait]", jump="totally-complete3"}, + {_t"[Wait]", jump="totally-complete3"}, } } --Not final elixir: newChat{ id="complete3", - text = [[#LIGHT_GREEN#*The elf finally returns and tosses you a small vial of fine glass.*#WHITE# + text = _t[[#LIGHT_GREEN#*The elf finally returns and tosses you a small vial of fine glass.*#WHITE# Side effects may include some slight mental imbalances.]], answers = { - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[1].almost) and not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].full) @@ -370,7 +370,7 @@ Side effects may include some slight mental imbalances.]], q:update_needed_ingredients(player) end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[2].almost) and not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].full) @@ -378,7 +378,7 @@ Side effects may include some slight mental imbalances.]], q:update_needed_ingredients(player) end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[3].almost) and not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].full) @@ -391,10 +391,10 @@ Side effects may include some slight mental imbalances.]], --Final elixir: newChat{ id="totally-complete3", - text = [[#LIGHT_GREEN#*The alchemist finally returns with two vials.*#WHITE# + text = _t[[#LIGHT_GREEN#*The alchemist finally returns with two vials.*#WHITE# I have no idea who you are, but I'm pretty sure that I'm supposed to give these to somebody as a reward. If some adventurer kills you and takes them, then apparently you're not the fellow I'm looking for.]], answers = { - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[1].almost) and not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].full) @@ -406,7 +406,7 @@ I have no idea who you are, but I'm pretty sure that I'm supposed to give these end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[2].almost) and not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].full) @@ -417,7 +417,7 @@ I have no idea who you are, but I'm pretty sure that I'm supposed to give these player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.DONE) end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[3].almost) and not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].full) @@ -432,9 +432,9 @@ I have no idea who you are, but I'm pretty sure that I'm supposed to give these } newChat{ id="choice", - text = [[Which of the remaining elixirs interests you?]], + text = _t[[Which of the remaining elixirs interests you?]], answers = { - {"The "..e[1].name..".", jump="list", + {("The %s."):tformat(_t(e[1].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].start) @@ -447,7 +447,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[2].name..".", jump="list", + {("The %s."):tformat(_t(e[2].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].start) @@ -460,7 +460,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[3].name..".", jump="list", + {("The %s."):tformat(_t(e[3].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].start) @@ -473,22 +473,22 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[leave]"}, + {_t"[leave]"}, } } newChat{ id="list", - text = [[Here's a list of the ingredients I'm missing. Please follow the directions carefully, or the resulting elixir could be more fatal than either of us would hope.]], + text = _t[[Here's a list of the ingredients I'm missing. Please follow the directions carefully, or the resulting elixir could be more fatal than either of us would hope.]], answers = { - {"I'll be off."}, + {_t"I'll be off."}, } } -- If the elixir got made while you were out: newChat{ id="poached", - text = [[Already made it. Best pick up the pace next time, adventurer.]], + text = _t[[Already made it. Best pick up the pace next time, adventurer.]], answers = { - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 1) end, action = function(npc, player) q:remove_ingredients(player, e[1].short_name, 1) @@ -496,7 +496,7 @@ newChat{ id="poached", q:update_needed_ingredients(player) end, }, - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 2) end, action = function(npc, player) q:remove_ingredients(player, e[2].short_name, 2) @@ -504,7 +504,7 @@ newChat{ id="poached", q:update_needed_ingredients(player) end, }, - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 3) end, action = function(npc, player) q:remove_ingredients(player, e[3].short_name, 3) diff --git a/game/modules/tome/data/chats/alchemist-golem.lua b/game/modules/tome/data/chats/alchemist-golem.lua index 1a368f75d3d52edf130155553c38b2eb13c80f8d..bd05f2d766a3089a435eb33c09eb307cf8f858c2 100644 --- a/game/modules/tome/data/chats/alchemist-golem.lua +++ b/game/modules/tome/data/chats/alchemist-golem.lua @@ -19,7 +19,7 @@ local change_inven = function(npc, player) local d - local titleupdator = player:getEncumberTitleUpdator(("Equipment(%s) <=> Inventory(%s)"):format(npc.name:capitalize(), player.name:capitalize())) + local titleupdator = player:getEncumberTitleUpdator(("Equipment(%s) <=> Inventory(%s)"):tformat(npc.name:capitalize(), player.name:capitalize())) d = require("mod.dialogs.ShowEquipInven").new(titleupdator(), npc, nil, function(o, inven, item, button, event) if not o then return end local ud = require("mod.dialogs.UseItemDialog").new(event == "button", npc, o, item, inven, function(_, _, _, stop) @@ -48,9 +48,9 @@ local change_control = function(npc, player) end local change_name = function(npc, player) - local d = require("engine.dialogs.GetText").new("Change your golem's name", "Name", 2, 25, function(name) + local d = require("engine.dialogs.GetText").new(_t"Change your golem's name", _t"Name", 2, 25, function(name) if name then - npc.name = name.." (servant of "..player.name..")" + npc.name = ("%s (servant of %s)"):tformat(name, player.name) npc.changed = true end end) @@ -64,31 +64,31 @@ local change_appearance = function(npc, player) end local ans = { - {"I want to change your equipment.", action=change_inven}, - {"I want to change your talents.", action=change_talents}, - {"I want to change your tactics.", action=change_tactics}, - {"I want to take direct control.", action=change_control}, - {"I want to change your name.", cond = function() return golem.sentient_telos == 1 end, jump="name", action=function(npc, player) npc.name = "Telos the Great and Powerful (reluctant follower of "..npc.summoner.name..")" game.log("#ROYAL_BLUE#The golem decides to change it's name to #{bold}#%s#{normal}#.", npc.name) end}, - {"I want to change your name.", cond = function() return not golem.sentient_telos end, action=change_name}, - {"How is it that you speak?", cond = function() return golem.sentient_telos == 1 end, jump="how_speak"}, - {"I want to change your appearance (one-time only).", cond = function(npc, player) return profile:isDonator() and not npc.golem_appearance_set end, action=change_appearance}, - {"Nothing, let's go."}, + {_t"I want to change your equipment.", action=change_inven}, + {_t"I want to change your talents.", action=change_talents}, + {_t"I want to change your tactics.", action=change_tactics}, + {_t"I want to take direct control.", action=change_control}, + {_t"I want to change your name.", cond = function() return golem.sentient_telos == 1 end, jump="name", action=function(npc, player) npc.name = ("Telos the Great and Powerful (reluctant follower of %s)"):tformat(npc.summoner:getName()) game.log("#ROYAL_BLUE#The golem decides to change it's name to #{bold}#%s#{normal}#.", npc.name) end}, + {_t"I want to change your name.", cond = function() return not golem.sentient_telos end, action=change_name}, + {_t"How is it that you speak?", cond = function() return golem.sentient_telos == 1 end, jump="how_speak"}, + {_t"I want to change your appearance (one-time only).", cond = function(npc, player) return profile:isDonator() and not npc.golem_appearance_set end, action=change_appearance}, + {_t"Nothing, let's go."}, } newChat{ id="how_speak", - text = [[What's the good of immortality if you can't even speak? No archmage worth his salt is going to concoct some immoral life-after-death scheme without including some sort of capacity for making his opinions known. And, by the way, your energy manipulation techniques are on the same level as those of my average pair of shoes. Though I guess you are making up for it with your golem crafting skills.]], + text = _t[[What's the good of immortality if you can't even speak? No archmage worth his salt is going to concoct some immoral life-after-death scheme without including some sort of capacity for making his opinions known. And, by the way, your energy manipulation techniques are on the same level as those of my average pair of shoes. Though I guess you are making up for it with your golem crafting skills.]], answers = ans } newChat{ id="name", - text = [[Change my name? I'm quite happy being 'Telos' thankyou. Though I wouldn't mind being 'Telos the Great and Powerful'. Do that actually. Yes!]], + text = _t[[Change my name? I'm quite happy being 'Telos' thankyou. Though I wouldn't mind being 'Telos the Great and Powerful'. Do that actually. Yes!]], answers = ans } if golem.sentient_telos == 1 then newChat{ id="welcome", - text = [[I'm a golem. How droll! + text = _t[[I'm a golem. How droll! Oh, did you want something?]], answers = ans } @@ -96,7 +96,7 @@ Oh, did you want something?]], else newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The golem talks in a monotonous voice*#WHITE# + text = _t[[#LIGHT_GREEN#*The golem talks in a monotonous voice*#WHITE# Yes master.]], answers = ans } diff --git a/game/modules/tome/data/chats/alchemist-hermit.lua b/game/modules/tome/data/chats/alchemist-hermit.lua index c71b83a6495dfe9c185cbecebad89cf18a49de05..23686485336868ddc8cb5d91fef95738d46f8e93 100644 --- a/game/modules/tome/data/chats/alchemist-hermit.lua +++ b/game/modules/tome/data/chats/alchemist-hermit.lua @@ -113,10 +113,10 @@ end --Make the alchemist's reaction to your turn-in vary depending on whether he lost. local function alchemist_reaction_complete(npc, player, lose, other_alch, other_elixir) if lose == true then - return ([[SON OF A RITCH! YOU SHOW UP TEN MINUTES AFTER I GET THE NEWS THAT SOME JACKASS ALREADY FINISHED THE ELIXIRS AND IS GETTING ACCEPTED BY THE BROTHERHOOD. WHAT THE HELL TOOK YOU SO LONG? MIRVENIA'S MAMMARIES, I'LL TAKE THESE AND MAKE YOU YOUR REWARD, BUT ONLY BECAUSE A CURSE WILL KILL ME IF I DON'T. AND IF IT TASTES LIKE PISS, THAT'S YOUR IMAGINATION, I'M SURE.]]) + return (_t[[SON OF A RITCH! YOU SHOW UP TEN MINUTES AFTER I GET THE NEWS THAT SOME JACKASS ALREADY FINISHED THE ELIXIRS AND IS GETTING ACCEPTED BY THE BROTHERHOOD. WHAT THE HELL TOOK YOU SO LONG? MIRVENIA'S MAMMARIES, I'LL TAKE THESE AND MAKE YOU YOUR REWARD, BUT ONLY BECAUSE A CURSE WILL KILL ME IF I DON'T. AND IF IT TASTES LIKE PISS, THAT'S YOUR IMAGINATION, I'M SURE.]]) else return ([[#LIGHT_GREEN#*The halfling hands you a note that says, 'Heard %s managed to make a %s while you've been loafing. Hurry the hell up next time.*#WHITE# - I STILL CAN'T HEAR A DAMNED THING. FORTUNATELY, YOU DON'T LOOK LIKE THE SORT THAT MAKES INTERESTING CONVERSATION.]]):format(other_alch, other_elixir) + I STILL CAN'T HEAR A DAMNED THING. FORTUNATELY, YOU DON'T LOOK LIKE THE SORT THAT MAKES INTERESTING CONVERSATION.]]):tformat(_t(other_alch), other_elixir) end end @@ -124,48 +124,48 @@ if not q or (q and not q:isCompleted(e[1].start) and not q:isCompleted(e[2].star -- Here's the dialog that pops up if the player has never worked for this alchemist before: newChat{ id="welcome", - text = [[#LIGHT_GREEN#*After a great deal of pounding, a halfling wrapped in charred, smoking robes opens the door. He looks irritated.*#WHITE# + text = _t[[#LIGHT_GREEN#*After a great deal of pounding, a halfling wrapped in charred, smoking robes opens the door. He looks irritated.*#WHITE# IT'S NOT ENOUGH THAT I WORK ALL MORNING TO MAKE A POTION THAT ENDS UP NEARLY BLOWING MY ASS OFF, BUT NOW I'VE GOT IDIOTS BEATING DOWN MY DAMNED FRONT DOOR WITH WHAT SOUNDS LIKE A BATTERING RAM, AND YES, I HEARD IT, THOUGH I CAN HARDLY MAKE OUT A BLEEDING THING WITH THESE BLEEDING, CONCUSSED EARS. WHAT DO YOU WANT?]], answers = { - {"Perhaps there's something that I can help you with.", jump="ominous"}, - {"[leave]"}, + {_t"Perhaps there's something that I can help you with.", jump="ominous"}, + {_t"[leave]"}, } } newChat{ id="ominous", - text = [[SPEAK UP, HAMBRAIN. I'VE JUST GOTTEN MY EARDRUMS BLOWN OUT BY YET ANOTHER BY-THE-PYRE POTION GONE SOUTH, REMEMBER? THRICE-DAMNED THING WAS GOING PERFECTLY, TOO. TOKNOR'S TACKLE!]], + text = _t[[SPEAK UP, HAMBRAIN. I'VE JUST GOTTEN MY EARDRUMS BLOWN OUT BY YET ANOTHER BY-THE-PYRE POTION GONE SOUTH, REMEMBER? THRICE-DAMNED THING WAS GOING PERFECTLY, TOO. TOKNOR'S TACKLE!]], answers = { - {"I SAID, MAYBE THERE'S SOMETHING THAT I CAN HELP YOU WITH!", jump="proposal"}, + {_t"I SAID, MAYBE THERE'S SOMETHING THAT I CAN HELP YOU WITH!", jump="proposal"}, } } newChat{ id="proposal", - text = [[STILL CAN'T HEAR YOU, BUT LISTEN UP. THE BROTHERHOOD OF ALCHEMISTS IS ACCEPTING THE FIRST NEW APPLICANT TO DEMONSTRATE, AMONG OTHER THINGS, THREE VERY COMPLICATED ELIXIRS. I WOULDN'T BOTHER TRYING TO JOIN SUCH A BUNCH OF ADDLE-BRAINED DEGENERATES, BUT IT SO HAPPENS THAT THE BROTHERHOOD OF ALCHEMISTS HOLDS THE SECRET CURE FOR THE COMMON BLOWN-OFF ASS, WHICH IT SO HAPPENS IS OF SOME INTEREST TO ME.]], + text = _t[[STILL CAN'T HEAR YOU, BUT LISTEN UP. THE BROTHERHOOD OF ALCHEMISTS IS ACCEPTING THE FIRST NEW APPLICANT TO DEMONSTRATE, AMONG OTHER THINGS, THREE VERY COMPLICATED ELIXIRS. I WOULDN'T BOTHER TRYING TO JOIN SUCH A BUNCH OF ADDLE-BRAINED DEGENERATES, BUT IT SO HAPPENS THAT THE BROTHERHOOD OF ALCHEMISTS HOLDS THE SECRET CURE FOR THE COMMON BLOWN-OFF ASS, WHICH IT SO HAPPENS IS OF SOME INTEREST TO ME.]], answers = { - {"HOW CAN I HELP?", jump="help"}, + {_t"HOW CAN I HELP?", jump="help"}, } } newChat{ id="help", - text = [[THE BROTHERHOOD KNOWS DAMNED WELL WHAT ADVANCES IN THE FIELD OF ALCHEMY WOULD DO FOR EVERY CIVILIZATION IN EXISTENCE, BUT THEY HOARD THEIR FEW WORTHWHILE SECRETS LIKE A GREAT BROWN WYRM SITTING ON ITS PILE OF CRAP. YOU KNOW WHAT? I DON'T EVEN WANT THE ASS-CURE FOR ME. I'M GOING TO STEAL EVERY SECRET THEY'VE GOT, WRITE THEM DOWN, MAKE A HUNDRED COPIES, AND NAIL ONE TO A TREE IN EVERY VILLAGE IN MAJ'EYAL.]], + text = _t[[THE BROTHERHOOD KNOWS DAMNED WELL WHAT ADVANCES IN THE FIELD OF ALCHEMY WOULD DO FOR EVERY CIVILIZATION IN EXISTENCE, BUT THEY HOARD THEIR FEW WORTHWHILE SECRETS LIKE A GREAT BROWN WYRM SITTING ON ITS PILE OF CRAP. YOU KNOW WHAT? I DON'T EVEN WANT THE ASS-CURE FOR ME. I'M GOING TO STEAL EVERY SECRET THEY'VE GOT, WRITE THEM DOWN, MAKE A HUNDRED COPIES, AND NAIL ONE TO A TREE IN EVERY VILLAGE IN MAJ'EYAL.]], answers = { - {"THAT'S NOT A VERY HERMIT-LIKE ATTITUDE.", jump="competition"}, + {_t"THAT'S NOT A VERY HERMIT-LIKE ATTITUDE.", jump="competition"}, } } newChat{ id="competition", - text = [[AND THEN WHAT WILL THEY DO? ONCE THEIR PRECIOUS SECRETS-- WHICH, IN ALL PROBABILITY, EITHER DON'T EXIST OR ARE THINGS LIKE RECIPES FOR ELIXIRS OF WHO-GIVES-A-FLYING-DUCK-- ARE OUT IN THE OPEN, THE BROTHERHOOD OF ASSWIPES WILL HAVE NOTHING TO HOLD IT TOGETHER BUT ELIXIRS OF THEIR TEARS AND WIDESPREAD DISDAIN FROM THE REST OF THE WORLD. SPEAK UP, THEN. ARE YOU IN OR OUT?]], + text = _t[[AND THEN WHAT WILL THEY DO? ONCE THEIR PRECIOUS SECRETS-- WHICH, IN ALL PROBABILITY, EITHER DON'T EXIST OR ARE THINGS LIKE RECIPES FOR ELIXIRS OF WHO-GIVES-A-FLYING-DUCK-- ARE OUT IN THE OPEN, THE BROTHERHOOD OF ASSWIPES WILL HAVE NOTHING TO HOLD IT TOGETHER BUT ELIXIRS OF THEIR TEARS AND WIDESPREAD DISDAIN FROM THE REST OF THE WORLD. SPEAK UP, THEN. ARE YOU IN OR OUT?]], answers = { - {"I'M IN.", jump="choice", action = function(npc, player) player:grantQuest("brotherhood-of-alchemists") end,}, - {"I CANNOT AID YOU AT THIS TIME."}, + {_t"I'M IN.", jump="choice", action = function(npc, player) player:grantQuest("brotherhood-of-alchemists") end,}, + {_t"I CANNOT AID YOU AT THIS TIME."}, } } newChat{ id="choice", - text = [[#LIGHT_GREEN#*He hands you a slip of paper with the names and properties of some elixirs on it.*#WHITE# + text = _t[[#LIGHT_GREEN#*He hands you a slip of paper with the names and properties of some elixirs on it.*#WHITE# THE INGREDIENTS TO THESE SUCKERS ARE SORT OF A TRADE SECRET, SO I'LL TELL YOU ABOUT ONE AND WE'LL SEE HOW THAT GOES. OH, AND I'LL MAKE ENOUGH FOR YOU TO HAVE A SWIG WHEN I'M DONE, SO GOOD FOR YOU. WHICH ONE WILL IT BE? JUST POINT AT THE DAMNED LIST. I HAVEN'T HEARD A THING YOU'VE SAID YET. I HOPE TO HELL YOU'RE NOT STANDING THERE TRYING TO SELL ME SOMETHING.]], answers = { - {"[Indicate the "..e[1].name..".]", jump="list", + {("[Indicate the %s.]"):tformat(_t(e[1].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].start) @@ -178,7 +178,7 @@ THE INGREDIENTS TO THESE SUCKERS ARE SORT OF A TRADE SECRET, SO I'LL TELL YOU AB game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[Indicate the "..e[2].name..".]", jump="list", + {("[Indicate the %s.]"):tformat(_t(e[2].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].start) @@ -191,7 +191,7 @@ THE INGREDIENTS TO THESE SUCKERS ARE SORT OF A TRADE SECRET, SO I'LL TELL YOU AB game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[Indicate the "..e[3].name..".]", jump="list", + {("[Indicate the %s.]"):tformat(_t(e[3].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].start) @@ -204,23 +204,23 @@ THE INGREDIENTS TO THESE SUCKERS ARE SORT OF A TRADE SECRET, SO I'LL TELL YOU AB game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[leave]"}, + {_t"[leave]"}, } } newChat{ id="list", - text = [[HERE'S A LIST OF THE STUFF I NEED. MOST OF IT WILL TRY TO KILL YOU, SO I HOPE YOU'RE NOT INCOMPETENT. I'VE GOT PLENTY OF INCOMPETENT HELP ALREADY. I HOPE FOR YOUR SAKE THAT YOU'RE SMARTER AND FASTER THAN THEM.]], + text = _t[[HERE'S A LIST OF THE STUFF I NEED. MOST OF IT WILL TRY TO KILL YOU, SO I HOPE YOU'RE NOT INCOMPETENT. I'VE GOT PLENTY OF INCOMPETENT HELP ALREADY. I HOPE FOR YOUR SAKE THAT YOU'RE SMARTER AND FASTER THAN THEM.]], answers = { - {"I'LL BE OFF."}, + {_t"I'LL BE OFF."}, } } -- Quest is complete; nobody answers the door elseif q and q:isStatus(q.DONE) then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The door is locked and nobody responds to your knocks*#WHITE#]], + text = _t[[#LIGHT_GREEN#*The door is locked and nobody responds to your knocks*#WHITE#]], answers = { - {"[Leave]"}, + {_t"[Leave]"}, } } @@ -230,23 +230,23 @@ else -- Here's the dialog that pops up if the player *has* worked with this alch local other_alch, other_elixir, player_loses, alch_picked, e_picked = q:competition(player, other_alchemist_nums) newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The halfling, still smoking, opens his door.*#WHITE# + text = _t[[#LIGHT_GREEN#*The halfling, still smoking, opens his door.*#WHITE# I LIVE WAY THE HELL OUT HERE FOR A REASON, YOU PIECE OF... OH. IT'S YOU.]], answers = { -- If not the final elixir: - {"I'VE RETURNED WITH THE INGREDIENTS FOR THE "..e[1].cap_name..".", jump="complete", + {("I'VE RETURNED WITH THE INGREDIENTS FOR THE %s."):tformat(_t(e[1].name):upper()), jump="complete", cond = function(npc, player) return turn_in(npc, player, 1) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) end, }, - {"I'VE RETURNED WITH THE INGREDIENTS FOR THE "..e[2].cap_name..".", jump="complete", + {("I'VE RETURNED WITH THE INGREDIENTS FOR THE %s."):tformat(_t(e[2].name):upper()), jump="complete", cond = function(npc, player) return turn_in(npc, player, 2) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) end, }, - {"I'VE RETURNED WITH THE INGREDIENTS FOR THE "..e[3].cap_name..".", jump="complete", + {("I'VE RETURNED WITH THE INGREDIENTS FOR THE %s."):tformat(_t(e[3].name):upper()), jump="complete", cond = function(npc, player) return turn_in(npc, player, 3) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) @@ -254,33 +254,33 @@ I LIVE WAY THE HELL OUT HERE FOR A REASON, YOU PIECE OF... OH. IT'S YOU.]], }, -- If the final elixir: - {"I'VE RETURNED WITH THE INGREDIENTS FOR THE "..e[1].cap_name..".", jump="totally-complete", + {("I'VE RETURNED WITH THE INGREDIENTS FOR THE %s."):tformat(_t(e[1].name):upper()), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 1) end, }, - {"I'VE RETURNED WITH THE INGREDIENTS FOR THE "..e[2].cap_name..".", jump="totally-complete", + {("I'VE RETURNED WITH THE INGREDIENTS FOR THE %s."):tformat(_t(e[2].name):upper()), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 2) end, }, - {"I'VE RETURNED WITH THE INGREDIENTS FOR THE "..e[3].cap_name..".", jump="totally-complete", + {("I'VE RETURNED WITH THE INGREDIENTS FOR THE %s."):tformat(_t(e[3].name):upper()), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 3) end, }, -- If the elixir got made while you were out: - {"I'VE RETURNED WITH THE INGREDIENTS FOR THE "..e[1].cap_name..".", jump="poached", + {("I'VE RETURNED WITH THE INGREDIENTS FOR THE %s."):tformat(_t(e[1].name):upper()), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 1) end, }, - {"I'VE RETURNED WITH THE INGREDIENTS FOR THE "..e[2].cap_name..".", jump="poached", + {("I'VE RETURNED WITH THE INGREDIENTS FOR THE %s."):tformat(_t(e[2].name):upper()), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 2) end, }, - {"I'VE RETURNED WITH THE INGREDIENTS FOR THE "..e[3].cap_name..".", jump="poached", + {("I'VE RETURNED WITH THE INGREDIENTS FOR THE %s."):tformat(_t(e[3].name):upper()), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 3) end, }, --Don't let player work on multiple elixirs for the same alchemist. --See comments in more_aid function above for all the gory detail - {"I'VE COME TO OFFER MORE AID.", jump="choice", + {_t"I'VE COME TO OFFER MORE AID.", jump="choice", cond = function(npc, player) return more_aid(npc, player) end, }, - {"[leave]"}, + {_t"[leave]"}, } } @@ -288,51 +288,51 @@ I LIVE WAY THE HELL OUT HERE FOR A REASON, YOU PIECE OF... OH. IT'S YOU.]], newChat{ id="complete", text = alchemist_reaction_complete(npc, player, player_loses, other_alch, other_elixir), answers = { - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 1) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].almost) q:remove_ingredients(player, e[1].short_name, 1) end }, - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 2) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].almost) q:remove_ingredients(player, e[2].short_name, 2) end }, - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 3) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].almost) q:remove_ingredients(player, e[3].short_name, 3) end }, --- {"Sorry, it seems I lack some stuff. I will be back."}, +-- {_t"Sorry, it seems I lack some stuff. I will be back."}, } } --Final elixir: newChat{ id="totally-complete", - text = [[#LIGHT_GREEN#*For the first time you've seen, genuine pleasure lights up the halfling's soot-smeared face.*#WHITE# + text = _t[[#LIGHT_GREEN#*For the first time you've seen, genuine pleasure lights up the halfling's soot-smeared face.*#WHITE# GOOD WORK, WHOEVER YOU ARE. ALL OF MAJ'EYAL OWES YOU THEIR THANKS, EXCEPT FOR MEMBERS OF THE BROTHERHOOD OF ALCHEMISTS, WHO MIGHT TRY TO DO YOU BODILY HARM. FORTUNATELY FOR YOU, THEY'RE MOSTLY HARMLESS.]], answers = { - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 1) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].almost) q:remove_ingredients(player, e[1].short_name, 1) end }, - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 2) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].almost) q:remove_ingredients(player, e[2].short_name, 2) end }, - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 3) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].almost) @@ -345,28 +345,28 @@ GOOD WORK, WHOEVER YOU ARE. ALL OF MAJ'EYAL OWES YOU THEIR THANKS, EXCEPT FOR ME --Not final elixir: newChat{ id="complete2", - text = [[WAIT HERE. THERE'S A GOOD CHANCE YOU'LL GET BLOWN INTO ADVENTURER KIBBLE IF YOU STEP INSIDE THIS BUILDING. MY ROBE OF MAD ALCHEMIST PROTECTION IS THE ONLY REASON I'M NOT VAPOUR.]], + text = _t[[WAIT HERE. THERE'S A GOOD CHANCE YOU'LL GET BLOWN INTO ADVENTURER KIBBLE IF YOU STEP INSIDE THIS BUILDING. MY ROBE OF MAD ALCHEMIST PROTECTION IS THE ONLY REASON I'M NOT VAPOUR.]], answers = { - {"[Wait]", jump="complete3"}, + {_t"[Wait]", jump="complete3"}, } } --Final Elixir: newChat{ id="totally-complete2", - text = [[GIVE ME AN HOUR, AND THINK UNPLEASANT THOUGHTS ABOUT THE BROTHERHOOD. IF ANYTHING EXPLODES, COME RESCUE ME, EVEN IF IT LOOKS LIKE THE BUILDING IS AN INFERNO OF POISONOUS SMOKE AND POLKA-DOT FLAMES.]], + text = _t[[GIVE ME AN HOUR, AND THINK UNPLEASANT THOUGHTS ABOUT THE BROTHERHOOD. IF ANYTHING EXPLODES, COME RESCUE ME, EVEN IF IT LOOKS LIKE THE BUILDING IS AN INFERNO OF POISONOUS SMOKE AND POLKA-DOT FLAMES.]], answers = { - {"[Wait]", jump="totally-complete3"}, + {_t"[Wait]", jump="totally-complete3"}, } } --Not final elixir: newChat{ id="complete3", - text = [[#LIGHT_GREEN#*Disaster fails to occur. The halfling finally returns and hands you a small vial of sooty glass.*#WHITE# + text = _t[[#LIGHT_GREEN#*Disaster fails to occur. The halfling finally returns and hands you a small vial of sooty glass.*#WHITE# ENJOY, AND COME BACK ANY TIME IF YOU'RE INTERESTED IN SIMILAR WORK. I HAVEN'T WON YET. THE LONGER YOU WAIT, THE MORE LIKELY IT IS THAT YOU'LL RETURN TO A SMOKING CRATER AND ONE TRULY IRATE HALFLING.]], answers = { - {"THANK YOU. I'LL BE OFF.", + {_t"THANK YOU. I'LL BE OFF.", cond = function(npc, player) return q and q:isCompleted(e[1].almost) and not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].full) @@ -374,7 +374,7 @@ ENJOY, AND COME BACK ANY TIME IF YOU'RE INTERESTED IN SIMILAR WORK. I HAVEN'T WO q:update_needed_ingredients(player) end }, - {"THANK YOU. I'LL BE OFF.", + {_t"THANK YOU. I'LL BE OFF.", cond = function(npc, player) return q and q:isCompleted(e[2].almost) and not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].full) @@ -382,7 +382,7 @@ ENJOY, AND COME BACK ANY TIME IF YOU'RE INTERESTED IN SIMILAR WORK. I HAVEN'T WO q:update_needed_ingredients(player) end }, - {"THANK YOU. I'LL BE OFF.", + {_t"THANK YOU. I'LL BE OFF.", cond = function(npc, player) return q and q:isCompleted(e[3].almost) and not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].full) @@ -395,10 +395,10 @@ ENJOY, AND COME BACK ANY TIME IF YOU'RE INTERESTED IN SIMILAR WORK. I HAVEN'T WO --Final elixir: newChat{ id="totally-complete3", - text = [[#LIGHT_GREEN#*The halfling finally returns with a vial and a small pouch.*#WHITE# + text = _t[[#LIGHT_GREEN#*The halfling finally returns with a vial and a small pouch.*#WHITE# YOUR DOSE OF THE ELIXIR, AS WELL AS SOMETHING ELSE. THIS INFUSION IS RARE AS HELL, SO DON'T GO WASTING IT.]], answers = { - {"THANK YOU. I'LL BE OFF.", + {_t"THANK YOU. I'LL BE OFF.", cond = function(npc, player) return q and q:isCompleted(e[1].almost) and not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].full) @@ -410,7 +410,7 @@ YOUR DOSE OF THE ELIXIR, AS WELL AS SOMETHING ELSE. THIS INFUSION IS RARE AS HEL end }, - {"THANK YOU. I'LL BE OFF.", + {_t"THANK YOU. I'LL BE OFF.", cond = function(npc, player) return q and q:isCompleted(e[2].almost) and not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].full) @@ -421,7 +421,7 @@ YOUR DOSE OF THE ELIXIR, AS WELL AS SOMETHING ELSE. THIS INFUSION IS RARE AS HEL player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.DONE) end }, - {"THANK YOU. I'LL BE OFF.", + {_t"THANK YOU. I'LL BE OFF.", cond = function(npc, player) return q and q:isCompleted(e[3].almost) and not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].full) @@ -436,9 +436,9 @@ YOUR DOSE OF THE ELIXIR, AS WELL AS SOMETHING ELSE. THIS INFUSION IS RARE AS HEL } newChat{ id="choice", - text = [[WHICH ELIXIR DO YOU WANT TO HELP ME WITH? YOU ARE HERE TO DO JUST THAT, RIGHT? YOU'RE NOT SOME IMBECILE HERE LOOKING FOR A LOVE POTION?]], + text = _t[[WHICH ELIXIR DO YOU WANT TO HELP ME WITH? YOU ARE HERE TO DO JUST THAT, RIGHT? YOU'RE NOT SOME IMBECILE HERE LOOKING FOR A LOVE POTION?]], answers = { - {"[Indicate the "..e[1].name..".]", jump="list", + {("[Indicate the %s.]"):tformat(_t(e[1].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].start) @@ -451,7 +451,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[Indicate the "..e[2].name..".]", jump="list", + {("[Indicate the %s.]"):tformat(_t(e[2].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].start) @@ -464,7 +464,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[Indicate the "..e[3].name..".]", jump="list", + {("[Indicate the %s.]"):tformat(_t(e[3].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].start) @@ -477,22 +477,22 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[leave]"}, + {_t"[leave]"}, } } newChat{ id="list", - text = [[TAKE THIS LIST OF INGREDIENTS, AND HURRY THE HELL UP.]], + text = _t[[TAKE THIS LIST OF INGREDIENTS, AND HURRY THE HELL UP.]], answers = { - {"I'LL BE OFF."}, + {_t"I'LL BE OFF."}, } } -- If the elixir got made while you were out: newChat{ id="poached", - text = [[TOO SLOW, HAMBRAIN. ELIXIR'S MADE ALREADY, AND SOMEBODY ELSE WALKED OFF WITH THE REWARD. IF YOU'RE FEELING SORRY FOR YOURSELF, ASK WHETHER THIS IS MORE OR LESS PLEASANT THAN GETTING APPRECIABLE CHUNKS OF YOUR ANATOMY BLASTED CLEAN OFF YOUR BODY THIS MORNING. THAT'S RIGHT. BYE.]], + text = _t[[TOO SLOW, HAMBRAIN. ELIXIR'S MADE ALREADY, AND SOMEBODY ELSE WALKED OFF WITH THE REWARD. IF YOU'RE FEELING SORRY FOR YOURSELF, ASK WHETHER THIS IS MORE OR LESS PLEASANT THAN GETTING APPRECIABLE CHUNKS OF YOUR ANATOMY BLASTED CLEAN OFF YOUR BODY THIS MORNING. THAT'S RIGHT. BYE.]], answers = { - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 1) end, action = function(npc, player) q:remove_ingredients(player, e[1].short_name, 1) @@ -500,7 +500,7 @@ newChat{ id="poached", q:update_needed_ingredients(player) end, }, - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 2) end, action = function(npc, player) q:remove_ingredients(player, e[2].short_name, 2) @@ -508,7 +508,7 @@ newChat{ id="poached", q:update_needed_ingredients(player) end, }, - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 3) end, action = function(npc, player) q:remove_ingredients(player, e[3].short_name, 3) diff --git a/game/modules/tome/data/chats/alchemist-last-hope.lua b/game/modules/tome/data/chats/alchemist-last-hope.lua index 95923abad5e8a3738729d98228737f9c3d5b7691..c496cff16263dd0c210cb4d1153ea77e854b8367 100644 --- a/game/modules/tome/data/chats/alchemist-last-hope.lua +++ b/game/modules/tome/data/chats/alchemist-last-hope.lua @@ -110,9 +110,9 @@ end --Make the alchemist's reaction to your turn-in vary depending on whether he lost. local function alchemist_reaction_complete(npc, player, lose, other_alch, other_elixir) if lose == true then - return ([[Damn it all. You're too late. %s has already finished. But I suppose you did your best, so I'll take these and keep my end of the bargian.]]):format(other_alch) + return ([[Damn it all. You're too late. %s has already finished. But I suppose you did your best, so I'll take these and keep my end of the bargian.]]):tformat(_t(other_alch)) else - return ([[Great work! And you're still in one piece, I see. Always nice. I feel the same way after safely brewing up a particularly tricky mixture. I've near blown my face clean off several times. Oh, while you were gone a little bird told me that %s has managed to create a %s. Don't let him finish before me!]]):format(other_alch, other_elixir) + return ([[Great work! And you're still in one piece, I see. Always nice. I feel the same way after safely brewing up a particularly tricky mixture. I've near blown my face clean off several times. Oh, while you were gone a little bird told me that %s has managed to create a %s. Don't let him finish before me!]]):tformat(_t(other_alch), other_elixir) end end @@ -120,47 +120,47 @@ if not q or (q and not q:isCompleted(e[1].start) and not q:isCompleted(e[2].star -- Here's the dialog that pops up if the player has never worked for this alchemist before: newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A dwarf in stained, battered mail armor opens the door.*#WHITE# + text = _t[[#LIGHT_GREEN#*A dwarf in stained, battered mail armor opens the door.*#WHITE# Say, you interested in dismembering stuff and getting paid?]], answers = { - {"Always.", jump="ominous"}, - {"[leave]"}, + {_t"Always.", jump="ominous"}, + {_t"[leave]"}, } } newChat{ id="ominous", - text = [[By the corpses of the gods, I love adventurers. Was about to become one myself when it suddenly hit me. And by "it" I mean "my wife." Har!]], + text = _t[[By the corpses of the gods, I love adventurers. Was about to become one myself when it suddenly hit me. And by "it" I mean "my wife." Har!]], answers = { - {"What do you propose?", jump="proposal"}, + {_t"What do you propose?", jump="proposal"}, } } newChat{ id="proposal", - text = [[I propose that I give you a list of monster parts to fetch, then you go and fetch them, then I make some blindingly amazing brews with said monster parts, then I get accepted into the Brotherhood of Alchemists.]], + text = _t[[I propose that I give you a list of monster parts to fetch, then you go and fetch them, then I make some blindingly amazing brews with said monster parts, then I get accepted into the Brotherhood of Alchemists.]], answers = { - {"Sounds like a plan.", jump="help"}, + {_t"Sounds like a plan.", jump="help"}, } } newChat{ id="help", - text = [[I make excellent plans. And brews, which the Brotherhood will no doubt make me call 'elixirs' once I'm in. And I'll obey, because they have ways of getting what they want. Now, where were we?]], + text = _t[[I make excellent plans. And brews, which the Brotherhood will no doubt make me call 'elixirs' once I'm in. And I'll obey, because they have ways of getting what they want. Now, where were we?]], answers = { - {"Aiding you with getting into some Brotherhood. What's in it for me?", jump="competition"}, + {_t"Aiding you with getting into some Brotherhood. What's in it for me?", jump="competition"}, } } newChat{ id="competition", - text = [[Oh, easy. You get a swig of each brew, of course. They'll put hair on your chest, and possibly your eyelids and fingernails. And, if your aid proves the deciding factor, then I've got a real treat for you: perhaps the last Taint of Purging left in Maj'Eyal.]], + text = _t[[Oh, easy. You get a swig of each brew, of course. They'll put hair on your chest, and possibly your eyelids and fingernails. And, if your aid proves the deciding factor, then I've got a real treat for you: perhaps the last Taint of Purging left in Maj'Eyal.]], answers = { - {"I accept.", jump="choice", action = function(npc, player) player:grantQuest("brotherhood-of-alchemists") end,}, - {"I cannot aid you at this time."}, + {_t"I accept.", jump="choice", action = function(npc, player) player:grantQuest("brotherhood-of-alchemists") end,}, + {_t"I cannot aid you at this time."}, } } newChat{ id="choice", - text = [[One last thing. There's a few other fellows angling for the same slot in the Brotherhood that I am. They're not going to be sitting on their hands while we're at work here, so best move quick-like. Now, which of these do you want to help me with first: the Brew of Brawn, the Brew of Stoneskin, or the Brew of Foundations? Or Elixirs, rather. Not Brews. Best get in the habit now, I suppose.]], + text = _t[[One last thing. There's a few other fellows angling for the same slot in the Brotherhood that I am. They're not going to be sitting on their hands while we're at work here, so best move quick-like. Now, which of these do you want to help me with first: the Brew of Brawn, the Brew of Stoneskin, or the Brew of Foundations? Or Elixirs, rather. Not Brews. Best get in the habit now, I suppose.]], answers = { - {"The "..e[1].name..".", jump="list", + {("The %s."):tformat(_t(e[1].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].start) @@ -173,7 +173,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[2].name..".", jump="list", + {("The %s."):tformat(_t(e[2].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].start) @@ -186,7 +186,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[3].name..".", jump="list", + {("The %s."):tformat(_t(e[3].name)), jump="list", cond = function(npc, player) return not game.player:hasQuest("brotherhood-of-alchemists"):isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].start) @@ -199,25 +199,25 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[leave]"}, + {_t"[leave]"}, } } if npc.errand_given then newChat{ id="list", - text = [[Right, here's the list. Oh, one more thing. Got me some fellas already out hunting for this stuff, and I'll not play favorites. One of them brings me those ingredients before you do, and you're out of luck. Hurry back.]], + text = _t[[Right, here's the list. Oh, one more thing. Got me some fellas already out hunting for this stuff, and I'll not play favorites. One of them brings me those ingredients before you do, and you're out of luck. Hurry back.]], answers = { - {"I'll be off."}, + {_t"I'll be off."}, } } else newChat{ id="list", - text = [[Right, here's the list. Oh, one more thing. Got me some fellas already out hunting for this stuff, and I'll not play favorites. One of them brings me those ingredients before you do, and you're out of luck. Hurry back. + text = _t[[Right, here's the list. Oh, one more thing. Got me some fellas already out hunting for this stuff, and I'll not play favorites. One of them brings me those ingredients before you do, and you're out of luck. Hurry back. Oh, and one other last thing... if you have the time for another errand, though I've got no reward on this one.]], answers = { - {"Well, I'll see if I can help.", jump="errand", action=function(npc, player) npc.errand_given = true end}, - {"I'm here for profit, not errands - I have the list and will work on it; sort your own sidejobs out.", action=function(npc, player) npc.errand_given = true end}, + {_t"Well, I'll see if I can help.", jump="errand", action=function(npc, player) npc.errand_given = true end}, + {_t"I'm here for profit, not errands - I have the list and will work on it; sort your own sidejobs out.", action=function(npc, player) npc.errand_given = true end}, } } end @@ -225,9 +225,9 @@ end -- Quest is complete; nobody answers the door elseif q and q:isStatus(q.DONE) then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The door is locked and nobody responds to your knocks*#WHITE#]], + text = _t[[#LIGHT_GREEN#*The door is locked and nobody responds to your knocks*#WHITE#]], answers = { - {"[Leave]"}, + {_t"[Leave]"}, } } @@ -237,23 +237,23 @@ else -- Here's the dialog that pops up if the player *has* worked with this alch local other_alch, other_elixir, player_loses, alch_picked, e_picked = q:competition(player, other_alchemist_nums) newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The mailed dwarf opens his door.*#WHITE# + text = _t[[#LIGHT_GREEN#*The mailed dwarf opens his door.*#WHITE# Aha, my favorite adventurer.]], answers = { -- If not the final elixir: - {"I've returned with the ingredients for the "..e[1].name..".", jump="complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[1].name)), jump="complete", cond = function(npc, player) return turn_in(npc, player, 1) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) end, }, - {"I've returned with the ingredients for the "..e[2].name..".", jump="complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[2].name)), jump="complete", cond = function(npc, player) return turn_in(npc, player, 2) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) end, }, - {"I've returned with the ingredients for the "..e[3].name..".", jump="complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[3].name)), jump="complete", cond = function(npc, player) return turn_in(npc, player, 3) end, action = function(npc, player) q:on_turnin(player, alch_picked, e_picked, false) @@ -261,33 +261,33 @@ Aha, my favorite adventurer.]], }, -- If the final elixir: - {"I've returned with the ingredients for the "..e[1].name..".", jump="totally-complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[1].name)), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 1) end, }, - {"I've returned with the ingredients for the "..e[2].name..".", jump="totally-complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[2].name)), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 2) end, }, - {"I've returned with the ingredients for the "..e[3].name..".", jump="totally-complete", + {("I've returned with the ingredients for the %s."):tformat(_t(e[3].name)), jump="totally-complete", cond = function(npc, player) return turn_in_final(npc, player, 3) end, }, -- If the elixir got made while you were out: - {"I've returned with the ingredients for the "..e[1].name..".", jump="poached", + {("I've returned with the ingredients for the %s."):tformat(_t(e[1].name)), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 1) end, }, - {"I've returned with the ingredients for the "..e[2].name..".", jump="poached", + {("I've returned with the ingredients for the %s."):tformat(_t(e[2].name)), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 2) end, }, - {"I've returned with the ingredients for the "..e[3].name..".", jump="poached", + {("I've returned with the ingredients for the %s."):tformat(_t(e[3].name)), jump="poached", cond = function(npc, player) return turn_in_poached(npc, player, 3) end, }, --Don't let player work on multiple elixirs for the same alchemist. --See comments in more_aid function above for all the gory detail - {"I've come to offer more aid.", jump="choice", + {_t"I've come to offer more aid.", jump="choice", cond = function(npc, player) return more_aid(npc, player) end, }, - {"[leave]"}, + {_t"[leave]"}, } } @@ -295,51 +295,51 @@ Aha, my favorite adventurer.]], newChat{ id="complete", text = alchemist_reaction_complete(npc, player, player_loses, other_alch, other_elixir), answers = { - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 1) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].almost) q:remove_ingredients(player, e[1].short_name, 1) end }, - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 2) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].almost) q:remove_ingredients(player, e[2].short_name, 2) end }, - {"[Give him the monster bits.]", jump="complete2", + {_t"[Give him the monster bits.]", jump="complete2", cond = function(npc, player) return give_bits(npc, player, 3) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].almost) q:remove_ingredients(player, e[3].short_name, 3) end }, --- {"Sorry, it seems I lack some stuff. I will be back."}, +-- {_t"Sorry, it seems I lack some stuff. I will be back."}, } } --Final elixir: newChat{ id="totally-complete", - text = [[#LIGHT_GREEN#*He gleefully claps you on the shoulder.*#WHITE# + text = _t[[#LIGHT_GREEN#*He gleefully claps you on the shoulder.*#WHITE# Ha ha! This is the last one! Stire and Marus and that damned hermit can suck on my beard! And so can my wife! YES, I KNOW YOU CAN HEAR ME. Good work, friend. Let's have them.]], answers = { - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 1) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].almost) q:remove_ingredients(player, e[1].short_name, 1) end }, - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 2) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].almost) q:remove_ingredients(player, e[2].short_name, 2) end }, - {"[Give him the monster bits]", jump="totally-complete2", + {_t"[Give him the monster bits]", jump="totally-complete2", cond = function(npc, player) return give_bits(npc, player, 3) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].almost) @@ -352,28 +352,28 @@ Ha ha! This is the last one! Stire and Marus and that damned hermit can suck on --Not final elixir: newChat{ id="complete2", - text = [[Give me an hour or so to make with the alchemy. Don't go anywhere.]], + text = _t[[Give me an hour or so to make with the alchemy. Don't go anywhere.]], answers = { - {"[Wait]", jump="complete3"}, + {_t"[Wait]", jump="complete3"}, } } --Final Elixir: newChat{ id="totally-complete2", - text = [[I'd invite you inside while you wait, but the she-dwarf's in there, and I've grown fond of you.]], + text = _t[[I'd invite you inside while you wait, but the she-dwarf's in there, and I've grown fond of you.]], answers = { - {"[Wait]", jump="totally-complete3"}, + {_t"[Wait]", jump="totally-complete3"}, } } --Not final elixir: newChat{ id="complete3", - text = [[#LIGHT_GREEN#*The dwarf finally returns with a vial.*#WHITE# + text = _t[[#LIGHT_GREEN#*The dwarf finally returns with a vial.*#WHITE# Tastes like Urh'Rok's own piss, but it gets the job done.]], answers = { - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[1].almost) and not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].full) @@ -381,7 +381,7 @@ Tastes like Urh'Rok's own piss, but it gets the job done.]], q:update_needed_ingredients(player) end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[2].almost) and not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].full) @@ -389,7 +389,7 @@ Tastes like Urh'Rok's own piss, but it gets the job done.]], q:update_needed_ingredients(player) end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[3].almost) and not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].full) @@ -402,10 +402,10 @@ Tastes like Urh'Rok's own piss, but it gets the job done.]], --Final elixir: newChat{ id="totally-complete3", - text = [[#LIGHT_GREEN#*The dwarf finally returns with a vial and a small pouch.*#WHITE# + text = _t[[#LIGHT_GREEN#*The dwarf finally returns with a vial and a small pouch.*#WHITE# I put a bit of the good stuff in this one, though it won't do you any favors tomorrow morning. And careful with that Taint of Purging, especially if the wife answers the door the next time you knock. Har!]], answers = { - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[1].almost) and not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].full) @@ -417,7 +417,7 @@ I put a bit of the good stuff in this one, though it won't do you any favors tom end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[2].almost) and not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].full) @@ -428,7 +428,7 @@ I put a bit of the good stuff in this one, though it won't do you any favors tom player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.DONE) end }, - {"Thank you. I'll be off.", + {_t"Thank you. I'll be off.", cond = function(npc, player) return q and q:isCompleted(e[3].almost) and not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].full) @@ -443,9 +443,9 @@ I put a bit of the good stuff in this one, though it won't do you any favors tom } newChat{ id="choice", - text = [[Bless you adventurers. Which will it be?]], + text = _t[[Bless you adventurers. Which will it be?]], answers = { - {"The "..e[1].name..".", jump="list", + {("The %s."):tformat(_t(e[1].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[1].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[1].start) @@ -458,7 +458,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[2].name..".", jump="list", + {("The %s."):tformat(_t(e[2].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[2].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[2].start) @@ -471,7 +471,7 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"The "..e[3].name..".", jump="list", + {("The %s."):tformat(_t(e[3].name)), jump="list", cond = function(npc, player) return not q:isCompleted(e[3].full) end, action = function(npc, player) player:setQuestStatus("brotherhood-of-alchemists", engine.Quest.COMPLETED, e[3].start) @@ -484,34 +484,34 @@ newChat{ id="choice", game:tooltipDisplayAtMap(game.w, game.h, tostring(o:getDesc())) end, }, - {"[leave]"}, + {_t"[leave]"}, } } if npc.errand_given then newChat{ id="list", - text = [[Here's a list of the creature bits I need. Good luck with the murdering!]], + text = _t[[Here's a list of the creature bits I need. Good luck with the murdering!]], answers = { - {"I'll be off."}, + {_t"I'll be off."}, } } else newChat{ id="list", - text = [[Here's a list of the creature bits I need. Good luck with the murdering! + text = _t[[Here's a list of the creature bits I need. Good luck with the murdering! Oh, and one other last thing... if you have the time for another errand, though I've got no reward on this one.]], answers = { - {"Well, I'll see if I can help.", jump="errand", action=function(npc, player) npc.errand_given = true end}, - {"I'm here for profit, not errands - I have the list and will work on it; sort your own sidejobs out.", action=function(npc, player) npc.errand_given = true end}, + {_t"Well, I'll see if I can help.", jump="errand", action=function(npc, player) npc.errand_given = true end}, + {_t"I'm here for profit, not errands - I have the list and will work on it; sort your own sidejobs out.", action=function(npc, player) npc.errand_given = true end}, } } end -- If the elixir got made while you were out: newChat{ id="poached", - text = [[Er, it seems that while you were out, somebody else managed to bring me the ingredients. I've got no reward for you! Sorry about that, but when time is of the essence, 'first come, first served' is the only sensible policy.]], + text = _t[[Er, it seems that while you were out, somebody else managed to bring me the ingredients. I've got no reward for you! Sorry about that, but when time is of the essence, 'first come, first served' is the only sensible policy.]], answers = { - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 1) end, action = function(npc, player) q:remove_ingredients(player, e[1].short_name, 1) @@ -519,7 +519,7 @@ newChat{ id="poached", q:update_needed_ingredients(player) end, }, - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 2) end, action = function(npc, player) q:remove_ingredients(player, e[2].short_name, 2) @@ -527,7 +527,7 @@ newChat{ id="poached", q:update_needed_ingredients(player) end, }, - {"Hrmph.", + {_t"Hrmph.", cond = function(npc, player) return empty_handed(npc, player, 3) end, action = function(npc, player) q:remove_ingredients(player, e[3].short_name, 3) @@ -541,11 +541,11 @@ newChat{ id="poached", end newChat{ id="errand", - text = [[Well, it's like this, one of my wife's friends has gone missing. A young alchemist in training, called Celia. Thing is, her husband died recently, and the grief done drove her mad. She used to go out to his grave every day, until one day she didn't come back. Personally I don't think she was able to live without him; the two were inseparable. If you get a chance on your travels, could you pass by the mausoleum to the east and check... well, you get the idea. + text = _t[[Well, it's like this, one of my wife's friends has gone missing. A young alchemist in training, called Celia. Thing is, her husband died recently, and the grief done drove her mad. She used to go out to his grave every day, until one day she didn't come back. Personally I don't think she was able to live without him; the two were inseparable. If you get a chance on your travels, could you pass by the mausoleum to the east and check... well, you get the idea. It's strange what death can do to people, how it can take over their minds. Sometimes they forget it's the living that matter... See she gets a proper burial - treated respectfully, eh?]], answers = { - {"I'll do what I can.", action=function(npc, player) + {_t"I'll do what I can.", action=function(npc, player) game:onLevelLoad("wilderness-1", function(zone, level) local g = game.zone:makeEntityByName(level, "terrain", "LAST_HOPE_GRAVEYARD") local spot = level:pickSpot{type="zone-pop", subtype="last-hope-graveyard"} diff --git a/game/modules/tome/data/chats/angolwen-leader.lua b/game/modules/tome/data/chats/angolwen-leader.lua index 1c1f507c2fbda1500be01e21fc49098d0de0007e..cb2e3082cf55753b701055a0476ce78046841018 100644 --- a/game/modules/tome/data/chats/angolwen-leader.lua +++ b/game/modules/tome/data/chats/angolwen-leader.lua @@ -18,27 +18,27 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A tall woman stands before you. Her fair skin radiates incredible power through her white robe.*#WHITE# + text = _t[[#LIGHT_GREEN#*A tall woman stands before you. Her fair skin radiates incredible power through her white robe.*#WHITE# I am Linaniil of the Kar'Krul. Welcome to our city, @playerdescriptor.subclass@. What may I do for thee?]], answers = { - {"I require all the help I can get, not for my sake but for the town of Derth, to the northeast of here.", jump="save-derth", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and q:isCompleted("saved-derth") and not q:isCompleted("tempest-located") and not q:isStatus(q.DONE) end}, - {"I am ready! Send me to Urkis!", jump="teleport-urkis", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and not q:isEnded("tempest-located") and q:isCompleted("tempest-located") and not q:isCompleted("angolwen-reward") end}, - {"Urkis has been slain.", jump="reward-urkis", cond=function(npc, player) + {_t"I require all the help I can get, not for my sake but for the town of Derth, to the northeast of here.", jump="save-derth", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and q:isCompleted("saved-derth") and not q:isCompleted("tempest-located") and not q:isStatus(q.DONE) end}, + {_t"I am ready! Send me to Urkis!", jump="teleport-urkis", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and not q:isEnded("tempest-located") and q:isCompleted("tempest-located") and not q:isCompleted("angolwen-reward") end}, + {_t"Urkis has been slain.", jump="reward-urkis", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and q:isCompleted("tempest-urkis-slain") and not q:isCompleted("angolwen-reward") and not q:isStatus(q.DONE) end}, - {"Nothing for now. Sorry to have taken your time. Farewell, my lady."}, + {_t"Nothing for now. Sorry to have taken your time. Farewell, my lady."}, } } newChat{ id="save-derth", - text = [[Yes, we have noticed the devastation that happened there. I have sent some friends thence to disperse the cloud, but the true threat lies not there. + text = _t[[Yes, we have noticed the devastation that happened there. I have sent some friends thence to disperse the cloud, but the true threat lies not there. He who created this abomination is Urkis. He is a Tempest, a powerful Archmage who channels the storms. Years ago he went rogue, severing himself from Angolwen. At first he remained quiet, and thus we withheld action, but it seems we have no choice now. Cleansing the skies will take much time. In the meanwhile, if thou art willing, we can send thee to Urkis' lair to face him. I will not lie to thee: we can send thee thence, but this could be a death trap, and we have no means for thou to depart his lair, as he lives atop a tall peak in the Daikara mountains.]], answers = { - {"I need to prepare myself. I will be back soon.", action=function(npc, player) player:setQuestStatus("lightning-overload", engine.Quest.COMPLETED, "tempest-located") end}, - {"I am ready. Send me. I will not let the good people of Derth down.", action=function(npc, player) + {_t"I need to prepare myself. I will be back soon.", action=function(npc, player) player:setQuestStatus("lightning-overload", engine.Quest.COMPLETED, "tempest-located") end}, + {_t"I am ready. Send me. I will not let the good people of Derth down.", action=function(npc, player) player:setQuestStatus("lightning-overload", engine.Quest.COMPLETED, "tempest-located") player:hasQuest("lightning-overload"):teleport_urkis() game:unlockBackground("linaniil", "Archmage Linaniil") @@ -47,9 +47,9 @@ I will not lie to thee: we can send thee thence, but this could be a death trap, } newChat{ id="teleport-urkis", - text = [[Good luck to thee. Thou hast the blessings of Angolwen.]], + text = _t[[Good luck to thee. Thou hast the blessings of Angolwen.]], answers = { - {"Thank you.", action=function(npc, player) + {_t"Thank you.", action=function(npc, player) player:hasQuest("lightning-overload"):teleport_urkis() game:unlockBackground("linaniil", "Archmage Linaniil") end}, @@ -57,9 +57,9 @@ newChat{ id="teleport-urkis", } newChat{ id="reward-urkis", - text = [[I see the storm is calmed. Take this rune as a token of my appreciation.]], + text = _t[[I see the storm is calmed. Take this rune as a token of my appreciation.]], answers = { - {"Thank you.", action=function(npc, player) + {_t"Thank you.", action=function(npc, player) local o = game.zone:makeEntityByName(game.level, "object", "RUNE_DISSIPATION") if not o then return end o:identify(true) diff --git a/game/modules/tome/data/chats/angolwen-staves-store.lua b/game/modules/tome/data/chats/angolwen-staves-store.lua index 06e59d76cf2a663c53668e9eef9d9c3ccdb3984a..1967dbe3aa919b80d4e77b15cf6f712bbefa4aab 100644 --- a/game/modules/tome/data/chats/angolwen-staves-store.lua +++ b/game/modules/tome/data/chats/angolwen-staves-store.lua @@ -18,21 +18,21 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[Welcome @playername@ to my shop.]], + text = _t[[Welcome @playername@ to my shop.]], answers = { - {"Let me see your wares.", action=function(npc, player) + {_t"Let me see your wares.", action=function(npc, player) npc.store:loadup(game.level, game.zone) npc.store:interact(player) end}, - {"I am looking for staff training.", jump="training"}, - {"Sorry, I have to go!"}, + {_t"I am looking for staff training.", jump="training"}, + {_t"Sorry, I have to go!"}, } } newChat{ id="training", - text = [[I can teach you staff combat (talent category Spell/Staff combat). Learning the basics costs 100 gold, while more intensive tutelage to gain proficiency costs 500 gold. Once you're proficient, I can teach you more refined techniques for an additional 750 gold.]], + text = _t[[I can teach you staff combat (talent category Spell/Staff combat). Learning the basics costs 100 gold, while more intensive tutelage to gain proficiency costs 500 gold. Once you're proficient, I can teach you more refined techniques for an additional 750 gold.]], answers = { - {"Just give me the basics (reveals locked talent category) - 100 gold.", action=function(npc, player) -- Normal basic training + {_t"Just give me the basics (reveals locked talent category) - 100 gold.", action=function(npc, player) -- Normal basic training game.logPlayer(player, "The staff carver spends some time with you, teaching you the basics of staff combat.") player:incMoney(-100) player:learnTalentType("spell/staff-combat", false) @@ -46,7 +46,7 @@ newChat{ id="training", if player:knowTalentType("spell/staff-combat") or player:knowTalentType("spell/staff-combat") == false then return end return true end}, - {("Please teach me what I need to know (unlocks talent category) - %d gold."):format(500), + {("Please teach me what I need to know (unlocks talent category) - %d gold."):tformat(500), action=function(npc, player) --Normal intensive training game.logPlayer(player, "The staff carver spends a substantial amount of time teaching you all of the techniques of staff combat.") player:incMoney(-500) @@ -64,17 +64,17 @@ newChat{ id="training", if player:knowTalentType("spell/staff-combat") then return end return true end}, - {"I'm already proficient, but I want to be an expert (improves talent mastery by 0.2) - 750 gold.", action=function(npc, player) --Enhanced intensive training + {_t"I'm already proficient, but I want to be an expert (improves talent mastery by 0.2) - 750 gold.", action=function(npc, player) --Enhanced intensive training player:incMoney(-750) player:learnTalentType("spell/staff-combat", true) player:setTalentTypeMastery("spell/staff-combat", player:getTalentTypeMastery("spell/staff-combat") + 0.2) - game.logPlayer(player, ("The staff carver spends a great deal of time going over the finer details of staff combat with you%s."):format(player:getTalentTypeMastery("spell/staff-combat")>1 and ", including some esoteric techniques" or "")) + game.logPlayer(player, ("The staff carver spends a great deal of time going over the finer details of staff combat with you%s."):tformat(player:getTalentTypeMastery("spell/staff-combat")>1 and _t", including some esoteric techniques" or "")) player.changed = true end, cond=function(npc, player) if player.money < 750 then return end if player:knowTalentType("spell/staff-combat") and player:getTalentTypeMastery("spell/staff-combat") < 1.2 then return true end end}, - {"No thanks."}, + {_t"No thanks."}, } } diff --git a/game/modules/tome/data/chats/antimagic-end.lua b/game/modules/tome/data/chats/antimagic-end.lua index 683e077c69569c1a475bfc12fde6b7bd96d41aa3..99c937ce2ab6d2b4886dade870f51da81dfce629 100644 --- a/game/modules/tome/data/chats/antimagic-end.lua +++ b/game/modules/tome/data/chats/antimagic-end.lua @@ -19,15 +19,15 @@ local ogretext = "" if player.descriptor and player.descriptor.subrace == "Ogre" then - ogretext = "\n\n#{italic}##LIGHT_GREEN#*As you drink the potion, your runes start to burn as they fade away, and a terrible agony seems to sink through your skin to your bones, muscles, and heart. You black out from the pain, and come to a bit later, the runes gone forever. You feel very ill, and yet... cleansed.*#{normal}##WHITE#" + ogretext = _t"\n\n#{italic}##LIGHT_GREEN#*As you drink the potion, your runes start to burn as they fade away, and a terrible agony seems to sink through your skin to your bones, muscles, and heart. You black out from the pain, and come to a bit later, the runes gone forever. You feel very ill, and yet... cleansed.*#{normal}##WHITE#" end newChat{ id="welcome", text = ([[Excellent! You truly prove that no mage-wrought flame or storm can stand against blade and arrow! Come, learn our ways. You are ready. #LIGHT_GREEN#*he gives you a potion.*#WHITE# -Drink this. We extract it from a very rare kind of drake. It will grant you powers to fight and cancel magic, but never again will you be able to use magic.%s]]):format(ogretext), +Drink this. We extract it from a very rare kind of drake. It will grant you powers to fight and cancel magic, but never again will you be able to use magic.%s]]):tformat(ogretext), answers = { - {"Thank you. I shall not let magic triumph! #LIGHT_GREEN#[you drink the potion]", action=function(npc, player) player:setQuestStatus("antimagic", engine.Quest.COMPLETED) end}, + {_t"Thank you. I shall not let magic triumph! #LIGHT_GREEN#[you drink the potion]", action=function(npc, player) player:setQuestStatus("antimagic", engine.Quest.COMPLETED) end}, } } diff --git a/game/modules/tome/data/chats/ardhungol-end.lua b/game/modules/tome/data/chats/ardhungol-end.lua index de2d15b617b5c28d34c6f3e0c0b90168f013a7e6..b37a465daa6b1c0613634f7ae6f873644e5bc283 100644 --- a/game/modules/tome/data/chats/ardhungol-end.lua +++ b/game/modules/tome/data/chats/ardhungol-end.lua @@ -18,20 +18,20 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*As the monstrous spider falls you see something... moving in her belly until it explodes! A tall black man steps out of the spewed guts, surrounded by a golden light.*#WHITE# + text = _t[[#LIGHT_GREEN#*As the monstrous spider falls you see something... moving in her belly until it explodes! A tall black man steps out of the spewed guts, surrounded by a golden light.*#WHITE# By the Sun! I thought I would never again see a friendly face! Thank you. I am Rashim, and I am in your debt. ]], answers = { - {"I have been sent by your wife. She was worried for you.", jump="leave"}, + {_t"I have been sent by your wife. She was worried for you.", jump="leave"}, } } newChat{ id="leave", - text = [[Ah, my dear heart! + text = _t[[Ah, my dear heart! Well, now that I am free I will create a portal to the Gates of Morning. I think I've seen enough spiders for the rest of my life.]], answers = { - {"Lead the way!", action=function(npc, player) player:hasQuest("spydric-infestation"):portal_back(player) end}, + {_t"Lead the way!", action=function(npc, player) player:hasQuest("spydric-infestation"):portal_back(player) end}, } } diff --git a/game/modules/tome/data/chats/ardhungol-start.lua b/game/modules/tome/data/chats/ardhungol-start.lua index 97448406b393423b91f4a730b102aa5166173fa1..87587fa061e5fdf640e9f0ae0be310f43ad27435 100644 --- a/game/modules/tome/data/chats/ardhungol-start.lua +++ b/game/modules/tome/data/chats/ardhungol-start.lua @@ -19,9 +19,9 @@ if not game.state:isAdvanced() and game.player.level < 20 then newChat{ id="welcome", - text = [[Good day to you.]], + text = _t[[Good day to you.]], answers = { - {"Good day to you too."}, + {_t"Good day to you too."}, } } return "welcome" @@ -29,36 +29,36 @@ end if not game.player:hasQuest("spydric-infestation") then newChat{ id="welcome", - text = [[I have heard you are a great hero of the west. Could you help me, please?]], + text = _t[[I have heard you are a great hero of the west. Could you help me, please?]], answers = { - {"Maybe, what is it about?", jump="quest", cond=function(npc, player) return not player:hasQuest("spydric-infestation") end}, - {"I have got enough problems sorry."}, + {_t"Maybe, what is it about?", jump="quest", cond=function(npc, player) return not player:hasQuest("spydric-infestation") end}, + {_t"I have got enough problems sorry."}, } } else newChat{ id="welcome", - text = [[Welcome back, @playername@.]], + text = _t[[Welcome back, @playername@.]], answers = { - {"I have found your husband. I take it he made it home safely?", jump="done", cond=function(npc, player) return player:isQuestStatus("spydric-infestation", engine.Quest.COMPLETED) end}, - {"I've got to go. Bye."}, + {_t"I have found your husband. I take it he made it home safely?", jump="done", cond=function(npc, player) return player:isQuestStatus("spydric-infestation", engine.Quest.COMPLETED) end}, + {_t"I've got to go. Bye."}, } } end newChat{ id="quest", - text = [[My husband, Rashim, is a Sun Paladin. He was sent to clear the spider lair of Ardhungol to the north of this town. + text = _t[[My husband, Rashim, is a Sun Paladin. He was sent to clear the spider lair of Ardhungol to the north of this town. It has been three days now. He should be back by now. I have a feeling something terrible has happened to him. Please find him! He should have a magical stone given by the Anorithil to create a portal back here, yet he did not use it!]], answers = { - {"I will see if I can find him.", action=function(npc, player) player:grantQuest("spydric-infestation") end}, - {"Spiders? Eww, sorry, but he is probably dead now."}, + {_t"I will see if I can find him.", action=function(npc, player) player:grantQuest("spydric-infestation") end}, + {_t"Spiders? Eww, sorry, but he is probably dead now."}, } } newChat{ id="done", - text = [[Yes, yes he did! He said he would have died if not for you.]], + text = _t[[Yes, yes he did! He said he would have died if not for you.]], answers = { - {"It was nothing.", action=function(npc, player) + {_t"It was nothing.", action=function(npc, player) player:setQuestStatus("spydric-infestation", engine.Quest.DONE) world:gainAchievement("SPYDRIC_INFESTATION", game.player) game:setAllowedBuild("divine") diff --git a/game/modules/tome/data/chats/arena-start.lua b/game/modules/tome/data/chats/arena-start.lua index 32b7a3830d629a4a996ff108c513a6e4d2c0128d..68610a5cc05183f6484b5b51dfa00d3d31d86fc4 100644 --- a/game/modules/tome/data/chats/arena-start.lua +++ b/game/modules/tome/data/chats/arena-start.lua @@ -128,7 +128,7 @@ local arena_3 = function(self, player) game.level.arena.modeString = "3" local arenashop = game:getStore("ARENA_SHOP") arenashop:loadup(game.level, game.zone) - arenashop:interact(game.player, "Gladiator's wares") + arenashop:interact(game.player, _t"Gladiator's wares") arenashop = nil end @@ -138,7 +138,7 @@ local arena_30 = function(self, player) game.level.arena.modeString = "30" local arenashop = game:getStore("ARENA_SHOP") arenashop:loadup(game.level, game.zone) - arenashop:interact(game.player, "Gladiator's wares") + arenashop:interact(game.player, _t"Gladiator's wares") arenashop = nil end @@ -148,14 +148,14 @@ local arena_60 = function(self, player) game.level.arena.modeString = "60" local arenashop = game:getStore("ARENA_SHOP") arenashop:loadup(game.level, game.zone) - arenashop:interact(game.player, "Gladiator's wares") + arenashop:interact(game.player, _t"Gladiator's wares") arenashop = nil end local give_bonus = function(self, player) game.level.arena.bonusMin = 1.1 game.level.arena.bonusMultiplier = 1.1 - game.level.arena.perk = "None"..game.level.arena.modeString + game.level.arena.perk = _t"None"..game.level.arena.modeString end local save_clear = function(self, player) @@ -176,26 +176,26 @@ local save_clear = function(self, player) local arenashop = game:getStore("ARENA_SHOP") arenashop:loadup(game.level, game.zone) - arenashop:interact(game.player, "Gladiator's wares") + arenashop:interact(game.player, _t"Gladiator's wares") arenashop = nil end newChat{ id="welcome", - text = "#LIGHT_GREEN#You take a look at the ranking boards before entering.\n"..text, + text = ("#LIGHT_GREEN#You take a look at the ranking boards before entering.\n%s"):tformat(text), answers = { --{"Enter the arena for 3 rounds[DEBUG]", action=arena_3, jump="perks"}, - {"Enter the arena (60 waves)", action=arena_60}, - {"Enter the arena (shorter mode, 30 rounds)", action=arena_30}, + {_t"Enter the arena (60 waves)", action=arena_60}, + {_t"Enter the arena (shorter mode, 30 rounds)", action=arena_30}, --{"Enter the arena for as long as you can last", action=arena_inf, jump="perks"}, - {"#LIGHT_RED#[Reset all arena save data]", action=save_clear}, + {_t"#LIGHT_RED#[Reset all arena save data]", action=save_clear}, } } newChat{ id="welcome2", text = "What will you do now?", answers = { - {"Enter the arena for 60 rounds", action=arena_60}, - {"Enter the arena for 30 rounds", action=arena_30}, + {_t"Enter the arena for 60 rounds", action=arena_60}, + {_t"Enter the arena for 30 rounds", action=arena_30}, --{"Enter the arena for as long as you can last", action=arena_inf, jump="perks"}, } } diff --git a/game/modules/tome/data/chats/arena-unlock.lua b/game/modules/tome/data/chats/arena-unlock.lua index ffc3b3afe6204f221946c1ff33e7faf182ef6a45..8f26267f0e8b31bd3d531953981d5a249e4396e9 100644 --- a/game/modules/tome/data/chats/arena-unlock.lua +++ b/game/modules/tome/data/chats/arena-unlock.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A tall, hooded man stares at you*#WHITE# + text = _t[[#LIGHT_GREEN#*A tall, hooded man stares at you*#WHITE# Yes...yes...you look like a promising warrior indeed... I have an offer, @playerdescriptor.race@. You see...I am an agent for the Arena. I look for promising warriors that @@ -27,31 +27,31 @@ All you need to do is beat three of my men in battle, and you shall be rewarded. #LIGHT_GREEN#*You consider the offer of the mysterious hooded man for a moment* ]], answers = { - {"Interesting. Tell me more about that Arena.", jump="more_ex", + {_t"Interesting. Tell me more about that Arena.", jump="more_ex", action = function (self, player) self.talked_to = 1 end, cond=function(npc, player) return not profile.mod.allow_build.campaign_arena end}, - {"I am strong! What do you have to offer?", jump="more", + {_t"I am strong! What do you have to offer?", jump="more", action = function (self, player) self.talked_to = 1 end, cond=function(npc, player) return profile.mod.allow_build.campaign_arena end}, - {"I don't accept deals from shady hooded men.", jump="refuse", + {_t"I don't accept deals from shady hooded men.", jump="refuse", action = function (self, player) self.talked_to = 1 end}, } } newChat{ id="more", - text = [[#LIGHT_GREEN#*You can feel the man smiling from inside his hood*#WHITE# + text = _t[[#LIGHT_GREEN#*You can feel the man smiling from inside his hood*#WHITE# I have wealth and glory to offer, and some very useful #YELLOW#combat experience#WHITE# from fighting our men... So, what do you think? Are you up to it? ]], answers = { - {"I am ready for battle. Let's go!", jump="accept", action = function (self, player) self.talked_to = 2 end }, - {"I don't have time for games, Cornac.", jump="refuse"}, + {_t"I am ready for battle. Let's go!", jump="accept", action = function (self, player) self.talked_to = 2 end }, + {_t"I don't have time for games, Cornac.", jump="refuse"}, } } newChat{ id="more_ex", - text = [[#LIGHT_GREEN#*You can feel the man smiling from inside his hood*#WHITE# + text = _t[[#LIGHT_GREEN#*You can feel the man smiling from inside his hood*#WHITE# The Arena is where the brave come to fight against all odds. We are still growing up, and we lack challengers... It's like a gamble, but you use your fighting instead of money to play, you see? @@ -63,13 +63,13 @@ You also shall gather some much needed #LIGHT_RED#combat experience#WHITE# from our men...so, what do you think? Are you up to it? ]], answers = { - {"I am ready for battle. Let's go!", jump="accept", action = function (self, player) self.talked_to = 2 end }, - {"I don't have time for games, Cornac.", jump="refuse"}, + {_t"I am ready for battle. Let's go!", jump="accept", action = function (self, player) self.talked_to = 2 end }, + {_t"I don't have time for games, Cornac.", jump="refuse"}, } } newChat{ id="refuse", - text = [[#LIGHT_GREEN#*The man lets out a disappointed sigh*#WHITE# + text = _t[[#LIGHT_GREEN#*The man lets out a disappointed sigh*#WHITE# That's unfortunate. We could have used someone like you. You are just the type the audience likes. You could have been a champion. Alas, if you stand by your choice, we shall never meet again. @@ -78,31 +78,31 @@ longer.#WHITE# If I am still around, we can have a deal. Think about it, @playerdescriptor.race@. ]], answers = { - {"We'll see. [Leave]"}, + {_t"We'll see. [Leave]"}, } } newChat{ id="accept", - text = [[#LIGHT_GREEN#*The man smiles in approval*#WHITE# + text = _t[[#LIGHT_GREEN#*The man smiles in approval*#WHITE# Excellent! A great fighter is always willing to head into battle. You certainly won't regret meeting us, indeed... So, are you ready to fight? ]], answers = { - {"Sounds like fun. I'm ready!", jump="go"}, - {"Wait. I am not ready yet.", jump="ok"}, + {_t"Sounds like fun. I'm ready!", jump="go"}, + {_t"Wait. I am not ready yet.", jump="ok"}, } } newChat{ id="go", - text = "#LIGHT_GREEN#*The man quietly walks away, after making you a gesture to follow him*", + text = _t"#LIGHT_GREEN#*The man quietly walks away, after making you a gesture to follow him*", answers = { - {"[Follow him]", + {_t"[Follow him]", action = function (self, player) self:die() player:grantQuest("arena-unlock") game:changeLevel(1, "arena-unlock", {direct_switch=true}) - require("engine.ui.Dialog"):simpleLongPopup("Get ready!", "Defeat all three enemies!", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Get ready!", _t"Defeat all three enemies!", 400) end }, } @@ -110,7 +110,7 @@ newChat{ id="go", newChat{ id="win", - text = [[#LIGHT_GREEN#*The Cornac rogue comes back from the shadows*#WHITE# + text = _t[[#LIGHT_GREEN#*The Cornac rogue comes back from the shadows*#WHITE# Well done, @playerdescriptor.race@! I knew you had potential. #LIGHT_GREEN#*The rogue takes off his hood, showing a fairly young, but unmistakably #LIGHT_GREEN#battle-hardened man.#WHITE# @@ -125,14 +125,14 @@ But we can make you a true champion, beloved by many and bathing in diamonds. Good luck in your adventures, and come visit us when you are done! ]], answers = { - { "I will. Farewell for now.", action = function (self, player) game:onLevelLoad("arena-unlock-1", function() + { _t"I will. Farewell for now.", action = function (self, player) game:onLevelLoad("arena-unlock-1", function() local g = game.zone:makeEntityByName(game.level, "terrain", "SAND_UP_WILDERNESS") g.change_level = 1 g.change_zone = "town-derth" - g.name = "exit to Derth" + g.name = _t"exit to Derth" game.zone:addEntity(game.level, g, "terrain", player.x, player.y) - game.party:reward("Select the party member to receive the +2 generic talent points:", function(player) + game.party:reward(_t"Select the party member to receive the +2 generic talent points:", function(player) player.unused_generics = player.unused_generics + 2 end) game:setAllowedBuild("campaign_arena", true) @@ -143,29 +143,29 @@ Good luck in your adventures, and come visit us when you are done! } newChat{ id="ok", - text = "#WHITE#I see. I will be waiting... #YELLOW#But not for long.", + text = _t"#WHITE#I see. I will be waiting... #YELLOW#But not for long.", answers = { { "See you."}, } } newChat{ id="back", - text = [[#LIGHT_GREEN#*The Cornac rogue displays a welcoming smile*#WHITE# + text = _t[[#LIGHT_GREEN#*The Cornac rogue displays a welcoming smile*#WHITE# Welcome back, @playerdescriptor.race@. Have you reconsidered my generous offer? ]], answers = { - { "Yes, tell me more.", jump = "accept", action = function (self, player) self.talked_to = 2 end }, - { "No, see you."}, + { _t"Yes, tell me more.", jump = "accept", action = function (self, player) self.talked_to = 2 end }, + { _t"No, see you."}, } } newChat{ id="back2", - text = [[ + text = _t[[ Welcome back, @playerdescriptor.race@. Are you ready to go? ]], answers = { - { "Let's go, Cornac.", jump = "go" }, - { "Just a minute. I have to prepare my equipment."}, + { _t"Let's go, Cornac.", jump = "go" }, + { _t"Just a minute. I have to prepare my equipment."}, } } diff --git a/game/modules/tome/data/chats/arena.lua b/game/modules/tome/data/chats/arena.lua index 01624f4267db5acf54020bea8498b2b3aa2272a6..16493acf9747e0507278a23e898f1a5d5d795516 100644 --- a/game/modules/tome/data/chats/arena.lua +++ b/game/modules/tome/data/chats/arena.lua @@ -20,12 +20,12 @@ local entershop = function (self, player) local arenashop = game:getStore("ARENA_SHOP") arenashop:loadup(game.level, game.zone) - arenashop:interact(player, "Gladiator's wares") + arenashop:interact(player, _t"Gladiator's wares") arenashop = nil end newChat{ id="ryal-entry", -text = [[#LIGHT_GREEN#*A gigantic bone giant walks through the main gate. +text = _t[[#LIGHT_GREEN#*A gigantic bone giant walks through the main gate. #LIGHT_GREEN#Its shape is intricate and sharp, resembling a drake, but with countless #LIGHT_GREEN#spikes instead of wings. #LIGHT_GREEN#The massive undead stares at you with unusual...intellect. @@ -34,12 +34,12 @@ text = [[#LIGHT_GREEN#*A gigantic bone giant walks through the main gate. #LIGHT_GREEN#roars and multiple bones fly in your general direction!* ]], answers = { - {"Have at you!!"}, + {_t"Have at you!!"}, } } newChat{ id="ryal-defeat", -text = [[#LIGHT_GREEN#*After taking several hits, the undead giant finally succumbs +text = _t[[#LIGHT_GREEN#*After taking several hits, the undead giant finally succumbs #LIGHT_GREEN#to your attacks* #LIGHT_GREEN#Suddenly, Ryal's body starts to regenerate! #LIGHT_GREEN#Standing tall again, you can almost feel its emotionless skull staring @@ -48,25 +48,25 @@ text = [[#LIGHT_GREEN#*After taking several hits, the undead giant finally succu #LIGHT_GREEN#*Ryal quietly turns towards the gate and leaves, seemingly unharmed* ]], answers = { - {"It was fun, bone giant!", action=entershop}, - {"...what? unharmed?", action=entershop} + {_t"It was fun, bone giant!", action=entershop}, + {_t"...what? unharmed?", action=entershop} } } newChat{ id="fryjia-entry", -text = [[#LIGHT_GREEN#*The wind chills as a young girl walks calmly through the gate. +text = _t[[#LIGHT_GREEN#*The wind chills as a young girl walks calmly through the gate. #LIGHT_GREEN#She looks surprisingly young, with extremely pale skin and contrasting #LIGHT_GREEN#long black hair. She examines you with eerie calmness*#WHITE# I am known as Fryjia the Hailstorm. That's all you need to know, @playerdescriptor.race@. Let us begin. #LIGHT_GREEN#*The whole arena starts to get colder as she speaks, and the audience #LIGHT_GREEN#starts wearing their finest winter cloaks*]], answers = { - {"Bring it!"}, + {_t"Bring it!"}, } } newChat{ id="fryjia-defeat", -text = [[#LIGHT_GREEN#*With your final blow, Fryjia falls, unable to continue* +text = _t[[#LIGHT_GREEN#*With your final blow, Fryjia falls, unable to continue* #LIGHT_GREEN#*She awkwardly stands up, but doesn't seem critically injured* #WHITE# I...I admit defeat. #LIGHT_GREEN#*The audience "oooohs" in awe. Fryjia has turned her back to you* @@ -75,13 +75,13 @@ text = [[#LIGHT_GREEN#*With your final blow, Fryjia falls, unable to continue* #LIGHT_GREEN#towards the gate. As it closes, you realize her eyes are wet with tears. ]], answers = { - {"...", action=entershop}, - {"w...what was that about?", action=entershop} + {_t"...", action=entershop}, + {_t"w...what was that about?", action=entershop} } } newChat{ id="riala-entry", -text = [[#LIGHT_GREEN#*The gate opens, revealing a mature human woman in crimson robes. +text = _t[[#LIGHT_GREEN#*The gate opens, revealing a mature human woman in crimson robes. #LIGHT_GREEN#She looks at you with a wide smile* #WHITE# My, my, what a fine @playerdescriptor.race@ you are. What was your name again, @playername@? I am soo delighted to be your rival today. #LIGHT_GREEN#*She speaks quietly as if telling a secret* #WHITE#You know, so few get past the little one as of late, it's such a bore.#LIGHT_GREEN#*She giggles*#WHITE# @@ -90,12 +90,12 @@ So! I am Reala, the Crimson. I came directly from Angolwen. Despite, you know, t Fryjia told me about you, the poor thing, so I will not underestimate such a promising aspirant #LIGHT_GREEN#*She smiles warmly* #WHITE#So, let's make haste my dear! There is a battle to fight here!]], answers = { - {"Let's go!"}, + {_t"Let's go!"}, } } newChat{ id="riala-defeat", -text = [[#LIGHT_GREEN#*With the final blow, Reala falls...to suddenly burst in flames!! +text = _t[[#LIGHT_GREEN#*With the final blow, Reala falls...to suddenly burst in flames!! #LIGHT_GREEN#You stare at the blazing inferno with understandable confusion, #LIGHT_GREEN#until you hear her voice from behind*#WHITE# Oh, my dear! That was quite the fight, wasn't it? I concede you the honor of victory. @@ -105,13 +105,13 @@ Oh, and please forgive her behavior. You will understand when you meet her fathe And, if you keep fighting like this, it will be really soon. So, it's been my pleasure, @playername@. #LIGHT_GREEN#*She vanishes in a spiral of flame*]], answers = { - {"I am pumped up! What's next?", action=entershop}, - {"Am I the only person with a name that can die here?", action=entershop} + {_t"I am pumped up! What's next?", action=entershop}, + {_t"Am I the only person with a name that can die here?", action=entershop} } } newChat{ id="valfren-entry", -text = [[#LIGHT_GREEN#*You suddenly realize everything has turned dark. +text = _t[[#LIGHT_GREEN#*You suddenly realize everything has turned dark. #LIGHT_GREEN#You look around searching for your rival. And then you notice it. Standing #LIGHT_GREEN#right before you, a massive battle armor with an equally massive battle axe. #LIGHT_GREEN#It wasn't there just a second ago. You step back and examine him better, @@ -125,12 +125,12 @@ f...t...ma....ll... #LIGHT_GREEN#emotions invading your very soul!!* ]], answers = { - {"#LIGHT_GREEN#*You valiantly stand against the darkness*"}, + {_t"#LIGHT_GREEN#*You valiantly stand against the darkness*"}, } } newChat{ id="valfren-defeat", -text = [[#LIGHT_GREEN#*You valiantly deliver the finishing blow!* +text = _t[[#LIGHT_GREEN#*You valiantly deliver the finishing blow!* #LIGHT_GREEN#*Valfren collapses as the light returns to this world. #LIGHT_GREEN#You close your eyes for a brief instant. Fryjia is there when you open them* Father... #LIGHT_GREEN#*She stands silent for a few seconds*#WHITE# You win, @playerdescriptor.race@. @@ -146,14 +146,14 @@ Good luck... #RED#The final battle begins when the gate closes, just this final time!! ]], answers = { - {"I will defeat you, Master of the Arena!!!", action=entershop}, - {"I will become Master of the Arena instead of the Master of the Arena!!", action=entershop}, - {"Wealth and glory! Wealth and glory!", action=entershop}, + {_t"I will defeat you, Master of the Arena!!!", action=entershop}, + {_t"I will become Master of the Arena instead of the Master of the Arena!!", action=entershop}, + {_t"Wealth and glory! Wealth and glory!", action=entershop}, } } newChat{ id="master-entry", -text = [[#LIGHT_GREEN#*Finally, the master of the arena comes into the gates! +text = _t[[#LIGHT_GREEN#*Finally, the master of the arena comes into the gates! #LIGHT_GREEN#The public roars with excitement as he faces you with confidence!* I applaud you, @playerdescriptor.race@! You have fought with might and courage! And now...the time for the final showdown! @@ -166,12 +166,12 @@ Pursue glory with all your might, @playerdescriptor.race@!! #LIGHT_GREEN#*The master steps forward into the sand* ]], answers = { - {"Wealth and glory!!!"}, + {_t"Wealth and glory!!!"}, } } newChat{ id="master-defeat", -text = [[#LIGHT_GREEN#*After a glorious battle, the Master falls!* +text = _t[[#LIGHT_GREEN#*After a glorious battle, the Master falls!* Hah...haha. You did it, @playerdescriptor.race@... #LIGHT_GREEN#*The master of the arena, defeated, stands up with a wide smile. #LIGHT_GREEN#Feeling the master's approval, you pick up its weapon, now lying @@ -194,9 +194,9 @@ But meanwhile, this is your place! Welcome to paradise, @playerdescriptor.race@! #YELLOW#Next time you play, you shall battle this new champion instead! ]], answers = { - {"WEALTH!! AND!! GLORYYYYY!!", action=function(npc, player) player:hasQuest("arena"):win() end}, - {"I won't need to save chicks from cults anymore!", cond=function(npc, player) if player.female == true then return false else return true end end, action=function(npc, player) player:hasQuest("arena"):win() end}, - {"I hereby stand victorious, awaiting future challenges!", action=function(npc, player) player:hasQuest("arena"):win() end}, - {"#LIGHT_GREEN#*dance*", action=function(npc, player) player:hasQuest("arena"):win() end}, + {_t"WEALTH!! AND!! GLORYYYYY!!", action=function(npc, player) player:hasQuest("arena"):win() end}, + {_t"I won't need to save chicks from cults anymore!", cond=function(npc, player) if player.female == true then return false else return true end end, action=function(npc, player) player:hasQuest("arena"):win() end}, + {_t"I hereby stand victorious, awaiting future challenges!", action=function(npc, player) player:hasQuest("arena"):win() end}, + {_t"#LIGHT_GREEN#*dance*", action=function(npc, player) player:hasQuest("arena"):win() end}, } } \ No newline at end of file diff --git a/game/modules/tome/data/chats/artifice-mastery.lua b/game/modules/tome/data/chats/artifice-mastery.lua index 59fae830c21b0dfce0258e94f3035e72b7d8929d..d8597bd947aa13a8e4e17e599ee1649b30dc6b86 100644 --- a/game/modules/tome/data/chats/artifice-mastery.lua +++ b/game/modules/tome/data/chats/artifice-mastery.lua @@ -21,7 +21,7 @@ local Talents = require("engine.interface.ActorTalents") chat_talent = player:getTalentFromId(chat_tid) chat_level = player:getTalentLevelRaw(chat_tid) local function generate_tools() - local answers = {{"Cancel"}} + local answers = {{_t"Cancel"}} for tid, m_tid in pairs(tool_ids) do local t = player:getTalentFromId(tid) local m_t = player:getTalentFromId(m_tid) @@ -47,12 +47,12 @@ local function generate_tools() player:talentDialogReturn(m_tid) end end - answers[#answers+1] = {("%s[%s -- mastery: %s]#LAST#"):format(player.artifice_tools_mastery == tid and "#YELLOW#" or "", t.name, m_t.name), + answers[#answers+1] = {("%s[%s -- mastery: %s]#LAST#"):tformat(player.artifice_tools_mastery == tid and "#YELLOW#" or "", t.name, m_t.name), action=master_talent, on_select=function(npc, player) local mastery = nil game.tooltip_x, game.tooltip_y = 1, 1 - game:tooltipDisplayAtMap(game.w, game.h, "#GOLD#"..m_t.name.."#LAST#\n"..tostring(player:getTalentFullDescription(m_t, nil, {force_level=chat_level}, mastery))) + game:tooltipDisplayAtMap(game.w, game.h, ("#GOLD#%s#LAST#\n%s"):tformat(m_t.name, tostring(player:getTalentFullDescription(m_t, nil, {force_level=chat_level}, mastery)))) end, } end @@ -61,7 +61,7 @@ local function generate_tools() end newChat{ id="welcome", - text = [[Master which tool?]], + text = _t[[Master which tool?]], answers = generate_tools(), } diff --git a/game/modules/tome/data/chats/artifice.lua b/game/modules/tome/data/chats/artifice.lua index 4e0c8ef508dbd90dfe65b4dec63ba51a0e121d46..399a726f2353b74eff83a33fa0e0db3efe987f2d 100644 --- a/game/modules/tome/data/chats/artifice.lua +++ b/game/modules/tome/data/chats/artifice.lua @@ -22,7 +22,7 @@ chat_talent = player:getTalentFromId(chat_tid) chat_level = player:getTalentLevelRaw(chat_tid) local function generate_tools() - local answers = {{"[Cancel]"}} + local answers = {{_t"[Cancel]"}} local tool_ids = tool_ids or player.main_env.artifice_tool_tids player.artifice_tools = player.artifice_tools or {} @@ -60,9 +60,9 @@ local function generate_tools() if tool_id == tid then slot = slot_id break end end if slot then - txt = ("[%sEquip %s%s#LAST#]"):format(slot==chat_tid and "#YELLOW#" or "", t.name, slot and (" (%s)"):format(player:getTalentFromId(slot).name) or "") + txt = ("[%sEquip %s%s#LAST#]"):tformat(slot==chat_tid and "#YELLOW#" or "", t.name, slot and (" (%s)"):format(player:getTalentFromId(slot).name) or "") else - txt = ("[Equip %s]"):format(t.name) + txt = ("[Equip %s]"):tformat(t.name) end answers[#answers+1] = {txt, @@ -86,7 +86,7 @@ local function generate_tools() else text = player:getTalentFullDescription(t, nil, {force_level=chat_level}) end - game:tooltipDisplayAtMap(game.w, game.h, "#GOLD#"..t.name.."#LAST#\n"..tostring(text)) + game:tooltipDisplayAtMap(game.w, game.h, ("#GOLD#%s#LAST#\n%s"):tformat(t.name, tostring(text))) end, } end @@ -96,7 +96,7 @@ local function generate_tools() end newChat{ id="welcome", - text = ([[Equip which tool for #YELLOW#%s#LAST#?]]):format(chat_talent.name), + text = ([[Equip which tool for #YELLOW#%s#LAST#?]]):tformat(chat_talent.name), answers = generate_tools(), } diff --git a/game/modules/tome/data/chats/assassin-lord-thieves.lua b/game/modules/tome/data/chats/assassin-lord-thieves.lua index 5849ce71cdd4fca70e364a152e5b2b9f5565c1e9..52848de99751947b4d21d79981fa29f6ba244df5 100644 --- a/game/modules/tome/data/chats/assassin-lord-thieves.lua +++ b/game/modules/tome/data/chats/assassin-lord-thieves.lua @@ -18,9 +18,9 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[I ain't no chatting! Speak to the boss!]], + text = _t[[I ain't no chatting! Speak to the boss!]], answers = { - {"[leave]"}, + {_t"[leave]"}, } } diff --git a/game/modules/tome/data/chats/assassin-lord.lua b/game/modules/tome/data/chats/assassin-lord.lua index 68078f27ca1aa3abef1d22f709326fa1eace8f9a..da45ffc54920178e38dfaa754ea1edcd652166e0 100644 --- a/game/modules/tome/data/chats/assassin-lord.lua +++ b/game/modules/tome/data/chats/assassin-lord.lua @@ -45,46 +45,46 @@ local function do_attack(npc, player) end newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a menacing man clothed in black.*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands a menacing man clothed in black.*#WHITE# Ahh, the intruder at last... And what shall we do with you? Why did you kill my men?]], answers = { - {"I heard some cries, and your men... they were in my way. What's going on here?", jump="what"}, - {"I thought there might be some treasure to be had around here.", jump="greed"}, - {"Sorry, I have to go!", jump="hostile"}, + {_t"I heard some cries, and your men... they were in my way. What's going on here?", jump="what"}, + {_t"I thought there might be some treasure to be had around here.", jump="greed"}, + {_t"Sorry, I have to go!", jump="hostile"}, } } newChat{ id="hostile", - text = [[Oh, you are not going anywhere, I'm afraid! KILL!]], + text = _t[[Oh, you are not going anywhere, I'm afraid! KILL!]], answers = { - {"[attack]", action=do_attack}, - {"Wait! Maybe we could work out some kind of arrangement; you seem to be a practical man.", jump="offer"}, + {_t"[attack]", action=do_attack}, + {_t"Wait! Maybe we could work out some kind of arrangement; you seem to be a practical man.", jump="offer"}, } } newChat{ id="what", - text = [[Oh, so this is the part where I tell you my plan before you attack me? GET THIS INTRUDER!]], + text = _t[[Oh, so this is the part where I tell you my plan before you attack me? GET THIS INTRUDER!]], answers = { - {"[attack]", action=do_attack}, - {"Wait! Maybe we could work out some kind of arrangement; you seem to be a practical man.", jump="offer"}, + {_t"[attack]", action=do_attack}, + {_t"Wait! Maybe we could work out some kind of arrangement; you seem to be a practical man.", jump="offer"}, } } newChat{ id="greed", - text = [[I am afraid this is not your lucky day then. The merchant is ours... and so are you! GET THIS INTRUDER!!]], + text = _t[[I am afraid this is not your lucky day then. The merchant is ours... and so are you! GET THIS INTRUDER!!]], answers = { - {"[attack]", action=do_attack}, - {"Wait! Maybe we could work out some kind of arrangement; you seem to be a practical man.", jump="offer"}, + {_t"[attack]", action=do_attack}, + {_t"Wait! Maybe we could work out some kind of arrangement; you seem to be a practical man.", jump="offer"}, } } newChat{ id="offer", - text = [[Well, I need somebody to replace the men you killed. You look sturdy; maybe you could work for me. + text = _t[[Well, I need somebody to replace the men you killed. You look sturdy; maybe you could work for me. You will have to do some dirty work for me, though, and you will be bound to me. Nevertheless, you may make quite a profit from this venture, if you are as good as you seem to be. And do not think of crossing me. That would be... unwise.]], answers = { - {"Well, I suppose it is better than dying.", action=evil}, - {"Money? I'm in!", action=evil}, - {"Just let me and the merchant get out of here and you may live!", action=do_attack}, + {_t"Well, I suppose it is better than dying.", action=evil}, + {_t"Money? I'm in!", action=evil}, + {_t"Just let me and the merchant get out of here and you may live!", action=do_attack}, } } diff --git a/game/modules/tome/data/chats/chronomancy-bias-weave.lua b/game/modules/tome/data/chats/chronomancy-bias-weave.lua index 27b7d107880ceb04a44d61366fc1aca1e353086a..cb93be0c6fad90762b9148a7559ea096bfb57741 100644 --- a/game/modules/tome/data/chats/chronomancy-bias-weave.lua +++ b/game/modules/tome/data/chats/chronomancy-bias-weave.lua @@ -27,27 +27,27 @@ local function set_bias(which) end newChat{ id="welcome", - text = [[What kind of anomaly do you prefer?]], + text = _t[[What kind of anomaly do you prefer?]], answers = { - {"Physical", + {_t"Physical", action = function() game.level.map:particleEmitter(game.player.x, game.player.y, 1, "temporal_teleport") return set_bias({type = "physical", chance=chance}) end, }, - {"Warp", + {_t"Warp", action = function() game.level.map:particleEmitter(game.player.x, game.player.y, 1, "temporal_teleport") return set_bias({type = "Warp", chance=chance}) end, }, - {"Temporal", + {_t"Temporal", action = function() game.level.map:particleEmitter(game.player.x, game.player.y, 1, "temporal_teleport") return set_bias({type = "temporal", chance=chance}) end, }, - {"Never mind"}, + {_t"Never mind"}, } } diff --git a/game/modules/tome/data/chats/chronomancy-see-threads.lua b/game/modules/tome/data/chats/chronomancy-see-threads.lua index 9736131fb40b6e6c26bf37a19603ff32479fb209..f825f7677d526bf94226540fd16c4c70dcbd5a22 100644 --- a/game/modules/tome/data/chats/chronomancy-see-threads.lua +++ b/game/modules/tome/data/chats/chronomancy-see-threads.lua @@ -39,11 +39,11 @@ local function select(id) end newChat{ id="welcome", - text = [[You have lived ]]..turns..[[ turns in three different timelines. Which do you choose to be the real timeline?]], + text = ([[You have lived %d turns in three different timelines. Which do you choose to be the real timeline?]]):tformat(turns), answers = { - {"The first.", action=function(npc, player) select(1) end}, - {"The second.", action=function(npc, player) select(2) end}, - {"The third.", action=function(npc, player) select(3) end}, + {_t"The first.", action=function(npc, player) select(1) end}, + {_t"The second.", action=function(npc, player) select(2) end}, + {_t"The third.", action=function(npc, player) select(3) end}, } } diff --git a/game/modules/tome/data/chats/command-staff.lua b/game/modules/tome/data/chats/command-staff.lua index 66ef9143df7a2cb3e63eaf4649da34877d91f3c6..43af5903cdcc6599dc101d255619d4d61a018ca1 100644 --- a/game/modules/tome/data/chats/command-staff.lua +++ b/game/modules/tome/data/chats/command-staff.lua @@ -43,47 +43,47 @@ end -- Alot of this code is unused, telos is the only sentient staff in the game right now local function intro(o) local sentient_responses = { - default = [[Greetings. How can I help you?]], - aggressive = [[Hurry up and make with the foe-blasting.]], - fawning = [[O wise wielder, instruct me that I may better serve you.]], - penitent = [[Make amends, magic-user, for the harm ye have wrought is beyond compare.]], - telos = [[You really could have chosen a better home for me, you know. I was reasonably happy in my old crystal. This stick smells like armpit.]], - telos_full = [[Tremble before the might of Telos!]], + default = _t[[Greetings. How can I help you?]], + aggressive = _t[[Hurry up and make with the foe-blasting.]], + fawning = _t[[O wise wielder, instruct me that I may better serve you.]], + penitent = _t[[Make amends, magic-user, for the harm ye have wrought is beyond compare.]], + telos = _t[[You really could have chosen a better home for me, you know. I was reasonably happy in my old crystal. This stick smells like armpit.]], + telos_full = _t[[Tremble before the might of Telos!]], } cur_chat:triggerHook{"CommandStaff:SentientOptions", o=o, mode="intro", list=sentient_responses} if o.no_command then - return [[It is not yet your place to command such a staff as this. To do so invites obliteration.]] + return _t[[It is not yet your place to command such a staff as this. To do so invites obliteration.]] end if o.combat.sentient then return sentient_responses[o.combat.sentient] or sentient_responses["default"] else - return [[Call on which aspect of the staff?]] + return _t[[Call on which aspect of the staff?]] end end local function how_speak(o) - if not o.combat.sentient then return [[error!]] end + if not o.combat.sentient then return _t[[error!]] end local sentient_responses = { - default = [[Oh, I was once a mighty Eldritch Channeler. Mighty and absentminded, as it turns out. Had a bit of a mishap with an Inverted Kugala's Soul-infusion technique. Long story short, my soul is now stuck in this stick, and the soul I was working with... well, I don't rightly know where he got to. But I hope we never meet him.]], - aggressive = [[Argh! Bollocksed up a tricky bit of soul magic and the fool that I was supposed to be imprisoning for all eternity flitted away. My body, like all the targets of my spells, intended or otherwise, got reduced to elementary particles. Fortunately, I had this soul-cage of a staff all prepped and ready for a stray soul, so I'm not completely gone. But enough chit-chat. Let's fry somebody.]], - fawning = [[My old master-- who, though a powerful enchanter, did not compare to you and your glory-- saw fit to imprison me in this fine staff to aid him in his work. Alas, he is long gone, but I despair not, for I have found a mighty new master.]], - penitent = [[I am a portion of the very spirit of the world that was ripped free during the Spellblaze. I speak that I might enlighten those who bear me.]], - telos = [[What's the good of immortality if you can't even speak? No archmage worth his salt is going to concoct some immoral life-after-death scheme without including some sort of capacity for making his opinions known. And, by the way, your energy manipulation techniques are on the same level as those of my average pair of shoes. Best study up if you don't want to die forgotten and incompetent.]], - telos_full = [[What's the good of immortality if you can't even speak? No archmage worth his salt is going to concoct some immoral life-after-death scheme without including some sort of capacity for making his opinions known. And, by the way, your energy manipulation techniques are on the same level as those of my average pair of shoes. Best study up if you don't want to die forgotten and incompetent.]], + default = _t[[Oh, I was once a mighty Eldritch Channeler. Mighty and absentminded, as it turns out. Had a bit of a mishap with an Inverted Kugala's Soul-infusion technique. Long story short, my soul is now stuck in this stick, and the soul I was working with... well, I don't rightly know where he got to. But I hope we never meet him.]], + aggressive = _t[[Argh! Bollocksed up a tricky bit of soul magic and the fool that I was supposed to be imprisoning for all eternity flitted away. My body, like all the targets of my spells, intended or otherwise, got reduced to elementary particles. Fortunately, I had this soul-cage of a staff all prepped and ready for a stray soul, so I'm not completely gone. But enough chit-chat. Let's fry somebody.]], + fawning = _t[[My old master-- who, though a powerful enchanter, did not compare to you and your glory-- saw fit to imprison me in this fine staff to aid him in his work. Alas, he is long gone, but I despair not, for I have found a mighty new master.]], + penitent = _t[[I am a portion of the very spirit of the world that was ripped free during the Spellblaze. I speak that I might enlighten those who bear me.]], + telos = _t[[What's the good of immortality if you can't even speak? No archmage worth his salt is going to concoct some immoral life-after-death scheme without including some sort of capacity for making his opinions known. And, by the way, your energy manipulation techniques are on the same level as those of my average pair of shoes. Best study up if you don't want to die forgotten and incompetent.]], + telos_full = _t[[What's the good of immortality if you can't even speak? No archmage worth his salt is going to concoct some immoral life-after-death scheme without including some sort of capacity for making his opinions known. And, by the way, your energy manipulation techniques are on the same level as those of my average pair of shoes. Best study up if you don't want to die forgotten and incompetent.]], } class:triggerHook{"CommandStaff:SentientOptions", o=o, mode="how_speak", list=sentient_responses} return sentient_responses[o.combat.sentient] or sentient_responses["default"] end local function which_aspect(o) - if not o.combat.sentient then return [[error!]] end + if not o.combat.sentient then return _t[[error!]] end local sentient_responses = { - default = [[Of course. Which aspect?]], - aggressive = [[I highly recommend the mage aspect and the fire element. You're not going to find anything better for turning a piece of meat into a cloud of vapor.]], - fawning = [[I live to serve-- though my use of the word 'live' is perhaps loose here.]], - penitent = [[Choose wisely. Powers beyond your comprehension will tolerate only so much interference in their carefully-laid natural order.]], - telos = [[Back in my day, we didn't need to go changing our staves around willy-nilly. We picked an element and stuck with it, by the gods.]], - telos_full = [[Back in my day, we didn't need to go changing our staves around willy-nilly. We picked an element and stuck with it, by the gods.]], + default = _t[[Of course. Which aspect?]], + aggressive = _t[[I highly recommend the mage aspect and the fire element. You're not going to find anything better for turning a piece of meat into a cloud of vapor.]], + fawning = _t[[I live to serve-- though my use of the word 'live' is perhaps loose here.]], + penitent = _t[[Choose wisely. Powers beyond your comprehension will tolerate only so much interference in their carefully-laid natural order.]], + telos = _t[[Back in my day, we didn't need to go changing our staves around willy-nilly. We picked an element and stuck with it, by the gods.]], + telos_full = _t[[Back in my day, we didn't need to go changing our staves around willy-nilly. We picked an element and stuck with it, by the gods.]], } class:triggerHook{"CommandStaff:SentientOptions", o=o, mode="which_aspect", list=sentient_responses} return sentient_responses[o.combat.sentient] or sentient_responses["default"] @@ -91,10 +91,10 @@ end --unused for now: local function alter_combat(o) - if not o.combat.sentient then return [[error!]] end + if not o.combat.sentient then return _t[[error!]] end local sentient_responses = { - default = [[Certainly. You should be impressed, by the way, that I can do such a thing. Most lesser practitioners of my art would have difficulties with this. What shall I change?]], - aggressive = [[Fine, as long as it leads to blasting something soon. What do you want me to change?]], + default = _t[[Certainly. You should be impressed, by the way, that I can do such a thing. Most lesser practitioners of my art would have difficulties with this. What shall I change?]], + aggressive = _t[[Fine, as long as it leads to blasting something soon. What do you want me to change?]], } class:triggerHook{"CommandStaff:SentientOptions", o=o, mode="alter_combat", list=sentient_responses} return sentient_responses[o.combat.sentient] or sentient_responses["default"] @@ -145,21 +145,21 @@ for _, flavor in ipairs(flavor_list) do local name = ("[%s]"):format(DamageType:get(dtype).name:capitalize()) answers[i] = {name, action = function() set_element(dtype, flavor, game.player) end} end - answers[#answers + 1] = {"Choose different aspect", jump = aspect_chat_id} - answers[#answers + 1] = {"Never mind."} - newChat{id="element_"..flavor, text = "Call forth which element?", answers = answers} + answers[#answers + 1] = {_t"Choose different aspect", jump = aspect_chat_id} + answers[#answers + 1] = {_t"Never mind."} + newChat{id="element_"..flavor, text = _t"Call forth which element?", answers = answers} - local flavor_name = flavor:gsub("staff", ""):capitalize() + local flavor_name = _t(flavor):gsub(_t"staff", ""):capitalize() aspect_answers[#aspect_answers + 1] = {("[%s]"):format(flavor_name), jump = "element_"..flavor} end -aspect_answers[#aspect_answers + 1] = {"Never mind."} +aspect_answers[#aspect_answers + 1] = {_t"Never mind."} if is_sentient() then local answers = { - {"How is it that you speak?", cond = function() return is_sentient() and not o.no_command end, jump="how_speak"}, - {"I'd like you to bring forth a different aspect.", cond = function() return is_sentient() and not o.no_command end, jump="which_aspect"}, - {"I'd like to alter your basic properties.", cond = function() return is_sentient() and not o.no_command end, + {_t"How is it that you speak?", cond = function() return is_sentient() and not o.no_command end, jump="how_speak"}, + {_t"I'd like you to bring forth a different aspect.", cond = function() return is_sentient() and not o.no_command end, jump="which_aspect"}, + {_t"I'd like to alter your basic properties.", cond = function() return is_sentient() and not o.no_command end, action = function() coroutine.resume(co, true) local SentientWeapon = require "mod.dialogs.SentientWeapon" @@ -170,7 +170,7 @@ if is_sentient() then } cur_chat:triggerHook{"CommandStaff:SentientChat", o=o, answers=answers} - answers[#answers+1] = {"Never mind."} + answers[#answers+1] = {_t"Never mind."} newChat{ id="welcome", text = intro(o), @@ -190,7 +190,7 @@ end newChat{ id="how_speak", text = how_speak(o), answers = { - {"I see.", jump="welcome"}, + {_t"I see.", jump="welcome"}, } } diff --git a/game/modules/tome/data/chats/conclave-vault-greeting.lua b/game/modules/tome/data/chats/conclave-vault-greeting.lua index f43b2087d0ab8b42a5b2457127c4f7e7b2aca0c3..1ef17a8ea31b64e45d887f2a47f1f0b4ffc30561 100644 --- a/game/modules/tome/data/chats/conclave-vault-greeting.lua +++ b/game/modules/tome/data/chats/conclave-vault-greeting.lua @@ -18,38 +18,38 @@ -- darkgod@te4.org newChat{ id="welcome", - template = [[#LIGHT_GREEN#*Entering the room, you see two massive ogres standing guard, blinking as though awakened from a long sleep. They see you, and immediately snap to attention. The one on the right speaks:*#WHITE# + template = _t[[#LIGHT_GREEN#*Entering the room, you see two massive ogres standing guard, blinking as though awakened from a long sleep. They see you, and immediately snap to attention. The one on the right speaks:*#WHITE# YOU! Name, rank, and identification. NOW. ]], answers = { - {"My what?"}, - {"[attack]"}, + {_t"My what?"}, + {_t"[attack]"}, } } newChat{ id="nargol-scum", - template = [[#LIGHT_GREEN#*Entering the room, you see two massive ogres standing guard, blinking as though awakened from a long sleep. They see you, and immediately draw their weapons.]], + template = _t[[#LIGHT_GREEN#*Entering the room, you see two massive ogres standing guard, blinking as though awakened from a long sleep. They see you, and immediately draw their weapons.]], answers = { - {"[attack]", action=function(npc, player) npc:doEmote("#CRIMSON#NARGOL SCUM! WE'RE UNDER ATTACK!", 120) end}, + {_t"[attack]", action=function(npc, player) npc:doEmote(_t"#CRIMSON#NARGOL SCUM! WE'RE UNDER ATTACK!", 120) end}, } } newChat{ id="conclave", - template = [[#LIGHT_GREEN#*Entering the room, you see two massive ogres standing guard, blinking as though awakened from a long sleep. They see you, and immediately snap to attention. The one on the right speaks:*#WHITE# + template = _t[[#LIGHT_GREEN#*Entering the room, you see two massive ogres standing guard, blinking as though awakened from a long sleep. They see you, and immediately snap to attention. The one on the right speaks:*#WHITE# Ah! Reinforcements! I don't know how long it's been, but I'll get Astelrid up here to-- wait a minute, where are the rest of them? #LIGHT_GREEN#*He frowns.*#WHITE# What's your identification number? ]], answers = { - {"Wait! The war's over! It's been thousands of years, the Conclave doesn't exist anymore!", jump="angry-conclave"}, - {"[attack]"}, + {_t"Wait! The war's over! It's been thousands of years, the Conclave doesn't exist anymore!", jump="angry-conclave"}, + {_t"[attack]"}, } } newChat{ id="angry-conclave", - text = [[#LIGHT_GREEN#*They look at each other and scowl, drawing their weapons. The one on the left growls:*#WHITE# + text = _t[[#LIGHT_GREEN#*They look at each other and scowl, drawing their weapons. The one on the left growls:*#WHITE# LIES! The Conclave could not have lost! I don't know who you are, but we can't afford witnesses! ]], answers = { - {"[attack]"}, + {_t"[attack]"}, } } diff --git a/game/modules/tome/data/chats/corruptor-quest.lua b/game/modules/tome/data/chats/corruptor-quest.lua index 880a259b8f796916dd8898ec83f0fcc5254fc164..85ff2ebc9aa12487ea3867908198dc1c7d1a94c9 100644 --- a/game/modules/tome/data/chats/corruptor-quest.lua +++ b/game/modules/tome/data/chats/corruptor-quest.lua @@ -18,45 +18,45 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[Wait, @playerdescriptor.subclass@! + text = _t[[Wait, @playerdescriptor.subclass@! I see you are a worthy opponent, powerful indeed. I can see, and feel, your mastery of the eldritch crafts. We are the same.]], answers = { - {"What do you mean 'the same'?", jump="quest"}, - {"I am nothing like you. Die!", quick_reply="So be it. Die, and give me your power!"}, + {_t"What do you mean 'the same'?", jump="quest"}, + {_t"I am nothing like you. Die!", quick_reply=_t"So be it. Die, and give me your power!"}, } } newChat{ id="quest", - text = [[We both know the strength of the arcane; we both hunger for power. There is so much I have discovered, so much I could teach you. + text = _t[[We both know the strength of the arcane; we both hunger for power. There is so much I have discovered, so much I could teach you. This place is special. The veil of reality is thin here, forever shattered by the Spellblaze. We are taking advantage of this; we can draw on the power, leeching from this place, to better ourselves, to bring forth the dominion of magic!]], answers = { - {"The world suffered from the Spellblaze enough. Magic must serve people, not enslave them. I will not listen to you!", quick_reply="So be it. Die, and give me your power!"}, - {"What do you propose, then?", jump="quest2"}, + {_t"The world suffered from the Spellblaze enough. Magic must serve people, not enslave them. I will not listen to you!", quick_reply=_t"So be it. Die, and give me your power!"}, + {_t"What do you propose, then?", jump="quest2"}, } } newChat{ id="quest2", - text = [[Let us end this meaningless fight. Have you ever heard of a group of people called the Ziguranth? + text = _t[[Let us end this meaningless fight. Have you ever heard of a group of people called the Ziguranth? These rambling madmen think magic should not be permitted to exist! They fear us; they fear our powers. Let us join forces and crush the fools!]], answers = { - {"Magic shall triumph!", jump="quest3", action=function(npc, player) + {_t"Magic shall triumph!", jump="quest3", action=function(npc, player) if npc:isTalentActive(npc.T_DEMON_PLANE) then npc:forceUseTalent(npc.T_DEMON_PLANE, {ignore_energy=true}) end if player:isTalentActive(player.T_DEMON_PLANE) then player:forceUseTalent(player.T_DEMON_PLANE, {ignore_energy=true}) end if player:hasEffect(player.EFF_DREAMSCAPE) then player:removeEffect(player.EFF_DREAMSCAPE, true) end end}, - {"Magic has a purpose. Those men are wrong, but you seem much worse.", quick_reply="Then you must leave... THIS WORLD! DIE!"}, + {_t"Magic has a purpose. Those men are wrong, but you seem much worse.", quick_reply=_t"Then you must leave... THIS WORLD! DIE!"}, } } newChat{ id="quest3", - text = [[Good. Before your... untimely arrival we were preparing an attack on the Ziguranth main training camp, on the southern beach of the sea of Sash. + text = _t[[Good. Before your... untimely arrival we were preparing an attack on the Ziguranth main training camp, on the southern beach of the sea of Sash. Come with us; let's destroy them! I will open a portal to Zigur and the massacre shall begin!]], answers = { - {"I am ready!", action=function(npc, player) + {_t"I am ready!", action=function(npc, player) if game.zone.short_name ~= "mark-spellblaze" then return "quest3" end npc:disappear() player:grantQuest("anti-antimagic") diff --git a/game/modules/tome/data/chats/derth-attack-over.lua b/game/modules/tome/data/chats/derth-attack-over.lua index ea6f9bf01e2848d9b33812823b1c76c4e27230dc..5391754aeb1284ecca2a718af43b600bcc530b4c 100644 --- a/game/modules/tome/data/chats/derth-attack-over.lua +++ b/game/modules/tome/data/chats/derth-attack-over.lua @@ -18,35 +18,35 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A Halfling comes forth from his hiding place.*#WHITE# + text = _t[[#LIGHT_GREEN#*A Halfling comes forth from his hiding place.*#WHITE# You killed them all? Are we safe now? Oh, please tell me this was a bad dream!]], answers = { - {"Be at ease. I have dispatched those monstrosities. Do you know where they came from or what they wanted?", jump="quest"}, + {_t"Be at ease. I have dispatched those monstrosities. Do you know where they came from or what they wanted?", jump="quest"}, } } newChat{ id="quest", - text = [[From nowhere! From the sky! + text = _t[[From nowhere! From the sky! I do not know. I was tending my crop just outside the town when I heard screaming. As I entered the town, I saw the dark cloud over here. Those... those... things were coming from it in blasts of lightning!]], answers = { - {"It seems they have stopped coming for now. I will look for somebody who could help dispose of this nefarious cloud.", jump="quest2"}, + {_t"It seems they have stopped coming for now. I will look for somebody who could help dispose of this nefarious cloud.", jump="quest2"}, } } newChat{ id="quest2", - text = [[Thank you! You have saved many people today! + text = _t[[Thank you! You have saved many people today! I have heard of rumours of a reclusive town of wise and powerful men somewhere in the mountains. Maybe they could help? If they even exist... There are also those Zigur-something people that claim to fight magic. Why are they not here?!]], answers = { - {"You mean the Ziguranth. That would be me.", cond=function(npc, player) return player:isQuestStatus("antimagic", engine.Quest.DONE) end, jump="zigur"}, - {"I will not let you down.", action=function(npc, player) player:hasQuest("lightning-overload"):done_derth() end}, + {_t"You mean the Ziguranth. That would be me.", cond=function(npc, player) return player:isQuestStatus("antimagic", engine.Quest.DONE) end, jump="zigur"}, + {_t"I will not let you down.", action=function(npc, player) player:hasQuest("lightning-overload"):done_derth() end}, } } newChat{ id="zigur", - text = [[Well then please do something about this evil magic!]], + text = _t[[Well then please do something about this evil magic!]], answers = { - {"I will!", action=function(npc, player) player:hasQuest("lightning-overload"):done_derth() end}, + {_t"I will!", action=function(npc, player) player:hasQuest("lightning-overload"):done_derth() end}, } } diff --git a/game/modules/tome/data/chats/dreadfell-ambush.lua b/game/modules/tome/data/chats/dreadfell-ambush.lua index 56b3563499e420b8fc68983fbc0ab9fb924432b6..ae55fd72004ea894b35e4e10daef1bcd8b99ada4 100644 --- a/game/modules/tome/data/chats/dreadfell-ambush.lua +++ b/game/modules/tome/data/chats/dreadfell-ambush.lua @@ -18,26 +18,26 @@ -- darkgod@te4.org newChat{ id="ambush", - text = [[#VIOLET#*As you come out of the Dreadfell, you encounter a band of orcs*#LAST# + text = _t[[#VIOLET#*As you come out of the Dreadfell, you encounter a band of orcs*#LAST# You! Give us the staff NOW and we might offer you a quick death!]], answers = { - {"What are you talking about?", jump="what"}, - {"Why would you want it?", jump="why"}, - {"#LIGHT_GREEN#[Attack]"}, + {_t"What are you talking about?", jump="what"}, + {_t"Why would you want it?", jump="why"}, + {_t"#LIGHT_GREEN#[Attack]"}, } } newChat{ id="what", - text = [[Do not play dumb with Ukruk! ATTACK!]], + text = _t[[Do not play dumb with Ukruk! ATTACK!]], answers = { - {"#LIGHT_GREEN#[Attack]"}, + {_t"#LIGHT_GREEN#[Attack]"}, } } newChat{ id="why", - text = [[That is not your concern! ATTACK!]], + text = _t[[That is not your concern! ATTACK!]], answers = { - {"#LIGHT_GREEN#[Attack]"}, + {_t"#LIGHT_GREEN#[Attack]"}, } } diff --git a/game/modules/tome/data/chats/east-portal-end.lua b/game/modules/tome/data/chats/east-portal-end.lua index 5d13bcfeb62a4614ede9effeeff707ee0beb2fe4..e60c0a964ce06790733487e44a6ba7db3919fd91 100644 --- a/game/modules/tome/data/chats/east-portal-end.lua +++ b/game/modules/tome/data/chats/east-portal-end.lua @@ -18,13 +18,13 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A robed Human is waiting for you when you step out of the portal.*#WHITE# + text = _t[[#LIGHT_GREEN#*A robed Human is waiting for you when you step out of the portal.*#WHITE# Well met, @playername@! I am Meranas, Herald of Angolwen. I have come here at the request of King Tolak, who worried when you didn't return. We have been watching Tannen for some time, and were pleased to see you reveal his true nature-- and stop him. For this we are grateful, and I think we can pay you back. We have studied his portal research, and if you give me the components I will create the portal for you, here and now!]], answers = { - {"Yes, Tannen was not exactly friendly. I thank you for your help. Here are the components. [hand him the diamond and the athame]", action=function(npc, player) player:hasQuest("east-portal"):create_portal(npc, player) end}, + {_t"Yes, Tannen was not exactly friendly. I thank you for your help. Here are the components. [hand him the diamond and the athame]", action=function(npc, player) player:hasQuest("east-portal"):create_portal(npc, player) end}, } } diff --git a/game/modules/tome/data/chats/eidolon-plane.lua b/game/modules/tome/data/chats/eidolon-plane.lua index 80b1f6d480d9a2bcc080ca9953e52b05c3b3c105..00a0f1397cd6ccb6ca17d716edeef5a2c51019a2 100644 --- a/game/modules/tome/data/chats/eidolon-plane.lua +++ b/game/modules/tome/data/chats/eidolon-plane.lua @@ -20,14 +20,14 @@ if game.zone.from_farportal then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a humanoid shape filled with 'nothing'. It seems to stare at you.*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands a humanoid shape filled with 'nothing'. It seems to stare at you.*#WHITE# I am the Eidolon and you are not welcome here! No matter how you came to this plane, #{bold}#DO NOT COME BACK! NOW BEGONE! #{normal}# .]], answers = { - {"...", action=function() game.level.data.eidolon_exit(false) end}, + {_t"...", action=function() game.level.data.eidolon_exit(false) end}, } } @@ -35,55 +35,55 @@ NOW BEGONE! else newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a humanoid shape filled with 'nothing'. It seems to stare at you.*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands a humanoid shape filled with 'nothing'. It seems to stare at you.*#WHITE# I have brought you here on the instant of your death. I am the Eidolon. I have deemed you worthy of my 'interest'. I will watch your future steps with interest. You may rest here, and when you are ready I will send you back to the material plane. But do not abuse my help. I am not your servant, and someday I might just let you die. As for your probable many questions, they will stay unanswered. I may help, but I am not here to explain why.]], answers = { - {"Thank you. I will rest for a while."}, - {"Thank you. I am ready to go back!", + {_t"Thank you. I will rest for a while."}, + {_t"Thank you. I am ready to go back!", cond=function() return game.level.source_level and not game.level.source_level.no_return_from_eidolon end, action=function() game.level.data.eidolon_exit(false) end }, - {"Thank you, but I fear I will not survive anyway, can you send me back somewhere else please?", + {_t"Thank you, but I fear I will not survive anyway, can you send me back somewhere else please?", cond=function() return game.level.source_level and not game.level.source_level.no_return_from_eidolon and (not game.level.source_level.data or not game.level.source_level.data.no_worldport) end, action=function() game.level.data.eidolon_exit(true) end }, - {"Thank you, but I fear I will not survive anyway, can you send me back somewhere else on the level please?", + {_t"Thank you, but I fear I will not survive anyway, can you send me back somewhere else on the level please?", cond=function() return game.level.source_zone and game.level.source_zone.infinite_dungeon end, action=function() game.level.data.eidolon_exit("teleport") end }, - {"Thank you, I am ready to go back!", + {_t"Thank you, I am ready to go back!", cond=function() return not game.level.source_level or game.level.source_level.no_return_from_eidolon end, jump="jump_error", }, - {"Thank you, but I am weary of this life, I wish no more, please let me go.", jump="die"}, + {_t"Thank you, but I am weary of this life, I wish no more, please let me go.", jump="die"}, } } newChat{ id="jump_error", - text = [[It seems the threads of time and space have been disrupted... + text = _t[[It seems the threads of time and space have been disrupted... I will try to send you to safety.]], answers = { - {"Thanks.", action=function(npc, player) game:changeLevel(1, "wilderness") end}, + {_t"Thanks.", action=function(npc, player) game:changeLevel(1, "wilderness") end}, } } newChat{ id="die", - text = [[#LIGHT_GREEN#*It seems to stare at you in weird way.*#WHITE# + text = _t[[#LIGHT_GREEN#*It seems to stare at you in weird way.*#WHITE# I...had plans for you, but I cannot go against your free will. Know that you had a destiny waiting for you. Are you sure?]], answers = { - {"Just let me go please.", action=function(npc, player) + {_t"Just let me go please.", action=function(npc, player) local src = game.player - game:getPlayer(true):die(game.player, {special_death_msg=("asked the Eidolon to let %s die in peace"):format(game.player.female and "her" or "him")}) + game:getPlayer(true):die(game.player, {special_death_msg=("asked the Eidolon to let %s die in peace"):tformat(game.player.female and _t"her" or _t"him")}) while game.party:findSuitablePlayer() do - game.player:die(src, {special_death_msg="brought down by Eidolon"}) + game.player:die(src, {special_death_msg=_t"brought down by Eidolon"}) end end}, - {"No actually, perhaps life is still worth it!"}, + {_t"No actually, perhaps life is still worth it!"}, } } diff --git a/game/modules/tome/data/chats/elisa-orb-scrying.lua b/game/modules/tome/data/chats/elisa-orb-scrying.lua index e157f52517c61ae91ecb5d634da2fa03a372b78c..c451b92359a131e77b63d072df300dda0e497485 100644 --- a/game/modules/tome/data/chats/elisa-orb-scrying.lua +++ b/game/modules/tome/data/chats/elisa-orb-scrying.lua @@ -58,12 +58,12 @@ end if version == "yeek" then newChat{ id="welcome", - text = [[You immerse your mind in the Way and let knowledge flow in.]], + text = _t[[You immerse your mind in the Way and let knowledge flow in.]], answers = { - {"[Images and knowledge flow in.]", cond=can_auto_id, + {_t"[Images and knowledge flow in.]", cond=can_auto_id, action=auto_id("", "", "[You mentally thank the Way.]") }, - {"[You do not gain any knowledge.]", cond=can_not_auto_id}, + {_t"[You do not gain any knowledge.]", cond=can_not_auto_id}, } } return "welcome" @@ -74,12 +74,12 @@ return "welcome" elseif version == "undead" then newChat{ id="welcome", - text = [[You pause and recall past memories.]], + text = _t[[You pause and recall past memories.]], answers = { - {"[Images and knowledge flow in.]", cond=can_auto_id, + {_t"[Images and knowledge flow in.]", cond=can_auto_id, action=auto_id("", "", "[done]") }, - {"[You do not recognize anything new.]", cond=can_not_auto_id}, + {_t"[You do not recognize anything new.]", cond=can_not_auto_id}, } } return "welcome" @@ -90,21 +90,21 @@ return "welcome" else newChat{ id="welcome", - text = [[Oh, hi @playername@, have you got something new to show me?]], + text = _t[[Oh, hi @playername@, have you got something new to show me?]], answers = { - {"Yes, Elisa, could you have a look at these objects please? [show her the items the orb could not identify]", cond=can_auto_id, + {_t"Yes, Elisa, could you have a look at these objects please? [show her the items the orb could not identify]", cond=can_auto_id, action=auto_id("Let's see what have you got here...\n", "\n\nThat is very nice, @playername@!", "Thank you, Elisa!") }, - {"Err, no... sorry, I just wanted to hear a friendly voice.", jump="friend"}, - {"Not yet sorry!"}, + {_t"Err, no... sorry, I just wanted to hear a friendly voice.", jump="friend"}, + {_t"Not yet sorry!"}, } } newChat{ id="friend", - text = [[#LIGHT_GREEN#*You hear something akin to a muffled giggle*#WHITE# + text = _t[[#LIGHT_GREEN#*You hear something akin to a muffled giggle*#WHITE# Oh, you are #{bold}#SOOOO#{normal}# cute!]], answers = { - {"Goodbye, Elisa!"}, + {_t"Goodbye, Elisa!"}, } } return "welcome" diff --git a/game/modules/tome/data/chats/elisa-shop.lua b/game/modules/tome/data/chats/elisa-shop.lua index cbaed011dc7a323314cb32e40a6e69e61bc43f6f..19700aeca7abdc3049df38f4ef4caf39d309d0a4 100644 --- a/game/modules/tome/data/chats/elisa-shop.lua +++ b/game/modules/tome/data/chats/elisa-shop.lua @@ -40,12 +40,12 @@ local function auto_id(npc, player) -- Create the chat newChat{ id="id_list", - text = [[Let's see what have you got here... -]]..table.concat(list, "\n")..[[ + text = ([[Let's see what have you got here... +%s -That is very nice, @playername@!]], +That is very nice, @playername@!]]):tformat(table.concat(list, "\n")), answers = { - {"Thank you, Elisa!", jump=do_quest and "quest" or nil}, + {_t"Thank you, Elisa!", jump=do_quest and "quest" or nil}, } } @@ -54,21 +54,21 @@ That is very nice, @playername@!]], end newChat{ id="welcome", - text = [[Hello friend, what can I do for you?]], + text = _t[[Hello friend, what can I do for you?]], answers = { - {"Could you have a look at these objects, please? [show her your unidentified items]", cond=can_auto_id, action=auto_id}, - {"Nothing, goodbye."}, + {_t"Could you have a look at these objects, please? [show her your unidentified items]", cond=can_auto_id, action=auto_id}, + {_t"Nothing, goodbye."}, } } newChat{ id="quest", - text = [[Wait, @playername@, you seem to be quite the adventurer. Maybe we can help one another. + text = _t[[Wait, @playername@, you seem to be quite the adventurer. Maybe we can help one another. You see, I #{bold}#LOOOVVVEEEE#{normal}# learning new lore and finding old artifacts of power, but I am not exactly an adventurer and I would surely get killed out there. So take this orb (#LIGHT_GREEN#*she gives you an orb of scrying*#WHITE#). You can use it to talk to me from anywhere in the world! This way you can show me your new shiny findings! I get to see many interesting things, and you get to know what your items do. We both win! Isn't it sweet? Oh yes, the orb will also identify mundane items for you, as long as you carry it.]], answers = { - {"Woah, thanks, Elisa. This is really nice!", action=function(npc, player) + {_t"Woah, thanks, Elisa. This is really nice!", action=function(npc, player) player:setQuestStatus("first-artifact", engine.Quest.COMPLETED) local orb = game.zone:makeEntityByName(game.level, "object", "ORB_SCRYING") diff --git a/game/modules/tome/data/chats/escort-quest-start.lua b/game/modules/tome/data/chats/escort-quest-start.lua index 5747df9e38a6a2ce1e3ac1ee48fea72c04828aff..7f97ed6f7e5876b46af53873789818ce4e499ed2 100644 --- a/game/modules/tome/data/chats/escort-quest-start.lua +++ b/game/modules/tome/data/chats/escort-quest-start.lua @@ -24,17 +24,17 @@ newChat{ id="welcome", text = text, answers = { - {"#LIGHT_GREEN#[Pretend to help but when it is time you will use a Ziguranth technique to make the portal fizzle. @npcname@ will be sent to Zigur to be 'dealt with' properly.]#WHITE#\nLead on; I will protect you.", action=function(npc, player) + {_t"#LIGHT_GREEN#[Pretend to help but when it is time you will use a Ziguranth technique to make the portal fizzle. @npcname@ will be sent to Zigur to be 'dealt with' properly.]#WHITE#\nLead on; I will protect you.", action=function(npc, player) player:hasQuest(npc.quest_id).to_zigur = true npc.ai_state.tactic_leash = 100 game.party:addMember(npc, { control="order", type="escort", - title="Escort", + title=_t"Escort", orders = {escort_portal=true, escort_rest=true}, }) end}, - {"Go away; I do not help filthy arcane users!", action=function(npc, player) + {_t"Go away; I do not help filthy arcane users!", action=function(npc, player) game.player:registerEscorts("lost") npc:disappear() npc:removed() @@ -52,26 +52,26 @@ newChat{ id="welcome", text = text, answers = { - {"Lead on; I will protect you.", action=function(npc, player) + {_t"Lead on; I will protect you.", action=function(npc, player) npc.ai_state.tactic_leash = 100 game.party:addMember(npc, { control="order", type="escort", - title="Escort", + title=_t"Escort", orders = {escort_portal=true, escort_rest=true}, }) end}, - {"#LIGHT_GREEN#[Pretend to help but when it is time you will use a technique to make the portal fizzle. @npcname@ will be sent to Zigur to be 'dealt with' properly.]#WHITE#\nLead on; I will protect you.", action=function(npc, player) + {_t"#LIGHT_GREEN#[Pretend to help but when it is time you will use a technique to make the portal fizzle. @npcname@ will be sent to Zigur to be 'dealt with' properly.]#WHITE#\nLead on; I will protect you.", action=function(npc, player) player:hasQuest(npc.quest_id).to_zigur = true npc.ai_state.tactic_leash = 100 game.party:addMember(npc, { control="order", type="escort", - title="Escort", + title=_t"Escort", orders = {escort_portal=true, escort_rest=true}, }) end}, - {"Go away; I do not care for the weak.", action=function(npc, player) + {_t"Go away; I do not care for the weak.", action=function(npc, player) game.player:registerEscorts("lost") npc:disappear() npc:removed() @@ -87,16 +87,16 @@ newChat{ id="welcome", text = text, answers = { - {"Lead on; I will protect you.", action=function(npc, player) + {_t"Lead on; I will protect you.", action=function(npc, player) npc.ai_state.tactic_leash = 100 game.party:addMember(npc, { control="order", type="escort", - title="Escort", + title=_t"Escort", orders = {escort_portal=true, escort_rest=true}, }) end}, - {"Go away; I do not care for the weak.", action=function(npc, player) + {_t"Go away; I do not care for the weak.", action=function(npc, player) game.player:registerEscorts("lost") npc:disappear() npc:removed() diff --git a/game/modules/tome/data/chats/escort-quest.lua b/game/modules/tome/data/chats/escort-quest.lua index b68b8b0a579af83d6288527a1d9f59f45868ad00..88e4b37652ddc99142ac5981bebfef31a58d2306 100644 --- a/game/modules/tome/data/chats/escort-quest.lua +++ b/game/modules/tome/data/chats/escort-quest.lua @@ -218,20 +218,20 @@ if quest.to_zigur and reward.antimagic then reward = reward.antimagic reward.is_ game.player:registerEscorts(quest.to_zigur and "zigur" or "saved") -local saves_name = { mental="mental", spell="spell", phys="physical"} +local saves_name = { mental=_t"mental", spell=_t"spell", phys=_t"physical"} local saves_tooltips = { mental="MENTAL", spell="SPELL", phys="PHYS"} local function generate_rewards() local answers = {} if reward.stats then for i = 1, #npc.stats_def do if reward.stats[i] then - local doit = function(npc, player) game.party:reward("Select the party member to receive the reward:", function(player) + local doit = function(npc, player) game.party:reward(_t"Select the party member to receive the reward:", function(player) player.inc_stats[i] = (player.inc_stats[i] or 0) + reward.stats[i] player:onStatChange(i, reward.stats[i]) player.changed = true - player:hasQuest(npc.quest_id).reward_message = ("improved %s by +%d"):format(npc.stats_def[i].name, reward.stats[i]) + player:hasQuest(npc.quest_id).reward_message = ("improved %s by +%d"):tformat(npc.stats_def[i].name, reward.stats[i]) end) end - answers[#answers+1] = {("[Improve %s by +%d]"):format(npc.stats_def[i].name, reward.stats[i]), + answers[#answers+1] = {("[Improve %s by +%d]"):tformat(npc.stats_def[i].name, reward.stats[i]), jump="done", action=doit, on_select=function(npc, player) @@ -244,12 +244,12 @@ local function generate_rewards() end if reward.saves then for save, v in pairs(reward.saves) do - local doit = function(npc, player) game.party:reward("Select the party member to receive the reward:", function(player) + local doit = function(npc, player) game.party:reward(_t"Select the party member to receive the reward:", function(player) player:attr("combat_"..save.."resist", v) player.changed = true - player:hasQuest(npc.quest_id).reward_message = ("improved %s save by +%d"):format(saves_name[save], v) + player:hasQuest(npc.quest_id).reward_message = ("improved %s save by +%d"):tformat(saves_name[save], v) end) end - answers[#answers+1] = {("[Improve %s save by +%d]"):format(saves_name[save], v), + answers[#answers+1] = {("[Improve %s save by +%d]"):tformat(saves_name[save], v), jump="done", action=doit, on_select=function(npc, player) @@ -265,21 +265,21 @@ local function generate_rewards() local t = npc:getTalentFromId(tid) level = math.min(t.points - game.player:getTalentLevelRaw(tid), level) if level > 0 then - local doit = function(npc, player) game.party:reward("Select the party member to receive the reward:", function(player) + local doit = function(npc, player) game.party:reward(_t"Select the party member to receive the reward:", function(player) if game.player:knowTalentType(t.type[1]) == nil then player:setTalentTypeMastery(t.type[1], 1.0) end player:learnTalent(tid, true, level, {no_unlearn=true}) if t.hide then player.__show_special_talents = player.__show_special_talents or {} player.__show_special_talents[tid] = true end - player:hasQuest(npc.quest_id).reward_message = ("%s talent %s (+%d level(s))"):format(game.player:knowTalent(tid) and "improved" or "learnt", t.name, level) + player:hasQuest(npc.quest_id).reward_message = ("%s talent %s (+%d level(s))"):tformat(game.player:knowTalent(tid) and _t"improved" or _t"learnt", t.name, level) end) end answers[#answers+1] = { - ("[%s talent %s (+%d level(s))]"):format(game.player:knowTalent(tid) and "Improve" or "Learn", t.name, level), + ("[%s talent %s (+%d level(s))]"):tformat(game.player:knowTalent(tid) and _t"Improve" or _t"Learn", t.name, level), jump="done", action=doit, on_select=function(npc, player) game.tooltip_x, game.tooltip_y = 1, 1 local mastery = nil if player:knowTalentType(t.type[1]) == nil then mastery = 1.0 end - game:tooltipDisplayAtMap(game.w, game.h, "#GOLD#"..t.name.."#LAST#\n"..tostring(player:getTalentFullDescription(t, 1, nil, mastery))) + game:tooltipDisplayAtMap(game.w, game.h, ("#GOLD#%s#LAST#\n%s"):tformat(t.name,tostring(player:getTalentFullDescription(t, 1, nil, mastery)))) end, } end @@ -289,17 +289,17 @@ local function generate_rewards() for tt, mastery in pairs(reward.types) do if game.player:knowTalentType(tt) == nil then local tt_def = npc:getTalentTypeFrom(tt) local cat = tt_def.type:gsub("/.*", "") - local doit = function(npc, player) game.party:reward("Select the party member to receive the reward:", function(player) + local doit = function(npc, player) game.party:reward(_t"Select the party member to receive the reward:", function(player) if player:knowTalentType(tt) == nil then player:setTalentTypeMastery(tt, mastery - 1 + player:getTalentTypeMastery(tt)) end player:learnTalentType(tt, false) - player:hasQuest(npc.quest_id).reward_message = ("gained talent category %s (at mastery %0.2f)"):format(cat:capitalize().." / "..tt_def.name:capitalize(), mastery) + player:hasQuest(npc.quest_id).reward_message = ("gained talent category %s (at mastery %0.2f)"):tformat(_t(cat):capitalize().." / "..tt_def.name:capitalize(), mastery) end) end - answers[#answers+1] = {("[Allow training of talent category %s (at mastery %0.2f)]"):format(cat:capitalize().." / "..tt_def.name:capitalize(), mastery), + answers[#answers+1] = {("[Allow training of talent category %s (at mastery %0.2f)]"):tformat(_t(cat):capitalize().." / "..tt_def.name:capitalize(), mastery), jump="done", action=doit, on_select=function(npc, player) game.tooltip_x, game.tooltip_y = 1, 1 - game:tooltipDisplayAtMap(game.w, game.h, "#GOLD#"..(cat:capitalize().." / "..tt_def.name:capitalize()).."#LAST#\n"..tt_def.description) + game:tooltipDisplayAtMap(game.w, game.h, ("#GOLD#%s / %s#LAST#\n%s"):tformat(_t(cat):capitalize(), tt_def.name:capitalize(), tt_def.description)) end, } end end @@ -320,17 +320,17 @@ local function generate_rewards() end newChat{ id="welcome", - text = reward.is_antimagic and [[At the last moment you invoke the power of nature. The portal fizzles and transports @npcname@ to Zigur. + text = reward.is_antimagic and _t[[At the last moment you invoke the power of nature. The portal fizzles and transports @npcname@ to Zigur. You can feel Nature thanking you.]] or - [[Thank you, my friend. I do not think I would have survived without you. + _t[[Thank you, my friend. I do not think I would have survived without you. Please let me reward you:]], answers = generate_rewards(), } newChat{ id="done", - text = [[There you go. Farewell!]], + text = _t[[There you go. Farewell!]], answers = { - {"Thank you."}, + {_t"Thank you."}, }, } diff --git a/game/modules/tome/data/chats/fallen-aeryn.lua b/game/modules/tome/data/chats/fallen-aeryn.lua index 992e5caaef4c302ce78d14a871032251b60acb2b..ae1cd29d609aa55989c94f370f3098a6d78abdd4 100644 --- a/game/modules/tome/data/chats/fallen-aeryn.lua +++ b/game/modules/tome/data/chats/fallen-aeryn.lua @@ -27,27 +27,27 @@ local function spare(npc, player) player:setQuestStatus("high-peak", engine.Quest.COMPLETED, "spared-aeryn") npc.die = nil game.level:removeEntity(npc) - game.logPlayer(player, "%s grabs her amulet and disappears in a whirl of arcane energies.", npc.name:capitalize()) + game.logPlayer(player, "%s grabs her amulet and disappears in a whirl of arcane energies.", npc:getName():capitalize()) end newChat{ id="welcome", - text = [[#LIGHT_GREEN#*She lies nearly dead at your feet*#WHITE# + text = _t[[#LIGHT_GREEN#*She lies nearly dead at your feet*#WHITE# So, now you will kill me and complete the cycle of destruction?]], answers = { - {"What are you talking about? Why did you attack me?", jump="what"}, - {"Speak and I might spare you. Why did you attack me?", jump="what"}, - {"[kill her]", action=kill}, + {_t"What are you talking about? Why did you attack me?", jump="what"}, + {_t"Speak and I might spare you. Why did you attack me?", jump="what"}, + {_t"[kill her]", action=kill}, } } newChat{ id="what", - text = [[You.. you do not know? + text = _t[[You.. you do not know? A few hours after you entered this place a raid of orcs fell upon us. They were not alone -- demons walked among them. We were overwhelmed! Utterly destroyed! My land is no more! All because you could not stop them at the Charred Scar! You failed us! People died to protect you, and you failed! #LIGHT_GREEN#*She starts to weep...*#WHITE#]], answers = { - {"I know my mistakes and I intend to correct them. Please let me pass. I cannot save your people, but I can make their deaths mean something!", action=spare}, - {"[kill her]", action=kill}, + {_t"I know my mistakes and I intend to correct them. Please let me pass. I cannot save your people, but I can make their deaths mean something!", action=spare}, + {_t"[kill her]", action=kill}, } } diff --git a/game/modules/tome/data/chats/gates-of-morning-main.lua b/game/modules/tome/data/chats/gates-of-morning-main.lua index 6963921f4ec0800660829727d0d67f72f0e2f250..ac924b3c9646ff66477a66f8b82b91a5cd4016e0 100644 --- a/game/modules/tome/data/chats/gates-of-morning-main.lua +++ b/game/modules/tome/data/chats/gates-of-morning-main.lua @@ -18,69 +18,69 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[What may I do for you?]], + text = _t[[What may I do for you?]], answers = { - {"Lady Aeryn, at last I am back home! [tell her your story]", jump="return", cond=function(npc, player) return player:hasQuest("start-sunwall") and player:isQuestStatus("start-sunwall", engine.Quest.COMPLETED, "slazish") and not player:isQuestStatus("start-sunwall", engine.Quest.COMPLETED, "return") end, action=function(npc, player) player:setQuestStatus("start-sunwall", engine.Quest.COMPLETED, "return") end}, - {"Tell me more about the Gates of Morning.", jump="explain-gates", cond=function(npc, player) return player.faction ~= "sunwall" end}, - {"Before I came here, I happened upon members of the Sunwall in Maj'Eyal. Do you know of this?.", jump="sunwall_west", cond=function(npc, player) return game.state.found_sunwall_west and not npc.been_asked_sunwall_west end, action=function(npc, player) npc.been_asked_sunwall_west = true end}, - {"I need help in my hunt for clues about the staff.", jump="clues", cond=function(npc, player) return game.state:isAdvanced() and not player:hasQuest("orc-pride") end}, - {"I have destroyed the leaders of all the Orc Prides.", jump="prides-dead", cond=function(npc, player) return player:isQuestStatus("orc-pride", engine.Quest.COMPLETED) end}, - {"I am back from the Charred Scar, where the orcs took the staff.", jump="charred-scar", cond=function(npc, player) return player:hasQuest("charred-scar") and player:hasQuest("charred-scar"):isCompleted() end}, - {"A dying paladin gave me this map; something about orc breeding pits. [tell her the story]", jump="orc-breeding-pits", cond=function(npc, player) return player:hasQuest("orc-breeding-pits") and player:isQuestStatus("orc-breeding-pits", engine.Quest.COMPLETED, "wuss-out") and not player:isQuestStatus("orc-breeding-pits", engine.Quest.COMPLETED, "wuss-out-done") end}, - {"Sorry, I have to go!"}, + {_t"Lady Aeryn, at last I am back home! [tell her your story]", jump="return", cond=function(npc, player) return player:hasQuest("start-sunwall") and player:isQuestStatus("start-sunwall", engine.Quest.COMPLETED, "slazish") and not player:isQuestStatus("start-sunwall", engine.Quest.COMPLETED, "return") end, action=function(npc, player) player:setQuestStatus("start-sunwall", engine.Quest.COMPLETED, "return") end}, + {_t"Tell me more about the Gates of Morning.", jump="explain-gates", cond=function(npc, player) return player.faction ~= "sunwall" end}, + {_t"Before I came here, I happened upon members of the Sunwall in Maj'Eyal. Do you know of this?.", jump="sunwall_west", cond=function(npc, player) return game.state.found_sunwall_west and not npc.been_asked_sunwall_west end, action=function(npc, player) npc.been_asked_sunwall_west = true end}, + {_t"I need help in my hunt for clues about the staff.", jump="clues", cond=function(npc, player) return game.state:isAdvanced() and not player:hasQuest("orc-pride") end}, + {_t"I have destroyed the leaders of all the Orc Prides.", jump="prides-dead", cond=function(npc, player) return player:isQuestStatus("orc-pride", engine.Quest.COMPLETED) end}, + {_t"I am back from the Charred Scar, where the orcs took the staff.", jump="charred-scar", cond=function(npc, player) return player:hasQuest("charred-scar") and player:hasQuest("charred-scar"):isCompleted() end}, + {_t"A dying paladin gave me this map; something about orc breeding pits. [tell her the story]", jump="orc-breeding-pits", cond=function(npc, player) return player:hasQuest("orc-breeding-pits") and player:isQuestStatus("orc-breeding-pits", engine.Quest.COMPLETED, "wuss-out") and not player:isQuestStatus("orc-breeding-pits", engine.Quest.COMPLETED, "wuss-out-done") end}, + {_t"Sorry, I have to go!"}, } } newChat{ id="return", - text = [[@playername@! We thought you had died in the portal explosion. I am glad we were wrong. You saved the Sunwall. + text = _t[[@playername@! We thought you had died in the portal explosion. I am glad we were wrong. You saved the Sunwall. The news about the staff is troubling. Ah well, please at least take time to rest for a while.]], answers = { - {"I shall, thank you, my lady.", jump="welcome"}, + {_t"I shall, thank you, my lady.", jump="welcome"}, }, } newChat{ id="explain-gates", - text = [[There are two main groups in the population here, Humans and Elves. + text = _t[[There are two main groups in the population here, Humans and Elves. Humans came here in the Age of Pyre. Our ancestors were part of a Mardrop expedition to find what had happened to the Naloren lands that sunk under the sea. Their ship was wrecked and the survivors landed on this continent. They came across a group of elves, seemingly native to those lands, and befriended them - founding the Sunwall and the Gates of Morning. Then the orc pride came and we have been fighting for our survival ever since.]], answers = { - {"Thank you, my lady.", jump="welcome"}, + {_t"Thank you, my lady.", jump="welcome"}, }, } newChat{ id="sunwall_west", - text = [[Ahh, so they survived? That is good news...]], + text = _t[[Ahh, so they survived? That is good news...]], answers = { - {"Go on.", jump="sunwall_west2"}, - {"Well, actually...", jump="sunwall_west2", cond=function(npc, player) return game.state.found_sunwall_west_died end}, + {_t"Go on.", jump="sunwall_west2"}, + {_t"Well, actually...", jump="sunwall_west2", cond=function(npc, player) return game.state.found_sunwall_west_died end}, }, } newChat{ id="sunwall_west2", - text = [[The people you saw are likely the volunteers of Zemekkys' early experiments regarding the farportals. + text = _t[[The people you saw are likely the volunteers of Zemekkys' early experiments regarding the farportals. He is a mage who resides here in the Sunwall, eccentric but skilled, who believes that creation of a new farportal to Maj'Eyal is possible. Aside from a few early attempts with questionable results, he hasn't had much luck. Still, it's gladdening to hear that the volunteers for his experiments live, regardless of their location. We are all still under the same Sun, after all. Actually... maybe it would benefit you if you meet Zemekkys. He would surely be intrigued by that Orb of Many Ways you possess. He lives in a small house just to the north.]], answers = { - {"Maybe I'll visit him. Thank you.", jump="welcome"}, + {_t"Maybe I'll visit him. Thank you.", jump="welcome"}, }, } newChat{ id="prides-dead", - text = [[The news has indeed reached me. I could scarce believe it, so long have we been at war with the Pride. + text = _t[[The news has indeed reached me. I could scarce believe it, so long have we been at war with the Pride. Now they are dead? At the hands of just one @playerdescriptor.race@? Truly I am amazed by your power. While you were busy bringing an end to the orcs, we managed to discover some parts of the truth from a captive orc. He talked about the shield protecting the High Peak. It seems to be controlled by "orbs of command" which the masters of the Prides had in their possession. He also said the only way to enter the peak and de-activate the shield is through the "slime tunnels", located somewhere in one of the Prides, probably Grushnak. ]], answers = { - {"Thanks, my lady. I have not been able to find all of the orbs of command in my travels; could you have some of your men search for me?", + {_t"Thanks, my lady. I have not been able to find all of the orbs of command in my travels; could you have some of your men search for me?", jump="prides-dead-orbs-missing", cond=function(npc, player) return not (game.party:findInAllPartyInventoriesBy("define_as", "ORB_DRAGON") and game.party:findInAllPartyInventoriesBy("define_as", "ORB_DESTRUCTION") and game.party:findInAllPartyInventoriesBy("define_as", "ORB_UNDEATH") and game.party:findInAllPartyInventoriesBy("define_as", "ORB_ELEMENTS")) end }, - {"Thanks, my lady. I will look for the tunnel and venture inside the Peak.", + {_t"Thanks, my lady. I will look for the tunnel and venture inside the Peak.", cond=function(npc, player) return (game.party:findInAllPartyInventoriesBy("define_as", "ORB_DRAGON") and game.party:findInAllPartyInventoriesBy("define_as", "ORB_DESTRUCTION") and game.party:findInAllPartyInventoriesBy("define_as", "ORB_UNDEATH") and game.party:findInAllPartyInventoriesBy("define_as", "ORB_ELEMENTS")) end, action=function(npc, player) player:setQuestStatus("orc-pride", engine.Quest.DONE) @@ -90,26 +90,26 @@ He also said the only way to enter the peak and de-activate the shield is throug } newChat{ id="prides-dead-orbs-missing", - text = [[I have already sent parties to clear out the remainder of the prides as you progressed, and have instructed to keep a sharp eye out for any orbs of command you may have missed. + text = _t[[I have already sent parties to clear out the remainder of the prides as you progressed, and have instructed to keep a sharp eye out for any orbs of command you may have missed. Which do you not have? I can check with the parties if they found any. Our sources indicate that you should have four: one of Undeath, one of Destruction, one of Dragons, and one of Elemental might.]], answers = { - {"The orb of Undeath.", + {_t"The orb of Undeath.", jump="prides-dead-orbs-missing-undeath", cond=function(npc, player) return not (game.party:findInAllPartyInventoriesBy("define_as", "ORB_UNDEATH")) end }, - {"The orb of Destruction.", + {_t"The orb of Destruction.", jump="prides-dead-orbs-missing-destruction", cond=function(npc, player) return not (game.party:findInAllPartyInventoriesBy("define_as", "ORB_DESTRUCTION")) end }, - {"The orb of Dragons.", + {_t"The orb of Dragons.", jump="prides-dead-orbs-missing-dragon", cond=function(npc, player) return not (game.party:findInAllPartyInventoriesBy("define_as", "ORB_DRAGON")) end }, - {"The orb of Elements.", + {_t"The orb of Elements.", jump="prides-dead-orbs-missing-elements", cond=function(npc, player) return not (game.party:findInAllPartyInventoriesBy("define_as", "ORB_ELEMENTS")) end }, - {"Thanks, my lady, that is all of them. I will look for the tunnel and venture inside the Peak.", + {_t"Thanks, my lady, that is all of them. I will look for the tunnel and venture inside the Peak.", cond=function(npc, player) return (game.party:findInAllPartyInventoriesBy("define_as", "ORB_DRAGON") and game.party:findInAllPartyInventoriesBy("define_as", "ORB_DESTRUCTION") and game.party:findInAllPartyInventoriesBy("define_as", "ORB_UNDEATH") and game.party:findInAllPartyInventoriesBy("define_as", "ORB_ELEMENTS")) end, action=function(npc, player) player:setQuestStatus("orc-pride", engine.Quest.DONE) @@ -119,9 +119,9 @@ newChat{ id="prides-dead-orbs-missing", } newChat{ id="prides-dead-orbs-missing-undeath", - text = [[Ah yes, my men have found that in Rak'Shor Pride. Here: ]], + text = _t[[Ah yes, my men have found that in Rak'Shor Pride. Here: ]], answers = { - {"Thank you, my lady.", + {_t"Thank you, my lady.", jump="prides-dead-orbs-missing", action = function(npc, player) local orb = game.zone:makeEntityByName(game.level, "object", "ORB_UNDEATH", true) @@ -133,9 +133,9 @@ newChat{ id="prides-dead-orbs-missing-undeath", } newChat{ id="prides-dead-orbs-missing-elements", - text = [[Ah yes, my men have found that in Vor Pride. Here: ]], + text = _t[[Ah yes, my men have found that in Vor Pride. Here: ]], answers = { - {"Thank you, my lady.", + {_t"Thank you, my lady.", jump="prides-dead-orbs-missing", action = function(npc, player) local orb = game.zone:makeEntityByName(game.level, "object", "ORB_ELEMENTS", true) @@ -147,9 +147,9 @@ newChat{ id="prides-dead-orbs-missing-elements", } newChat{ id="prides-dead-orbs-missing-destruction", - text = [[Ah yes, my men have found that in Grushnak Pride. Here: ]], + text = _t[[Ah yes, my men have found that in Grushnak Pride. Here: ]], answers = { - {"Thank you, my lady.", + {_t"Thank you, my lady.", jump="prides-dead-orbs-missing", action = function(npc, player) local orb = game.zone:makeEntityByName(game.level, "object", "ORB_DESTRUCTION", true) @@ -161,9 +161,9 @@ newChat{ id="prides-dead-orbs-missing-destruction", } newChat{ id="prides-dead-orbs-missing-dragon", - text = [[Ah yes, my men have found that in Gorbat Pride. Here: ]], + text = _t[[Ah yes, my men have found that in Gorbat Pride. Here: ]], answers = { - {"Thank you, my lady.", + {_t"Thank you, my lady.", jump="prides-dead-orbs-missing", action = function(npc, player) local orb = game.zone:makeEntityByName(game.level, "object", "ORB_DRAGON", true) @@ -175,7 +175,7 @@ newChat{ id="prides-dead-orbs-missing-dragon", } newChat{ id="clues", - text = [[As much as I would like to help, our forces are already spread too thin; we cannot provide you with direct assistance. + text = _t[[As much as I would like to help, our forces are already spread too thin; we cannot provide you with direct assistance. But I might be able to help you by explaining how the Pride is organised. Recently we have heard the Pride speaking about a new master, or masters. They might be the ones behind that mysterious staff of yours. We believe that the heart of their power is the High Peak, in the center of the continent. But it is inaccessible and covered by some kind of shield. @@ -187,7 +187,7 @@ The known bastions of the Pride are: - Grushnak Pride, on the eastern slope of the High Peak]], -- - A group of corrupted humans live in Eastport on the southern coastline; they have contact with the Pride answers = { - {"I will investigate them.", jump="relentless", action=function(npc, player) + {_t"I will investigate them.", jump="relentless", action=function(npc, player) player:setQuestStatus("orc-hunt", engine.Quest.DONE) player:grantQuest("orc-pride") game.logPlayer(game.player, "Aeryn points to the known locations on your map.") @@ -196,11 +196,11 @@ The known bastions of the Pride are: } newChat{ id="relentless", - text = [[One more bit of aid I might give you before you go. Your tale has moved me, and the very stars shine with approval of your relentless pursuit. Take their blessing, and let nothing stop you in your quest. + text = _t[[One more bit of aid I might give you before you go. Your tale has moved me, and the very stars shine with approval of your relentless pursuit. Take their blessing, and let nothing stop you in your quest. #LIGHT_GREEN#*She touches your forehead with one cool hand, and you feel a surge of power* ]], answers = { - {"I'll leave not a single orc standing.", jump="welcome", action=function(npc, player) + {_t"I'll leave not a single orc standing.", jump="welcome", action=function(npc, player) player:learnTalent(player.T_RELENTLESS_PURSUIT, true, 1, {no_unlearn=true}) game.logPlayer(game.player, "#VIOLET#You have learned the talent Relentless Pursuit.") end}, @@ -208,22 +208,22 @@ newChat{ id="relentless", } newChat{ id="charred-scar", - text = [[I have heard about that; good men lost their lives for this. I hope it was worth it.]], + text = _t[[I have heard about that; good men lost their lives for this. I hope it was worth it.]], answers = { - {"Yes, my lady, they delayed the orcs so that I could get to the heart of the volcano. *#LIGHT_GREEN#Tell her what happened#WHITE#*", jump="charred-scar-success", + {_t"Yes, my lady, they delayed the orcs so that I could get to the heart of the volcano. *#LIGHT_GREEN#Tell her what happened#WHITE#*", jump="charred-scar-success", cond=function(npc, player) return player:isQuestStatus("charred-scar", engine.Quest.COMPLETED, "stopped") end, }, - {"I am afraid I was too late, but I still have some valuable information. *#LIGHT_GREEN#Tell her what happened#WHITE#*", jump="charred-scar-fail", + {_t"I am afraid I was too late, but I still have some valuable information. *#LIGHT_GREEN#Tell her what happened#WHITE#*", jump="charred-scar-fail", cond=function(npc, player) return player:isQuestStatus("charred-scar", engine.Quest.COMPLETED, "not-stopped") end, }, }, } newChat{ id="charred-scar-success", - text = [[Sorcerers? I have never heard of them. There were rumours about a new master of the Pride, but it seems they have two. + text = _t[[Sorcerers? I have never heard of them. There were rumours about a new master of the Pride, but it seems they have two. Thank you for everything. You must continue your hunt now that you know what to look for.]], answers = { - {"I will avenge your men.", action=function(npc, player) + {_t"I will avenge your men.", action=function(npc, player) player:setQuestStatus("charred-scar", engine.Quest.DONE) game:unlockBackground("aeryn", "High Sun Paladin Aeryn") end} @@ -231,17 +231,17 @@ Thank you for everything. You must continue your hunt now that you know what to } newChat{ id="charred-scar-fail", - text = [[Sorcerers? I have never heard of them. There were rumours about a new master of the Pride, but it seems they have two. + text = _t[[Sorcerers? I have never heard of them. There were rumours about a new master of the Pride, but it seems they have two. I am afraid with the power they gained today they will be even harder to stop, but we do not have a choice.]], answers = { - {"I will avenge your men.", action=function(npc, player) player:setQuestStatus("charred-scar", engine.Quest.DONE) end} + {_t"I will avenge your men.", action=function(npc, player) player:setQuestStatus("charred-scar", engine.Quest.DONE) end} }, } newChat{ id="orc-breeding-pits", - text = [[Ah! This is wonderful! Finally a ray of hope amidst the darkness. I will assign my best troops to this. Thank you, @playername@ - take this as a token of gratitude.]], + text = _t[[Ah! This is wonderful! Finally a ray of hope amidst the darkness. I will assign my best troops to this. Thank you, @playername@ - take this as a token of gratitude.]], answers = { - {"Good luck.", action=function(npc, player) + {_t"Good luck.", action=function(npc, player) player:setQuestStatus("orc-breeding-pits", engine.Quest.COMPLETED, "wuss-out-done") player:setQuestStatus("orc-breeding-pits", engine.Quest.COMPLETED) diff --git a/game/modules/tome/data/chats/gates-of-morning-welcome.lua b/game/modules/tome/data/chats/gates-of-morning-welcome.lua index 6b68a5b1dbaec76f8fe07e5beac52093eb86e7b5..8b3205f29cb8fb2c1ba03504a0cd9743381a8915 100644 --- a/game/modules/tome/data/chats/gates-of-morning-welcome.lua +++ b/game/modules/tome/data/chats/gates-of-morning-welcome.lua @@ -18,38 +18,38 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a beautiful woman clad in shining golden armour*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands a beautiful woman clad in shining golden armour*#WHITE# Stop! You are clearly a stranger! Where do you come from? The Gates of Morning are the last bastion of freedom in these lands, so who are you? A spy?]], answers = { - {"My lady, I am indeed a stranger in these lands. I come from the west, from Maj'Eyal.", jump="from", + {_t"My lady, I am indeed a stranger in these lands. I come from the west, from Maj'Eyal.", jump="from", cond=function(npc, player) return player:hasQuest("strange-new-world") and player:hasQuest("strange-new-world"):isCompleted("helped-fillarel") end}, - {"Sorry, I have to go!"}, + {_t"Sorry, I have to go!"}, } } newChat{ id="from", - text = [[Maj'Eyal! For many years have we tried to contact your people. We always failed. + text = _t[[Maj'Eyal! For many years have we tried to contact your people. We always failed. In any event, what is your purpose here?]], answers = { - {"It seems that I am stranded in these unfamiliar lands. #LIGHT_GREEN#*Tell her about your hunt for orcs and your encounter with Fillarel.*#WHITE#", jump="orcs"}, - {"Sun Paladins? What do you mean? We know of no such thing where I come from.", jump="sun-paladins", cond=function() return profile.mod.allow_build.divine_sun_paladin end}, + {_t"It seems that I am stranded in these unfamiliar lands. #LIGHT_GREEN#*Tell her about your hunt for orcs and your encounter with Fillarel.*#WHITE#", jump="orcs"}, + {_t"Sun Paladins? What do you mean? We know of no such thing where I come from.", jump="sun-paladins", cond=function() return profile.mod.allow_build.divine_sun_paladin end}, } } newChat{ id="sun-paladins", - text = [[We are the mighty warriors of the Sunwall, channeling the power of the Sun and merging it with martial training. + text = _t[[We are the mighty warriors of the Sunwall, channeling the power of the Sun and merging it with martial training. For hundreds of years, we stood between the Orc Pride and the free people. Our numbers are diminishing, but we will stand firm until our last breath.]], answers = { - {"You have a noble spirit, my lady.", jump="from"}, + {_t"You have a noble spirit, my lady.", jump="from"}, } } newChat{ id="orcs", - text = [[Orcs! Ah! Well then this is your lucky day. This whole continent is swarming with Orcs. They have united as the Orc Pride and, according to rumour, their masters are powerful. + text = _t[[Orcs! Ah! Well then this is your lucky day. This whole continent is swarming with Orcs. They have united as the Orc Pride and, according to rumour, their masters are powerful. They roam the lands freely, ever assaulting us. @playername@, you have helped one of ours. I grant you access to the Gates of Morning and name you friend of the Sunwall.]], answers = { - {"Thank you, my lady.", action=function(npc, player) + {_t"Thank you, my lady.", action=function(npc, player) world:gainAchievement("STRANGE_NEW_WORLD", game.player) player:setQuestStatus("strange-new-world", engine.Quest.DONE) local spot = game.level:pickSpot{type="npc", subtype="aeryn-main"} diff --git a/game/modules/tome/data/chats/golbug-explains.lua b/game/modules/tome/data/chats/golbug-explains.lua index 12590ec7b83041f22e56d0182744da429460ce0e..32623fb4f272c80fed1a7b661b44cae8e1a6f959 100644 --- a/game/modules/tome/data/chats/golbug-explains.lua +++ b/game/modules/tome/data/chats/golbug-explains.lua @@ -18,19 +18,19 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#VIOLET#*As you open the door you notice a huge orc in the distance, covered in both flames and ice.*#LAST# + text = _t[[#VIOLET#*As you open the door you notice a huge orc in the distance, covered in both flames and ice.*#LAST# @playerdescriptor.race@! You should never have come! Your doom awaits! The Orc Pride will never yield to anybody! They have their precious and there is nothing you can do.]], answers = { - {"The Orc Pride obeys a master? I see... 'pride' indeed!", jump="mock"}, - {"#LIGHT_GREEN#[Attack]"}, + {_t"The Orc Pride obeys a master? I see... 'pride' indeed!", jump="mock"}, + {_t"#LIGHT_GREEN#[Attack]"}, } } newChat{ id="mock", - text = [[The Pride chooses its allies. It has no master! ATTACK!]], + text = _t[[The Pride chooses its allies. It has no master! ATTACK!]], answers = { - {"#LIGHT_GREEN#[Attack]"}, + {_t"#LIGHT_GREEN#[Attack]"}, } } diff --git a/game/modules/tome/data/chats/jewelry-store.lua b/game/modules/tome/data/chats/jewelry-store.lua index 21181cd44f3303e55aab1ca1788b5cc38e6e7af9..b302d66a52119a9ae1cfefa63f12ab9429cd89c7 100644 --- a/game/modules/tome/data/chats/jewelry-store.lua +++ b/game/modules/tome/data/chats/jewelry-store.lua @@ -35,8 +35,8 @@ local imbueEgo = function(gem, ring) end local imbue_ring = function(npc, player) - player:showInventory("Imbue which ring?", player:getInven("INVEN"), function(o) return o.type == "jewelry" and o.subtype == "ring" and o.material_level and not o.unique and not o.plot and not o.special and not o.tinker and not o.shop_gem_imbue end, function(ring, ring_item) - player:showInventory("Use which gem?", player:getInven("INVEN"), function(gem) return gem.type == "gem" and gem.imbue_powers and gem.material_level end, function(gem, gem_item) + player:showInventory(_t"Imbue which ring?", player:getInven("INVEN"), function(o) return o.type == "jewelry" and o.subtype == "ring" and o.material_level and not o.unique and not o.plot and not o.special and not o.tinker and not o.shop_gem_imbue end, function(ring, ring_item) + player:showInventory(_t"Use which gem?", player:getInven("INVEN"), function(gem) return gem.type == "gem" and gem.imbue_powers and gem.material_level end, function(gem, gem_item) local lev = (ring.material_level + gem.material_level) / 2 * 10 + 10 -- Average the material level then add a bonus so we guarantee greater ego level range local new_ring local r = rng.range(0, 99) @@ -61,14 +61,14 @@ local imbue_ring = function(npc, player) local price = 200 * (ring.material_level + gem.material_level) / 2 if gem.unique then price = price * 1.5 end - if price > player.money then require("engine.ui.Dialog"):simplePopup("Not enough money", "This costs "..price.." gold, you need more gold.") return end + if price > player.money then require("engine.ui.Dialog"):simplePopup(_t"Not enough money", ("This costs %d gold, you need more gold."):tformat(price)) return end - require("engine.ui.Dialog"):yesnoPopup("Imbue cost", "This will cost you "..price.." gold, do you accept?", function(ret) if ret then + require("engine.ui.Dialog"):yesnoPopup(_t"Imbue cost", ("This will cost you %s gold, do you accept?"):tformat(price), function(ret) if ret then imbueEgo(gem, new_ring) player:incMoney(-price) player:removeObject(player:getInven("INVEN"), gem_item) - new_ring.name = (ring.short_name or ring.name or "weird").." "..gem.name .. " ring" + new_ring.name = ("%s %s ring"):tformat(_t(ring.short_name) or _t(ring.name) or _t"weird", _t(gem.name)) new_ring:identify(true) -- player:addObject(player:getInven("INVEN"), new_ring) ring:replaceWith(new_ring) @@ -81,13 +81,13 @@ local imbue_ring = function(npc, player) end local artifact_imbue_amulet = function(npc, player) - player:showInventory("Imbue which amulet?", player:getInven("INVEN"), function(o) return o.type == "jewelry" and o.subtype == "amulet" and o.material_level and not o.unique and not o.plot and not o.special and not o.tinker end, function(amulet, amulet_item) - player:showInventory("Use which first gem?", player:getInven("INVEN"), function(gem1) return gem1.type == "gem" and (gem1.material_level or 99) <= amulet.material_level and gem1.imbue_powers end, function(gem1, gem1_item) - player:showInventory("Use which second gem?", player:getInven("INVEN"), function(gem2) return gem2.type == "gem" and (gem2.material_level or 99) <= amulet.material_level and gem1.name ~= gem2.name and gem2.imbue_powers end, function(gem2, gem2_item) + player:showInventory(_t"Imbue which amulet?", player:getInven("INVEN"), function(o) return o.type == "jewelry" and o.subtype == "amulet" and o.material_level and not o.unique and not o.plot and not o.special and not o.tinker end, function(amulet, amulet_item) + player:showInventory(_t"Use which first gem?", player:getInven("INVEN"), function(gem1) return gem1.type == "gem" and (gem1.material_level or 99) <= amulet.material_level and gem1.imbue_powers end, function(gem1, gem1_item) + player:showInventory(_t"Use which second gem?", player:getInven("INVEN"), function(gem2) return gem2.type == "gem" and (gem2.material_level or 99) <= amulet.material_level and gem1.name ~= gem2.name and gem2.imbue_powers end, function(gem2, gem2_item) local price = 1000 - if price > player.money then require("engine.ui.Dialog"):simplePopup("Not enough money", "Limmir needs more gold for the magical plating.") return end + if price > player.money then require("engine.ui.Dialog"):simplePopup(_t"Not enough money", _t"Limmir needs more gold for the magical plating.") return end - require("engine.ui.Dialog"):yesnoPopup("Imbue cost", "You need to use "..price.." gold for the plating, do you accept?", function(ret) if ret then + require("engine.ui.Dialog"):yesnoPopup(_t"Imbue cost", ("You need to use %s gold for the plating, do you accept?"):tformat(price), function(ret) if ret then player:incMoney(-price) local gem3, tries = nil, 10 while gem3 == nil and tries > 0 do gem3 = game.zone:makeEntity(game.level, "object", {type="gem"}, nil, true) tries = tries - 1 end @@ -112,7 +112,7 @@ local artifact_imbue_amulet = function(npc, player) imbueEgo(gem2, new_amulet) imbueEgo(gem3, new_amulet) - new_amulet.name = "Limmir's Amulet of the Moon" + new_amulet.name = _t"Limmir's Amulet of the Moon" new_amulet.unique = util.uuid() new_amulet:identify(true) -- player:addObject(player:getInven("INVEN"), new_amulet) @@ -126,47 +126,47 @@ local artifact_imbue_amulet = function(npc, player) end newChat{ id="welcome", - text = [[Welcome, @playername@, to my shop.]], + text = _t[[Welcome, @playername@, to my shop.]], answers = { - {"Let me see your wares.", action=function(npc, player) + {_t"Let me see your wares.", action=function(npc, player) npc.store:loadup(game.level, game.zone) npc.store:interact(player) end, cond=function(npc, player) return npc.store and true or false end}, - {"I am looking for special jewelry.", jump="jewelry"}, - {"So you can infuse amulets in this place?", jump="artifact_jewelry", cond=function(npc, player) return npc.can_craft and player:hasQuest("master-jeweler") and player:isQuestStatus("master-jeweler", engine.Quest.COMPLETED, "limmir-survived") end}, - {"I have found this tome; it looked important.", jump="quest", cond=function(npc, player) return npc.can_quest and player:hasQuest("master-jeweler") and player:hasQuest("master-jeweler"):has_tome(player) end}, - {"Sorry I have to go!"}, + {_t"I am looking for special jewelry.", jump="jewelry"}, + {_t"So you can infuse amulets in this place?", jump="artifact_jewelry", cond=function(npc, player) return npc.can_craft and player:hasQuest("master-jeweler") and player:isQuestStatus("master-jeweler", engine.Quest.COMPLETED, "limmir-survived") end}, + {_t"I have found this tome; it looked important.", jump="quest", cond=function(npc, player) return npc.can_quest and player:hasQuest("master-jeweler") and player:hasQuest("master-jeweler"):has_tome(player) end}, + {_t"Sorry I have to go!"}, } } newChat{ id="jewelry", - text = [[Then you are at the right place, for I am an expert jeweler. + text = _t[[Then you are at the right place, for I am an expert jeweler. If you bring me a gem and a ring, I can create a new ring imbued with the properties of the gem. The original traits of the ring will be lost in the process but new ones of similar quality will be generated. There is a small fee dependent on the level of the ring, and you need a quality ring to use a quality gem.]], answers = { - {"I need your services.", action=imbue_ring}, - {"Not now, thanks."}, + {_t"I need your services.", action=imbue_ring}, + {_t"Not now, thanks."}, } } newChat{ id="artifact_jewelry", - text = [[Yes! Thanks to you this place is now free from the corruption. I will stay on this island to study the magical aura, and as promised I can make you powerful amulets. + text = _t[[Yes! Thanks to you this place is now free from the corruption. I will stay on this island to study the magical aura, and as promised I can make you powerful amulets. Bring me a an amulet and two different gems and I will turn them into a powerful amulet, though the original properties of the amulet will be lost. I will not make you pay a fee for it since you helped me so much, but I am afraid the ritual requires a gold plating. This should be equal to about 1000 gold pieces.]], answers = { - {"I need your services.", action=artifact_imbue_amulet}, - {"Not now, thanks."}, + {_t"I need your services.", action=artifact_imbue_amulet}, + {_t"Not now, thanks."}, } } newChat{ id="quest", - text = [[#LIGHT_GREEN#*He quickly looks at the tome and looks amazed.*#WHITE# This is an amazing find! Truly amazing! + text = _t[[#LIGHT_GREEN#*He quickly looks at the tome and looks amazed.*#WHITE# This is an amazing find! Truly amazing! With this knowledge I could create potent amulets. However, it requires a special place of power to craft such items. There are rumours about a site of power in the southern mountains. Old legends tell about a place where a part of the Wintertide Moon melted when it got too close to the Sun and fell from the sky. A lake formed in the crater of the crash. The water of this lake, soaked in intense Moonlight for eons, should be sufficient to forge powerful artifacts! Go to the lake and then summon me with this scroll. I will retire to study the tome, awaiting your summon.]], answers = { - {"I will see if I can find it.", action=function(npc, player) + {_t"I will see if I can find it.", action=function(npc, player) game.level:removeEntity(npc) player:hasQuest("master-jeweler"):remove_tome(player) player:hasQuest("master-jeweler"):start_search(player) diff --git a/game/modules/tome/data/chats/keepsake-berethh-encounter.lua b/game/modules/tome/data/chats/keepsake-berethh-encounter.lua index b83e3823f16712b0a4410b7d643efb30eb5bd0db..bce1400df9d189604fbabd223a2e453c940b7441 100644 --- a/game/modules/tome/data/chats/keepsake-berethh-encounter.lua +++ b/game/modules/tome/data/chats/keepsake-berethh-encounter.lua @@ -18,40 +18,40 @@ -- darkgod@te4.org newChat{ id="berethh", - text = [[#VIOLET#*Before you stands Berethh. His face shows no emotion, but his posture is threatening.#LAST# + text = _t[[#VIOLET#*Before you stands Berethh. His face shows no emotion, but his posture is threatening.#LAST# ]], answers = { - {"Kyless is dead.", jump="response"} + {_t"Kyless is dead.", jump="response"} } } newChat{ id="response", - text = [[I'm not sure if you deserved your fate. Still I cannot let you live.]], + text = _t[[I'm not sure if you deserved your fate. Still I cannot let you live.]], answers = { { - "Then you will die like Kyless. #LIGHT_GREEN#[Attack]#LAST#", + _t"Then you will die like Kyless. #LIGHT_GREEN#[Attack]#LAST#", action=function(npc, player) player:hasQuest("keepsake"):on_evil_choice(player) end }, { - "I need your help. I want to overcome my curse.", + _t"I need your help. I want to overcome my curse.", action=function(npc, player) player:hasQuest("keepsake"):on_good_choice(player) end, jump="attack" }, { - "I do not want to kill you.", + _t"I do not want to kill you.", jump="attack" } } } newChat{ id="attack", - text = [[#VIOLET#*Berethh ignores your comment, unslings his bow and prepares his attack.*#LAST#]], + text = _t[[#VIOLET#*Berethh ignores your comment, unslings his bow and prepares his attack.*#LAST#]], answers = { - {"#LIGHT_GREEN#[Attack]"}, + {_t"#LIGHT_GREEN#[Attack]"}, } } diff --git a/game/modules/tome/data/chats/keepsake-caravan-destroyed.lua b/game/modules/tome/data/chats/keepsake-caravan-destroyed.lua index f585559cbe29caf8963627cceafc6e106840ea3d..efae641c38d75304df3d6294aa18a30908b1e578 100644 --- a/game/modules/tome/data/chats/keepsake-caravan-destroyed.lua +++ b/game/modules/tome/data/chats/keepsake-caravan-destroyed.lua @@ -18,18 +18,18 @@ -- darkgod@te4.org newChat{ id="caravan", - text = [[#VIOLET#*As the last member of the caravan lies dying, you look at him and see the hate that fills his eyes.*#LAST# + text = _t[[#VIOLET#*As the last member of the caravan lies dying, you look at him and see the hate that fills his eyes.*#LAST# We should have finished you off that day. You deserved no mercy!]], answers = { { - "And I will show you no mercy. #LIGHT_GREEN#[Kill him]#LAST#", + _t"And I will show you no mercy. #LIGHT_GREEN#[Kill him]#LAST#", action=function(npc, player) player:hasQuest("keepsake"):on_evil_choice(player) player:hasQuest("keepsake"):on_caravan_destroyed_chat_over(player) end }, { - "I am sorry. #LIGHT_GREEN#[Help him]#LAST#", + _t"I am sorry. #LIGHT_GREEN#[Help him]#LAST#", action=function(npc, player) player:hasQuest("keepsake"):on_good_choice(player) end, @@ -39,10 +39,10 @@ We should have finished you off that day. You deserved no mercy!]], } newChat{ id="apology", - text = [[#VIOLET#*Before you can help him, he collapses to the ground and dies.*#LAST#]], + text = _t[[#VIOLET#*Before you can help him, he collapses to the ground and dies.*#LAST#]], answers = { { - "...", + _t"...", action=function(npc, player) player:hasQuest("keepsake"):on_caravan_destroyed_chat_over(player) end, diff --git a/game/modules/tome/data/chats/keepsake-kyless-death.lua b/game/modules/tome/data/chats/keepsake-kyless-death.lua index cee3c8e27c071004b962437d7efc1feccda7d881..dc7df91738ad4d738bb82f0f9ccd78d6543db00f 100644 --- a/game/modules/tome/data/chats/keepsake-kyless-death.lua +++ b/game/modules/tome/data/chats/keepsake-kyless-death.lua @@ -18,18 +18,18 @@ -- darkgod@te4.org newChat{ id="kyless", - text = [[#VIOLET#*Kyless lies dying on the floor. In his hand he holds a book.*#LAST# + text = _t[[#VIOLET#*Kyless lies dying on the floor. In his hand he holds a book.*#LAST# Please! Before I die I have one request. Destroy the book. It wasn't me. The book brought this on us. It must be destoyed!]], answers = { { - "I will. #LIGHT_GREEN#[destroy the book]#LAST#", + _t"I will. #LIGHT_GREEN#[destroy the book]#LAST#", action=function(npc, player) player:hasQuest("keepsake"):on_good_choice(player) end, jump="destroy_book" }, { - "I'm sorry but I need it. #LIGHT_GREEN#[keep the book]#LAST#", + _t"I'm sorry but I need it. #LIGHT_GREEN#[keep the book]#LAST#", action=function(npc, player) player:hasQuest("keepsake"):on_evil_choice(player) player:hasQuest("keepsake"):on_keep_book(player) @@ -40,16 +40,16 @@ Please! Before I die I have one request. Destroy the book. It wasn't me. The boo } newChat{ id="destroy_book", - text = [[#VIOLET#*You destroy the book. When you finish you look up and see that Kyless is already dead.*#LAST#]], + text = _t[[#VIOLET#*You destroy the book. When you finish you look up and see that Kyless is already dead.*#LAST#]], answers = { - {"Goodbye, Kyless."}, + {_t"Goodbye, Kyless."}, } } newChat{ id="keep_book", - text = [[#VIOLET#*You place the book in your pack. When you finish you look up and see that Kyless is already dead.*#LAST#]], + text = _t[[#VIOLET#*You place the book in your pack. When you finish you look up and see that Kyless is already dead.*#LAST#]], answers = { - {"Goodbye, Kyless."}, + {_t"Goodbye, Kyless."}, } } diff --git a/game/modules/tome/data/chats/last-hope-elder.lua b/game/modules/tome/data/chats/last-hope-elder.lua index 21e4f6fcbac083a057bf732a3e5cdcaf24e564dd..ce37970d79d8a6f4d5c403ecf3d44d0c9982e339 100644 --- a/game/modules/tome/data/chats/last-hope-elder.lua +++ b/game/modules/tome/data/chats/last-hope-elder.lua @@ -18,33 +18,33 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[Welcome, @playername@, to Last Hope. Traveler, please be quick as my time is precious.]], + text = _t[[Welcome, @playername@, to Last Hope. Traveler, please be quick as my time is precious.]], answers = { - {"I have found a strange staff in my travels (#LIGHT_GREEN#*describe it in detail*#LAST#) It looked very old and very powerful. I dared not use it.", jump="found_staff", cond=function(npc, player) return player:isQuestStatus("staff-absorption", engine.Quest.PENDING) end}, - {"The hunt for the staff took me to a continent far to the east, accessible only by magic portal. I've recently returned by just such a portal, and I come bearing instructions on how to construct a similar portal here in Last Hope to make the return journey possible. I'm sure the Elves there would welcome trade with the west.", jump="east_portal", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and not q:isCompleted("talked-elder") end}, - {"Nothing, excuse me. Bye!"}, + {_t"I have found a strange staff in my travels (#LIGHT_GREEN#*describe it in detail*#LAST#) It looked very old and very powerful. I dared not use it.", jump="found_staff", cond=function(npc, player) return player:isQuestStatus("staff-absorption", engine.Quest.PENDING) end}, + {_t"The hunt for the staff took me to a continent far to the east, accessible only by magic portal. I've recently returned by just such a portal, and I come bearing instructions on how to construct a similar portal here in Last Hope to make the return journey possible. I'm sure the Elves there would welcome trade with the west.", jump="east_portal", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and not q:isCompleted("talked-elder") end}, + {_t"Nothing, excuse me. Bye!"}, } } newChat{ id="found_staff", - text = [[#LIGHT_GREEN#*He remains silent for a while*#WHITE# Indeed you were right to come here. + text = _t[[#LIGHT_GREEN#*He remains silent for a while*#WHITE# Indeed you were right to come here. The staff you describe reminds me of an artifact of great power from ancient times. May I see it?]], answers = { - {"Here it is. #LIGHT_GREEN#*Tell him about the encounter with the orcs*#LAST# You should keep it. I can feel its power and it would be safer if it were guarded by the armies of the kingdom.", + {_t"Here it is. #LIGHT_GREEN#*Tell him about the encounter with the orcs*#LAST# You should keep it. I can feel its power and it would be safer if it were guarded by the armies of the kingdom.", jump="given_staff", cond=function(npc, player) return game.party:findInAllPartyInventoriesBy("define_as", "STAFF_ABSORPTION") and player:isQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk") or false end}, - {"I am afraid I lost it. #LIGHT_GREEN#*Tell him about the encounter with the orcs*", + {_t"I am afraid I lost it. #LIGHT_GREEN#*Tell him about the encounter with the orcs*", jump="lost_staff", cond=function(npc, player) return player:isQuestStatus("staff-absorption", engine.Quest.COMPLETED, "ambush-died") end}, - {"I had it briefly but have lost it somehow. It could have been some orcs I encountered ...", + {_t"I had it briefly but have lost it somehow. It could have been some orcs I encountered ...", jump="lost_staff", fallback=true, cond=function(npc, player) return player:hasQuest("staff-absorption") end}, } } newChat{ id="given_staff", - text = [[I am truly astonished by your strength; surviving that encounter was an epic feat. + text = _t[[I am truly astonished by your strength; surviving that encounter was an epic feat. As for the orcs, it is deeply troubling. We have not seen any for eighty years... could they have come from the far east? Anyway, thank you again, @playername@, for your help.]], answers = { - {"Thank you, my lord.", action=function(npc, player) + {_t"Thank you, my lord.", action=function(npc, player) local mem, o, item, inven_id = game.party:findInAllPartyInventoriesBy("define_as", "STAFF_ABSORPTION") if mem and o then mem:removeObject(inven_id, item, true) @@ -58,10 +58,10 @@ Anyway, thank you again, @playername@, for your help.]], } newChat{ id="lost_staff", - text = [[Orcs?! In the west?! This is deeply alarming! We have not seen any for nearly eighty years. They must have come from the far east... + text = _t[[Orcs?! In the west?! This is deeply alarming! We have not seen any for nearly eighty years. They must have come from the far east... But do not let me trouble you; you brought important news and you are lucky to be alive.]], answers = { - {"Thank you, my lord.", action=function(npc, player) + {_t"Thank you, my lord.", action=function(npc, player) player:setQuestStatus("staff-absorption", engine.Quest.DONE) world:gainAchievement("A_DANGEROUS_SECRET", player) end, jump="orc_hunt"}, @@ -69,34 +69,34 @@ But do not let me trouble you; you brought important news and you are lucky to b } newChat{ id="orc_hunt", - text = [[We have heard rumours from the Dwarves that there may still be an orc presence deep in the old kingdom of Reknor, in the Iron Throne. + text = _t[[We have heard rumours from the Dwarves that there may still be an orc presence deep in the old kingdom of Reknor, in the Iron Throne. I know you have been through a lot, but we need somebody to investigate and determine if there is a connection with the staff.]], answers = { - {"I will check the mines.", action=function(npc, player) + {_t"I will check the mines.", action=function(npc, player) player:grantQuest("orc-hunt") end}, } } newChat{ id="east_portal", - text = [[That's extraordinary! I know a number of merchant princes who will salivate at the idea of new trade routes opening. But tell me, how fares your quest for the staff?]], + text = _t[[That's extraordinary! I know a number of merchant princes who will salivate at the idea of new trade routes opening. But tell me, how fares your quest for the staff?]], answers = { - {"The staff is recovered and the culprits slain. They will trouble us no more. [tell him the whole story]", jump="east_portal_winner", cond=function(npc, player) return player:isQuestStatus("high-peak", engine.Quest.DONE) end}, - {"The hunt continues. The construction of this portal will be of great assistance in the staff's recovery.", jump="east_portal_hunt", cond=function(npc, player) return not player:isQuestStatus("high-peak", engine.Quest.DONE) end}, + {_t"The staff is recovered and the culprits slain. They will trouble us no more. [tell him the whole story]", jump="east_portal_winner", cond=function(npc, player) return player:isQuestStatus("high-peak", engine.Quest.DONE) end}, + {_t"The hunt continues. The construction of this portal will be of great assistance in the staff's recovery.", jump="east_portal_hunt", cond=function(npc, player) return not player:isQuestStatus("high-peak", engine.Quest.DONE) end}, } } newChat{ id="east_portal_winner", - text = [[Excellent! Well then, concerning this fascinating portal, I'm afraid that men have largely forgotten whatever they once knew about the great magics of old. I know of only one man in these lands who might be able to help you, a wise man and recent arrival to Last Hope named Tannen. He claims to hail from Angolwen, a supposed haven for practitioners of magic and mysticism. He arrived just months ago with fabulous wealth and has already constructed his own tower in the northern part of the city. I know little of him, but if he is to be believed, then he is your best hope.]], + text = _t[[Excellent! Well then, concerning this fascinating portal, I'm afraid that men have largely forgotten whatever they once knew about the great magics of old. I know of only one man in these lands who might be able to help you, a wise man and recent arrival to Last Hope named Tannen. He claims to hail from Angolwen, a supposed haven for practitioners of magic and mysticism. He arrived just months ago with fabulous wealth and has already constructed his own tower in the northern part of the city. I know little of him, but if he is to be believed, then he is your best hope.]], answers = { - {"Thank you.", action=function(npc, player) player:setQuestStatus("east-portal", engine.Quest.COMPLETED, "talked-elder") end}, + {_t"Thank you.", action=function(npc, player) player:setQuestStatus("east-portal", engine.Quest.COMPLETED, "talked-elder") end}, } } newChat{ id="east_portal_hunt", - text = [[In that case, let us proceed as quickly as possible. Now, concerning this fascinating portal. I'm afraid that men have largely forgotten whatever they once knew about the great magics of old. I know of only one man in these lands who might be able to help you, a wise man and recent arrival to Last Hope named Tannen. He claims to hail from Angolwen, a supposed haven for practitioners of magic and mysticism. He arrived just months ago with fabulous wealth and has already constructed his own tower in the northern part of the city. I know little of him, but if he is to be believed, then he is your best hope.]], + text = _t[[In that case, let us proceed as quickly as possible. Now, concerning this fascinating portal. I'm afraid that men have largely forgotten whatever they once knew about the great magics of old. I know of only one man in these lands who might be able to help you, a wise man and recent arrival to Last Hope named Tannen. He claims to hail from Angolwen, a supposed haven for practitioners of magic and mysticism. He arrived just months ago with fabulous wealth and has already constructed his own tower in the northern part of the city. I know little of him, but if he is to be believed, then he is your best hope.]], answers = { - {"Thank you.", action=function(npc, player) player:setQuestStatus("east-portal", engine.Quest.COMPLETED, "talked-elder") end}, + {_t"Thank you.", action=function(npc, player) player:setQuestStatus("east-portal", engine.Quest.COMPLETED, "talked-elder") end}, } } diff --git a/game/modules/tome/data/chats/last-hope-lost-merchant.lua b/game/modules/tome/data/chats/last-hope-lost-merchant.lua index cd9b432fb9d7f7f71ca486c5fabb1bb42bd5d3f2..6188005fb339ba3eb67572778ecf9d742755e2c4 100644 --- a/game/modules/tome/data/chats/last-hope-lost-merchant.lua +++ b/game/modules/tome/data/chats/last-hope-lost-merchant.lua @@ -25,36 +25,36 @@ local trap = p:knowTalentType("cunning/trapping") and not game.state:unlockTalen local poison = p:getTalentFromId(p.T_STONING_POISON) local poison = poison and p:knowTalentType("cunning/poisons") and not p:knowTalent(poison) and p:canLearnTalent(poison) newChat{ id="welcome", - text = [[Ah, my #{italic}#good#{normal}# friend @playername@! + text = _t[[Ah, my #{italic}#good#{normal}# friend @playername@! Thanks to you I made it safely to this great city! I am planning to open my most excellent boutique soon, but since I am in your debt, perhaps I could open early for you if you are in need of rare goods.]] -..((trap or poison) and ("\nBy the way, "..((trap and "during our escape I found the plans for an #YELLOW#Ambush Trap#LAST#" or "") -..(poison and (trap and " and while" or "while").. " organizing my inventory, I came across some #YELLOW#Smelly Toxin#LAST# that a colleague claimed could actually turn creatures to stone. Truly exotic!" or ".")).."\nYou would not happen to be interested, by any chance?") or "") -..((game.state:isAdvanced() and "\nOh my friend, good news! As I told you I can now request a truly #{italic}#unique#{normal}# object to be crafted just for you. For a truly unique price..." or "\nI eventually plan to arrange a truly unique service for the most discerning of customers. If you come back later when I'm fully set up I shall be able to order for you something quite marvellous. For a perfectly #{italic}#suitable#{normal}# price, of course.")), +..((trap or poison) and (_t"\nBy the way, "..((trap and _t"during our escape I found the plans for an #YELLOW#Ambush Trap#LAST#" or "") +..(poison and (trap and _t" and while" or _t"while").. _t" organizing my inventory, I came across some #YELLOW#Smelly Toxin#LAST# that a colleague claimed could actually turn creatures to stone. Truly exotic!" or _t".")).._t"\nYou would not happen to be interested, by any chance?") or "") +..((game.state:isAdvanced() and _t"\nOh my friend, good news! As I told you I can now request a truly #{italic}#unique#{normal}# object to be crafted just for you. For a truly unique price..." or _t"\nI eventually plan to arrange a truly unique service for the most discerning of customers. If you come back later when I'm fully set up I shall be able to order for you something quite marvellous. For a perfectly #{italic}#suitable#{normal}# price, of course.")), answers = { - {"Yes please, let me see your wares.", action=function(npc, player) + {_t"Yes please, let me see your wares.", action=function(npc, player) npc.store:loadup(game.level, game.zone) npc.store:interact(player) end}, - {"What about the unique object?", cond=function(npc, player) return game.state:isAdvanced() end, jump="unique1"}, - {"Ambush Trap? Sounds useful.", cond=function(npc, player) return trap end, jump="trap"}, - {"Smelly Toxin? What kind of smell?", cond=function(npc, player) return poison end, jump="poison"}, - {"Sorry, I have to go!"}, + {_t"What about the unique object?", cond=function(npc, player) return game.state:isAdvanced() end, jump="unique1"}, + {_t"Ambush Trap? Sounds useful.", cond=function(npc, player) return trap end, jump="trap"}, + {_t"Smelly Toxin? What kind of smell?", cond=function(npc, player) return poison end, jump="poison"}, + {_t"Sorry, I have to go!"}, } } newChat{ id="trap", - text = [[You know, I have asked here and there and it happens to be a very rare thing this contraption... + text = _t[[You know, I have asked here and there and it happens to be a very rare thing this contraption... But since you have saved me, I'm willing to part from it for only 3000 gold pieces, a real bargain!]], answers = { - {"Expensive, but I will take it.", cond=function(npc, player) return player.money >= 3000 end, jump="traplearn"}, - {"..."}, + {_t"Expensive, but I will take it.", cond=function(npc, player) return player.money >= 3000 end, jump="traplearn"}, + {_t"..."}, } } newChat{ id="traplearn", - text = [[Nice doing business with you my friend. There you go!]], + text = _t[[Nice doing business with you my friend. There you go!]], answers = { - {"Thanks.", action=function(npc, player) + {_t"Thanks.", action=function(npc, player) game.state:unlockTalent(player.T_AMBUSH_TRAP, player) player:incMoney(-3000) end}, @@ -62,18 +62,18 @@ newChat{ id="traplearn", } newChat{ id="poison", - text = [[Ungrol told me this substance contains some exceedingly rare components. + text = _t[[Ungrol told me this substance contains some exceedingly rare components. "More Toxin than Medicine" he said. Allas, he had not the funds to buy it. On the other hand, because of our special relationship, I'm willing to let you have it #{italic}#at cost#{normal}# -- only 1500 gold pieces!]], answers = { - {"Fairly pricey, but seems useful. We have a deal!", cond=function(npc, player) return player.money >= 1500 end, jump="poisonlearn"}, - {"That price ... er stuff really stinks ..."}, + {_t"Fairly pricey, but seems useful. We have a deal!", cond=function(npc, player) return player.money >= 1500 end, jump="poisonlearn"}, + {_t"That price ... er stuff really stinks ..."}, } } newChat{ id="poisonlearn", - text = [[Here you are. Just be sure not to get any on yourself!]], + text = _t[[Here you are. Just be sure not to get any on yourself!]], answers = { - {"Thanks.", action=function(npc, player) + {_t"Thanks.", action=function(npc, player) player:incMoney(-1500) player:learnTalent(player.T_STONING_POISON, true, 1) end}, @@ -81,12 +81,12 @@ newChat{ id="poisonlearn", } newChat{ id="unique1", - text = [[I normally offer this service only for a truly deserved price, but for you my friend I am willing to offer a 20% discount - #{italic}#only#{normal}# 4000 gold to make an utterly unique item of your choice. What do you say?]], + text = _t[[I normally offer this service only for a truly deserved price, but for you my friend I am willing to offer a 20% discount - #{italic}#only#{normal}# 4000 gold to make an utterly unique item of your choice. What do you say?]], answers = { - {"Why, 'tis a paltry sum - take my order, man, and be quick about it!", cond=function(npc, player) return player.money >= 10000 end, jump="make"}, - {"Yes, please!", cond=function(npc, player) return player.money >= 4000 end, jump="make"}, - {"HOW MUCH?! Please, excuse me, I- I need some fresh air...", cond=function(npc, player) return player.money < 500 end}, - {"Not now, thank you."}, + {_t"Why, 'tis a paltry sum - take my order, man, and be quick about it!", cond=function(npc, player) return player.money >= 10000 end, jump="make"}, + {_t"Yes, please!", cond=function(npc, player) return player.money >= 4000 end, jump="make"}, + {_t"HOW MUCH?! Please, excuse me, I- I need some fresh air...", cond=function(npc, player) return player.money < 500 end}, + {_t"Not now, thank you."}, } } @@ -128,17 +128,17 @@ local maker_list = function() "voratun amulet", "dwarven lantern", "voratun pickaxe", - {"dragonbone wand", "dragonbone wand"}, - {"dragonbone totem", "dragonbone totem"}, - {"voratun torque", "voratun torque"}, + {"dragonbone wand", _t"dragonbone wand"}, + {"dragonbone totem", _t"dragonbone totem"}, + {"voratun torque", _t"voratun torque"}, }, } - local l = {{"I've changed my mind.", jump = "welcome"}} + local l = {{_t"I've changed my mind.", jump = "welcome"}} for kind, bases in pairs(mainbases) do - l[#l+1] = {kind:capitalize(), action=function(npc, player) - local l = {{"I've changed my mind.", jump = "welcome"}} + l[#l+1] = {_t(kind):capitalize(), action=function(npc, player) + local l = {{_t"I've changed my mind.", jump = "welcome"}} newChat{ id="makereal", - text = [[Which kind of item would you like ?]], + text = _t[[Which kind of item would you like ?]], answers = l, } @@ -186,25 +186,25 @@ local maker_list = function() if not config.settings.cheat then game:saveGame() end newChat{ id="naming", - text = "Do you want to name your item?\n"..tostring(art:getTextualDesc()), + text = ("Do you want to name your item?\n%s"):tformat(tostring(art:getTextualDesc())), answers = { - {"Yes, please.", action=function(npc, player) - local d = require("engine.dialogs.GetText").new("Name your item", "Name", 2, 40, function(txt) + {_t"Yes, please.", action=function(npc, player) + local d = require("engine.dialogs.GetText").new(_t"Name your item", _t"Name", 2, 40, function(txt) art.name = txt:removeColorCodes():gsub("#", " ") game.log("#LIGHT_BLUE#The merchant carefully hands you: %s", art:getName{do_color=true}) end, function() game.log("#LIGHT_BLUE#The merchant carefully hands you: %s", art:getName{do_color=true}) end) game:registerDialog(d) end}, - {"No thanks.", action=function() game.log("#LIGHT_BLUE#The merchant carefully hands you: %s", art:getName{do_color=true}) end}, + {_t"No thanks.", action=function() game.log("#LIGHT_BLUE#The merchant carefully hands you: %s", art:getName{do_color=true}) end}, }, } return "naming" else newChat{ id="oups", - text = "Oh I am sorry, it seems we could not make the item your require.", + text = _t"Oh I am sorry, it seems we could not make the item your require.", answers = { - {"Oh, let's try something else then.", jump="make"}, - {"Oh well, maybe later then."}, + {_t"Oh, let's try something else then.", jump="make"}, + {_t"Oh well, maybe later then."}, }, } return "oups" @@ -220,16 +220,16 @@ local maker_list = function() end newChat{ id="make", - text = [[Which kind of item would you like ?]], + text = _t[[Which kind of item would you like ?]], answers = maker_list(), } else newChat{ id="welcome", - text = [[*This store does not appear to be open yet*]], + text = _t[[*This store does not appear to be open yet*]], answers = { - {"[leave]"}, + {_t"[leave]"}, } } diff --git a/game/modules/tome/data/chats/last-hope-melinda-father.lua b/game/modules/tome/data/chats/last-hope-melinda-father.lua index a3423ba124c8ffb0ce503bfbd69749f168194900..8cf2a49a52130de26970e805bf10369d8f8b1ba4 100644 --- a/game/modules/tome/data/chats/last-hope-melinda-father.lua +++ b/game/modules/tome/data/chats/last-hope-melinda-father.lua @@ -23,20 +23,20 @@ local ql = game.player:hasQuest("love-melinda") if ql and ql:isStatus(q.COMPLETED, "death-beach") then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A man talks to you from inside, the door half open. His voice is sad.*#WHITE# + text = _t[[#LIGHT_GREEN#*A man talks to you from inside, the door half open. His voice is sad.*#WHITE# Sorry, the store is closed.]], answers = { - {"[leave]"}, + {_t"[leave]"}, } } elseif not q or not q:isStatus(q.DONE) then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A man talks to you from inside, the door half open. His voice is sad.*#WHITE# + text = _t[[#LIGHT_GREEN#*A man talks to you from inside, the door half open. His voice is sad.*#WHITE# Sorry, the store is closed.]], answers = { - {"[leave]"}, + {_t"[leave]"}, } } @@ -47,19 +47,19 @@ else ------------------------------------------------------------------ newChat{ id="welcome", - text = [[@playername@! My daughter's savior!]], + text = _t[[@playername@! My daughter's savior!]], answers = { - {"Hi, I was just checking in to see if Melinda is all right.", jump="reward", cond=function(npc, player) return not npc.rewarded_for_saving_melinda end, action=function(npc, player) npc.rewarded_for_saving_melinda = true end}, - {"Hi, I would like to talk to Melinda please.", jump="rewelcome", switch_npc={name="Melinda"}, cond=function(npc, player) return ql and not ql:isCompleted("moved-in") and not ql.inlove end}, - {"Hi, I would like to talk to Melinda please.", jump="rewelcome-love", switch_npc={name="Melinda"}, cond=function(npc, player) return ql and not ql:isCompleted("moved-in") and ql.inlove end}, - {"Sorry, I have to go!"}, + {_t"Hi, I was just checking in to see if Melinda is all right.", jump="reward", cond=function(npc, player) return not npc.rewarded_for_saving_melinda end, action=function(npc, player) npc.rewarded_for_saving_melinda = true end}, + {_t"Hi, I would like to talk to Melinda please.", jump="rewelcome", switch_npc={name=_t"Melinda"}, cond=function(npc, player) return ql and not ql:isCompleted("moved-in") and not ql.inlove end}, + {_t"Hi, I would like to talk to Melinda please.", jump="rewelcome-love", switch_npc={name=_t"Melinda"}, cond=function(npc, player) return ql and not ql:isCompleted("moved-in") and ql.inlove end}, + {_t"Sorry, I have to go!"}, } } newChat{ id="reward", - text = [[Please take this. It is nothing compared to the life of my child. Oh, and she wanted to thank you in person; I will call her.]], + text = _t[[Please take this. It is nothing compared to the life of my child. Oh, and she wanted to thank you in person; I will call her.]], answers = { - {"Thank you.", jump="melinda", switch_npc={name="Melinda"}, action=function(npc, player) + {_t"Thank you.", jump="melinda", switch_npc={name=_t"Melinda"}, action=function(npc, player) local ro = game.zone:makeEntity(game.level, "object", {unique=true, not_properties={"lore"}}, nil, true) if ro then ro:identify(true) @@ -74,13 +74,13 @@ newChat{ id="reward", } } newChat{ id="melinda", - text = [[@playername@! #LIGHT_GREEN#*She jumps for joy and hugs you while her father returns to his shop.*#WHITE#]], + text = _t[[@playername@! #LIGHT_GREEN#*She jumps for joy and hugs you while her father returns to his shop.*#WHITE#]], answers = { - {"I am glad to see you are fine. It seems your scars are healing quite well.", jump="scars", cond=function(npc, player) + {_t"I am glad to see you are fine. It seems your scars are healing quite well.", jump="scars", cond=function(npc, player) if player:attr("undead") then return false end return true end,}, - {"I am glad to see you well. Take care."}, + {_t"I am glad to see you well. Take care."}, } } @@ -88,26 +88,26 @@ newChat{ id="melinda", -- Flirting ------------------------------------------------------------------ newChat{ id="scars", - text = [[Yes it has mostly healed, though I still do have nightmares. I feel like something is still lurking. + text = _t[[Yes it has mostly healed, though I still do have nightmares. I feel like something is still lurking. Ah well, the bad dreams are still better than the fate you saved me from!]], answers = { - {"Should I come across a way to help you during my travels, I will try to help.", quick_reply="Thank you, you are most welcome."}, - {"Most certainly, so what are your plans now?", jump="plans"}, + {_t"Should I come across a way to help you during my travels, I will try to help.", quick_reply=_t"Thank you, you are most welcome."}, + {_t"Most certainly, so what are your plans now?", jump="plans"}, } } newChat{ id="rewelcome", - text = [[Hi @playername@! I am feeling better now, even starting to grow restless...]], + text = _t[[Hi @playername@! I am feeling better now, even starting to grow restless...]], answers = { - {"So what are your plans now?", jump="plans"}, - {"About that, I was thinking that maybe you'd like to go out with me sometime ...", jump="hiton", cond=function() return not ql.inlove and not ql.nolove end}, + {_t"So what are your plans now?", jump="plans"}, + {_t"About that, I was thinking that maybe you'd like to go out with me sometime ...", jump="hiton", cond=function() return not ql.inlove and not ql.nolove end}, } } newChat{ id="rewelcome-love", - text = [[#LIGHT_GREEN#*Melinda appears at the door and kisses you*#WHITE# + text = _t[[#LIGHT_GREEN#*Melinda appears at the door and kisses you*#WHITE# Hi my dear, I'm so happy to see you!]], answers = { - {"I am still looking out for an explanation of what happened at the beach."}, - {"About what happened on the beach, I think I have found something.", jump="home1", cond=function() return ql:isStatus(engine.Quest.COMPLETED, "can_come_fortress") end}, + {_t"I am still looking out for an explanation of what happened at the beach."}, + {_t"About what happened on the beach, I think I have found something.", jump="home1", cond=function() return ql:isStatus(engine.Quest.COMPLETED, "can_come_fortress") end}, } } @@ -115,48 +115,48 @@ local p = game:getPlayer(true) local is_am = p:attr("forbid_arcane") local is_mage = (p.faction == "angolwen") or p:isQuestStatus("mage-apprentice", engine.Quest.DONE) newChat{ id="plans", - text = [[I do not know yet, my father won't let me out until I'm fully healed. I've always wanted to do so many things. + text = _t[[I do not know yet, my father won't let me out until I'm fully healed. I've always wanted to do so many things. That is why I got stuck in that crypt, I want to see the world. My father gave me some funds so that I can take my future into my own hands. I have some friends in Derth, maybe I will open my own little shop there. ]]..( is_am and - [[I have seen how you fought those corruptors, the way you destroyed their magic. I want to learn to do the same, so that such horrors never happen again. To anyone.]] + _t[[I have seen how you fought those corruptors, the way you destroyed their magic. I want to learn to do the same, so that such horrors never happen again. To anyone.]] or (is_mage and - [[Or maybe, well I suppose I can trust you with this, I've always secretly dreamed of learning magic. Real magic I mean not alchemist tricks! + _t[[Or maybe, well I suppose I can trust you with this, I've always secretly dreamed of learning magic. Real magic I mean not alchemist tricks! I've learnt about a secret place, Angolwen, where I could learn it.]] or [[]])), answers = (not is_am and not is_mage) and { - {"Derth has its up and downs but I think they could do with a smart girl yes.", action=function() ql.wants_to = "derth" end, quick_reply="Thanks!"}, + {_t"Derth has its up and downs but I think they could do with a smart girl yes.", action=function() ql.wants_to = "derth" end, quick_reply=_t"Thanks!"}, } or { - {"Derth has its up and downs but I think they could do with a smart girl yes.", action=function() ql.wants_to = "derth" end, quick_reply="Thanks!"}, - {"You wish to join our noble crusade against magic? Wonderful! I will talk to them for you.", action=function() ql.wants_to = "antimagic" end, cond=function() return is_am end, quick_reply="That would be very nice!"}, - {"I happen to be welcome among the people of Angolwen, I could say a word for you.", action=function() ql.wants_to = "magic" end, cond=function() return is_mage end, quick_reply="That would be very nice!"}, + {_t"Derth has its up and downs but I think they could do with a smart girl yes.", action=function() ql.wants_to = "derth" end, quick_reply=_t"Thanks!"}, + {_t"You wish to join our noble crusade against magic? Wonderful! I will talk to them for you.", action=function() ql.wants_to = "antimagic" end, cond=function() return is_am end, quick_reply=_t"That would be very nice!"}, + {_t"I happen to be welcome among the people of Angolwen, I could say a word for you.", action=function() ql.wants_to = "magic" end, cond=function() return is_mage end, quick_reply=_t"That would be very nice!"}, } } newChat{ id="hiton", - text = [[What?!? Just because you rescued me from a moderately-to-extremely gruesome death, you think that entitles you to take liberties?!]], + text = _t[[What?!? Just because you rescued me from a moderately-to-extremely gruesome death, you think that entitles you to take liberties?!]], answers = { - {"WHY AREN'T WOMEN ATTRACTED TO ME I'M A NICE "..(p.female and "GIRL" or "GUY")..".", quick_reply="Uhh, sorry I hear my father calling, see you.", action=function() ql.nolove = true end}, - {"Just a minute, I was just...", jump="reassurance"}, + {("WHY AREN'T WOMEN ATTRACTED TO ME I'M A NICE %s."):tformat((p.female and _t"GIRL" or _t"GUY")), quick_reply=_t"Uhh, sorry I hear my father calling, see you.", action=function() ql.nolove = true end}, + {_t"Just a minute, I was just...", jump="reassurance"}, } } newChat{ id="reassurance", - text = [[#LIGHT_GREEN#*She looks at you cheerfully.*#WHITE# + text = _t[[#LIGHT_GREEN#*She looks at you cheerfully.*#WHITE# Just kidding. I would love that!]], answers = { - {"#LIGHT_GREEN#[walk away with her]#WHITE#What about a little trip to the south, from the coastline we can see the Charred Scar Volcano, it is a wonderous sight.", action=function() ql.inlove = true ql:toBeach() end}, - {"Joke's on you really, goodbye!", quick_reply="But... ok goodbye.", action=function() ql.nolove = true end}, + {_t"#LIGHT_GREEN#[walk away with her]#WHITE#What about a little trip to the south, from the coastline we can see the Charred Scar Volcano, it is a wonderous sight.", action=function() ql.inlove = true ql:toBeach() end}, + {_t"Joke's on you really, goodbye!", quick_reply=_t"But... ok goodbye.", action=function() ql.nolove = true end}, } } newChat{ id="hug", - text = [[#LIGHT_GREEN#*You take Melinda in your arms and press her against you. The warmth of the contact lightens your heart.*#WHITE# + text = _t[[#LIGHT_GREEN#*You take Melinda in your arms and press her against you. The warmth of the contact lightens your heart.*#WHITE# I feel safe in your arms. Please, I know you must leave, but promise to come back soon and hold me again.]], answers = { - {"I think I would enjoy that very much. #LIGHT_GREEN#[kiss her]#WHITE#", action=function(npc, player) end}, - {"That thought will carry me in the dark places I shall walk. #LIGHT_GREEN#[kiss her]#WHITE#", action=function(npc, player) player:grantQuest("love-melinda") end}, - {"Oh, I am sorry. I think you are mistaken. I was only trying to comfort you.", quick_reply="Oh, sorry, I was not myself. Goodbye, then. Farewell."}, + {_t"I think I would enjoy that very much. #LIGHT_GREEN#[kiss her]#WHITE#", action=function(npc, player) end}, + {_t"That thought will carry me in the dark places I shall walk. #LIGHT_GREEN#[kiss her]#WHITE#", action=function(npc, player) player:grantQuest("love-melinda") end}, + {_t"Oh, I am sorry. I think you are mistaken. I was only trying to comfort you.", quick_reply=_t"Oh, sorry, I was not myself. Goodbye, then. Farewell."}, } } @@ -164,28 +164,28 @@ I feel safe in your arms. Please, I know you must leave, but promise to come bac -- Moving in ------------------------------------------------------------------ newChat{ id="home1", - text = [[#LIGHT_GREEN#*Melinda looks worried*#WHITE# + text = _t[[#LIGHT_GREEN#*Melinda looks worried*#WHITE# Please tell me you can help!]], answers = { - {"Yes, I think so. Some time ago I assumed ownership of a very special home... #LIGHT_GREEN#[tell her the Fortress story]#WHITE#", jump="home2"}, + {_t"Yes, I think so. Some time ago I assumed ownership of a very special home... #LIGHT_GREEN#[tell her the Fortress story]#WHITE#", jump="home2"}, } } newChat{ id="home2", - text = [[An ancient fortress of a mythical race?! How #{bold}#exciting#{normal}#! + text = _t[[An ancient fortress of a mythical race?! How #{bold}#exciting#{normal}#! And you say it could cure me?]], answers = { - {"The Fortress seems to think so. I know this might sound a bit .. inappropriate .. but you would need to come live there, at least for a while.", jump="home3"}, + {_t"The Fortress seems to think so. I know this might sound a bit .. inappropriate .. but you would need to come live there, at least for a while.", jump="home3"}, } } newChat{ id="home3", - text = [[#LIGHT_GREEN#*She looks at you cheerfully*#WHITE# + text = _t[[#LIGHT_GREEN#*She looks at you cheerfully*#WHITE# Ah the plan to sleep with me is finally revealed! Shhh you dummy, I thought we were past such silliness, I will come, both for my health and because I want to be with you. #LIGHT_GREEN#*She kisses you tenderly*#WHITE#]], answers = { - {"Then my lady, if you will follow me. #LIGHT_GREEN#[take her to the Fortress]", action=function(npc, player) + {_t"Then my lady, if you will follow me. #LIGHT_GREEN#[take her to the Fortress]", action=function(npc, player) game:changeLevel(1, "shertul-fortress", {direct_switch=true}) player:hasQuest("love-melinda"):spawnFortress(player) end}, diff --git a/game/modules/tome/data/chats/last-hope-weapon-store.lua b/game/modules/tome/data/chats/last-hope-weapon-store.lua index 5e8a053700734e5c8b9e1222b99d826e18c6da82..fc2ac0c5864a57cea42fbaabd688454a2e436185 100644 --- a/game/modules/tome/data/chats/last-hope-weapon-store.lua +++ b/game/modules/tome/data/chats/last-hope-weapon-store.lua @@ -18,21 +18,21 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[Welcome @playername@ to my shop.]], + text = _t[[Welcome @playername@ to my shop.]], answers = { - {"Let me see your wares.", action=function(npc, player) + {_t"Let me see your wares.", action=function(npc, player) npc.store:loadup(game.level, game.zone) npc.store:interact(player) end}, - {"I am looking for martial training.", jump="training"}, - {"Sorry, I have to go!"}, + {_t"I am looking for martial training.", jump="training"}, + {_t"Sorry, I have to go!"}, } } newChat{ id="training", - text = [[I can indeed offer some martial training (talent category Technique/Combat-training) for a fee of 50 gold pieces; or the basic usage of bows and slings (Shoot talent) for 8 gold pieces.]], + text = _t[[I can indeed offer some martial training (talent category Technique/Combat-training) for a fee of 50 gold pieces; or the basic usage of bows and slings (Shoot talent) for 8 gold pieces.]], answers = { - {"Please train me in generic weapons and armour usage.", action=function(npc, player) + {_t"Please train me in generic weapons and armour usage.", action=function(npc, player) game.logPlayer(player, "The smith spends some time with you, teaching you the basics of armour and weapon usage.") player:incMoney(-50) player:learnTalentType("technique/combat-training", true) @@ -42,7 +42,7 @@ newChat{ id="training", if player:knowTalentType("technique/combat-training") then return end return true end}, - {"Please train me in the basic usage of bows and slings.", action=function(npc, player) + {_t"Please train me in the basic usage of bows and slings.", action=function(npc, player) game.logPlayer(player, "The smith spends some time with you, teaching you the basics of bows and slings.") player:incMoney(-8) player:learnTalent(player.T_SHOOT, true, nil, {no_unlearn=true}) @@ -52,7 +52,7 @@ newChat{ id="training", if player:knowTalent(player.T_SHOOT) then return end return true end}, - {"No thanks."}, + {_t"No thanks."}, } } diff --git a/game/modules/tome/data/chats/limmir-valley-moon.lua b/game/modules/tome/data/chats/limmir-valley-moon.lua index feb6da4eb69a1c8427b9dc19976bd780c7e4fe2c..2c3fe48da67953a6a28a824e34b167de7fbedd82 100644 --- a/game/modules/tome/data/chats/limmir-valley-moon.lua +++ b/game/modules/tome/data/chats/limmir-valley-moon.lua @@ -18,10 +18,10 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[I do not have time to talk. This ritual is intense, and we are not alone here. Stop them!]], + text = _t[[I do not have time to talk. This ritual is intense, and we are not alone here. Stop them!]], answers = { - {"I will not let you down!"}, - {"[leave]"}, + {_t"I will not let you down!"}, + {_t"[leave]"}, } } diff --git a/game/modules/tome/data/chats/lost-merchant.lua b/game/modules/tome/data/chats/lost-merchant.lua index e9fb3fd76c947308abba05206ba87f3d329680e9..f3ac6a957055f11a49ffe2ebebdf43b609bf0e60 100644 --- a/game/modules/tome/data/chats/lost-merchant.lua +++ b/game/modules/tome/data/chats/lost-merchant.lua @@ -18,17 +18,17 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[Please save me! I will make it worth your whi.. + text = _t[[Please save me! I will make it worth your whi.. *#LIGHT_GREEN#The assassin lord hits him in the face.#WHITE#*Shut up!]], answers = { - {"Sorry, I have to go!", action = function(npc, player) npc.can_talk = nil end}, + {_t"Sorry, I have to go!", action = function(npc, player) npc.can_talk = nil end}, } } newChat{ id="welcome2", - text = [[Please get me out of here!]], + text = _t[[Please get me out of here!]], answers = { - {"Come, there is a way out!", action = function(npc, player) npc.can_talk = nil npc.cant_be_moved = nil end}, + {_t"Come, there is a way out!", action = function(npc, player) npc.can_talk = nil npc.cant_be_moved = nil end}, } } diff --git a/game/modules/tome/data/chats/lumberjack-quest-done.lua b/game/modules/tome/data/chats/lumberjack-quest-done.lua index 2545f83e2cad4e8cb0ea6429e7f0ea83f9b443c0..ecf036a06c5d31a56781e0ea72c3890bca278ec8 100644 --- a/game/modules/tome/data/chats/lumberjack-quest-done.lua +++ b/game/modules/tome/data/chats/lumberjack-quest-done.lua @@ -18,12 +18,12 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Ben lies defeated at your feet*#WHITE# + text = _t[[#LIGHT_GREEN#*Ben lies defeated at your feet*#WHITE# T...thank you for... *cough*... saving me from the curse. I did no... not want for this to... #LIGHT_GREEN#*he coughs one last time and dies, a smile on his face as his curse is gone.*#WHITE#]], answers = { - {"Rest in peace.", action=function(npc, player) player:setQuestStatus("lumberjack-cursed", engine.Quest.COMPLETED) end}, + {_t"Rest in peace.", action=function(npc, player) player:setQuestStatus("lumberjack-cursed", engine.Quest.COMPLETED) end}, } } diff --git a/game/modules/tome/data/chats/lumberjack-quest.lua b/game/modules/tome/data/chats/lumberjack-quest.lua index cb35259d1f03e03ccf29319cdc2bd214888113ae..a4da708da4dd2dd975b48e8170e521caf139ddc2 100644 --- a/game/modules/tome/data/chats/lumberjack-quest.lua +++ b/game/modules/tome/data/chats/lumberjack-quest.lua @@ -18,12 +18,12 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a man covered in dirt and blood. He is out of breath and half mad.*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands a man covered in dirt and blood. He is out of breath and half mad.*#WHITE# PLEASE! You must help! #{bold}#IT#{normal}# is slaughtering everybody in my village! Please! #LIGHT_GREEN#*He points his finger at the nearby forest.*#WHITE#]], answers = { - {"I will go there and see what I can do.", action=function(npc, player) player:grantQuest("lumberjack-cursed") end}, - {"This is not my problem. Go away!"}, + {_t"I will go there and see what I can do.", action=function(npc, player) player:grantQuest("lumberjack-cursed") end}, + {_t"This is not my problem. Go away!"}, } } diff --git a/game/modules/tome/data/chats/mage-apprentice-quest.lua b/game/modules/tome/data/chats/mage-apprentice-quest.lua index 14bcb9935f371a0adf0278ccc8fec10e02d8ff89..d0a2aa06777edca7881143f471b9fb85906b3f26 100644 --- a/game/modules/tome/data/chats/mage-apprentice-quest.lua +++ b/game/modules/tome/data/chats/mage-apprentice-quest.lua @@ -21,11 +21,11 @@ local p = game.party:findMember{main=true} if p:attr("forbid_arcane") then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a young man, a novice mage by his looks*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands a young man, a novice mage by his looks*#WHITE# Good day to yo...#LIGHT_GREEN#*He stares at you and starts to run away fast!*#WHITE# Do not kill me please!]], answers = { - {"...", action = function(npc, player) npc:die() end, + {_t"...", action = function(npc, player) npc:die() end, }, } } @@ -34,11 +34,11 @@ return "welcome" end newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a young man, a novice mage by his looks*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands a young man, a novice mage by his looks*#WHITE# Good day to you, fellow traveler!]], answers = { - {"What brings an apprentice mage out into the wilds?", jump="quest", cond=function(npc, player) return not player:hasQuest("mage-apprentice") end}, - {"I found this artefact; it looks powerful and arcane infused. Maybe it would be enough?", + {_t"What brings an apprentice mage out into the wilds?", jump="quest", cond=function(npc, player) return not player:hasQuest("mage-apprentice") end}, + {_t"I found this artefact; it looks powerful and arcane infused. Maybe it would be enough?", jump=function(npc, player) if player:hasQuest("mage-apprentice"):isCompleted() then -- An item was selected, continue. @@ -52,69 +52,69 @@ Good day to you, fellow traveler!]], action=function(npc, player, dialog) player:hasQuest("mage-apprentice"):collect_staff_unique(npc, player, dialog) end }, -- Reward for non-mages: access to Angolwen - {"So you have enough magical items now?", + {_t"So you have enough magical items now?", jump="thanks", cond=function(npc, player) return player:hasQuest("mage-apprentice") and player:hasQuest("mage-apprentice"):isCompleted() and not player:knowTalent(player.T_TELEPORT_ANGOLWEN) end, }, -- Reward for mages: upgrade a talent mastery - {"So you have enough magical items now?", + {_t"So you have enough magical items now?", jump="thanks_mage", cond=function(npc, player) return player:hasQuest("mage-apprentice") and player:hasQuest("mage-apprentice"):isCompleted() and player:knowTalent(player.T_TELEPORT_ANGOLWEN) end, }, --- {"Do you have any items to sell?", jump="store"}, - {"Sorry I have to go!"}, +-- {_t"Do you have any items to sell?", jump="store"}, + {_t"Sorry I have to go!"}, } } newChat{ id="quest", - text = [[Ahh, my story is a sad one... I should not trouble you with it, my friend.]], + text = _t[[Ahh, my story is a sad one... I should not trouble you with it, my friend.]], answers = { - {"It is no trouble at all! Please tell me!", jump="quest2"}, - {"Ok, bye then!"}, + {_t"It is no trouble at all! Please tell me!", jump="quest2"}, + {_t"Ok, bye then!"}, } } newChat{ id="quest2", - text = [[Well, if you insist... + text = _t[[Well, if you insist... I am a novice mage, as you might have noticed, and my goal is to be accepted by the people of Angolwen and be taught the secrets of the arcane.]], answers = { - {"Who are the people of Angolwen?", jump="quest3", cond=function(npc, player) return player.faction ~= "angolwen" end,}, - {"Ah yes, Angolwen, I have called it home for many years...", jump="quest3_mage", cond=function(npc, player) return player.faction == "angolwen" end,}, - {"Well, good luck, bye!"}, + {_t"Who are the people of Angolwen?", jump="quest3", cond=function(npc, player) return player.faction ~= "angolwen" end,}, + {_t"Ah yes, Angolwen, I have called it home for many years...", jump="quest3_mage", cond=function(npc, player) return player.faction == "angolwen" end,}, + {_t"Well, good luck, bye!"}, } } newChat{ id="quest3", - text = [[The keepers of ar... err, I do not think I am supposed to talk about them... sorry, my friend... + text = _t[[The keepers of ar... err, I do not think I am supposed to talk about them... sorry, my friend... In any case, I must collect many items. I have some already but I am still looking for an arcane-infused artefact. You do not happen to have one, I imagine... Well, if you do, tell me please!]], answers = { - {"I will keep that in mind!", action=function(npc, player) player:grantQuest("mage-apprentice") end}, - {"No way, bye!"}, + {_t"I will keep that in mind!", action=function(npc, player) player:grantQuest("mage-apprentice") end}, + {_t"No way, bye!"}, } } newChat{ id="quest3_mage", - text = [[I hope I will too... + text = _t[[I hope I will too... In any case, I must collect many items. I have some already but I am still looking for an arcane-infused artefact. You do not happen to have one, I imagine... Well, if you do, tell me please!]], answers = { - {"I will keep that in mind!", action=function(npc, player) player:grantQuest("mage-apprentice") end}, - {"No way, bye!"}, + {_t"I will keep that in mind!", action=function(npc, player) player:grantQuest("mage-apprentice") end}, + {_t"No way, bye!"}, } } newChat{ id="unique", - text = [[Let me examine it. + text = _t[[Let me examine it. Oh yes, my friend, this is indeed a powerful artefact! I think that it should suffice to complete my quest! Many thanks!]], answers = { - {"Well, I cannot use it anyway.", jump="welcome"}, + {_t"Well, I cannot use it anyway.", jump="welcome"}, } } newChat{ id="thanks", - text = [[Ah yes! I am so glad! I will be able to go back to Angolw...err... Oh well, I guess I can tell you; you deserve it for helping me. + text = _t[[Ah yes! I am so glad! I will be able to go back to Angolw...err... Oh well, I guess I can tell you; you deserve it for helping me. During the dark years of the Spellhunt, many thousands of years ago, Linaniil, the great mage of the Kor'Krul, worried that magic might disappear with her generation and be lost to mortals should they need it again. So she set a secret plan into action and built a secret place where magic would be kept alive. Her plan worked and the group built a town called Angolwen in the western mountains. #LIGHT_GREEN#*He marks it on your map, along with a portal to access it*#WHITE# Not many people are accepted there but I will arrange for you to be allowed inside.]], answers = { - {"Oh! How could such a place be kept secret for so long... This is interesting indeed. Thank you for your trust!", + {_t"Oh! How could such a place be kept secret for so long... This is interesting indeed. Thank you for your trust!", action = function(npc, player) player:hasQuest("mage-apprentice"):access_angolwen(player) npc:die() @@ -124,10 +124,10 @@ Not many people are accepted there but I will arrange for you to be allowed insi } newChat{ id="thanks_mage", - text = [[Ah yes! I am so glad! I will be able to go back to Angolwen now, and perhaps we will meet there. + text = _t[[Ah yes! I am so glad! I will be able to go back to Angolwen now, and perhaps we will meet there. Please take this ring; it has served me well.]], answers = { - {"Thanks, and best luck in your studies!", + {_t"Thanks, and best luck in your studies!", action = function(npc, player) player:hasQuest("mage-apprentice"):ring_gift(player) npc:die() diff --git a/game/modules/tome/data/chats/magic-store.lua b/game/modules/tome/data/chats/magic-store.lua index 6ca6f2d71d7a610f3a5940880e44fee62d091d60..57c08fce64d207cc20da3e33447fef3b1cb1583a 100644 --- a/game/modules/tome/data/chats/magic-store.lua +++ b/game/modules/tome/data/chats/magic-store.lua @@ -18,10 +18,10 @@ -- darkgod@te4.org local function recharge(npc, player) - player:showEquipInven("Select the item to recharge", function(o) return o.recharge_cost and o.power and o.max_power and o.power < o.max_power end, function(o, inven, item) + player:showEquipInven(_t"Select the item to recharge", function(o) return o.recharge_cost and o.power and o.max_power and o.power < o.max_power end, function(o, inven, item) local cost = math.ceil(o.recharge_cost * (o.max_power / (o.use_talent and o.use_talent.power or o.use_power.power))) - if cost > player.money then require("engine.ui.Dialog"):simplePopup("Not enough money", "This costs "..cost.." gold.") return true end - require("engine.ui.Dialog"):yesnoPopup("Recharge?", "This will cost you "..cost.." gold.", function(ok) if ok then + if cost > player.money then require("engine.ui.Dialog"):simplePopup(_t"Not enough money", ("This costs %d gold."):tformat(cost)) return true end + require("engine.ui.Dialog"):yesnoPopup(_t"Recharge?", ("This will cost you %d gold."):tformat(cost), function(ok) if ok then o.power = o.max_power player:incMoney(-cost) player.changed = true @@ -32,14 +32,14 @@ local function recharge(npc, player) end newChat{ id="welcome", - text = [[Welcome, @playername@, to my shop.]], + text = _t[[Welcome, @playername@, to my shop.]], answers = { - {"Let me see your wares.", action=function(npc, player) + {_t"Let me see your wares.", action=function(npc, player) npc.store:loadup(game.level, game.zone) npc.store:interact(player) end}, - {"I want to recharge some of my equipment.", action=recharge}, - {"Sorry, I have to go!"}, + {_t"I want to recharge some of my equipment.", action=recharge}, + {_t"Sorry, I have to go!"}, } } diff --git a/game/modules/tome/data/chats/melinda-beach-end.lua b/game/modules/tome/data/chats/melinda-beach-end.lua index 109e7098e195936d5a2a9b358c693f5e13c359a9..a89ae8f056153e0021c3a311fcdc9ca10486eab1 100644 --- a/game/modules/tome/data/chats/melinda-beach-end.lua +++ b/game/modules/tome/data/chats/melinda-beach-end.lua @@ -18,45 +18,45 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[What just happened?!]], + text = _t[[What just happened?!]], answers = { - {"I'm sorry I didn't manage to protect you and as you were about to die you... fired a powerful wave of blight.", jump="next1"}, + {_t"I'm sorry I didn't manage to protect you and as you were about to die you... fired a powerful wave of blight.", jump="next1"}, } } newChat{ id="next1", - text = [[But I have never cast a spell in my life!]], + text = _t[[But I have never cast a spell in my life!]], answers = { - {"You are still tainted by that ... foul Demon! The taint is not all gone!", jump="next_am", cond=function(npc, player) return player:attr("forbid_arcane") end}, - {"There must be some of that demon's taint still inside you.", jump="next_notam", cond=function(npc, player) return not player:attr("forbid_arcane") end}, + {_t"You are still tainted by that ... foul Demon! The taint is not all gone!", jump="next_am", cond=function(npc, player) return player:attr("forbid_arcane") end}, + {_t"There must be some of that demon's taint still inside you.", jump="next_notam", cond=function(npc, player) return not player:attr("forbid_arcane") end}, } } newChat{ id="next_am", - text = [[This is terrible! I assure you I had no idea this would happen. You must trust me!]], + text = _t[[This is terrible! I assure you I had no idea this would happen. You must trust me!]], answers = { - {"I do. The Ziguranth are not raving zealots, you know. We will look for a way to cure you, as long as you reject the blight.", jump="next2"}, + {_t"I do. The Ziguranth are not raving zealots, you know. We will look for a way to cure you, as long as you reject the blight.", jump="next2"}, } } newChat{ id="next_notam", - text = [[This is terrible! What is happening to me?!? You must help me!]], + text = _t[[This is terrible! What is happening to me?!? You must help me!]], answers = { - {"I will. We will find a cure for this together.", jump="next2"}, + {_t"I will. We will find a cure for this together.", jump="next2"}, } } newChat{ id="next2", - text = [[I'm a very lucky girl, am I not... This is the second time I've had you to save me now.]], + text = _t[[I'm a very lucky girl, am I not... This is the second time I've had you to save me now.]], answers = { - {"Over the last weeks you've become very important to me, and I am glad to have you. This is certainly not the place to talk, though, let's go.", jump="next3"}, + {_t"Over the last weeks you've become very important to me, and I am glad to have you. This is certainly not the place to talk, though, let's go.", jump="next3"}, } } newChat{ id="next3", - text = [[You're right, let's get out of here.]], + text = _t[[You're right, let's get out of here.]], answers = { - {"#LIGHT_GREEN#[go back to Last Hope]", action=function(npc, player) + {_t"#LIGHT_GREEN#[go back to Last Hope]", action=function(npc, player) game:changeLevel(1, "town-last-hope", {direct_switch=true}) player:move(25, 44, true) end}, diff --git a/game/modules/tome/data/chats/melinda-beach.lua b/game/modules/tome/data/chats/melinda-beach.lua index 3cf9ab786732739baae750d4f2d114ea4683578c..8fff319c7674d3f1104f2733626725a35517c6c5 100644 --- a/game/modules/tome/data/chats/melinda-beach.lua +++ b/game/modules/tome/data/chats/melinda-beach.lua @@ -19,7 +19,7 @@ newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The two of you spend some time relaxing on the beach. + text = _t[[#LIGHT_GREEN#*The two of you spend some time relaxing on the beach. The air is fresh, the sand shimmers, and the surf roars softly.*#WHITE# This was such a lovely idea! @@ -27,15 +27,15 @@ I have had a wonderful time with you today. #LIGHT_GREEN#*She looks longingly into your eyes.*#WHITE#]], answers = { - {"#LIGHT_GREEN#[Lean closer and kiss her]#WHITE#", action=function() game.zone.start_yaech() end, jump="firstbase"}, + {_t"#LIGHT_GREEN#[Lean closer and kiss her]#WHITE#", action=function() game.zone.start_yaech() end, jump="firstbase"}, } } newChat{ id="firstbase", - text = [[Just before your lips touch, you sense that something is very wrong. + text = _t[[Just before your lips touch, you sense that something is very wrong. ]], answers = { - {"#LIGHT_GREEN#[Continue...]#WHITE#"}, + {_t"#LIGHT_GREEN#[Continue...]#WHITE#"}, } } diff --git a/game/modules/tome/data/chats/melinda-fortress.lua b/game/modules/tome/data/chats/melinda-fortress.lua index c23cd9df13d19cfffb215afb9949ac9f6b30fea0..70dfba0fa087605a5e85f25a3ba0f7c807416f52 100644 --- a/game/modules/tome/data/chats/melinda-fortress.lua +++ b/game/modules/tome/data/chats/melinda-fortress.lua @@ -25,35 +25,35 @@ local butler = game.level:findEntity{define_as="BUTLER"} print("===", butler) newChat{ id="welcome", - text = [[Hi, sweety!]], + text = _t[[Hi, sweety!]], answers = { - {"#LIGHT_GREEN#[kiss her]#WHITE#"}, - {"Are you settling in fine?", cond=isNotSet"settle", action=set"settle", jump="settle"}, + {_t"#LIGHT_GREEN#[kiss her]#WHITE#"}, + {_t"Are you settling in fine?", cond=isNotSet"settle", action=set"settle", jump="settle"}, } } ql.wants_to = ql.wants_to or "derth" local dest = { - derth = [[I want to open my own little shop in Derth?]], - magic = [[I want to study magic at Angolwen?]], - antimagic = [[I want to train at Zigur?]], + derth = _t[[I want to open my own little shop in Derth?]], + magic = _t[[I want to study magic at Angolwen?]], + antimagic = _t[[I want to train at Zigur?]], } newChat{ id="settle", - text = [[Well let me say that tank is #{bold}#dreadful#{normal}#, but that weird butler says it is the only way. + text = ([[Well let me say that tank is #{bold}#dreadful#{normal}#, but that weird butler says it is the only way. I do start to feel better too. However I must say I get bored around here a little. -Do you remember, I once told you ]]..dest[ql.wants_to]..[[ Maybe we could find a way to get me there during the day and return for my treatment during the night?]], +Do you remember, I once told you %s Maybe we could find a way to get me there during the day and return for my treatment during the night?]]):tformat(dest[ql.wants_to]), answers = { - {"Oh yes, I think we could arrange that. Shadow, would it be possible to create a portal for her?", jump="portal", switch_npc=butler}, + {_t"Oh yes, I think we could arrange that. Shadow, would it be possible to create a portal for her?", jump="portal", switch_npc=butler}, } } newChat{ id="portal", - text = [[Yes Master. I will arrange for that right now. + text = _t[[Yes Master. I will arrange for that right now. She will be able to come and go unnoticed.]], answers = { - {"That is perfect.", jump="portal2", switch_npc=melinda, action=function(npc, player) + {_t"That is perfect.", jump="portal2", switch_npc=melinda, action=function(npc, player) local spot = game.level:pickSpot{type="portal-melinda", subtype="back"} if spot then local g = game.zone:makeEntityByName(game.level, "terrain", "TELEPORT_OUT_MELINDA") @@ -64,17 +64,17 @@ She will be able to come and go unnoticed.]], } newChat{ id="portal2", - text = [[Oh this is great, thank you! My own secret lair, my own life.]], + text = _t[[Oh this is great, thank you! My own secret lair, my own life.]], answers = { - {"I only wish your happiness, I am glad to provide.", jump="reward"}, + {_t"I only wish your happiness, I am glad to provide.", jump="reward"}, } } newChat{ id="reward", - text = [[#LIGHT_GREEN#*Looking all glamorous she comes closer*#WHITE# + text = _t[[#LIGHT_GREEN#*Looking all glamorous she comes closer*#WHITE# Now my sweet one, where were we the last time?]], answers = { - {"My memory fails me, care to help me remember? #LIGHT_GREEN#[smile playfully at her]", action=function(npc, player) + {_t"My memory fails me, care to help me remember? #LIGHT_GREEN#[smile playfully at her]", action=function(npc, player) player:setQuestStatus("love-melinda", engine.Quest.COMPLETED, "portal-done") world:gainAchievement("MELINDA_LUCKY", player) game:setAllowedBuild("cosmetic_bikini", true) diff --git a/game/modules/tome/data/chats/message-last-hope.lua b/game/modules/tome/data/chats/message-last-hope.lua index 77a1d4e3b845f1a96c481bd1cab1eb85f17a9cf7..75b108fda481cba779b46448d530cb67c147b318 100644 --- a/game/modules/tome/data/chats/message-last-hope.lua +++ b/game/modules/tome/data/chats/message-last-hope.lua @@ -18,13 +18,13 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[Well met, @playername@. I was sent with a message from King Tolak of Last Hope. + text = _t[[Well met, @playername@. I was sent with a message from King Tolak of Last Hope. I followed the trail of bodies that you left - very impressive! We are lucky to have you on our side. But enough talk; take this message. I must go now. #LIGHT_GREEN#He gives you a sealed scroll and vanishes into the shadows.#LAST#]], answers = { - {"Thank you for your courage.", action=function(npc, player) - local o, item, inven_id = npc:findInAllInventories("Sealed Scroll of Last Hope") + {_t"Thank you for your courage.", action=function(npc, player) + local o, item, inven_id = npc:findInAllInventories("Sealed Scroll of Last Hope", {raw_name=true}) if o then npc:removeObject(inven_id, item, true) player:addObject(player.INVEN_INVEN, o) diff --git a/game/modules/tome/data/chats/myssil.lua b/game/modules/tome/data/chats/myssil.lua index 77adeb472664477014e8714877704e71e5377977..3b6b94cda06454142eda28564801a966a30181c4 100644 --- a/game/modules/tome/data/chats/myssil.lua +++ b/game/modules/tome/data/chats/myssil.lua @@ -20,10 +20,10 @@ local p = game.party:findMember{main=true} if not p:attr("forbid_arcane") or p:attr("forbid_arcane") < 2 then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A Halfling woman stands before you, clad in dark steel plate.*#WHITE# + text = _t[[#LIGHT_GREEN#*A Halfling woman stands before you, clad in dark steel plate.*#WHITE# Take the test, and then we can talk.]], answers = { - {"But..."}, + {_t"But..."}, } } return "welcome" @@ -32,25 +32,25 @@ end newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A Halfling woman stands before you, clad in dark steel plate.*#WHITE# + text = _t[[#LIGHT_GREEN#*A Halfling woman stands before you, clad in dark steel plate.*#WHITE# I am Protector Myssil. Welcome to Zigur.]], answers = { - {"I require all the help I can get, not for my sake but for the town of Derth, to the northwest of here.", jump="save-derth", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and q:isCompleted("saved-derth") and not q:isCompleted("tempest-entrance") and not q:isStatus(q.DONE) end}, - {"Protector, I have dispatched the Tempest as you commanded.", jump="tempest-dead", cond=function(npc, player) + {_t"I require all the help I can get, not for my sake but for the town of Derth, to the northwest of here.", jump="save-derth", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and q:isCompleted("saved-derth") and not q:isCompleted("tempest-entrance") and not q:isStatus(q.DONE) end}, + {_t"Protector, I have dispatched the Tempest as you commanded.", jump="tempest-dead", cond=function(npc, player) local q = player:hasQuest("lightning-overload") return q and q:isCompleted("tempest-urkis-slain") and not q:isCompleted("antimagic-reward") end}, - {"Farewell, Protector."}, + {_t"Farewell, Protector."}, } } newChat{ id="save-derth", - text = [[Yes, we have sensed the blight of the eldritch forces there. I have people working to dispel the cloud, but the real threat is not there. + text = _t[[Yes, we have sensed the blight of the eldritch forces there. I have people working to dispel the cloud, but the real threat is not there. We know that a Tempest, a powerful Archmage who can control the storms, is responsible for the damage. Those wretched fools from Angolwen will not act. All corrupted! So you must act, @playername@. I will show you the location of this mage - high in the Daikara mountains. Erase him.]], answers = { - {"You can count on me, Protector.", action=function(npc, player) + {_t"You can count on me, Protector.", action=function(npc, player) player:hasQuest("lightning-overload"):create_entrance() game:unlockBackground("myssil", "Protector Myssil") end}, @@ -58,11 +58,11 @@ Erase him.]], } newChat{ id="tempest-dead", - text = [[So I have heard, @playername@. You prove worthy of your training. Go with the blessing of nature, @playername@ of Zigur. + text = _t[[So I have heard, @playername@. You prove worthy of your training. Go with the blessing of nature, @playername@ of Zigur. #LIGHT_GREEN#*She touches your skin. You can feel nature infusing your very being.*#WHITE# This shall help you on your travels. Farewell!]], answers = { - {"Thank you, Protector.", action=function(npc, player) + {_t"Thank you, Protector.", action=function(npc, player) player:hasQuest("lightning-overload"):create_entrance() if player:knowTalentType("wild-gift/fungus") then player:setTalentTypeMastery("wild-gift/fungus", player:getTalentTypeMastery("wild-gift/fungus") + 0.1) diff --git a/game/modules/tome/data/chats/norgan-saved.lua b/game/modules/tome/data/chats/norgan-saved.lua index 03fe9ecb1003ba1eb563a3a30ee5b2458bd722ed..a2c384f60e1f229045a648b3a2b4711463e93762 100644 --- a/game/modules/tome/data/chats/norgan-saved.lua +++ b/game/modules/tome/data/chats/norgan-saved.lua @@ -18,11 +18,11 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[Thank you, @playername@! We both survived for the wealth of the Empire. I will bring them the news and then rest. + text = _t[[Thank you, @playername@! We both survived for the wealth of the Empire. I will bring them the news and then rest. I do not think I want to see death so closely for some time now. Farewell.]], answers = { - {"For the Empire! Take care.", action=function(npc, player) + {_t"For the Empire! Take care.", action=function(npc, player) npc:disappear() world:gainAchievement("NORGAN_SAVED", player) end}, diff --git a/game/modules/tome/data/chats/orc-breeding-pits.lua b/game/modules/tome/data/chats/orc-breeding-pits.lua index 071f4ef43cbad815f6920970fd2f5ccd9754fc69..21639c3829081f9cc0ded042854974e608806a2f 100644 --- a/game/modules/tome/data/chats/orc-breeding-pits.lua +++ b/game/modules/tome/data/chats/orc-breeding-pits.lua @@ -18,32 +18,32 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A ray of light illuminates the gleam of steal amidst the grass. Investigating, you find a lone sun paladin lying stricken on the ground. Her wounds are minor, but her pallid features bely a poison that is taking its final toll. She whispers to you.*#WHITE# + text = _t[[#LIGHT_GREEN#*A ray of light illuminates the gleam of steal amidst the grass. Investigating, you find a lone sun paladin lying stricken on the ground. Her wounds are minor, but her pallid features bely a poison that is taking its final toll. She whispers to you.*#WHITE# Help, Help me. ]], answers = { - {"What should I do?", jump="next1"}, + {_t"What should I do?", jump="next1"}, } } newChat{ id="next1", - text = [[I found it... the abomination Aeryn sent me to seek out. The breeding pits of the orcs... It is more vile than you can imagine... They have it hidden away from their encampments, out of sight of all their people. Their mothers, their young, all there - all vulnerable! + text = _t[[I found it... the abomination Aeryn sent me to seek out. The breeding pits of the orcs... It is more vile than you can imagine... They have it hidden away from their encampments, out of sight of all their people. Their mothers, their young, all there - all vulnerable! #LIGHT_GREEN#*She pulls out a sketched map, and with some effort puts it in your palm.*#WHITE# This could be the final solution, the end to the war... forever. We must strike soon, before reinforcements... #LIGHT_GREEN#*She looks hard at you, exerting all her effort into a final pleading stare.*#WHITE#]], answers = { - {"I cannot do this myself... I will tell Aeryn about it, it is in her hands.", action=function(npc, player) + {_t"I cannot do this myself... I will tell Aeryn about it, it is in her hands.", action=function(npc, player) player:grantQuest("orc-breeding-pits") player:setQuestStatus("orc-breeding-pits", engine.Quest.COMPLETED, "wuss-out") end}, - {"I will go myself and ensure this is thoroughly dealt with.", action=function(npc, player) + {_t"I will go myself and ensure this is thoroughly dealt with.", action=function(npc, player) player:grantQuest("orc-breeding-pits") local q = player:hasQuest("orc-breeding-pits") q:reveal() end}, - {"You want me to kill mothers and children? This is barbaric, I'll have nothing to do with it!"}, + {_t"You want me to kill mothers and children? This is barbaric, I'll have nothing to do with it!"}, } } diff --git a/game/modules/tome/data/chats/paradoxology.lua b/game/modules/tome/data/chats/paradoxology.lua index b6c91665733a146f56cae96643f5ada0451246b1..d813a14de0af8613397f227927f42b291624b956 100644 --- a/game/modules/tome/data/chats/paradoxology.lua +++ b/game/modules/tome/data/chats/paradoxology.lua @@ -18,14 +18,14 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands... you. You seem to be slightly older, and by the look of it you have been through hell.*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands... you. You seem to be slightly older, and by the look of it you have been through hell.*#WHITE# NO! YOU CAN'T! NO GOING THERE! YOU... I... YOU MUST NOT GO THERE! THIS CANNOT BE AVOIDED! I MUST STOP IT! PLEASE DON'T! I MUST KILL MYSELF TO PROTECT MYSELF! #LIGHT_GREEN#*Before you can react, you... I... yourself vanishes into a rift hanging in midair.*#WHITE# ]], answers = { - {"What the..."}, + {_t"What the..."}, } } diff --git a/game/modules/tome/data/chats/player-inscription.lua b/game/modules/tome/data/chats/player-inscription.lua index 9bb6fcfd776785ebd791363b41413d84ba4afc02..5ff1ed6532663c66858a9d6b021a7a90f8a0d44e 100644 --- a/game/modules/tome/data/chats/player-inscription.lua +++ b/game/modules/tome/data/chats/player-inscription.lua @@ -34,13 +34,13 @@ for i = 1, player.max_inscriptions do player:removeObject(inven, item) end, on_select=function(npc, player) game.tooltip_x, game.tooltip_y = 1, 1 - game:tooltipDisplayAtMap(game.w, game.h, "#GOLD#"..t.name.."#LAST#\n"..tostring(player:getTalentFullDescription(t))) + game:tooltipDisplayAtMap(game.w, game.h, ("#GOLD#%s#LAST#\n%s"):tformat(t.name,tostring(player:getTalentFullDescription(t)))) end, } end end if not replace_same and player.inscriptions_slots_added < 2 and player.unused_talents_types > 0 then - answers[#answers+1] = {"Buy a new slot with one #{bold}#talent category point#{normal}#.", action=function(npc, player) + answers[#answers+1] = {_t"Buy a new slot with one #{bold}#talent category point#{normal}#.", action=function(npc, player) player.unused_talents_types = player.unused_talents_types - 1 player.max_inscriptions = player.max_inscriptions + 1 player.inscriptions_slots_added = player.inscriptions_slots_added + 1 @@ -49,11 +49,11 @@ if not replace_same and player.inscriptions_slots_added < 2 and player.unused_ta end} end -answers[#answers+1] = {"Cancel"} +answers[#answers+1] = {_t"Cancel"} newChat{ id="welcome", - text = replace_same and [[You have too many of this type of inscription. You can only override an existing one. The old inscription will be lost.]] - or [[You have reached your maximum number of inscriptions (infusions/runes). + text = replace_same and _t[[You have too many of this type of inscription. You can only override an existing one. The old inscription will be lost.]] + or _t[[You have reached your maximum number of inscriptions (infusions/runes). If you have unassigned #{bold}#talent category points#{normal}# you can use one to create a new slot (up to 5). You can replace an existing one or cancel. The old inscription will be lost.]], diff --git a/game/modules/tome/data/chats/point-zero-zemekkys.lua b/game/modules/tome/data/chats/point-zero-zemekkys.lua index 2d0db8d84bd88d7a9017a8c46e3d970969b29d19..69588b91615108e7a5cb23ced04446c00b5df1f1 100644 --- a/game/modules/tome/data/chats/point-zero-zemekkys.lua +++ b/game/modules/tome/data/chats/point-zero-zemekkys.lua @@ -19,20 +19,20 @@ newChat{ id="welcome", action = function(npc, player) npc.talked_times = (npc.talked_times or 0) + 1 end, - text = [[@playername@, nice to see you again! Or is this the first time that you have seen me?]], + text = _t[[@playername@, nice to see you again! Or is this the first time that you have seen me?]], answers = { - {"Farewell, Grand Keeper."}, - {"Yes, this is our first meeting.", jump="first", cond=function(npc, player) return not npc.talked_times end}, + {_t"Farewell, Grand Keeper."}, + {_t"Yes, this is our first meeting.", jump="first", cond=function(npc, player) return not npc.talked_times end}, } } newChat{ id="first", - text = [[Ah, for you perhaps, but not for me. + text = _t[[Ah, for you perhaps, but not for me. Listen, someday you will encounter me again but it will not be me you see now. It will be younger me, if you will. This is very important: do not tell my previous me about me. Understood?]], answers = { - {"I think so..."}, - {"Yes, Grand Keeper."}, + {_t"I think so..."}, + {_t"Yes, Grand Keeper."}, } } diff --git a/game/modules/tome/data/chats/pre-charred-scar-eruan.lua b/game/modules/tome/data/chats/pre-charred-scar-eruan.lua index 8fda8fa7fcb60da2f287f8ccbbcf126250528273..0c02ad05fe4393b63cc118bf53c796d48a150409 100644 --- a/game/modules/tome/data/chats/pre-charred-scar-eruan.lua +++ b/game/modules/tome/data/chats/pre-charred-scar-eruan.lua @@ -18,12 +18,12 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[@playername@, I am one of a party of Sun Paladins sent by Aeryn. We arrived here tracking the orcs. + text = _t[[@playername@, I am one of a party of Sun Paladins sent by Aeryn. We arrived here tracking the orcs. They have gone through the portal, and a few of my friends were pulled in with them. We captured an orc earlier. He revealed that the staff you seek is to be used to absorb the power of a remote place for dark rituals. You must traverse this portal, if you have any means to, and stop the orcs.]], answers = { - {"I think I can use the portal. Do not worry!"}, + {_t"I think I can use the portal. Do not worry!"}, } } diff --git a/game/modules/tome/data/chats/pre-charred-scar.lua b/game/modules/tome/data/chats/pre-charred-scar.lua index b53e5bc55ac00d713becc7f0a7c987d5a9737ef3..37940482d594abd2b9b1daf30c24d2b2a9de0ca2 100644 --- a/game/modules/tome/data/chats/pre-charred-scar.lua +++ b/game/modules/tome/data/chats/pre-charred-scar.lua @@ -18,20 +18,20 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[*#LIGHT_GREEN#Suddenly a voice appears in your head.#WHITE#* + text = _t[[*#LIGHT_GREEN#Suddenly a voice appears in your head.#WHITE#* @playername@, this is High Sun Paladin Aeryn of the Sunwall. I am communicating with you by the power of the Anorithil. I have some urgent information for you: the staff you were looking for has been located.]], answers = { - {"Where?!", jump="where"}, + {_t"Where?!", jump="where"}, } } newChat{ id="where", - text = [[One of our patrols noticed some strange orc movements around the southern part of the continent, in the desert of Erúan. + text = _t[[One of our patrols noticed some strange orc movements around the southern part of the continent, in the desert of Erúan. A group of orcs were guarding something that looked like the staff you asked about. You should go there to investigate. This might be your only chance.]], answers = { - {"I will, right now!"}, + {_t"I will, right now!"}, } } return "welcome" diff --git a/game/modules/tome/data/chats/ring-of-blood-master.lua b/game/modules/tome/data/chats/ring-of-blood-master.lua index 8159d0288660b04c428009f9b2206e941279c106..e7c851f5700c66b6d6d2b5ed148831ca995685cd 100644 --- a/game/modules/tome/data/chats/ring-of-blood-master.lua +++ b/game/modules/tome/data/chats/ring-of-blood-master.lua @@ -22,44 +22,44 @@ local function attack(str) end newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a small humanoid creature with a disproportionate head.*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands a small humanoid creature with a disproportionate head.*#WHITE# Ah, what have we here? @playerdescriptor.race@, I believe you have turned at the wrong corner.]], answers = { - {"So it would seem. What is going on here?", jump="what"}, + {_t"So it would seem. What is going on here?", jump="what"}, } } newChat{ id="what", - text = [[This is my Ring of Blood! Listen, you have now two choices. + text = _t[[This is my Ring of Blood! Listen, you have now two choices. Since you do not look like slave fodder to me I will offer to let you pay to play the game. If you feel you cannot take part in a slaver's game, I am afraid you will need to... disappear.]], answers = { - {"Slavers? This is so wrong! [attack]", action=attack("You think so? Die.")}, - {"Game? I like playing, what's this about?", jump="game"}, + {_t"Slavers? This is so wrong! [attack]", action=attack("You think so? Die.")}, + {_t"Game? I like playing, what's this about?", jump="game"}, } } newChat{ id="game", - text = [[Well, you see, it's quite simple. I will mentally take control of various wild creatures or slaves while you use the orb of command on the other side of this room to take control of a slave. + text = _t[[Well, you see, it's quite simple. I will mentally take control of various wild creatures or slaves while you use the orb of command on the other side of this room to take control of a slave. Then we fight using our pawns for 10 rounds. If your slave survives you will win the Bloodcaller.]], answers = { - {"What if I lose?", jump="lose"}, - {"Blood, death without self-harm risks? Great fun!", jump="price"}, + {_t"What if I lose?", jump="lose"}, + {_t"Blood, death without self-harm risks? Great fun!", jump="price"}, } } newChat{ id="lose", - text = [[Normally you would be taken as a slave, but you look like you would be more useful as a full-time player, so you can just try again.]], + text = _t[[Normally you would be taken as a slave, but you look like you would be more useful as a full-time player, so you can just try again.]], answers = { - {"Blood, death without self-harm risks? Great fun!", jump="price"}, + {_t"Blood, death without self-harm risks? Great fun!", jump="price"}, } } newChat{ id="price", - text = [[Superb. Oh yes, before I forget, to use the orb you will need to pay the standard fee of 150 gold pieces. + text = _t[[Superb. Oh yes, before I forget, to use the orb you will need to pay the standard fee of 150 gold pieces. I'm sure this is small money to an adventurer of your class.]], answers = { - {"150 gold? Err... yes, sure.", action=function(npc) npc.can_talk = nil end}, + {_t"150 gold? Err... yes, sure.", action=function(npc) npc.can_talk = nil end}, } } diff --git a/game/modules/tome/data/chats/ring-of-blood-orb.lua b/game/modules/tome/data/chats/ring-of-blood-orb.lua index be7969ad66508a51f18d74d90186d9489c1db93c..dfd26f43247b1995ffe3c8ae44786b8fcc375517 100644 --- a/game/modules/tome/data/chats/ring-of-blood-orb.lua +++ b/game/modules/tome/data/chats/ring-of-blood-orb.lua @@ -18,23 +18,23 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*You place your hands on the orb.*#WHITE# + text = _t[[#LIGHT_GREEN#*You place your hands on the orb.*#WHITE# You must provide 150 gold to take part in the fight.]], answers = { - {"[Pay 150 gold]", jump="pay", + {_t"[Pay 150 gold]", jump="pay", cond=function(npc, player) return player:hasQuest("ring-of-blood") and player:hasQuest("ring-of-blood"):find_master() and player.money >= 150 end, action=function(npc, player) player:incMoney(-150) end }, - {"[Leave]"}, + {_t"[Leave]"}, } } newChat{ id="pay", - text = [[Let the fight start!]], + text = _t[[Let the fight start!]], answers = { - {"Bring it on!", action=function(npc, player) player:hasQuest("ring-of-blood"):start_game() end}, + {_t"Bring it on!", action=function(npc, player) player:hasQuest("ring-of-blood"):start_game() end}, } } diff --git a/game/modules/tome/data/chats/ring-of-blood-win.lua b/game/modules/tome/data/chats/ring-of-blood-win.lua index 2c1d6c3caea5c9991dbb52c399f63a01e3a318c6..858fe4d1724e8006534d1f13251023be9986b97d 100644 --- a/game/modules/tome/data/chats/ring-of-blood-win.lua +++ b/game/modules/tome/data/chats/ring-of-blood-win.lua @@ -18,11 +18,11 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[So, you tasted blood? Liked it? I am sure you did; you are just that kind of people. + text = _t[[So, you tasted blood? Liked it? I am sure you did; you are just that kind of people. Anyway, I suppose you deserve your reward. You can always participate again for fun, if you've got the gold to spare.]], answers = { - {"Thanks, it was fun!", action=function(npc, player) player:hasQuest("ring-of-blood"):reward(player) end}, + {_t"Thanks, it was fun!", action=function(npc, player) player:hasQuest("ring-of-blood"):reward(player) end}, } } diff --git a/game/modules/tome/data/chats/sage-kitty.lua b/game/modules/tome/data/chats/sage-kitty.lua index 47585048cf183c63b1a54733a235cf370a04b45e..19483166d5a86d4495636685f790cbb27ae54a00 100644 --- a/game/modules/tome/data/chats/sage-kitty.lua +++ b/game/modules/tome/data/chats/sage-kitty.lua @@ -18,29 +18,29 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a cute little orange cat. It looks hungry and looks at you.*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands a cute little orange cat. It looks hungry and looks at you.*#WHITE# Meowww? ]], answers = { - {"Oh kitty kitty!", jump="kitty"}, - {"No time for cats!"}, + {_t"Oh kitty kitty!", jump="kitty"}, + {_t"No time for cats!"}, } } newChat{ id="kitty", - text = [[#LIGHT_GREEN#*It rubs up against your leg and purrs.*#WHITE# + text = _t[[#LIGHT_GREEN#*It rubs up against your leg and purrs.*#WHITE# Rrrrrrrrrrrr. ]], answers = { - {"Hey maybe you would like some of this delicious lookin troll intestines? #LIGHT_GREEN#[Feed him the intestines]#WHITE#", jump="pet", cond=function(npc, player) return game.party:hasIngredient("TROLL_INTESTINE") end}, - {"Sorry little fellow, I can't help you."}, + {_t"Hey maybe you would like some of this delicious lookin troll intestines? #LIGHT_GREEN#[Feed him the intestines]#WHITE#", jump="pet", cond=function(npc, player) return game.party:hasIngredient("TROLL_INTESTINE") end}, + {_t"Sorry little fellow, I can't help you."}, } } newChat{ id="pet", - text = [[#LIGHT_GREEN#*It eats it all and looks happy. After a while it strolls away. Somehow you feel you have not seen the last of it.*#WHITE#]], + text = _t[[#LIGHT_GREEN#*It eats it all and looks happy. After a while it strolls away. Somehow you feel you have not seen the last of it.*#WHITE#]], answers = { - {"#LIGHT_GREEN#[Leave]", action=function(npc, player) + {_t"#LIGHT_GREEN#[Leave]", action=function(npc, player) game.state.kitty_fed = true end}, } diff --git a/game/modules/tome/data/chats/shadow-crypt-yeek-clone.lua b/game/modules/tome/data/chats/shadow-crypt-yeek-clone.lua index 763ea50303df68b914345c6aaf01cf5477d5b82a..9252f3f86690a997ba67e540f8f21708e075b4c8 100644 --- a/game/modules/tome/data/chats/shadow-crypt-yeek-clone.lua +++ b/game/modules/tome/data/chats/shadow-crypt-yeek-clone.lua @@ -23,42 +23,42 @@ for uid, e in pairs(game.level.entities) do if e.define_as == "CULTIST_RAK_SHOR" if cultist then newChat{ id="welcome", - text = [[No time to talk fellow Wayist! ATTACK! FOR THE WAY!]], + text = _t[[No time to talk fellow Wayist! ATTACK! FOR THE WAY!]], answers = { - {"[leave]"}, + {_t"[leave]"}, } } else newChat{ id="welcome", - text = [[The foolish cultist that created me is no more. What am I to do now...]], + text = _t[[The foolish cultist that created me is no more. What am I to do now...]], answers = { - {"You are me, come with me!", jump="nocome"}, - {"You should head back to Irkkk.", jump="irkkk"}, + {_t"You are me, come with me!", jump="nocome"}, + {_t"You should head back to Irkkk.", jump="irkkk"}, } } newChat{ id="nocome", - text = [[I fear that would get confusing very fast. I think I will go back to Irkkk. Farewell my clone!]], + text = _t[[I fear that would get confusing very fast. I think I will go back to Irkkk. Farewell my clone!]], answers = { - {"Clone? No you are the clone.", jump="clone"}, - {"Farewell.", action=function(npc, player) npc:disappear() end}, + {_t"Clone? No you are the clone.", jump="clone"}, + {_t"Farewell.", action=function(npc, player) npc:disappear() end}, } } newChat{ id="clone", - text = [[Sure... if you prefer to think about it this way. We are all part of The Way anyway.]], + text = _t[[Sure... if you prefer to think about it this way. We are all part of The Way anyway.]], answers = { - {"Farewell.", action=function(npc, player) npc:disappear() end}, + {_t"Farewell.", action=function(npc, player) npc:disappear() end}, } } newChat{ id="irkkk", - text = [[I think so too, farewell my clone.]], + text = _t[[I think so too, farewell my clone.]], answers = { - {"Clone? No you are the clone.", jump="clone"}, - {"Farewell.", action=function(npc, player) npc:disappear() end}, + {_t"Clone? No you are the clone.", jump="clone"}, + {_t"Farewell.", action=function(npc, player) npc:disappear() end}, } } diff --git a/game/modules/tome/data/chats/shertul-fortress-butler.lua b/game/modules/tome/data/chats/shertul-fortress-butler.lua index 957d24c68279e7db22ba866c226de78628de978c..3ded528458c602e07758dcc55866a14c475d7f52 100644 --- a/game/modules/tome/data/chats/shertul-fortress-butler.lua +++ b/game/modules/tome/data/chats/shertul-fortress-butler.lua @@ -24,47 +24,47 @@ local set = function(what) return function(npc, player) q:setStatus(q.COMPLETED, local isNotSet = function(what) return function(npc, player) return not q:isCompleted("chat-"..what) end end newChat{ id="welcome", - text = [[*#LIGHT_GREEN#The creature slowly turns to you. You hear its terrible voice directly in your head.#WHITE#* + text = _t[[*#LIGHT_GREEN#The creature slowly turns to you. You hear its terrible voice directly in your head.#WHITE#* Welcome, master.]], answers = { - {"What are you, and what is this place?", jump="what", cond=isNotSet"what", action=set"what"}, - {"Master? I am not your mas...", jump="master", cond=isNotSet"master", action=set"master"}, - {"Why do I understand you? The texts are unreadable to me.", jump="understand", cond=isNotSet"understand", action=set"understand"}, - {"What can I do here?", jump="storage", cond=isNotSet"storage", action=set"storage"}, - {"What else can this place do?", jump="energy", cond=isNotSet"energy", action=set"energy"}, - {"Would it be possible to improve my Cloak of Deception so I do not need to wear it to pass as a living being?", jump="permanent-cloak", + {_t"What are you, and what is this place?", jump="what", cond=isNotSet"what", action=set"what"}, + {_t"Master? I am not your mas...", jump="master", cond=isNotSet"master", action=set"master"}, + {_t"Why do I understand you? The texts are unreadable to me.", jump="understand", cond=isNotSet"understand", action=set"understand"}, + {_t"What can I do here?", jump="storage", cond=isNotSet"storage", action=set"storage"}, + {_t"What else can this place do?", jump="energy", cond=isNotSet"energy", action=set"energy"}, + {_t"Would it be possible to improve my Cloak of Deception so I do not need to wear it to pass as a living being?", jump="permanent-cloak", cond=function(npc, player) local cloak = player:findInAllInventoriesBy("define_as", "CLOAK_DECEPTION") return not q:isCompleted("permanent-cloak") and q:isCompleted("transmo-chest") and cloak end}, - {"You asked me to come, about a farportal?", jump="farportal", cond=function() return q:isCompleted("farportal") and not q:isCompleted("farportal-spawn") end}, - {"You asked me to come, about the rod of recall?", jump="recall", cond=function() return q:isCompleted("recall") and not q:isCompleted("recall-done") end}, - {"Would it be possible for my Transmogrification Chest to automatically extract gems?", jump="transmo-gems", cond=function(npc, player) return not q:isCompleted("transmo-chest-extract-gems") and q:isCompleted("transmo-chest") and player:knowTalent(player.T_EXTRACT_GEMS) end}, - {"Are there any training facilities?", jump="training", cond=function() return not q:isCompleted("training") end}, - {"Can you use your magic to alter the appearance of my gear?", jump="shimmer", cond=function() return not q:isCompleted("shimmer") end}, - {"I find your appearance unsettling. Any way you can change it?", jump="changetile", cond=function() return q:isCompleted("recall-done") end}, - {"I have come upon a strange thing indeed. #LIGHT_GREEN#[tell him about Melinda]", jump="cure-melinda", cond=function() return ql and ql:isStatus(engine.Quest.COMPLETED, "saved-beach") and not ql:isStatus(engine.Quest.FAILED) and not ql:isStatus(engine.Quest.COMPLETED, "can_come_fortress") end}, - {"[leave]"}, + {_t"You asked me to come, about a farportal?", jump="farportal", cond=function() return q:isCompleted("farportal") and not q:isCompleted("farportal-spawn") end}, + {_t"You asked me to come, about the rod of recall?", jump="recall", cond=function() return q:isCompleted("recall") and not q:isCompleted("recall-done") end}, + {_t"Would it be possible for my Transmogrification Chest to automatically extract gems?", jump="transmo-gems", cond=function(npc, player) return not q:isCompleted("transmo-chest-extract-gems") and q:isCompleted("transmo-chest") and player:knowTalent(player.T_EXTRACT_GEMS) end}, + {_t"Are there any training facilities?", jump="training", cond=function() return not q:isCompleted("training") end}, + {_t"Can you use your magic to alter the appearance of my gear?", jump="shimmer", cond=function() return not q:isCompleted("shimmer") end}, + {_t"I find your appearance unsettling. Any way you can change it?", jump="changetile", cond=function() return q:isCompleted("recall-done") end}, + {_t"I have come upon a strange thing indeed. #LIGHT_GREEN#[tell him about Melinda]", jump="cure-melinda", cond=function() return ql and ql:isStatus(engine.Quest.COMPLETED, "saved-beach") and not ql:isStatus(engine.Quest.FAILED) and not ql:isStatus(engine.Quest.COMPLETED, "can_come_fortress") end}, + {_t"[leave]"}, } } newChat{ id="master", - text = [[*#LIGHT_GREEN#The creature glares at you.#WHITE#* + text = _t[[*#LIGHT_GREEN#The creature glares at you.#WHITE#* You possess a control rod. You are the master.]], answers = { - {"Err... ok.", jump="welcome"}, + {_t"Err... ok.", jump="welcome"}, } } newChat{ id="understand", - text = [[*#LIGHT_GREEN#The creature glares at you.#WHITE#* + text = _t[[*#LIGHT_GREEN#The creature glares at you.#WHITE#* You are the master; you have the rod. I am created to speak to the master.]], answers = { - {"Err... ok.", jump="welcome"}, + {_t"Err... ok.", jump="welcome"}, } } newChat{ id="what", - text = [[*#LIGHT_GREEN#The creature glares at you with intensity. You 'see' images in your head. + text = _t[[*#LIGHT_GREEN#The creature glares at you with intensity. You 'see' images in your head. You see titanic wars in an age now forgotten. You see armies of what you suppose are Sher'Tuls since they look like the shadow. They fight with weapons, magic and other things. They fight gods. They hunt them down, killing or banishing them. You see great fortresses like this one, flying all over the skies of Eyal - shining bastions of power glittering in the young sun. @@ -75,104 +75,104 @@ You shake your head as the vision dissipates, and your normal sight comes back s #WHITE#* ]], answers = { - {"Those are Sher'Tuls? They fought the gods?!", jump="godslayers"}, + {_t"Those are Sher'Tuls? They fought the gods?!", jump="godslayers"}, } } newChat{ id="godslayers", - text = [[They had to. They forged terrible weapons of war. They won.]], + text = _t[[They had to. They forged terrible weapons of war. They won.]], answers = { - {"But then where are they now if they won?", jump="where"}, + {_t"But then where are they now if they won?", jump="where"}, } } newChat{ id="where", - text = [[They are gone now. I cannot tell you more.]], + text = _t[[They are gone now. I cannot tell you more.]], answers = { - {"But I am the master!", jump="where"}, - {"Fine.", jump="welcome"}, + {_t"But I am the master!", jump="where"}, + {_t"Fine.", jump="welcome"}, } } newChat{ id="storage", - text = [[*#LIGHT_GREEN#The creature glares at you.#WHITE#* + text = _t[[*#LIGHT_GREEN#The creature glares at you.#WHITE#* You are the master. You can use this place as you desire. However, most of the energies are depleted and only some rooms are usable. To the south you will find the storage room.]], answers = { - {"Thanks.", jump="welcome"}, + {_t"Thanks.", jump="welcome"}, } } newChat{ id="energy", - text = [[This Fortress is designed as a mobile base for the Godslayers - it can fly. + text = _t[[This Fortress is designed as a mobile base for the Godslayers - it can fly. It is also equiped with various facilities: exploratory farportal, emergency containment field, remote storage, ... However, the Fortress is badly damaged and has lain dormant for too long. Its energies are nearly depleted. Take this Transmogrification Chest. It is linked by a permanent farportal to the Fortress. Any item you put inside will be sent to the power core and dismantled for energy. There are, however, unwanted byproducts to this operation: the generation of a metal known as gold. It is of no use to the Fortress and thus will be sent back to you.]], answers = { - {"I will, thanks.", jump="welcome", action=function() q:spawn_transmo_chest() end, cond=function(npc, player) return not player:attr("has_transmo") end}, - {"I have already found such a chest in my travel. Will it work?", jump="alreadychest", action=function() q:setStatus(q.COMPLETED, "transmo-chest") end, cond=function(npc, player) return player:attr("has_transmo") end}, + {_t"I will, thanks.", jump="welcome", action=function() q:spawn_transmo_chest() end, cond=function(npc, player) return not player:attr("has_transmo") end}, + {_t"I have already found such a chest in my travel. Will it work?", jump="alreadychest", action=function() q:setStatus(q.COMPLETED, "transmo-chest") end, cond=function(npc, player) return player:attr("has_transmo") end}, } } newChat{ id="alreadychest", - text = [[Yes, it will. I will attune it to this fortress. + text = _t[[Yes, it will. I will attune it to this fortress. Done.]], answers = { - {"Thanks.", jump="welcome"}, + {_t"Thanks.", jump="welcome"}, } } newChat{ id="farportal", - text = [[Long ago the Sher'tuls used farportals not only for transportation to known locations, but also to explore new parts of the world, or even other worlds. + text = _t[[Long ago the Sher'tuls used farportals not only for transportation to known locations, but also to explore new parts of the world, or even other worlds. This Fortress is equipped with an exploratory farportal, and now has enough energy to allow one teleportation. Each teleportation will take you to a random part of the universe and use 45 energy. Beware that the return portal may not be nearby your arrival point; you will need to find it. You can use the rod of recall to try to force an emergency recall, but it has high chances of breaking the exploratory farportal forever. You may use the farportal; however, beware - I sense a strange presence in the farportal room.]], answers = { - {"I will check it out, thanks.", action=function() q:spawn_farportal_guardian() end}, + {_t"I will check it out, thanks.", action=function() q:spawn_farportal_guardian() end}, } } newChat{ id="recall", - text = [[The rod of recall you possess is not a Sher'tul artifact, but it is based on Sher'tul design. + text = _t[[The rod of recall you possess is not a Sher'tul artifact, but it is based on Sher'tul design. The Fortress now has enough energy to upgrade it. It can be changed to recall you to the Fortress.]], answers = { - {"I like it the way it is now. Thanks anyway."}, - {"That could be quite useful. Yes, please do it.", action=function() q:upgrade_rod() end}, + {_t"I like it the way it is now. Thanks anyway."}, + {_t"That could be quite useful. Yes, please do it.", action=function() q:upgrade_rod() end}, } } newChat{ id="training", - text = [[Yes master, a training facility is available to the north, but it is not yet powered on. + text = _t[[Yes master, a training facility is available to the north, but it is not yet powered on. I will need to use 50 energy to do this.]], answers = { - {"Maybe later."}, - {"That could be quite useful. Yes, please do it.", cond=function() return q.shertul_energy >= 50 end, action=function() q:open_training() end}, + {_t"Maybe later."}, + {_t"That could be quite useful. Yes, please do it.", cond=function() return q.shertul_energy >= 50 end, action=function() q:open_training() end}, } } newChat{ id="shimmer", - text = [[Yes master, the Mirror of Reflections is what you need. It is currently dormant but could be re-activated. -I will need to use 10 energy to do this.]]..(profile:isDonator(1) and "" or "\n#{italic}##CRIMSON#This feature is purely cosmetic is available only to donators/buyers. You can unlock the room and use the preview but you will not be able to validate your choices.#{normal}#"), + text = _t[[Yes master, the Mirror of Reflections is what you need. It is currently dormant but could be re-activated. +I will need to use 10 energy to do this.]]..(profile:isDonator(1) and "" or _t"\n#{italic}##CRIMSON#This feature is purely cosmetic is available only to donators/buyers. You can unlock the room and use the preview but you will not be able to validate your choices.#{normal}#"), answers = { - {"Maybe later."}, - {"That could be quite nice. Yes, please do it.", cond=function() return q.shertul_energy >= 10 end, action=function() q:open_shimmer() end}, + {_t"Maybe later."}, + {_t"That could be quite nice. Yes, please do it.", cond=function() return q.shertul_energy >= 10 end, action=function() q:open_shimmer() end}, } } newChat{ id="transmo-gems", - text = [[Ah yes, you seem to master the simple art of alchemy. I can change the chest to automatically use your power to extract a gem if the transmogrification of the gem would reward more energy. + text = _t[[Ah yes, you seem to master the simple art of alchemy. I can change the chest to automatically use your power to extract a gem if the transmogrification of the gem would reward more energy. However, I will need to use 25 energy to do this.]], answers = { - {"Maybe sometime later."}, - {"That could be quite useful. Yes, please do it.", cond=function() return q.shertul_energy >= 25 end, action=function() q:upgrade_transmo_gems() end}, + {_t"Maybe sometime later."}, + {_t"That could be quite useful. Yes, please do it.", cond=function() return q.shertul_energy >= 25 end, action=function() q:upgrade_transmo_gems() end}, } } newChat{ id="changetile", - text = [[I can alter the Fortress holographic projection matrix to accomodate your racial tastes. This will require 60 energy, however.]], + text = _t[[I can alter the Fortress holographic projection matrix to accomodate your racial tastes. This will require 60 energy, however.]], answers = { - {"Can you try for a human female appearance please?", cond=function() return q.shertul_energy >= 60 end, action=function(npc, player) + {_t"Can you try for a human female appearance please?", cond=function() return q.shertul_energy >= 60 end, action=function(npc, player) q.shertul_energy = q.shertul_energy - 60 npc.replace_display = mod.class.Actor.new{ add_mos={{image = "npc/humanoid_female_sluttymaid.png", display_y=-1, display_h=2}}, @@ -183,7 +183,7 @@ newChat{ id="changetile", game.level.map:updateMap(npc.x, npc.y) game.level.map:particleEmitter(npc.x, npc.y, 1, "demon_teleport") end}, - {"Can you try for a human male appearance please?", cond=function() return q.shertul_energy >= 60 end, action=function(npc, player) + {_t"Can you try for a human male appearance please?", cond=function() return q.shertul_energy >= 60 end, action=function(npc, player) q.shertul_energy = q.shertul_energy - 60 npc.replace_display = mod.class.Actor.new{ image = "invis.png", @@ -195,23 +195,23 @@ newChat{ id="changetile", game.level.map:updateMap(npc.x, npc.y) game.level.map:particleEmitter(npc.x, npc.y, 1, "demon_teleport") end}, - {"Please revert to your default appearance.", cond=function() return q.shertul_energy >= 60 end, action=function(npc, player) + {_t"Please revert to your default appearance.", cond=function() return q.shertul_energy >= 60 end, action=function(npc, player) q.shertul_energy = q.shertul_energy - 60 npc.replace_display = nil npc:removeAllMOs() game.level.map:updateMap(npc.x, npc.y) game.level.map:particleEmitter(npc.x, npc.y, 1, "demon_teleport") end}, - {"Well, you do not look so bad actually. Let it be for now."}, + {_t"Well, you do not look so bad actually. Let it be for now."}, } } newChat{ id="permanent-cloak", - text = [[Yes Master. I can use 10 energy to infuse your cloak. When you take it off the effect should still persist. + text = _t[[Yes Master. I can use 10 energy to infuse your cloak. When you take it off the effect should still persist. However, I suggest you still carry it with you in case something manages to remove it from you.]], answers = { - {"Not now."}, - {"That could be quite useful. Yes, please do it.", action=function(npc, player) + {_t"Not now."}, + {_t"That could be quite useful. Yes, please do it.", action=function(npc, player) local cloak = player:findInAllInventoriesBy("define_as", "CLOAK_DECEPTION") cloak.upgraded_cloak = true player.permanent_undead_cloak = true -- Prevents the effect being removed from moving the flags @@ -222,10 +222,10 @@ However, I suggest you still carry it with you in case something manages to remo } newChat{ id="cure-melinda", - text = [[Demonic taint. Yes I have a way to help in the archives. However this is a long process, the subject will need to live here for a while. + text = _t[[Demonic taint. Yes I have a way to help in the archives. However this is a long process, the subject will need to live here for a while. She will have to spend 8 hours per day in the regeneration tank.]], answers = { - {"This is great news! I will tell her at once.", action=function(npc, player) + {_t"This is great news! I will tell her at once.", action=function(npc, player) player:setQuestStatus("love-melinda", engine.Quest.COMPLETED, "can_come_fortress") end}, } diff --git a/game/modules/tome/data/chats/shertul-fortress-caldizar.lua b/game/modules/tome/data/chats/shertul-fortress-caldizar.lua index da6798d70b4d80307bcae7121cf29f22ca60fe6b..26fba39e9d5310443637994fbcd0483d28913e2b 100644 --- a/game/modules/tome/data/chats/shertul-fortress-caldizar.lua +++ b/game/modules/tome/data/chats/shertul-fortress-caldizar.lua @@ -25,19 +25,19 @@ if o then has_staff = true end local speak if has_staff then - speak = [["You should not be here. How di-"#{normal}# It stops abruptly, and its attention seems to turn to the staff in your hands. #{italic}#"How did you get that?! You fool, you do not know what forces you play with! Get it away from here - BEGONE!"]] + speak = _t[["You should not be here. How di-"#{normal}# It stops abruptly, and its attention seems to turn to the staff in your hands. #{italic}#"How did you get that?! You fool, you do not know what forces you play with! Get it away from here - BEGONE!"]] else - speak = [["You should not be here. How did you get here?! BEGONE!"]] + speak = _t[["You should not be here. How did you get here?! BEGONE!"]] end newChat{ id="welcome", - text = [[#{italic}#As you open the door you stare in amazement at what is beyond. A creature stands before you, with long tentacle-like appendages and a squat bump in place of a head. An intense aura of power radiates from this being unlike anything you've ever felt before. It can only be a Sher'Tul. A living Sher'Tul! + text = ([[#{italic}#As you open the door you stare in amazement at what is beyond. A creature stands before you, with long tentacle-like appendages and a squat bump in place of a head. An intense aura of power radiates from this being unlike anything you've ever felt before. It can only be a Sher'Tul. A living Sher'Tul! -But your wonder is cut short as the Sher'Tul notices you, and you feel its intense concentration bear down on you like an unstoppable force. A voice in your head booms, #{normal}#]]..speak..[[#{italic}# +But your wonder is cut short as the Sher'Tul notices you, and you feel its intense concentration bear down on you like an unstoppable force. A voice in your head booms, #{normal}#%s#{italic}# -A wave of mental and magical power blasts into you with the might of a falling star. You are lifted into the air, and intense pressure bears down on every inch of your skin, threatening to crush you into nothingness. You try to resist for a moment, until--#{normal}#]], +A wave of mental and magical power blasts into you with the might of a falling star. You are lifted into the air, and intense pressure bears down on every inch of your skin, threatening to crush you into nothingness. You try to resist for a moment, until--#{normal}#]]):tformat(speak), answers = { - {"[continue]", jump="next", action=function(npc, player) + {_t"[continue]", jump="next", action=function(npc, player) game:changeLevel(1, "shertul-fortress", {direct_switch=true}) local spot = game.level:pickSpot{type="spawn", subtype="farportal"} or {x=39, y=29} game.player:move(spot.x, spot.y, true) @@ -48,9 +48,9 @@ A wave of mental and magical power blasts into you with the might of a falling s } newChat{ id="next", - text = [[#{italic}#You wake up suddenly next to your farportal with a pounding headache. Your cheeks feel wet, and touching them you see your fingers stained red - you have been crying tears of blood. A dark and terrible memory lurks at the back of your mind, but the more you try to remember it the harder it becomes, and slowly it fades completely, like a dream.#{normal}#]], + text = _t[[#{italic}#You wake up suddenly next to your farportal with a pounding headache. Your cheeks feel wet, and touching them you see your fingers stained red - you have been crying tears of blood. A dark and terrible memory lurks at the back of your mind, but the more you try to remember it the harder it becomes, and slowly it fades completely, like a dream.#{normal}#]], answers = { - {"[done]"}, + {_t"[done]"}, } } diff --git a/game/modules/tome/data/chats/shertul-fortress-command-orb.lua b/game/modules/tome/data/chats/shertul-fortress-command-orb.lua index ed0987d010d0b6cc90642f96fc7e2b7c5484adb8..e0cb56ecbdf7c1877696dd8ac131897994f2299a 100644 --- a/game/modules/tome/data/chats/shertul-fortress-command-orb.lua +++ b/game/modules/tome/data/chats/shertul-fortress-command-orb.lua @@ -23,32 +23,32 @@ end local read = player:attr("speaks_shertul") newChat{ id="welcome", - text = [[*#LIGHT_GREEN#This orb seems to represent the world of Eyal as a whole. It is also probably used for controlling the fortress. -]]..(not read and [[You do not understand the inscriptions there.#WHITE#* -#{italic}#"Rokzan krilt copru."#{normal}#]] or [[#WHITE#*#{italic}#"Insert control rod."#{normal}#]]), + text = _t[[*#LIGHT_GREEN#This orb seems to represent the world of Eyal as a whole. It is also probably used for controlling the fortress. +]]..(not read and _t[[You do not understand the inscriptions there.#WHITE#* +#{italic}#"Rokzan krilt copru."#{normal}#]] or _t[[#WHITE#*#{italic}#"Insert control rod."#{normal}#]]), answers = { - {"[Examine the orb]", jump="examine", cond=has_rod}, - {"[Fly the fortress -- #LIGHT_RED#FOR TESTING ONLY#LAST#]", action=function(npc, player) player:hasQuest("shertul-fortress"):fly() end, cond=function() return config.settings.cheat end}, - {"[Begin the Lichform ceremory]", cond=function(npc, player) local q = player:hasQuest("lichform") return q and q:check_lichform(player) end, action=function(npc, player) player:setQuestStatus("lichform", engine.Quest.COMPLETED) end}, - {"[Leave the orb alone]"}, + {_t"[Examine the orb]", jump="examine", cond=has_rod}, + {_t"[Fly the fortress -- #LIGHT_RED#FOR TESTING ONLY#LAST#]", action=function(npc, player) player:hasQuest("shertul-fortress"):fly() end, cond=function() return config.settings.cheat end}, + {_t"[Begin the Lichform ceremory]", cond=function(npc, player) local q = player:hasQuest("lichform") return q and q:check_lichform(player) end, action=function(npc, player) player:setQuestStatus("lichform", engine.Quest.COMPLETED) end}, + {_t"[Leave the orb alone]"}, } } newChat{ id="examine", - text = [[*#LIGHT_GREEN#The device seems to be made of pure crystal. It projects a very accurate map of the known world - including the forbidden continent of the south. + text = _t[[*#LIGHT_GREEN#The device seems to be made of pure crystal. It projects a very accurate map of the known world - including the forbidden continent of the south. There seems to be a hole about the size and form of your Rod of Recall.#WHITE#*]], answers = { - {"[Insert the rod]", jump="activate"}, - {"[Leave the orb alone]"}, + {_t"[Insert the rod]", jump="activate"}, + {_t"[Leave the orb alone]"}, } } newChat{ id="activate", - text = [[*#LIGHT_GREEN#As you take the rod close to the orb it seems to vibrate and react. + text = _t[[*#LIGHT_GREEN#As you take the rod close to the orb it seems to vibrate and react. A shadow appears in a corner of the room! You retract the rod immediately but the shadow stays. It looks like the horrors you fought when coming inside, only less degenerated. The thing looks roughly humanoid, but it has no head and its limbs look like tentacles. It does not seem hostile.#WHITE#*]], answers = { - {"[Leave the orb alone]", action=function(npc, player) + {_t"[Leave the orb alone]", action=function(npc, player) if not player:hasQuest("shertul-fortress") then player:grantQuest("shertul-fortress") end player:hasQuest("shertul-fortress"):spawn_butler() end,}, diff --git a/game/modules/tome/data/chats/shertul-fortress-gladium-orb.lua b/game/modules/tome/data/chats/shertul-fortress-gladium-orb.lua index 7e38359db7baced60e665efc9ebf918c2e3d5986..6d7d4ed742451a0d0bbb6930540a5e6dc15395f1 100644 --- a/game/modules/tome/data/chats/shertul-fortress-gladium-orb.lua +++ b/game/modules/tome/data/chats/shertul-fortress-gladium-orb.lua @@ -18,10 +18,10 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[*#LIGHT_GREEN#This orb is used to control the gladium arena.#WHITE#*]], + text = _t[[*#LIGHT_GREEN#This orb is used to control the gladium arena.#WHITE#*]], answers = { - {"[Go back to the Fortress]", action=function() game:changeLevel(1, "shertul-fortress") end}, - {"[Leave the orb alone]"}, + {_t"[Go back to the Fortress]", action=function() game:changeLevel(1, "shertul-fortress") end}, + {_t"[Leave the orb alone]"}, } } diff --git a/game/modules/tome/data/chats/shertul-fortress-shimmer.lua b/game/modules/tome/data/chats/shertul-fortress-shimmer.lua index ca96f825caaf8a3ab40bdf71380029401c9eee64..26178ad745d60fd71f97e1f2b5a3635a28a37752 100644 --- a/game/modules/tome/data/chats/shertul-fortress-shimmer.lua +++ b/game/modules/tome/data/chats/shertul-fortress-shimmer.lua @@ -61,33 +61,33 @@ for slot, inven in pairs(player.inven) do if player.inven_def[slot].infos and player.inven_def[slot].infos.shimmerable and inven[1] then local o = inven[1] if o.slot then - answers[#answers+1] = {"[Alter the appearance of "..o:getName{do_color=true, no_add_name=true}.."]", action=shimmer(player, slot), jump="welcome"} + answers[#answers+1] = {("[Alter the appearance of %s]"):tformat(o:getName{do_color=true, no_add_name=true}), action=shimmer(player, slot), jump="welcome"} end end end if world.unlocked_shimmers and world.unlocked_shimmers.SHIMMER_DOLL then - answers[#answers+1] = {"[Alter the appearance of your body]", action=shimmer_other(player, "SHIMMER_DOLL"), jump="welcome"} + answers[#answers+1] = {_t"[Alter the appearance of your body]", action=shimmer_other(player, "SHIMMER_DOLL"), jump="welcome"} end if world.unlocked_shimmers and world.unlocked_shimmers.SHIMMER_FACIAL then - answers[#answers+1] = {"[Alter the appearance of your facial features]", action=shimmer_other(player, "SHIMMER_FACIAL"), jump="welcome"} + answers[#answers+1] = {_t"[Alter the appearance of your facial features]", action=shimmer_other(player, "SHIMMER_FACIAL"), jump="welcome"} end if world.unlocked_shimmers and world.unlocked_shimmers.SHIMMER_HAIR then - answers[#answers+1] = {"[Alter the appearance of your hair]", action=shimmer_other(player, "SHIMMER_HAIR"), jump="welcome"} + answers[#answers+1] = {_t"[Alter the appearance of your hair]", action=shimmer_other(player, "SHIMMER_HAIR"), jump="welcome"} end if world.unlocked_shimmers and world.unlocked_shimmers.SHIMMER_AURA then - answers[#answers+1] = {"[Alter the appearance of your cosmetic aura]", action=shimmer_other(player, "SHIMMER_AURA"), jump="welcome"} + answers[#answers+1] = {_t"[Alter the appearance of your cosmetic aura]", action=shimmer_other(player, "SHIMMER_AURA"), jump="welcome"} end -answers[#answers+1] = {"[Load/Save outfit]", action=shimmer_outfits(player), jump="welcome"} +answers[#answers+1] = {_t"[Load/Save outfit]", action=shimmer_outfits(player), jump="welcome"} if ShimmerRemoveSustains:hasRemovableAuras(player) then - answers[#answers+1] = {"[Disable the visual effects of your sustains]", action=sustains_aura_remove(player), jump="welcome"} + answers[#answers+1] = {_t"[Disable the visual effects of your sustains]", action=sustains_aura_remove(player), jump="welcome"} end -answers[#answers+1] = {"[Leave the mirror alone]"} +answers[#answers+1] = {_t"[Leave the mirror alone]"} newChat{ id="welcome", - text = [[*#LIGHT_GREEN#As you gaze into the mirror you see an infinite number of slightly different reflections of yourself. You feel dizzy.#WHITE#*]], + text = _t[[*#LIGHT_GREEN#As you gaze into the mirror you see an infinite number of slightly different reflections of yourself. You feel dizzy.#WHITE#*]], answers = answers } diff --git a/game/modules/tome/data/chats/shertul-fortress-training-orb.lua b/game/modules/tome/data/chats/shertul-fortress-training-orb.lua index 86e921316aee4cc217260132dc7de3b95d798adb..bd0d666258f9503ffe94f297ccd030ddd2edc3ab 100644 --- a/game/modules/tome/data/chats/shertul-fortress-training-orb.lua +++ b/game/modules/tome/data/chats/shertul-fortress-training-orb.lua @@ -50,7 +50,7 @@ end local function resist_dummies() local GetQuantity = require "engine.dialogs.GetQuantity" - game:registerDialog(GetQuantity.new("All resistances", "From 0 to 100", 0, 100, function(qty) + game:registerDialog(GetQuantity.new(_t"All resistances", _t"From 0 to 100", 0, 100, function(qty) qty = util.bound(qty, 0, 100) for uid, e in pairs(game.level.entities) do if e.define_as == "TRAINING_DUMMY" then e.resists.all = qty end @@ -60,13 +60,13 @@ end local function armor_dummies() local GetQuantity = require "engine.dialogs.GetQuantity" - game:registerDialog(GetQuantity.new("Armour Hardiness", "From 0 to 100", 0, 100, function(qty) + game:registerDialog(GetQuantity.new(_t"Armour Hardiness", _t"From 0 to 100", 0, 100, function(qty) qty = util.bound(qty, 0, 100) for uid, e in pairs(game.level.entities) do if e.define_as == "TRAINING_DUMMY" then e.combat_armor_hardiness = qty - 30 end end - game:registerDialog(GetQuantity.new("Armour", "From 0 to 1000", 0, 1000, function(qty) + game:registerDialog(GetQuantity.new(_t"Armour", _t"From 0 to 1000", 0, 1000, function(qty) qty = util.bound(qty, 0, 1000) for uid, e in pairs(game.level.entities) do if e.define_as == "TRAINING_DUMMY" then e.combat_armor = qty end @@ -76,17 +76,17 @@ local function armor_dummies() end newChat{ id="welcome", - text = [[*#LIGHT_GREEN#This orb is used to control the training facilities.#WHITE#*]], + text = _t[[*#LIGHT_GREEN#This orb is used to control the training facilities.#WHITE#*]], answers = { - {"[Create one target dummy]", action=dummies(1)}, - {"[Create two target dummy]", action=dummies(2)}, - {"[Create three target dummy]", action=dummies(3)}, - {"[Create five target dummy]", action=dummies(5)}, - {"[Create ten target dummy]", action=dummies(10)}, - {"[Change dummies armour]", action=armor_dummies}, - {"[Change dummies resistances]", action=resist_dummies}, - {"[Reset]", action=remove_dummies}, - {"[Leave the orb alone]"}, + {_t"[Create one target dummy]", action=dummies(1)}, + {_t"[Create two target dummy]", action=dummies(2)}, + {_t"[Create three target dummy]", action=dummies(3)}, + {_t"[Create five target dummy]", action=dummies(5)}, + {_t"[Create ten target dummy]", action=dummies(10)}, + {_t"[Change dummies armour]", action=armor_dummies}, + {_t"[Change dummies resistances]", action=resist_dummies}, + {_t"[Reset]", action=remove_dummies}, + {_t"[Leave the orb alone]"}, } } diff --git a/game/modules/tome/data/chats/slasul.lua b/game/modules/tome/data/chats/slasul.lua index 02475373c7484c73b42fb91cf92d7a6c36ab411a..3946dd895775cceb35677aab93d975fbf066f556 100644 --- a/game/modules/tome/data/chats/slasul.lua +++ b/game/modules/tome/data/chats/slasul.lua @@ -27,41 +27,41 @@ end if not game.player:isQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "slasul-story") then newChat{ id="welcome", - text = [[What is this? Why have you entered my temple and slain my followers? + text = _t[[What is this? Why have you entered my temple and slain my followers? Speak or die, for I am Slasul and you shall not disrupt my plans.]], answers = { - {"[attack]", action=attack("So be it... Die now!")}, - {"I was sent by Ukllmswwik to stop your mad schemes to control all underwater life!", jump="quest"}, + {_t"[attack]", action=attack(_t"So be it... Die now!")}, + {_t"I was sent by Ukllmswwik to stop your mad schemes to control all underwater life!", jump="quest"}, } } newChat{ id="quest", - text = [[I see. So the dragon sent you. He told you I am insane, I assume? + text = _t[[I see. So the dragon sent you. He told you I am insane, I assume? But which of us is truly evil? Myself, working to better my people, doing no harm to anyone, or you, who comes here to kill me, destroying my friends and planning to do the same to me? Who is the insane one?]], answers = { - {"Your feeble attempt to sway me from the side of good will not work. Pay for you sins!", action=attack("If you refuse to see reason, you leave me no choice!")}, - {"Your words are... disturbing. Why should I spare you?", jump="givequest"}, + {_t"Your feeble attempt to sway me from the side of good will not work. Pay for you sins!", action=attack(_t"If you refuse to see reason, you leave me no choice!")}, + {_t"Your words are... disturbing. Why should I spare you?", jump="givequest"}, } } newChat{ id="givequest", - text = [[Spare me?#LIGHT_GREEN#*He laughs.*#WHITE# + text = _t[[Spare me?#LIGHT_GREEN#*He laughs.*#WHITE# Do not be so hasty to assume YOU are in a position to offer mercy to ME! Yet I shall tell you my story. You surface dwellers do not know much about nagas, but let me tell you this: our current condition was not our choice. When Nalore sank, many of us died, so we resorted to using the magic of this temple. It worked, it saved us, and yet we are cursed. Cursed in this form by the terrible magic. If you do not believe anything else of what I say, please believe at least this: the Sher'Tul are hiding, not gone, and they are not benevolent entities. Recently, that water dragon that sent you here started sending "agents" to secure the temple. I can only imagine his goals, but they are clearly not peaceful.]], answers = { - {"You do not sound mad to me... could Ukllmswwik have lied?", jump="portal_back", action=function(npc, player) player:setQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "slasul-story") end}, - {"I will not be deceived by your lies! I will make your pay for your victims!", action=attack("As you wish. It did not have to come to this...")}, + {_t"You do not sound mad to me... could Ukllmswwik have lied?", jump="portal_back", action=function(npc, player) player:setQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "slasul-story") end}, + {_t"I will not be deceived by your lies! I will make your pay for your victims!", action=attack(_t"As you wish. It did not have to come to this...")}, } } newChat{ id="portal_back", - text = [[Use this portal. It will bring you back to his cave; ask him the truth.]], + text = _t[[Use this portal. It will bring you back to his cave; ask him the truth.]], answers = { - {"I will make him pay for his treachery.", action=function(npc, player) + {_t"I will make him pay for his treachery.", action=function(npc, player) player:hasQuest("temple-of-creation"):portal_back() for uid, e in pairs(game.level.entities) do if e.faction == "enemies" then e.faction = "temple-of-creation" end @@ -75,25 +75,25 @@ newChat{ id="portal_back", ----------------------------------------------------------------------- else newChat{ id="welcome", - text = [[Thank you for listening to me.]], + text = _t[[Thank you for listening to me.]], answers = { - {"The dragon was lying, I can feel it. I have decided to embrace your cause.", jump="cause", cond=function(npc, player) return player:knowTalent(player.T_LEGACY_OF_THE_NALOREN) and not player:isQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "legacy-naloren") end}, - {"Farewell, Slasul."}, - {"[attack]", action=attack("So be it... Die now!")}, + {_t"The dragon was lying, I can feel it. I have decided to embrace your cause.", jump="cause", cond=function(npc, player) return player:knowTalent(player.T_LEGACY_OF_THE_NALOREN) and not player:isQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "legacy-naloren") end}, + {_t"Farewell, Slasul."}, + {_t"[attack]", action=attack(_t"So be it... Die now!")}, } } newChat{ id="cause", - text = [[I secretly hoped you would. + text = _t[[I secretly hoped you would. Then let us seal this alliance. Share your lifeforce with me! So long you should live I shall not be killed! In return let me offer you this powerful trident.]], answers = { - {"I shall accept your offer, my liege.", action=function(npc, player) + {_t"I shall accept your offer, my liege.", action=function(npc, player) local o = game.zone:makeEntityByName(game.level, "object", "LEGACY_NALOREN", true) if o then o:identify(true) player:addObject(player.INVEN_INVEN, o) - npc:doEmote("LET US BE BOUND!", 150) + npc:doEmote(_t"LET US BE BOUND!", 150) game.level.map:particleEmitter(npc.x, npc.y, 1, "demon_teleport") game.level.map:particleEmitter(player.x, player.y, 1, "demon_teleport") npc.invulnerable = 1 @@ -101,7 +101,7 @@ In return let me offer you this powerful trident.]], player:setQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "legacy-naloren") end end}, - {"This sounds strange. I need to think about it."}, + {_t"This sounds strange. I need to think about it."}, } } diff --git a/game/modules/tome/data/chats/sorcerer-end.lua b/game/modules/tome/data/chats/sorcerer-end.lua index c52c2629907e61522766d3aab9011a7733b60ed0..cfedac10bf1f247583e07f43efc2616742550223 100644 --- a/game/modules/tome/data/chats/sorcerer-end.lua +++ b/game/modules/tome/data/chats/sorcerer-end.lua @@ -36,52 +36,52 @@ end -------------------------------------------------------- if p.descriptor.race == "Yeek" then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The two Sorcerers lie dead before you.*#WHITE# + text = ([[#LIGHT_GREEN#*The two Sorcerers lie dead before you.*#WHITE# #LIGHT_GREEN#*Their bodies vanish in a small cloud of mist, quickly fading away.*#WHITE# #LIGHT_GREEN#*You feel the Way reaching out to you, the whole yeek race speaks to you.*#WHITE# -You have done something incredible ]]..(p.female and "sister" or "brother")..[[! You also have created a unique opportunity for the yeek race! +You have done something incredible %s! You also have created a unique opportunity for the yeek race! The energies of those farportals are incredible, using them we could make the Way radiate all over Eyal, forcing it down on the other races, bringing them the same peace and happiness we feel in the Way. You must go through the farportal and willingly sacrifice yourself inside. Your mind will embed itself into the farportal network, spreading the Way far and wide! Even though you will die you will bring the world, and the yeeks, ultimate peace. The Way will never forget you. Now go and make history! -]], +]]):tformat(p.female and _t"sister" or _t"brother"), answers = { - {"#LIGHT_GREEN#[sacrifice yourself to bring the Way to every sentient creature.]", action=function(npc, player) + {_t"#LIGHT_GREEN#[sacrifice yourself to bring the Way to every sentient creature.]", action=function(npc, player) player.no_resurrect = true - player:die(player, {special_death_msg="sacrificing "..string.his_her_self(player).." to bring the Way to all"}) + player:die(player, {special_death_msg=("sacrificing %s to bring the Way to all"):tformat(string.his_her_self(player))}) player:setQuestStatus("high-peak", engine.Quest.COMPLETED, "yeek") player:hasQuest("high-peak"):win("yeek-sacrifice") end}, - {"But... I did so much, I could do so much more for the Way by staying alive!", jump="yeek-unsure"}, + {_t"But... I did so much, I could do so much more for the Way by staying alive!", jump="yeek-unsure"}, } } newChat{ id="yeek-unsure", - text = [[#LIGHT_GREEN#*You feel the Way taking over your mind, your body.*#WHITE# + text = _t[[#LIGHT_GREEN#*You feel the Way taking over your mind, your body.*#WHITE# You will do as asked, for the good of all Yeeks! The Way is always right. ]], answers = { - {"#LIGHT_GREEN#[sacrifice yourself to bring the Way to every sentient creature.]", action=function(npc, player) + {_t"#LIGHT_GREEN#[sacrifice yourself to bring the Way to every sentient creature.]", action=function(npc, player) player.no_resurrect = true - player:die(player, {special_death_msg="sacrificing "..string.his_her_self(player).." to bring the Way to all"}) + player:die(player, {special_death_msg=("sacrificing %s to bring the Way to all"):tformat(string.his_her_self(player))}) player:setQuestStatus("high-peak", engine.Quest.COMPLETED, "yeek") player:hasQuest("high-peak"):win("yeek-sacrifice") end}, - {"#LIGHT_GREEN#[In a last incredible display of willpower you fight the Way for a few seconds, letting you project your thoughts to Aeryn.]#WHITE# High Lady! Kill me #{bold}#NOW#{normal}#", + {_t"#LIGHT_GREEN#[In a last incredible display of willpower you fight the Way for a few seconds, letting you project your thoughts to Aeryn.]#WHITE# High Lady! Kill me #{bold}#NOW#{normal}#", cond=function(npc, player) return not void_portal_open(nil, player) and aeryn_alive(npc, player) and player:getWil() >= 55 end, jump="yeek-stab" }, } } newChat{ id="yeek-stab", - text = [[#LIGHT_GREEN#*Through your mind Aeryn sees what the Way is planning.*#WHITE# + text = _t[[#LIGHT_GREEN#*Through your mind Aeryn sees what the Way is planning.*#WHITE# You were a precious ally and a friend. The world will remember your last act of selfless sacrifice. I swear it. #LIGHT_GREEN#*As she says this she pierces your body with a mighty thrust of her sword, ending the plans of the Way.*#WHITE# ]], answers = { - {"#LIGHT_GREEN#[slip peacefully into death.]", action=function(npc, player) + {_t"#LIGHT_GREEN#[slip peacefully into death.]", action=function(npc, player) player.no_resurrect = true - player:die(player, {special_death_msg="sacrificing "..string.his_her_self(player).." to stop the Way"}) + player:die(player, {special_death_msg=("sacrificing %s to stop the Way"):tformat(string.his_her_self(player))}) player:setQuestStatus("high-peak", engine.Quest.COMPLETED, "yeek-stab") player:hasQuest("high-peak"):win("yeek-selfless") end}, @@ -98,25 +98,25 @@ end ---------- If the void portal has been opened if void_portal_open(nil, p) then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The two Sorcerers lie dead before you.*#WHITE# + text = _t[[#LIGHT_GREEN#*The two Sorcerers lie dead before you.*#WHITE# #LIGHT_GREEN#*Their bodies vanish in a small cloud of mist, quickly fading away.*#WHITE# But the portal to the Void is already open. It must be closed before the Creator can come through or all will have been in vain! After searching the remains of the Sorcerers you find a note explaining that the portal can only be closed with a sentient being's sacrifice.]], answers = { - {"Aeryn, I am sorry but one of us needs to be sacrificed for the world to go on. #LIGHT_GREEN#[sacrifice Aeryn for the sake of the world]", jump="aeryn-sacrifice", cond=aeryn_alive}, - {"I will close it. #LIGHT_GREEN#[sacrifice yourself for the sake of the world]", action=function(npc, player) + {_t"Aeryn, I am sorry but one of us needs to be sacrificed for the world to go on. #LIGHT_GREEN#[sacrifice Aeryn for the sake of the world]", jump="aeryn-sacrifice", cond=aeryn_alive}, + {_t"I will close it. #LIGHT_GREEN#[sacrifice yourself for the sake of the world]", action=function(npc, player) player.no_resurrect = true - player:die(player, {special_death_msg="sacrificing "..string.his_her_self(player).." for the sake of the world"}) + player:die(player, {special_death_msg=("sacrificing %s for the sake of the world"):tformat(string.his_her_self(player))}) player:hasQuest("high-peak"):win("self-sacrifice") end}, } } newChat{ id="aeryn-sacrifice", - text = [[I cannot believe we succeeded. I was prepared to die and it seems I will die, but at least I will do so knowing my sacrifice is not in vain. + text = _t[[I cannot believe we succeeded. I was prepared to die and it seems I will die, but at least I will do so knowing my sacrifice is not in vain. Please, make sure the world is safe.]], answers = { - {"You will never be forgotten.", action=function(npc, player) + {_t"You will never be forgotten.", action=function(npc, player) local aeryn = aeryn_alive(npc, player) game.level:removeEntity(aeryn, true) player:hasQuest("high-peak"):win("aeryn-sacrifice") @@ -127,21 +127,21 @@ Please, make sure the world is safe.]], ----------- If the void portal is still closed else newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The two Sorcerers lie dead before you.*#WHITE# + text = _t[[#LIGHT_GREEN#*The two Sorcerers lie dead before you.*#WHITE# #LIGHT_GREEN#*Their bodies vanish in some immaterial mist.*#WHITE# You have won the game! Both Maj'Eyal and the Far East are safe from the dark schemes of the Sorcerers and their God.]], answers = { - {"Aeryn, are you well?", jump="aeryn-ok", cond=aeryn_alive}, - {"[leave]", action=function(npc, player) player:hasQuest("high-peak"):win("full") end}, + {_t"Aeryn, are you well?", jump="aeryn-ok", cond=aeryn_alive}, + {_t"[leave]", action=function(npc, player) player:hasQuest("high-peak"):win("full") end}, } } newChat{ id="aeryn-ok", - text = [[I cannot believe we succeeded. I was prepared to die and yet I live. + text = _t[[I cannot believe we succeeded. I was prepared to die and yet I live. I might have underestimated you. You did more than we could have hoped for!]], answers = { - {"We both did.", action=function(npc, player) player:hasQuest("high-peak"):win("full") end}, + {_t"We both did.", action=function(npc, player) player:hasQuest("high-peak"):win("full") end}, } } end diff --git a/game/modules/tome/data/chats/sorcerer-fight.lua b/game/modules/tome/data/chats/sorcerer-fight.lua index b6472912302689c88d46950facd22518d091c509..00bb0de856df2cc9aba88904598d9067537c9519 100644 --- a/game/modules/tome/data/chats/sorcerer-fight.lua +++ b/game/modules/tome/data/chats/sorcerer-fight.lua @@ -51,58 +51,58 @@ local function aeryn_comes(npc, player) end newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The two Sorcerers stands before you, shining like the Sun.*#WHITE# + text = _t[[#LIGHT_GREEN#*The two Sorcerers stands before you, shining like the Sun.*#WHITE# Ah! Our guest is finally here. I take it you found the peak entertaining?]], answers = { - {"Spare me the small talk. I am here to stop you!", jump="explain"}, - {"Why are you doing all that? You were supposed to help people!", jump="explain"}, + {_t"Spare me the small talk. I am here to stop you!", jump="explain"}, + {_t"Why are you doing all that? You were supposed to help people!", jump="explain"}, } } newChat{ id="explain", - text = [[Oh, but all we want is to help people. We have come to the self-evident conclusion that common people are just unfit to govern themselves, always bickering, arguing... + text = _t[[Oh, but all we want is to help people. We have come to the self-evident conclusion that common people are just unfit to govern themselves, always bickering, arguing... Since the last invasion of the orcs there has been no threat to unite them!]], answers = { - {"So you have decided to become the threat yourselves?", jump="explain2"}, + {_t"So you have decided to become the threat yourselves?", jump="explain2"}, } } newChat{ id="explain2", - text = [[Us? Ah, no, we are merely instruments for the Master. We have planned for His return.]], + text = _t[[Us? Ah, no, we are merely instruments for the Master. We have planned for His return.]], answers = { - {"And 'He' would be...?", jump="explain3"}, + {_t"And 'He' would be...?", jump="explain3"}, } } if void_portal_open(nil, game.player) then newChat{ id="explain3", - text = [[The Creator. The God who made this world, He who watched silently as the races fought and burnt the land. + text = _t[[The Creator. The God who made this world, He who watched silently as the races fought and burnt the land. He who felt great sorrow for this world. He who shall now shatter the barriers of this world to remake it, only better! The staff has allowed us to drain enough energy from this world to open the portal to the Void and summon Him through! It is already too late. He is coming through as we speak -- it is only a matter of hours!]], answers = { - {"I *WILL* stop you! The world will not end today!", jump="aeryn", switch_npc={name="High Sun Paladin Aeryn"}, action=aeryn_comes, cond=aeryn_alive}, - {"I *WILL* stop you! The world will not end today!", cond=aeryn_dead}, + {_t"I *WILL* stop you! The world will not end today!", jump="aeryn", switch_npc={name=_t"High Sun Paladin Aeryn"}, action=aeryn_comes, cond=aeryn_alive}, + {_t"I *WILL* stop you! The world will not end today!", cond=aeryn_dead}, } } else newChat{ id="explain3", - text = [[The Creator. The God who made this world, He who watched silently as the races fought and burnt the land. + text = _t[[The Creator. The God who made this world, He who watched silently as the races fought and burnt the land. He who felt great sorrow for this world. He who shall now shatter the barriers of this world to remake it, only better! The staff will allow us to drain enough energy from this world to open the portal to the Void and summon Him through! You cannot stop us now!]], answers = { - {"I *WILL* stop you! The world will not end today!", jump="aeryn", switch_npc={name="High Sun Paladin Aeryn"}, action=aeryn_comes, cond=aeryn_alive}, - {"I *WILL* stop you! The world will not end today!", cond=aeryn_dead}, + {_t"I *WILL* stop you! The world will not end today!", jump="aeryn", switch_npc={name=_t"High Sun Paladin Aeryn"}, action=aeryn_comes, cond=aeryn_alive}, + {_t"I *WILL* stop you! The world will not end today!", cond=aeryn_dead}, } } end newChat{ id="aeryn", - text = [[#LIGHT_GREEN#*The air whirls at your side and suddenly High Sun Paladin Aeryn appears!*#WHITE# + text = _t[[#LIGHT_GREEN#*The air whirls at your side and suddenly High Sun Paladin Aeryn appears!*#WHITE# Then you shall not fight alone! Together we shall stop them, or die trying!]], answers = { - {"I am glad to have you at my side, my Lady. Let's hunt some wizards!"}, + {_t"I am glad to have you at my side, my Lady. Let's hunt some wizards!"}, } } diff --git a/game/modules/tome/data/chats/tannen.lua b/game/modules/tome/data/chats/tannen.lua index be7bc7ef47a2f70a93b0c785c7cdc26d87c584cf..82cc026f9797260f82a5230f3e2ccaad0a1db5e0 100644 --- a/game/modules/tome/data/chats/tannen.lua +++ b/game/modules/tome/data/chats/tannen.lua @@ -21,44 +21,46 @@ local function check_materials_gave_orb(npc, player) local q = player:hasQuest("east-portal") if not q or not q:isCompleted("gotoreknor") or not q:isCompleted("gave-orb") then return false end - local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond") - local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame") + --I18N-TODO it should be done in a i18n-friendly style + local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond", {raw_name=true}) + local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame", {raw_name=true}) return gem_o and athame_o end local function check_materials_withheld_orb(npc, player) local q = player:hasQuest("east-portal") if not q or not q:isCompleted("gotoreknor") or not q:isCompleted("withheld-orb") then return false end - - local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond") - local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame") + + --I18N-TODO it should be done in a i18n-friendly style + local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond", {raw_name=true}) + local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame", {raw_name=true}) return gem_o and athame_o end if game.player:hasQuest("east-portal") and game.player:isQuestStatus("east-portal", engine.Quest.DONE) then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Nobody answers.*#WHITE#]], + text = _t[[#LIGHT_GREEN#*Nobody answers.*#WHITE#]], answers = { - {"[leave]"}, + {_t"[leave]"}, } } elseif game.player:hasQuest("east-portal") and game.player:hasQuest("east-portal").wait_turn and game.player:hasQuest("east-portal").wait_turn > game.turn then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Nobody answers. Tannen is probably still busy studying the orb.*#WHITE#]], + text = _t[[#LIGHT_GREEN#*Nobody answers. Tannen is probably still busy studying the orb.*#WHITE#]], answers = { - {"[leave]"}, + {_t"[leave]"}, } } else newChat{ id="welcome", - text = [[How may I be of service, good @playerdescriptor.race@?]], + text = _t[[How may I be of service, good @playerdescriptor.race@?]], answers = { - {"[Relate to him the story of the staff and the Orb of Many Ways and the portals.]", jump="east_portal1", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and q:isCompleted("talked-elder") and not q:isCompleted("gotoreknor") end}, - {"I have the diamond and the athame. [Hand over the Athame and Diamond]", jump="has_material_gave_orb", cond=check_materials_gave_orb}, - {"I have the diamond and the athame. [Hand over the Athame and Diamond]", jump="has_material_withheld_orb", cond=check_materials_withheld_orb}, - {"Thieving, murderous wretch. Prepare to die!", jump="fake_orb_end", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and q:isCompleted("tricked-demon") end}, - {"How fares your research? Are we ready to create the portal?", jump="wait_end", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and q:isCompleted("open-telmur") end}, - {"Nothing, excuse me. Bye!"}, + {_t"[Relate to him the story of the staff and the Orb of Many Ways and the portals.]", jump="east_portal1", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and q:isCompleted("talked-elder") and not q:isCompleted("gotoreknor") end}, + {_t"I have the diamond and the athame. [Hand over the Athame and Diamond]", jump="has_material_gave_orb", cond=check_materials_gave_orb}, + {_t"I have the diamond and the athame. [Hand over the Athame and Diamond]", jump="has_material_withheld_orb", cond=check_materials_withheld_orb}, + {_t"Thieving, murderous wretch. Prepare to die!", jump="fake_orb_end", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and q:isCompleted("tricked-demon") end}, + {_t"How fares your research? Are we ready to create the portal?", jump="wait_end", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and q:isCompleted("open-telmur") end}, + {_t"Nothing, excuse me. Bye!"}, } } end @@ -67,52 +69,52 @@ end -- Explain the situation and get quest going --------------------------------------------------------------- newChat{ id="east_portal1", - text = [[Astonishing! I have heard tell of this Orb in ancient texts and legends. Might I see it?]], + text = _t[[Astonishing! I have heard tell of this Orb in ancient texts and legends. Might I see it?]], answers = { - {"[Show him the Orb of Many Ways]", jump="east_portal2"}, + {_t"[Show him the Orb of Many Ways]", jump="east_portal2"}, } } newChat{ id="east_portal2", - text = [[Truly, it is the work of a great master. Perhaps Linaniil herself had a hand in its making. And you say you come bearing instructions in its usage?]], + text = _t[[Truly, it is the work of a great master. Perhaps Linaniil herself had a hand in its making. And you say you come bearing instructions in its usage?]], answers = { - {"I do. [Show him Zemekkys's scribbled notes]", jump="east_portal3"}, + {_t"I do. [Show him Zemekkys's scribbled notes]", jump="east_portal3"}, } } newChat{ id="east_portal3", - text = [[#LIGHT_GREEN#*He spends a few minutes reading*#WHITE# Ah! I see. I did not at first grasp this Zemekkys's methods, but I see now that they are sound, and it is simply his penmanship that needs improvement. We can manage to reproduce his work here, but, as he says, we will need the Blood-Runed Athame and a Resonating Diamond.]], + text = _t[[#LIGHT_GREEN#*He spends a few minutes reading*#WHITE# Ah! I see. I did not at first grasp this Zemekkys's methods, but I see now that they are sound, and it is simply his penmanship that needs improvement. We can manage to reproduce his work here, but, as he says, we will need the Blood-Runed Athame and a Resonating Diamond.]], answers = { - {"Have you any idea where they might be found?", jump="east_portal4"}, + {_t"Have you any idea where they might be found?", jump="east_portal4"}, } } newChat{ id="east_portal4", - text = [[If the orcs created a portal in the depths of Reknor, they must have had access to such items. And if these items cannot pass through the portal they created, then it stands to reason that they must still be in Maj'Eyal. I would search Reknor, starting near the portal itself. Perhaps they did not move the Athame and Diamond far after its creation.]], + text = _t[[If the orcs created a portal in the depths of Reknor, they must have had access to such items. And if these items cannot pass through the portal they created, then it stands to reason that they must still be in Maj'Eyal. I would search Reknor, starting near the portal itself. Perhaps they did not move the Athame and Diamond far after its creation.]], answers = { - {"I'll get searching. Thank you.", jump="east_portal5"}, + {_t"I'll get searching. Thank you.", jump="east_portal5"}, } } newChat{ id="east_portal5", - text = [[One last thing. I will need to hold onto the Orb of Many Ways while you search. I lack the expertise this Chronomancer Zemekkys possesses, and have much learning on the subject to do if I am to follow in his footsteps.]], + text = _t[[One last thing. I will need to hold onto the Orb of Many Ways while you search. I lack the expertise this Chronomancer Zemekkys possesses, and have much learning on the subject to do if I am to follow in his footsteps.]], answers = { - {"[Hand him the Orb] ", action=function(npc, player) player:hasQuest("east-portal"):give_orb(player) end, jump="gave_orb"}, - {"I still require the Orb for now.", action=function(npc, player) player:hasQuest("east-portal"):withheld_orb(player) end, jump="withheld_orb"}, + {_t"[Hand him the Orb] ", action=function(npc, player) player:hasQuest("east-portal"):give_orb(player) end, jump="gave_orb"}, + {_t"I still require the Orb for now.", action=function(npc, player) player:hasQuest("east-portal"):withheld_orb(player) end, jump="withheld_orb"}, } } newChat{ id="gave_orb", - text = [[Thank you. I will treat it with the utmost care.]], + text = _t[[Thank you. I will treat it with the utmost care.]], answers = { - {"Farewell. I'll return with the Athame and Diamond.", action=function(npc, player) player:hasQuest("east-portal"):setStatus(engine.Quest.COMPLETED, "gotoreknor") end}, + {_t"Farewell. I'll return with the Athame and Diamond.", action=function(npc, player) player:hasQuest("east-portal"):setStatus(engine.Quest.COMPLETED, "gotoreknor") end}, } } newChat{ id="withheld_orb", - text = [[Very well. There is no hurry. But I will need to spend a number of days studying it before we can create your portal.]], + text = _t[[Very well. There is no hurry. But I will need to spend a number of days studying it before we can create your portal.]], answers = { - {"I understand. I'll return with the Athame and Diamond.", action=function(npc, player) player:hasQuest("east-portal"):setStatus(engine.Quest.COMPLETED, "gotoreknor") end}, + {_t"I understand. I'll return with the Athame and Diamond.", action=function(npc, player) player:hasQuest("east-portal"):setStatus(engine.Quest.COMPLETED, "gotoreknor") end}, } } @@ -120,45 +122,45 @@ newChat{ id="withheld_orb", -- back with materials --------------------------------------------------------------- newChat{ id="has_material_gave_orb", - text = [[Excellent. Return in a few days, and I'll have everything prepared. Oh, take this. #LIGHT_GREEN#*He hands you a key*#WHITE# It opens the ruins of Telmur, which the men of Sholtar sealed many years ago. If you happen to find a text in the ruins entitled "Inverted and Reverted Probabilistic Fields," return with it and your odds of surviving our portal attempt will go up drastically.]], + text = _t[[Excellent. Return in a few days, and I'll have everything prepared. Oh, take this. #LIGHT_GREEN#*He hands you a key*#WHITE# It opens the ruins of Telmur, which the men of Sholtar sealed many years ago. If you happen to find a text in the ruins entitled "Inverted and Reverted Probabilistic Fields," return with it and your odds of surviving our portal attempt will go up drastically.]], answers = { - {"Thank you, and farewell.", action=function(npc, player) player:hasQuest("east-portal"):open_telmur(player) end}, + {_t"Thank you, and farewell.", action=function(npc, player) player:hasQuest("east-portal"):open_telmur(player) end}, } } newChat{ id="has_material_withheld_orb", - text = [[Excellent. Are you yet willing to leave the Orb in my care for a time?]], + text = _t[[Excellent. Are you yet willing to leave the Orb in my care for a time?]], answers = { - {"I dare not let it out of my sight. I'm sorry.", jump="no_orb_loan"}, - {"Here it is. Guard it carefully. I must return to the Far East soon.", jump="orb_loan"}, + {_t"I dare not let it out of my sight. I'm sorry.", jump="no_orb_loan"}, + {_t"Here it is. Guard it carefully. I must return to the Far East soon.", jump="orb_loan"}, } } newChat{ id="no_orb_loan", - text = [[#LIGHT_GREEN#*The old man sighs*#WHITE# Very well. I suppose I must make do with a cursory examination under your supervision.]], + text = _t[[#LIGHT_GREEN#*The old man sighs*#WHITE# Very well. I suppose I must make do with a cursory examination under your supervision.]], answers = { - {"[Hand him the orb]", jump="no_orb_loan2"}, + {_t"[Hand him the orb]", jump="no_orb_loan2"}, } } newChat{ id="no_orb_loan2", - text = [[Thank you. Give me a few minutes. #LIGHT_GREEN#*He begins to pace back and forth absently, staring at the Orb.*#WHITE#]], + text = _t[[Thank you. Give me a few minutes. #LIGHT_GREEN#*He begins to pace back and forth absently, staring at the Orb.*#WHITE#]], answers = { - {"[Wait]", jump="no_orb_loan3"}, + {_t"[Wait]", jump="no_orb_loan3"}, } } newChat{ id="no_orb_loan3", - text = [[#LIGHT_GREEN#*He stops pacing and returns the Orb to you.*#WHITE# I believe I know most of what I need to. But I need a few details cleared up. You'll have to return to this Elven Chronomancer and ask him whether he meant an inverted probabilistic field or a reverted probabilistic field. I dare not guess, as the result could be quite unpleasant for you.]], + text = _t[[#LIGHT_GREEN#*He stops pacing and returns the Orb to you.*#WHITE# I believe I know most of what I need to. But I need a few details cleared up. You'll have to return to this Elven Chronomancer and ask him whether he meant an inverted probabilistic field or a reverted probabilistic field. I dare not guess, as the result could be quite unpleasant for you.]], answers = { - {"I'll return with the answer.", action=function(npc, player) player:hasQuest("east-portal"):ask_east(player) end}, + {_t"I'll return with the answer.", action=function(npc, player) player:hasQuest("east-portal"):ask_east(player) end}, } } newChat{ id="orb_loan", - text = [[Fear not. Return in a few days, and I'll have everything prepared. Oh, take this. #LIGHT_GREEN#*He hands you a key*#WHITE# It opens the ruins of Telmur, which the men of Sholtar sealed many years ago. If you happen to find a text in the ruins entitled "Inverted and Reverted Probabilistic Fields", return with it and your odds of surviving our portal attempt will go up drastically.]], + text = _t[[Fear not. Return in a few days, and I'll have everything prepared. Oh, take this. #LIGHT_GREEN#*He hands you a key*#WHITE# It opens the ruins of Telmur, which the men of Sholtar sealed many years ago. If you happen to find a text in the ruins entitled "Inverted and Reverted Probabilistic Fields", return with it and your odds of surviving our portal attempt will go up drastically.]], answers = { - {"Thank you, and farewell.", action=function(npc, player) player:hasQuest("east-portal"):open_telmur(player) end}, + {_t"Thank you, and farewell.", action=function(npc, player) player:hasQuest("east-portal"):open_telmur(player) end}, } } @@ -166,18 +168,18 @@ newChat{ id="orb_loan", -- Back to the treacherous bastard --------------------------------------------------------------- newChat{ id="fake_orb_end", - text = [[I think not, fool. Look down. + text = _t[[I think not, fool. Look down. #LIGHT_GREEN#*You notice you're standing on an etched portal.*#WHITE#]], answers = { - {"What in the...", action=function(npc, player) player:hasQuest("east-portal"):tannen_tower(player) end}, + {_t"What in the...", action=function(npc, player) player:hasQuest("east-portal"):tannen_tower(player) end}, } } newChat{ id="wait_end", - text = [[I am ready. You are not. Look down. + text = _t[[I am ready. You are not. Look down. #LIGHT_GREEN#*You notice you're standing on an etched portal.*#WHITE#]], answers = { - {"What in the...", action=function(npc, player) player:hasQuest("east-portal"):tannen_tower(player) end}, + {_t"What in the...", action=function(npc, player) player:hasQuest("east-portal"):tannen_tower(player) end}, } } diff --git a/game/modules/tome/data/chats/tarelion-start-archmage.lua b/game/modules/tome/data/chats/tarelion-start-archmage.lua index 0c96c24c185bebf5288291e187a60c7b9cf9ec53..a54509e300cda63184021c25a1a84e625b7cd03a 100644 --- a/game/modules/tome/data/chats/tarelion-start-archmage.lua +++ b/game/modules/tome/data/chats/tarelion-start-archmage.lua @@ -18,45 +18,45 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[Wait a minute!]], + text = _t[[Wait a minute!]], answers = { - {"Archmage Tarelion?", jump="next1"}, + {_t"Archmage Tarelion?", jump="next1"}, } } newChat{ id="next1", - text = [[Yes @playername@, I have heard you plan on going into the wild world, looking for some adventures of your own. + text = _t[[Yes @playername@, I have heard you plan on going into the wild world, looking for some adventures of your own. This is good, more of us should get out of here once in a while and actually help people out there. Say, maybe you might want to get an adventure and help Angolwen?]], answers = { - {"Perhaps, what do you need?", jump="next2"}, + {_t"Perhaps, what do you need?", jump="next2"}, } } newChat{ id="next2", - text = [[During the Spellblaze the world was torn apart - literally. A part of it, that we now call the Abashed Expanse, was ripped from the world and thrown into the void between the stars. + text = _t[[During the Spellblaze the world was torn apart - literally. A part of it, that we now call the Abashed Expanse, was ripped from the world and thrown into the void between the stars. We managed to stabilize it and it is now orbiting Eyal. Recently we have noticed a disturbance there; if we do nothing it will crash onto Eyal, bringing much destruction in its wake. Because it was once part of a land we know well we can teleport you there. You will need to stabilize three wormholes by firing any attack spells at them. The instability is also to your advantage there, your simple phase door spell will be fully controllable. So, you think you can help us ?]], answers = { - {"Yes Archmage, send me there!", jump="teleport"}, - {"No sorry, I need to go.", jump="refuse"}, + {_t"Yes Archmage, send me there!", jump="teleport"}, + {_t"No sorry, I need to go.", jump="refuse"}, } } newChat{ id="teleport", - text = [[Good luck!]], + text = _t[[Good luck!]], answers = { - {"[teleport]", action=function(npc, player) game:changeLevel(1, "abashed-expanse", {direct_switch=true}) end}, + {_t"[teleport]", action=function(npc, player) game:changeLevel(1, "abashed-expanse", {direct_switch=true}) end}, } } newChat{ id="refuse", - text = [[Oh well, farewell on your trips. Now I need to find somebody else to go up there.]], + text = _t[[Oh well, farewell on your trips. Now I need to find somebody else to go up there.]], answers = { - {"Bye.", action=function(npc, player) player:setQuestStatus("start-archmage", engine.Quest.FAILED) end}, + {_t"Bye.", action=function(npc, player) player:setQuestStatus("start-archmage", engine.Quest.FAILED) end}, } } diff --git a/game/modules/tome/data/chats/tarelion.lua b/game/modules/tome/data/chats/tarelion.lua index cb1b7a4142fd9100e7d22acc23092585f9ef67a8..2953dfc2d9646de376335a417f93178b59a4e46a 100644 --- a/game/modules/tome/data/chats/tarelion.lua +++ b/game/modules/tome/data/chats/tarelion.lua @@ -18,18 +18,18 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[I say, you there. Yes, you, young one! + text = _t[[I say, you there. Yes, you, young one! You seem like the adventuring fare, up to all sorts of doo-daddle in the outside world, I imagine. Well, don't forget to pay patronage to our good library here in the city. The riches of the world are all well and good, but where would we be without the gift of knowledge? And all proceeds go towards the funding of further research. No greater cause, yes?]], answers = { - {"Uh, yes, of course... I'll be moving on now."}, - {"Hold on! You... You're that apprentice mage I met in the wilds!", cond=function(npc, player) return player:isQuestStatus("mage-apprentice", engine.Quest.DONE) and player:getCun() >= 35 end, jump="apprentice"}, + {_t"Uh, yes, of course... I'll be moving on now."}, + {_t"Hold on! You... You're that apprentice mage I met in the wilds!", cond=function(npc, player) return player:isQuestStatus("mage-apprentice", engine.Quest.DONE) and player:getCun() >= 35 end, jump="apprentice"}, } } newChat{ id="apprentice", - text = [[Why, well-spotted, whippersnapper! Indeed, when the mood takes me I sometimes travel under the guise of an apprentice. It permits me to traverse the land unnoticed in my research, and if I meet any I deem worthy and sympathetic to Angolwen's cause, then so much the better. And it does provide the odd chortle, I tell you!]], + text = _t[[Why, well-spotted, whippersnapper! Indeed, when the mood takes me I sometimes travel under the guise of an apprentice. It permits me to traverse the land unnoticed in my research, and if I meet any I deem worthy and sympathetic to Angolwen's cause, then so much the better. And it does provide the odd chortle, I tell you!]], answers = { - {"Uh, yes, of course... I'll be moving on now."}, + {_t"Uh, yes, of course... I'll be moving on now."}, } } diff --git a/game/modules/tome/data/chats/temporal-rift-end.lua b/game/modules/tome/data/chats/temporal-rift-end.lua index 1d6df7f4f484b71d889aacb992cf5ee6f9ad439c..f6f7f3e093d54d3933e75a31a2666a8244fd80ef 100644 --- a/game/modules/tome/data/chats/temporal-rift-end.lua +++ b/game/modules/tome/data/chats/temporal-rift-end.lua @@ -18,12 +18,12 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A tall man, glowing like a star, appears out of nowhere.*#WHITE# + text = _t[[#LIGHT_GREEN#*A tall man, glowing like a star, appears out of nowhere.*#WHITE# You destroyed *it* both? I am sorry for my harsh tone when we first met, but repairing time threads is stressful. I cannot stay. I still have much to do. But take this-- it should help you. #LIGHT_GREEN#*He disappears again before you can even reply. A rift opens, to Maj'Eyal... you hope.*#WHITE#]], answers = { - {"Ok...", action = function(npc, player) game:onLevelLoad("temporal-rift-4", function() + {_t"Ok...", action = function(npc, player) game:onLevelLoad("temporal-rift-4", function() local o = game.zone:makeEntityByName(game.level, "object", "RUNE_RIFT") if o then o:identify(true) diff --git a/game/modules/tome/data/chats/temporal-rift-start.lua b/game/modules/tome/data/chats/temporal-rift-start.lua index 3e49213baf5b304d3b98f7a777c03389431e792f..733d2140ce5bec788d74b17b9b1810f98e40d3e0 100644 --- a/game/modules/tome/data/chats/temporal-rift-start.lua +++ b/game/modules/tome/data/chats/temporal-rift-start.lua @@ -18,13 +18,13 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A tall man, glowing like a star, appears out of nowhere.*#WHITE# + text = _t[[#LIGHT_GREEN#*A tall man, glowing like a star, appears out of nowhere.*#WHITE# Oh no, another *adventurer*! You should not mess with things beyond your comprehension! Do not meddle in the affairs of Time, for it passes swiftly and is easily disrupted! #LIGHT_GREEN#*He looks at you more closely.*#WHITE# You seem capable. Help me, fight the abominations while I repair the timeline. It is your only way out!]], answers = { - {"But what is all th...", action = function(npc, player) game:changeLevel(2) game.player:grantQuest("temporal-rift") end}, + {_t"But what is all th...", action = function(npc, player) game:changeLevel(2) game.player:grantQuest("temporal-rift") end}, } } diff --git a/game/modules/tome/data/chats/the-master-resurrect.lua b/game/modules/tome/data/chats/the-master-resurrect.lua index 39fdc94f8a4ee693478b288824f0258ae98b9fcb..95a2c32f13a66d185900d6b0eeadb49b7a107041 100644 --- a/game/modules/tome/data/chats/the-master-resurrect.lua +++ b/game/modules/tome/data/chats/the-master-resurrect.lua @@ -18,10 +18,10 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*The Master crumbles before you, vanquished. Yet in the blink of an eye you see his form recreating from dust; unharmed and ready to fight again!*#WHITE# + text = _t[[#LIGHT_GREEN#*The Master crumbles before you, vanquished. Yet in the blink of an eye you see his form recreating from dust; unharmed and ready to fight again!*#WHITE# Ahah you fool! See how even death has no meaning for me; for I am the Master and you are my toy, now and forever.]], answers = { - {"Never! Die!"}, + {_t"Never! Die!"}, } } diff --git a/game/modules/tome/data/chats/trap-priming.lua b/game/modules/tome/data/chats/trap-priming.lua index c1955f07e7a27d02b2d4c72fef03cf427b698739..151b1f60a699a0ae7cd77037081a51b100358dfa 100644 --- a/game/modules/tome/data/chats/trap-priming.lua +++ b/game/modules/tome/data/chats/trap-priming.lua @@ -24,7 +24,7 @@ local old_trap_primed = player.trap_primed local new_trap_primed = old_trap_primed local base_chat local function generate_traps() - local answers = {{"[Cancel]", tier=0}} + local answers = {{_t"[Cancel]", tier=0}} for i, tid in pairs(trapping_tids) do local t = npc:getTalentFromId(tid) local tier = t.trap_mastery_level @@ -41,12 +41,12 @@ local function generate_traps() end player:talentDialogReturn(new_trap_primed, old_trap_primed) end - local text, color = "#WHITE#", "Not Prepared" - if player.trap_primed == tid then color, text = "#LIGHT_BLUE#", "Primed Trigger" - elseif unlearnable then color, text = "#GREY#", "Not Usable" - elseif player:knowTalent(tid) then color, text = "#SALMON#", "Normal Trigger" + local text, color = "#WHITE#", _t"Not Prepared" + if player.trap_primed == tid then color, text = "#LIGHT_BLUE#", _t"Primed Trigger" + elseif unlearnable then color, text = "#GREY#", _t"Not Usable" + elseif player:knowTalent(tid) then color, text = "#SALMON#", _t"Normal Trigger" end - local label = ("%s[%s: %s]#LAST#"):format(color, text, t.name) + local label = ("%s[%s: %s]#LAST#"):tformat(color, text, t.name) answers[#answers+1] = {label, tier = tier, @@ -56,7 +56,7 @@ local function generate_traps() local mastery = nil game.tooltip_x, game.tooltip_y = 1, 1 player.turn_procs.trap_mastery_tid = chat_talent.id - game:tooltipDisplayAtMap(game.w, game.h, "#GOLD#"..t.name.."#LAST#\n"..tostring(player:getTalentFullDescription(t, 1, {force_level=1}))) + game:tooltipDisplayAtMap(game.w, game.h, ("#GOLD#%s#LAST#\n%s"):tformat(t.name, tostring(player:getTalentFullDescription(t, 1, {force_level=1})))) player.turn_procs.trap_mastery_tid = nil end, } @@ -68,7 +68,7 @@ local function generate_traps() end newChat{ id="welcome", - text = [[Choose a trap to prepare with a primed (instant) trigger or to dismantle. + text = _t[[Choose a trap to prepare with a primed (instant) trigger or to dismantle. #YELLOW#Newly prepared traps are placed on cooldown.#LAST#]], answers = generate_traps(), } diff --git a/game/modules/tome/data/chats/tutorial-start.lua b/game/modules/tome/data/chats/tutorial-start.lua index 743ed07615ff7bf680515a2b78820ded91feba83..6b15dcecbc33d714490541dd587e44c9456dd156 100644 --- a/game/modules/tome/data/chats/tutorial-start.lua +++ b/game/modules/tome/data/chats/tutorial-start.lua @@ -19,22 +19,22 @@ local q = game.player:hasQuest("tutorial") newChat{ id="welcome", - text = [[Hello there. What subject interests you?]], + text = _t[[Hello there. What subject interests you?]], answers = { - {"Basic gameplay", + {_t"Basic gameplay", action = function(npc, player) game:changeLevel(2, "tutorial") q:choose_basic_gameplay() player:setQuestStatus("tutorial", engine.Quest.COMPLETED, "started-basic-gameplay") end}, - {"Combat stat mechanics", + {_t"Combat stat mechanics", action = function(npc, player) game:changeLevel(3, "tutorial") q:choose_combat_stats() player:setQuestStatus("tutorial", engine.Quest.COMPLETED, "started-combat-stats") end}, - {"Never mind."}, - {"Is there nothing more for me to learn here?", + {_t"Never mind."}, + {_t"Is there nothing more for me to learn here?", jump = "done", cond = function(npc, player) return q and q:isCompleted("finished-basic-gameplay") and q:isCompleted("finished-combat-stats") end, }, @@ -43,7 +43,7 @@ newChat{ id="welcome", newChat{ id="done", - text = [[ + text = _t[[ You have completed all the tutorials, and should now know the basics of ToME4. You are ready to step forward into the world to find glory, treasures and be mercilessly slaughtered by hordes of creatures you thought you could handle! @@ -56,7 +56,7 @@ If this is your first time with the game, you will find the selection of races a Now go boldly and remember: #GOLD#have fun!#WHITE# Press #GOLD#Escape#WHITE#, then select #GOLD#Save and Exit#WHITE#, and create a new character!]], answers = { - {"Thank you."}, + {_t"Thank you."}, } } diff --git a/game/modules/tome/data/chats/ukllmswwik.lua b/game/modules/tome/data/chats/ukllmswwik.lua index bb2e945b07887cdb71e5ca3944382a61af488fd1..8805bdbc2fab43164ba60d32182e354333f7b7b8 100644 --- a/game/modules/tome/data/chats/ukllmswwik.lua +++ b/game/modules/tome/data/chats/ukllmswwik.lua @@ -27,16 +27,16 @@ end if not game.player:isQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "drake-story") then newChat{ id="welcome", - text = [[#LIGHT_GREEN#*@npcname@'s deep voice booms through the caverns.*#WHITE# + text = _t[[#LIGHT_GREEN#*@npcname@'s deep voice booms through the caverns.*#WHITE# This is my domain, and I do not take kindly to intruders. What is your purpose here?]], answers = { - {"I am here to kill you and take your treasures! Die, damned fish!", action=attack("DIE!")}, - {"I did not mean to intrude. I shall leave now.", jump="quest"}, + {_t"I am here to kill you and take your treasures! Die, damned fish!", action=attack(_t"DIE!")}, + {_t"I did not mean to intrude. I shall leave now.", jump="quest"}, } } newChat{ id="quest", - text = [[Wait! You seem to be worthy, so let me tell you a story. + text = _t[[Wait! You seem to be worthy, so let me tell you a story. During the Age of Pyre the world was sundered by the last effects of the Spellblaze. A part of the continental shelf of Maj'Eyal was torn apart and thrown into the sea. The Naloren Elves perished... or so the world thinks. Some of them survived; using ancient Sher'Tul magic they had kept for themselves, they transformed to live underwater. They are now called the nagas. They live deep in the ocean between Maj'Eyal and the Far East. @@ -46,17 +46,17 @@ But he has become mad and now looks upon all other intelligent water life as a t I cannot leave this sanctuary, but perhaps you could help me? After all, it would be an act of mercy to end his madness.]], answers = { - {"I would still rather kill you and take your treasure!", action=attack("DIE!")}, - {"I shall do as you say, but how do I find him?", jump="givequest"}, - {"That seems... unwise. My apologies, but I must refuse.", action=function(npc, player) player:grantQuest("temple-of-creation") player:setQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "drake-story") player:setQuestStatus("temple-of-creation", engine.Quest.FAILED) end}, + {_t"I would still rather kill you and take your treasure!", action=attack(_t"DIE!")}, + {_t"I shall do as you say, but how do I find him?", jump="givequest"}, + {_t"That seems... unwise. My apologies, but I must refuse.", action=function(npc, player) player:grantQuest("temple-of-creation") player:setQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "drake-story") player:setQuestStatus("temple-of-creation", engine.Quest.FAILED) end}, } } newChat{ id="givequest", - text = [[I can open a portal to his lair, far away in the western sea, but be warned: this is one-way only. I cannot bring you back. You will have to find your own way.]], + text = _t[[I can open a portal to his lair, far away in the western sea, but be warned: this is one-way only. I cannot bring you back. You will have to find your own way.]], answers = { - {"I will.", action=function(npc, player) player:grantQuest("temple-of-creation") player:setQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "drake-story") end}, - {"This is a death trap! Goodbye.", action=function(npc, player) player:grantQuest("temple-of-creation") player:setQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "drake-story") player:setQuestStatus("temple-of-creation", engine.Quest.FAILED) end}, + {_t"I will.", action=function(npc, player) player:grantQuest("temple-of-creation") player:setQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "drake-story") end}, + {_t"This is a death trap! Goodbye.", action=function(npc, player) player:grantQuest("temple-of-creation") player:setQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "drake-story") player:setQuestStatus("temple-of-creation", engine.Quest.FAILED) end}, } } @@ -66,28 +66,28 @@ newChat{ id="givequest", ----------------------------------------------------------------------- else newChat{ id="welcome", - text = [[Yes?]], + text = _t[[Yes?]], answers = { - {"[attack]", action=attack("TREACHERY!")}, - {"I want your treasures, water beast!", action=attack("Oh, is that so? Well, COME GET THEM!")}, - {"I spoke with Slasul, and he did not seem hostile, or mad.", jump="slasul_friend", cond=function(npc, player) return player:isQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "slasul-story") and not player:isQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "kill-slasul") end}, - {"Farewell, dragon."}, + {_t"[attack]", action=attack(_t"TREACHERY!")}, + {_t"I want your treasures, water beast!", action=attack(_t"Oh, is that so? Well, COME GET THEM!")}, + {_t"I spoke with Slasul, and he did not seem hostile, or mad.", jump="slasul_friend", cond=function(npc, player) return player:isQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "slasul-story") and not player:isQuestStatus("temple-of-creation", engine.Quest.COMPLETED, "kill-slasul") end}, + {_t"Farewell, dragon."}, } } newChat{ id="slasul_friend", - text = [[#LIGHT_GREEN#*@npcname@ roars!*#WHITE# You listen to the lies of this mad naga! + text = _t[[#LIGHT_GREEN#*@npcname@ roars!*#WHITE# You listen to the lies of this mad naga! You are corrupted! TAINTED!]], answers = { - {"[attack]", action=attack("DO NOT MEDDLE IN THE AFFAIRS OF DRAGONS!")}, - {"#LIGHT_GREEN#*Shake your head.*#LAST#He swayed my mind! Please, I am not your enemy.", jump="last_chance", cond=function(npc, player) return rng.percent(30 + player:getLck()) end}, + {_t"[attack]", action=attack(_t"DO NOT MEDDLE IN THE AFFAIRS OF DRAGONS!")}, + {_t"#LIGHT_GREEN#*Shake your head.*#LAST#He swayed my mind! Please, I am not your enemy.", jump="last_chance", cond=function(npc, player) return rng.percent(30 + player:getLck()) end}, } } newChat{ id="last_chance", - text = [[#LIGHT_GREEN#*@npcname@ calms down!*#WHITE# Very well; he is indeed a trickster. Now go finish your task, or do not come back!]], + text = _t[[#LIGHT_GREEN#*@npcname@ calms down!*#WHITE# Very well; he is indeed a trickster. Now go finish your task, or do not come back!]], answers = { - {"Thank you, mighty one."}, + {_t"Thank you, mighty one."}, } } diff --git a/game/modules/tome/data/chats/undead-start-game.lua b/game/modules/tome/data/chats/undead-start-game.lua index bb28ba42334a011c0ded01055334308bdb7bd146..ff141f054eda86582fe3ad5b69d9528f132a2a2b 100644 --- a/game/modules/tome/data/chats/undead-start-game.lua +++ b/game/modules/tome/data/chats/undead-start-game.lua @@ -18,29 +18,29 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a Human clothed in black robes. He seems to be ignoring you.*#WHITE# + text = _t[[#LIGHT_GREEN#*Before you stands a Human clothed in black robes. He seems to be ignoring you.*#WHITE# #LIGHT_GREEN#*You stand inside some kind of summoning circle, which prevents you from moving.*#WHITE# Oh yes! YES, one more for my collection. My collection, yes. A powerful one indeed!]], answers = { - {"[listen]", jump="welcome2"}, + {_t"[listen]", jump="welcome2"}, } } newChat{ id="welcome2", - text = [[A powerful tool against my enemies. Yes, yes. They all hate me, but I will show them my power! + text = _t[[A powerful tool against my enemies. Yes, yes. They all hate me, but I will show them my power! I will show them! SHOW THEM!]], answers = { - {"I am not a tool! RELEASE ME!", jump="welcome3"}, + {_t"I am not a tool! RELEASE ME!", jump="welcome3"}, } } newChat{ id="welcome3", - text = [[You cannot talk. You cannot talk! You are a slave, a tool! + text = _t[[You cannot talk. You cannot talk! You are a slave, a tool! You are mine! Be quiet! #LIGHT_GREEN#*As his mind drifts off you notice part of the summoning circle is fading. You can probably escape!*#WHITE# ]], answers = { - {"[attack]", action=function(npc, player) + {_t"[attack]", action=function(npc, player) local floor = game.zone:makeEntityByName(game.level, "terrain", "SUMMON_CIRCLE_BROKEN") game.zone:addEntity(game.level, floor, "terrain", 22, 3) end}, diff --git a/game/modules/tome/data/chats/undead-start-kill.lua b/game/modules/tome/data/chats/undead-start-kill.lua index fc45f586b1a08dc11117d03be905b706d3e6269c..74a0fe9f0f5d6533c92cc10b51271cb445a59e3e 100644 --- a/game/modules/tome/data/chats/undead-start-kill.lua +++ b/game/modules/tome/data/chats/undead-start-kill.lua @@ -18,35 +18,35 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*He falls to his knees.*#WHITE# + text = _t[[#LIGHT_GREEN#*He falls to his knees.*#WHITE# Please spare me! I am pitiful. I will not stop you. Let me leave!]], answers = { - {"No!", jump="welcome2"}, + {_t"No!", jump="welcome2"}, } } newChat{ id="welcome2", - text = [[But, but, you were my... you... + text = _t[[But, but, you were my... you... You need me! What do you think you will do on the surface? Everything you will meet will try to destroy you. You are strong but you cannot resist them all!]], answers = { - {"So what do you propose?", jump="what"}, - {"[kill him]", action=function(npc, player) + {_t"So what do you propose?", jump="what"}, + {_t"[kill him]", action=function(npc, player) npc.die = nil - npc:doEmote("ARRGGggg... You are alone! You will be destroyed!", 60) + npc:doEmote(_t"ARRGGggg... You are alone! You will be destroyed!", 60) npc:die(player) end}, } } newChat{ id="what", - text = [[I can give you a cloak that will conceal your true nature! + text = _t[[I can give you a cloak that will conceal your true nature! With it all people will see when they look at you is a normal average Human. You can go about your business. Please!]], answers = { - {"Thanks for the information. Now you may die. [kill him]", action=function(npc, player) + {_t"Thanks for the information. Now you may die. [kill him]", action=function(npc, player) npc.die = nil - npc:doEmote("ARRGGggg... You are alone! You will be destroyed!", 60) + npc:doEmote(_t"ARRGGggg... You are alone! You will be destroyed!", 60) npc:die(player) end}, } diff --git a/game/modules/tome/data/chats/unremarkable-cave-bosses.lua b/game/modules/tome/data/chats/unremarkable-cave-bosses.lua index 6cd36fd989fd3fd7931afdbbb6f02fecff7f1c78..a6e5df0a0b8d47feb30b6bbc0cda6f1003bcc322 100644 --- a/game/modules/tome/data/chats/unremarkable-cave-bosses.lua +++ b/game/modules/tome/data/chats/unremarkable-cave-bosses.lua @@ -46,15 +46,15 @@ end game.player:grantQuest("strange-new-world") newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A beautiful Elven woman in golden robes stands before you, facing an orc clad in mail.*#WHITE# + text = _t[[#LIGHT_GREEN#*A beautiful Elven woman in golden robes stands before you, facing an orc clad in mail.*#WHITE# Fillarel: "Abandon this fight, orc! You cannot win: I stand with the power of the Sun and the shadows of the Moons." Krogar: "Ha! It's only been one hour and you already look tired, my 'lady'." #LIGHT_GREEN#*As you enter the room they notice you.*#WHITE# Fillarel: "You! @playerdescriptor.race@! Help me defeat this monster or begone!" Krogar: "Ah, looking for help? Bah. @playerdescriptor.race@, kill this wench for me and I shall reward you!"]], answers = { - {"[attack Krogar]", action=attack_krogar}, --- {"[attack Fillarel]", action=attack_fillarel, cond=function(npc, player) return not player:hasQuest("start-sunwall") and config.settings.cheat end}, + {_t"[attack Krogar]", action=attack_krogar}, +-- {_t"[attack Fillarel]", action=attack_fillarel, cond=function(npc, player) return not player:hasQuest("start-sunwall") and config.settings.cheat end}, } } return "welcome" diff --git a/game/modules/tome/data/chats/unremarkable-cave-fillarel.lua b/game/modules/tome/data/chats/unremarkable-cave-fillarel.lua index f340d896e3108a25a111fc4e52a4ee731377facf..086aedf965225cc36c68e109a2b9238d1a617a76 100644 --- a/game/modules/tome/data/chats/unremarkable-cave-fillarel.lua +++ b/game/modules/tome/data/chats/unremarkable-cave-fillarel.lua @@ -18,35 +18,35 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[Thank you, @playername@. I hate to admit it, but you saved my life.]], + text = _t[[Thank you, @playername@. I hate to admit it, but you saved my life.]], answers = { - {"At your service. But may I ask what you were doing in this dark place?", jump="what", cond=function(npc, player) return not player:hasQuest("start-sunwall") end}, - {"At your service. I have been gone for months, but I can feel it, at last this is my homeland!", jump="back", cond=function(npc, player) return player:hasQuest("start-sunwall") end}, + {_t"At your service. But may I ask what you were doing in this dark place?", jump="what", cond=function(npc, player) return not player:hasQuest("start-sunwall") end}, + {_t"At your service. I have been gone for months, but I can feel it, at last this is my homeland!", jump="back", cond=function(npc, player) return player:hasQuest("start-sunwall") end}, } } newChat{ id="what", - text = [[I am an Anorithil, a mage of the Sun and Moons; we fight all that is evil. I was with a group of Sun Paladins; we came from the Gates of Morning to the east. + text = _t[[I am an Anorithil, a mage of the Sun and Moons; we fight all that is evil. I was with a group of Sun Paladins; we came from the Gates of Morning to the east. My companions were... were slaughtered by orcs, and I nearly died as well. Thank you again for your help.]], answers = { - {"It was my pleasure. But may I ask a favor myself? I am not from these lands. I used a farportal guarded by orcs deep below the Iron Throne and was brought here.", action=function(npc, player) game:setAllowedBuild("divine") game:setAllowedBuild("divine_anorithil", true) end, jump="sunwall"}, + {_t"It was my pleasure. But may I ask a favor myself? I am not from these lands. I used a farportal guarded by orcs deep below the Iron Throne and was brought here.", action=function(npc, player) game:setAllowedBuild("divine") game:setAllowedBuild("divine_anorithil", true) end, jump="sunwall"}, } } newChat{ id="sunwall", - text = [[Yes, I noticed you were not from here. Your only hope is the Gates of Morning, the last bastion of freedom in this orc territory. When you leave the caves, head southeast; you cannot miss it. + text = _t[[Yes, I noticed you were not from here. Your only hope is the Gates of Morning, the last bastion of freedom in this orc territory. When you leave the caves, head southeast; you cannot miss it. Tell High Sun Paladin Aeryn that you met me. I'll send word to let you pass.]], answers = { - {"Thank you, I will talk with Aeryn.", action=function(npc, player) game.player:setQuestStatus("strange-new-world", engine.Quest.COMPLETED, "helped-fillarel") end}, + {_t"Thank you, I will talk with Aeryn.", action=function(npc, player) game.player:setQuestStatus("strange-new-world", engine.Quest.COMPLETED, "helped-fillarel") end}, } } newChat{ id="back", - text = [[Gone? Wait, this face.. you are @playername@! We thought you died in the naga portal explosion! + text = _t[[Gone? Wait, this face.. you are @playername@! We thought you died in the naga portal explosion! Thanks to your courage the Gates of Morning still stand. You should go there at once.]], answers = { - {"Sadly I am the bringer of bad news, the orcs are planning something. Good luck, my lady."}, + {_t"Sadly I am the bringer of bad news, the orcs are planning something. Good luck, my lady."}, } } diff --git a/game/modules/tome/data/chats/unremarkable-cave-krogar.lua b/game/modules/tome/data/chats/unremarkable-cave-krogar.lua index abb72a69228e9b3729557dee203ce34c4da12fa5..4a04cc05adae3e6344708906dc65ee9e0e88b76c 100644 --- a/game/modules/tome/data/chats/unremarkable-cave-krogar.lua +++ b/game/modules/tome/data/chats/unremarkable-cave-krogar.lua @@ -18,9 +18,9 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[@playerdescriptor.race@, you have helped me kill the Elf-wench. The Orc Pride thanks you... for now]], + text = _t[[@playerdescriptor.race@, you have helped me kill the Elf-wench. The Orc Pride thanks you... for now]], answers = { - {"I hate Elves anyway..."}, + {_t"I hate Elves anyway..."}, } } diff --git a/game/modules/tome/data/chats/ward.lua b/game/modules/tome/data/chats/ward.lua index 258f283c1a0bbdcf952fbd19c95cbbaaf039dd03..6fbf7c9af9d5f7814d44833d17b4a39c4642f847 100644 --- a/game/modules/tome/data/chats/ward.lua +++ b/game/modules/tome/data/chats/ward.lua @@ -32,58 +32,58 @@ local function set_ward(which, charges) end newChat{ id="welcome", - text = [[Call forth which ward?]], + text = _t[[Call forth which ward?]], answers = { - {"Fire ["..(src.wards[DamageType.FIRE] or 0).."]", + {("Fire [%d]"):tformat(src.wards[DamageType.FIRE] or 0), cond = function() return has_ward(DamageType.FIRE) end, action = function() return set_ward(DamageType.FIRE, (src.wards[DamageType.FIRE] or 0)) end, }, - {"Lightning ["..(src.wards[DamageType.LIGHTNING] or 0).."]", + {("Lightning [%d]"):tformat(src.wards[DamageType.LIGHTNING] or 0), cond = function() return has_ward(DamageType.LIGHTNING) end, action = function() return set_ward(DamageType.LIGHTNING, (src.wards[DamageType.LIGHTNING] or 0)) end, }, - {"Cold ["..(src.wards[DamageType.COLD] or 0).."]", + {("Cold [%d]"):tformat(src.wards[DamageType.COLD] or 0), cond = function(who) return has_ward(DamageType.COLD) end, action = function() return set_ward(DamageType.COLD, (src.wards[DamageType.COLD] or 0)) end, }, - {"Arcane ["..(src.wards[DamageType.ARCANE] or 0).."]", + {("Arcane [%d]"):tformat(src.wards[DamageType.ARCANE] or 0), cond = function(who) return has_ward(DamageType.ARCANE) end, action = function() return set_ward(DamageType.ARCANE, (src.wards[DamageType.ARCANE] or 0)) end, }, - {"Light ["..(src.wards[DamageType.LIGHT] or 0).."]", + {("Light [%d]"):tformat(src.wards[DamageType.LIGHT] or 0), cond = function() return has_ward(DamageType.LIGHT) end, action = function() return set_ward(DamageType.LIGHT, (src.wards[DamageType.LIGHT] or 0)) end, }, - {"Darkness ["..(src.wards[DamageType.DARKNESS] or 0).."]", + {("Darkness [%d]"):tformat(src.wards[DamageType.DARKNESS] or 0), cond = function() return has_ward(DamageType.DARKNESS) end, action = function() return set_ward(DamageType.DARKNESS, (src.wards[DamageType.DARKNESS] or 0)) end, }, - {"Temporal ["..(src.wards[DamageType.TEMPORAL] or 0).."]", + {("Temporal [%d]"):tformat(src.wards[DamageType.TEMPORAL] or 0), cond = function() return has_ward(DamageType.TEMPORAL) end, action = function() return set_ward(DamageType.TEMPORAL, (src.wards[DamageType.TEMPORAL] or 0)) end, }, - {"Physical ["..(src.wards[DamageType.PHYSICAL] or 0).."]", + {("Physical [%d]"):tformat(src.wards[DamageType.PHYSICAL] or 0), cond = function() return has_ward(DamageType.PHYSICAL) end, action = function() return set_ward(DamageType.PHYSICAL, (src.wards[DamageType.PHYSICAL] or 0)) end, }, - {"Nature ["..(src.wards[DamageType.NATURE] or 0).."]", + {("Nature [%d]"):tformat(src.wards[DamageType.NATURE] or 0), cond = function() return has_ward(DamageType.NATURE) end, action = function() return set_ward(DamageType.NATURE, (src.wards[DamageType.NATURE] or 0)) end, }, - {"Blight ["..(src.wards[DamageType.BLIGHT] or 0).."]", + {("Blight [%d]"):tformat(src.wards[DamageType.BLIGHT] or 0), cond = function() return has_ward(DamageType.BLIGHT) end, action = function() return set_ward(DamageType.BLIGHT, (src.wards[DamageType.BLIGHT] or 0)) end, }, - {"Acid ["..(src.wards[DamageType.ACID] or 0).."]", + {("Acid [%d]"):tformat(src.wards[DamageType.ACID] or 0), cond = function() return has_ward(DamageType.ACID) end, action = function() return set_ward(DamageType.ACID, (src.wards[DamageType.ACID] or 0)) end, }, - {"Mind ["..(src.wards[DamageType.MIND] or 0).."]", + {("Mind [%d]"):tformat(src.wards[DamageType.MIND] or 0), cond = function() return has_ward(DamageType.MIND) end, action = function() return set_ward(DamageType.MIND, (src.wards[DamageType.MIND] or 0)) end, }, - {"Never mind"}, + {_t"Never mind"}, } } diff --git a/game/modules/tome/data/chats/worldly-knowledge.lua b/game/modules/tome/data/chats/worldly-knowledge.lua index 5e08a655fe6f3536eceb47386cc49a81bf8a0b43..0825b23b6d159b621ab652de4039dfd57fad10ab 100644 --- a/game/modules/tome/data/chats/worldly-knowledge.lua +++ b/game/modules/tome/data/chats/worldly-knowledge.lua @@ -53,11 +53,11 @@ local function generate_rewards() if player:knowTalentType(tt) == nil then player:setTalentTypeMastery(tt, 1.0) end player:learnTalentType(tt, true) end - answers[#answers+1] = {("[%s (at mastery %0.2f)]"):format(cat:capitalize().." / "..tt_def.name:capitalize(), 1.0), + answers[#answers+1] = {("[%s (at mastery %0.2f)]"):tformat(_t(cat):capitalize().." / "..tt_def.name:capitalize(), 1.0), action=doit, on_select=function(npc, player) game.tooltip_x, game.tooltip_y = 1, 1 - game:tooltipDisplayAtMap(game.w, game.h, "#GOLD#"..(cat:capitalize().." / "..tt_def.name:capitalize()).."#LAST#\n"..tt_def.description) + game:tooltipDisplayAtMap(game.w, game.h, ("#GOLD#%s / %s#LAST#\n"):tformat(_t(cat):capitalize(), tt_def.name:capitalize(), tt_def.description)) end, } end end @@ -66,7 +66,7 @@ local function generate_rewards() end newChat{ id="welcome", - text = [[Learn which category?]], + text = _t[[Learn which category?]], answers = generate_rewards(), } diff --git a/game/modules/tome/data/chats/yeek-wayist.lua b/game/modules/tome/data/chats/yeek-wayist.lua index f3a227d008340aa94ee43920435b288a0fb59a20..ebc6a981e0fa23ec64666607d286a9285f742996 100644 --- a/game/modules/tome/data/chats/yeek-wayist.lua +++ b/game/modules/tome/data/chats/yeek-wayist.lua @@ -22,50 +22,50 @@ ----------------------------------------------------------- newChat{ id="welcome", - text = [[#LIGHT_GREEN#*Before you stands a creature about as tall as a Halfling, covered in small white fur and with a disproportionate head. + text = _t[[#LIGHT_GREEN#*Before you stands a creature about as tall as a Halfling, covered in small white fur and with a disproportionate head. You also notice he does not wield his greatsword. It seems to float in the air, bound to his will.*#WHITE# Why did you save me, stranger? You are not of the Way.]], answers = { - {"Well, you seemed to need help.", jump="kindness"}, - {"So I could rip your throat myself!", action=function(npc, player) npc:checkAngered(player, false, -200) end}, + {_t"Well, you seemed to need help.", jump="kindness"}, + {_t"So I could rip your throat myself!", action=function(npc, player) npc:checkAngered(player, false, -200) end}, } } newChat{ id="kindness", - text = [[#LIGHT_GREEN#*The greatsword floats to a less aggressive stance. He seems surprised.*#WHITE# + text = _t[[#LIGHT_GREEN#*The greatsword floats to a less aggressive stance. He seems surprised.*#WHITE# Then, on behalf of the Way, I thank you.]], answers = { - {"What is the Way, and what are you?", jump="what"}, + {_t"What is the Way, and what are you?", jump="what"}, } } newChat{ id="what", - text = [[The Way is enlightenment, peace and protection. I am a Yeek. I came through this tunnel to explore this part of the world that was closed to us for centuries.]], + text = _t[[The Way is enlightenment, peace and protection. I am a Yeek. I came through this tunnel to explore this part of the world that was closed to us for centuries.]], answers = { - {"Can you tell me more about the Way?", jump="way", action=function(npc, player) - game.party:reward("Select the party member to receive the mental shield:", function(player) + {_t"Can you tell me more about the Way?", jump="way", action=function(npc, player) + game.party:reward(_t"Select the party member to receive the mental shield:", function(player) player.combat_mentalresist = player.combat_mentalresist + 15 player:attr("confusion_immune", 0.10) end) game.logPlayer(player, "The contact with the Wayist mind has improved your mental shields. (+15 mental save, +10%% confusion resistance)") end}, --- {"So you will wander the land alone?", jump="done"}, +-- {_t"So you will wander the land alone?", jump="done"}, } } newChat{ id="done", - text = [[I am never alone. I have the Way.]], + text = _t[[I am never alone. I have the Way.]], answers = { - {"Farewell, then.", action=function(npc, player) npc:disappear() end}, + {_t"Farewell, then.", action=function(npc, player) npc:disappear() end}, } } newChat{ id="way", - text = [[I cannot, but I may show you a glimpse. + text = _t[[I cannot, but I may show you a glimpse. #LIGHT_GREEN#*He leans toward you. Your mind is suddenly filled with feelings of peace and happiness.*#WHITE# This is the Way.]], answers = { - {"Thank you for this vision. Farewell, my friend.", action=function(npc, player) + {_t"Thank you for this vision. Farewell, my friend.", action=function(npc, player) npc:disappear() game:setAllowedBuild("yeek", true) end}, @@ -77,16 +77,16 @@ This is the Way.]], ----------------------------------------------------------- newChat{ id="yeek-welcome", - text = [[Thank the Way. This... thing... would have killed me.]], + text = _t[[Thank the Way. This... thing... would have killed me.]], answers = { - {"The Way sent me to explore this side of the tunnel.", jump="explore"}, + {_t"The Way sent me to explore this side of the tunnel.", jump="explore"}, } } newChat{ id="explore", - text = [[Yes, me too. We should split up to cover more ground.]], + text = _t[[Yes, me too. We should split up to cover more ground.]], answers = { - {"Farewell. We are the Way, always.", action=function() + {_t"Farewell. We are the Way, always.", action=function() game:setAllowedBuild("psionic") game:setAllowedBuild("psionic_mindslayer", true) end}, diff --git a/game/modules/tome/data/chats/zemekkys-done.lua b/game/modules/tome/data/chats/zemekkys-done.lua index b274b676d7e4ab1c4b7c61f6b25f990693243877..01a91dd0ed7ae7c9b1c5b6bd39fc848d762edefe 100644 --- a/game/modules/tome/data/chats/zemekkys-done.lua +++ b/game/modules/tome/data/chats/zemekkys-done.lua @@ -18,11 +18,11 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[What? Ah, it is you, @playername@. + text = _t[[What? Ah, it is you, @playername@. I take it you are satisfied with the portal.]], answers = { - {"Yes, thank you."}, - {"Whatever."}, + {_t"Yes, thank you."}, + {_t"Whatever."}, } } diff --git a/game/modules/tome/data/chats/zemekkys-start-chronomancers.lua b/game/modules/tome/data/chats/zemekkys-start-chronomancers.lua index 7df3dd6c737a7645230da027d43595c965802e37..f7d478db142f29ec09db6b107972c844d2075237 100644 --- a/game/modules/tome/data/chats/zemekkys-start-chronomancers.lua +++ b/game/modules/tome/data/chats/zemekkys-start-chronomancers.lua @@ -18,11 +18,11 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[@playername@, you are called to serve. The nearby unhallowed morass inhabitants are growing restless. + text = _t[[@playername@, you are called to serve. The nearby unhallowed morass inhabitants are growing restless. You must go there and find the source.]], answers = { - {"I will, Grand Keeper.", action=function() game:changeLevel(1, "unhallowed-morass") end}, - {"I am sorry, but I cannot do that.", action=function(npc, player) player:setQuestStatus("start-point-zero", engine.Quest.FAILED) end}, + {_t"I will, Grand Keeper.", action=function() game:changeLevel(1, "unhallowed-morass") end}, + {_t"I am sorry, but I cannot do that.", action=function(npc, player) player:setQuestStatus("start-point-zero", engine.Quest.FAILED) end}, } } diff --git a/game/modules/tome/data/chats/zemekkys.lua b/game/modules/tome/data/chats/zemekkys.lua index ba4a1b613739fc4ff3d422b4ad98c62bb7425bb8..c0b92187307b69d46d3904b3d9159b2e7c0f8361 100644 --- a/game/modules/tome/data/chats/zemekkys.lua +++ b/game/modules/tome/data/chats/zemekkys.lua @@ -17,12 +17,13 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org +--I18N-TODO it should be done in a i18n-friendly style local function remove_materials(npc, player) - local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond") + local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond", {raw_name=true}) player:removeObject(gem_inven_id, gem_item, false) gem_o:removed() - local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame") + local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame", {raw_name=true}) player:removeObject(athame_inven_id, athame_item, false) athame_o:removed() @@ -30,8 +31,8 @@ local function remove_materials(npc, player) end local function check_materials(npc, player) - local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond") - local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame") + local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond", {raw_name=true}) + local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame", {raw_name=true}) return gem_o and athame_o and player.money >= 100 end @@ -40,13 +41,13 @@ end ----------------------------------------------------------------- newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A slot in the door opens and a pair of wild eyes peer out.*#WHITE# + text = _t[[#LIGHT_GREEN#*A slot in the door opens and a pair of wild eyes peer out.*#WHITE# What do you want, @playerdescriptor.race@?]], answers = { - {"Paladin Aeryn told me that you could help me. I need to get to Maj'Eyal.", jump="help", cond=function(npc, player) return game.state:isAdvanced() and not player:hasQuest("west-portal") end}, - {"I found the Blood-Runed Athame, but there was no Resonating Diamond.", jump="athame", cond=function(npc, player) return player:hasQuest("west-portal") and player:hasQuest("west-portal"):isCompleted("athame") and not player:hasQuest("west-portal"):isCompleted("gem") end}, - {"I have a Resonating Diamond.", jump="complete", cond=function(npc, player) return player:hasQuest("west-portal") and player:hasQuest("west-portal"):isCompleted("gem") end}, - {"Sorry, I have to go!"}, + {_t"Paladin Aeryn told me that you could help me. I need to get to Maj'Eyal.", jump="help", cond=function(npc, player) return game.state:isAdvanced() and not player:hasQuest("west-portal") end}, + {_t"I found the Blood-Runed Athame, but there was no Resonating Diamond.", jump="athame", cond=function(npc, player) return player:hasQuest("west-portal") and player:hasQuest("west-portal"):isCompleted("athame") and not player:hasQuest("west-portal"):isCompleted("gem") end}, + {_t"I have a Resonating Diamond.", jump="complete", cond=function(npc, player) return player:hasQuest("west-portal") and player:hasQuest("west-portal"):isCompleted("gem") end}, + {_t"Sorry, I have to go!"}, } } @@ -54,44 +55,44 @@ What do you want, @playerdescriptor.race@?]], -- Give quest ----------------------------------------------------------------- newChat{ id="help", - text = [[Pfaugh! Her goal in life is to waste my time! Maj'Eyal? Why not Narnia or Chicago? Just as easy to send you someplace entirely fictional as Maj'Eyal. Go away. + text = _t[[Pfaugh! Her goal in life is to waste my time! Maj'Eyal? Why not Narnia or Chicago? Just as easy to send you someplace entirely fictional as Maj'Eyal. Go away. #LIGHT_GREEN#*Slot slams shut.*#WHITE#]], answers = { - {"I got here from Maj'Eyal, didn't I? I have this magic Orb I looted from a dead orc, see, and...", jump="offer"}, + {_t"I got here from Maj'Eyal, didn't I? I have this magic Orb I looted from a dead orc, see, and...", jump="offer"}, } } newChat{ id="offer", - text = [[#LIGHT_GREEN#*Slot opens.*#WHITE# + text = _t[[#LIGHT_GREEN#*Slot opens.*#WHITE# Orb, you say? That you used to travel here from Maj'Eyal? Surely you don't possess the Orb of Many Ways! It's been lost for ages!]], answers = { - {"[Hold up the orb]", jump="offer2"}, + {_t"[Hold up the orb]", jump="offer2"}, } } newChat{ id="offer2", - text = [[#LIGHT_GREEN#*His eyes widen.*#WHITE# + text = _t[[#LIGHT_GREEN#*His eyes widen.*#WHITE# Great Socks of Aeryn! It IS the Orb! Maybe we can get you home after all. Or maybe we can get you embedded in magma a thousand leagues straight down.]], answers = { - {"May I come in?", jump="offer3"}, + {_t"May I come in?", jump="offer3"}, } } newChat{ id="offer3", - text = [[You think I'm letting some filthy @playerdescriptor.race@ in my house with the Orb of Many Ways? + text = _t[[You think I'm letting some filthy @playerdescriptor.race@ in my house with the Orb of Many Ways? I blow myself up quite enough already without that thing in the house, thank you. Besides, I still can't help you unless you have a Blood-Runed Athame to etch a portal. Err, and that portal must be etched on a piece of prepared Resonating Marble. The Gates of the Morning has a slab of Marble that once could have served, but a number of, um, incidents have taken their toll. It'll require a Resonating Diamond to get it properly prepared. Oh, and I want 100 gold.]], answers = { - {"Where can I find all that?", jump="quest"}, + {_t"Where can I find all that?", jump="quest"}, } } newChat{ id="quest", - text = [[Try your purse for the 100 gold. As for an Athame and a Resonating Diamond, I assume the orcs have some if they're cooking up portals to use that Orb on. Try the Vor Armory. It so happens that I know a back way in. Never mind why.]], + text = _t[[Try your purse for the 100 gold. As for an Athame and a Resonating Diamond, I assume the orcs have some if they're cooking up portals to use that Orb on. Try the Vor Armory. It so happens that I know a back way in. Never mind why.]], answers = { - {"Thank you.", action=function(npc, player) + {_t"Thank you.", action=function(npc, player) player:grantQuest("west-portal") end}, } @@ -102,21 +103,21 @@ newChat{ id="quest", -- Return athame ----------------------------------------------------------------- newChat{ id="athame", - text = [[Of course there was no Resonating Diamond. What makes you think Briagh would let one loose for even a second?]], + text = _t[[Of course there was no Resonating Diamond. What makes you think Briagh would let one loose for even a second?]], answers = { - {"Briagh?", jump="athame2"}, + {_t"Briagh?", jump="athame2"}, } } newChat{ id="athame2", - text = [[Briagh the Great Sand Wyrm. Where do you think Resonating Diamonds come from? They're just regular diamonds until they get stuck between Briagh's scales for a few centuries and get infused with his life rhythms. He sleeps on a hoard of precious gems and metals, you see.]], + text = _t[[Briagh the Great Sand Wyrm. Where do you think Resonating Diamonds come from? They're just regular diamonds until they get stuck between Briagh's scales for a few centuries and get infused with his life rhythms. He sleeps on a hoard of precious gems and metals, you see.]], answers = { - {"Where might I find Briagh's lair??", jump="athame3"}, + {_t"Where might I find Briagh's lair??", jump="athame3"}, } } newChat{ id="athame3", - text = [[Well south of the Sunwall. I'll mark it for you on your map.]], + text = _t[[Well south of the Sunwall. I'll mark it for you on your map.]], answers = { - {"I'll be back with a Resonating Diamond.", action=function(npc, player) player:hasQuest("west-portal"):wyrm_lair(player) end}, + {_t"I'll be back with a Resonating Diamond.", action=function(npc, player) player:hasQuest("west-portal"):wyrm_lair(player) end}, } } @@ -124,17 +125,17 @@ newChat{ id="athame3", -- Return gem ----------------------------------------------------------------- newChat{ id="complete", - text = [[Yes? You got the Athame, the gem and 100 gold?]], + text = _t[[Yes? You got the Athame, the gem and 100 gold?]], answers = { - {"[Give him the gem, the athame and 100 gold]", jump="complete2", cond=check_materials, action=remove_materials}, - {"Sorry, it seems I lack some stuff. I will be back."}, + {_t"[Give him the gem, the athame and 100 gold]", jump="complete2", cond=check_materials, action=remove_materials}, + {_t"Sorry, it seems I lack some stuff. I will be back."}, } } newChat{ id="complete2", - text = [[#LIGHT_GREEN#*The door opens and a shabby Elf emerges.*#WHITE# + text = _t[[#LIGHT_GREEN#*The door opens and a shabby Elf emerges.*#WHITE# Off we go to prepare the portal!]], answers = { - {"[follow him]", action=function(npc, player) player:hasQuest("west-portal"):create_portal(npc, player) end}, + {_t"[follow him]", action=function(npc, player) player:hasQuest("west-portal"):create_portal(npc, player) end}, } } diff --git a/game/modules/tome/data/chats/zigur-mindstar-store.lua b/game/modules/tome/data/chats/zigur-mindstar-store.lua index e88d58459d8a86e0e45ac747f094bb3e1fc71530..9587e3ad4ad7727e9a471a3196b1ba5351b8fb1b 100644 --- a/game/modules/tome/data/chats/zigur-mindstar-store.lua +++ b/game/modules/tome/data/chats/zigur-mindstar-store.lua @@ -18,21 +18,21 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[Welcome @playername@ to my shop.]], + text = _t[[Welcome @playername@ to my shop.]], answers = { - {"Let me see your wares.", action=function(npc, player) + {_t"Let me see your wares.", action=function(npc, player) npc.store:loadup(game.level, game.zone) npc.store:interact(player) end}, - {"I am looking for mindstar training.", jump="training"}, - {"Sorry, I have to go!"}, + {_t"I am looking for mindstar training.", jump="training"}, + {_t"Sorry, I have to go!"}, } } newChat{ id="training", - text = [[I can teach you mindstar mastery (talent category Wild-gift/Mindstar mastery). Learning the basics costs 100 gold, while more intensive training to gain proficiency costs 500 gold. Once you're proficient, I can teach you some additional skills for 750 gold.]], + text = _t[[I can teach you mindstar mastery (talent category Wild-gift/Mindstar mastery). Learning the basics costs 100 gold, while more intensive training to gain proficiency costs 500 gold. Once you're proficient, I can teach you some additional skills for 750 gold.]], answers = { - {"Just give me the basics (reveals locked talent category) - 100 gold.", action=function(npc, player) -- Normal basic training + {_t"Just give me the basics (reveals locked talent category) - 100 gold.", action=function(npc, player) -- Normal basic training game.logPlayer(player, "The shopkeeper spends some time with you, teaching you the basics of channeling energy through mindstars.") player:incMoney(-100) player:learnTalentType("wild-gift/mindstar-mastery", false) @@ -46,7 +46,7 @@ newChat{ id="training", if player:knowTalentType("wild-gift/mindstar-mastery") or player:knowTalentType("wild-gift/mindstar-mastery") == false then return end return true end}, - {"Please teach me what I need to know (unlocks talent category) - 500 gold.", action=function(npc, player) + {_t"Please teach me what I need to know (unlocks talent category) - 500 gold.", action=function(npc, player) game.logPlayer(player, "The shopkeeper spends a great deal of time going over the finer details of channeling energy through mindstars with you.") player:incMoney(-500) player:learnTalentType("wild-gift/mindstar-mastery", true) @@ -62,17 +62,17 @@ newChat{ id="training", if player:knowTalentType("wild-gift/mindstar-mastery") then return end return true end}, - {"I'm already proficient, but I want to be an expert (improves talent mastery by 0.2) - 750 gold.", action=function(npc, player) --Enhanced intensive training + {_t"I'm already proficient, but I want to be an expert (improves talent mastery by 0.2) - 750 gold.", action=function(npc, player) --Enhanced intensive training player:incMoney(-750) player:learnTalentType("wild-gift/mindstar-mastery", true) player:setTalentTypeMastery("wild-gift/mindstar-mastery", player:getTalentTypeMastery("wild-gift/mindstar-mastery") + 0.2) - game.logPlayer(player, ("The shopkeeper spends a great deal of time going over the finer details of channeling energy through mindstars with you%s."):format(player:getTalentTypeMastery("wild-gift/mindstar-mastery")>1 and ", and teaches you enhanced mental discipline needed to maintain powerful energy fields" or "")) + game.logPlayer(player, ("The shopkeeper spends a great deal of time going over the finer details of channeling energy through mindstars with you%s."):tformat(player:getTalentTypeMastery("wild-gift/mindstar-mastery")>1 and _t", and teaches you enhanced mental discipline needed to maintain powerful energy fields" or "")) player.changed = true end, cond=function(npc, player) if player.money < 750 then return end if player:knowTalentType("wild-gift/mindstar-mastery") and player:getTalentTypeMastery("wild-gift/mindstar-mastery") < 1.2 then return true end end}, - {"No thanks."}, + {_t"No thanks."}, } } diff --git a/game/modules/tome/data/chats/zigur-trainer.lua b/game/modules/tome/data/chats/zigur-trainer.lua index c704c7d035c8f9a6b70cd02c4ffab26e22e91ef5..4b3e659feaa109c3b97678095695c8840ed82a64 100644 --- a/game/modules/tome/data/chats/zigur-trainer.lua +++ b/game/modules/tome/data/chats/zigur-trainer.lua @@ -19,15 +19,15 @@ if game.player:isQuestStatus("antimagic", engine.Quest.DONE) then newChat{ id="welcome", - text = [[Well met, friend.]], + text = _t[[Well met, friend.]], answers = { - {"Farewell."}, + {_t"Farewell."}, } } return "welcome" end -local sex = game.player.female and "Sister" or "Brother" +local sex = game.player.female and _t"Sister" or _t"Brother" local remove_magic = function(npc, player) for tid, _ in pairs(player.sustain_talents) do @@ -53,39 +53,39 @@ local remove_magic = function(npc, player) end newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A grim-looking Fighter stands there, clad in mail armour and a large olive cloak. He doesn't appear hostile - his sword is sheathed.*#WHITE# -]]..sex..[[, our guild has been watching you and we believe that you have potential. + text = ([[#LIGHT_GREEN#*A grim-looking Fighter stands there, clad in mail armour and a large olive cloak. He doesn't appear hostile - his sword is sheathed.*#WHITE# +%s, our guild has been watching you and we believe that you have potential. We see that the hermetic arts have always been at the root of each and every trial this land has endured, and we also see that one day they will bring about our destruction. So we have decided to take action by calling upon Nature to help us combat those who wield the arcane. We can train you, but you need to prove you are pure, untouched by the eldritch forces, and ready to fight them to the end. You will be challenged against magical foes. Should you defeat them, we will teach you our ways, and never again will you be able to be tainted by magic, or use it. -#LIGHT_RED#Note: Completing this quest will forever prevent this character from using spells or items powered by arcane forces. In exchange you'll be given access to a mindpower based generic talent tree, Anti-magic, and be able to unlock hidden properties in many arcane-disrupting items.]], +#LIGHT_RED#Note: Completing this quest will forever prevent this character from using spells or items powered by arcane forces. In exchange you'll be given access to a mindpower based generic talent tree, Anti-magic, and be able to unlock hidden properties in many arcane-disrupting items.]]):tformat(sex), answers = { - {"I will face your challenge!", cond=function(npc, player) return player.level >= 10 end, jump="testok"}, - {"I will face your challenge!", cond=function(npc, player) return player.level < 10 end, jump="testko"}, - {"I'm not interested.", jump="ko"}, + {_t"I will face your challenge!", cond=function(npc, player) return player.level >= 10 end, jump="testok"}, + {_t"I will face your challenge!", cond=function(npc, player) return player.level < 10 end, jump="testko"}, + {_t"I'm not interested.", jump="ko"}, } } newChat{ id="ko", - text = [[Very well. I will say that this is disappointing, but it is your choice. Farewell.]], + text = _t[[Very well. I will say that this is disappointing, but it is your choice. Farewell.]], answers = { - {"Farewell."}, + {_t"Farewell."}, } } newChat{ id="testko", - text = [[Ah, you seem eager, but maybe still too young. Come back when you have grown a bit.]], + text = _t[[Ah, you seem eager, but maybe still too young. Come back when you have grown a bit.]], answers = { - {"I shall."}, + {_t"I shall."}, } } local ogretext = "" if player.descriptor and player.descriptor.subrace == "Ogre" then - ogretext = "\nWorry not, though, Ogre - we can replace your unclean runes with a newly-discovered mixture of infusions, eliminating your dependence on them. The process will feel... unpleasant, and will dramatically shorten your lifespan, but you will finally be free from the addictive grip of the arcane!\n" + ogretext = _t"\nWorry not, though, Ogre - we can replace your unclean runes with a newly-discovered mixture of infusions, eliminating your dependence on them. The process will feel... unpleasant, and will dramatically shorten your lifespan, but you will finally be free from the addictive grip of the arcane!\n" if player.descriptor.subclass == "Oozemancer" then - ogretext = ogretext.."We'll also reinforce the infusions you've been granted to replace your runes - the newest mixture should give you about five years of your life that the initial mixture took from you.\n" + ogretext = ogretext.._t"We'll also reinforce the infusions you've been granted to replace your runes - the newest mixture should give you about five years of your life that the initial mixture took from you.\n" end end @@ -94,19 +94,19 @@ newChat{ id="testok", - You will not be able to use any spells or magical devices - Any worn objects that are powered by the arcane will be unequipped %s -Are you ready, or do you wish to prepare first?]]):format(ogretext), +Are you ready, or do you wish to prepare first?]]):tformat(ogretext), answers = { - {"I am ready", jump="test", action=remove_magic}, - {"I need to prepare."}, + {_t"I am ready", jump="test", action=remove_magic}, + {_t"I need to prepare."}, } } newChat{ id="test", - text = [[#VIOLET#*You are grabbed by two olive-clad warriors and thrown into a crude arena!* + text = ([[#VIOLET#*You are grabbed by two olive-clad warriors and thrown into a crude arena!* #LIGHT_GREEN#*You hear the voice of the Fighter ring above you.*#WHITE# -]]..sex..[[! Your training begins! I want to see you prove your superiority over the works of magic! Fight!]], +%s! Your training begins! I want to see you prove your superiority over the works of magic! Fight!]]):tformat(sex), answers = { - {"But wha.. [you notice your first opponent is already there]", action=function(npc, player) + {_t"But wha.. [you notice your first opponent is already there]", action=function(npc, player) player:grantQuest("antimagic") player:hasQuest("antimagic"):start_event() end}, diff --git a/game/modules/tome/data/chats/zoisla.lua b/game/modules/tome/data/chats/zoisla.lua index 253c30901a6a9e717f2eeb9be8e7108cff2b0520..c7a05aa89b644a78e2b0e697ff96c88764c830ea 100644 --- a/game/modules/tome/data/chats/zoisla.lua +++ b/game/modules/tome/data/chats/zoisla.lua @@ -18,17 +18,17 @@ -- darkgod@te4.org newChat{ id="welcome", - text = [[#LIGHT_GREEN#*A naga steps through the portal, she seems to be a high ranked one.*#WHITE# + text = _t[[#LIGHT_GREEN#*A naga steps through the portal, she seems to be a high ranked one.*#WHITE# NO! You fool, the portal is breaking down!]], answers = { - {"And thus my task is done, serpent!", jump="fool"}, + {_t"And thus my task is done, serpent!", jump="fool"}, } } newChat{ id="fool", - text = [[You do not understand: it will explode!]], + text = _t[[You do not understand: it will explode!]], answers = { - {"...", action = function(npc, player) + {_t"...", action = function(npc, player) game:onTickEnd(function() game.level:removeEntity(npc) game:changeLevel(2, (rng.table{"trollmire","ruins-kor-pul","scintillating-caves","rhaloren-camp","norgos-lair","heart-gloom"}), {direct_switch=true}) @@ -66,11 +66,11 @@ newChat{ id="fool", } newChat{ id="kill", - text = [[The portal randomly teleported us before exploding. + text = _t[[The portal randomly teleported us before exploding. You fool! You have doomed us, we could be #{bold}#anywhere!#{normal}# DIE !]], answers = { - {"...", action=function(npc, player) world:gainAchievement("SUNWALL_LOST", player) end}, + {_t"...", action=function(npc, player) world:gainAchievement("SUNWALL_LOST", player) end}, } } diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index 81a408035c5d51335c6ca02da2c6c796a5080d90..9e2f4e22ecbf08f5aeb5d1c3040ba124a796adb5 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -198,7 +198,7 @@ setDefaultProjector(function(src, x, y, type, dam, state) local e = target.tempeffect_def[target.EFF_WARD] dam = e.absorb(type, dam, target.tmp[target.EFF_WARD], target, src) if dam ~= lastdam then - game:delayedLogDamage(src, target, 0, ("%s(%d warded)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) + game:delayedLogDamage(src, target, 0, ("%s(%d warded)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) end end @@ -287,15 +287,15 @@ setDefaultProjector(function(src, x, y, type, dam, state) if src.attr and src:attr("encased_in_ice") then local eff = src:hasEffect(src.EFF_FROZEN) eff.hp = eff.hp - dam - local srcname = src.x and src.y and game.level.map.seens(src.x, src.y) and src.name:capitalize() or "Something" + local srcname = src.x and src.y and game.level.map.seens(src.x, src.y) and src:getName():capitalize() or _t"Something" if eff.hp < 0 and not eff.begone then - game.logSeen(src, "%s forces the iceblock to shatter.", src.name:capitalize()) + game.logSeen(src, "%s forces the iceblock to shatter.", src:getName():capitalize()) game:onTickEnd(function() src:removeEffect(src.EFF_FROZEN) end) eff.begone = game.turn else game:delayedLogDamage(src, eff.ice, dam, ("%s%d %s#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", math.ceil(dam), DamageType:get(type).name)) if eff.begone and eff.begone < game.turn and eff.hp < 0 then - game.logSeen(src, "%s forces the iceblock to shatter.", src.name:capitalize()) + game.logSeen(src, "%s forces the iceblock to shatter.", src:getName():capitalize()) src:removeEffect(src.EFF_FROZEN) end end @@ -395,7 +395,7 @@ setDefaultProjector(function(src, x, y, type, dam, state) dam = t.cs_on_damage(target, t, type, dam) end if dam ~= lastdam then - game:delayedLogDamage(src, target, 0, ("%s(%d to psi shield)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) + game:delayedLogDamage(src, target, 0, ("%s(%d to psi shield)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) end -- Block talent from shields @@ -403,13 +403,13 @@ setDefaultProjector(function(src, x, y, type, dam, state) local e = target.tempeffect_def[target.EFF_BLOCKING] lastdam = dam dam = e.do_block(type, dam, target.tmp[target.EFF_BLOCKING], target, src) - if lastdam - dam > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d blocked)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) end + if lastdam - dam > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d blocked)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) end end if dam > 0 and target.isTalentActive and target:isTalentActive(target.T_FORGE_SHIELD) then local t = target:getTalentFromId(target.T_FORGE_SHIELD) lastdam = dam dam = t.doForgeShield(type, dam, t, target, src) - if lastdam - dam > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d blocked)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) end + if lastdam - dam > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d blocked)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false) end end --Vim based defence @@ -424,13 +424,13 @@ setDefaultProjector(function(src, x, y, type, dam, state) local t = target:getTalentFromId(target.T_ANTIMAGIC_SHIELD) lastdam = dam dam = t.on_damage(target, t, type, dam, src) - if lastdam - dam > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d antimagic)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam - dam), false) end + if lastdam - dam > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d antimagic)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", lastdam - dam), false) end end -- Flat damage reduction ("armour") if dam > 0 and target.flat_damage_armor then local dec = math.min(dam, target:combatGetFlatResist(type)) - if dec > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d flat reduction)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", dec), false) end + if dec > 0 then game:delayedLogDamage(src, target, 0, ("%s(%d flat reduction)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", dec), false) end dam = math.max(0, dam - dec) print("[PROJECTOR] after flat damage armor", dam) end @@ -508,7 +508,7 @@ setDefaultProjector(function(src, x, y, type, dam, state) if target.flat_damage_cap[type] then cap = target.flat_damage_cap[type] end if cap and cap > 0 then local ignored = math.max(0, dam - cap * target.max_life / 100) - if ignored > 0 then game:delayedLogDamage(src, target, 0, ("#LIGHT_GREY#(%d resilience)#LAST#"):format(ignored), false) end + if ignored > 0 then game:delayedLogDamage(src, target, 0, ("#LIGHT_GREY#(%d resilience)#LAST#"):tformat(ignored), false) end dam = dam - ignored print("[PROJECTOR] after flat damage cap", dam) end @@ -593,7 +593,7 @@ setDefaultProjector(function(src, x, y, type, dam, state) -- damage affinity healing if not target.dead and affinity_heal > 0 then target:heal(affinity_heal, src) - game:delayedLogMessage(target, nil, "Affinity"..type, "#Source##LIGHT_GREEN# HEALS#LAST# from "..(DamageType:get(type).text_color or "#aaaaaa#")..DamageType:get(type).name.."#LAST# damage!") + game:delayedLogMessage(target, nil, "Affinity"..type, ("#Source##LIGHT_GREEN# HEALS#LAST# from %s %s #LAST# damage!"):tformat(DamageType:get(type).text_color or "#aaaaaa#", DamageType:get(type).name)) end if dam > 0 and src.damage_log and src.damage_log.weapon then @@ -736,10 +736,10 @@ local function tryDestroy(who, inven, dam, destroy_prop, proof_prop, msg) end newDamageType{ - name = "cosmetic", type = "COSMETIC", text_color = "#WHITE#", + name = _t"cosmetic", type = "COSMETIC", text_color = "#WHITE#", projector = function(src, x, y, type, dam) end, - death_message = {"cosmeticed"}, + death_message = {_t"cosmeticed"}, } -- The base elemental damage types are: @@ -748,7 +748,7 @@ newDamageType{ -- Need a provision to allow for compound DamageTypes to work with damDesc, combatGetResist, combatGetDamageIncrease, combatGetResistPen, combatGetAffinity, etc. newDamageType{ - name = "physical", type = "PHYSICAL", text_color = "#WHITE#", + name = _t"physical", type = "PHYSICAL", text_color = "#WHITE#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -761,18 +761,18 @@ newDamageType{ return realdam end, - death_message = {"battered", "bludgeoned", "sliced", "maimed", "raked", "bled", "impaled", "dissected", "disembowelled", "decapitated", "stabbed", "pierced", "torn limb from limb", "crushed", "shattered", "smashed", "cleaved", "swiped", "struck", "mutilated", "tortured", "skewered", "squished", "mauled", "chopped into tiny pieces", "splattered", "ground", "minced", "punctured", "hacked apart", "eviscerated"}, + death_message = {_t"battered", _t"bludgeoned", _t"sliced", _t"maimed", _t"raked", _t"bled", _t"impaled", _t"dissected", _t"disembowelled", _t"decapitated", _t"stabbed", _t"pierced", _t"torn limb from limb", _t"crushed", _t"shattered", _t"smashed", _t"cleaved", _t"swiped", _t"struck", _t"mutilated", _t"tortured", _t"skewered", _t"squished", _t"mauled", _t"chopped into tiny pieces", _t"splattered", _t"ground", _t"minced", _t"punctured", _t"hacked apart", _t"eviscerated"}, } -- Arcane is basic (usually) unresistable damage newDamageType{ - name = "arcane", type = "ARCANE", text_color = "#PURPLE#", + name = _t"arcane", type = "ARCANE", text_color = "#PURPLE#", antimagic_resolve = true, - death_message = {"blasted", "energised", "mana-torn", "dweomered", "imploded"}, + death_message = {_t"blasted", _t"energised", _t"mana-torn", _t"dweomered", _t"imploded"}, } -- The elemental damages newDamageType{ - name = "fire", type = "FIRE", text_color = "#LIGHT_RED#", + name = _t"fire", type = "FIRE", text_color = "#LIGHT_RED#", antimagic_resolve = true, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -797,10 +797,10 @@ newDamageType{ end return realdam end, - death_message = {"burnt", "scorched", "blazed", "roasted", "flamed", "fried", "combusted", "toasted", "slowly cooked", "boiled"}, + death_message = {_t"burnt", _t"scorched", _t"blazed", _t"roasted", _t"flamed", _t"fried", _t"combusted", _t"toasted", _t"slowly cooked", _t"boiled"}, } newDamageType{ - name = "cold", type = "COLD", text_color = "#1133F3#", + name = _t"cold", type = "COLD", text_color = "#1133F3#", antimagic_resolve = true, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -816,10 +816,10 @@ newDamageType{ end return realdam end, - death_message = {"frozen", "chilled", "iced", "cooled", "frozen and shattered into a million little shards"}, + death_message = {_t"frozen", _t"chilled", _t"iced", _t"cooled", _t"frozen and shattered into a million little shards"}, } newDamageType{ - name = "lightning", type = "LIGHTNING", text_color = "#ROYAL_BLUE#", + name = _t"lightning", type = "LIGHTNING", text_color = "#ROYAL_BLUE#", antimagic_resolve = true, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -833,12 +833,12 @@ newDamageType{ end return realdam end, - death_message = {"electrocuted", "shocked", "bolted", "volted", "amped", "zapped"}, + death_message = {_t"electrocuted", _t"shocked", _t"bolted", _t"volted", _t"amped", _t"zapped"}, } -- Acid, few specific interactions currently aside from damage types later derived from this newDamageType{ - name = "acid", type = "ACID", text_color = "#GREEN#", + name = _t"acid", type = "ACID", text_color = "#GREEN#", antimagic_resolve = true, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -851,12 +851,12 @@ newDamageType{ end return realdam end, - death_message = {"dissolved", "corroded", "scalded", "melted"}, + death_message = {_t"dissolved", _t"corroded", _t"scalded", _t"melted"}, } -- Nature & Blight: Opposing damage types newDamageType{ - name = "nature", type = "NATURE", text_color = "#LIGHT_GREEN#", + name = _t"nature", type = "NATURE", text_color = "#LIGHT_GREEN#", antimagic_resolve = true, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -869,11 +869,11 @@ newDamageType{ end return realdam end, - death_message = {"slimed", "splurged", "treehugged", "naturalised"}, + death_message = {_t"slimed", _t"splurged", _t"treehugged", _t"naturalised"}, } newDamageType{ - name = "blight", type = "BLIGHT", text_color = "#DARK_GREEN#", + name = _t"blight", type = "BLIGHT", text_color = "#DARK_GREEN#", antimagic_resolve = true, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -892,21 +892,21 @@ newDamageType{ end return realdam end, - death_message = {"diseased", "poxed", "infected", "plagued", "debilitated by noxious blight before falling", "fouled", "tainted"}, + death_message = {_t"diseased", _t"poxed", _t"infected", _t"plagued", _t"debilitated by noxious blight before falling", _t"fouled", _t"tainted"}, } -- Light damage newDamageType{ - name = "light", type = "LIGHT", text_color = "#YELLOW#", + name = _t"light", type = "LIGHT", text_color = "#YELLOW#", antimagic_resolve = true, - death_message = {"radiated", "seared", "purified", "sun baked", "jerkied", "tanned"}, + death_message = {_t"radiated", _t"seared", _t"purified", _t"sun baked", _t"jerkied", _t"tanned"}, } -- Darkness damage newDamageType{ - name = "darkness", type = "DARKNESS", text_color = "#GREY#", + name = _t"darkness", type = "DARKNESS", text_color = "#GREY#", antimagic_resolve = true, - death_message = {"shadowed", "darkened", "swallowed by the void"}, + death_message = {_t"shadowed", _t"darkened", _t"swallowed by the void"}, projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -924,7 +924,7 @@ newDamageType{ -- Mind damage -- Most uses of this have their damage effected by mental save and do not trigger cross tiers, ie, melee items newDamageType{ - name = "mind", type = "MIND", text_color = "#ORANGE#", + name = _t"mind", type = "MIND", text_color = "#ORANGE#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -941,19 +941,19 @@ newDamageType{ end return DamageType.defaultProjector(src, x, y, type, dam, state) else - --game.logSeen(target, "%s resists the mind attack!", target.name:capitalize()) + --game.logSeen(target, "%s resists the mind attack!", target:getName():capitalize()) return DamageType.defaultProjector(src, x, y, type, dam / 2, state) end end return 0 end, - death_message = {"psyched", "mentally tortured", "mindraped"}, + death_message = {_t"psyched", _t"mentally tortured", _t"mindraped"}, } -- Cold damage+turn energy drain, used exclusively by the Wintertide weapon -- If you use this for something else make sure to note it has no power check or sanity check on how much turn energy is drained newDamageType{ - name = "winter", type = "WINTER", + name = _t"winter", type = "WINTER", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -975,7 +975,7 @@ newDamageType{ -- Temporal damage newDamageType{ - name = "temporal", type = "TEMPORAL", text_color = "#LIGHT_STEEL_BLUE#", + name = _t"temporal", type = "TEMPORAL", text_color = "#LIGHT_STEEL_BLUE#", antimagic_resolve = true, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -989,12 +989,12 @@ newDamageType{ return realdam end, - death_message = {"timewarped", "temporally distorted", "spaghettified across the whole of space and time", "paradoxed", "replaced by a time clone (and no one ever knew the difference)", "grandfathered", "time dilated"}, + death_message = {_t"timewarped", _t"temporally distorted", _t"spaghettified across the whole of space and time", _t"paradoxed", _t"replaced by a time clone (and no one ever knew the difference)", _t"grandfathered", _t"time dilated"}, } -- Temporal + Stun newDamageType{ - name = "temporal stun", type = "TEMPORALSTUN", + name = _t"temporal stun", type = "TEMPORALSTUN", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1004,7 +1004,7 @@ newDamageType{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 4, {apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end end end, @@ -1012,7 +1012,7 @@ newDamageType{ -- Lite up the room newDamageType{ - name = "lite", type = "LITE", text_color = "#YELLOW#", + name = _t"lite", type = "LITE", text_color = "#YELLOW#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1028,7 +1028,7 @@ newDamageType{ -- Break stealth newDamageType{ - name = "illumination", type = "BREAK_STEALTH", + name = _t"illumination", type = "BREAK_STEALTH", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1042,7 +1042,7 @@ newDamageType{ -- Silence newDamageType{ - name = "silence", type = "SILENCE", + name = _t"silence", type = "SILENCE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1051,7 +1051,7 @@ newDamageType{ if target:canBe("silence") then target:setEffect(target.EFF_SILENCED, math.ceil(dam.dur), {apply_power=dam.power_check or src:combatMindpower() * 0.7}) else - game.logSeen(target, "%s resists the silence!", target.name:capitalize()) + game.logSeen(target, "%s resists the silence!", target:getName():capitalize()) end end end, @@ -1059,7 +1059,7 @@ newDamageType{ -- Silence newDamageType{ - name = "arcane silence", type = "ARCANE_SILENCE", text_color = "#PURPLE#", + name = _t"arcane silence", type = "ARCANE_SILENCE", text_color = "#PURPLE#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1072,7 +1072,7 @@ newDamageType{ if rng.percent(chance) and target:canBe("silence") then target:setEffect(target.EFF_SILENCED, 3, {apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end return realdam @@ -1081,7 +1081,7 @@ newDamageType{ -- Silence newDamageType{ - name = "silence", type = "RANDOM_SILENCE", + name = _t"silence", type = "RANDOM_SILENCE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1090,7 +1090,7 @@ newDamageType{ if target:canBe("silence") then target:setEffect(target.EFF_SILENCED, 4, {apply_power=src:combatAttack()*0.7, no_ct_effect=true}) else - game.logSeen(target, "%s resists the silence!", target.name:capitalize()) + game.logSeen(target, "%s resists the silence!", target:getName():capitalize()) end end end, @@ -1098,7 +1098,7 @@ newDamageType{ -- Blinds newDamageType{ - name = "blindness", type = "BLIND", + name = _t"blindness", type = "BLIND", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1107,13 +1107,13 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, math.ceil(dam), {apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists the blinding light!", target.name:capitalize()) + game.logSeen(target, "%s resists the blinding light!", target:getName():capitalize()) end end end, } newDamageType{ - name = "blindness", type = "BLINDPHYSICAL", + name = _t"blindness", type = "BLINDPHYSICAL", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1122,13 +1122,13 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, math.ceil(dam), {apply_power=src:combatAttack()}) else - game.logSeen(target, "%s resists the blinding light!", target.name:capitalize()) + game.logSeen(target, "%s resists the blinding light!", target:getName():capitalize()) end end end, } newDamageType{ - name = "blinding ink", type = "BLINDING_INK", + name = _t"blinding ink", type = "BLINDING_INK", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1137,13 +1137,13 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, math.ceil(dam), {apply_power=src:combatPhysicalpower(), apply_save="combatPhysicalResist"}) else - game.logSeen(target, "%s avoids the blinding ink!", target.name:capitalize()) + game.logSeen(target, "%s avoids the blinding ink!", target:getName():capitalize()) end end end, } newDamageType{ - name = "blindness", type = "BLINDCUSTOMMIND", + name = _t"blindness", type = "BLINDCUSTOMMIND", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1152,7 +1152,7 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, math.ceil(dam.turns), {apply_power=dam.power, apply_save="combatMentalResist", no_ct_effect=true}) else - game.logSeen(target, "%s resists the blinding light!", target.name:capitalize()) + game.logSeen(target, "%s resists the blinding light!", target:getName():capitalize()) end end end, @@ -1160,7 +1160,7 @@ newDamageType{ -- Lite + Light damage newDamageType{ - name = "bright light", type = "LITE_LIGHT", + name = _t"bright light", type = "LITE_LIGHT", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1171,7 +1171,7 @@ newDamageType{ -- Fire damage + DOT newDamageType{ - name = "fire burn", type = "FIREBURN", text_color = "#LIGHT_RED#", + name = _t"fire burn", type = "FIREBURN", text_color = "#LIGHT_RED#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1192,7 +1192,7 @@ newDamageType{ -- Fire damage + DOT + 25% chance of Fireflash newDamageType{ - name = "stunning fire", type = "FIRE_STUN", text_color = "#LIGHT_RED#", + name = _t"stunning fire", type = "FIRE_STUN", text_color = "#LIGHT_RED#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1215,7 +1215,7 @@ newDamageType{ } newDamageType{ - name = "fire burn", type = "GOLEM_FIREBURN", + name = _t"fire burn", type = "GOLEM_FIREBURN", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1230,7 +1230,7 @@ newDamageType{ -- Drain Life... with fire! newDamageType{ - name = "devouring flames", type = "FIRE_DRAIN", text_color = "#LIGHT_RED#", + name = _t"devouring flames", type = "FIRE_DRAIN", text_color = "#LIGHT_RED#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1247,7 +1247,7 @@ newDamageType{ -- Darkness + Fire newDamageType{ - name = "shadowflame", type = "SHADOWFLAME", text_color = "#BF7F73#", + name = _t"shadowflame", type = "SHADOWFLAME", text_color = "#BF7F73#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1258,7 +1258,7 @@ newDamageType{ -- Darkness + Stun newDamageType{ - name = "stunning darkness", type = "DARKSTUN", text_color = "#GREY#", + name = _t"stunning darkness", type = "DARKSTUN", text_color = "#GREY#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1269,7 +1269,7 @@ newDamageType{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 4, {apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists the darkness!", target.name:capitalize()) + game.logSeen(target, "%s resists the darkness!", target:getName():capitalize()) end end end, @@ -1277,7 +1277,7 @@ newDamageType{ -- Darkness but not over minions newDamageType{ - name = "darkness", type = "MINION_DARKNESS", + name = _t"darkness", type = "MINION_DARKNESS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1290,7 +1290,7 @@ newDamageType{ -- Fore but not over minions newDamageType{ - name = "fire", type = "FIRE_FRIENDS", + name = _t"fire", type = "FIRE_FRIENDS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1303,7 +1303,7 @@ newDamageType{ -- Cold + Stun newDamageType{ - name = "cold", type = "COLDSTUN", + name = _t"cold", type = "COLDSTUN", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1313,7 +1313,7 @@ newDamageType{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 4, {apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end end end, @@ -1321,7 +1321,7 @@ newDamageType{ -- Fire DOT + Stun newDamageType{ - name = "flameshock", type = "FLAMESHOCK", + name = _t"flameshock", type = "FLAMESHOCK", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1332,7 +1332,7 @@ newDamageType{ if target:canBe("stun") then target:setEffect(target.EFF_BURNING_SHOCK, dam.dur, {src=src, power=dam.dam / dam.dur, apply_power=dam.apply_power or src:combatSpellpower()}) else - game.logSeen(target, "%s resists the searing flame!", target.name:capitalize()) + game.logSeen(target, "%s resists the searing flame!", target:getName():capitalize()) end end end, @@ -1340,7 +1340,7 @@ newDamageType{ -- Cold damage + freeze chance newDamageType{ - name = "ice", type = "ICE", text_color = "#1133F3#", + name = _t"ice", type = "ICE", text_color = "#1133F3#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1364,7 +1364,7 @@ newDamageType{ -- Cold damage + freeze chance + 20% slow newDamageType{ - name = "slowing ice", type = "ICE_SLOW", text_color = "#1133F3#", + name = _t"slowing ice", type = "ICE_SLOW", text_color = "#1133F3#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1384,7 +1384,7 @@ newDamageType{ -- Cold damage + freeze chance, increased if wet newDamageType{ - name = "ice storm", type = "ICE_STORM", text_color = "#1133F3#", + name = _t"ice storm", type = "ICE_STORM", text_color = "#1133F3#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1403,7 +1403,7 @@ newDamageType{ -- Increased cold damage + freeze chance if wet newDamageType{ - name = "glacial vapour", type = "GLACIAL_VAPOUR", text_color = "#1133F3#", + name = _t"glacial vapour", type = "GLACIAL_VAPOUR", text_color = "#1133F3#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1420,7 +1420,7 @@ newDamageType{ -- Cold damage + freeze ground newDamageType{ - name = "pinning cold", type = "COLDNEVERMOVE", text_color = "#CADET_BLUE#", + name = _t"pinning cold", type = "COLDNEVERMOVE", text_color = "#CADET_BLUE#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1442,7 +1442,7 @@ newDamageType{ -- Freezes target, checks for spellresistance and stun resistance newDamageType{ - name = "freeze", type = "FREEZE", + name = _t"freeze", type = "FREEZE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1452,10 +1452,10 @@ newDamageType{ local sx, sy = game.level.map:getTileToScreen(x, y, true) if target:canBe("stun") then target:setEffect(target.EFF_FROZEN, dam.dur, {hp=dam.hp * 1.5, apply_power=math.max(src:combatSpellpower(), src:combatMindpower()), min_dur=1}) - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, "Frozen!", {0,255,155}) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, _t"Frozen!", {0,255,155}) else - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, "Resist!", {0,255,155}) - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, _t"Resist!", {0,255,155}) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end end, @@ -1463,7 +1463,7 @@ newDamageType{ -- Dim vision newDamageType{ - name = "sticky smoke", type = "STICKY_SMOKE", + name = _t"sticky smoke", type = "STICKY_SMOKE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1472,7 +1472,7 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_DIM_VISION, 5, {sight=dam, apply_power=src:combatAttack()}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end end, @@ -1480,7 +1480,7 @@ newDamageType{ -- Acid damage + blind chance newDamageType{ - name = "acid blind", type = "ACID_BLIND", text_color = "#GREEN#", + name = _t"acid blind", type = "ACID_BLIND", text_color = "#GREEN#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1490,7 +1490,7 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, 3, {src=src, apply_power=math.max(src:combatAttack(), src:combatSpellpower(), src:combatMindpower())}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end return realdam @@ -1499,7 +1499,7 @@ newDamageType{ -- Darkness damage + blind chance newDamageType{ - name = "blinding darkness", type = "DARKNESS_BLIND", + name = _t"blinding darkness", type = "DARKNESS_BLIND", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1509,7 +1509,7 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, 3, {src=src, apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end return realdam @@ -1518,7 +1518,7 @@ newDamageType{ -- Light damage + blind chance newDamageType{ - name = "blinding light", type = "LIGHT_BLIND", text_color = "#YELLOW#", + name = _t"blinding light", type = "LIGHT_BLIND", text_color = "#YELLOW#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1528,7 +1528,7 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, 3, {src=src, apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end return realdam @@ -1537,7 +1537,7 @@ newDamageType{ -- Lightning damage + daze chance newDamageType{ - name = "dazing lightning", type = "LIGHTNING_DAZE", text_color = "#ROYAL_BLUE#", + name = _t"dazing lightning", type = "LIGHTNING_DAZE", text_color = "#ROYAL_BLUE#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1553,7 +1553,7 @@ newDamageType{ t.do_hurricane(src, t, target) end else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) if dam.shock then target:setEffect(target.EFF_SHOCKED, dam.shock, {apply_power=src:combatSpellpower()}) end @@ -1565,7 +1565,7 @@ newDamageType{ -- Cold/physical damage + repulsion; checks for spell power against physical resistance newDamageType{ - name = "cold repulsion", type = "WAVE", + name = _t"cold repulsion", type = "WAVE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1587,9 +1587,9 @@ newDamageType{ if target:checkHit(base.power or src:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(srcx, srcy, base.dist or 1) target:crossTierEffect(target.EFF_OFFBALANCE, base.power or src:combatSpellpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the wave!", target.name:capitalize()) + game.logSeen(target, "%s resists the wave!", target:getName():capitalize()) end end end, @@ -1597,7 +1597,7 @@ newDamageType{ -- Bloodspring damage + repulsion; checks for spell power against physical resistance newDamageType{ - name = "bloodspring", type = "BLOODSPRING", + name = _t"bloodspring", type = "BLOODSPRING", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1610,9 +1610,9 @@ newDamageType{ if target:checkHit(base.power or src:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(srcx, srcy, base.dist or 1) target:crossTierEffect(target.EFF_OFFBALANCE, base.power or src:combatSpellpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the bloody wave!", target.name:capitalize()) + game.logSeen(target, "%s resists the bloody wave!", target:getName():capitalize()) end end end, @@ -1620,7 +1620,7 @@ newDamageType{ -- Fireburn damage + repulsion; checks for spell power against physical resistance newDamageType{ - name = "fire repulsion", type = "FIREKNOCKBACK", + name = _t"fire repulsion", type = "FIREKNOCKBACK", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1633,9 +1633,9 @@ newDamageType{ if target:checkHit(src:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(src.x, src.y, dam.dist) target:crossTierEffect(target.EFF_OFFBALANCE, src:combatSpellpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the punch!", target.name:capitalize()) + game.logSeen(target, "%s resists the punch!", target:getName():capitalize()) end end end, @@ -1643,7 +1643,7 @@ newDamageType{ -- Fireburn damage + repulsion; checks for mind power against physical resistance newDamageType{ - name = "burning repulsion", type = "FIREKNOCKBACK_MIND", + name = _t"burning repulsion", type = "FIREKNOCKBACK_MIND", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1656,9 +1656,9 @@ newDamageType{ if target:checkHit(src:combatMindpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(src.x, src.y, dam.dist) target:crossTierEffect(target.EFF_OFFBALANCE, src:combatMindpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the punch!", target.name:capitalize()) + game.logSeen(target, "%s resists the punch!", target:getName():capitalize()) end end end, @@ -1666,7 +1666,7 @@ newDamageType{ -- Darkness damage + repulsion; checks for spell power against mental resistance newDamageType{ - name = "darkness repulsion", type = "DARKKNOCKBACK", + name = _t"darkness repulsion", type = "DARKKNOCKBACK", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1679,9 +1679,9 @@ newDamageType{ if target:checkHit(src:combatSpellpower(), target:combatMentalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(src.x, src.y, dam.dist) target:crossTierEffect(target.EFF_BRAINLOCKED, src:combatSpellpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the darkness!", target.name:capitalize()) + game.logSeen(target, "%s resists the darkness!", target:getName():capitalize()) end end end, @@ -1689,7 +1689,7 @@ newDamageType{ -- Physical damage + repulsion; checks for spell power against physical resistance newDamageType{ - name = "physical repulsion", type = "SPELLKNOCKBACK", + name = _t"physical repulsion", type = "SPELLKNOCKBACK", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1703,9 +1703,9 @@ newDamageType{ if target:checkHit(src:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(src.x, src.y, dam.dist) target:crossTierEffect(target.EFF_OFFBALANCE, src:combatSpellpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the punch!", target.name:capitalize()) + game.logSeen(target, "%s resists the punch!", target:getName():capitalize()) end end return realdam @@ -1714,7 +1714,7 @@ newDamageType{ -- Physical damage + repulsion; checks for mind power against physical resistance newDamageType{ - name = "physical repulsion", type = "MINDKNOCKBACK", + name = _t"physical repulsion", type = "MINDKNOCKBACK", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1726,9 +1726,9 @@ newDamageType{ if target:checkHit(src:combatMindpower() * 0.8, target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(src.x, src.y, 3) target:crossTierEffect(target.EFF_OFFBALANCE, src:combatMindpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the punch!", target.name:capitalize()) + game.logSeen(target, "%s resists the punch!", target:getName():capitalize()) end end end, @@ -1736,7 +1736,7 @@ newDamageType{ -- Physical damage + repulsion; checks for attack power against physical resistance newDamageType{ - name = "physical repulsion", type = "PHYSKNOCKBACK", + name = _t"physical repulsion", type = "PHYSKNOCKBACK", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1750,9 +1750,9 @@ newDamageType{ if target:checkHit(dam.check, target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(dam.x or src.x, dam.y or src.y, dam.dist) target:crossTierEffect(target.EFF_OFFBALANCE, dam.check) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end end, @@ -1760,7 +1760,7 @@ newDamageType{ -- Fear check + repulsion; checks for mind power against physical resistance newDamageType{ - name = "fear repulsion", type = "FEARKNOCKBACK", + name = _t"fear repulsion", type = "FEARKNOCKBACK", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1771,9 +1771,9 @@ newDamageType{ if target:checkHit(src:combatMindpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("fear") then target:knockback(dam.x, dam.y, dam.dist) target:crossTierEffect(target.EFF_BRAINLOCKED, src:combatMindpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the frightening sight!", target.name:capitalize()) + game.logSeen(target, "%s resists the frightening sight!", target:getName():capitalize()) end end end, @@ -1781,7 +1781,7 @@ newDamageType{ -- Poisoning damage newDamageType{ - name = "poison", type = "POISON", text_color = "#LIGHT_GREEN#", + name = _t"poison", type = "POISON", text_color = "#LIGHT_GREEN#", projector = function(src, x, y, t, dam) state = initState(state) useImplicitCrit(src, state) @@ -1801,7 +1801,7 @@ newDamageType{ -- Inferno: fire and maybe remove stuff newDamageType{ - name = "cleansing fire", type = "INFERNO", + name = _t"cleansing fire", type = "INFERNO", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1827,7 +1827,7 @@ newDamageType{ -- Spydric poison: prevents movement newDamageType{ - name = "spydric poison", type = "SPYDRIC_POISON", + name = _t"spydric poison", type = "SPYDRIC_POISON", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1842,7 +1842,7 @@ newDamageType{ -- Crippling poison: failure to act newDamageType{ - name = "crippling poison", type = "CRIPPLING_POISON", text_color = "#LIGHT_GREEN#", + name = _t"crippling poison", type = "CRIPPLING_POISON", text_color = "#LIGHT_GREEN#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1857,7 +1857,7 @@ newDamageType{ -- Insidious poison: prevents healing newDamageType{ - name = "insidious poison", type = "INSIDIOUS_POISON", text_color = "#LIGHT_GREEN#", + name = _t"insidious poison", type = "INSIDIOUS_POISON", text_color = "#LIGHT_GREEN#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1872,7 +1872,7 @@ newDamageType{ -- Bleeding damage newDamageType{ - name = "bleed", type = "BLEED", + name = _t"bleed", type = "BLEED", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1888,7 +1888,7 @@ newDamageType{ -- Physical damage + bleeding (50% of base over 5 turns) newDamageType{ - name = "physical bleed", type = "PHYSICALBLEED", + name = _t"physical bleed", type = "PHYSICALBLEED", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1902,7 +1902,7 @@ newDamageType{ -- Slime damage newDamageType{ - name = "nature slow", type = "SLIME", text_color = "#LIGHT_GREEN#", + name = _t"nature slow", type = "SLIME", text_color = "#LIGHT_GREEN#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1917,7 +1917,7 @@ newDamageType{ newDamageType{ - name = "dig", type = "DIG", + name = _t"dig", type = "DIG", projector = function(src, x, y, typ, dam) state = initState(state) useImplicitCrit(src, state) @@ -1933,7 +1933,7 @@ newDamageType{ if src.turn_procs then src.turn_procs.has_dug = (src.turn_procs.has_dug or 0) + 1 end game.nicer_tiles:updateAround(game.level, x, y) if not silence then - game.logSeen({x=x,y=y}, "%s turns into %s.", feat.name:capitalize(), newfeat.name) + game.logSeen({x=x,y=y}, "%s turns into %s.", _t(feat.name):capitalize(), _t(newfeat.name)) end end end @@ -1943,7 +1943,7 @@ newDamageType{ -- Slowness newDamageType{ - name = "slow", type = "SLOW", + name = _t"slow", type = "SLOW", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1958,7 +1958,7 @@ newDamageType{ } newDamageType{ - name = "congeal time", type = "CONGEAL_TIME", + name = _t"congeal time", type = "CONGEAL_TIME", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1972,7 +1972,7 @@ newDamageType{ -- Time prison, invulnerability and stun newDamageType{ - name = "time prison", type = "TIME_PRISON", + name = _t"time prison", type = "TIME_PRISON", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -1986,7 +1986,7 @@ newDamageType{ target:setEffect(target.EFF_TIME_PRISON, dam, {apply_power=src:combatSpellpower() - (target:attr("continuum_destabilization") or 0), apply_save="combatSpellResist", no_ct_effect=true}) target:setEffect(target.EFF_CONTINUUM_DESTABILIZATION, 100, {power=src:combatSpellpower(0.3), no_ct_effect=true}) else - game.logSeen(target, "%s resists the time prison.", target.name:capitalize()) + game.logSeen(target, "%s resists the time prison.", target:getName():capitalize()) end end end, @@ -1994,7 +1994,7 @@ newDamageType{ -- Confusion newDamageType{ - name = "confusion", type = "CONFUSION", + name = _t"confusion", type = "CONFUSION", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2003,7 +2003,7 @@ newDamageType{ if target:canBe("confusion") then target:setEffect(target.EFF_CONFUSED, dam.dur, {power=dam.dam or 30, apply_power=(dam.power_check or src.combatSpellpower)(src)}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end end, @@ -2011,7 +2011,7 @@ newDamageType{ -- Confusion newDamageType{ - name = "% chance of confusion", type = "RANDOM_CONFUSION", + name = _t"% chance of confusion", type = "RANDOM_CONFUSION", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2021,7 +2021,7 @@ newDamageType{ if target:canBe("confusion") then target:setEffect(target.EFF_CONFUSED, 4, {power=dam.power or 30, apply_power=(dam.power_check or src.combatSpellpower)(src), no_ct_effect=true}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end end, @@ -2029,7 +2029,7 @@ newDamageType{ -- Confusion newDamageType{ - name = "% chance of confusion", type = "RANDOM_CONFUSION_PHYS", + name = _t"% chance of confusion", type = "RANDOM_CONFUSION_PHYS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2039,14 +2039,14 @@ newDamageType{ if target:canBe("confusion") then target:setEffect(target.EFF_CONFUSED, 4, {power=dam.power or 30, apply_power=src:combatPhysicalpower(), no_ct_effect=true}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end end, } newDamageType{ - name = "% chance of gloom effects", type = "RANDOM_GLOOM", + name = _t"% chance of gloom effects", type = "RANDOM_GLOOM", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2083,7 +2083,7 @@ newDamageType{ -- Name: item - theme - debuff/effect -- This entire system should probably be moved outside of DTs/melee_project at some point newDamageType{ - name = "item darkness numbing", type = "ITEM_DARKNESS_NUMBING", + name = _t"item darkness numbing", type = "ITEM_DARKNESS_NUMBING", text_color = "#GREY#", tdesc = function(dam, oldDam, src) local parens = "" @@ -2098,7 +2098,7 @@ newDamageType{ end local val = src and math.floor(src:combatStatScale(src:combatMindpower(), 1, 35))+5 or 0 return ("* #LIGHT_GREEN#%d%%#LAST# chance to reduce damage dealt by #YELLOW#%d%%#LAST#%s") - :format(dam, val, parens) + :tformat(dam, val, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2115,7 +2115,7 @@ newDamageType{ } newDamageType{ - name = "item expose", type = "ITEM_MIND_EXPOSE", + name = _t"item expose", type = "ITEM_MIND_EXPOSE", text_color = "#GREY#", tdesc = function(dam, oldDam, src) local parens = "" @@ -2130,7 +2130,7 @@ newDamageType{ end local val = src and math.floor(src:combatStatScale(src:combatMindpower(), 1, 45))+5 or 0 return ("* #LIGHT_GREEN#%d%%#LAST# chance to reduce all saves and defense by #YELLOW#%d#LAST#%s") - :format(dam, val, parens) + :tformat(dam, val, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2147,7 +2147,7 @@ newDamageType{ } newDamageType{ - name = "item temporal energize", type = "ITEM_TEMPORAL_ENERGIZE", + name = _t"item temporal energize", type = "ITEM_TEMPORAL_ENERGIZE", text_color = "#LIGHT_STEEL_BLUE#", tdesc = function(dam, oldDam, src) local parens = "" @@ -2161,7 +2161,7 @@ newDamageType{ end end return ("* #LIGHT_GREEN#%d%%#LAST# chance to gain 10%% of a turn (3/turn limit)%s") - :format(dam, parens) + :tformat(dam, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2169,7 +2169,7 @@ newDamageType{ local target = game.level.map(x, y, Map.ACTOR) if target and src and src.name and rng.percent(dam) then if src.turn_procs and src.turn_procs.item_temporal_energize and src.turn_procs.item_temporal_energize > 3 then - game.logSeen(src, "#LIGHT_STEEL_BLUE#%s can't gain any more energy this turn! ", src.name:capitalize()) + game.logSeen(src, "#LIGHT_STEEL_BLUE#%s can't gain any more energy this turn! ", src:getName():capitalize()) return end local energy = (game.energy_to_act * 0.1) @@ -2180,7 +2180,7 @@ newDamageType{ } newDamageType{ - name = "item acid corrode", type = "ITEM_ACID_CORRODE", text_color = "#GREEN#", + name = _t"item acid corrode", type = "ITEM_ACID_CORRODE", text_color = "#GREEN#", tdesc = function(dam, oldDam, src) local parens = "" dam = dam or 0 @@ -2194,7 +2194,7 @@ newDamageType{ end local val = src and src:combatStatScale(src:combatSpellpower(), 10, 45)+5 or 0 return ("* #LIGHT_GREEN#%d%%#LAST# chance to reduce armor by #VIOLET#%d%%#LAST#%s") - :format(dam, val, parens) + :tformat(dam, val, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2211,7 +2211,7 @@ newDamageType{ } newDamageType{ - name = "item blight disease", type = "ITEM_BLIGHT_DISEASE", text_color = "#DARK_GREEN#", + name = _t"item blight disease", type = "ITEM_BLIGHT_DISEASE", text_color = "#DARK_GREEN#", tdesc = function(dam, oldDam, src) local parens = "" dam = dam or 0 @@ -2225,7 +2225,7 @@ newDamageType{ end local val = src and math.floor(src:combatStatScale(src:combatSpellpower(), 1, 35))+5 or 0 return ("* #LIGHT_GREEN#%d%%#LAST# chance to reduce strength, dexterity, and constitution by #VIOLET#%d#LAST#%s") - :format(dam, val, parens ) + :tformat(dam, val, parens ) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2244,7 +2244,7 @@ newDamageType{ } newDamageType{ - name = "item manaburn arcane", type = "ITEM_ANTIMAGIC_MANABURN", text_color = "#PURPLE#", + name = _t"item manaburn arcane", type = "ITEM_ANTIMAGIC_MANABURN", text_color = "#PURPLE#", tdesc = function(dam, oldDam) local parens = "" dam = dam or 0 @@ -2257,7 +2257,7 @@ newDamageType{ end end return ("* #DARK_ORCHID#%d arcane resource#LAST# burn%s") - :format(dam or 0, parens) + :tformat(dam or 0, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2271,7 +2271,7 @@ newDamageType{ } newDamageType{ - name = "item nature slow", type = "ITEM_NATURE_SLOW", text_color = "#LIGHT_GREEN#", + name = _t"item nature slow", type = "ITEM_NATURE_SLOW", text_color = "#LIGHT_GREEN#", tdesc = function(dam, oldDam, src) local parens = "" dam = dam or 0 @@ -2285,7 +2285,7 @@ newDamageType{ end local val = src and math.floor(src:combatStatScale(src:combatMindpower(), 20, 70))+10 or 0 return ("* #LIGHT_GREEN#%d%%#LAST# chance to slow global speed by #YELLOW#%d%%#LAST#%s") - :format(dam or 0, val, parens) + :tformat(dam or 0, val, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2304,7 +2304,7 @@ newDamageType{ -- Reduces all offensive powers by 20% newDamageType{ - name = "item antimagic scouring", type = "ITEM_ANTIMAGIC_SCOURING", text_color = "#ORCHID#", + name = _t"item antimagic scouring", type = "ITEM_ANTIMAGIC_SCOURING", text_color = "#ORCHID#", tdesc = function(dam, oldDam) local parens = "" dam = dam or 0 @@ -2317,7 +2317,7 @@ newDamageType{ end end return ("* #LIGHT_GREEN#%d%%#LAST# chance to #ORCHID#reduce effective powers#LAST# by %d%%%s") - :format(dam, 20, parens) + :tformat(dam, 20, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2332,7 +2332,7 @@ newDamageType{ } newDamageType{ - name = "item lightning daze", type = "ITEM_LIGHTNING_DAZE", + name = _t"item lightning daze", type = "ITEM_LIGHTNING_DAZE", text_color = "#ROYAL_BLUE#", tdesc = function(dam, oldDam) local parens = "" @@ -2346,7 +2346,7 @@ newDamageType{ end end return ("* #LIGHT_GREEN#%d%%#LAST# chance to #ROYAL_BLUE#daze#LAST# at end of turn%s") - :format(dam, parens) + :tformat(dam, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2364,7 +2364,7 @@ newDamageType{ } newDamageType{ - name = "item light blind", type = "ITEM_LIGHT_BLIND", + name = _t"item light blind", type = "ITEM_LIGHT_BLIND", text_color = "#YELLOW#", tdesc = function(dam, oldDam) local parens = "" @@ -2378,7 +2378,7 @@ newDamageType{ end end return ("* #LIGHT_GREEN#%d%%#LAST# chance to #YELLOW#blind#LAST#%s") - :format(dam, parens) + :tformat(dam, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2390,7 +2390,7 @@ newDamageType{ local check = math.max(src:combatAttack(), src:combatSpellpower(), src:combatMindpower()) target:setEffect(target.EFF_BLINDED, 3, {apply_power=(check), no_ct_effect=true}) else - game.logSeen(target, "%s resists the blinding light!", target.name:capitalize()) + game.logSeen(target, "%s resists the blinding light!", target:getName():capitalize()) end end end @@ -2398,7 +2398,7 @@ newDamageType{ } newDamageType{ - name = "item mind gloom", type = "ITEM_MIND_GLOOM", + name = _t"item mind gloom", type = "ITEM_MIND_GLOOM", text_color = "#YELLOW#", tdesc = function(dam, oldDam) local parens = "" @@ -2412,7 +2412,7 @@ newDamageType{ end end return ("* #LIGHT_GREEN#%d%%#LAST# chance to cause #YELLOW#random gloom#LAST#%s") - :format(dam, parens) + :tformat(dam, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -2428,17 +2428,17 @@ newDamageType{ if target:canBe("confusion") and not target:hasEffect(target.EFF_GLOOM_CONFUSED) then target:setEffect(target.EFF_GLOOM_CONFUSED, 2, {power=25, no_ct_effect=true} ) end - name = "confusion" + name = _t"confusion" elseif effect == 2 then if target:canBe("stun") and not target:hasEffect(target.EFF_GLOOM_STUNNED) then target:setEffect(target.EFF_GLOOM_STUNNED, 2, {no_ct_effect=true}) end - name = "stun" + name = _t"stun" elseif effect == 3 then if target:canBe("slow") and not target:hasEffect(target.EFF_GLOOM_SLOW) then target:setEffect(target.EFF_GLOOM_SLOW, 2, {power=0.3, no_ct_effect=true}) end - name = "slow'" + name = _t"slow'" end end end @@ -2448,7 +2448,7 @@ newDamageType{ -- Blind newDamageType{ - name = "blinding", type = "RANDOM_BLIND", + name = _t"blinding", type = "RANDOM_BLIND", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2458,7 +2458,7 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, 4, {apply_power=(dam.power_check or math.max(src:combatSpellpower(), src:combatPhysicalpower())), no_ct_effect=true}) else - game.logSeen(target, "%s resists the blind!", target.name:capitalize()) + game.logSeen(target, "%s resists the blind!", target:getName():capitalize()) end end end, @@ -2466,7 +2466,7 @@ newDamageType{ -- Physical + Blind newDamageType{ - name = "blinding physical", type = "SAND", + name = _t"blinding physical", type = "SAND", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2476,7 +2476,7 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, dam.dur, {apply_power=src:combatPhysicalpower(), apply_save="combatPhysicalResist"}) else - game.logSeen(target, "%s resists the sandstorm!", target.name:capitalize()) + game.logSeen(target, "%s resists the sandstorm!", target:getName():capitalize()) end end end, @@ -2484,7 +2484,7 @@ newDamageType{ -- Physical + Pinned newDamageType{ - name = "physical pinning", type = "PINNING", + name = _t"physical pinning", type = "PINNING", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2494,7 +2494,7 @@ newDamageType{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, dam.dur, {apply_power=src:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the pin!", target.name:capitalize()) + game.logSeen(target, "%s resists the pin!", target:getName():capitalize()) end end end, @@ -2502,7 +2502,7 @@ newDamageType{ -- Drain Exp newDamageType{ - name = "regressive blight", type = "DRAINEXP", + name = _t"regressive blight", type = "DRAINEXP", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2514,7 +2514,7 @@ newDamageType{ target:gainExp(-dam.dam*2) src:logCombat(target, "#Source# drains experience from #Target#!") else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end return realdam @@ -2523,7 +2523,7 @@ newDamageType{ -- Drain Life newDamageType{ - name = "draining blight", type = "DRAINLIFE", text_color = "#DARK_GREEN#", + name = _t"draining blight", type = "DRAINLIFE", text_color = "#DARK_GREEN#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2540,7 +2540,7 @@ newDamageType{ -- Used by Blood Grasp, heal+temporary max life based on damage newDamageType{ - name = "sanguine blight", type = "SANGUINE", text_color = "#DARK_GREEN#", + name = _t"sanguine blight", type = "SANGUINE", text_color = "#DARK_GREEN#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2556,7 +2556,7 @@ newDamageType{ } -- Drain Vim newDamageType{ - name = "vim draining blight", type = "DRAIN_VIM", text_color = "#DARK_GREEN#", + name = _t"vim draining blight", type = "DRAIN_VIM", text_color = "#DARK_GREEN#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2572,7 +2572,7 @@ newDamageType{ -- Demonfire: heal demon; damage others newDamageType{ - name = "demonfire", type = "DEMONFIRE", + name = _t"demonfire", type = "DEMONFIRE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2589,7 +2589,7 @@ newDamageType{ -- Retch: heal undead; damage living newDamageType{ - name = "purging blight", type = "RETCH", + name = _t"purging blight", type = "RETCH", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2643,7 +2643,7 @@ newDamageType{ -- Holy light, damage demon/undead; heal others newDamageType{ - name = "holy light", type = "HOLY_LIGHT", + name = _t"holy light", type = "HOLY_LIGHT", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2658,7 +2658,7 @@ newDamageType{ -- Heals newDamageType{ - name = "healing", type = "HEAL", + name = _t"healing", type = "HEAL", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2674,7 +2674,7 @@ newDamageType{ -- Used by Bathe in Light, healing -- Keep an eye on this and Weapon of Light for any infinite stack shield then engage combos newDamageType{ - name = "healing light", type = "HEALING_POWER", + name = _t"healing light", type = "HEALING_POWER", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2712,7 +2712,7 @@ newDamageType{ -- Light damage+heal source, used by Radiance newDamageType{ - name = "judgement", type = "JUDGEMENT", + name = _t"judgement", type = "JUDGEMENT", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2730,7 +2730,7 @@ newDamageType{ } newDamageType{ - name = "healing nature", type = "HEALING_NATURE", + name = _t"healing nature", type = "HEALING_NATURE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2748,7 +2748,7 @@ newDamageType{ -- Corrupted blood, blight damage + potential diseases -- Should no longer be used on items, use ITEM_BLIGHT_DISEASE newDamageType{ - name = "infective blight", type = "CORRUPTED_BLOOD", text_color = "#DARK_GREEN#", + name = _t"infective blight", type = "CORRUPTED_BLOOD", text_color = "#DARK_GREEN#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2764,7 +2764,7 @@ newDamageType{ -- blood boiled, blight damage + slow newDamageType{ - name = "hindering blight", type = "BLOOD_BOIL", text_color = "#DARK_GREEN#", + name = _t"hindering blight", type = "BLOOD_BOIL", text_color = "#DARK_GREEN#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2778,7 +2778,7 @@ newDamageType{ -- life leech (used cursed gloom skill) newDamageType{ - name = "life leech", + name = _t"life leech", type = "LIFE_LEECH", text_color = "#F53CBE#", hideMessage=true, @@ -2787,7 +2787,7 @@ newDamageType{ -- Physical + Stun Chance newDamageType{ - name = "physical stun", type = "PHYSICAL_STUN", + name = _t"physical stun", type = "PHYSICAL_STUN", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2797,7 +2797,7 @@ newDamageType{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 2, {src=src, apply_power=src:combatSpellpower(), min_dur=1}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end end end, @@ -2805,7 +2805,7 @@ newDamageType{ -- Physical Damage/Cut Split newDamageType{ - name = "physical bleed", type = "SPLIT_BLEED", + name = _t"physical bleed", type = "SPLIT_BLEED", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2821,7 +2821,7 @@ newDamageType{ -- Temporal/Physical damage newDamageType{ - name = "warp", type = "WARP", + name = _t"warp", type = "WARP", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2832,7 +2832,7 @@ newDamageType{ -- Temporal/Darkness damage newDamageType{ - name = "temporal darkness", type = "VOID", text_color = "#GREY#", + name = _t"temporal darkness", type = "VOID", text_color = "#GREY#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2843,7 +2843,7 @@ newDamageType{ -- Gravity damage types newDamageType{ - name = "gravity", type = "GRAVITY", + name = _t"gravity", type = "GRAVITY", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2861,7 +2861,7 @@ newDamageType{ } newDamageType{ - name = "gravity pin", type = "GRAVITYPIN", + name = _t"gravity pin", type = "GRAVITYPIN", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2878,7 +2878,7 @@ newDamageType{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, 2, {apply_power=src:combatSpellpower(), min_dur=1}, reapplied) else - game.logSeen(target, "%s resists the pin!", target.name:capitalize()) + game.logSeen(target, "%s resists the pin!", target:getName():capitalize()) end DamageType:get(DamageType.PHYSICAL).projector(src, x, y, DamageType.PHYSICAL, dam, state) end @@ -2886,7 +2886,7 @@ newDamageType{ } newDamageType{ - name = "physical repulsion", type = "REPULSION", + name = _t"physical repulsion", type = "REPULSION", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2903,16 +2903,16 @@ newDamageType{ if target:checkHit(src:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(src.x, src.y, 2) target:crossTierEffect(target.EFF_OFFBALANCE, src:combatSpellpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end end, } newDamageType{ - name = "grow", type = "GROW", + name = _t"grow", type = "GROW", projector = function(src, x, y, typ, dam) state = initState(state) useImplicitCrit(src, state) @@ -2925,7 +2925,7 @@ newDamageType{ if newfeat then game.level.map(x, y, Map.TERRAIN, newfeat) if not silence then - game.logSeen({x=x,y=y}, "%s turns into %s.", feat.name:capitalize(), (newfeat or game.zone.grid_list[newfeat_name]).name) + game.logSeen({x=x,y=y}, "%s turns into %s.", _t(feat.name):capitalize(), (_t(newfeat) or _t(game.zone.grid_list[newfeat_name]).name)) end end end @@ -2935,7 +2935,7 @@ newDamageType{ -- Mosses newDamageType{ - name = "pinning nature", type = "GRASPING_MOSS", + name = _t"pinning nature", type = "GRASPING_MOSS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2946,14 +2946,14 @@ newDamageType{ if target:canBe("pin") and rng.percent(dam.pin) then target:setEffect(target.EFF_PINNED, 4, {apply_power=src:combatMindpower()}, true) else - game.logSeen(target, "%s resists the pinning!", target.name:capitalize()) + game.logSeen(target, "%s resists the pinning!", target:getName():capitalize()) end end end, } newDamageType{ - name = "healing nature", type = "NOURISHING_MOSS", + name = _t"healing nature", type = "NOURISHING_MOSS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2966,7 +2966,7 @@ newDamageType{ } newDamageType{ - name = "impeding nature", type = "SLIPPERY_MOSS", + name = _t"impeding nature", type = "SLIPPERY_MOSS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2979,7 +2979,7 @@ newDamageType{ } newDamageType{ - name = "confounding nature", type = "HALLUCINOGENIC_MOSS", + name = _t"confounding nature", type = "HALLUCINOGENIC_MOSS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -2989,7 +2989,7 @@ newDamageType{ if target:canBe("confusion") and rng.percent(dam.chance) then target:setEffect(target.EFF_CONFUSED, 2, {apply_power=src:combatMindpower(), power=dam.power or 30}, true) else - game.logSeen(target, "%s resists the confusion!", target.name:capitalize()) + game.logSeen(target, "%s resists the confusion!", target:getName():capitalize()) end end end, @@ -2997,7 +2997,7 @@ newDamageType{ -- Circles newDamageType{ - name = "sanctity", type = "SANCTITY", + name = _t"sanctity", type = "SANCTITY", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3010,14 +3010,14 @@ newDamageType{ target:setEffect(target.EFF_SILENCED, 2, {apply_power=src:combatSpellpower(), min_dur=1, no_ct_effect=true}, true) else DamageType:get(DamageType.LIGHT).projector(src, x, y, DamageType.LIGHT, dam, state) - game.logSeen(target, "%s resists the silence!", target.name:capitalize()) + game.logSeen(target, "%s resists the silence!", target:getName():capitalize()) end end end, } newDamageType{ - name = "defensive darkness", type = "SHIFTINGSHADOWS", + name = _t"defensive darkness", type = "SHIFTINGSHADOWS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3033,7 +3033,7 @@ newDamageType{ } newDamageType{ - name = "blazing light", type = "BLAZINGLIGHT", + name = _t"blazing light", type = "BLAZINGLIGHT", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3050,7 +3050,7 @@ newDamageType{ } newDamageType{ - name = "prismatic repulsion", type = "WARDING", + name = _t"prismatic repulsion", type = "WARDING", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3063,9 +3063,9 @@ newDamageType{ DamageType:get(DamageType.DARKNESS).projector(src, x, y, DamageType.DARKNESS, dam, state) if target:checkHit(src:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(src.x, src.y, 1) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end end @@ -3073,7 +3073,7 @@ newDamageType{ } newDamageType{ - name = "mind slow", type = "MINDSLOW", + name = _t"mind slow", type = "MINDSLOW", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3086,7 +3086,7 @@ newDamageType{ -- Freezes target, checks for physresistance newDamageType{ - name = "mind freeze", type = "MINDFREEZE", + name = _t"mind freeze", type = "MINDFREEZE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3096,14 +3096,14 @@ newDamageType{ if target:canBe("stun") then target:setEffect(target.EFF_FROZEN, dam, {hp=70 + src:combatMindpower() * 10, apply_power=src:combatMindpower()}) else - game.logSeen(target, "%s resists the freezing!", target.name:capitalize()) + game.logSeen(target, "%s resists the freezing!", target:getName():capitalize()) end end end, } newDamageType{ - name = "implosion", type = "IMPLOSION", + name = _t"implosion", type = "IMPLOSION", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3121,7 +3121,7 @@ newDamageType{ -- Temporal + Stat damage newDamageType{ - name = "regressive temporal", type = "CLOCK", + name = _t"regressive temporal", type = "CLOCK", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3137,7 +3137,7 @@ newDamageType{ -- Temporal Over Time newDamageType{ - name = "wasting temporal", type = "WASTING", text_color = "#LIGHT_STEEL_BLUE#", + name = _t"wasting temporal", type = "WASTING", text_color = "#LIGHT_STEEL_BLUE#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3157,7 +3157,7 @@ newDamageType{ } newDamageType{ - name = "stop", type = "STOP", + name = _t"stop", type = "STOP", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3166,14 +3166,14 @@ newDamageType{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, dam, {apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s has not been stopped!", target.name:capitalize()) + game.logSeen(target, "%s has not been stopped!", target:getName():capitalize()) end end end, } newDamageType{ - name = "debilitating temporal", type = "RETHREAD", + name = _t"debilitating temporal", type = "RETHREAD", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3186,25 +3186,25 @@ newDamageType{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 3, {apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end elseif chance == 2 then if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, 3, {apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists the blindness!", target.name:capitalize()) + game.logSeen(target, "%s resists the blindness!", target:getName():capitalize()) end elseif chance == 3 then if target:checkHit(src:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("pin") then target:setEffect(target.EFF_PINNED, 3, {apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists the pin!", target.name:capitalize()) + game.logSeen(target, "%s resists the pin!", target:getName():capitalize()) end elseif chance == 4 then if target:canBe("confusion") then target:setEffect(target.EFF_CONFUSED, 3, {power=dam.power or 30, apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists the confusion!", target.name:capitalize()) + game.logSeen(target, "%s resists the confusion!", target:getName():capitalize()) end end end @@ -3212,7 +3212,7 @@ newDamageType{ } newDamageType{ - name = "draining physical", type = "DEVOUR_LIFE", + name = _t"draining physical", type = "DEVOUR_LIFE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3234,7 +3234,7 @@ newDamageType{ } newDamageType{ - name = "temporal slow", type = "CHRONOSLOW", + name = _t"temporal slow", type = "CHRONOSLOW", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3255,7 +3255,7 @@ newDamageType{ } newDamageType{ - name = "molten rock", type = "MOLTENROCK", + name = _t"molten rock", type = "MOLTENROCK", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3265,7 +3265,7 @@ newDamageType{ } newDamageType{ - name = "entangle", type = "ENTANGLE", + name = _t"entangle", type = "ENTANGLE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3276,14 +3276,14 @@ newDamageType{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, 5, {no_ct_effect=true}) else - game.logSeen(target, "%s resists entanglement!", target.name:capitalize()) + game.logSeen(target, "%s resists entanglement!", target:getName():capitalize()) end end end, } newDamageType{ - name = "manaworm arcane", type = "MANAWORM", + name = _t"manaworm arcane", type = "MANAWORM", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3296,7 +3296,7 @@ newDamageType{ target:setEffect(target.EFF_MANAWORM, 5, {power=dam * 5, src=src, no_ct_effect=true}) src:disappear(src) else - game.logSeen(target, "%s has no mana to burn.", target.name:capitalize()) + game.logSeen(target, "%s has no mana to burn.", target:getName():capitalize()) end end return realdam @@ -3304,7 +3304,7 @@ newDamageType{ } newDamageType{ - name = "arcane blast", type = "VOID_BLAST", + name = _t"arcane blast", type = "VOID_BLAST", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3318,7 +3318,7 @@ newDamageType{ } newDamageType{ - name = "circle of death", type = "CIRCLE_DEATH", + name = _t"circle of death", type = "CIRCLE_DEATH", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3333,7 +3333,7 @@ newDamageType{ if target:canBe(what) then target:setEffect(what == "blind" and target.EFF_BANE_BLINDED or target.EFF_BANE_CONFUSED, math.ceil(dam.dur), {src=src, power=50, dam=dam.dam, apply_power=src:combatSpellpower()}) else - game.logSeen(target, "%s resists the baneful energy!", target.name:capitalize()) + game.logSeen(target, "%s resists the baneful energy!", target:getName():capitalize()) end end end, @@ -3341,7 +3341,7 @@ newDamageType{ -- Darkness damage + speed reduction + minion damage inc newDamageType{ - name = "decaying darkness", type = "RIGOR_MORTIS", + name = _t"decaying darkness", type = "RIGOR_MORTIS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3355,7 +3355,7 @@ newDamageType{ } newDamageType{ - name = "abyssal darkness", type = "ABYSSAL_SHROUD", + name = _t"abyssal darkness", type = "ABYSSAL_SHROUD", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3380,7 +3380,7 @@ newDamageType{ } newDamageType{ - name = "% chance to summon an orc spirit", type = "GARKUL_INVOKE", + name = _t"% chance to summon an orc spirit", type = "GARKUL_INVOKE", text_color = "#SALMON#", projector = function(src, x, y, type, dam, state) state = initState(state) @@ -3389,11 +3389,11 @@ newDamageType{ if not target then return end if game.party:hasMember(src) and game.party:findMember{type="garkul spirit"} then return end if not rng.percent(dam) then - game:delayedLogDamage(src, target, 0, ("%s<%d%%%% orc summon chance>#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", dam), false) + game:delayedLogDamage(src, target, 0, ("%s<%d%%%% orc summon chance>#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", dam), false) return end - game:delayedLogDamage(src, target, 0, ("%s<orc summon>#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#"), false) + game:delayedLogDamage(src, target, 0, ("%s<orc summon>#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#"), false) -- Find space local x, y = util.findFreeGrid(src.x, src.y, 5, true, {[engine.Map.ACTOR]=true}) @@ -3416,8 +3416,8 @@ newDamageType{ autolevel = "warrior", ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { ai_move="move_complex", talent_in=2, }, stats = { str=20, dex=8, mag=6, con=16 }, - name = "orc spirit", color=colors.SALMON, image = "npc/humanoid_orc_orc_berserker.png", - desc = [[An orc clad in massive armour, wielding a huge axe.]], + name = _t"orc spirit", color=colors.SALMON, image = "npc/humanoid_orc_orc_berserker.png", + desc=_t[[An orc clad in massive armour, wielding a huge axe.]], level_range = {35, nil}, exp_worth = 0, max_life = resolvers.rngavg(110,120), life_rating = 12, resolvers.equip{ @@ -3445,14 +3445,14 @@ newDamageType{ orc:forceLevelup(src.level) orc.remove_from_party_on_death = true - game.party:addMember(orc, {control="no", type="garkul spirit", title="Garkul Spirit"}) + game.party:addMember(orc, {control="no", type="garkul spirit", title=_t"Garkul Spirit"}) orc:setTarget(target) end, } -- speed reduction, mind dam, darkness dam newDamageType{ - name = "nightmare", type = "NIGHTMARE", + name = _t"nightmare", type = "NIGHTMARE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3477,7 +3477,7 @@ newDamageType{ -- cursed/predator/savage hunter/cursed miasma effect damage type newDamageType{ - name = "cursed miasma", type = "CURSED_MIASMA", + name = _t"cursed miasma", type = "CURSED_MIASMA", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3496,7 +3496,7 @@ newDamageType{ } newDamageType{ - name = "weakness", type = "WEAKNESS", + name = _t"weakness", type = "WEAKNESS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3510,7 +3510,7 @@ newDamageType{ -- Generic apply temporary effect newDamageType{ - name = "special effect", type = "TEMP_EFFECT", + name = _t"special effect", type = "TEMP_EFFECT", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3527,7 +3527,7 @@ newDamageType{ } newDamageType{ - name = "manaburn arcane", type = "MANABURN", text_color = "#PURPLE#", + name = _t"manaburn arcane", type = "MANABURN", text_color = "#PURPLE#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3545,7 +3545,7 @@ newDamageType{ } newDamageType{ - name = "leaves", type = "LEAVES", + name = _t"leaves", type = "LEAVES", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3566,7 +3566,7 @@ newDamageType{ -- Distortion; Includes knockback, penetrate, stun, and explosion paramters newDamageType{ - name = "distorting physical", type = "DISTORTION", + name = _t"distorting physical", type = "DISTORTION", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3607,9 +3607,9 @@ newDamageType{ if target:checkHit(src:combatMindpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(src.x, src.y, dam.knockback) target:crossTierEffect(target.EFF_OFFBALANCE, src:combatMindpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end -- Do stun @@ -3617,7 +3617,7 @@ newDamageType{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, dam.stun, {apply_power=src:combatMindpower()}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end end -- Reset resists pen @@ -3630,7 +3630,7 @@ newDamageType{ -- Mind/Fire damage with lots of parameter options newDamageType{ - name = "dreamforge", type = "DREAMFORGE", + name = _t"dreamforge", type = "DREAMFORGE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3655,9 +3655,9 @@ newDamageType{ if target:canBe("knockback") then target:knockback(src.x, src.y, dist) target:crossTierEffect(target.EFF_OFFBALANCE, src:combatMindpower()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the forge bellow!", target.name:capitalize()) + game.logSeen(target, "%s resists the forge bellow!", target:getName():capitalize()) end end if do_particles then @@ -3670,14 +3670,14 @@ newDamageType{ else -- Save for half damage DamageType:get(DamageType.MIND).projector(src, x, y, DamageType.MIND, {dam=dam/4, alwaysHit=true}, state) DamageType:get(DamageType.FIREBURN).projector(src, x, y, DamageType.FIREBURN, dam/4, state) - game.logSeen(target, "%s resists the dream forge!", target.name:capitalize()) + game.logSeen(target, "%s resists the dream forge!", target:getName():capitalize()) end end end, } newDamageType{ - name = "natural mucus", type = "MUCUS", + name = _t"natural mucus", type = "MUCUS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3705,7 +3705,7 @@ newDamageType{ } newDamageType{ - name = "disarming acid", type = "ACID_DISARM", text_color = "#GREEN#", + name = _t"disarming acid", type = "ACID_DISARM", text_color = "#GREEN#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3716,7 +3716,7 @@ newDamageType{ if target:canBe("disarm") then target:setEffect(target.EFF_DISARMED, dam.dur or 3, {src=src, apply_power=src:combatMindpower()}) else - game.logSeen(target, "%s resists disarming!", target.name:capitalize()) + game.logSeen(target, "%s resists disarming!", target:getName():capitalize()) end end return realdam @@ -3725,7 +3725,7 @@ newDamageType{ -- Acid damage + Accuracy/Defense/Armor Down Corrosion newDamageType{ - name = "corrosive acid", type = "ACID_CORRODE", + name = _t"corrosive acid", type = "ACID_CORRODE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3740,7 +3740,7 @@ newDamageType{ -- Bouncy slime! newDamageType{ - name = "bouncing slime", type = "BOUNCE_SLIME", + name = _t"bouncing slime", type = "BOUNCE_SLIME", projector = function(src, x, y, type, dam, state, _, tg) state = initState(state) useImplicitCrit(src, state) @@ -3773,7 +3773,7 @@ newDamageType{ -- Acid damage + Slow newDamageType{ - name = "caustic mire", type = "CAUSTIC_MIRE", + name = _t"caustic mire", type = "CAUSTIC_MIRE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3788,7 +3788,7 @@ newDamageType{ -- Sun Path damage newDamageType{ - name = "sun path", type = "SUN_PATH", + name = _t"sun path", type = "SUN_PATH", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3800,7 +3800,7 @@ newDamageType{ } newDamageType{ - name = "telekinetic shove", type = "TK_PUSHPIN", + name = _t"telekinetic shove", type = "TK_PUSHPIN", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3813,14 +3813,14 @@ newDamageType{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, dam.dur, {apply_power=src:combatMindpower()}) else - game.logSeen(src, "%s resists pinning!", target.name:capitalize()) + game.logSeen(src, "%s resists pinning!", target:getName():capitalize()) end end end) return dam.dam else DamageType:get(DamageType.PHYSICAL).projector(src, target.x, target.y, DamageType.PHYSICAL, dam.dam, state) - game.logSeen(src, "%s resists the shove!", target.name:capitalize()) + game.logSeen(src, "%s resists the shove!", target:getName():capitalize()) return dam.dam end end @@ -3829,7 +3829,7 @@ newDamageType{ -- Prevents Teleportation newDamageType{ - name = "dimensional anchor", type = "DIMENSIONAL_ANCHOR", + name = _t"dimensional anchor", type = "DIMENSIONAL_ANCHOR", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3843,7 +3843,7 @@ newDamageType{ -- Causes a random warp status effect; these do cause cross tier effects newDamageType{ - name = "phase pulse", type = "RANDOM_WARP", + name = _t"phase pulse", type = "RANDOM_WARP", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3859,32 +3859,32 @@ newDamageType{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, dur, {apply_power=power}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end elseif eff == 2 then if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, dur, {apply_power=power}) else - game.logSeen(target, "%s resists the blindness!", target.name:capitalize()) + game.logSeen(target, "%s resists the blindness!", target:getName():capitalize()) end elseif eff == 3 then if target:canBe("pin") then target:setEffect(target.EFF_PINNED, dur, {apply_power=power}) else - game.logSeen(target, "%s resists the pin!", target.name:capitalize()) + game.logSeen(target, "%s resists the pin!", target:getName():capitalize()) end elseif eff == 4 then if target:canBe("confusion") then target:setEffect(target.EFF_CONFUSED, dur, {power=dam.power or 30, apply_power=power}) else - game.logSeen(target, "%s resists the confusion!", target.name:capitalize()) + game.logSeen(target, "%s resists the confusion!", target:getName():capitalize()) end end end, } newDamageType{ - name = "brain storm", type = "BRAINSTORM", + name = _t"brain storm", type = "BRAINSTORM", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3894,7 +3894,7 @@ newDamageType{ if target:checkHit(src:combatMindpower(), target:combatMentalResist(), 0, 95, 15) then target:crossTierEffect(target.EFF_BRAINLOCKED, src:combatMindpower()) else - game.logSeen(target, "%s resists the mind attack!", target.name:capitalize()) + game.logSeen(target, "%s resists the mind attack!", target:getName():capitalize()) end if src:hasEffect(src.EFF_TRANSCENDENT_ELECTROKINESIS) then @@ -3908,7 +3908,7 @@ newDamageType{ } newDamageType{ - name = "static net", type = "STATIC_NET", + name = _t"static net", type = "STATIC_NET", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3923,7 +3923,7 @@ newDamageType{ } newDamageType{ - name = "wormblight", type = "WORMBLIGHT", + name = _t"wormblight", type = "WORMBLIGHT", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -3939,7 +3939,7 @@ newDamageType{ } newDamageType{ - name = "pestilent blight", type = "PESTILENT_BLIGHT", + name = _t"pestilent blight", type = "PESTILENT_BLIGHT", text_color = "#GREEN#", tdesc = function(dam, oldDam) local parens = "" @@ -3953,7 +3953,7 @@ newDamageType{ end end return ("* #LIGHT_GREEN#%d%%#LAST# chance to cause #GREEN#random blight#LAST#%s") - :format(dam, parens) + :tformat(dam, parens) end, projector = function(src, x, y, type, dam, state) state = initState(state) @@ -3987,7 +3987,7 @@ newDamageType{ } newDamageType{ - name = "blight poison", type = "BLIGHT_POISON", text_color = "#DARK_GREEN#", + name = _t"blight poison", type = "BLIGHT_POISON", text_color = "#DARK_GREEN#", projector = function(src, x, y, t, dam, poison, state) state = initState(state) useImplicitCrit(src, state) @@ -4019,14 +4019,14 @@ newDamageType{ } newDamageType{ - name = "terror", type = "TERROR", + name = _t"terror", type = "TERROR", text_color = "#YELLOW#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) local target = game.level.map(x, y, Map.ACTOR) if target and target:canSee(src) then - game:delayedLogDamage(src, target, 0, ("%s<terror chance>#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#"), false) + game:delayedLogDamage(src, target, 0, ("%s<terror chance>#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#"), false) if not src:checkHit(src:combatAttack(), target:combatMentalResist()) then return end local effect = rng.range(1, 3) if effect == 1 then @@ -4054,7 +4054,7 @@ newDamageType{ -- Random poison: 25% to be enhanced newDamageType{ - name = "random poison", type = "RANDOM_POISON", text_color = "#LIGHT_GREEN#", + name = _t"random poison", type = "RANDOM_POISON", text_color = "#LIGHT_GREEN#", projector = function(src, x, y, t, dam, poison, state) state = initState(state) useImplicitCrit(src, state) @@ -4080,14 +4080,14 @@ newDamageType{ } newDamageType{ - name = "blinding powder", type = "BLINDING_POWDER", + name = _t"blinding powder", type = "BLINDING_POWDER", text_color = "#GREY#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) local target = game.level.map(x, y, Map.ACTOR) if target then - game:delayedLogDamage(src, target, 0, ("%s<blinding powder>#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#"), false) + game:delayedLogDamage(src, target, 0, ("%s<blinding powder>#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#"), false) if not src:checkHit(src:combatAttack(), target:combatPhysicalResist()) then return end if target:canBe("blind") then @@ -4101,18 +4101,18 @@ newDamageType{ } newDamageType{ - name = "smokescreen", type = "SMOKESCREEN", + name = _t"smokescreen", type = "SMOKESCREEN", text_color = "#GREY#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) local target = game.level.map(x, y, Map.ACTOR) if target and src:reactionToward(target) < 0 then - game:delayedLogDamage(src, target, 0, ("%s<smoke>#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#"), false) + game:delayedLogDamage(src, target, 0, ("%s<smoke>#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#"), false) if target:canBe("blind") then target:setEffect(target.EFF_DIM_VISION, 2, {sight=dam.dam, apply_power=src:combatAttack(), no_ct_effect=true}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end if dam.poison and dam.poison > 0 then @@ -4126,7 +4126,7 @@ newDamageType{ } newDamageType{ - name = "flare", type = "FLARE", + name = _t"flare", type = "FLARE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -4141,7 +4141,7 @@ newDamageType{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, math.ceil(dam), {apply_power=src:combatAttack()}) else - game.logSeen(target, "%s resists the blinding flare!", target.name:capitalize()) + game.logSeen(target, "%s resists the blinding flare!", target:getName():capitalize()) end target:setEffect(target.EFF_MARKED, 2, {src=src}) end @@ -4149,7 +4149,7 @@ newDamageType{ } newDamageType{ - name = "flare light", type = "FLARE_LIGHT", + name = _t"flare light", type = "FLARE_LIGHT", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -4167,7 +4167,7 @@ newDamageType{ } newDamageType{ - name = "sticky pitch", type = "PITCH", + name = _t"sticky pitch", type = "PITCH", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -4176,7 +4176,7 @@ newDamageType{ if target:canBe("slow") then target:setEffect(target.EFF_STICKY_PITCH, dam.dur, {slow=dam.dam/100, resist=dam.fire, apply_power=src:combatAttack()}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end end, @@ -4184,7 +4184,7 @@ newDamageType{ newDamageType{ - name = "fire sunder", type = "FIRE_SUNDER", + name = _t"fire sunder", type = "FIRE_SUNDER", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -4199,7 +4199,7 @@ newDamageType{ -- Dim vision+confuse newDamageType{ - name = "shadow smoke", type = "SHADOW_SMOKE", + name = _t"shadow smoke", type = "SHADOW_SMOKE", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -4211,7 +4211,7 @@ newDamageType{ } newDamageType{ - name = "frozen earth", type = "ITEM_FROST_TREADS", + name = _t"frozen earth", type = "ITEM_FROST_TREADS", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -4226,7 +4226,7 @@ newDamageType{ } newDamageType{ - name = "void echoes", type = "VOID_ECHOES", + name = _t"void echoes", type = "VOID_ECHOES", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -4236,7 +4236,7 @@ newDamageType{ target:setEffect(target.EFF_VOID_ECHOES, 6, {src=src, power=dam, apply_power=src:combatMindpower()}) target:crossTierEffect(target.EFF_VOID_ECHOES, src:combatMindpower()) else - game.logSeen(target, "%s resists the void!", target.name:capitalize()) + game.logSeen(target, "%s resists the void!", target:getName():capitalize()) end end end, @@ -4244,7 +4244,7 @@ newDamageType{ ---new lite light burst for summertide phial newDamageType{ - name = "#YELLOW#Lite Light#LAST# Burst (radius 1)", type = "LITE_LIGHT_BURST", --text_color = "#YELLOW#", + name = _t"#YELLOW#Lite Light#LAST# Burst (radius 1)", type = "LITE_LIGHT_BURST", --text_color = "#YELLOW#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) @@ -4260,7 +4260,7 @@ newDamageType{ -- Light + Darkness newDamageType{ - name = "dark light", type = "DARKLIGHT", text_color = "#9D9DC9#", + name = _t"dark light", type = "DARKLIGHT", text_color = "#9D9DC9#", projector = function(src, x, y, type, dam, state) state = initState(state) useImplicitCrit(src, state) diff --git a/game/modules/tome/data/general/encounters/fareast.lua b/game/modules/tome/data/general/encounters/fareast.lua index e3ee8642931f41d3b976c7129beb2fb5686e6012..a761d7089dd9c2732d55e0ea26758d1a2e4dd56a 100644 --- a/game/modules/tome/data/general/encounters/fareast.lua +++ b/game/modules/tome/data/general/encounters/fareast.lua @@ -31,7 +31,7 @@ newEntity{ local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g:removeAllMOs() - g.name = "Entrance to an underwater cave" + g.name = _t"Entrance to an underwater cave" g.display='>' g.color_r=colors.AQUAMARINE.r g.color_g=colors.AQUAMARINE.g g.color_b=colors.AQUAMARINE.b g.notice = true g.change_level=1 g.change_zone="flooded-cave" g.glow=true g.add_displays = g.add_displays or {} @@ -54,7 +54,7 @@ newEntity{ if not x then return end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() - g.name = "Entrance to a dark crypt" + g.name = _t"Entrance to a dark crypt" g.display='>' g.color_r=128 g.color_g=128 g.color_b=128 g.notice = true g.change_level=1 g.change_zone="shadow-crypt" g.glow=true g.add_displays = g.add_displays or {} diff --git a/game/modules/tome/data/general/encounters/maj-eyal-npcs.lua b/game/modules/tome/data/general/encounters/maj-eyal-npcs.lua index 145bc50b2905e3d669c9d029f56c086eb994d5c4..0a29fdbcabc1387496329a1d6c94b5f70be82f97 100644 --- a/game/modules/tome/data/general/encounters/maj-eyal-npcs.lua +++ b/game/modules/tome/data/general/encounters/maj-eyal-npcs.lua @@ -114,7 +114,7 @@ newEntity{ newEntity{ name = "ziguranth patrol", type = "hostile", subtype = "humanoid", - desc = "You have got nothing to fear if you are not using filthy arcane magic. Otherwise: DIE!", + desc = _t"You have got nothing to fear if you are not using filthy arcane magic. Otherwise: DIE!", display = '@', color = colors.GREEN, level_range = {14, nil}, faction = "zigur", diff --git a/game/modules/tome/data/general/encounters/maj-eyal.lua b/game/modules/tome/data/general/encounters/maj-eyal.lua index e58c598f0c4172b0857f2ab1cb8dc789a72c24c7..7934f0b47767ca62e7be4d4191aa16d7c6eb35eb 100644 --- a/game/modules/tome/data/general/encounters/maj-eyal.lua +++ b/game/modules/tome/data/general/encounters/maj-eyal.lua @@ -27,7 +27,7 @@ newEntity{ if not x then return end local g = mod.class.WorldNPC.new{ - name="Novice mage", + name=_t"Novice mage", type="humanoid", subtype="human", faction="angolwen", display='@', color=colors.RED, image = "npc/humanoid_human_apprentice_mage.png", @@ -52,7 +52,7 @@ newEntity{ who.energy.value = game.energy_to_act game.paused = true who:runStop() - engine.ui.Dialog:yesnoPopup("Encounter", "You find a hidden trap door, and hear cries for help from within...", function(ok) + engine.ui.Dialog:yesnoPopup(_t"Encounter", _t"You find a hidden trap door, and hear cries for help from within...", function(ok) if not ok then game.logPlayer(who, "#LIGHT_BLUE#You carefully get away without making a sound.") else @@ -61,7 +61,7 @@ newEntity{ game.logPlayer(who, "#LIGHT_RED#As you enter you notice the trap door has no visible handle on the inside. You are stuck here!") who:grantQuest("lost-merchant") end - end, "Enter the tunnels", "Leave carefully", true) + end, _t"Enter the tunnels", _t"Leave carefully", true) return true end, } @@ -77,7 +77,7 @@ newEntity{ who.energy.value = game.energy_to_act game.paused = true who:runStop() - engine.ui.Dialog:yesnoLongPopup("Encounter", "You find an entrance to an old crypt. An aura of terrible evil emanates from this place. You feel threatened just standing there.\nYou hear the muffled cries of a woman coming from inside.", 400, function(ok) + engine.ui.Dialog:yesnoLongPopup(_t"Encounter", _t"You find an entrance to an old crypt. An aura of terrible evil emanates from this place. You feel threatened just standing there.\nYou hear the muffled cries of a woman coming from inside.", 400, function(ok) if not ok then game.logPlayer(who, "#LIGHT_BLUE#You carefully get away without making a sound.") else @@ -85,7 +85,7 @@ newEntity{ game.logPlayer(who, "#LIGHT_RED#You carefully open the door and enter the underground crypt...") game.logPlayer(who, "#LIGHT_RED#As you enter you notice the door has no visible handle on the inside. You are stuck here!") end - end, "Enter the crypt", "Leave carefully", true) + end, _t"Enter the crypt", _t"Leave carefully", true) return true end, } @@ -102,7 +102,7 @@ newEntity{ game.paused = true who:runStop() local Chat = require "engine.Chat" - local chat = Chat.new("sage-kitty", mod.class.NPC.new{name="Lost Kitty", image="npc/sage_kitty.png"}, who) + local chat = Chat.new("sage-kitty", mod.class.NPC.new{name=_t"Lost Kitty", image="npc/sage_kitty.png"}, who) chat:invoke() return true end, @@ -117,7 +117,7 @@ newEntity{ if not x then return end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() - g.name = "Entrance to some ancient elven ruins" + g.name = _t"Entrance to some ancient elven ruins" g.display='>' g.color_r=0 g.color_g=255 g.color_b=255 g.notice = true g.change_level=1 g.change_zone="ancient-elven-ruins" g.glow=true g.add_displays = g.add_displays or {} @@ -141,7 +141,7 @@ newEntity{ game.paused = true who:runStop() local Chat = require "engine.Chat" - local chat = Chat.new("lumberjack-quest", {name="Half-dead lumberjack"}, who) + local chat = Chat.new("lumberjack-quest", {name=_t"Half-dead lumberjack"}, who) chat:invoke() return true end, @@ -156,7 +156,7 @@ newEntity{ if not x then return end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() - g.name = "Entrance to a ruined dungeon" + g.name = _t"Entrance to a ruined dungeon" g.display='>' g.color_r=255 g.color_g=0 g.color_b=0 g.notice = true g.change_level=1 g.change_zone="ruined-dungeon" g.glow=true g.add_displays = g.add_displays or {} @@ -178,7 +178,7 @@ newEntity{ if not x then return end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() - g.name = "Mark of the Spellblaze" + g.name = _t"Mark of the Spellblaze" g.display='>' g.color_r=0 g.color_g=200 g.color_b=0 g.notice = true g.change_level=1 g.change_zone="mark-spellblaze" g.glow=true g.add_displays = g.add_displays or {} @@ -200,7 +200,7 @@ newEntity{ if not x then return end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() - g.name = "Golem Graveyard" + g.name = _t"Golem Graveyard" g.display='>' g.color_r=0 g.color_g=200 g.color_b=0 g.notice = true g.change_level=1 g.change_zone="golem-graveyard" g.glow=true g.add_displays = g.add_displays or {} @@ -223,7 +223,8 @@ newEntity{ if not x then return end local g = mod.class.WorldNPC.new{ - name="Agrimley the Hermit", + name=_t"Agrimley the Hermit", + image = "npc/humanoid_halfling_agrimley_the_hermit.png", type="humanoid", subtype="halfling", faction="neutral", display='@', color=colors.BLUE, can_talk = "alchemist-hermit", @@ -246,7 +247,7 @@ newEntity{ if not x then return end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() - g.name = "Hidden compound" + g.name = _t"Hidden compound" g.display='>' g.color_r=200 g.color_g=0 g.color_b=0 g.notice = true g.change_level=1 g.change_zone="ring-of-blood" g.glow=true g.add_displays = g.add_displays or {} @@ -273,7 +274,7 @@ newEntity{ if not x then return end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() - g.name = "tranquil meadow" + g.name = _t"tranquil meadow" g.display='>' g.color_r=0 g.color_g=255 g.color_b=128 g.notice = true g.change_level=1 g.change_zone="keepsake-meadow" g.glow=true g.add_displays = g.add_displays or {} diff --git a/game/modules/tome/data/general/events/antimagic-bush.lua b/game/modules/tome/data/general/events/antimagic-bush.lua index cfa865236d43b547d707dd7ce94887ae7e1c3766..1d01623ef329c86cdd35436910707ac9277e2cd0 100644 --- a/game/modules/tome/data/general/events/antimagic-bush.lua +++ b/game/modules/tome/data/general/events/antimagic-bush.lua @@ -23,7 +23,7 @@ if not x then return false end local on_stand = function(self, x, y, who) who:setEffect(who.EFF_ANTIMAGIC_BUSH, 1, {}) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() -g.name = "antimagic bush" +g.name = _t"antimagic bush" g.display='~' g.color_r=0 g.color_g=255 g.color_b=100 g.notice = true g.special_minimap = colors.OLIVE_DRAB g.on_stand = on_stand @@ -46,7 +46,7 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.on_stand = g.on_stand or on_stand if g.on_stand == on_stand and g.type == "floor" then - g.name = g.name .. " (antimagic aura)" + g.name = ("%s (antimagic aura)"):tformat(_t(g.name)) if not g.special_minimap then g.special_minimap = {b=35, g=35, r=85} end end g.always_remember = true diff --git a/game/modules/tome/data/general/events/bligthed-soil.lua b/game/modules/tome/data/general/events/bligthed-soil.lua index 61134923bd248a935b8ebe14a0cefe4cb45a847f..deda87a7eb3246cac8598292d6d285a5fad3b056 100644 --- a/game/modules/tome/data/general/events/bligthed-soil.lua +++ b/game/modules/tome/data/general/events/bligthed-soil.lua @@ -23,7 +23,7 @@ if not x then return false end local on_stand = function(self, x, y, who) who:setEffect(who.EFF_BLIGHTED_SOIL, 1, {}) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() -g.name = "blighted soil" +g.name = _t"blighted soil" g.display='~' g.color_r=0 g.color_g=255 g.color_b=0 g.notice = true g.special_minimap = colors.OLIVE_DRAB g.on_stand = on_stand @@ -46,7 +46,7 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.on_stand = g.on_stand or on_stand if g.on_stand == on_stand and g.type == "floor" then - g.name = g.name .. " (blighted aura)" + g.name = ("%s (blighted aura)"):tformat(_t(g.name)) if not g.special_minimap then g.special_minimap = colors.DARK_SLATE_GRAY end end g.always_remember = true diff --git a/game/modules/tome/data/general/events/conclave-vault.lua b/game/modules/tome/data/general/events/conclave-vault.lua index ccfaa312a23472a340e78f872b72ab798021f604..39c071b823e4d113428a2464c7f07a546eeb42fe 100644 --- a/game/modules/tome/data/general/events/conclave-vault.lua +++ b/game/modules/tome/data/general/events/conclave-vault.lua @@ -26,8 +26,9 @@ local Talents = require("engine.interface.ActorTalents") local skeletons = mod.class.NPC:loadList("/data/general/npcs/skeleton.lua") local m = mod.class.NPC:fromBase{ base = skeletons.BASE_NPC_SKELETON, - name = "Director Hompalan", color=colors.PURPLE, - desc = [[Only crumbling bones are left of what once was the proud Director Hompalan, chief of this facility. + name = _t"Director Hompalan", color=colors.PURPLE, + image = "npc/undead_skeleton_director_hompalan.png", + desc=_t[[Only crumbling bones are left of what once was the proud Director Hompalan, chief of this facility. Now those remains look at you with empty eyes but you can not mistake their intent.]], level_range = {10, nil}, exp_worth = 2, rank = 3.5, diff --git a/game/modules/tome/data/general/events/cultists.lua b/game/modules/tome/data/general/events/cultists.lua index fa6aabe6d72aade16be622d461d01e2f161dfea3..f1252c216eae6714828cad96710d02bbfecfac68 100644 --- a/game/modules/tome/data/general/events/cultists.lua +++ b/game/modules/tome/data/general/events/cultists.lua @@ -45,7 +45,7 @@ game.level.event_cultists = {sacrifice = 0, kill = 0} for i, p in ipairs(list) do local g = game.level.map(p.x, p.y, engine.Map.TERRAIN):cloneFull() - g.name = "monolith" + g.name = _t"monolith" g.display='&' g.color_r=0 g.color_g=255 g.color_b=255 g.notice = true g.always_remember = true g.special_minimap = colors.OLIVE_DRAB g.add_displays = g.add_displays or {} @@ -60,8 +60,8 @@ for i, p in ipairs(list) do local m = mod.class.NPC.new{ type = "humanoid", subtype = "shalore", image = "npc/humanoid_shalore_elven_corruptor.png", - name = "Cultist", - desc = [[An elven cultist. He doesn't seem to mind you.]], + name = _t"Cultist", + desc = _t[[An elven cultist. He doesn't seem to mind you.]], display = "p", color=colors.ORCHID, faction = "unaligned", combat = { dam=resolvers.rngavg(5,12), atk=2, apr=6, physspeed=2 }, @@ -102,14 +102,14 @@ for i, p in ipairs(list) do local g = game.level.map(self.monolith_x, self.monolith_y, engine.Map.TERRAIN) if not g or not g.is_monolith then return end if self.self_sacrifice then - self:doEmote(rng.table{"My soul for her!", "The Dark Queen shall reign!", "Take me! Take me!", "From death comes life!"}, 60) + self:doEmote(rng.table{_t"My soul for her!", _t"The Dark Queen shall reign!", _t"Take me! Take me!", _t"From death comes life!"}, 60) g.add_displays[#g.add_displays].image = g.add_displays[#g.add_displays].image:gsub("/moonstone_0", "/darkgreen_moonstone_0") - g.name = "corrupted monolith" + g.name = _t"corrupted monolith" game.level.event_cultists.sacrifice = game.level.event_cultists.sacrifice + 1 else - self:doEmote(rng.table{"This is too soon!", "No the ritual will weaken!"}, 60) + self:doEmote(rng.table{_t"This is too soon!", _t"No the ritual will weaken!"}, 60) g.add_displays[#g.add_displays].image = g.add_displays[#g.add_displays].image:gsub("/moonstone_0", "/bluish_moonstone_0") - g.name = "disrupted monolith" + g.name = _t"disrupted monolith" game.level.event_cultists.kill = game.level.event_cultists.kill + 1 end g:removeAllMOs() @@ -119,8 +119,8 @@ for i, p in ipairs(list) do game.level.event_cultists.queen_y = self.monolith_y game.level.turn_counter = 10 * 210 game.level.max_turn_counter = 10 * 210 - game.level.turn_counter_desc = "Something the cultists are doing is coming. Beware." - require("engine.ui.Dialog"):simplePopup("Cultist", "The cultist's soul seems to be absorbed by the strange stone he was guarding. You feel like something is about to happen...") + game.level.turn_counter_desc = _t"Something the cultists are doing is coming. Beware." + require("engine.ui.Dialog"):simplePopup(_t"Cultist", _t"The cultist's soul seems to be absorbed by the strange stone he was guarding. You feel like something is about to happen...") end end, } @@ -148,10 +148,10 @@ if not game.zone.cultist_event_on_turn then local m = mod.class.NPC.new{ type = "demon", subtype = "major", display = 'U', - name = "Shasshhiy'Kaish", color=colors.VIOLET, unique = true, + name = _t"Shasshhiy'Kaish", color=colors.VIOLET, unique = true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_shasshhiy_kaish.png", display_h=2, display_y=-1}}}, - desc = [[This demon would be very attractive if not for the hovering crown of flames, the three tails and sharp claws. As you watch her you can almost feel pain digging in your flesh. She wants you to suffer.]], - killer_message = "and used for her perverted desires", + desc = _t[[This demon would be very attractive if not for the hovering crown of flames, the three tails and sharp claws. As you watch her you can almost feel pain digging in your flesh. She wants you to suffer.]], + killer_message = _t"and used for her perverted desires", level_range = {25, nil}, exp_worth = 2, female = 1, faction = "fearscape", @@ -202,9 +202,9 @@ if not game.zone.cultist_event_on_turn then define_as = "METEORIC_CROWN", slot = "HEAD", type = "armor", subtype="head", - name = "Crown of Burning Pain", image = "object/artifact/crown_of_burning_pain.png", - unided_name = "burning crown", - desc = [[This crown of pure flames possesses a myriad of small molten rocks floating wildly above it. Each can be removed to throw as a true meteor.]], + name = _t"Crown of Burning Pain", image = "object/artifact/crown_of_burning_pain.png", + unided_name = _t"burning crown", + desc = _t[[This crown of pure flames possesses a myriad of small molten rocks floating wildly above it. Each can be removed to throw as a true meteor.]], add_name = " (#ARMOR#)", power_source = {arcane=true}, display = "]", color=colors.SLATE, @@ -238,7 +238,7 @@ if not game.zone.cultist_event_on_turn then m:addObject(m:getInven("INVEN"), o) game.zone:addEntity(game.level, m, "actor", x, y) - require("engine.ui.Dialog"):simpleLongPopup("Cultist", "A terrible shout thunders across the level: 'Come my darling, come, I will be ssssooo *nice* to you!'\nYou should flee from this level!", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Cultist", _t"A terrible shout thunders across the level: 'Come my darling, come, I will be ssssooo *nice* to you!'\nYou should flee from this level!", 400) end elseif game.level.turn_counter == 10 * 180 or game.level.turn_counter == 10 * 150 or diff --git a/game/modules/tome/data/general/events/damp-cave.lua b/game/modules/tome/data/general/events/damp-cave.lua index 7c20b7f3b29b0b165e9a9d807df7e9f71c244bfe..c9a7aa93053190b00038a7a9b8e7848e23ba7978 100644 --- a/game/modules/tome/data/general/events/damp-cave.lua +++ b/game/modules/tome/data/general/events/damp-cave.lua @@ -31,10 +31,10 @@ local changer = function(id) local terrains = mod.class.Grid:loadList("/data/general/grids/cave.lua") terrains.CAVE_LADDER_UP_WILDERNESS.change_level_shift_back = true terrains.CAVE_LADDER_UP_WILDERNESS.change_zone_auto_stairs = true - terrains.CAVE_LADDER_UP_WILDERNESS.name = "ladder back to "..game.zone.name + terrains.CAVE_LADDER_UP_WILDERNESS.name = ("ladder back to %s"):tformat(game.zone.name) terrains.CAVE_LADDER_UP_WILDERNESS.change_zone = game.zone.short_name local zone = mod.class.Zone.new(id, { - name = "Damp Cave", + name = _t"Damp Cave", level_range = game.zone.actor_adjust_level and {math.floor(game.zone:actor_adjust_level(game.level, game.player)*1.05), math.ceil(game.zone:actor_adjust_level(game.level, game.player)*1.15)} or {game.zone.base_level, game.zone.base_level}, -- 5-15% higher actor levels __applied_difficulty = true, -- Difficulty already applied to parent zone @@ -83,7 +83,7 @@ local changer = function(id) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() -g.name = "damp cave" +g.name = _t"damp cave" g.always_remember = true g.display='>' g.color_r=0 g.color_g=0 g.color_b=255 g.notice = true g.change_level=1 g.change_zone=id g.glow=true diff --git a/game/modules/tome/data/general/events/drake-cave.lua b/game/modules/tome/data/general/events/drake-cave.lua index 3a9d924873a1466567b75e0c39c8a7015f2803a4..e4537ddbf9bd633764ea97dab55f09a0aebeb48e 100644 --- a/game/modules/tome/data/general/events/drake-cave.lua +++ b/game/modules/tome/data/general/events/drake-cave.lua @@ -26,7 +26,7 @@ local kind = rng.table{"fire", "fire", "cold", "cold", "storm", "storm", "multih print("[EVENT] Placing event", kind.."-dragon-cave", "at", x, y) local g = game.state:dynamicZoneEntry(game.level.map(x, y, engine.Map.TERRAIN):cloneFull(), kind.."-dragon-cave", { - name = "Intimidating Cave", + name = _t"Intimidating Cave", level_range = game.zone.actor_adjust_level and {math.floor(game.zone:actor_adjust_level(game.level, game.player)*1.05), math.ceil(game.zone:actor_adjust_level(game.level, game.player)*1.15)} or {game.zone.base_level, game.zone.base_level}, -- 5-15% higher levels __applied_difficulty = true, -- Difficulty already applied to parent zone @@ -75,7 +75,7 @@ local g = game.state:dynamicZoneEntry(game.level.map(x, y, engine.Map.TERRAIN):c trap_list = {"/data/general/traps/natural_forest.lua"}, }, function(zone, goback) - goback("ladder back to %s", zone.grid_list.CAVE_LADDER_UP_WILDERNESS) + goback(_t"ladder back to %s", zone.grid_list.CAVE_LADDER_UP_WILDERNESS) end) g.display='>' g.color_r=0 g.color_g=0 g.color_b=255 g.notice = true diff --git a/game/modules/tome/data/general/events/fearscape-portal.lua b/game/modules/tome/data/general/events/fearscape-portal.lua index cacfd04a28fefc2cb0b7668f1b9ffc27acd23096..32178892de3c2e829462c11fc140b377ee0cf4e8 100644 --- a/game/modules/tome/data/general/events/fearscape-portal.lua +++ b/game/modules/tome/data/general/events/fearscape-portal.lua @@ -34,7 +34,7 @@ local changer = function(id) terrains.PORTAL_BACK = mod.class.Grid.new{ type = "floor", subtype = "floor", display = "&", color = colors.BLUE, - name = "portal back to "..game.zone.name, + name = ("portal back to %s"):tformat(game.zone.name), image = "terrain/red_floating_rocks05_01.png", add_displays = { mod.class.Grid.new{image="terrain/demon_portal3.png"} }, change_level = 1, @@ -48,7 +48,7 @@ local changer = function(id) end } local zone = mod.class.Zone.new(id, { - name = "orbital fearscape platform", + name = _t"orbital fearscape platform", level_range = game.zone.actor_adjust_level and {math.floor(game.zone:actor_adjust_level(game.level, game.player)*1.05), math.ceil(game.zone:actor_adjust_level(game.level, game.player)*1.15)} or {game.zone.base_level, game.zone.base_level}, -- 5-15% higher levels __applied_difficulty = true, -- Difficulty already applied to parent zone @@ -77,7 +77,7 @@ local changer = function(id) actor = { class = "mod.class.generator.actor.Random", nb_npc = {12, 12}, - guardian = {random_elite={life_rating=function(v) return v * 1.5 + 4 end, name_scheme="#rng# the Invader", on_die=function(self) world:gainAchievement("EVENT_FEARSCAPE", game:getPlayer(true)) end, + guardian = {random_elite={life_rating=function(v) return v * 1.5 + 4 end, name_scheme=_t"#rng# the Invader", on_die=function(self) world:gainAchievement("EVENT_FEARSCAPE", game:getPlayer(true)) end, nb_rares=(rng.percent(resolvers.current_level-50) and 5 or 4), nb_classes=(rng.percent(resolvers.current_level-50) and 2 or 1) }} @@ -149,7 +149,7 @@ local changer = function(id) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() -g.name = "fearscape invasion portal" +g.name = _t"fearscape invasion portal" g.always_remember = true g.show_tooltip = true g.display='&' g.color_r=0 g.color_g=0 g.color_b=255 g.notice = true @@ -169,7 +169,7 @@ g.real_change = changer g.break_portal = function(self) self.broken = true game.log("#VIOLET#The portal is broken!") - self.name = "broken fearscape invasion portal" + self.name = _t"broken fearscape invasion portal" self.change_level = nil self.autoexplore_ignore = true self.show_tooltip = false @@ -187,7 +187,7 @@ g.on_move = function(self, x, y, who, act, couldpass) return false end - require("engine.ui.Dialog"):yesnoPopup("Fearscape Portal", "Do you wish to enter the portal, destroy it, or ignore it (press escape)?", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Fearscape Portal", _t"Do you wish to enter the portal, destroy it, or ignore it (press escape)?", function(ret) if ret == "Quit" then game.log("#VIOLET#Ignoring the portal...") return @@ -196,7 +196,7 @@ g.on_move = function(self, x, y, who, act, couldpass) self:change_level_check() else self:break_portal() end - end, "Destroy", "Enter", false, "Quit") + end, _t"Destroy", _t"Enter", false, _t"Quit") return false end diff --git a/game/modules/tome/data/general/events/fell-aura.lua b/game/modules/tome/data/general/events/fell-aura.lua index d00e4781966c52537c4c10765eafa055e8987c87..8e7161257d2ce448f6a785b635498e2f7e31a83b 100644 --- a/game/modules/tome/data/general/events/fell-aura.lua +++ b/game/modules/tome/data/general/events/fell-aura.lua @@ -34,7 +34,7 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.on_stand = g.on_stand or on_stand if g.on_stand == on_stand and g.type == "floor" then - g.name = g.name .. " (fell aura)" + g.name = ("%s (fell aura)"):tformat(_t(g.name)) if not g.special_minimap then g.special_minimap = {b=99, g=99, r=60} end end g.always_remember = true diff --git a/game/modules/tome/data/general/events/font-life.lua b/game/modules/tome/data/general/events/font-life.lua index 9aa8dbba541a5ef165d3409a7bb5f76d289f5ed4..3c009a7cf65cc385c50e1ec22a3d53c073949902 100644 --- a/game/modules/tome/data/general/events/font-life.lua +++ b/game/modules/tome/data/general/events/font-life.lua @@ -23,7 +23,7 @@ if not x then return false end local on_stand = function(self, x, y, who) who:setEffect(who.EFF_FONT_OF_LIFE, 1, {}) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() -g.name = "font of life" +g.name = _t"font of life" g.display='&' g.color_r=0 g.color_g=255 g.color_b=0 g.notice = true g.special_minimap = colors.OLIVE_DRAB g.on_stand = on_stand @@ -46,7 +46,7 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.on_stand = g.on_stand or on_stand if g.on_stand == on_stand and g.type == "floor" then - g.name = g.name .. " (life aura)" + g.name = ("%s (life aura)"):tformat(_t(g.name)) if not g.special_minimap then g.special_minimap = colors.AQUAMARINE end end g.always_remember = true diff --git a/game/modules/tome/data/general/events/glimmerstone.lua b/game/modules/tome/data/general/events/glimmerstone.lua index 91174925149b26d27355ad7d4b158ec63af6485d..fd4b25d7a89c0d9c1059fc57084dfdca84618ae9 100644 --- a/game/modules/tome/data/general/events/glimmerstone.lua +++ b/game/modules/tome/data/general/events/glimmerstone.lua @@ -24,8 +24,8 @@ if not x then return false end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g = require("mod.class.Object").new(g) g.identified = true -g.name = "glimmerstone" -g.desc = "It shimmers and changes the light all around. This is dazling!" +g.name = _t"glimmerstone" +g.desc = _t"It shimmers and changes the light all around. This is dazling!" g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true g.always_remember = true g:removeAllMOs() @@ -47,7 +47,7 @@ g.act = function(self) local target = game.level.map(x, y, engine.Map.ACTOR) if target then target:setEffect(target.EFF_DAZING_DAMAGE, 1, {}) - game.logSeen(target, "%s is affected by the glimmerstone!", target.name:capitalize()) + game.logSeen(target, "%s is affected by the glimmerstone!", target:getName():capitalize()) end end end end diff --git a/game/modules/tome/data/general/events/glowing-chest.lua b/game/modules/tome/data/general/events/glowing-chest.lua index ee263f73e0e5f6cdef5f656d43e32b619c3d62b8..359b5ce9b3575a3ba3405e2b0bf03b09428ec179 100644 --- a/game/modules/tome/data/general/events/glowing-chest.lua +++ b/game/modules/tome/data/general/events/glowing-chest.lua @@ -57,7 +57,7 @@ if rng.percent(r * 2) then end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() -g.name = "glowing chest" +g.name = _t"glowing chest" g.display='~' g.color_r=255 g.color_g=215 g.color_b=0 g.notice = true g.always_remember = true g.special_minimap = {b=150, g=50, r=90} g:removeAllMOs() @@ -73,7 +73,7 @@ g.block_move = function(self, x, y, who, act, couldpass) if not who or not who.player or not act then return false end if self.chest_opened then return false end - require("engine.ui.Dialog"):yesnoPopup("Glowing Chest", "Open the chest?", function(ret) if ret then + require("engine.ui.Dialog"):yesnoPopup(_t"Glowing Chest", _t"Open the chest?", function(ret) if ret then self.chest_opened = true if self.chest_item then game.zone:addEntity(game.level, self.chest_item, "object", x, y) @@ -94,14 +94,14 @@ g.block_move = function(self, x, y, who, act, couldpass) self.block_move = nil self.special = nil self.autoexplore_ignore = true - self.name = "glowing chest (opened)" + self.name = _t"glowing chest (opened)" if self.add_displays and self.add_displays[1] then self.add_displays[1].image = "object/chestopen3.png" self:removeAllMOs() game.level.map:updateMap(x, y) end - end end, "Open", "Leave") + end end, _t"Open", _t"Leave") return false end diff --git a/game/modules/tome/data/general/events/meteor.lua b/game/modules/tome/data/general/events/meteor.lua index ce40de63d2738fd699d92e74e4905164f5400ec5..fa1f385908ccab5b9439826cea36a07d3a987238 100644 --- a/game/modules/tome/data/general/events/meteor.lua +++ b/game/modules/tome/data/general/events/meteor.lua @@ -88,7 +88,7 @@ game.zone.on_turn = function() world:gainAchievement("EVENT_METEOR", game:getPlayer(true)) game:getPlayer(true):attr("meteoric_crash", 1) - require("engine.ui.Dialog"):simplePopup("Meteor!", "As you walk you notice a huge rock falling from the sky. It crashes right near you!") + require("engine.ui.Dialog"):simplePopup(_t"Meteor!", _t"As you walk you notice a huge rock falling from the sky. It crashes right near you!") end end diff --git a/game/modules/tome/data/general/events/naga-portal.lua b/game/modules/tome/data/general/events/naga-portal.lua index 058b4ef30f0339d5e51e42ffe22a26a510903704..f2eb557a7674449d53b9f6a8bd738e0ec5cc6ffd 100644 --- a/game/modules/tome/data/general/events/naga-portal.lua +++ b/game/modules/tome/data/general/events/naga-portal.lua @@ -32,8 +32,8 @@ local changer = function(id) terrains.PORTAL_BACK = mod.class.Grid.new{ type = "floor", subtype = "underwater", display = "&", color = colors.BLUE, - name = "coral invasion portal", - name = "portal back to "..game.zone.name, + name = _t"coral invasion portal", -- TODO: this line is duplicated + name = ("portal back to %s"):tformat(game.zone.name), image = "terrain/underwater/subsea_floor_02.png", add_displays = {mod.class.Grid.new{z=18, image="terrain/naga_portal.png", display_h=2, display_y=-1, embed_particles = { {name="naga_portal_smoke", rad=2, args={smoke="particles_images/smoke_whispery_bright"}}, @@ -46,7 +46,7 @@ local changer = function(id) change_zone_auto_stairs = true, } local zone = mod.class.Zone.new(id, { - name = "water cavern", + name = _t"water cavern", level_range = game.zone.actor_adjust_level and {math.floor(game.zone:actor_adjust_level(game.level, game.player)*1.05), math.ceil(game.zone:actor_adjust_level(game.level, game.player)*1.15)} or {game.zone.base_level, game.zone.base_level}, -- 5-15% higher levels __applied_difficulty = true, -- Difficulty already applied to parent zone @@ -78,7 +78,7 @@ local changer = function(id) actor = { class = "mod.class.generator.actor.Random", nb_npc = {12, 12}, - guardian = {random_elite={life_rating=function(v) return v * 1.5 + 4 end, name_scheme="#rng# the Tidebender", on_die=function(self) world:gainAchievement("EVENT_NAGA", game:getPlayer(true)) end, + guardian = {random_elite={life_rating=function(v) return v * 1.5 + 4 end, name_scheme=_t"#rng# the Tidebender", on_die=function(self) world:gainAchievement("EVENT_NAGA", game:getPlayer(true)) end, nb_rares=(rng.percent(resolvers.current_level-50) and 4 or 3), nb_classes=(rng.percent(resolvers.current_level-50) and 2 or 1) }}, @@ -103,7 +103,7 @@ local changer = function(id) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() -g.name = "naga invasion coral portal" +g.name = _t"naga invasion coral portal" g.always_remember = true g.display='&' g.color_r=0 g.color_g=0 g.color_b=255 g.notice = true g.special_minimap = colors.VIOLET @@ -125,7 +125,7 @@ g.real_change = changer g.break_portal = function(self) game.log("#VIOLET#The portal is broken!") self.broken = true - self.name = "broken naga invasion coral portal" + self.name = _t"broken naga invasion coral portal" self.change_level = nil self.autoexplore_ignore = true self.show_tooltip = false @@ -141,7 +141,7 @@ g.on_move = function(self, x, y, who, act, couldpass) game.log("#VIOLET#The portal is already broken!") return false end - require("engine.ui.Dialog"):yesnoPopup("Coral Portal", "Do you wish to enter the portal, destroy it, or ignore it (press escape)?", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Coral Portal", _t"Do you wish to enter the portal, destroy it, or ignore it (press escape)?", function(ret) if ret == "Quit" then game.log("#VIOLET#Ignoring the portal...") return @@ -151,7 +151,7 @@ g.on_move = function(self, x, y, who, act, couldpass) else self:break_portal() end - end, "Destroy", "Enter", false, "Quit") + end, _t"Destroy", _t"Enter", false, _t"Quit") return false end diff --git a/game/modules/tome/data/general/events/necrotic-air.lua b/game/modules/tome/data/general/events/necrotic-air.lua index 2769f45b1dcb666eb37fba5dbfdfc0f70b3e1610..a1619e587f4a21063355a3b7d0a79cc0ddbc1c0f 100644 --- a/game/modules/tome/data/general/events/necrotic-air.lua +++ b/game/modules/tome/data/general/events/necrotic-air.lua @@ -34,7 +34,7 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.on_stand = g.on_stand or on_stand if g.on_stand == on_stand and g.type == "floor" then - g.name = g.name .. " (necrotic air)" + g.name = ("%s (necrotic air)"):tformat(_t(g.name)) if not g.special_minimap then g.special_minimap = colors.DARK_SLATE_GRAY end end g.always_remember = true diff --git a/game/modules/tome/data/general/events/noxious-caldera.lua b/game/modules/tome/data/general/events/noxious-caldera.lua index 29a766c28e1930ade16dfc4ff085531d4ef73723..bf74c2b0a0623f9f05e424df9a566b08fc7e2e68 100644 --- a/game/modules/tome/data/general/events/noxious-caldera.lua +++ b/game/modules/tome/data/general/events/noxious-caldera.lua @@ -28,7 +28,7 @@ level.data.on_enter_list.noxious_caldera = function() game.level.data.noxious_caldera_added = true local g = game.level.map(spot.x, spot.y, engine.Map.TERRAIN):cloneFull() - g.name = "Way into a volcanic caldera" + g.name = _t"Way into a volcanic caldera" g.display='>' g.color_r=255 g.color_g=0 g.color_b=0 g.notice = true g.change_level=1 g.change_zone="noxious-caldera" g.glow=true g.add_displays = g.add_displays or {} @@ -37,7 +37,7 @@ level.data.on_enter_list.noxious_caldera = function() g:initGlow() game.zone:addEntity(game.level, g, "terrain", spot.x, spot.y) print("[WORLDMAP] noxious caldera at", spot.x, spot.y) - require("engine.ui.Dialog"):simplePopup("Ground is shaking", "You feel a tremor in the ground for a few seconds and it disappears...") + require("engine.ui.Dialog"):simplePopup(_t"Ground is shaking", _t"You feel a tremor in the ground for a few seconds and it disappears...") end return true diff --git a/game/modules/tome/data/general/events/old-battle-field.lua b/game/modules/tome/data/general/events/old-battle-field.lua index 2f1c2f074819a878b1174a6a0de6018ae475d0e0..cb0e7925232173afb235149f6b7b319104ea93bd 100644 --- a/game/modules/tome/data/general/events/old-battle-field.lua +++ b/game/modules/tome/data/general/events/old-battle-field.lua @@ -43,7 +43,7 @@ if tries < 100 then terrains.CAVE_LADDER_UP_WILDERNESS.change_level_shift_back = true terrains.CAVE_LADDER_UP_WILDERNESS.change_zone_auto_stairs = true terrains.CAVE_LADDER_UP_WILDERNESS.change_level = 1 - terrains.CAVE_LADDER_UP_WILDERNESS.name = "ramp up to "..game.zone.name + terrains.CAVE_LADDER_UP_WILDERNESS.name = ("ramp up to %s"):tformat(game.zone.name) terrains.CAVE_LADDER_UP_WILDERNESS.change_zone = game.zone.short_name terrains.CAVE_LADDER_UP_WILDERNESS.change_level_check = function(self, who) game.log("#VIOLET# The ramp crumbles as you climb it, followed by the collapse of the cavern.") @@ -51,7 +51,7 @@ if tries < 100 then return end local zone = mod.class.Zone.new(id, { - name = "Cavern beneath tombstones", + name = _t"Cavern beneath tombstones", level_range = game.zone.actor_adjust_level and {math.floor(game.zone:actor_adjust_level(game.level, game.player)*1.05), math.ceil(game.zone:actor_adjust_level(game.level, game.player)*1.15)} or {game.zone.base_level, game.zone.base_level}, -- 5-15% higher levels __applied_difficulty = true, -- Difficulty already applied to parent zone @@ -79,7 +79,7 @@ if tries < 100 then on_enter = function(lev) game.level.turn_counter = 101 * 10 game.level.max_turn_counter = 101 * 10 - game.level.turn_counter_desc = "Undead are rising from the ground! You must hold on!" + game.level.turn_counter_desc = _t"Undead are rising from the ground! You must hold on!" game.level.nb_pop = 1 end, on_turn = function(self) @@ -104,7 +104,7 @@ if tries < 100 then end world:gainAchievement("EVENT_OLDBATTLEFIELD", game:getPlayer(true)) - require("engine.ui.Dialog"):simpleLongPopup("Onslaught", "You have survived the onslaught of undead. You notice a way to climb up you had not seen before in a wall nearby.", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Onslaught", _t"You have survived the onslaught of undead. You notice a way to climb up you had not seen before in a wall nearby.", 400) elseif game.level.turn_counter % 50 == 0 then for i = 1, math.floor(game.level.nb_pop) do local spot = game.level:pickSpot{type="pop", subtype="undead"} @@ -127,7 +127,7 @@ if tries < 100 then local p = rng.tableRemove(grids) local g = game.level.map(p.x, p.y, engine.Map.TERRAIN):cloneFull() - g.name = "grave" g.x, g.y = p.x, p.y + g.name = _t"grave" g.x, g.y = p.x, p.y g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true g.always_remember = true g.special_minimap = colors.OLIVE_DRAB g:removeAllMOs() @@ -142,8 +142,8 @@ if tries < 100 then g.block_move = function(self, x, y, who, act, couldpass) if not who or not who.player or not act then return false end if game.level.event_battlefield_entered then return false end - who:runStop("grave") - require("engine.ui.Dialog"):yesnoPopup("Grave", "Do you wish to disturb the grave?", function(ret) if ret then + who:runStop(_t"grave") + require("engine.ui.Dialog"):yesnoPopup(_t"Grave", _t"Do you wish to disturb the grave?", function(ret) if ret then self:change_level_check() end end) return false @@ -157,11 +157,11 @@ if tries < 100 then local ov = self.add_displays[#self.add_displays] ov.image = "terrain/grave_opened_0"..rng.range(1, 3).."_64.png" end - self.name = "opened grave" + self.name = _t"opened grave" game.level.map:updateMap(self.x, self.y) game.level.event_battlefield_entered = true game:changeLevel(1, self.real_change(self.change_zone), {temporary_zone_shift=true, direct_switch=true}) - require("engine.ui.Dialog"):simplePopup("Fall...", "As you began digging up the grave, the ground collapsed beneath you. You fall into an eerily lit cavern.") + require("engine.ui.Dialog"):simplePopup(_t"Fall...", _t"As you began digging up the grave, the ground collapsed beneath you. You fall into an eerily lit cavern.") for i, gr in ipairs(self.graves) do gr.change_level_check = nil gr.change_level = nil diff --git a/game/modules/tome/data/general/events/protective-aura.lua b/game/modules/tome/data/general/events/protective-aura.lua index 84a3db87deb8c7860d4ef21e983f1b5b46b90887..54a06bf2356396fbf021848e90a2bd6e0529214b 100644 --- a/game/modules/tome/data/general/events/protective-aura.lua +++ b/game/modules/tome/data/general/events/protective-aura.lua @@ -34,7 +34,7 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.on_stand = g.on_stand or on_stand if g.on_stand == on_stand and g.type == "floor" then - g.name = g.name .. " (protective aura)" + g.name = ("%s (protective aura)"):tformat(_t(g.name)) if not g.special_minimap then g.special_minimap = colors.DARK_TAN end end g.always_remember = true diff --git a/game/modules/tome/data/general/events/rat-lich.lua b/game/modules/tome/data/general/events/rat-lich.lua index e5cd6011b4d344f9881cd64e43b114a42286211b..9ad3a1b190d34d4a45747f5be3e20958a0e95a97 100644 --- a/game/modules/tome/data/general/events/rat-lich.lua +++ b/game/modules/tome/data/general/events/rat-lich.lua @@ -33,7 +33,7 @@ local changer = function(id) local terrains = mod.class.Grid:loadList("/data/general/grids/basic.lua") terrains.UP_WILDERNESS.change_level_shift_back = true terrains.UP_WILDERNESS.change_zone_auto_stairs = true - terrains.UP_WILDERNESS.name = "way up to "..game.zone.name + terrains.UP_WILDERNESS.name = ("way up to %s"):tformat(game.zone.name) terrains.UP_WILDERNESS.change_zone = game.zone.short_name terrains.UP_WILDERNESS.change_level = 1 terrains.UP_WILDERNESS.change_level_check = function(self) @@ -47,14 +47,14 @@ local changer = function(id) unique = true, slot = "TOOL", type = "tool", subtype="skull", image = "object/artifact/skull_of_the_rat_lich.png", - unided_name = "dusty rat skull", - name = "Skull of the Rat Lich", + unided_name = _t"dusty rat skull", + name = _t"Skull of the Rat Lich", display = "*", color=colors.BLACK, level_range = {10, 25}, cost = 150, encumber = 1, material_level = 3, - desc = [[This ancient skull is all that remains of the Rat Lich. Some fragments of its power remain and a faint red light still glows within its eye sockets.]], + desc = _t[[This ancient skull is all that remains of the Rat Lich. Some fragments of its power remain and a faint red light still glows within its eye sockets.]], wielder = { combat_spellpower = 10, @@ -62,7 +62,7 @@ local changer = function(id) on_melee_hit = {[engine.DamageType.DARKNESS]=12}, }, max_power = 70, power_regen = 1, - use_power = { name = "raise one or two undead rats to fight beside you", power = 70, + use_power = { name = _t"raise one or two undead rats to fight beside you", power = 70, tactical = {ATTACK = 2}, use = function(self, who) if not who:canBe("summon") then game.logPlayer(who, "You cannot summon; you are suppressed!") return end @@ -70,7 +70,7 @@ local changer = function(id) local NPC = require "mod.class.NPC" local list = NPC:loadList("/data/general/npcs/undead-rat.lua") - game.logSeen(who, "%s raises %s %s, and a red light flashes from it's eye sockets!", who.name:capitalize(), who:his_her(), self:getName({do_color=true, no_add_name=true})) + game.logSeen(who, "%s raises %s %s, and a red light flashes from it's eye sockets!", who:getName():capitalize(), who:his_her(), self:getName({do_color=true, no_add_name=true})) for i = 1, 2 do -- Find space local x, y = util.findFreeGrid(who.x, who.y, 5, true, {[engine.Map.ACTOR]=true}) @@ -99,7 +99,7 @@ local changer = function(id) } local zone = mod.class.Zone.new(id, { - name = "Forsaken Crypt", + name = _t"Forsaken Crypt", level_range = game.zone.actor_adjust_level and {math.floor(game.zone:actor_adjust_level(game.level, game.player)*1.05), math.ceil(game.zone:actor_adjust_level(game.level, game.player)*1.15)} or {game.zone.base_level, game.zone.base_level}, -- 5-15% higher levels __applied_difficulty = true, --Difficulty already applied to parent zone @@ -149,9 +149,9 @@ local changer = function(id) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() -g.name = "stairway leading downwards" +g.name = _t"stairway leading downwards" g.always_remember = true -g.desc = [[Stairs seem to lead into some kind of crypt.]] +g.desc=_t[[Stairs seem to lead into some kind of crypt.]] g.show_tooltip = true g.display='>' g.color_r=0 g.color_g=0 g.color_b=255 g.notice = true g.change_level=1 g.change_zone=id g.glow=true @@ -165,11 +165,11 @@ g:initGlow() g.real_change = changer g.change_level_check = function(self) game:changeLevel(1, self.real_change(self.change_zone), {temporary_zone_shift=true, direct_switch=true}) - require("engine.ui.Dialog"):simplePopup("Forsaken Crypt", "You hear squeaks and the sounds of clicking bone echo around you... Pure death awaits. Flee!") + require("engine.ui.Dialog"):simplePopup(_t"Forsaken Crypt", _t"You hear squeaks and the sounds of clicking bone echo around you... Pure death awaits. Flee!") self.change_level_check = nil self.change_level = nil - self.name = "collapsed forsaken crypt" - self.desc = [[Stairs lead downwards into rubble.]] + self.name = _t"collapsed forsaken crypt" + self.desc=_t[[Stairs lead downwards into rubble.]] self.autoexplore_ignore = true self.special_minimap = colors.VIOLET return true diff --git a/game/modules/tome/data/general/events/slimey-pool.lua b/game/modules/tome/data/general/events/slimey-pool.lua index 9b7e4b51a6734095fb3f7a734753ed93fe877dba..aae99564b768dd8b4bc3eceebc08bf8bdf9cef57 100644 --- a/game/modules/tome/data/general/events/slimey-pool.lua +++ b/game/modules/tome/data/general/events/slimey-pool.lua @@ -29,7 +29,7 @@ local g = list.SLIME_FLOOR:clone() level.map(x, y, engine.Map.TERRAIN, g) game.nicer_tiles:updateAround(level, x, y) g = level.map(x, y, engine.Map.TERRAIN) -g.name = "slimey pool" +g.name = _t"slimey pool" g.on_stand = on_stand g.always_remember = true g.special_minimap = colors.OLIVE_DRAB g:altered() @@ -45,7 +45,7 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.on_stand = g.on_stand or on_stand if g.on_stand == on_stand and g.type == "floor" then - g.name = g.name .. " (slimey)" + g.name = ("%s (slimey)"):tformat(_t(g.name)) if not g.special_minimap then g.special_minimap = colors.DARK_SEA_GREEN end end g.always_remember = true diff --git a/game/modules/tome/data/general/events/sludgenest.lua b/game/modules/tome/data/general/events/sludgenest.lua index 20dfd827e440df5d34ce87986f4505e022a3648c..2d1258429062de4a14f81be98149ab18370ff332 100644 --- a/game/modules/tome/data/general/events/sludgenest.lua +++ b/game/modules/tome/data/general/events/sludgenest.lua @@ -28,7 +28,7 @@ level.data.on_enter_list.sludgenest = function() game.level.data.sludgenest_added = true local g = game.level.map(spot.x, spot.y, engine.Map.TERRAIN):cloneFull() - g.name = "Way into a strange lush forest" + g.name = _t"Way into a strange lush forest" g.display='>' g.color_r=100 g.color_g=255 g.color_b=0 g.notice = true g.change_level=1 g.change_zone="sludgenest" g.glow=true g.add_displays = g.add_displays or {} @@ -37,7 +37,7 @@ level.data.on_enter_list.sludgenest = function() g:initGlow() game.zone:addEntity(game.level, g, "terrain", spot.x, spot.y) print("[WORLDMAP] sludgenest at", spot.x, spot.y) - require("engine.ui.Dialog"):simpleLongPopup("Lush forest", "Suddenly it comes back to you. You remember long ago somebody told you about a strange lush forest in the cold icy wastes of the northland.", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Lush forest", _t"Suddenly it comes back to you. You remember long ago somebody told you about a strange lush forest in the cold icy wastes of the northland.", 400) end return true diff --git a/game/modules/tome/data/general/events/snowstorm.lua b/game/modules/tome/data/general/events/snowstorm.lua index 73a8a37a488f306e468bd7a8350b4c7a59408cb4..beebf576144d88febb104ded63e516b69aca05b6 100644 --- a/game/modules/tome/data/general/events/snowstorm.lua +++ b/game/modules/tome/data/general/events/snowstorm.lua @@ -45,6 +45,6 @@ game.zone.on_turn = function() end -require("engine.ui.Dialog"):simplePopup("Snowstorm", "As you walk into the area you notice a huge snowstorm over your head. Beware!") +require("engine.ui.Dialog"):simplePopup(_t"Snowstorm", _t"As you walk into the area you notice a huge snowstorm over your head. Beware!") return true diff --git a/game/modules/tome/data/general/events/spellblaze-scar.lua b/game/modules/tome/data/general/events/spellblaze-scar.lua index 8d30f1b95aea9531a567bb9da69ddfa9ee17753f..8068e6e15a05763863cd726a9f8ad1c8d7b74872 100644 --- a/game/modules/tome/data/general/events/spellblaze-scar.lua +++ b/game/modules/tome/data/general/events/spellblaze-scar.lua @@ -29,7 +29,7 @@ game.nicer_tiles:updateAround(level, x, y) g = level.map(x, y, engine.Map.TERRAIN) g.on_stand = on_stand g.always_remember = true g.special_minimap = colors.DARK_RED -g.name = "spellblaze scar" +g.name = _t"spellblaze scar" g:altered() if core.shader.active(4) then @@ -43,7 +43,7 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.on_stand = g.on_stand or on_stand if g.on_stand == on_stand and g.type == "floor" then - g.name = g.name .. " (spellblaze aura)" + g.name = ("%s (spellblaze aura)"):tformat(_t(g.name)) if not g.special_minimap then g.special_minimap = colors.VERY_DARK_RED end end g.always_remember = true diff --git a/game/modules/tome/data/general/events/sub-vault.lua b/game/modules/tome/data/general/events/sub-vault.lua index 0c76a53ddf53ab3abac11b61fe69ccfb3cf83194..80dc36a545533b272edb630c4492394d21ca59d4 100644 --- a/game/modules/tome/data/general/events/sub-vault.lua +++ b/game/modules/tome/data/general/events/sub-vault.lua @@ -46,7 +46,7 @@ local changer = function(id) grid_list.UP_SUB_VAULT_BACK.change_level_shift_back = true grid_list.UP_SUB_VAULT_BACK.change_zone_auto_stairs = true - grid_list.UP_SUB_VAULT_BACK.name = "way up ("..game.zone.name..")" + grid_list.UP_SUB_VAULT_BACK.name = ("way up (%s)"):tformat(game.zone.name) grid_list.UP_SUB_VAULT_BACK.change_level_check = function(self) if not self.change_level then game.log("#VIOLET# The stairway collapses completely as you ascend!") @@ -65,7 +65,7 @@ local changer = function(id) basemap.required_rooms = nil local zone = mod.class.Zone.new(id, { - name = "Hidden Vault - "..(game.old_zone_name or "???"), + name = ("Hidden Vault - %s"):tformat(game.old_zone_name or "???"), level_range = {game.zone:level_adjust_level(game.level, game.zone, "actor"), game.zone:level_adjust_level(game.level, game.zone, "actor")}, level_scheme = "player", max_level = 1, @@ -112,9 +112,9 @@ local changer = function(id) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() -g.name = "hidden vault" +g.name = _t"hidden vault" g.always_remember = true -g.desc = [[Crumbling stairs lead down to something.]] +g.desc = _t[[Crumbling stairs lead down to something.]] g.show_tooltip = true g.display='>' g.color_r=0 g.color_g=0 g.color_b=255 g.notice = true g.special_minimap = colors.VIOLET @@ -130,14 +130,14 @@ g:initGlow() g.real_change = changer g.change_level_check = function(self) -- limit stair scumming self._use_count = self._use_count - 1 - self.name = "collapsing hidden vault" + self.name = _t"collapsing hidden vault" if self._use_count < 1 then self.change_level_check = nil self.change_level = nil - self.name = "collapsed hidden vault" - self.desc = [[A collapsed stairway, leading down]] + self.name = _t"collapsed hidden vault" + self.desc = _t[[A collapsed stairway, leading down]] elseif self._use_count < 2 then - self.name = "nearly collapsed hidden vault" + self.name = _t"nearly collapsed hidden vault" end game:changeLevel(1, self.real_change(self.change_zone), {temporary_zone_shift=true, direct_switch=true}) return true diff --git a/game/modules/tome/data/general/events/thunderstorm.lua b/game/modules/tome/data/general/events/thunderstorm.lua index 070ffb1c04b5e98b13848894c61b63ae18d88c91..7f3d1d65702f20f88e2bcdafbaa388f0159faedb 100644 --- a/game/modules/tome/data/general/events/thunderstorm.lua +++ b/game/modules/tome/data/general/events/thunderstorm.lua @@ -64,6 +64,6 @@ end game.level.effects = {"EFF_ZONE_AURA_THUNDERSTORM"}, -require("engine.ui.Dialog"):simplePopup("Thunderstorm", "As you walk into the area you notice a huge thunderstorm over your head. Beware!") +require("engine.ui.Dialog"):simplePopup(_t"Thunderstorm", _t"As you walk into the area you notice a huge thunderstorm over your head. Beware!") return true diff --git a/game/modules/tome/data/general/events/tombstones.lua b/game/modules/tome/data/general/events/tombstones.lua index 24fd562a4192733d6483145cd377f1f7ac1287bf..9601675c6ce4ce3a7c476b8c666227eb9e69b896 100644 --- a/game/modules/tome/data/general/events/tombstones.lua +++ b/game/modules/tome/data/general/events/tombstones.lua @@ -29,7 +29,7 @@ while not game.state:canEventGrid(level, x, y) and tries < 100 do end if tries < 100 then local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() - g.name = "grave" + g.name = _t"grave" g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true g.always_remember = true g.special_minimap = colors.OLIVE_DRAB g:removeAllMOs() @@ -42,15 +42,15 @@ if tries < 100 then g.grow = nil g.dig = nil g.block_move = function(self, x, y, who, act, couldpass) if not who or not who.player or not act then return false end - who:runStop("grave") - require("engine.ui.Dialog"):yesnoPopup("Grave", "Do you wish to disturb the grave?", function(ret) if ret then + who:runStop(_t"grave") + require("engine.ui.Dialog"):yesnoPopup(_t"Grave", _t"Do you wish to disturb the grave?", function(ret) if ret then local g = game.level.map(x, y, engine.Map.TERRAIN) g:removeAllMOs() if g.add_displays then local ov = g.add_displays[#g.add_displays] ov.image = "terrain/grave_opened_0"..rng.range(1, 3).."_64.png" end - g.name = "grave (opened)" + g.name = _t"grave (opened)" game.level.map:updateMap(x, y) self.block_move = nil diff --git a/game/modules/tome/data/general/events/weird-pedestals.lua b/game/modules/tome/data/general/events/weird-pedestals.lua index 4521ad8e610940adab66505716b3cb62ae99c4f7..bd62615071bab76143e577b7893fa76ffa8adb54 100644 --- a/game/modules/tome/data/general/events/weird-pedestals.lua +++ b/game/modules/tome/data/general/events/weird-pedestals.lua @@ -42,7 +42,7 @@ for i = 1, 3 do local i, j = gr.x, gr.y local g = game.level.map(i, j, engine.Map.TERRAIN):cloneFull() - g.name = "weird pedestal" + g.name = _t"weird pedestal" g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true g.always_remember = true g.special_minimap = colors.OLIVE_DRAB g:removeAllMOs() @@ -57,15 +57,15 @@ for i = 1, 3 do g.special = true g.block_move = function(self, x, y, who, act, couldpass) if not who or not who.player or not act then return false end - who:runStop("weird pedestal") + who:runStop(_t"weird pedestal") if self.pedestal_activated then return false end - require("engine.ui.Dialog"):yesnoPopup("Weird Pedestal", "Do you wish to inspect the pedestal?", function(ret) if ret then - who:restInit(20, "inspecting", "inspected", function(cnt, max) + require("engine.ui.Dialog"):yesnoPopup(_t"Weird Pedestal", _t"Do you wish to inspect the pedestal?", function(ret) if ret then + who:restInit(20, _t"inspecting", _t"inspected", function(cnt, max) if cnt > max then self.pedestal_activated = true self.block_move = nil self.autoexplore_ignore = true - require("engine.ui.Dialog"):simplePopup("Weird Pedestal", "As you inspect it a shadow materializes near you, and suddenly it is no more a shadow!") + require("engine.ui.Dialog"):simplePopup(_t"Weird Pedestal", _t"As you inspect it a shadow materializes near you, and suddenly it is no more a shadow!") local m = game.zone:makeEntity(game.level, "actor", { base_list=mod.class.NPC:loadList("/data/general/npcs/humanoid_random_boss.lua"), @@ -77,13 +77,13 @@ for i = 1, 3 do loot_quality = "store", loot_quantity = 1, no_loot_randart = true, - name_scheme = "#rng# the Invoker", + name_scheme = _t"#rng# the Invoker", }}, nil, true) local i, j = util.findFreeGrid(x, y, 5, true, {[engine.Map.ACTOR]=true}) if i then game.level.map:particleEmitter(i, j, 1, "teleport") game.zone:addEntity(game.level, m, "actor", i, j) - m.emote_random = {chance=30, "He shall come!", "You are dooooommmed!!", "He will consume all!", "My life for His!", "Die intruder!"} + m.emote_random = {chance=30, _t"He shall come!", _t"You are dooooommmed!!", _t"He will consume all!", _t"My life for His!", _t"Die intruder!"} m.pedestal_x = self.x m.pedestal_y = self.y m.on_die = function(self) @@ -93,10 +93,10 @@ for i = 1, 3 do local ov = g.add_displays[#g.add_displays] ov.image = "terrain/pedestal_orb_0"..rng.range(1, 5)..".png" end - g.name = "weird pedestal (glowing)" + g.name = _t"weird pedestal (glowing)" game.level.map:updateMap(self.pedestal_x, self.pedestal_y) game.level.pedestal_events = (game.level.pedestal_events or 0) + 1 - game.logSeen(self, "%s's soul is absorbed by the pedestal. A glowing orb appears.", self.name:capitalize()) + game.logSeen(self, "%s's soul is absorbed by the pedestal. A glowing orb appears.", self:getName():capitalize()) if game.level.pedestal_events >= 3 then game.level.pedestal_events = 0 @@ -109,7 +109,7 @@ for i = 1, 3 do life_rating=function(v) return v * 2 + 5 end, loot_quantity = 0, no_loot_randart = true, - name_scheme = "#rng# the Bringer of Doom", + name_scheme = _t"#rng# the Bringer of Doom", on_die = function(self) world:gainAchievement("EVENT_PEDESTALS", game:getPlayer(true)) end, }}, nil, true) @@ -125,7 +125,7 @@ for i = 1, 3 do game.zone:addEntity(game.level, o, "object") m:addObject(m.INVEN_INVEN, o) end - require("engine.ui.Dialog"):simplePopup("Weird Pedestal", "You hear a terrible voice saying 'Their lives are mine! I am coming!'") + require("engine.ui.Dialog"):simplePopup(_t"Weird Pedestal", _t"You hear a terrible voice saying 'Their lives are mine! I am coming!'") end end end diff --git a/game/modules/tome/data/general/events/whistling-vortex.lua b/game/modules/tome/data/general/events/whistling-vortex.lua index 92de7a0e4c971ea0b3e8af3b4497a7ec9b761e91..b63760747c8fd4f3070b1b36376b05eba3917830 100644 --- a/game/modules/tome/data/general/events/whistling-vortex.lua +++ b/game/modules/tome/data/general/events/whistling-vortex.lua @@ -30,7 +30,7 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.on_stand = g.on_stand or on_stand if g.on_stand == on_stand and g.type == "floor" then - g.name = g.name .. " (whistling vortex)" + g.name = ("%s (whistling vortex)"):tformat(_t(g.name)) if not g.special_minimap then g.special_minimap = colors.DARK_SLATE_GRAY end end g.always_remember = true diff --git a/game/modules/tome/data/general/grids/basic.lua b/game/modules/tome/data/general/grids/basic.lua index efd12e41afce78838b8d6cd27c56241d4425ce27..e943ac86d20ca3cb6a4627238267276989fe8710 100644 --- a/game/modules/tome/data/general/grids/basic.lua +++ b/game/modules/tome/data/general/grids/basic.lua @@ -253,7 +253,7 @@ newEntity{ block_sense = true, block_esp = true, is_door = true, - door_player_check = "This door seems to have been sealed off. You think you can open it.", + door_player_check = _t"This door seems to have been sealed off. You think you can open it.", door_opened = "DOOR_OPEN", } newEntity{ base = "DOOR_VAULT", define_as = "DOOR_VAULT_HORIZ", z=3, image = "terrain/granite_door1.png", add_displays = {class.new{image="terrain/granite_wall3.png", z=18, display_y=-1}}, door_opened = "DOOR_HORIZ_OPEN"} @@ -368,7 +368,7 @@ newEntity{ block_esp = true, force_clone = true, special = true, - door_player_stop = "This door seems to have been sealed off. You need to find a way to open it.", + door_player_stop = _t"This door seems to have been sealed off. You need to find a way to open it.", is_door = true, door_opened = "GENERIC_LEVER_DOOR_OPEN", on_lever_change = function(self, x, y, who, val, oldval) @@ -394,7 +394,7 @@ newEntity{ is_door = true, special = true, door_closed = "GENERIC_LEVER_DOOR", - door_player_stop = "This door seems to have been sealed off. You need to find a way to close it.", + door_player_stop = _t"This door seems to have been sealed off. You need to find a way to close it.", on_lever_change = function(self, x, y, who, val, oldval) local toggle = game.level.map.attrs(x, y, "lever_toggle") local trigger = game.level.map.attrs(x, y, "lever_action") or 1 diff --git a/game/modules/tome/data/general/grids/bone.lua b/game/modules/tome/data/general/grids/bone.lua index 730f5225f892e4bed90f39a3f28c0e6ad93fdb5b..53d0b8856fcd979ad091181927df19c4a02b2d8b 100644 --- a/game/modules/tome/data/general/grids/bone.lua +++ b/game/modules/tome/data/general/grids/bone.lua @@ -105,7 +105,7 @@ newEntity{ block_sense = true, block_esp = true, is_door = true, - door_player_check = "This door seems to have been sealed off. You think you can open it.", + door_player_check = _t"This door seems to have been sealed off. You think you can open it.", door_opened = "BONE_VAULT_DOOR_OPEN", dig = "BONEFLOOR", } @@ -138,7 +138,7 @@ newEntity{ block_sense = true, block_esp = true, force_clone = true, - door_player_stop = "This door seems to have been sealed off. You need to find a way to open it.", + door_player_stop = _t"This door seems to have been sealed off. You need to find a way to open it.", is_door = true, door_opened = "BONE_GENERIC_LEVER_DOOR_OPEN", on_lever_change = function(self, x, y, who, val, oldval) @@ -163,7 +163,7 @@ newEntity{ always_remember = true, is_door = true, door_closed = "BONE_GENERIC_LEVER_DOOR", - door_player_stop = "This door seems to have been sealed off. You need to find a way to close it.", + door_player_stop = _t"This door seems to have been sealed off. You need to find a way to close it.", on_lever_change = function(self, x, y, who, val, oldval) local toggle = game.level.map.attrs(x, y, "lever_toggle") local trigger = game.level.map.attrs(x, y, "lever_action") diff --git a/game/modules/tome/data/general/grids/cave.lua b/game/modules/tome/data/general/grids/cave.lua index 1484c4c0e82652bae50d77f3bd2ccc97ece851bb..e51b7e29f6c750a9d6401a14e4833de7fb728be1 100644 --- a/game/modules/tome/data/general/grids/cave.lua +++ b/game/modules/tome/data/general/grids/cave.lua @@ -77,7 +77,7 @@ newEntity{ block_sight = true, block_sense = true, block_esp = true, - door_player_check = "This rock is loose, you think you can move it away.", + door_player_check = _t"This rock is loose, you think you can move it away.", door_opened = "CAVEFLOOR", dig = "CAVEFLOOR", } diff --git a/game/modules/tome/data/general/grids/forest.lua b/game/modules/tome/data/general/grids/forest.lua index 8acd846d919b88634ab532a41fdd289dcb205634..934924d88f79cb13d5aa1491cbf6003b36a79fdf 100644 --- a/game/modules/tome/data/general/grids/forest.lua +++ b/game/modules/tome/data/general/grids/forest.lua @@ -116,7 +116,7 @@ newEntity{ block_sense = true, block_esp = true, is_door = true, - door_player_check = "This rock is loose, you think you can move it away.", + door_player_check = _t"This rock is loose, you think you can move it away.", door_opened = "GRASS", dig = "GRASS", nice_editer = grass_editer, diff --git a/game/modules/tome/data/general/grids/fortress.lua b/game/modules/tome/data/general/grids/fortress.lua index d3b674352acdfe93e35286c7304704a046dd98ec..5c565324418a5b67b1e8afcad8b6da3f161724ce 100644 --- a/game/modules/tome/data/general/grids/fortress.lua +++ b/game/modules/tome/data/general/grids/fortress.lua @@ -94,7 +94,7 @@ newEntity{ block_sight = true, block_sense = true, block_esp = true, - door_player_stop = "This door seems to be sealed.", + door_player_stop = _t"This door seems to be sealed.", is_door = true, door_sound = "ambient/door_creaks/scifi_door", door_opened = "SOLID_DOOR_OPEN", diff --git a/game/modules/tome/data/general/grids/gothic.lua b/game/modules/tome/data/general/grids/gothic.lua index 751646c40da54cd866313f331e55610a6e537ccf..9a666227531d210079fea7b9cd5a036533b6990d 100644 --- a/game/modules/tome/data/general/grids/gothic.lua +++ b/game/modules/tome/data/general/grids/gothic.lua @@ -253,7 +253,7 @@ newEntity{ block_sense = true, block_esp = true, is_door = true, - door_player_check = "This door seems to have been sealed off. You think you can open it.", + door_player_check = _t"This door seems to have been sealed off. You think you can open it.", door_opened = "GOTHIC_DOOR_OPEN", } newEntity{ base = "GOTHIC_DOOR_VAULT", define_as = "GOTHIC_DOOR_VAULT_HORIZ", z=3, image = "terrain/gothic_walls/granite_door1.png", add_displays = {class.new{image="terrain/gothic_walls/granite_wall3.png", z=18, display_y=-1}}, door_opened = "GOTHIC_DOOR_HORIZ_OPEN"} @@ -274,7 +274,7 @@ newEntity{ block_sense = true, block_esp = true, force_clone = true, - door_player_stop = "This door seems to have been sealed off. You need to find a way to open it.", + door_player_stop = _t"This door seems to have been sealed off. You need to find a way to open it.", is_door = true, special = true, door_opened = "GOTHIC_GENERIC_LEVER_DOOR_OPEN", @@ -301,7 +301,7 @@ newEntity{ is_door = true, special = true, door_closed = "GOTHIC_GENERIC_LEVER_DOOR", - door_player_stop = "This door seems to have been sealed off. You need to find a way to close it.", + door_player_stop = _t"This door seems to have been sealed off. You need to find a way to close it.", on_lever_change = function(self, x, y, who, val, oldval) local toggle = game.level.map.attrs(x, y, "lever_toggle") local trigger = game.level.map.attrs(x, y, "lever_action") or 1 diff --git a/game/modules/tome/data/general/grids/sand.lua b/game/modules/tome/data/general/grids/sand.lua index 427499f06146fd8e3e7dba9e97cfc41e1694ec15..5d48b77d4d0c870c45cebc913052cae82d57140e 100644 --- a/game/modules/tome/data/general/grids/sand.lua +++ b/game/modules/tome/data/general/grids/sand.lua @@ -52,9 +52,9 @@ newEntity{ -- Dig only makes unstable tunnels dig = function(src, x, y, old) local sand = require("engine.Object").new{ - name = "unstable sand tunnel", image = "terrain/sand.png", + name = _t"unstable sand tunnel", image = "terrain/sand.png", show_tooltip = true, - desc = [[Loose sand is steadily filling this void, which could collapse suddenly and completely.]], + desc=_t[[Loose sand is steadily filling this void, which could collapse suddenly and completely.]], display = '.', color={r=203,g=189,b=72}, back_color={r=93,g=79,b=22}, canAct = false, act = function(self) @@ -69,7 +69,7 @@ newEntity{ local a = game.level.map(self.x, self.y, engine.Map.ACTOR) if a and not a:attr("sand_dweller") then game.logPlayer(a, "You are crushed by the collapsing tunnel! You suffocate!") - a:suffocate(30, self, "was buried alive") + a:suffocate(30, self, _t"was buried alive") engine.DamageType:get(engine.DamageType.PHYSICAL).projector(self, self.x, self.y, engine.DamageType.PHYSICAL, a.life / 2) end end diff --git a/game/modules/tome/data/general/grids/slimy_walls.lua b/game/modules/tome/data/general/grids/slimy_walls.lua index 0126fa70ec0bfa59bac108de225ea51450fd94ff..5beb25f0765fbdd1d4541d735bc37e72f268d191 100644 --- a/game/modules/tome/data/general/grids/slimy_walls.lua +++ b/game/modules/tome/data/general/grids/slimy_walls.lua @@ -253,7 +253,7 @@ newEntity{ block_sense = true, block_esp = true, is_door = true, - door_player_check = "This door seems to have been sealed off. You think you can open it.", + door_player_check = _t"This door seems to have been sealed off. You think you can open it.", door_opened = "SLIMED_DOOR_OPEN", } newEntity{ base = "SLIMED_DOOR_VAULT", define_as = "SLIMED_DOOR_VAULT_HORIZ", z=3, image = "terrain/slimed_walls/granite_door1.png", add_displays = {class.new{image="terrain/slimed_walls/granite_wall3.png", z=18, display_y=-1}}, door_opened = "SLIMED_DOOR_HORIZ_OPEN"} @@ -274,7 +274,7 @@ newEntity{ block_sense = true, block_esp = true, force_clone = true, - door_player_stop = "This door seems to have been sealed off. You need to find a way to open it.", + door_player_stop = _t"This door seems to have been sealed off. You need to find a way to open it.", is_door = true, special = true, door_opened = "SLIMED_GENERIC_LEVER_DOOR_OPEN", @@ -301,7 +301,7 @@ newEntity{ is_door = true, special = true, door_closed = "SLIMED_GENERIC_LEVER_DOOR", - door_player_stop = "This door seems to have been sealed off. You need to find a way to close it.", + door_player_stop = _t"This door seems to have been sealed off. You need to find a way to close it.", on_lever_change = function(self, x, y, who, val, oldval) local toggle = game.level.map.attrs(x, y, "lever_toggle") local trigger = game.level.map.attrs(x, y, "lever_action") or 1 diff --git a/game/modules/tome/data/general/grids/underground_dreamy.lua b/game/modules/tome/data/general/grids/underground_dreamy.lua index 2ab59d995e0a54bab5d7c4d1cc78e795d67cdfc0..e49e205bb3528b73deeec6de6ec2e49836b98757 100644 --- a/game/modules/tome/data/general/grids/underground_dreamy.lua +++ b/game/modules/tome/data/general/grids/underground_dreamy.lua @@ -108,7 +108,7 @@ newEntity{ block_sense = true, block_esp = true, is_door = true, - door_player_check = "This rock is loose, you think you can move it away.", + door_player_check = _t"This rock is loose, you think you can move it away.", door_opened = "UNDERGROUND_FLOOR", } diff --git a/game/modules/tome/data/general/grids/underground_gloomy.lua b/game/modules/tome/data/general/grids/underground_gloomy.lua index 3ec2a0ad33473ce20ec76b4d05fbfc81f7b14c00..9cc5c51cd5223b8aae34c205e77156655d1c04a3 100644 --- a/game/modules/tome/data/general/grids/underground_gloomy.lua +++ b/game/modules/tome/data/general/grids/underground_gloomy.lua @@ -104,7 +104,7 @@ newEntity{ block_sense = true, block_esp = true, is_door = true, - door_player_check = "This rock is loose, you think you can move it away.", + door_player_check = _t"This rock is loose, you think you can move it away.", door_opened = "UNDERGROUND_FLOOR", } diff --git a/game/modules/tome/data/general/grids/underground_slimy.lua b/game/modules/tome/data/general/grids/underground_slimy.lua index ecb8297e775e4726f9313fe445b580dc33fb9d9e..1ec1cefac684f397b77575bff102cfa1e271dbfc 100644 --- a/game/modules/tome/data/general/grids/underground_slimy.lua +++ b/game/modules/tome/data/general/grids/underground_slimy.lua @@ -105,7 +105,7 @@ newEntity{ block_sense = true, block_esp = true, is_door = true, - door_player_check = "This rock is loose, you think you can move it away.", + door_player_check = _t"This rock is loose, you think you can move it away.", door_opened = "UNDERGROUND_FLOOR", } diff --git a/game/modules/tome/data/general/grids/water.lua b/game/modules/tome/data/general/grids/water.lua index cf7a4931bf9d34a62574f6d87093bc773e3c3e2d..403e84f25e4d3de567788f80de5bd9873d1d45fc 100644 --- a/game/modules/tome/data/general/grids/water.lua +++ b/game/modules/tome/data/general/grids/water.lua @@ -99,7 +99,7 @@ newEntity{ define_as = "WATER_FLOOR_BUBBLE", type = "floor", subtype = "water", name = "underwater air bubble", image = "terrain/underwater/subsea_floor_bubbles.png", - desc = "#LIGHT_BLUE#Replenishes air level when standing inside.#LAST#", show_tooltip = true, + desc = _t"#LIGHT_BLUE#Replenishes air level when standing inside.#LAST#", show_tooltip = true, display = ':', color=colors.LIGHT_BLUE, back_color=colors.DARK_BLUE, air_level = 15, nb_charges = resolvers.rngrange(4, 7), force_clone = true, diff --git a/game/modules/tome/data/general/npcs/ant.lua b/game/modules/tome/data/general/npcs/ant.lua index 118065785741869265a7239396e9d3160b37c118..08abf62dd3a047ee3d88bd19150534c4c4af2ef3 100644 --- a/game/modules/tome/data/general/npcs/ant.lua +++ b/game/modules/tome/data/general/npcs/ant.lua @@ -44,7 +44,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ANT", name = "giant white ant", color=colors.WHITE, image="npc/white_ant.png", - desc = "It's a large white ant.", + desc = _t"It's a large white ant.", level_range = {1, 15}, exp_worth = 1, rarity = 1, global_speed_base = 1.1, @@ -52,7 +52,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant brown ant", color=colors.UMBER, image="npc/brown_ant.png", - desc = "It's a large brown ant.", + desc = _t"It's a large brown ant.", level_range = {1, 15}, exp_worth = 1, rarity = 1, global_speed_base = 0.9, @@ -61,7 +61,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant carpenter ant", color=colors.BLACK, image="npc/carpenter_ant.png", - desc = "It's a large black ant with huge mandibles.", + desc = _t"It's a large black ant with huge mandibles.", level_range = {2, 25}, exp_worth = 1, rarity = 1, combat = { dam=6 }, @@ -70,7 +70,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant green ant", color=colors.GREEN, image="npc/green_ant.png", - desc = "It's a large green ant.", + desc = _t"It's a large green ant.", level_range = {5, nil}, exp_worth = 1, rarity = 1, combat = { DamageType.POISON }, @@ -82,7 +82,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant red ant", color=colors.RED, image="npc/red_ant.png", - desc = "It's a large red ant.", + desc = _t"It's a large red ant.", level_range = {5, nil}, exp_worth = 1, rarity = 1, combat = { damtype=DamageType.FIRE }, @@ -94,7 +94,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant blue ant", color=colors.BLUE, image="npc/blue_ant.png", - desc = "It's a large blue ant.", + desc = _t"It's a large blue ant.", level_range = {5, nil}, exp_worth = 1, rarity = 1, combat = { damtype=DamageType.COLD }, @@ -106,7 +106,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant yellow ant", color=colors.YELLOW, image="npc/yellow_ant.png", - desc = "It's a large yellow ant.", + desc = _t"It's a large yellow ant.", level_range = {5, nil}, exp_worth = 1, rarity = 1, combat = { damtype=DamageType.LIGHTNING }, @@ -118,7 +118,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant black ant", color=colors.BLACK, image="npc/black_ant.png", - desc = "It's a large black ant.", + desc = _t"It's a large black ant.", level_range = {5, nil}, exp_worth = 1, rarity = 1, combat = { damtype=DamageType.ACID }, @@ -130,7 +130,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant fire ant", color=colors.RED, image="npc/fire_ant.png", - desc = "It's a large red ant, wreathed in flames.", + desc = _t"It's a large red ant, wreathed in flames.", level_range = {15, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(20,40), @@ -146,7 +146,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant ice ant", color=colors.WHITE, image="npc/ice_ant.png", - desc = "It's a large white ant. The air is frigid around it.", + desc = _t"It's a large white ant. The air is frigid around it.", level_range = {15, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(20,40), @@ -163,7 +163,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant lightning ant", color=colors.YELLOW, image="npc/lightning_ant.png", - desc = "It's a large yellow ant with sparks arcing across its body.", + desc = _t"It's a large yellow ant with sparks arcing across its body.", level_range = {15, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(20,40), @@ -179,7 +179,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant acid ant", color=colors.DARK_GREY, image="npc/acid_ant.png", - desc = "It's a large black ant. Its porous skin oozes acid.", + desc = _t"It's a large black ant. Its porous skin oozes acid.", level_range = {15, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(20,40), @@ -195,7 +195,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "giant army ant", color=colors.ORANGE, image="npc/army_ant.png", - desc = "It's a large ant with a heavy exoskeleton, geared for war.", + desc = _t"It's a large ant with a heavy exoskeleton, geared for war.", level_range = {18, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(50,60), @@ -209,7 +209,7 @@ newEntity{ base = "BASE_NPC_ANT", newEntity{ base = "BASE_NPC_ANT", name = "Queen Ant", color=colors.VIOLET, unique=true, female = 1, - desc = "Queen of the ants, queen of the biting death!", + desc = _t"Queen of the ants, queen of the biting death!", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/insect_ant_queen_ant.png", display_h=2, display_y=-1}}}, level_range = {25, nil}, exp_worth = 2, rank = 3.5, diff --git a/game/modules/tome/data/general/npcs/aquatic_critter.lua b/game/modules/tome/data/general/npcs/aquatic_critter.lua index 64c469641423acad561c989d38133c438ea2c537..2b9a301b353263e69a7bb8fe6dd4169fc0fcd09f 100644 --- a/game/modules/tome/data/general/npcs/aquatic_critter.lua +++ b/game/modules/tome/data/general/npcs/aquatic_critter.lua @@ -43,14 +43,14 @@ newEntity{ newEntity{ base = "BASE_NPC_AQUATIC_CRITTER", name = "giant eel", color=colors.CADET_BLUE, - desc = "A snake-like being, moving toward you.", + desc = _t"A snake-like being, moving toward you.", level_range = {1, nil}, exp_worth = 1, rarity = 1, } newEntity{ base = "BASE_NPC_AQUATIC_CRITTER", name = "electric eel", color=colors.STEEL_BLUE, - desc = "A snake-like being, radiating electricity.", + desc = _t"A snake-like being, radiating electricity.", level_range = {1, nil}, exp_worth = 1, rarity = 4, autolevel = "warriormage", @@ -65,7 +65,7 @@ newEntity{ base = "BASE_NPC_AQUATIC_CRITTER", newEntity{ base = "BASE_NPC_AQUATIC_CRITTER", name = "dragon turtle", color=colors.DARK_SEA_GREEN, - desc = "A huge, elongated sea-green reptile.", + desc = _t"A huge, elongated sea-green reptile.", level_range = {1, nil}, exp_worth = 1, rarity = 5, rank = 2, @@ -75,7 +75,7 @@ newEntity{ base = "BASE_NPC_AQUATIC_CRITTER", newEntity{ base = "BASE_NPC_AQUATIC_CRITTER", name = "ancient dragon turtle", color=colors.DARK_SEA_GREEN, - desc = "A huge, elongated sea-green reptile, it looks old and impenetrable.", + desc = _t"A huge, elongated sea-green reptile, it looks old and impenetrable.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/aquatic_critter_ancient_dragon_turtle.png", display_h=2, display_y=-1}}}, level_range = {20, nil}, exp_worth = 1, rarity = 10, @@ -89,7 +89,7 @@ newEntity{ base = "BASE_NPC_AQUATIC_CRITTER", newEntity{ base = "BASE_NPC_AQUATIC_CRITTER", name = "squid", color=colors.TEAL, - desc = "Darting its many tentacles toward you, it tries to lock you down.", + desc = _t"Darting its many tentacles toward you, it tries to lock you down.", level_range = {1, nil}, exp_worth = 1, rarity = 1, resolvers.talents{ [Talents.T_GRAB]=3, }, @@ -98,7 +98,7 @@ newEntity{ base = "BASE_NPC_AQUATIC_CRITTER", newEntity{ base = "BASE_NPC_AQUATIC_CRITTER", name = "ink squid", color=colors.LIGHT_STEEL_BLUE, - desc = "Darting its many tentacles toward you, it tries to blind you with its murky ink.", + desc = _t"Darting its many tentacles toward you, it tries to blind you with its murky ink.", level_range = {1, nil}, exp_worth = 1, rarity = 2, stats = { mag=30, }, diff --git a/game/modules/tome/data/general/npcs/aquatic_demon.lua b/game/modules/tome/data/general/npcs/aquatic_demon.lua index 1fa84af4f6af5ff19f6bd1ef3b428d9d6193bb1f..646237e86fc0026b77428b6cdb5e947ffbec5375 100644 --- a/game/modules/tome/data/general/npcs/aquatic_demon.lua +++ b/game/modules/tome/data/general/npcs/aquatic_demon.lua @@ -44,7 +44,7 @@ newEntity{ newEntity{ base = "BASE_NPC_AQUATIC_DEMON", name = "water imp", color=colors.YELLOW_GREEN, display = "u", - desc = "A small water demon, lobbing spells at you.", + desc = _t"A small water demon, lobbing spells at you.", level_range = {10, nil}, exp_worth = 1, rarity = 1, rank = 2, @@ -60,7 +60,7 @@ newEntity{ base = "BASE_NPC_AQUATIC_DEMON", newEntity{ base = "BASE_NPC_AQUATIC_DEMON", name = "Walrog", color=colors.DARK_SEA_GREEN, unique=true, - desc = "Walrog, the lord of Water, is fearsome to behold. The water writhes around him as if trying to escape, making his form indistinct. He does not seem surprised to see you.", + desc = _t"Walrog, the lord of Water, is fearsome to behold. The water writhes around him as if trying to escape, making his form indistinct. He does not seem surprised to see you.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/aquatic_demon_walrog.png", display_h=2, display_y=-1}}}, level_range = {20, 30}, exp_worth = 1, rarity = 50, diff --git a/game/modules/tome/data/general/npcs/bear.lua b/game/modules/tome/data/general/npcs/bear.lua index 0ec72e976b08b43298f5d9d914ea0b0bb37ec432..e285ca42c77a5ef9d61a82a3ae5e5252647db5ac 100644 --- a/game/modules/tome/data/general/npcs/bear.lua +++ b/game/modules/tome/data/general/npcs/bear.lua @@ -51,7 +51,7 @@ newEntity{ newEntity{ base = "BASE_NPC_BEAR", name = "brown bear", color=colors.UMBER, image = "npc/brown_bear.png", - desc = [[The weakest of bears, covered in brown shaggy fur.]], + desc = _t[[The weakest of bears, covered in brown shaggy fur.]], level_range = {5, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(80,90), @@ -61,7 +61,7 @@ newEntity{ base = "BASE_NPC_BEAR", newEntity{ base = "BASE_NPC_BEAR", name = "black bear", color={50,50,50}, image = "npc/black_bear.png", - desc = [[Do you smell like honey? 'Cause this bear wants honey.]], + desc = _t[[Do you smell like honey? 'Cause this bear wants honey.]], level_range = {6, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(90,100), @@ -71,7 +71,7 @@ newEntity{ base = "BASE_NPC_BEAR", newEntity{ base = "BASE_NPC_BEAR", name = "cave bear", color=colors.DARK_SLATE_GRAY, image = "npc/cave_bear.png", - desc = [[It has come down from its cave foraging for food. Unfortunately, it found you.]], + desc = _t[[It has come down from its cave foraging for food. Unfortunately, it found you.]], level_range = {7, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(100,110), @@ -82,7 +82,7 @@ newEntity{ base = "BASE_NPC_BEAR", newEntity{ base = "BASE_NPC_BEAR", name = "war bear", color=colors.DARK_UMBER, image = "npc/war_bear.png", - desc = [[Bears with tusks, trained to kill.]], + desc = _t[[Bears with tusks, trained to kill.]], level_range = {7, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(100,120), @@ -94,7 +94,7 @@ newEntity{ base = "BASE_NPC_BEAR", newEntity{ base = "BASE_NPC_BEAR", name = "grizzly bear", color=colors.LIGHT_UMBER, image = "npc/grizzly_bear.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/grizzly_bear.png", display_h=2, display_y=-1}}}, - desc = [[A huge, beastly bear, more savage than most of its kind.]], + desc = _t[[A huge, beastly bear, more savage than most of its kind.]], level_range = {10, nil}, exp_worth = 1, rarity = 4, max_life = resolvers.rngavg(110,120), @@ -105,7 +105,7 @@ newEntity{ base = "BASE_NPC_BEAR", newEntity{ base = "BASE_NPC_BEAR", name = "polar bear", color=colors.WHITE, image = "npc/polar_bear.png", - desc = [[This huge white bear has wandered south in search of food.]], + desc = _t[[This huge white bear has wandered south in search of food.]], level_range = {12, nil}, exp_worth = 1, rarity = 6, max_life = resolvers.rngavg(110,120), diff --git a/game/modules/tome/data/general/npcs/bird.lua b/game/modules/tome/data/general/npcs/bird.lua index c4627646309f93e5ad12292ec83092e32b7ba016..3ad6f3b8dcc32d87408a72e0df4b8bb98944a43b 100644 --- a/game/modules/tome/data/general/npcs/bird.lua +++ b/game/modules/tome/data/general/npcs/bird.lua @@ -47,7 +47,7 @@ newEntity{ base="BASE_NPC_BIRD", define_as = "NPC_PHOENIX", name = "Phoenix", unique = true, display = "B", color=colors.VIOLET, rarity = 50, - desc = [[Ever burning, ever dying, ever reviving, the Phoenix swoops down upon you, seeking to share its fiery fate with you.]], + desc = _t[[Ever burning, ever dying, ever reviving, the Phoenix swoops down upon you, seeking to share its fiery fate with you.]], level_range = {40, 75}, exp_worth = 10, max_life = 1000, life_rating = 23, fixed_rating = true, max_mana = 1000, @@ -99,9 +99,9 @@ newEntity{ base="BASE_NPC_BIRD", define_as = "NPC_PHOENIX", self:resetToFull() self.life = math.min(1500, self.max_life) self:setEffect(self.EFF_PHOENIX_EGG, dur, {life_regen = 25, mana_regen = -9.75, never_move = 1, never_blow = 1, silence = 1}) - game.logSeen(src, "#LIGHT_RED#%s raises from the dead!", self.name:capitalize()) + game.logSeen(src, "#LIGHT_RED#%s raises from the dead!", self:getName():capitalize()) local sx, sy = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, "RESURRECT!", {255,120,0}) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, _t"RESURRECT!", {255,120,0}) self.died = (self.died or 0) + 1 else return mod.class.NPC.die(self, src) diff --git a/game/modules/tome/data/general/npcs/bone-giant.lua b/game/modules/tome/data/general/npcs/bone-giant.lua index fa3569b757b42f04104ea55af1d83d35ac4b9e79..ce07843d4024e338d80094f63823df2ea9d0961d 100644 --- a/game/modules/tome/data/general/npcs/bone-giant.lua +++ b/game/modules/tome/data/general/npcs/bone-giant.lua @@ -58,7 +58,7 @@ newEntity{ newEntity{ base = "BASE_NPC_BONE_GIANT", name = "bone giant", color=colors.WHITE, - desc = [[A towering creature, made from the bones of dozens of dead bodies. It is covered by an unholy aura.]], + desc = _t[[A towering creature, made from the bones of dozens of dead bodies. It is covered by an unholy aura.]], level_range = {25, nil}, exp_worth = 1, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_bone_giant.png", display_h=2, display_y=-1}}}, rarity = 1, @@ -70,7 +70,7 @@ newEntity{ base = "BASE_NPC_BONE_GIANT", newEntity{ base = "BASE_NPC_BONE_GIANT", name = "eternal bone giant", color=colors.GREY, - desc = [[A towering creature, made from the bones of hundreds of dead bodies. It is covered by an unholy aura.]], + desc = _t[[A towering creature, made from the bones of hundreds of dead bodies. It is covered by an unholy aura.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_eternal_bone_giant.png", display_h=2, display_y=-1}}}, level_range = {30, nil}, exp_worth = 1, rarity = 3, @@ -84,7 +84,7 @@ newEntity{ base = "BASE_NPC_BONE_GIANT", newEntity{ base = "BASE_NPC_BONE_GIANT", name = "heavy bone giant", color=colors.LIGHT_UMBER, - desc = [[A towering creature, made from the bones of hundreds of dead bodies. It is covered by an unholy aura.]], + desc = _t[[A towering creature, made from the bones of hundreds of dead bodies. It is covered by an unholy aura.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_heavy_bone_giant.png", display_h=2, display_y=-1}}}, level_range = {35, nil}, exp_worth = 1, rarity = 3, @@ -96,7 +96,7 @@ newEntity{ base = "BASE_NPC_BONE_GIANT", newEntity{ base = "BASE_NPC_BONE_GIANT", name = "runed bone giant", color=colors.RED, - desc = [[A towering creature, made from the bones of hundreds of dead bodies, rune-etched and infused with hateful sorceries.]], + desc = _t[[A towering creature, made from the bones of hundreds of dead bodies, rune-etched and infused with hateful sorceries.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_runed_bone_giant.png", display_h=2, display_y=-1}}}, level_range = {40, nil}, exp_worth = 1, rarity = 5, diff --git a/game/modules/tome/data/general/npcs/canine.lua b/game/modules/tome/data/general/npcs/canine.lua index 2983aff9eda346e7d3909190c7dcbbf21133240e..0475ff5aae131724172789ad4b29a2f938e40589 100644 --- a/game/modules/tome/data/general/npcs/canine.lua +++ b/game/modules/tome/data/general/npcs/canine.lua @@ -46,7 +46,7 @@ newEntity{ newEntity{ base = "BASE_NPC_CANINE", name = "wolf", color=colors.UMBER, image="npc/canine_w.png", - desc = [[Lean, mean, and shaggy, it stares at you with hungry eyes.]], + desc = _t[[Lean, mean, and shaggy, it stares at you with hungry eyes.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(40,70), @@ -59,7 +59,7 @@ newEntity{ base = "BASE_NPC_CANINE", newEntity{ base = "BASE_NPC_CANINE", name = "great wolf", color=colors.UMBER, image="npc/canine_gw.png", - desc = [[Larger than a normal wolf, it prowls and snaps at you.]], + desc = _t[[Larger than a normal wolf, it prowls and snaps at you.]], level_range = {3, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(60,90), @@ -73,7 +73,7 @@ newEntity{ base = "BASE_NPC_CANINE", newEntity{ base = "BASE_NPC_CANINE", name = "dire wolf", color=colors.DARK_UMBER, image="npc/canine_dw.png", - desc = [[Easily as big as a horse, this wolf menaces you with its claws and fangs.]], + desc = _t[[Easily as big as a horse, this wolf menaces you with its claws and fangs.]], level_range = {4, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(80,110), @@ -88,7 +88,7 @@ newEntity{ base = "BASE_NPC_CANINE", newEntity{ base = "BASE_NPC_CANINE", name = "white wolf", color=colors.WHITE, image="npc/canine_ww.png", - desc = [[A large and muscled wolf from the northern wastes. Its breath is cold and icy, and its fur coated in frost.]], + desc = _t[[A large and muscled wolf from the northern wastes. Its breath is cold and icy, and its fur coated in frost.]], level_range = {4, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(70,100), @@ -106,7 +106,7 @@ newEntity{ base = "BASE_NPC_CANINE", newEntity{ base = "BASE_NPC_CANINE", name = "warg", color=colors.BLACK, image="npc/canine_warg.png", - desc = [[It is a large wolf with eyes full of cunning.]], + desc = _t[[It is a large wolf with eyes full of cunning.]], level_range = {6, nil}, exp_worth = 1, rarity = 4, max_life = resolvers.rngavg(60,100), @@ -126,7 +126,7 @@ newEntity{ base = "BASE_NPC_CANINE", newEntity{ base = "BASE_NPC_CANINE", name = "fox", color=colors.RED, image="npc/canine_fox.png", - desc = [[The quick brown fox jumps over the lazy dog.]], + desc = _t[[The quick brown fox jumps over the lazy dog.]], sound_moam = {"creatures/foxes/bark_hurt_%d", 1, 1}, sound_die = {"creatures/wolves/death_%d", 1, 1}, sound_random = {"creatures/wolves/bark_%d", 1, 2}, @@ -143,7 +143,7 @@ newEntity{ base = "BASE_NPC_CANINE", newEntity{ base = "BASE_NPC_CANINE", name = "Rungof the Warg Titan", color=colors.VIOLET, unique=true, image="npc/canine_rungof.png", - desc = [[It is a large wolf with eyes full of cunning, thrice the size of a normal warg.]], + desc = _t[[It is a large wolf with eyes full of cunning, thrice the size of a normal warg.]], level_range = {20, nil}, exp_worth = 2, rank = 3.5, size_category = 4, diff --git a/game/modules/tome/data/general/npcs/cold-drake.lua b/game/modules/tome/data/general/npcs/cold-drake.lua index 9689707704d088d1b90d0c814b8292dbf011bc58..526a570c506c7d5bd3d99ae81ecb866234eabaf8 100644 --- a/game/modules/tome/data/general/npcs/cold-drake.lua +++ b/game/modules/tome/data/general/npcs/cold-drake.lua @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_COLD_DRAKE", name = "cold drake hatchling", color=colors.WHITE, display="d", - desc = [[A drake hatchling. Not too powerful by itself, but it usually comes with its brothers and sisters.]], + desc = _t[[A drake hatchling. Not too powerful by itself, but it usually comes with its brothers and sisters.]], level_range = {8, nil}, exp_worth = 1, rarity = 1, rank = 1, size_category = 2, @@ -64,7 +64,7 @@ newEntity{ base = "BASE_NPC_COLD_DRAKE", newEntity{ base = "BASE_NPC_COLD_DRAKE", define_as = "NPC_COLD_DRAKE", name = "cold drake", color=colors.SLATE, display="D", - desc = [[A mature cold drake, armed with deadly breath and nasty claws.]], + desc = _t[[A mature cold drake, armed with deadly breath and nasty claws.]], level_range = {14, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(100,110), @@ -88,7 +88,7 @@ newEntity{ base = "BASE_NPC_COLD_DRAKE", define_as = "NPC_COLD_DRAKE", newEntity{ base = "BASE_NPC_COLD_DRAKE", name = "ice wyrm", color=colors.AQUAMARINE, display="D", - desc = [[An old and powerful cold drake, armed with deadly breath and nasty claws.]], + desc = _t[[An old and powerful cold drake, armed with deadly breath and nasty claws.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_cold_ice_wyrm.png", display_h=2, display_y=-1}}}, level_range = {25, nil}, exp_worth = 1, rarity = 5, diff --git a/game/modules/tome/data/general/npcs/construct.lua b/game/modules/tome/data/general/npcs/construct.lua index 807a641071122a4f433adea059202e87b6deb5bb..71675e927f41c02bda66c6606163e7e1d1158d84 100644 --- a/game/modules/tome/data/general/npcs/construct.lua +++ b/game/modules/tome/data/general/npcs/construct.lua @@ -57,7 +57,7 @@ newEntity{ newEntity{ base = "BASE_NPC_CONSTRUCT", name = "broken golem", color=colors.LIGHT_UMBER, - desc = [[This golem is badly damaged.]], + desc = _t[[This golem is badly damaged.]], level_range = {6, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(70,80), @@ -74,7 +74,7 @@ newEntity{ base = "BASE_NPC_CONSTRUCT", newEntity{ base = "BASE_NPC_CONSTRUCT", name = "golem", color=colors.BLUE, - desc = [[This golem's eyes glow with magical energies.]], + desc = _t[[This golem's eyes glow with magical energies.]], level_range = {8, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(90,100), @@ -92,7 +92,7 @@ newEntity{ base = "BASE_NPC_CONSTRUCT", newEntity{ base = "BASE_NPC_CONSTRUCT", name = "alchemist golem", color=colors.YELLOW, - desc = [[This golem's eyes glow with magical energies.]], + desc = _t[[This golem's eyes glow with magical energies.]], level_range = {14, nil}, exp_worth = 1, rarity = 4, rank = 3, diff --git a/game/modules/tome/data/general/npcs/crystal.lua b/game/modules/tome/data/general/npcs/crystal.lua index 5925e2598158ec1d16b6441f1e55f44feebf123c..c2b33a7e98a1a676166b25a4aa970b2aa219c049 100644 --- a/game/modules/tome/data/general/npcs/crystal.lua +++ b/game/modules/tome/data/general/npcs/crystal.lua @@ -24,7 +24,7 @@ newEntity{ type = "immovable", subtype = "crystal", image = "npc/crystal_npc.png", display = "%", color=colors.WHITE, blood_color = colors.GREY, - desc = "A shining crystal formation charged with magical energies.", + desc = _t"A shining crystal formation charged with magical energies.", body = { INVEN = 10 }, autolevel = "caster", ai = "dumb_talented_simple", ai_state = { talent_in=1, }, @@ -61,7 +61,7 @@ newEntity{ newEntity{ name = "wisp", type = "elemental", subtype = "light", display = "*", color=colors.YELLOW, tint=colors.YELLOW, - desc = [[A floating orb of magical energy. It shines with a radiant light. They explode upon contact.]], + desc = _t[[A floating orb of magical energy. It shines with a radiant light. They explode upon contact.]], combat = { dam=10, atk=5, apr=10, physspeed=1 }, blood_color = colors.YELLOW, level_range = {1, nil}, @@ -95,7 +95,7 @@ newEntity{ name = "wisp", newEntity{ base = "BASE_NPC_CRYSTAL", name = "red crystal", color=colors.RED, tint=colors.RED, image = "npc/crystal_red.png", - desc = "A formation of red crystal. It emits bright red, scorching light.", + desc = _t"A formation of red crystal. It emits bright red, scorching light.", level_range = {1, nil}, exp_worth = 1, rarity = 1, resists = { [DamageType.FIRE] = 100, [DamageType.COLD] = -100 }, @@ -107,7 +107,7 @@ newEntity{ base = "BASE_NPC_CRYSTAL", newEntity{ base = "BASE_NPC_CRYSTAL", name = "white crystal", color=colors.WHITE, tint=colors.WHITE, - desc = "A formation of white crystal. It emits bright white, chilling light.", + desc = _t"A formation of white crystal. It emits bright white, chilling light.", level_range = {1, nil}, exp_worth = 1, rarity = 1, resists = { [DamageType.COLD] = 100, [DamageType.FIRE] = -100 }, @@ -118,7 +118,7 @@ newEntity{ base = "BASE_NPC_CRYSTAL", newEntity{ base = "BASE_NPC_CRYSTAL", name = "black crystal", color=colors.BLACK, tint=colors.BLACK, image = "npc/crystal_black.png", - desc = "A formation of black crystal. It absorbs all light around it.", + desc = _t"A formation of black crystal. It absorbs all light around it.", level_range = {3, nil}, exp_worth = 1, rarity = 2, resists = { [DamageType.LIGHT] = 100 ,[DamageType.DARKNESS] = -100 }, @@ -129,7 +129,7 @@ newEntity{ base = "BASE_NPC_CRYSTAL", newEntity{ base = "BASE_NPC_CRYSTAL", name = "crimson crystal", color=colors.DARK_RED, tint=colors.DARK_RED, image = "npc/crystal_darkred.png", - desc = "A formation of crimson crystal. It emits a crimson light reminiscent of blood.", + desc = _t"A formation of crimson crystal. It emits a crimson light reminiscent of blood.", level_range = {3, nil}, exp_worth = 1, rarity = 3, resists = { [DamageType.LIGHT] = -100 }, @@ -140,7 +140,7 @@ newEntity{ base = "BASE_NPC_CRYSTAL", newEntity{ base = "BASE_NPC_CRYSTAL", name = "blue crystal", color=colors.BLUE, tint=colors.BLUE, image = "npc/crystal_blue.png", - desc = "A formation of blue crystal. Its light shines like the ocean's waves.", + desc = _t"A formation of blue crystal. Its light shines like the ocean's waves.", level_range = {3, nil}, exp_worth = 1, rarity = 4, resists = { [DamageType.COLD] = -100 }, @@ -152,7 +152,7 @@ newEntity{ base = "BASE_NPC_CRYSTAL", newEntity{ base = "BASE_NPC_CRYSTAL", name = "multi-hued crystal", color=colors.VIOLET, tint=colors.VIOLET, image = "npc/crystal_violet.png", shader = "quad_hue", - desc = "A formation of multi-hued crystal. It shines with all the colors of the rainbow.", + desc = _t"A formation of multi-hued crystal. It shines with all the colors of the rainbow.", level_range = {10, nil}, exp_worth = 1, rarity = 4, resists = { [DamageType.LIGHT] = 100 }, @@ -167,7 +167,7 @@ newEntity{ base = "BASE_NPC_CRYSTAL", newEntity{ base = "BASE_NPC_CRYSTAL", name = "shimmering crystal", color=colors.GREEN, tint=colors.GREEN, shader = "quad_hue", - desc = "A formation of shimmering crystal. Orbs of light circle around it.", + desc = _t"A formation of shimmering crystal. Orbs of light circle around it.", level_range = {10, nil}, exp_worth = 1, rarity = 5, resists = { [DamageType.LIGHT] = 100 }, diff --git a/game/modules/tome/data/general/npcs/elven-caster.lua b/game/modules/tome/data/general/npcs/elven-caster.lua index 6250a0adfe0b2a7c97bae9ec1fec1f4fac0c5706..dda063f32d26bd387ac64f782310d8ed62fa6df2 100644 --- a/game/modules/tome/data/general/npcs/elven-caster.lua +++ b/game/modules/tome/data/general/npcs/elven-caster.lua @@ -54,7 +54,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ELVEN_CASTER", name = "elven mage", color=colors.TEAL, - desc = [[An elven mage, dressed in dark robes.]], + desc = _t[[An elven mage, dressed in dark robes.]], level_range = {2, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(70, 80), life_rating = 10, @@ -71,7 +71,7 @@ newEntity{ base = "BASE_NPC_ELVEN_CASTER", newEntity{ base = "BASE_NPC_ELVEN_CASTER", name = "elven tempest", color=colors.LIGHT_BLUE, - desc = [[An elven mage, dressed in crackling blue robes, and smelling of ozone.]], + desc = _t[[An elven mage, dressed in crackling blue robes, and smelling of ozone.]], level_range = {3, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(70, 80), life_rating = 10, @@ -91,7 +91,7 @@ newEntity{ base = "BASE_NPC_ELVEN_CASTER", newEntity{ base = "BASE_NPC_ELVEN_CASTER", name = "elven cultist", color=colors.DARK_SEA_GREEN, - desc = [[An elven cultist, dressed in sickening green robes.]], + desc = _t[[An elven cultist, dressed in sickening green robes.]], level_range = {25, nil}, exp_worth = 1, rarity = 1, ai = "tactical", @@ -117,7 +117,7 @@ newEntity{ base = "BASE_NPC_ELVEN_CASTER", newEntity{ base = "BASE_NPC_ELVEN_CASTER", name = "elven blood mage", color=colors.ORCHID, - desc = [[An elven blood mage, dressing in dark, bloodied robes.]], + desc = _t[[An elven blood mage, dressing in dark, bloodied robes.]], level_range = {25, nil}, exp_worth = 1, rarity = 1, ai = "tactical", @@ -142,7 +142,7 @@ newEntity{ base = "BASE_NPC_ELVEN_CASTER", newEntity{ base = "BASE_NPC_ELVEN_CASTER", name = "elven corruptor", color=colors.ORCHID, - desc = [[An elven corruptor, drawn to these blighted lands.]], + desc = _t[[An elven corruptor, drawn to these blighted lands.]], level_range = {26, nil}, exp_worth = 1, rarity = 3, rank = 3, diff --git a/game/modules/tome/data/general/npcs/elven-warrior.lua b/game/modules/tome/data/general/npcs/elven-warrior.lua index db74c9fa539c99033848774e4dc3fb0166acaf23..fd4c4672eb2dfbdda96270980aa88ed48ea1f8b7 100644 --- a/game/modules/tome/data/general/npcs/elven-warrior.lua +++ b/game/modules/tome/data/general/npcs/elven-warrior.lua @@ -52,7 +52,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ELVEN_WARRIOR", name = "elven guard", color=colors.LIGHT_UMBER, - desc = [[An elven guard.]], + desc = _t[[An elven guard.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(80,90), life_rating = 11, @@ -66,7 +66,7 @@ newEntity{ base = "BASE_NPC_ELVEN_WARRIOR", newEntity{ base = "BASE_NPC_ELVEN_WARRIOR", name = "mean looking elven guard", color=colors.UMBER, - desc = [[An elven guard, scarred and sullen.]], + desc = _t[[An elven guard, scarred and sullen.]], level_range = {3, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(100,110), life_rating = 11, @@ -80,7 +80,7 @@ newEntity{ base = "BASE_NPC_ELVEN_WARRIOR", newEntity{ base = "BASE_NPC_ELVEN_WARRIOR", name = "elven warrior", color=colors.LIGHT_UMBER, - desc = [[An elven warrior, clad in heavy armour.]], + desc = _t[[An elven warrior, clad in heavy armour.]], level_range = {10, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(100,110), @@ -96,7 +96,7 @@ newEntity{ base = "BASE_NPC_ELVEN_WARRIOR", newEntity{ base = "BASE_NPC_ELVEN_WARRIOR", name = "elven elite warrior", color=colors.UMBER, - desc = [[An elven warrior, clad in heavy armour.]], + desc = _t[[An elven warrior, clad in heavy armour.]], level_range = {15, nil}, exp_worth = 1, rarity = 5, rank = 3, diff --git a/game/modules/tome/data/general/npcs/faeros.lua b/game/modules/tome/data/general/npcs/faeros.lua index 04ce3904a2a0ffe699613f0e776a41a7e17fca71..3ccefcbe31077734efb0d97fb53f33e5953e5c8b 100644 --- a/game/modules/tome/data/general/npcs/faeros.lua +++ b/game/modules/tome/data/general/npcs/faeros.lua @@ -55,7 +55,7 @@ newEntity{ newEntity{ base = "BASE_NPC_FAEROS", name = "faeros", color=colors.ORANGE, - desc = [[Faeros are highly intelligent fire elementals, rarely seen outside volcanoes. They are probably not native to this world.]], + desc = _t[[Faeros are highly intelligent fire elementals, rarely seen outside volcanoes. They are probably not native to this world.]], level_range = {20, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(70,80), @@ -69,7 +69,7 @@ newEntity{ base = "BASE_NPC_FAEROS", newEntity{ base = "BASE_NPC_FAEROS", name = "greater faeros", color=colors.ORANGE, - desc = [[Faeros are highly intelligent fire elementals, rarely seen outside volcanoes. They are probably not native to this world.]], + desc = _t[[Faeros are highly intelligent fire elementals, rarely seen outside volcanoes. They are probably not native to this world.]], level_range = {25, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(70,80), life_rating = 10, @@ -85,7 +85,7 @@ newEntity{ base = "BASE_NPC_FAEROS", newEntity{ base = "BASE_NPC_FAEROS", name = "ultimate faeros", color=colors.ORANGE, - desc = [[Faeros are highly intelligent fire elementals, rarely seen outside volcanoes. They are probably not native to this world.]], + desc = _t[[Faeros are highly intelligent fire elementals, rarely seen outside volcanoes. They are probably not native to this world.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_fire_ultimate_faeros.png", display_h=2, display_y=-1}}}, level_range = {35, nil}, exp_worth = 1, rarity = 5, diff --git a/game/modules/tome/data/general/npcs/feline.lua b/game/modules/tome/data/general/npcs/feline.lua index 6b279f8d13238928173e17f25b24437d1ae4f3e1..5ef3695c0b087152af0855adfb29d79b6524c529 100644 --- a/game/modules/tome/data/general/npcs/feline.lua +++ b/game/modules/tome/data/general/npcs/feline.lua @@ -40,7 +40,7 @@ newEntity{ newEntity{ base = "BASE_NPC_CAT", name = "snow cat", color=colors.GRAY, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/animal_feline_snow_cat.png", display_h=2, display_y=-1}}}, - desc = [[A large cat with a grey fur matted with black.]], + desc = _t[[A large cat with a grey fur matted with black.]], level_range = {3, nil}, exp_worth = 1, rarity = 4, max_life = resolvers.rngavg(40,80), @@ -56,7 +56,7 @@ newEntity{ base = "BASE_NPC_CAT", newEntity{ base = "BASE_NPC_CAT", name = "panther", color=colors.BLACK, - desc = [[A large black cat, slender and muscular.]], + desc = _t[[A large black cat, slender and muscular.]], level_range = {8, nil}, exp_worth = 1, rarity = 4, size_category=3, @@ -72,7 +72,7 @@ newEntity{ base = "BASE_NPC_CAT", newEntity{ base = "BASE_NPC_CAT", name = "tiger", color=colors.YELLOW, - desc = [[A truly magnificent beast, with fur striped black and yellow.]], + desc = _t[[A truly magnificent beast, with fur striped black and yellow.]], level_range = {12, nil}, exp_worth = 1, rarity = 4, size_category=4, @@ -89,7 +89,7 @@ newEntity{ base = "BASE_NPC_CAT", newEntity{ base = "BASE_NPC_CAT", name = "sabertooth tiger", color=colors.YELLOW, - desc = [[This cat is simply enormous, and has fangs with the size and sharpness of short swords.]], + desc = _t[[This cat is simply enormous, and has fangs with the size and sharpness of short swords.]], level_range = {16, nil}, exp_worth = 1, rarity = 4, size_category=4, diff --git a/game/modules/tome/data/general/npcs/fire-drake.lua b/game/modules/tome/data/general/npcs/fire-drake.lua index e00883d12dd9d7976845255f5e1078265ac4ea9e..cdd5bebabb845aba93d071d2aa87eca4e43a09f4 100644 --- a/game/modules/tome/data/general/npcs/fire-drake.lua +++ b/game/modules/tome/data/general/npcs/fire-drake.lua @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_FIRE_DRAKE", name = "fire drake hatchling", color=colors.RED, display="d", - desc = [[A drake hatchling; not too powerful by itself, but it usually comes with its brothers and sisters.]], + desc = _t[[A drake hatchling; not too powerful by itself, but it usually comes with its brothers and sisters.]], level_range = {8, nil}, exp_worth = 1, rarity = 1, rank = 1, size_category = 2, @@ -61,7 +61,7 @@ newEntity{ base = "BASE_NPC_FIRE_DRAKE", newEntity{ base = "BASE_NPC_FIRE_DRAKE", name = "fire drake", color=colors.RED, display="D", - desc = [[A mature fire drake, armed with deadly breath and nasty claws.]], + desc = _t[[A mature fire drake, armed with deadly breath and nasty claws.]], level_range = {14, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(100,110), @@ -83,7 +83,7 @@ newEntity{ base = "BASE_NPC_FIRE_DRAKE", newEntity{ base = "BASE_NPC_FIRE_DRAKE", name = "fire wyrm", color=colors.LIGHT_RED, display="D", - desc = [[An old and powerful fire drake, armed with deadly breath and nasty claws.]], + desc = _t[[An old and powerful fire drake, armed with deadly breath and nasty claws.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_fire_fire_wyrm.png", display_h=2, display_y=-1}}}, level_range = {25, nil}, exp_worth = 1, rarity = 5, diff --git a/game/modules/tome/data/general/npcs/ghost.lua b/game/modules/tome/data/general/npcs/ghost.lua index e04397e1cba99127f86a2ed394eea82471ed1685..818ed3526eea47104446c30a16f673fda94b3849 100644 --- a/game/modules/tome/data/general/npcs/ghost.lua +++ b/game/modules/tome/data/general/npcs/ghost.lua @@ -62,7 +62,7 @@ newEntity{ newEntity{ base = "BASE_NPC_GHOST", name = "dread", color=colors.ORANGE, image="npc/dread.png", - desc = [[It is a form that screams its presence against the eye. Death incarnate, its hideous black body seems to struggle against reality as the universe itself strives to banish it.]], + desc = _t[[It is a form that screams its presence against the eye. Death incarnate, its hideous black body seems to struggle against reality as the universe itself strives to banish it.]], level_range = {25, nil}, exp_worth = 1, rarity = 10, max_life = resolvers.rngavg(90,100), @@ -80,7 +80,7 @@ newEntity{ base = "BASE_NPC_GHOST", newEntity{ base = "BASE_NPC_GHOST", name = "dreadmaster", color=colors.YELLOW, image="npc/dreadmaster.png", - desc = [[It is an unlife of power almost unequaled. An affront to existence, its very touch abuses and disrupts the flow of life, and its unearthly limbs, of purest black, crumble rock and wither flesh with ease.]], + desc = _t[[It is an unlife of power almost unequaled. An affront to existence, its very touch abuses and disrupts the flow of life, and its unearthly limbs, of purest black, crumble rock and wither flesh with ease.]], level_range = {32, nil}, exp_worth = 1, rarity = 15, rank = 3, @@ -107,7 +107,7 @@ newEntity{ base = "BASE_NPC_GHOST", newEntity{ base = "BASE_NPC_GHOST", name = "banshee", color=colors.BLUE, image="npc/banshee.png", female=1, - desc = [[It is a ghostly woman's form that wails mournfully.]], + desc = _t[[It is a ghostly woman's form that wails mournfully.]], level_range = {20, nil}, exp_worth = 1, rarity = 8, max_life = resolvers.rngavg(40,50), life_rating = 6, @@ -128,7 +128,7 @@ newEntity{ base = "BASE_NPC_GHOST", newEntity{ base = "BASE_NPC_GHOST", name = "ruin banshee", color=colors.GREY, - desc = [[A vengeful, screaming soul given form with the breath of Urh'Rok himself. The vapors of the Fearscape seep from its dimension-bending form, withering and searing.]], + desc = _t[[A vengeful, screaming soul given form with the breath of Urh'Rok himself. The vapors of the Fearscape seep from its dimension-bending form, withering and searing.]], level_range = {42, nil}, exp_worth = 1, rarity = 15, rank = 3, diff --git a/game/modules/tome/data/general/npcs/ghoul.lua b/game/modules/tome/data/general/npcs/ghoul.lua index a62e266028bb5ab054e8f175470b12eb8e80e9c0..3417d5ad82cdb66489749aa8f50782fc69b74bac 100644 --- a/game/modules/tome/data/general/npcs/ghoul.lua +++ b/game/modules/tome/data/general/npcs/ghoul.lua @@ -48,7 +48,7 @@ newEntity{ newEntity{ base = "BASE_NPC_GHOUL", name = "ghoul", color=colors.TAN, define_as = "GHOUL", - desc = [[Flesh is falling off in chunks from this decaying abomination.]], + desc = _t[[Flesh is falling off in chunks from this decaying abomination.]], level_range = {7, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(90,100), @@ -65,7 +65,7 @@ newEntity{ base = "BASE_NPC_GHOUL", newEntity{ base = "BASE_NPC_GHOUL", name = "ghast", color=colors.UMBER, - desc = [[This vile abomination is a relative of ghouls, and often leads packs of them. It smells foul, and its bite carries a rotting disease.]], + desc = _t[[This vile abomination is a relative of ghouls, and often leads packs of them. It smells foul, and its bite carries a rotting disease.]], level_range = {10, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(90,100), @@ -86,7 +86,7 @@ newEntity{ base = "BASE_NPC_GHOUL", newEntity{ base = "BASE_NPC_GHOUL", name = "ghoulking", color={0,0,0}, - desc = [[Stench rises from this rotting abomination. Its brow is adorned with gold, and it moves at you with hatred gleaming in its eyes.]], + desc = _t[[Stench rises from this rotting abomination. Its brow is adorned with gold, and it moves at you with hatred gleaming in its eyes.]], level_range = {15, nil}, exp_worth = 1, rarity = 6, max_life = resolvers.rngavg(90,100), @@ -118,7 +118,7 @@ newEntity{ base = "BASE_NPC_GHOUL", newEntity{ base = "BASE_NPC_GHOUL", define_as = "RISEN_CORPSE", display = "z", color=colors.GREY, image="npc/undead_ghoul_ghoul.png", name = "risen corpse", - desc = [[A body raised through dark magic.]], + desc = _t[[A body raised through dark magic.]], exp_worth = 1, combat_armor = 5, combat_def = 3, resolvers.equip{ diff --git a/game/modules/tome/data/general/npcs/gwelgoroth.lua b/game/modules/tome/data/general/npcs/gwelgoroth.lua index ecb6e0fa6eeffcf891447e534f97765daaea8da7..34dd68a327faa1717b32a728204ac49c314ba6e8 100644 --- a/game/modules/tome/data/general/npcs/gwelgoroth.lua +++ b/game/modules/tome/data/general/npcs/gwelgoroth.lua @@ -54,7 +54,7 @@ newEntity{ newEntity{ base = "BASE_NPC_GWELGOROTH", name = "gwelgoroth", color=colors.AQUAMARINE, - desc = [[Gwelgoroth are mighty air elementals, torn away from their home world by a powerful magic.]], + desc = _t[[Gwelgoroth are mighty air elementals, torn away from their home world by a powerful magic.]], level_range = {10, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(70,80), @@ -69,7 +69,7 @@ newEntity{ base = "BASE_NPC_GWELGOROTH", newEntity{ base = "BASE_NPC_GWELGOROTH", name = "greater gwelgoroth", color=colors.STEEL_BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_air_greater_gwelgoroth.png", display_h=2, display_y=-1}}}, - desc = [[Gwelgoroth are mighty air elementals, torn away from their home world by a powerful magic.]], + desc = _t[[Gwelgoroth are mighty air elementals, torn away from their home world by a powerful magic.]], level_range = {12, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(70,80), life_rating = 10, @@ -86,7 +86,7 @@ newEntity{ base = "BASE_NPC_GWELGOROTH", newEntity{ base = "BASE_NPC_GWELGOROTH", name = "ultimate gwelgoroth", color=colors.ROYAL_BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_air_ultimate_gwelgoroth.png", display_h=2, display_y=-1}}}, - desc = [[Gwelgoroth are mighty air elementals, torn away from their home world by a powerful magic.]], + desc = _t[[Gwelgoroth are mighty air elementals, torn away from their home world by a powerful magic.]], level_range = {15, nil}, exp_worth = 1, rarity = 5, rank = 3, diff --git a/game/modules/tome/data/general/npcs/horror-corrupted.lua b/game/modules/tome/data/general/npcs/horror-corrupted.lua index 5e650ca58145975eac266e48fd6d6728b44653f4..ddd4eaef0a40de3fcdeb0a8778dc2f2760c8cd17 100644 --- a/game/modules/tome/data/general/npcs/horror-corrupted.lua +++ b/game/modules/tome/data/general/npcs/horror-corrupted.lua @@ -44,7 +44,7 @@ newEntity{ newEntity{ base = "BASE_NPC_CORRUPTED_HORROR", dredge = 1, name = "drem", color=colors.SLATE, - desc = "A small faceless humanoid with vaguely Dwarven features. Its waraxe and shield look battered, rusted, and generally in ill repair.", + desc = _t"A small faceless humanoid with vaguely Dwarven features. Its waraxe and shield look battered, rusted, and generally in ill repair.", image = "npc/horror_corrupted_dremling.png", level_range = {1, nil}, exp_worth = 1, @@ -80,7 +80,7 @@ newEntity{ base = "BASE_NPC_CORRUPTED_HORROR", dredge = 1, name = "dremling", color=colors.DARK_SLATE_GRAY, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_corrupted_drem.png", display_h=2, display_y=-1}}}, - desc = "A giant black-skinned humanoid covered in spikey scabrous deposits. Its face is featureless; its eyesockets, empty and hollow.", + desc = _t"A giant black-skinned humanoid covered in spikey scabrous deposits. Its face is featureless; its eyesockets, empty and hollow.", level_range = {3, nil}, exp_worth = 1, combat_armor = 4, combat_def = 0, @@ -116,7 +116,7 @@ newEntity{ base = "BASE_NPC_CORRUPTED_HORROR", newEntity{ base = "BASE_NPC_CORRUPTED_HORROR", dredge = 1, name = "drem master", color=colors.LIGHT_GREY, - desc = "A disfigured humanoid with vaguely Dwarven features dressed in patched-together and rusted mail armor. It seems to be in command of others, though its mouth is sewn shut.", + desc = _t"A disfigured humanoid with vaguely Dwarven features dressed in patched-together and rusted mail armor. It seems to be in command of others, though its mouth is sewn shut.", level_range = {3, nil}, exp_worth = 1, combat = { atk=10, dammod={str=0.6} }, @@ -159,7 +159,7 @@ newEntity{ base = "BASE_NPC_CORRUPTED_HORROR", newEntity{ base = "BASE_NPC_CORRUPTED_HORROR", name = "brecklorn", color=colors.PINK, -- gloom bat - desc = "A giant hairless bat with the face of a Dwarf twisted into a constant scream. Pustulant sores cover its malformed body, and your heart weakens as it nears.", + desc = _t"A giant hairless bat with the face of a Dwarf twisted into a constant scream. Pustulant sores cover its malformed body, and your heart weakens as it nears.", level_range = {1, nil}, exp_worth = 1, combat = { atk=10, dammod={dex=0.6} }, @@ -187,7 +187,7 @@ newEntity{ base = "BASE_NPC_CORRUPTED_HORROR", newEntity{ base = "BASE_NPC_CORRUPTED_HORROR", name = "grannor'vor", color=colors.GREEN, -- acid slug - desc = "A large sluglike creature that moves slowly, leaving a trail of acid in its wake. Its head has strangely humanoid features.", + desc = _t"A large sluglike creature that moves slowly, leaving a trail of acid in its wake. Its head has strangely humanoid features.", level_range = {2, nil}, exp_worth = 1, combat = { dam=resolvers.levelup(5, 1, 0.6), atk=15, apr=5, damtype=DamageType.ACID }, @@ -215,7 +215,7 @@ newEntity{ base = "BASE_NPC_CORRUPTED_HORROR", newEntity{ base = "BASE_NPC_CORRUPTED_HORROR", name = "grannor'vin", color=colors.BLACK, -- shadow slug - desc = "A large sluglike creature with the face of a man. Shadows seem to be drawn to its massive form, and your light dims as it approaches.", + desc = _t"A large sluglike creature with the face of a man. Shadows seem to be drawn to its massive form, and your light dims as it approaches.", level_range = {2, nil}, exp_worth = 1, combat = { dam=5, atk=15, apr=5, damtype=DamageType.DARKNESS }, diff --git a/game/modules/tome/data/general/npcs/horror-undead.lua b/game/modules/tome/data/general/npcs/horror-undead.lua index f72245d6dc68b66e3c804f5ddb8dba8b2ae39be6..b0b6640ccf67e2acac31bbe1576490eb305a2443 100644 --- a/game/modules/tome/data/general/npcs/horror-undead.lua +++ b/game/modules/tome/data/general/npcs/horror-undead.lua @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_HORROR_UNDEAD", name = "necrotic mass", color=colors.DARK_GREY, - desc ="This putrid mass of rotting flesh shifts and quivers, but shows no signs of intelligence or mobility.", + desc =_t"This putrid mass of rotting flesh shifts and quivers, but shows no signs of intelligence or mobility.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_horror_necrotic_mass.png", display_h=2, display_y=-1}}}, level_range = {15, nil}, exp_worth = 1, rarity = 4, @@ -60,7 +60,7 @@ newEntity{ base = "BASE_NPC_HORROR_UNDEAD", newEntity{ base = "BASE_NPC_HORROR_UNDEAD", name = "necrotic abomination", color=colors.DARK_GREEN, - desc ="This monstrous form of putrid, torn flesh and chipped bone drags its mass towards you, spurting blood and viscera along the way.", + desc =_t"This monstrous form of putrid, torn flesh and chipped bone drags its mass towards you, spurting blood and viscera along the way.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_horror_necrotic_abomination.png", display_h=2, display_y=-1}}}, level_range = {30, nil}, exp_worth = 1, rarity = 7, @@ -104,7 +104,7 @@ newEntity{ base = "BASE_NPC_HORROR_UNDEAD", newEntity{ base = "BASE_NPC_HORROR_UNDEAD", name = "bone horror", color=colors.WHITE, - desc ="The massive ribcage in the middle beats with loud, audible cracks, as many a skeletal hand protrude forth, entwining, fusing, forming long skeletal appendages to support itself, while others crumble and collapse inward. During all this, somehow, it seems they grasp for you.", + desc =_t"The massive ribcage in the middle beats with loud, audible cracks, as many a skeletal hand protrude forth, entwining, fusing, forming long skeletal appendages to support itself, while others crumble and collapse inward. During all this, somehow, it seems they grasp for you.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_horror_bone_horror.png", display_h=2, display_y=-1}}}, level_range = {30, nil}, exp_worth = 1, rarity = 7, @@ -149,7 +149,7 @@ newEntity{ base = "BASE_NPC_HORROR_UNDEAD", newEntity{ base = "BASE_NPC_HORROR_UNDEAD", name = "sanguine horror", color=colors.RED, - desc ="This pulsing, quivering form is a deep crimson, and appears to be composed entirely of thick, virulent blood. Waves rhythmically ripple across its surface, indicating a still beating heart somewhere in its body.", + desc =_t"This pulsing, quivering form is a deep crimson, and appears to be composed entirely of thick, virulent blood. Waves rhythmically ripple across its surface, indicating a still beating heart somewhere in its body.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_horror_sanguine_horror.png", display_h=2, display_y=-1}}}, level_range = {30, nil}, exp_worth = 1, rarity = 7, @@ -192,7 +192,7 @@ newEntity{ base = "BASE_NPC_HORROR_UNDEAD", newEntity{ base = "BASE_NPC_HORROR_UNDEAD", name = "animated blood", color=colors.RED, subtype = "blood", - desc ="This crimson shape drips ceaselessly, spattering the nearby ground. The droplets seem to continue moving of their own volition.", + desc =_t"This crimson shape drips ceaselessly, spattering the nearby ground. The droplets seem to continue moving of their own volition.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_horror_animated_blood.png", display_h=2, display_y=-1}}}, level_range = {15, nil}, exp_worth = 1, rarity = 20, -- Appear alone but rarely. diff --git a/game/modules/tome/data/general/npcs/horror.lua b/game/modules/tome/data/general/npcs/horror.lua index 0e59cff2bb9837d21f003b7a9694237b68ddd0ad..3e28c283bc1734aeaf68ebc08b07fb5f0ca3fdb3 100644 --- a/game/modules/tome/data/general/npcs/horror.lua +++ b/game/modules/tome/data/general/npcs/horror.lua @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_HORROR", name = "worm that walks", color=colors.SANDY_BROWN, - desc = [[A bulging rotten robe seems to tear at the seams, with masses of bloated worms spilling out all around the moving form. Two arm-like appendages, each made up of overlapping mucous-drenched maggots, grasp tightly around the handles of bile-coated waraxes. + desc = _t[[A bulging rotten robe seems to tear at the seams, with masses of bloated worms spilling out all around the moving form. Two arm-like appendages, each made up of overlapping mucous-drenched maggots, grasp tightly around the handles of bile-coated waraxes. Each swing drips pustulant fluid before it, and each droplet writhes and wriggles in the air before splashing against the ground.]], level_range = {25, nil}, exp_worth = 1, rarity = 5, @@ -106,7 +106,7 @@ Each swing drips pustulant fluid before it, and each droplet writhes and wriggle if value >= (self.max_life * 0.1) then local t = self:getTalentFromId(self.T_WORM_ROT) t.spawn_carrion_worm(self, self, t) - game.logSeen(self, "#LIGHT_RED#A carrion worm mass has spawned from %s' wounds!", self.name) + game.logSeen(self, "#LIGHT_RED#A carrion worm mass has spawned from %s' wounds!", self:getName()) end return value end, @@ -114,7 +114,7 @@ Each swing drips pustulant fluid before it, and each droplet writhes and wriggle newEntity{ base = "BASE_NPC_HORROR", name = "bloated horror", color=colors.WHITE, - desc ="A bulbous humanoid form floats here. Its bald, child-like head is disproportionately large compared to its body, and its skin is pock-marked with nasty red sores.", + desc =_t"A bulbous humanoid form floats here. Its bald, child-like head is disproportionately large compared to its body, and its skin is pock-marked with nasty red sores.", level_range = {10, nil}, exp_worth = 1, rarity = 1, rank = 2, @@ -143,7 +143,7 @@ newEntity{ base = "BASE_NPC_HORROR", newEntity{ base = "BASE_NPC_HORROR", name = "nightmare horror", color=colors.DARK_GREY, - desc ="A shifting form of darkest night that seems to reflect your deepest fears.", + desc =_t"A shifting form of darkest night that seems to reflect your deepest fears.", level_range = {35, nil}, exp_worth = 1, mana_regen = 10, negative_regen = 10, @@ -193,7 +193,7 @@ newEntity{ base = "BASE_NPC_HORROR", ------------------------------------------------------------------------ newEntity{ base = "BASE_NPC_HORROR", name = "headless horror", color=colors.TAN, - desc ="A headless, gangly humanoid with a large distended stomach.", + desc =_t"A headless, gangly humanoid with a large distended stomach.", level_range = {30, nil}, exp_worth = 1, rarity = 5, rank = 3, @@ -253,14 +253,14 @@ newEntity{ base = "BASE_NPC_HORROR", if not eye.dead then eye:die(src) nb = nb + 1 end end if nb > 0 then - game.logSeen(self, "#AQUAMARINE#As %s falls all its eyes fall to the ground!", self.name) + game.logSeen(self, "#AQUAMARINE#As %s falls all its eyes fall to the ground!", self:getName()) end end, } newEntity{ base = "BASE_NPC_HORROR", define_as = "BASE_NPC_ELDRICTH_EYE", name = "eldritch eye", color=colors.SLATE, is_eldritch_eye=true, - desc ="A small bloodshot eye floats here.", + desc =_t"A small bloodshot eye floats here.", level_range = {30, nil}, exp_worth = 1, life_rating = 7, rank = 2, @@ -286,9 +286,9 @@ newEntity{ base = "BASE_NPC_HORROR", define_as = "BASE_NPC_ELDRICTH_EYE", end if nb == 0 and self.summoner and self.summoner.is_headless_horror then local sx, sy = game.level.map:getTileToScreen(self.summoner.x, self.summoner.y, true) - game.flyers:add(sx, sy, 20, (rng.range(0,2)-1) * 0.5, -3, "+Blind", {255,100,80}) + game.flyers:add(sx, sy, 20, (rng.range(0,2)-1) * 0.5, -3, _t"+Blind", {255,100,80}) self.summoner.blind = 1 - game.logSeen(self.summoner, "%s is blinded by the loss of all its eyes.", self.summoner.name:capitalize()) + game.logSeen(self.summoner, "%s is blinded by the loss of all its eyes.", self.summoner:getName():capitalize()) end end, } @@ -406,7 +406,7 @@ newEntity{ base = "BASE_NPC_ELDRICTH_EYE", -- TODO: Make Luminous and Radiant Horrors cooler newEntity{ base = "BASE_NPC_HORROR", name = "luminous horror", color=colors.YELLOW, - desc ="A lanky humanoid shape composed of yellow light.", + desc =_t"A lanky humanoid shape composed of yellow light.", level_range = {20, nil}, exp_worth = 1, rarity = 2, autolevel = "caster", @@ -441,7 +441,7 @@ newEntity{ base = "BASE_NPC_HORROR", newEntity{ base = "BASE_NPC_HORROR", name = "radiant horror", color=colors.GOLD, - desc ="A lanky four-armed humanoid shape composed of bright golden light. It's so bright it's hard to look at, and you can feel heat radiating outward from it.", + desc =_t"A lanky four-armed humanoid shape composed of bright golden light. It's so bright it's hard to look at, and you can feel heat radiating outward from it.", level_range = {35, nil}, exp_worth = 1, rarity = 8, rank = 3, @@ -482,7 +482,7 @@ newEntity{ base = "BASE_NPC_HORROR", newEntity{ base = "BASE_NPC_HORROR", subtype = "eldritch", name = "devourer", color=colors.CRIMSON, - desc = "A headless, round creature with stubby legs and arms. Its body seems to be all teeth.", + desc = _t"A headless, round creature with stubby legs and arms. Its body seems to be all teeth.", level_range = {10, nil}, exp_worth = 1, rarity = 2, rank = 2, @@ -512,7 +512,7 @@ newEntity{ base = "BASE_NPC_HORROR", --Blade horror, psionic horror surrounded by countless telekinetic blades. newEntity{ base = "BASE_NPC_HORROR", name = "blade horror", color=colors.GREY, define_as="BLADEHORROR", - desc = "Blades whirl in the air around this thin, floating figure. The air around it swirls with force, threatening to tear apart anything that approches, if the blades don't do it first.", + desc = _t"Blades whirl in the air around this thin, floating figure. The air around it swirls with force, threatening to tear apart anything that approches, if the blades don't do it first.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_eldritch_blade_horror.png", display_h=2, display_y=-1}}}, level_range = {15, nil}, exp_worth = 1, rarity = 2, @@ -553,7 +553,7 @@ newEntity{ base = "BASE_NPC_HORROR", newEntity{ base = "BASE_NPC_HORROR", subtype = "eldritch", name = "oozing horror", color=colors.GREEN, - desc = "A massive, amorphous blob of green slime crawls on the ground towards you. Eyes drift through the viscous mass, scanning for potential prey.", + desc = _t"A massive, amorphous blob of green slime crawls on the ground towards you. Eyes drift through the viscous mass, scanning for potential prey.", level_range = {16, nil}, exp_worth = 1, rarity = 7, rank = 3, @@ -612,7 +612,7 @@ newEntity{ base = "BASE_NPC_HORROR", newEntity{ base = "BASE_NPC_HORROR", subtype = "eldritch", name = "umbral horror", color=colors.BLACK, - desc = "A dark shifting shape stalks through the shadows, blending in seamlessly.", + desc = _t"A dark shifting shape stalks through the shadows, blending in seamlessly.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_eldritch_umbral_horror.png", display_h=2, display_y=-1}}}, level_range = {16, nil}, exp_worth = 1, rarity = 8, @@ -655,7 +655,7 @@ newEntity{ base = "BASE_NPC_HORROR", -- Dream Horror newEntity{ base = "BASE_NPC_HORROR", name = "dreaming horror", color=colors.ORCHID, - desc =[[A vaguely tentacled yet constantly changing form rests here apparently oblivious to your existence. + desc =_t[[A vaguely tentacled yet constantly changing form rests here apparently oblivious to your existence. With each slow breath it takes reality distorts around it. Blue twirls into red, green twists into yellow, and the air sings softly before bursting into a myriad of pastel shapes and colors.]], resolvers.nice_tile{tall=1}, shader = "shadow_simulacrum", @@ -730,9 +730,9 @@ With each slow breath it takes reality distorts around it. Blue twirls into red custom_tooltip = function(self) if self.dreamer_sleep_state then - return tstring{{"color", "LIGHT_BLUE"}, "It looks asleep and dreamy."} + return tstring{{"color", "LIGHT_BLUE"}, _t"It looks asleep and dreamy."} else - return tstring{{"color", "LIGHT_RED"}, "It looks awake, beware!"} + return tstring{{"color", "LIGHT_RED"}, _t"It looks awake, beware!"} end end, @@ -761,7 +761,7 @@ With each slow breath it takes reality distorts around it. Blue twirls into red game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "generic_teleport", {rm=225, rM=255, gm=225, gM=255, bm=225, bM=255, am=35, aM=90}) - game.logSeen(self, "#LIGHT_BLUE#A dream seed escapes %s's sleeping mind.", self.name:capitalize()) + game.logSeen(self, "#LIGHT_BLUE#A dream seed escapes %s's sleeping mind.", self:getName():capitalize()) end -- Script the AI to encourage opening with dream scape --[[ Disabled temporarily due to unknown bugs with Dreamscape @@ -779,7 +779,7 @@ With each slow breath it takes reality distorts around it. Blue twirls into red on_takehit = function(self, value, src) if value > 0 and self.dreamer_sleep_state then self.dreamer_sleep_state = nil - self.desc = [[A vaguely tentacled yet rapidly changing shape floats here. With each breath you can feel reality twist, shatter, and break. + self.desc = _t[[A vaguely tentacled yet rapidly changing shape floats here. With each breath you can feel reality twist, shatter, and break. Blue burns into red, green bursts into yellow, and the air crackles and hisses before exploding into a thousand fragments of sharp shapes and colors.]] self:removeParticles(self.sleep_particle) game.logSeen(self, "#LIGHT_BLUE#The sleeper stirs...") @@ -790,7 +790,7 @@ Blue burns into red, green bursts into yellow, and the air crackles and hisses b newEntity{ base = "BASE_NPC_HORROR", define_as = "DREAM_SEED", name = "dream seed", color=colors.PINK, image = "npc/dream_seed.png", - desc ="A pinkish bubble floats here, reflecting the world not as it is, but as it would be in that surreal place that exists only in our dreams.", + desc =_t"A pinkish bubble floats here, reflecting the world not as it is, but as it would be in that surreal place that exists only in our dreams.", level_range = {20, nil}, exp_worth = 1, rarity = 30, -- Very rare; but they do spawn on their own to keep the players on thier toes rank = 2, @@ -829,7 +829,7 @@ newEntity{ base = "BASE_NPC_HORROR", define_as = "DREAM_SEED", newEntity{ base = "BASE_NPC_HORROR", name = "maelstrom", color=colors.CADET_BLUE, resolvers.nice_tile{tall=1}, - desc = [[This powerful vortex of ice and lightning somehow gives you the impression of claws, teeth and intense hunger...]], + desc = _t[[This powerful vortex of ice and lightning somehow gives you the impression of claws, teeth and intense hunger...]], level_range = {30, nil}, exp_worth = 1, rarity = 20, rank = 3, @@ -878,7 +878,7 @@ newEntity{ base = "BASE_NPC_HORROR", newEntity{ base = "BASE_NPC_HORROR", name = "parasitic horror", color=colors.DARK_GREEN, resolvers.nice_tile{tall=1}, - desc ="You don't want to think about what sort of creature this lamprey-like horror was feeding on to grow so large. Its skin pulsates and writhes, like things are moving underneath...", + desc =_t"You don't want to think about what sort of creature this lamprey-like horror was feeding on to grow so large. Its skin pulsates and writhes, like things are moving underneath...", level_range = {35, nil}, exp_worth = 1, rarity = 20, rank = 3, @@ -918,7 +918,7 @@ newEntity{ base = "BASE_NPC_HORROR", game.zone:addEntity(game.level, m, "actor", x, y) end end - game.logSeen(self, "%s's severed flesh starts crawling!", self.name:capitalize()) + game.logSeen(self, "%s's severed flesh starts crawling!", self:getName():capitalize()) end return value end, @@ -929,7 +929,7 @@ newEntity{ base = "BASE_NPC_HORROR", newEntity{ base="BASE_NPC_HORROR", define_as = "HORROR_PARASITIC_LEECHES", name = "mass of parasitic leeches", color = colors.LIGHT_GREEN, - desc = "Dozens - hundreds maybe? - of blood-gorged worms, of varying shapes and sizes, making a writhing, ichor-soaked sea of tooth-lined maws and sickly green skin, ready to latch onto you and drink until they burst or your veins run dry.", + desc = _t"Dozens - hundreds maybe? - of blood-gorged worms, of varying shapes and sizes, making a writhing, ichor-soaked sea of tooth-lined maws and sickly green skin, ready to latch onto you and drink until they burst or your veins run dry.", level_range = {25, nil}, exp_worth = 1, rarity = 10, rank = 2, @@ -970,7 +970,7 @@ newEntity{ base="BASE_NPC_HORROR", color = colors.DARK_GREY, image = "npc/horror_eldritch_grgglck.png", resolvers.nice_tile{tall=1}, rarity = 50, - desc = [[A horror from the deepest pits of the earth. It looks like a huge pile of tentacles all trying to reach for you. + desc = _t[[A horror from the deepest pits of the earth. It looks like a huge pile of tentacles all trying to reach for you. You can discern a huge round mouth covered in razor-sharp teeth.]], level_range = {20, nil}, exp_worth = 2, max_life = 300, life_rating = 25, fixed_rating = true, @@ -1021,7 +1021,7 @@ You can discern a huge round mouth covered in razor-sharp teeth.]], newEntity{ base="BASE_NPC_HORROR", define_as = "GRGGLCK_TENTACLE", name = "Grgglck's Tentacle", color = colors.GREY, - desc = [[This is one of Grgglck's tentacles. It looks more vulnerable than the main body.]], + desc = _t[[This is one of Grgglck's tentacles. It looks more vulnerable than the main body.]], level_range = {20, nil}, exp_worth = 0, max_life = 100, life_rating = 3, fixed_rating = true, equilibrium_regen = -20, @@ -1061,7 +1061,7 @@ newEntity{ base="BASE_NPC_HORROR", define_as = "GRGGLCK_TENTACLE", newEntity{ base = "BASE_NPC_HORROR", name = "Ak'Gishil", color=colors.GREY, unique = true, - desc = "This Blade Horror has been infused with intense temporal magic, causing its power to increase dramatically. Rifts in space open around it constantly, summoning and banishing blades before vanishing as quickly as they appear.", + desc = _t"This Blade Horror has been infused with intense temporal magic, causing its power to increase dramatically. Rifts in space open around it constantly, summoning and banishing blades before vanishing as quickly as they appear.", resolvers.nice_tile{tall=1}, level_range = {30, nil}, exp_worth = 2, rarity = 45, @@ -1134,7 +1134,7 @@ newEntity{ base="BASE_NPC_HORROR", define_as = "ANIMATED_BLADE", type = "construct", subtype = "weapon", image="object/magical_animated_sword.png", name = "Animated Sword", color = colors.GREY, - desc = [[Time seems to warp and bend around this floating weapon.]], + desc = _t[[Time seems to warp and bend around this floating weapon.]], level_range = {30, nil}, exp_worth = 0, max_life = 75, life_rating = 4, fixed_rating=true, rank = 2, @@ -1183,7 +1183,7 @@ newEntity{ base="BASE_NPC_HORROR", define_as = "ANIMATED_BLADE", on_act = function(self) if self.summoner and self.summoner:attr("dead") then - game.logSeen(self, "#AQUAMARINE#The %s no longer seems to be controlled and clatters to the ground before vanishing into a rift.", self.name:capitalize()) + game.logSeen(self, "#AQUAMARINE#The %s no longer seems to be controlled and clatters to the ground before vanishing into a rift.", self:getName():capitalize()) self:die() end end, @@ -1193,7 +1193,7 @@ newEntity{ base="BASE_NPC_HORROR", define_as = "DISTORTED_BLADE", type = "construct", subtype = "weapon", image="object/artifact/distorted_animated_sword.png", name = "Distorted Animated Sword", unique=true, color = colors.GREY, - desc = [[This floating weapon shifts and shimmers, time and space warping and bending as it moves. It appears to vibrate, as if it may explode at any moment.]], + desc = _t[[This floating weapon shifts and shimmers, time and space warping and bending as it moves. It appears to vibrate, as if it may explode at any moment.]], level_range = {30, nil}, exp_worth = 0, max_life = 100, life_rating = 10, rank = 3.5, @@ -1246,7 +1246,7 @@ newEntity{ base="BASE_NPC_HORROR", define_as = "DISTORTED_BLADE", on_act = function(self) self.paradox = self.paradox + 20 if self.summoner and self.summoner:attr("dead") then - game.logSeen(self, "#AQUAMARINE#The %s no longer seems to be controlled and clatters to the ground before vanishing into a rift.", self.name:capitalize()) + game.logSeen(self, "#AQUAMARINE#The %s no longer seems to be controlled and clatters to the ground before vanishing into a rift.", self:getName():capitalize()) self:die() end end, diff --git a/game/modules/tome/data/general/npcs/horror_aquatic.lua b/game/modules/tome/data/general/npcs/horror_aquatic.lua index 2b432f9b4ef4099061aec1cfd51f700f755d1bf9..0823e46facc693c834ac7c6e0a76758cd7d36f06 100644 --- a/game/modules/tome/data/general/npcs/horror_aquatic.lua +++ b/game/modules/tome/data/general/npcs/horror_aquatic.lua @@ -55,13 +55,13 @@ newEntity{ end end end end - game.logSeen(self, "#LIGHT_BLUE#%s explodes into a huge bubble of air!", self.name:capitalize()) + game.logSeen(self, "#LIGHT_BLUE#%s explodes into a huge bubble of air!", self:getName():capitalize()) end, } newEntity{ base = "BASE_NPC_HORROR_AQUATIC", name = "entrenched horror", color=colors.DARK_GREY, - desc ="This massive stony structure shifts and pulsates, its many long, thin tentacles probing the nearby water for food.", + desc =_t"This massive stony structure shifts and pulsates, its many long, thin tentacles probing the nearby water for food.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_aquatic_entrenched_horror.png", display_h=2, display_y=-1}}}, level_range = {15, nil}, exp_worth = 1, rarity = 3, @@ -90,7 +90,7 @@ newEntity{ base = "BASE_NPC_HORROR_AQUATIC", newEntity{ base = "BASE_NPC_HORROR_AQUATIC", name = "swarming horror", color=colors.GREY, - desc ="This tiny fish-like creature moves erratically, but is constantly surrounded by others of its kind.", + desc =_t"This tiny fish-like creature moves erratically, but is constantly surrounded by others of its kind.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_aquatic_swarming_horror.png", display_h=2, display_y=-1}}}, level_range = {10, nil}, exp_worth = 1, rarity = 2, @@ -113,7 +113,7 @@ newEntity{ base = "BASE_NPC_HORROR_AQUATIC", newEntity{ base = "BASE_NPC_HORROR_AQUATIC", name = "ravenous horror", color=colors.GREY, - desc ="A vile looking liquid flows from the teeth of this agile monster. It glides through the water towards you, spined fins jutting outwards.", + desc =_t"A vile looking liquid flows from the teeth of this agile monster. It glides through the water towards you, spined fins jutting outwards.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_aquatic_ravenous_horror.png", display_h=2, display_y=-1}}}, level_range = {10, nil}, exp_worth = 1, rarity = 2, @@ -132,7 +132,7 @@ newEntity{ base = "BASE_NPC_HORROR_AQUATIC", newEntity{ base = "BASE_NPC_HORROR_AQUATIC", name = "boiling horror", color=colors.BLUE, - desc ="This frothing ball of water rages with an intense heat.", + desc =_t"This frothing ball of water rages with an intense heat.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_aquatic_boiling_horror.png", display_h=2, display_y=-1}}}, level_range = {14, nil}, exp_worth = 1, rarity = 4, @@ -161,7 +161,7 @@ newEntity{ base = "BASE_NPC_HORROR_AQUATIC", newEntity{ base = "BASE_NPC_HORROR_AQUATIC", name = "swarm hive", color=colors.BLACK, - desc ="This titanic mass of flesh pulsates and churns as tiny monsters burst from its orifices.", + desc =_t"This titanic mass of flesh pulsates and churns as tiny monsters burst from its orifices.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_aquatic_swarm_hive.png", display_h=2, display_y=-1}}}, level_range = {15, nil}, exp_worth = 1, rarity = 6, @@ -191,7 +191,7 @@ newEntity{ base = "BASE_NPC_HORROR_AQUATIC", newEntity{ base = "BASE_NPC_HORROR_AQUATIC", name = "abyssal horror", color=colors.BLACK, - desc = "This pitch black form is shrouded in darkness. All you can make out are a pair of deep red eyes, hidden behind a mass of tentacles.", + desc = _t"This pitch black form is shrouded in darkness. All you can make out are a pair of deep red eyes, hidden behind a mass of tentacles.", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_aquatic_abyssal_horror.png", display_h=2, display_y=-1}}}, level_range = {16, nil}, exp_worth = 1, rarity = 12, --Scary but rare diff --git a/game/modules/tome/data/general/npcs/horror_temporal.lua b/game/modules/tome/data/general/npcs/horror_temporal.lua index 6bf925a4f9a7528458d123e3f9945379d79fcd3d..04b798df50125547d0a8bb8114a17fd99629dbb2 100644 --- a/game/modules/tome/data/general/npcs/horror_temporal.lua +++ b/game/modules/tome/data/general/npcs/horror_temporal.lua @@ -48,7 +48,7 @@ newEntity{ newEntity{ base = "BASE_NPC_HORROR_TEMPORAL", dredge = 1, name = "dredgling", color=colors.TAN, - desc = "A small pink-skinned humanoid with large bulbous eyes.", + desc = _t"A small pink-skinned humanoid with large bulbous eyes.", level_range = {10, nil}, exp_worth = 1, rarity = 1, rank = 2, @@ -71,7 +71,7 @@ newEntity{ base = "BASE_NPC_HORROR_TEMPORAL", subtype = "temporal", dredge = 1, name = "dredge", color=colors.PINK, - desc = "A hulking pink-skinned creature with long arms as thick as tree trunks. It drags its knuckles on the ground as it lumbers toward you.", + desc = _t"A hulking pink-skinned creature with long arms as thick as tree trunks. It drags its knuckles on the ground as it lumbers toward you.", level_range = {15, nil}, exp_worth = 1, rarity = 2, rank = 2, @@ -99,7 +99,7 @@ newEntity{ base = "BASE_NPC_HORROR_TEMPORAL", subtype = "temporal", dredge = 1, name = "dredge captain", color=colors.SALMON, - desc = "A thin pink-skinned creature with long spindly arms. Half its body is old and wrinkly, and the other half appears quite young.", + desc = _t"A thin pink-skinned creature with long spindly arms. Half its body is old and wrinkly, and the other half appears quite young.", level_range = {20, nil}, exp_worth = 1, rarity = 5, rank = 3, @@ -130,7 +130,7 @@ newEntity{ base = "BASE_NPC_HORROR_TEMPORAL", subtype = "temporal", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_temporal_temporal_stalker.png", display_h=2, display_y=-1}}}, name = "temporal stalker", color=colors.STEEL_BLUE, - desc = "A slender metallic monstrosity with long claws in place of fingers, and razor-sharp teeth.", + desc = _t"A slender metallic monstrosity with long claws in place of fingers, and razor-sharp teeth.", level_range = {20, nil}, exp_worth = 1, rarity = 3, size_category = 3, @@ -160,7 +160,7 @@ newEntity{ base = "BASE_NPC_HORROR_TEMPORAL", newEntity{ base = "BASE_NPC_HORROR_TEMPORAL", subtype = "temporal", name = "void horror", color=colors.GREY, - desc = "It looks like a hole in spacetime, but you get the impression it's somehow more than that.", + desc = _t"It looks like a hole in spacetime, but you get the impression it's somehow more than that.", level_range = {20, nil}, exp_worth = 1, rarity = 4, rank = 2, @@ -193,7 +193,7 @@ newEntity{ base = "BASE_NPC_HORROR_TEMPORAL", if t.type[1] == "chronomancy/anomalies" then ts[#ts+1] = id end end self:forceUseTalent(rng.table(ts), {ignore_energy=true}) - game.logSeen(self, "%s has collapsed in upon itself.", self.name:capitalize()) + game.logSeen(self, "%s has collapsed in upon itself.", self:getName():capitalize()) end, resolvers.sustains_at_birth(), diff --git a/game/modules/tome/data/general/npcs/jelly.lua b/game/modules/tome/data/general/npcs/jelly.lua index 02b4a2daca1a8c7267daa699706044a782886122..89ce8a0db6ec00ea39d0347e77dded71a832bd09 100644 --- a/game/modules/tome/data/general/npcs/jelly.lua +++ b/game/modules/tome/data/general/npcs/jelly.lua @@ -30,7 +30,7 @@ newEntity{ sound_moam = {"creatures/jelly/jelly_%d", 1, 3}, sound_die = {"creatures/jelly/jelly_die_%d", 1, 2}, sound_random = {"creatures/jelly/jelly_%d", 1, 3}, - desc = "A strange blob on the dungeon floor.", + desc = _t"A strange blob on the dungeon floor.", body = { INVEN = 10 }, autolevel = "summoner", ai = "dumb_talented_simple", ai_state = { talent_in=1, }, @@ -56,7 +56,7 @@ newEntity{ newEntity{ base = "BASE_NPC_JELLY", name = "green jelly", color=colors.GREEN, image="npc/jelly-green.png", blood_color = colors.GREEN, - desc = "A strange green blob on the dungeon floor.", + desc = _t"A strange green blob on the dungeon floor.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -72,7 +72,7 @@ newEntity{ base = "BASE_NPC_JELLY", newEntity{ base = "BASE_NPC_JELLY", name = "red jelly", color=colors.RED, image="npc/jelly-red.png", blood_color = colors.RED, - desc = "A strange red blob on the dungeon floor.", + desc = _t"A strange red blob on the dungeon floor.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -88,7 +88,7 @@ newEntity{ base = "BASE_NPC_JELLY", newEntity{ base = "BASE_NPC_JELLY", name = "blue jelly", color=colors.BLUE, image="npc/jelly-blue.png", blood_color = colors.BLUE, - desc = "A strange blue blob on the dungeon floor.", + desc = _t"A strange blue blob on the dungeon floor.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -104,7 +104,7 @@ newEntity{ base = "BASE_NPC_JELLY", newEntity{ base = "BASE_NPC_JELLY", name = "white jelly", color=colors.WHITE, image="npc/jelly-white.png", blood_color = colors.WHITE, - desc = "A strange white blob on the dungeon floor.", + desc = _t"A strange white blob on the dungeon floor.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -118,7 +118,7 @@ newEntity{ base = "BASE_NPC_JELLY", newEntity{ base = "BASE_NPC_JELLY", name = "yellow jelly", color=colors.YELLOW, image="npc/jelly-yellow.png", blood_color = colors.YELLOW, - desc = "A strange yellow blob on the dungeon floor.", + desc = _t"A strange yellow blob on the dungeon floor.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -134,7 +134,7 @@ newEntity{ base = "BASE_NPC_JELLY", newEntity{ base = "BASE_NPC_JELLY", name = "black jelly", color=colors.DARK_GREY, image="npc/jelly-darkgrey.png", blood_color = colors.DARK_GREY, - desc = "A strange black blob on the dungeon floor.", + desc = _t"A strange black blob on the dungeon floor.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -151,7 +151,7 @@ newEntity{ base = "BASE_NPC_JELLY", unique = true, name = "Malevolent Dimensional Jelly", color=colors.VIOLET, image="npc/jelly-darkgrey.png", blood_color = colors.VIOLET, - desc = "A strange black blob on the dungeon floor; through it you seem to be able to see other times and places. As you stare you see things moving out of it.", + desc = _t"A strange black blob on the dungeon floor; through it you seem to be able to see other times and places. As you stare you see things moving out of it.", level_range = {25, nil}, exp_worth = 1, rarity = 50, max_life = resolvers.rngavg(50,90), life_rating = 5, diff --git a/game/modules/tome/data/general/npcs/lich.lua b/game/modules/tome/data/general/npcs/lich.lua index 72ac1f2f4c5f9655866de1c948865e473b50e21e..5899d7a937480f808a7c78a7795c3e4602ebf0b5 100644 --- a/game/modules/tome/data/general/npcs/lich.lua +++ b/game/modules/tome/data/general/npcs/lich.lua @@ -22,7 +22,7 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ define_as = "BASE_NPC_LICH", type = "undead", subtype = "lich", - desc = [[Only the most powerful spellcasters raised to unlife become liches. Doomed to haunt the world for an eternity, they have grown to hate all that breathes or trespasses on their domain. Unfortunately that includes you.]], + desc = _t[[Only the most powerful spellcasters raised to unlife become liches. Doomed to haunt the world for an eternity, they have grown to hate all that breathes or trespasses on their domain. Unfortunately that includes you.]], display = "L", color=colors.WHITE, rank = 3, size = 3, @@ -75,7 +75,7 @@ newEntity{ newEntity{ base = "BASE_NPC_LICH", name = "lich", color=colors.DARK_BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_lich_lich.png", display_h=2, display_y=-1}}}, - desc=[[Having thought to discover life eternal, these beings have allowed undeath to rob them of the joys of life. Now they seek to destroy it as well.]], + desc=_t[[Having thought to discover life eternal, these beings have allowed undeath to rob them of the joys of life. Now they seek to destroy it as well.]], level_range = {35, nil}, exp_worth = 1, rarity = 20, max_life = resolvers.rngavg(70,80), @@ -109,7 +109,7 @@ newEntity{ base = "BASE_NPC_LICH", newEntity{ base = "BASE_NPC_LICH", name = "ancient lich", color=colors.DARK_RED, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_lich_ancient_lich.png", display_h=2, display_y=-1}}}, - desc=[[An elder being from a now-forgotten age, filled and fueled by its hate and rage toward all things living, it seeks to deprive all others of a prize it cannot have... life.]], + desc=_t[[An elder being from a now-forgotten age, filled and fueled by its hate and rage toward all things living, it seeks to deprive all others of a prize it cannot have... life.]], level_range = {40, nil}, exp_worth = 1, rarity = 25, max_life = resolvers.rngavg(80,90), @@ -143,7 +143,7 @@ newEntity{ base = "BASE_NPC_LICH", newEntity{ base = "BASE_NPC_LICH", name = "archlich", color=colors.SLATE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_lich_archlich.png", display_h=2, display_y=-1}}}, - desc=[[Blacker than the deepest night, this cold cruel form of darkness approaches. Long ago it laid aside its mortality, but it has not forgotten its power; rather, its malice and hate have bent this undead entity on the destruction of all things living.]], + desc=_t[[Blacker than the deepest night, this cold cruel form of darkness approaches. Long ago it laid aside its mortality, but it has not forgotten its power; rather, its malice and hate have bent this undead entity on the destruction of all things living.]], level_range = {45, nil}, exp_worth = 1, rarity = 30, max_life = resolvers.rngavg(100,150), @@ -179,7 +179,7 @@ newEntity{ base = "BASE_NPC_LICH", newEntity{ base = "BASE_NPC_LICH", name = "blood lich", color=colors.LIGHT_RED, - desc=[[The seething, pumping, disembodied blood of a horrendously powerful necromancer. To strike it is to bathe in the rivers of the Fearscape itself.]], + desc=_t[[The seething, pumping, disembodied blood of a horrendously powerful necromancer. To strike it is to bathe in the rivers of the Fearscape itself.]], level_range = {45, nil}, exp_worth = 1, rarity = 30, max_life = resolvers.rngavg(100,150), diff --git a/game/modules/tome/data/general/npcs/losgoroth.lua b/game/modules/tome/data/general/npcs/losgoroth.lua index 74a4a5da57061bee0912855babcbddf7edd349c8..5540a6ec5488b2ed98766fa48af6e995466a6837 100644 --- a/game/modules/tome/data/general/npcs/losgoroth.lua +++ b/game/modules/tome/data/general/npcs/losgoroth.lua @@ -24,7 +24,7 @@ newEntity{ type = "elemental", subtype = "void", blood_color = colors.DARK_GREY, display = "E", color=colors.DARK_GREY, - desc = [[Losgoroth are mighty void elementals, native to the void between the stars. They are rarely seen on a planet's surface.]], + desc = _t[[Losgoroth are mighty void elementals, native to the void between the stars. They are rarely seen on a planet's surface.]], faction = "cosmic-fauna", combat = { dam=resolvers.levelup(resolvers.mbonus(40, 15), 1, 1.2), atk=15, apr=15, dammod={mag=0.8}, damtype=DamageType.ARCANE }, @@ -72,7 +72,7 @@ newEntity{ base = "BASE_NPC_LOSGOROTH", newEntity{ base = "BASE_NPC_LOSGOROTH", name = "manaworm", color=colors.BLUE, level_range = {2, nil}, exp_worth = 1, - desc = [[Manaworms are losgoroth which feed on the mana of arcane users. If they ever come in contact with a spellcaster, they latch on and start draining mana away.]], + desc = _t[[Manaworms are losgoroth which feed on the mana of arcane users. If they ever come in contact with a spellcaster, they latch on and start draining mana away.]], rarity = 3, max_life = resolvers.rngavg(40,60), movement_speed = 0.7, diff --git a/game/modules/tome/data/general/npcs/major-demon.lua b/game/modules/tome/data/general/npcs/major-demon.lua index 898b1c60815e5a8aba1574165953b37b91b0207f..541ded991f951400e3294de06b2020082b254fa6 100644 --- a/game/modules/tome/data/general/npcs/major-demon.lua +++ b/game/modules/tome/data/general/npcs/major-demon.lua @@ -50,7 +50,7 @@ newEntity{ newEntity{ base = "BASE_NPC_MAJOR_DEMON", name = "dolleg", color=colors.GREEN, -- Dark thorn resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_dolleg.png", display_h=2, display_y=-1}}}, - desc = "A monstrous demon, covered in acidic thorns.", + desc = _t"A monstrous demon, covered in acidic thorns.", level_range = {30, nil}, exp_worth = 1, rarity = 1, rank = 2, @@ -73,7 +73,7 @@ newEntity{ base = "BASE_NPC_MAJOR_DEMON", newEntity{ base = "BASE_NPC_MAJOR_DEMON", name = "dúathedlen", color=colors.GREY, -- Darkness exiled resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_duathedlen.png", display_h=2, display_y=-1}}}, - desc = "Under a shroud of darkness you discern an evil shape.", + desc = _t"Under a shroud of darkness you discern an evil shape.", level_range = {30, nil}, exp_worth = 1, rarity = 1, rank = 2, @@ -95,7 +95,7 @@ newEntity{ base = "BASE_NPC_MAJOR_DEMON", newEntity{ base = "BASE_NPC_MAJOR_DEMON", name = "uruivellas", color=colors.LIGHT_RED, -- Hot strength resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_uruivellas.png", display_h=2, display_y=-1}}}, - desc = [[This demon would look like a minotaur, if a minotaur had a fiery aura surrounding it and horns all over its body. + desc = _t[[This demon would look like a minotaur, if a minotaur had a fiery aura surrounding it and horns all over its body. Oh, and it is twice as big, too.]], level_range = {35, nil}, exp_worth = 1, rarity = 4, @@ -128,7 +128,7 @@ Oh, and it is twice as big, too.]], newEntity{ base = "BASE_NPC_MAJOR_DEMON", name = "thaurhereg", color=colors.RED, -- Terrible blood resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_thaurhereg.png", display_h=2, display_y=-1}}}, - desc = [[This terrible demon is covered in blood, which flows *on* its skin in ever-changing patterns that disturb you simply when looking at it.]], + desc = _t[[This terrible demon is covered in blood, which flows *on* its skin in ever-changing patterns that disturb you simply when looking at it.]], level_range = {35, nil}, exp_worth = 1, rarity = 4, rank = 3, @@ -162,7 +162,7 @@ newEntity{ base = "BASE_NPC_MAJOR_DEMON", newEntity{ base = "BASE_NPC_MAJOR_DEMON", name = "daelach", color=colors.PURPLE, -- Shadow flame resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_daelach.png", display_h=2, display_y=-1}}}, - desc = [[You can only guess at the real shape of this demon. Its body is surrounded by a cloud of fiery darkness. + desc = _t[[You can only guess at the real shape of this demon. Its body is surrounded by a cloud of fiery darkness. It moves swiftly toward you, casting terrible spells and swinging its weapons at you.]], level_range = {39, nil}, exp_worth = 1, rarity = 6, @@ -202,7 +202,7 @@ It moves swiftly toward you, casting terrible spells and swinging its weapons at newEntity{ base = "BASE_NPC_MAJOR_DEMON", name = "champion of Urh'Rok", color=colors.GREY, - desc = [[One of Urh'Rok's own champions. A thousand nightmares made flesh and screaming steel tower before you in the form of a massive, armored humanoid.]], + desc = _t[[One of Urh'Rok's own champions. A thousand nightmares made flesh and screaming steel tower before you in the form of a massive, armored humanoid.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_champion_of_urh_rok.png", display_h=2, display_y=-1}}}, level_range = {43, nil}, exp_worth = 1, rarity = 7, @@ -247,7 +247,7 @@ newEntity{ base = "BASE_NPC_MAJOR_DEMON", newEntity{ base = "BASE_NPC_MAJOR_DEMON", name = "forge-giant", color=colors.RED, - desc = [[A burning giant wielding a forge hammer of the underworld in each hand -- weapons imbued by Urh'Rok himself with the power to crush and shape felsteel. Enter their range at your peril.]], + desc = _t[[A burning giant wielding a forge hammer of the underworld in each hand -- weapons imbued by Urh'Rok himself with the power to crush and shape felsteel. Enter their range at your peril.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_forge_giant.png", display_h=2, display_y=-1}}}, level_range = {47, nil}, exp_worth = 1, rarity = 8, @@ -296,7 +296,7 @@ newEntity{ base = "BASE_NPC_MAJOR_DEMON", name = "Khulmanar, General of Urh'Rok", color=colors.DARK_RED, unique=true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_general_of_urh_rok.png", display_h=2, display_y=-1}}}, - desc = [[This massive form, sheathed in dark flames, stands tall above a legion of lesser demons. In his hands he holds a massive blackened battleaxe, flames dancing around the blades.]], + desc = _t[[This massive form, sheathed in dark flames, stands tall above a legion of lesser demons. In his hands he holds a massive blackened battleaxe, flames dancing around the blades.]], level_range = {40, nil}, exp_worth = 1, rarity = 50, rank = 3.5, diff --git a/game/modules/tome/data/general/npcs/minor-demon.lua b/game/modules/tome/data/general/npcs/minor-demon.lua index 1b720d5398e66fef3f37ffa71d3ead3228fd63ae..abe86a3d69ddfbd08aa464388a4d96ec200b48b2 100644 --- a/game/modules/tome/data/general/npcs/minor-demon.lua +++ b/game/modules/tome/data/general/npcs/minor-demon.lua @@ -46,7 +46,7 @@ newEntity{ newEntity{ base = "BASE_NPC_DEMON", name = "fire imp", color=colors.CRIMSON, - desc = "A small demon, lobbing spells at you.", + desc = _t"A small demon, lobbing spells at you.", level_range = {10, nil}, exp_worth = 1, rarity = 3, rank = 2, @@ -65,7 +65,7 @@ newEntity{ base = "BASE_NPC_DEMON", newEntity{ base = "BASE_NPC_DEMON", name = "wretchling", color=colors.GREEN, - desc = "Acid oozes all over this small demon's skin. Beware, they tend to hunt in packs.", + desc = _t"Acid oozes all over this small demon's skin. Beware, they tend to hunt in packs.", level_range = {16, nil}, exp_worth = 1, rarity = 1, rank = 2, @@ -90,7 +90,7 @@ newEntity{ base = "BASE_NPC_DEMON", newEntity{ base = "BASE_NPC_DEMON", name = "quasit", color=colors.LIGHT_GREY, - desc = "A small, heavily armoured demon, rushing toward you.", + desc = _t"A small, heavily armoured demon, rushing toward you.", level_range = {20, nil}, exp_worth = 1, rarity = 1, rank = 2, diff --git a/game/modules/tome/data/general/npcs/minotaur.lua b/game/modules/tome/data/general/npcs/minotaur.lua index eeb943b8cbfb81a6cdf9f96da6d68ba0efb424ff..1b6ada0328f1165859243efe6384dfda219bee0d 100644 --- a/game/modules/tome/data/general/npcs/minotaur.lua +++ b/game/modules/tome/data/general/npcs/minotaur.lua @@ -57,7 +57,7 @@ newEntity{ newEntity{ base = "BASE_NPC_MINOTAUR", name = "minotaur", color=colors.UMBER, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_minotaur_minotaur.png", display_h=2, display_y=-1}}}, - desc = [[It is a cross between a human and a bull.]], + desc = _t[[It is a cross between a human and a bull.]], resolvers.auto_equip_filters("Berserker"), resolvers.equip{ {type="weapon", subtype="battleaxe", autoreq=true}, }, level_range = {10, nil}, exp_worth = 1, @@ -74,7 +74,7 @@ newEntity{ base = "BASE_NPC_MINOTAUR", newEntity{ base = "BASE_NPC_MINOTAUR", name = "maulotaur", color=colors.SLATE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_minotaur_maulotaur.png", display_h=2, display_y=-1}}}, - desc = [[A belligerent minotaur with a destructive magical arsenal, and armed with a hammer.]], + desc = _t[[A belligerent minotaur with a destructive magical arsenal, and armed with a hammer.]], level_range = {20, nil}, exp_worth = 1, rarity = 4, combat_armor = 15, combat_def = 7, diff --git a/game/modules/tome/data/general/npcs/molds.lua b/game/modules/tome/data/general/npcs/molds.lua index e71120a215081d6cb25786f2bf59c94a9e544dfd..1d0d44e8c3d3ced7390c9aac20fc29482e668756 100644 --- a/game/modules/tome/data/general/npcs/molds.lua +++ b/game/modules/tome/data/general/npcs/molds.lua @@ -24,7 +24,7 @@ newEntity{ type = "immovable", subtype = "molds", display = "m", color=colors.WHITE, blood_color = colors.PURPLE, - desc = "A strange growth on the dungeon floor.", + desc = _t"A strange growth on the dungeon floor.", body = { INVEN = 10 }, autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { talent_in=1, }, @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_MOLD", name = "grey mold", color=colors.SLATE, - desc = "A strange grey growth on the dungeon floor.", + desc = _t"A strange grey growth on the dungeon floor.", level_range = {1, 15}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -58,7 +58,7 @@ newEntity{ base = "BASE_NPC_MOLD", newEntity{ base = "BASE_NPC_MOLD", name = "brown mold", color=colors.UMBER, - desc = "A strange brown growth on the dungeon floor.", + desc = _t"A strange brown growth on the dungeon floor.", level_range = {2, 15}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(10,18), @@ -71,7 +71,7 @@ newEntity{ base = "BASE_NPC_MOLD", newEntity{ base = "BASE_NPC_MOLD", name = "shining mold", color=colors.YELLOW, - desc = "A strange luminescent growth on the dungeon floor.", + desc = _t"A strange luminescent growth on the dungeon floor.", level_range = {3, 15}, exp_worth = 1, rarity = 7, max_life = resolvers.rngavg(5,9), @@ -86,7 +86,7 @@ newEntity{ base = "BASE_NPC_MOLD", newEntity{ base = "BASE_NPC_MOLD", name = "green mold", color=colors.GREEN, - desc = "A strange sickly green growth on the dungeon floor.", + desc = _t"A strange sickly green growth on the dungeon floor.", level_range = {5, 15}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(10,18), @@ -103,7 +103,7 @@ newEntity{ base = "BASE_NPC_MOLD", type = "undead", subtype = "molds", name = "Z'quikzshl the skeletal mold", image = "npc/immovable_molds_skeletal_mold.png", display = 'm', color=colors.PURPLE, - desc = [[Steeped in fungal malevolence, this mold refused to die. How a mold becomes a skeleton, though, is beyond you. Are those its own bones, or the bones of hapless adventurers?]], + desc = _t[[Steeped in fungal malevolence, this mold refused to die. How a mold becomes a skeleton, though, is beyond you. Are those its own bones, or the bones of hapless adventurers?]], level_range = {10, nil}, exp_worth = 5, rarity = 50, diff --git a/game/modules/tome/data/general/npcs/multihued-drake.lua b/game/modules/tome/data/general/npcs/multihued-drake.lua index 637fc27f7a7620419d78a87eba09942accf7e85c..c2b59b540dbeb798277235f8973e830033349436 100644 --- a/game/modules/tome/data/general/npcs/multihued-drake.lua +++ b/game/modules/tome/data/general/npcs/multihued-drake.lua @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", name = "multi-hued drake hatchling", color=colors.PURPLE, display="d", - desc = [[A drake hatchling. Not too powerful by itself, but it usually comes with its brothers and sisters.]], + desc = _t[[A drake hatchling. Not too powerful by itself, but it usually comes with its brothers and sisters.]], level_range = {15, nil}, exp_worth = 1, rarity = 1, rank = 1, size_category = 2, @@ -66,7 +66,7 @@ newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", name = "multi-hued drake", color=colors.PURPLE, display="D", - desc = [[A mature multi-hued drake, armed with many deadly breath weapons and nasty claws.]], + desc = _t[[A mature multi-hued drake, armed with many deadly breath weapons and nasty claws.]], level_range = {25, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(150,170), @@ -98,7 +98,7 @@ newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", define_as = "GREATER_MULTI_HUED_WYRM", name = "greater multi-hued wyrm", color=colors.PURPLE, display="D", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_multihued_greater_multi_hued_wyrm.png", display_h=2, display_y=-1}}}, - desc = [[An old and powerful multi-hued drake, armed with many deadly breath weapons and nasty claws.]], + desc = _t[[An old and powerful multi-hued drake, armed with many deadly breath weapons and nasty claws.]], level_range = {35, nil}, exp_worth = 1, rarity = 8, rank = 3, @@ -140,7 +140,7 @@ newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", unique = true, name = "Ureslak the Prismatic", color=colors.VIOLET, display="D", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/drake_multi_ureslak.png", display_h=2, display_y=-1}}}, - desc = [[A huge multi-hued drake. It seems to shift color rapidly.]], + desc = _t[[A huge multi-hued drake. It seems to shift color rapidly.]], level_range = {35, nil}, exp_worth = 4, rarity = 50, rank = 3.5, @@ -213,7 +213,7 @@ newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", self.resists = t[2].resists self.talents = t[2].talents self.changed = true - game.logSeen(self, "#YELLOW#%s's skin turns %s!", self.name:capitalize(), t[1]) + game.logSeen(self, "#YELLOW#%s's skin turns %s!", self:getName():capitalize(), t[1]) end end, } diff --git a/game/modules/tome/data/general/npcs/naga.lua b/game/modules/tome/data/general/npcs/naga.lua index 5c68a7e5d89fc7e7d78557371e6f7008c0f32e99..fdd7b6bcfa0c778dae911b0193dfc1a705a35350 100644 --- a/game/modules/tome/data/general/npcs/naga.lua +++ b/game/modules/tome/data/general/npcs/naga.lua @@ -51,7 +51,7 @@ newEntity{ newEntity{ base = "BASE_NPC_NAGA", name = "naga myrmidon", color=colors.DARK_UMBER, image="npc/naga_myrmidon.png", - desc = [[Before you stands a tall figure -- a very tall figure, propped high by a thick serpent's tail in place of where his legs should rightly be. His torso is human-like, with bulging muscles beneath fitted armour, and large hands gripping a fiercely sharp trident. He glares at you with dark intensity, like a wolf about to pounce on unsuspecting prey.]], + desc = _t[[Before you stands a tall figure -- a very tall figure, propped high by a thick serpent's tail in place of where his legs should rightly be. His torso is human-like, with bulging muscles beneath fitted armour, and large hands gripping a fiercely sharp trident. He glares at you with dark intensity, like a wolf about to pounce on unsuspecting prey.]], level_range = {30, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(120,150), life_rating = 16, @@ -72,7 +72,7 @@ newEntity{ base = "BASE_NPC_NAGA", newEntity{ base = "BASE_NPC_NAGA", name = "naga tide huntress", color=colors.RED, image="npc/naga_tide_huntress.png", - desc = [[Though the sharp point of an arrow pointed steadily at your head is of concern, more unnerving is the creature that wields it: a slim and lithe woman from the waist up, but a terrifying giant serpent beneath, her tail stretching for several feet behind her. Her eyes turn cold and ice seems to magically condense on the tip of her barbed arrow. Suddenly it is of concern again.]], + desc = _t[[Though the sharp point of an arrow pointed steadily at your head is of concern, more unnerving is the creature that wields it: a slim and lithe woman from the waist up, but a terrifying giant serpent beneath, her tail stretching for several feet behind her. Her eyes turn cold and ice seems to magically condense on the tip of her barbed arrow. Suddenly it is of concern again.]], level_range = {34, nil}, exp_worth = 1, rarity = 4, rank = 3, @@ -101,7 +101,7 @@ newEntity{ base = "BASE_NPC_NAGA", newEntity{ base = "BASE_NPC_NAGA", name = "naga psyren", color=colors.YELLOW, image="npc/naga_psyren.png", - desc = [[Such a mix of enchanting beauty and revolting horror you have never before seen combined. Above, a beautiful, ethereal woman, of scant form and entrancing grace. Below, the thick, smooth scales of a snake, its stretched tail gently waving back and forth in the air behind her. The movement is eye-catching and hypnotic, and whilst you watch a mysterious smile plays across her seductive lips.]], + desc = _t[[Such a mix of enchanting beauty and revolting horror you have never before seen combined. Above, a beautiful, ethereal woman, of scant form and entrancing grace. Below, the thick, smooth scales of a snake, its stretched tail gently waving back and forth in the air behind her. The movement is eye-catching and hypnotic, and whilst you watch a mysterious smile plays across her seductive lips.]], level_range = {36, nil}, exp_worth = 1, rarity = 4, rank = 3, diff --git a/game/modules/tome/data/general/npcs/ogre.lua b/game/modules/tome/data/general/npcs/ogre.lua index 2546a128c136b5ed5fec7cc62566a7a96fbc9d86..1e98af078fca10b4a32fc223fd07891c95552138 100644 --- a/game/modules/tome/data/general/npcs/ogre.lua +++ b/game/modules/tome/data/general/npcs/ogre.lua @@ -44,7 +44,7 @@ newEntity{ newEntity{ base = "BASE_NPC_OGRE", name = "ogre guard", color=colors.LIGHT_GREY, - desc = [[A maul-wield ogre. Ready to CRUSH!]], + desc = _t[[A maul-wield ogre. Ready to CRUSH!]], resolvers.nice_tile{tall=1}, level_range = {20, nil}, exp_worth = 1, rarity = 2, @@ -61,7 +61,7 @@ newEntity{ base = "BASE_NPC_OGRE", newEntity{ base = "BASE_NPC_OGRE", name = "ogre warmaster", color=colors.CRIMSON, - desc = [[A master of combat, she is impatient to test her newfound skills.]], + desc = _t[[A master of combat, she is impatient to test her newfound skills.]], resolvers.nice_tile{tall=1}, female = 1, level_range = {21, nil}, exp_worth = 1, rarity = 4, @@ -85,7 +85,7 @@ newEntity{ base = "BASE_NPC_OGRE", newEntity{ base = "BASE_NPC_OGRE", name = "ogre mauler", color=colors.LIGHT_UMBER, - desc = [[Crush! Destroy! Maim!]], + desc = _t[[Crush! Destroy! Maim!]], resolvers.nice_tile{tall=1}, level_range = {22, nil}, exp_worth = 1, rarity = 2, @@ -102,7 +102,7 @@ newEntity{ base = "BASE_NPC_OGRE", newEntity{ base = "BASE_NPC_OGRE", name = "ogre pounder", color=colors.DARK_UMBER, - desc = [[This ogre closes in fast on you, arms open for the hug of death.]], + desc = _t[[This ogre closes in fast on you, arms open for the hug of death.]], resolvers.nice_tile{tall=1}, level_range = {20, nil}, exp_worth = 1, rarity = 3, @@ -123,7 +123,7 @@ newEntity{ base = "BASE_NPC_OGRE", newEntity{ base = "BASE_NPC_OGRE", name = "ogre rune-spinner", color=colors.LIGHT_RED, - desc = [[A towering ogre guard, her skin covered in runes and arcane designs.]], + desc = _t[[A towering ogre guard, her skin covered in runes and arcane designs.]], female = 1, resolvers.nice_tile{tall=1}, level_range = {23, nil}, exp_worth = 1, diff --git a/game/modules/tome/data/general/npcs/ooze.lua b/game/modules/tome/data/general/npcs/ooze.lua index c9ce03f3dfbd5d7473390daa93417fcf07c6ac87..1bf98e69eca03f485756c1e1b42be62e27aa1988 100644 --- a/game/modules/tome/data/general/npcs/ooze.lua +++ b/game/modules/tome/data/general/npcs/ooze.lua @@ -25,7 +25,7 @@ newEntity{ define_as = "BASE_NPC_OOZE", type = "vermin", subtype = "oozes", display = "j", color=colors.WHITE, - desc = "It's colorful and it's oozing.", + desc = _t"It's colorful and it's oozing.", sound_moam = {"creatures/jelly/jelly_%d", 1, 3}, sound_die = {"creatures/jelly/jelly_die_%d", 1, 2}, sound_random = {"creatures/jelly/jelly_%d", 1, 3}, @@ -55,7 +55,7 @@ newEntity{ newEntity{ base = "BASE_NPC_OOZE", name = "green ooze", color=colors.GREEN, blood_color = colors.GREEN, - desc = "It's green and it's oozing.", + desc = _t"It's green and it's oozing.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -65,7 +65,7 @@ newEntity{ base = "BASE_NPC_OOZE", newEntity{ base = "BASE_NPC_OOZE", name = "red ooze", color=colors.RED, blood_color = colors.RED, - desc = "It's red and it's oozing.", + desc = _t"It's red and it's oozing.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -75,7 +75,7 @@ newEntity{ base = "BASE_NPC_OOZE", newEntity{ base = "BASE_NPC_OOZE", name = "blue ooze", color=colors.BLUE, blood_color = colors.BLUE, - desc = "It's blue and it's oozing.", + desc = _t"It's blue and it's oozing.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -85,7 +85,7 @@ newEntity{ base = "BASE_NPC_OOZE", newEntity{ base = "BASE_NPC_OOZE", name = "white ooze", color=colors.WHITE, blood_color = colors.WHITE, - desc = "It's white and it's oozing.", + desc = _t"It's white and it's oozing.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -95,7 +95,7 @@ newEntity{ base = "BASE_NPC_OOZE", newEntity{ base = "BASE_NPC_OOZE", name = "yellow ooze", color=colors.YELLOW, blood_color = colors.YELLOW, - desc = "It's yellow and it's oozing.", + desc = _t"It's yellow and it's oozing.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -105,7 +105,7 @@ newEntity{ base = "BASE_NPC_OOZE", newEntity{ base = "BASE_NPC_OOZE", name = "black ooze", color=colors.BLACK, blood_color = colors.BLACK, - desc = "It's black and it's oozing.", + desc = _t"It's black and it's oozing.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -114,7 +114,7 @@ newEntity{ base = "BASE_NPC_OOZE", newEntity{ base = "BASE_NPC_OOZE", name = "gelatinous cube", color=colors.BLACK, - desc = [[It is a strange, vast gelatinous structure that assumes cubic proportions as it lines all four walls of the corridors it patrols. + desc = _t[[It is a strange, vast gelatinous structure that assumes cubic proportions as it lines all four walls of the corridors it patrols. Through its transparent jelly structure you can see treasures it has engulfed, and a few corpses as well.]], level_range = {12, nil}, exp_worth = 1, rarity = 3, @@ -126,7 +126,7 @@ Through its transparent jelly structure you can see treasures it has engulfed, a newEntity{ base = "BASE_NPC_OOZE", name = "crimson ooze", color=colors.CRIMSON, blood_color = colors.CRIMSON, - desc = "It's reddish and it's oozing.", + desc = _t"It's reddish and it's oozing.", level_range = {25, nil}, exp_worth = 1, rarity = 1, rank = 2, @@ -138,7 +138,7 @@ newEntity{ base = "BASE_NPC_OOZE", newEntity{ base = "BASE_NPC_OOZE", name = "brittle clear ooze", color=colors.WHITE, blood_color = colors.WHITE, - desc = "It's translucent and it's oozing.", + desc = _t"It's translucent and it's oozing.", level_range = {25, nil}, exp_worth = 1, rarity = 10, rank = 2, @@ -150,7 +150,7 @@ newEntity{ base = "BASE_NPC_OOZE", newEntity{ base = "BASE_NPC_OOZE", name = "slimy ooze", color=colors.GREEN, blood_color = colors.GREEN, - desc = "It's very slimy and it's oozing.", + desc = _t"It's very slimy and it's oozing.", level_range = {25, nil}, exp_worth = 1, rarity = 1, rank = 2, @@ -164,7 +164,7 @@ newEntity{ base = "BASE_NPC_OOZE", newEntity{ base = "BASE_NPC_OOZE", name = "poison ooze", color=colors.LIGHT_GREEN, blood_color = colors.LIGHT_GREEN, - desc = "It's very slimy and it's oozing.", + desc = _t"It's very slimy and it's oozing.", level_range = {25, nil}, exp_worth = 1, rarity = 1, rank = 2, @@ -178,7 +178,7 @@ newEntity{ base = "BASE_NPC_OOZE", --[[ newEntity{ base = "BASE_NPC_OOZE", name = "morphic ooze", color=colors.GREY, - desc = "Its shape changes every few seconds.", + desc = _t"Its shape changes every few seconds.", level_range = {25, nil}, exp_worth = 1, rarity = 1, rank = 3, diff --git a/game/modules/tome/data/general/npcs/orc-gorbat.lua b/game/modules/tome/data/general/npcs/orc-gorbat.lua index d1fcb52c051ebc1defa32f94e6d601a1d278cfef..c7e3ff2a1dc0aff9b954aac2016643a89ba817d0 100644 --- a/game/modules/tome/data/general/npcs/orc-gorbat.lua +++ b/game/modules/tome/data/general/npcs/orc-gorbat.lua @@ -61,7 +61,7 @@ local summoner_equip_filters = resolvers.auto_equip_filters{ newEntity{ base = "BASE_NPC_ORC_GORBAT", name = "orc summoner", color=colors.YELLOW, - desc = [[A fierce orc attuned to the wilds.]], + desc = _t[[A fierce orc attuned to the wilds.]], level_range = {30, nil}, exp_worth = 1, rarity = 1, rank = 2, @@ -91,7 +91,7 @@ newEntity{ base = "BASE_NPC_ORC_GORBAT", newEntity{ base = "BASE_NPC_ORC_GORBAT", name = "orc grand summoner", color=colors.SALMON, - desc = [[A fierce orc attuned to the wilds.]], + desc = _t[[A fierce orc attuned to the wilds.]], level_range = {30, nil}, exp_worth = 1, rarity = 4, rank = 3, @@ -126,7 +126,7 @@ newEntity{ base = "BASE_NPC_ORC_GORBAT", newEntity{ base = "BASE_NPC_ORC_GORBAT", name = "orc master wyrmic", color=colors.LIGHT_STEEL_BLUE, - desc = [[A fierce soldier-orc highly trained in the discipline of dragons.]], + desc = _t[[A fierce soldier-orc highly trained in the discipline of dragons.]], level_range = {30, nil}, exp_worth = 1, rarity = 4, rank = 3, @@ -160,7 +160,7 @@ newEntity{ base = "BASE_NPC_ORC_GORBAT", newEntity{ base = "BASE_NPC_ORC_GORBAT", name = "orc mage-hunter", color=colors.HONEYDEW, - desc = [[An orc clad in massive armour. Magic seems to die down all around him.]], + desc = _t[[An orc clad in massive armour. Magic seems to die down all around him.]], level_range = {30, nil}, exp_worth = 1, rarity = 4, rank = 3, diff --git a/game/modules/tome/data/general/npcs/orc-grushnak.lua b/game/modules/tome/data/general/npcs/orc-grushnak.lua index 2c58ce93237e811508607b3b6d6570748c3eb04f..17c1c27d7c3d12e8d3b8215b9a5ca57fc16a0ba2 100644 --- a/game/modules/tome/data/general/npcs/orc-grushnak.lua +++ b/game/modules/tome/data/general/npcs/orc-grushnak.lua @@ -53,7 +53,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", name = "orc fighter", color=colors.KHAKI, - desc = [[An orc clad in massive armour, wielding a shield and a deadly axe.]], + desc = _t[[An orc clad in massive armour, wielding a shield and a deadly axe.]], level_range = {30, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(110,120), life_rating = 14, @@ -78,7 +78,7 @@ newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", define_as = "ORC_ELITE_FIGHTER", name = "orc elite fighter", color=colors.MOCCASIN, - desc = [[An orc clad in massive armour, wielding a shield and a deadly axe.]], + desc = _t[[An orc clad in massive armour, wielding a shield and a deadly axe.]], level_range = {35, nil}, exp_worth = 1, rarity = 3, rank = 3, @@ -110,7 +110,7 @@ newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", define_as = "ORC_ELITE_FIGHTER", newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", name = "orc berserker", color=colors.SALMON, - desc = [[An orc clad in massive armour, wielding a huge axe.]], + desc = _t[[An orc clad in massive armour, wielding a huge axe.]], level_range = {35, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(110,120), life_rating = 14, @@ -133,7 +133,7 @@ newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", newEntity{ base = "BASE_NPC_ORC_GRUSHNAK", define_as = "ORC_ELITE_BERSERKER", name = "orc elite berserker", color=colors.YELLOW, - desc = [[An orc clad in massive armour, wielding a huge axe.]], + desc = _t[[An orc clad in massive armour, wielding a huge axe.]], level_range = {35, nil}, exp_worth = 1, rarity = 3, rank = 3, diff --git a/game/modules/tome/data/general/npcs/orc-rak-shor.lua b/game/modules/tome/data/general/npcs/orc-rak-shor.lua index 803b8d4beb45579f2e895c68e48264b91d6a4077..a9ccf0f3a75b180b67d6894a3c00a5483037f82d 100644 --- a/game/modules/tome/data/general/npcs/orc-rak-shor.lua +++ b/game/modules/tome/data/general/npcs/orc-rak-shor.lua @@ -51,7 +51,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ORC_RAK_SHOR", name = "orc necromancer", color=colors.DARK_GREY, - desc = [[An orc dressed in black robes. He mumbles in a harsh tongue.]], + desc = _t[[An orc dressed in black robes. He mumbles in a harsh tongue.]], level_range = {25, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(70,80), life_rating = 7, @@ -84,7 +84,7 @@ newEntity{ base = "BASE_NPC_ORC_RAK_SHOR", newEntity{ base = "BASE_NPC_ORC_RAK_SHOR", name = "orc blood mage", color=colors.CRIMSON, - desc = [[An orc dressed in blood-stained robes. He mumbles in a harsh tongue.]], + desc = _t[[An orc dressed in blood-stained robes. He mumbles in a harsh tongue.]], level_range = {27, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(110,120), life_rating = 12, @@ -108,7 +108,7 @@ newEntity{ base = "BASE_NPC_ORC_RAK_SHOR", newEntity{ base = "BASE_NPC_ORC_RAK_SHOR", name = "orc corruptor", color=colors.GREY, - desc = [[An orc dressed in putrid robes. He mumbles in a harsh tongue.]], + desc = _t[[An orc dressed in putrid robes. He mumbles in a harsh tongue.]], level_range = {27, nil}, exp_worth = 1, rarity = 4, rank = 3, diff --git a/game/modules/tome/data/general/npcs/orc-vor.lua b/game/modules/tome/data/general/npcs/orc-vor.lua index fd31b3c102f77306fdba7242da453e6dfe574b77..6eea2c607c1b98eb00c9eec2136d33183754a5ec 100644 --- a/game/modules/tome/data/general/npcs/orc-vor.lua +++ b/game/modules/tome/data/general/npcs/orc-vor.lua @@ -53,7 +53,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ORC_VOR", name = "orc pyromancer", color=colors.RED, - desc = [[An orc dressed in bright red robes. He mumbles in a harsh tongue.]], + desc = _t[[An orc dressed in bright red robes. He mumbles in a harsh tongue.]], level_range = {35, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(100,110), life_rating = 7, @@ -76,7 +76,7 @@ newEntity{ base = "BASE_NPC_ORC_VOR", newEntity{ base = "BASE_NPC_ORC_VOR", name = "orc high pyromancer", color=colors.LIGHT_RED, - desc = [[An orc dressed in bright red robes. He mumbles in a harsh tongue.]], + desc = _t[[An orc dressed in bright red robes. He mumbles in a harsh tongue.]], level_range = {37, nil}, exp_worth = 1, rarity = 4, max_life = resolvers.rngavg(100,110), life_rating = 10, @@ -107,7 +107,7 @@ newEntity{ base = "BASE_NPC_ORC_VOR", newEntity{ base = "BASE_NPC_ORC_VOR", name = "orc cryomancer", color=colors.BLUE, - desc = [[An orc dressed in cold blue robes. He mumbles in a harsh tongue.]], + desc = _t[[An orc dressed in cold blue robes. He mumbles in a harsh tongue.]], level_range = {35, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(100,110), life_rating = 10, @@ -130,7 +130,7 @@ newEntity{ base = "BASE_NPC_ORC_VOR", newEntity{ base = "BASE_NPC_ORC_VOR", name = "orc high cryomancer", color=colors.LIGHT_BLUE, - desc = [[An orc dressed in cold blue robes. He mumbles in a harsh tongue.]], + desc = _t[[An orc dressed in cold blue robes. He mumbles in a harsh tongue.]], level_range = {37, nil}, exp_worth = 1, rarity = 4, max_life = resolvers.rngavg(100,110), life_rating = 10, diff --git a/game/modules/tome/data/general/npcs/orc.lua b/game/modules/tome/data/general/npcs/orc.lua index 70868497c8359b4550d367473ee8c091c345e56a..d36ac7b2ad9536e578be9ad28da23061db0576de 100644 --- a/game/modules/tome/data/general/npcs/orc.lua +++ b/game/modules/tome/data/general/npcs/orc.lua @@ -49,7 +49,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ORC", define_as = "HILL_ORC_WARRIOR", name = "orc warrior", color=colors.LIGHT_UMBER, - desc = [[He is a hardy, well-weathered survivor.]], + desc = _t[[He is a hardy, well-weathered survivor.]], level_range = {10, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(70,80), @@ -70,7 +70,7 @@ newEntity{ base = "BASE_NPC_ORC", newEntity{ base = "BASE_NPC_ORC", define_as = "HILL_ORC_ARCHER", name = "orc archer", color=colors.UMBER, - desc = [[He is a hardy, well-weathered survivor.]], + desc = _t[[He is a hardy, well-weathered survivor.]], level_range = {10, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -93,7 +93,7 @@ newEntity{ base = "BASE_NPC_ORC", newEntity{ base = "BASE_NPC_ORC", define_as = "ORC", name = "orc soldier", color=colors.DARK_RED, - desc = [[A fierce soldier-orc.]], + desc = _t[[A fierce soldier-orc.]], level_range = {10, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(120,140), @@ -113,7 +113,7 @@ newEntity{ base = "BASE_NPC_ORC", define_as = "ORC", newEntity{ base = "BASE_NPC_ORC", define_as = "ORC_FIRE_WYRMIC", name = "fiery orc wyrmic", color=colors.RED, - desc = [[A fierce soldier-orc trained in the discipline of dragons.]], + desc = _t[[A fierce soldier-orc trained in the discipline of dragons.]], level_range = {11, nil}, exp_worth = 1, rarity = 6, rank = 3, @@ -143,7 +143,7 @@ newEntity{ base = "BASE_NPC_ORC", define_as = "ORC_FIRE_WYRMIC", newEntity{ base = "BASE_NPC_ORC", name = "icy orc wyrmic", color=colors.BLUE, define_as = "ORC_ICE_WYRMIC", - desc = [[A fierce soldier-orc trained in the discipline of dragons.]], + desc = _t[[A fierce soldier-orc trained in the discipline of dragons.]], level_range = {11, nil}, exp_worth = 1, rarity = 6, rank = 3, @@ -173,7 +173,7 @@ newEntity{ base = "BASE_NPC_ORC", newEntity{ base = "BASE_NPC_ORC", name = "orc assassin", color_r=0, color_g=0, color_b=resolvers.rngrange(175, 195), - desc = [[An orc trained in the secret ways of assassination, stealthy and deadly.]], + desc = _t[[An orc trained in the secret ways of assassination, stealthy and deadly.]], level_range = {12, nil}, exp_worth = 1, rarity = 3, infravision = 10, @@ -203,7 +203,7 @@ newEntity{ base = "BASE_NPC_ORC", newEntity{ base = "BASE_NPC_ORC", name = "orc master assassin", color_r=0, color_g=70, color_b=resolvers.rngrange(175, 195), - desc = [[An orc trained in the secret ways of assassination, stealthy and deadly.]], + desc = _t[[An orc trained in the secret ways of assassination, stealthy and deadly.]], level_range = {15, nil}, exp_worth = 1, rarity = 4, rank = 3, @@ -239,7 +239,7 @@ newEntity{ base = "BASE_NPC_ORC", newEntity{ base = "BASE_NPC_ORC", name = "orc grand master assassin", color_r=0, color_g=70, color_b=resolvers.rngrange(175, 195), - desc = [[An orc trained in the secret ways of assassination, stealthy and deadly.]], + desc = _t[[An orc trained in the secret ways of assassination, stealthy and deadly.]], level_range = {15, nil}, exp_worth = 1, rarity = 5, rank = 3, @@ -280,7 +280,7 @@ newEntity{ base = "BASE_NPC_ORC", name = "Kra'Tor the Gluttonous", unique = true, color=colors.DARK_KHAKI, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_orc_kra_tor_the_gluttonous.png", display_h=2, display_y=-1}}}, - desc = [[A morbidly obese orc with greasy pockmarked skin and oily long black hair. He's clad in plate mail and carries a huge granite battleaxe that's nearly as large as he is.]], + desc = _t[[A morbidly obese orc with greasy pockmarked skin and oily long black hair. He's clad in plate mail and carries a huge granite battleaxe that's nearly as large as he is.]], level_range = {38, nil}, exp_worth = 2, rarity = 50, rank = 3.5, diff --git a/game/modules/tome/data/general/npcs/plant.lua b/game/modules/tome/data/general/npcs/plant.lua index 5a6922f31752256c3d0a5441d5487a22fcba733c..5ce60d67c9e7199addcc51359c21bd38d80a9737 100644 --- a/game/modules/tome/data/general/npcs/plant.lua +++ b/game/modules/tome/data/general/npcs/plant.lua @@ -26,7 +26,7 @@ newEntity{ type = "immovable", subtype = "plants", display = "#", color=colors.WHITE, blood_color = colors.GREEN, - desc = "A not-so-strange growth on the dungeon floor.", + desc = _t"A not-so-strange growth on the dungeon floor.", body = { INVEN = 10 }, autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { talent_in=3, }, @@ -43,7 +43,7 @@ newEntity{ newEntity{ base = "BASE_NPC_PLANT", name = "giant venus flytrap", color=colors.GREEN, - desc = "This flesh-eating plant has grown to enormous proportions and seeks to quell its hunger.", + desc = _t"This flesh-eating plant has grown to enormous proportions and seeks to quell its hunger.", level_range = {7, 17}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(5,9), @@ -56,7 +56,7 @@ newEntity{ base = "BASE_NPC_PLANT", newEntity{ base = "BASE_NPC_PLANT", name = "treant", color=colors.GREEN, - desc = "A very strong near-sentient tree, which has become hostile to other living things.", + desc = _t"A very strong near-sentient tree, which has become hostile to other living things.", sound_moam = "creatures/treants/treeant_2", sound_die = {"creatures/treants/treeant_death_%d", 1, 2}, sound_random = {"creatures/treants/treeant_%d", 1, 3}, @@ -74,7 +74,7 @@ newEntity{ base = "BASE_NPC_PLANT", newEntity{ base = "BASE_NPC_PLANT", name = "poison ivy", color=colors.GREEN, - desc = "This harmless little plant makes you all itchy.", + desc = _t"This harmless little plant makes you all itchy.", level_range = {3, 25}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(1,1), @@ -89,7 +89,7 @@ newEntity{ base = "BASE_NPC_PLANT", newEntity{ base = "BASE_NPC_PLANT", name = "honey tree", color=colors.UMBER, - desc = "As you approach it, you hear a high-pitched buzzing sound.", + desc = _t"As you approach it, you hear a high-pitched buzzing sound.", sound_moam = "creatures/treanst/treeant_2", sound_die = {"creatures/treants/treeant_death_%d", 1, 2}, sound_random = {"creatures/treants/treeant_%d", 1, 3}, diff --git a/game/modules/tome/data/general/npcs/ritch.lua b/game/modules/tome/data/general/npcs/ritch.lua index 275f4ad20a9a0a4990fba327aadba768c773dffa..9595accfcdb9a925c63de6bad8f1b0cb515717c1 100644 --- a/game/modules/tome/data/general/npcs/ritch.lua +++ b/game/modules/tome/data/general/npcs/ritch.lua @@ -24,7 +24,7 @@ newEntity{ type = "insect", subtype = "ritch", display = "I", color=colors.RED, blood_color = colors.GREEN, - desc = [[Ritches are giant insects native to the arid wastes of the southern parts of the Far East. + desc = _t[[Ritches are giant insects native to the arid wastes of the southern parts of the Far East. Vicious predators, they inject corrupting diseases into their foes, and their sharp claws cut through most armours.]], combat = { dam=resolvers.levelup(resolvers.rngavg(30,35), 1, 1), atk=16, apr=70, damtype=DamageType.BLIGHT, dammod={dex=1.2} }, diff --git a/game/modules/tome/data/general/npcs/rodent.lua b/game/modules/tome/data/general/npcs/rodent.lua index 9d07423ffea5bdd409d85adddd373ea6ba1226d8..d8c6e7c3bc9a347bd0b0e322d312a937fcdf3bad 100644 --- a/game/modules/tome/data/general/npcs/rodent.lua +++ b/game/modules/tome/data/general/npcs/rodent.lua @@ -92,7 +92,7 @@ newEntity{ base = "BASE_NPC_RODENT", newEntity{ base = "BASE_NPC_RODENT", name = "giant rabbit", color=colors.UMBER, - desc = [[Kill the wabbit, kill the wabbit, kill the wabbbbbiiiiiit.]], + desc = _t[[Kill the wabbit, kill the wabbit, kill the wabbbbbiiiiiit.]], level_range = {1, 4}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(20,30), @@ -105,7 +105,7 @@ newEntity{ base = "BASE_NPC_RODENT", newEntity{ base = "BASE_NPC_RODENT", name = "giant crystal rat", color=colors.PINK, - desc = [[Instead of fur, this rat has crystals growing on its back, which provide extra protection.]], + desc = _t[[Instead of fur, this rat has crystals growing on its back, which provide extra protection.]], level_range = {1, 5}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(35,50), diff --git a/game/modules/tome/data/general/npcs/sandworm.lua b/game/modules/tome/data/general/npcs/sandworm.lua index 69a354434ef16e50d32cd72fb9e28a0d85e9f23e..7c631f87817c9527cb3489935214c66d26c5b1c8 100644 --- a/game/modules/tome/data/general/npcs/sandworm.lua +++ b/game/modules/tome/data/general/npcs/sandworm.lua @@ -50,14 +50,14 @@ newEntity{ newEntity{ base = "BASE_NPC_SANDWORM", name = "sandworm", - desc = [[A huge worm coloured as the sand it inhabits. It seems quite unhappy about you being in its lair.]], + desc = _t[[A huge worm coloured as the sand it inhabits. It seems quite unhappy about you being in its lair.]], rarity = 1, } newEntity{ base = "BASE_NPC_SANDWORM", name = "sandworm destroyer", color={r=169,g=168,b=52}, - desc = [[A huge worm coloured as the sand it inhabits. This particular sandworm seems to have been bred for one purpose only: the eradication of everything that is non-sandworm, such as... you.]], + desc = _t[[A huge worm coloured as the sand it inhabits. This particular sandworm seems to have been bred for one purpose only: the eradication of everything that is non-sandworm, such as... you.]], rarity = 3, resolvers.talents{ @@ -70,7 +70,7 @@ newEntity{ base = "BASE_NPC_SANDWORM", name = "sand-drake", display = 'D', type = "dragon", subtype = "sand", color={r=204,g=255,b=95}, - desc = [[This unholy creature looks like a wingless dragon in shape, but it is sand-colored, making it all the more dangerous for its prey.]], + desc = _t[[This unholy creature looks like a wingless dragon in shape, but it is sand-colored, making it all the more dangerous for its prey.]], rarity = 5, rank = 3, size_category = 5, @@ -87,7 +87,7 @@ newEntity{ base = "BASE_NPC_SANDWORM", newEntity{ base = "BASE_NPC_SANDWORM", name = "gigantic sandworm tunneler", color=colors.LIGHT_UMBER, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/vermin_sandworm_gigantic_sandworm_tunneler.png", display_h=2, display_y=-1}}}, - desc = "The ground shakes as this huge worm burrows towards you, its gigantic mouth just as capable of devouring flesh as stone.", + desc = _t"The ground shakes as this huge worm burrows towards you, its gigantic mouth just as capable of devouring flesh as stone.", level_range = {20, nil}, exp_worth = 1, rarity = 2, size_category = 4, @@ -113,7 +113,7 @@ newEntity{ base = "BASE_NPC_SANDWORM", newEntity{ base = "BASE_NPC_SANDWORM", name = "gigantic gravity worm", color=colors.UMBER, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/vermin_sandworm_gigantic_gravity_worm.png", display_h=2, display_y=-1}}}, - desc = "Space and time seem to bend around this huge worm.", + desc = _t"Space and time seem to bend around this huge worm.", level_range = {20, nil}, exp_worth = 1, rarity = 5, size_category = 4, @@ -134,7 +134,7 @@ newEntity{ base = "BASE_NPC_SANDWORM", newEntity{ base = "BASE_NPC_SANDWORM", name = "gigantic corrosive tunneler", color=colors.GREEN, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/vermin_sandworm_gigantic_corrosive_tunneler.png", display_h=2, display_y=-1}}}, - desc = "This huge worm burrows through the earth using its powerful corrosive saliva.", + desc = _t"This huge worm burrows through the earth using its powerful corrosive saliva.", level_range = {20, nil}, exp_worth = 1, rarity = 3, size_category = 4, @@ -163,6 +163,6 @@ newEntity{ base = "BASE_NPC_SANDWORM", 5, nil, engine.MapEffect.new{color_br=150, color_bg=150, color_bb=150, effect_shader="shader_images/poison_effect.png"} ) - game.logSeen(self, "%s explodes in an acidic cloud.", self.name:capitalize()) + game.logSeen(self, "%s explodes in an acidic cloud.", self:getName():capitalize()) end, } diff --git a/game/modules/tome/data/general/npcs/shade.lua b/game/modules/tome/data/general/npcs/shade.lua index 99060dd0a50e18dd258a674be8f1cd2e30aee967..7933c103973abdb29c94a2dc485bf4f17a62d045 100644 --- a/game/modules/tome/data/general/npcs/shade.lua +++ b/game/modules/tome/data/general/npcs/shade.lua @@ -96,18 +96,18 @@ newEntity{ newEntity{ base = "BASE_NPC_SHADE", rarity = 1, level_range = {30, nil}, - desc = [[Through some terrible process that remains mysterious, this creature's shadow has been torn from its body and given unlife.]], + desc = _t[[Through some terrible process that remains mysterious, this creature's shadow has been torn from its body and given unlife.]], shade_filter = {type="animal", special_rarity="shade_rarity"}, } newEntity{ base = "BASE_NPC_SHADE", rarity = 1, level_range = {30, nil}, - desc = [[Through some terrible process that remains mysterious, this creature's shadow has been torn from its body and given unlife.]], + desc = _t[[Through some terrible process that remains mysterious, this creature's shadow has been torn from its body and given unlife.]], shade_filter = {type="humanoid", special_rarity="shade_rarity"}, } newEntity{ base = "BASE_NPC_SHADE", rarity = 1, level_range = {30, nil}, - desc = [[Through some terrible process that remains mysterious, this creature's shadow has been torn from its body and given unlife.]], + desc = _t[[Through some terrible process that remains mysterious, this creature's shadow has been torn from its body and given unlife.]], shade_filter = {type="giant", special_rarity="shade_rarity"}, } diff --git a/game/modules/tome/data/general/npcs/shivgoroth.lua b/game/modules/tome/data/general/npcs/shivgoroth.lua index 28e37a6b8f6b724903eff05d01e2dc4905d4317e..59c755e7c774db4524108195cd9429af170bc56a 100644 --- a/game/modules/tome/data/general/npcs/shivgoroth.lua +++ b/game/modules/tome/data/general/npcs/shivgoroth.lua @@ -56,7 +56,7 @@ newEntity{ newEntity{ base = "BASE_NPC_SHIVGOROTH", name = "shivgoroth", color=colors.BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_ice_shivgoroth.png", display_h=2, display_y=-1}}}, - desc = [[Shivgoroth are mighty ice elementals, torn away from their home world by a powerful magic.]], + desc = _t[[Shivgoroth are mighty ice elementals, torn away from their home world by a powerful magic.]], level_range = {10, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(70,80), @@ -71,7 +71,7 @@ newEntity{ base = "BASE_NPC_SHIVGOROTH", newEntity{ base = "BASE_NPC_SHIVGOROTH", name = "greater shivgoroth", color=colors.DARK_BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_ice_greater_shivgoroth.png", display_h=2, display_y=-1}}}, - desc = [[Shivgoroth are mighty ice elementals, torn away from their home world by a powerful magic.]], + desc = _t[[Shivgoroth are mighty ice elementals, torn away from their home world by a powerful magic.]], level_range = {12, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(70,80), life_rating = 10, @@ -88,7 +88,7 @@ newEntity{ base = "BASE_NPC_SHIVGOROTH", newEntity{ base = "BASE_NPC_SHIVGOROTH", name = "ultimate shivgoroth", color=colors.CADET_BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_ice_ultimate_shivgoroth.png", display_h=2, display_y=-1}}}, - desc = [[Shivgoroth are mighty ice elementals, torn away from their home world by a powerful magic.]], + desc = _t[[Shivgoroth are mighty ice elementals, torn away from their home world by a powerful magic.]], level_range = {15, nil}, exp_worth = 1, rarity = 5, rank = 3, diff --git a/game/modules/tome/data/general/npcs/skeleton.lua b/game/modules/tome/data/general/npcs/skeleton.lua index 3c12951aed300fa170f022e842150345f857c159..4837bb2b83be22808c9af6a22f872e44401e11a7 100644 --- a/game/modules/tome/data/general/npcs/skeleton.lua +++ b/game/modules/tome/data/general/npcs/skeleton.lua @@ -57,7 +57,7 @@ newEntity{ newEntity{ base = "BASE_NPC_SKELETON", name = "degenerated skeleton warrior", color=colors.WHITE, image="npc/degenerated_skeleton_warrior.png", - desc=[[A haphazard collection of crumbling bones, with jerky movements that remind you of a child playing with a marionette. It only has one arm, but that's all it needs to hold a sword.]], + desc=_t[[A haphazard collection of crumbling bones, with jerky movements that remind you of a child playing with a marionette. It only has one arm, but that's all it needs to hold a sword.]], level_range = {1, 18}, exp_worth = 1, rarity = 1, resolvers.equip{ {type="weapon", subtype="greatsword", forbid_power_source={antimagic=true}, autoreq=true} }, @@ -67,7 +67,7 @@ newEntity{ base = "BASE_NPC_SKELETON", newEntity{ base = "BASE_NPC_SKELETON", name = "degenerated skeleton archer", color=colors.UMBER, - desc=[[A frail skeleton; just about the only bones that aren't cracked are its arms. It's missing a hand, but a notch has been carved into its wrist to let it pull back a bowstring regardless.]], + desc=_t[[A frail skeleton; just about the only bones that aren't cracked are its arms. It's missing a hand, but a notch has been carved into its wrist to let it pull back a bowstring regardless.]], level_range = {3, 20}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -81,7 +81,7 @@ newEntity{ base = "BASE_NPC_SKELETON", newEntity{ base = "BASE_NPC_SKELETON", name = "skeleton mage", color=colors.LIGHT_RED, image="npc/skeleton_mage.png", - desc=[[Given its condition, you're less inclined to think this skeleton knows proper spells, rather than simply disgorging its magical energy as it breaks down. This doesn't make it much less dangerous to be around, mind you.]], + desc=_t[[Given its condition, you're less inclined to think this skeleton knows proper spells, rather than simply disgorging its magical energy as it breaks down. This doesn't make it much less dangerous to be around, mind you.]], level_range = {5, 25}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(50,60), @@ -101,7 +101,7 @@ newEntity{ base = "BASE_NPC_SKELETON", newEntity{ base = "BASE_NPC_SKELETON", name = "skeleton warrior", color=colors.SLATE, image="npc/skeleton_warrior.png", - desc=[[The forces binding this skeleton together are resilient enough to let it hold a shield and swing a weapon as well as it could have in life. It's still wearing its old armor, in rusty but servicable condition.]], + desc=_t[[The forces binding this skeleton together are resilient enough to let it hold a shield and swing a weapon as well as it could have in life. It's still wearing its old armor, in rusty but servicable condition.]], level_range = {7, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(90,100), @@ -113,7 +113,7 @@ newEntity{ base = "BASE_NPC_SKELETON", newEntity{ base = "BASE_NPC_SKELETON", name = "skeleton archer", color=colors.UMBER, image="npc/skeleton_archer.png", - desc=[[Nobody scavenged the high-quality bow from this archer before it was raised from the dead. You're about to wish the world had more grave-robbers.]], + desc=_t[[Nobody scavenged the high-quality bow from this archer before it was raised from the dead. You're about to wish the world had more grave-robbers.]], level_range = {9, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -127,7 +127,7 @@ newEntity{ base = "BASE_NPC_SKELETON", newEntity{ base = "BASE_NPC_SKELETON", name = "skeleton magus", color=colors.LIGHT_RED, - desc=[[This skeleton has been imbued with far more magical energy than normal, and serves as a conduit of its master's spellcasting prowess.]], + desc=_t[[This skeleton has been imbued with far more magical energy than normal, and serves as a conduit of its master's spellcasting prowess.]], level_range = {11, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(50,60), @@ -148,7 +148,7 @@ newEntity{ base = "BASE_NPC_SKELETON", newEntity{ base = "BASE_NPC_SKELETON", name = "armoured skeleton warrior", color=colors.STEEL_BLUE, image="npc/armored_skeleton_warrior.png", - desc=[[It feels no pain. It moves with fluidity and strength that would tear natural muscles apart. It must be from a fresh corpse, since its bones, armor, and weapon are all in pristine condition. And it's furious.]], + desc=_t[[It feels no pain. It moves with fluidity and strength that would tear natural muscles apart. It must be from a fresh corpse, since its bones, armor, and weapon are all in pristine condition. And it's furious.]], level_range = {13, nil}, exp_worth = 1, rarity = 5, max_life = resolvers.rngavg(90,100), @@ -174,7 +174,7 @@ newEntity{ base = "BASE_NPC_SKELETON", newEntity{ base = "BASE_NPC_SKELETON", name = "skeleton master archer", color=colors.LIGHT_UMBER, image="npc/master_skeleton_archer.png", - desc=[[This skeleton can fire arrows and nock new ones with blinding speed. Arcane forces pull its bones with unnatural precision - its arms will never tremble or get tired.]], + desc=_t[[This skeleton can fire arrows and nock new ones with blinding speed. Arcane forces pull its bones with unnatural precision - its arms will never tremble or get tired.]], level_range = {15, nil}, exp_worth = 1, rarity = 5, max_life = resolvers.rngavg(70,80), @@ -192,7 +192,7 @@ newEntity{ base = "BASE_NPC_SKELETON", newEntity{ base = "BASE_NPC_SKELETON", name = "skeleton assassin", color=colors.DARK_BLUE, - desc=[[Most skeletons announce their presence with a chorus of rattling bones; this one's been charred black and has enough cartilage between its joints to muffle its approach. The first you'll see of it will be the flash of its blade.]], + desc=_t[[Most skeletons announce their presence with a chorus of rattling bones; this one's been charred black and has enough cartilage between its joints to muffle its approach. The first you'll see of it will be the flash of its blade.]], level_range = {20, nil}, exp_worth = 1, rarity = 15, max_life = resolvers.rngavg(90,100), diff --git a/game/modules/tome/data/general/npcs/snake.lua b/game/modules/tome/data/general/npcs/snake.lua index ef6585a6f396a5cef69135bc18d7d65fdaa3afe2..978b3141f7e376cd0416817069b159e452f40c18 100644 --- a/game/modules/tome/data/general/npcs/snake.lua +++ b/game/modules/tome/data/general/npcs/snake.lua @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_SNAKE", name = "large brown snake", color=colors.UMBER, image="npc/umber-snake.png", - desc = [[This large snake hisses at you, angry at being disturbed.]], + desc = _t[[This large snake hisses at you, angry at being disturbed.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(20,30), @@ -55,7 +55,7 @@ newEntity{ base = "BASE_NPC_SNAKE", newEntity{ base = "BASE_NPC_SNAKE", name = "large white snake", color=colors.WHITE, image="npc/white-snake.png", - desc = [[This large snake hisses at you, angry at being disturbed.]], + desc = _t[[This large snake hisses at you, angry at being disturbed.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(20,30), @@ -65,7 +65,7 @@ newEntity{ base = "BASE_NPC_SNAKE", newEntity{ base = "BASE_NPC_SNAKE", name = "copperhead snake", color=colors.SALMON, image="npc/salmon-snake.png", - desc = [[It has a copper head and sharp venomous fangs.]], + desc = _t[[It has a copper head and sharp venomous fangs.]], level_range = {2, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(30,40), @@ -77,7 +77,7 @@ newEntity{ base = "BASE_NPC_SNAKE", newEntity{ base = "BASE_NPC_SNAKE", name = "rattlesnake", color=colors.FIREBRICK, image="npc/firebrick-snake.png", - desc = [[As you approach, the snake coils up and rattles its tail threateningly.]], + desc = _t[[As you approach, the snake coils up and rattles its tail threateningly.]], level_range = {4, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(30,50), @@ -89,7 +89,7 @@ newEntity{ base = "BASE_NPC_SNAKE", newEntity{ base = "BASE_NPC_SNAKE", name = "king cobra", color=colors.GREEN, image="npc/green-snake.png", - desc = [[It is a large snake with a hooded face.]], + desc = _t[[It is a large snake with a hooded face.]], level_range = {5, nil}, exp_worth = 1, rarity = 4, max_life = resolvers.rngavg(40,70), @@ -101,7 +101,7 @@ newEntity{ base = "BASE_NPC_SNAKE", newEntity{ base = "BASE_NPC_SNAKE", name = "black mamba", color=colors.DARK_GREY, image="npc/darkgrey-snake.png", - desc = [[It has glistening black skin, a sleek body, and highly venomous fangs.]], + desc = _t[[It has glistening black skin, a sleek body, and highly venomous fangs.]], level_range = {15, nil}, exp_worth = 1, rarity = 4, max_life = resolvers.rngavg(50,80), @@ -114,7 +114,7 @@ newEntity{ base = "BASE_NPC_SNAKE", newEntity{ base = "BASE_NPC_SNAKE", name = "anaconda", color=colors.YELLOW_GREEN, image="npc/yellow-green-snake.png", - desc = [[You recoil in fear as you notice this gigantic snake. It seeks to crush the life out of you.]], + desc = _t[[You recoil in fear as you notice this gigantic snake. It seeks to crush the life out of you.]], level_range = {20, nil}, exp_worth = 1, rarity = 5, rank = 3, diff --git a/game/modules/tome/data/general/npcs/snow-giant.lua b/game/modules/tome/data/general/npcs/snow-giant.lua index 976c0fb11ac781877d0ba232c193d367bbf21d3c..c4777779bc383b4f298ce7f8cdda79190462aadb 100644 --- a/game/modules/tome/data/general/npcs/snow-giant.lua +++ b/game/modules/tome/data/general/npcs/snow-giant.lua @@ -51,7 +51,7 @@ newEntity{ newEntity{ base = "BASE_NPC_SNOW_GIANT", name = "snow giant", color=colors.WHITE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_ice_snow_giant.png", display_h=2, display_y=-1}}}, - desc = [[A towering creature, humanoid but huge. It wields a giant maul and does not look friendly.]], + desc = _t[[A towering creature, humanoid but huge. It wields a giant maul and does not look friendly.]], level_range = {10, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(100,120), @@ -63,7 +63,7 @@ newEntity{ base = "BASE_NPC_SNOW_GIANT", newEntity{ base = "BASE_NPC_SNOW_GIANT", name = "snow giant thunderer", color=colors.LIGHT_BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_ice_snow_giant_thunderer.png", display_h=2, display_y=-1}}}, - desc = [[A towering creature, humanoid but huge. It wields a giant maul and does not look friendly. Lightning crackles over its body.]], + desc = _t[[A towering creature, humanoid but huge. It wields a giant maul and does not look friendly. Lightning crackles over its body.]], level_range = {14, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(100,120), @@ -76,7 +76,7 @@ newEntity{ base = "BASE_NPC_SNOW_GIANT", newEntity{ base = "BASE_NPC_SNOW_GIANT", name = "snow giant boulder thrower", color=colors.UMBER, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_ice_snow_giant_boulder_thrower.png", display_h=2, display_y=-1}}}, - desc = [[A towering creature, humanoid but huge. It wields a giant maul and does not look friendly.]], + desc = _t[[A towering creature, humanoid but huge. It wields a giant maul and does not look friendly.]], level_range = {15, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(100,120), @@ -88,7 +88,7 @@ newEntity{ base = "BASE_NPC_SNOW_GIANT", newEntity{ base = "BASE_NPC_SNOW_GIANT", name = "snow giant chieftain", color=colors.AQUAMARINE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_ice_snow_giant_chieftain.png", display_h=2, display_y=-1}}}, - desc = [[A towering creature, humanoid but huge. It wields a giant maul and does not look friendly.]], + desc = _t[[A towering creature, humanoid but huge. It wields a giant maul and does not look friendly.]], level_range = {15, nil}, exp_worth = 1, rarity = 7, rank = 3, @@ -110,7 +110,7 @@ newEntity{ base = "BASE_NPC_SNOW_GIANT", define_as = "BURB_SNOW_GIANT", name = "Burb the snow giant champion", color=colors.VIOLET, unique=true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_ice_snow_giant_chieftain.png", display_h=2, display_y=-1}}}, - desc = [[A maddened, enraged snow giant that towers over his comrades. You've heard legends mentioning this particular monstrosity; they say that when he's not rampaging around frothing at the mouth, he sits, almost childlike, engraving stories and mysterious patterns on any flat stone surface he can find.]], + desc = _t[[A maddened, enraged snow giant that towers over his comrades. You've heard legends mentioning this particular monstrosity; they say that when he's not rampaging around frothing at the mouth, he sits, almost childlike, engraving stories and mysterious patterns on any flat stone surface he can find.]], level_range = {25, nil}, exp_worth = 10, autolevel = "warriormage", rarity = 10, diff --git a/game/modules/tome/data/general/npcs/spider.lua b/game/modules/tome/data/general/npcs/spider.lua index feeac4261c3177dc4ac47951db26705ac8af8cb1..ff5ad40a3a0f9eca1e8fd45f5cd002b039c2e987 100644 --- a/game/modules/tome/data/general/npcs/spider.lua +++ b/game/modules/tome/data/general/npcs/spider.lua @@ -23,7 +23,7 @@ newEntity{ define_as = "BASE_NPC_SPIDER", type = "spiderkin", subtype = "spider", display = "S", color=colors.WHITE, - desc = [[Arachnophobia...]], + desc = _t[[Arachnophobia...]], combat = { dam=resolvers.levelup(resolvers.mbonus(40, 70), 1, 0.9), atk=16, apr=9, damtype=DamageType.NATURE, dammod={dex=1.2} }, @@ -48,7 +48,7 @@ newEntity{ newEntity{ base = "BASE_NPC_SPIDER", name = "giant spider", color=colors.LIGHT_DARK, - desc = [[A huge arachnid, it produces even bigger webs.]], + desc = _t[[A huge arachnid, it produces even bigger webs.]], level_range = {5, nil}, exp_worth = 1, rarity = 1, max_life = 50, @@ -65,7 +65,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "spitting spider", color=colors.DARK_UMBER, - desc = [[A huge arachnid, it sprays venom at its prey.]], + desc = _t[[A huge arachnid, it sprays venom at its prey.]], level_range = {7, nil}, exp_worth = 1, rarity = 1, max_life = 60, @@ -83,7 +83,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "chitinous spider", color=colors.LIGHT_GREEN, - desc = [[A huge arachnid with a massive exoskeleton.]], + desc = _t[[A huge arachnid with a massive exoskeleton.]], level_range = {12, nil}, exp_worth = 1, rarity = 1, max_life = 70, @@ -100,7 +100,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "gaeramarth", color=colors.LIGHT_DARK, -- dreadful fate - desc = [[These cunning spiders terrorize those who enter the ever-growing borders of their lairs. Those who encounter them rarely return.]], + desc = _t[[These cunning spiders terrorize those who enter the ever-growing borders of their lairs. Those who encounter them rarely return.]], level_range = {27, nil}, exp_worth = 1, rarity = 3, max_life = 120, @@ -126,7 +126,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "ninurlhing", color=colors.DARK_GREEN, -- water burn spider (acidic) - desc = [[The air reeks with noxious fumes and the ground around it decays.]], + desc = _t[[The air reeks with noxious fumes and the ground around it decays.]], level_range = {27, nil}, exp_worth = 1, rarity = 3, max_life = 120, @@ -151,7 +151,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "faerlhing", color=colors.PURPLE, -- spirit spider (arcane) - desc = [[This spider seems to command the flow of mana, which pulses freely through its body.]], + desc = _t[[This spider seems to command the flow of mana, which pulses freely through its body.]], level_range = {27, nil}, exp_worth = 1, rarity = 4, max_life = 120, @@ -181,7 +181,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "ungolmor", color={0,0,0}, -- spider night, don't change the color - desc = [[Largest of all the spiderkin, its folds of skin seem nearly impenetrable.]], + desc = _t[[Largest of all the spiderkin, its folds of skin seem nearly impenetrable.]], level_range = {38, nil}, exp_worth = 1, rarity = 4, max_life = 120, @@ -209,7 +209,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "losselhing", color=colors.LIGHT_BLUE, -- snow star spider - desc = [[The air seems to freeze solid around this frigid spider.]], + desc = _t[[The air seems to freeze solid around this frigid spider.]], level_range = {27, nil}, exp_worth = 1, rarity = 4, max_life = 120, @@ -243,7 +243,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "weaver young", color=colors.LIGHT_STEEL_BLUE, - desc = [[A tiny arachnid that phases in and out of reality.]], + desc = _t[[A tiny arachnid that phases in and out of reality.]], level_range = {7, nil}, exp_worth = 1, rarity = 2, -- older weavers are much rarer, as they age they become less connected to the normal timeline max_life = 60, @@ -265,7 +265,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "weaver patriarch", color=colors.STEEL_BLUE, - desc = [[A large blue arachnid with white markings on its thorax. It shifts and shimmers as though only partially connected to the timeline.]], + desc = _t[[A large blue arachnid with white markings on its thorax. It shifts and shimmers as though only partially connected to the timeline.]], level_range = {27, nil}, exp_worth = 1, rarity = 12, -- the rarest of the weavers; they spend most of their time courting females in their home realm max_life = 120, @@ -292,7 +292,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "weaver matriarch", female =1, color=colors.DARK_BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/spiderkin_spider_weaver_matriarch.png", display_h=2, display_y=-1}}}, - desc = [[A large dark blue arachnid with a shifting yellow and white pattern on its thorax. It shifts and shimmers as though only partially connected to the timeline.]], + desc = _t[[A large dark blue arachnid with a shifting yellow and white pattern on its thorax. It shifts and shimmers as though only partially connected to the timeline.]], level_range = {38, nil}, exp_worth = 1, rarity = 6, -- rarer then most spiderkin; only encountered in Maj'Eyal while laying eggs or caring for her young size_category = 3, @@ -328,7 +328,7 @@ newEntity{ base = "BASE_NPC_SPIDER", color = colors.VIOLET, rarity = 50, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/spiderkin_spider_ninandra_the_great_weaver.png", display_h=2, display_y=-1}}}, - desc = [[A huge blue and white spiderkin whose form shifts and shimmers in and out of reality. She spins the threads of fate and binds the destiny of all within her web.]], + desc = _t[[A huge blue and white spiderkin whose form shifts and shimmers in and out of reality. She spins the threads of fate and binds the destiny of all within her web.]], level_range = {45, nil}, exp_worth = 4, max_life = 400, life_rating = 25, fixed_rating = true, rank = 3.5, diff --git a/game/modules/tome/data/general/npcs/storm-drake.lua b/game/modules/tome/data/general/npcs/storm-drake.lua index ade7823ae523841ca8bb1d1006ba17085641e53f..46ef27d05b0049cbd1d292a400e449cdac296741 100644 --- a/game/modules/tome/data/general/npcs/storm-drake.lua +++ b/game/modules/tome/data/general/npcs/storm-drake.lua @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_STORM_DRAKE", name = "storm drake hatchling", color=colors.BLUE, display="d", - desc = [[A drake hatchling. Not too powerful by itself, but it usually comes with its brothers and sisters.]], + desc = _t[[A drake hatchling. Not too powerful by itself, but it usually comes with its brothers and sisters.]], level_range = {8, nil}, exp_worth = 1, rarity = 1, rank = 1, size_category = 2, @@ -61,7 +61,7 @@ newEntity{ base = "BASE_NPC_STORM_DRAKE", newEntity{ base = "BASE_NPC_STORM_DRAKE", name = "storm drake", color=colors.BLUE, display="D", - desc = [[A mature storm drake, armed with deadly breath and nasty claws.]], + desc = _t[[A mature storm drake, armed with deadly breath and nasty claws.]], level_range = {14, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(100,110), @@ -83,7 +83,7 @@ newEntity{ base = "BASE_NPC_STORM_DRAKE", newEntity{ base = "BASE_NPC_STORM_DRAKE", name = "storm wyrm", color=colors.LIGHT_BLUE, display="D", - desc = [[An old and powerful storm drake, armed with deadly breath and nasty claws.]], + desc = _t[[An old and powerful storm drake, armed with deadly breath and nasty claws.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_storm_storm_wyrm.png", display_h=2, display_y=-1}}}, level_range = {25, nil}, exp_worth = 1, rarity = 5, diff --git a/game/modules/tome/data/general/npcs/sunwall-town.lua b/game/modules/tome/data/general/npcs/sunwall-town.lua index e98554e5463eda3158ee0637e12b714376110d95..10070e5bcec6a6780fa02559f443560cb6c3b821 100644 --- a/game/modules/tome/data/general/npcs/sunwall-town.lua +++ b/game/modules/tome/data/general/npcs/sunwall-town.lua @@ -44,7 +44,7 @@ newEntity{ newEntity{ base = "BASE_NPC_SUNWALL_TOWN", name = "human guard", color=colors.LIGHT_UMBER, - desc = [[A stern-looking guard, he will not let you disturb the town.]], + desc = _t[[A stern-looking guard, he will not let you disturb the town.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(70,80), @@ -63,7 +63,7 @@ newEntity{ base = "BASE_NPC_SUNWALL_TOWN", newEntity{ base = "BASE_NPC_SUNWALL_TOWN", name = "elven archer", subtype = "elf", color=colors.UMBER, - desc = [[A stern-looking guard, he will not let you disturb the town.]], + desc = _t[[A stern-looking guard, he will not let you disturb the town.]], level_range = {1, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(50,60), @@ -79,7 +79,7 @@ newEntity{ base = "BASE_NPC_SUNWALL_TOWN", newEntity{ base = "BASE_NPC_SUNWALL_TOWN", name = "human sun-paladin", color=colors.GOLD, - desc = [[A human in shiny plate armour.]], + desc = _t[[A human in shiny plate armour.]], level_range = {5, nil}, exp_worth = 1, rarity = 3, rank = 3, @@ -103,7 +103,7 @@ newEntity{ base = "BASE_NPC_SUNWALL_TOWN", newEntity{ base = "BASE_NPC_SUNWALL_TOWN", name = "elven sun-mage", subtype = "elf", color=colors.YELLOW, - desc = [[An elf dressed in glowing robes.]], + desc = _t[[An elf dressed in glowing robes.]], level_range = {3, nil}, exp_worth = 1, rarity = 3, rank = 3, diff --git a/game/modules/tome/data/general/npcs/swarm.lua b/game/modules/tome/data/general/npcs/swarm.lua index c3f2d2d37c53c0782ee4a05c6005d037ec34f0d4..98a6062b6c346a729d75a0ad0d095d31a15b885a 100644 --- a/game/modules/tome/data/general/npcs/swarm.lua +++ b/game/modules/tome/data/general/npcs/swarm.lua @@ -26,7 +26,7 @@ newEntity{ type = "insect", subtype = "swarms", display = "I", color=colors.WHITE, can_multiply = 2, - desc = "Buzzzzzzzzzzzzzzzzzzzzzzzzzzz.", + desc = _t"Buzzzzzzzzzzzzzzzzzzzzzzzzzzz.", body = { INVEN = 1 }, autolevel = "warrior", sound_moam = {"creatures/swarm/mswarm_%d", 1, 4}, @@ -50,7 +50,7 @@ newEntity{ newEntity{ base = "BASE_NPC_INSECT", name = "midge swarm", color=colors.UMBER, image="npc/midge_swarm.png", - desc = "A swarm of midges; they want blood.", + desc = _t"A swarm of midges; they want blood.", level_range = {1, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(1,2), @@ -62,7 +62,7 @@ newEntity{ base = "BASE_NPC_INSECT", newEntity{ base = "BASE_NPC_INSECT", name = "bee swarm", color=colors.GOLD, image="npc/bee_swarm.png", - desc = "They buzz at you threateningly, as you have gotten too close to their hive.", + desc = _t"They buzz at you threateningly, as you have gotten too close to their hive.", level_range = {2, 25}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(1,3), @@ -76,7 +76,7 @@ newEntity{ base = "BASE_NPC_INSECT", newEntity{ base = "BASE_NPC_INSECT", name = "hornet swarm", color=colors.YELLOW, image="npc/hornet_swarm.png", - desc = "You have intruded on their ground, and they will defend it at all costs.", + desc = _t"You have intruded on their ground, and they will defend it at all costs.", sound_moam = {"creatures/bee/bee_%d", 1, 4}, sound_die = "creatures/bee/bee_die", sound_random = {"creatures/bee/bee_%d", 1, 4}, @@ -93,7 +93,7 @@ newEntity{ base = "BASE_NPC_INSECT", newEntity{ base = "BASE_NPC_INSECT", name = "hummerhorn", color=colors.YELLOW, image="npc/hummerhorn.png", - desc = "A giant buzzing wasp, its stinger dripping venom.", + desc = _t"A giant buzzing wasp, its stinger dripping venom.", sound_moam = {"creatures/bee/bee_%d", 1, 4}, sound_die = "creatures/bee/bee_die", sound_random = {"creatures/bee/bee_%d", 1, 4}, diff --git a/game/modules/tome/data/general/npcs/telugoroth.lua b/game/modules/tome/data/general/npcs/telugoroth.lua index ef146d618d06270d03ef07fe75c7d3a736538a33..4f561ef17eedc3b97dd4b2a77659b15db3ecda8a 100644 --- a/game/modules/tome/data/general/npcs/telugoroth.lua +++ b/game/modules/tome/data/general/npcs/telugoroth.lua @@ -55,7 +55,7 @@ local function doTeluvortaSwap(self) game.logSeen(self, "The spell fizzles!") end else - game.logSeen(target, "%s resists the swap!", target.name:capitalize()) + game.logSeen(target, "%s resists the swap!", target:getName():capitalize()) end game:playSoundNear(self, "talents/teleport") end @@ -64,7 +64,7 @@ end newEntity{ define_as = "BASE_NPC_TELUGOROTH", -- telu goroth = time terror type = "elemental", subtype = "temporal", - killer_message = "and lost outside time", + killer_message = _t"and lost outside time", blood_color = colors.PURPLE, display = "E", color=colors.YELLOW, @@ -100,7 +100,7 @@ newEntity{ newEntity{ base = "BASE_NPC_TELUGOROTH", name = "telugoroth", color=colors.KHAKI, - desc = [[A temporal elemental, rarely encountered except by those who travel through time itself. Its blurred form constantly shifts before your eyes.]], + desc = _t[[A temporal elemental, rarely encountered except by those who travel through time itself. Its blurred form constantly shifts before your eyes.]], level_range = {10, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(70,80), @@ -114,7 +114,7 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", newEntity{ base = "BASE_NPC_TELUGOROTH", name = "greater telugoroth", color=colors.YELLOW, - desc = [[A temporal elemental, rarely encountered except by those who travel through time itself. Its blurred form constantly shifts before your eyes.]], + desc = _t[[A temporal elemental, rarely encountered except by those who travel through time itself. Its blurred form constantly shifts before your eyes.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_temporal_greater_telugoroth.png", display_h=2, display_y=-1}}}, level_range = {12, nil}, exp_worth = 1, rarity = 4, @@ -131,7 +131,7 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", newEntity{ base = "BASE_NPC_TELUGOROTH", name = "ultimate telugoroth", color=colors.GOLD, - desc = [[A temporal elemental, rarely encountered except by those who travel through time itself. Its blurred form constantly shifts before your eyes.]], + desc = _t[[A temporal elemental, rarely encountered except by those who travel through time itself. Its blurred form constantly shifts before your eyes.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_temporal_ultimate_telugoroth.png", display_h=2, display_y=-1}}}, level_range = {15, nil}, exp_worth = 1, rarity = 6, @@ -153,7 +153,7 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", -- telu vorta = time storm newEntity{ base = "BASE_NPC_TELUGOROTH", name = "teluvorta", color=colors.DARK_KHAKI, - desc = [[Time and space collapse in upon this erratically-moving time elemental.]], + desc = _t[[Time and space collapse in upon this erratically-moving time elemental.]], level_range = {12, nil}, exp_worth = 1, rarity = 4, max_life = resolvers.rngavg(50,70), @@ -179,7 +179,7 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", newEntity{ base = "BASE_NPC_TELUGOROTH", name = "greater teluvorta", color=colors.TAN, - desc = [[Time and space collapse in upon this erratically-moving time elemental.]], + desc = _t[[Time and space collapse in upon this erratically-moving time elemental.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_temporal_greater_teluvorta.png", display_h=2, display_y=-1}}}, level_range = {15, nil}, exp_worth = 1, rarity = 6, @@ -206,7 +206,7 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", newEntity{ base = "BASE_NPC_TELUGOROTH", name = "ultimate teluvorta", color=colors.DARK_TAN, - desc = [[Time and space collapse in upon this erratically-moving time elemental.]], + desc = _t[[Time and space collapse in upon this erratically-moving time elemental.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_temporal_ultimate_teluvorta.png", display_h=2, display_y=-1}}}, level_range = {18, nil}, exp_worth = 1, rarity = 8, diff --git a/game/modules/tome/data/general/npcs/thieve.lua b/game/modules/tome/data/general/npcs/thieve.lua index b1b47b11d5650c0f6747fca552871f30175f043a..9d48c52300a1aa4911c5746efd7c37f5df108be0 100644 --- a/game/modules/tome/data/general/npcs/thieve.lua +++ b/game/modules/tome/data/general/npcs/thieve.lua @@ -61,7 +61,7 @@ newEntity{ newEntity{ base = "BASE_NPC_THIEF", name = "cutpurse", color_r=0, color_g=0, color_b=resolvers.rngrange(235, 255), - desc = [[The lowest of the thieves, this cutpurse is just learning the tricks of the trade.]], + desc = _t[[The lowest of the thieves, this cutpurse is just learning the tricks of the trade.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, combat_armor = 1, combat_def = 5, @@ -71,7 +71,7 @@ newEntity{ base = "BASE_NPC_THIEF", newEntity{ base = "BASE_NPC_THIEF", name = "rogue", color_r=0, color_g=0, color_b=resolvers.rngrange(215, 235), - desc = [[Stronger than a cutpurse, this thief has been promoted.]], + desc = _t[[Stronger than a cutpurse, this thief has been promoted.]], level_range = {2, nil}, exp_worth = 1, rarity = 1, combat_armor = 2, combat_def = 5, @@ -81,7 +81,7 @@ newEntity{ base = "BASE_NPC_THIEF", newEntity{ base = "BASE_NPC_THIEF", name = "thief", color_r=0, color_g=0, color_b=resolvers.rngrange(195, 215), - desc = [[He eyes you and your belongings, then suddenly vanishes... strange, why is your pack lighter?]], + desc = _t[[He eyes you and your belongings, then suddenly vanishes... strange, why is your pack lighter?]], level_range = {3, nil}, exp_worth = 1, rarity = 1, combat_armor = 3, combat_def = 5, @@ -97,7 +97,7 @@ newEntity{ base = "BASE_NPC_THIEF", newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_BANDIT", name = "bandit", color_r=0, color_g=0, color_b=resolvers.rngrange(175, 195), - desc = [[These ruffians often employ brute force over thievery, but they are capable of stealing as well.]], + desc = _t[[These ruffians often employ brute force over thievery, but they are capable of stealing as well.]], level_range = {5, nil}, exp_worth = 1, rarity = 2, combat_armor = 4, combat_def = 6, @@ -111,7 +111,7 @@ newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_BANDIT", newEntity{ base = "BASE_NPC_THIEF", name = "bandit lord", color_r=resolvers.rngrange(75, 85), color_g=0, color_b=resolvers.rngrange(235, 255), - desc = [[He is the leader of a gang of bandits. Watch out for his underlings.]], + desc = _t[[He is the leader of a gang of bandits. Watch out for his underlings.]], level_range = {8, nil}, exp_worth = 1, rarity = 5, combat_armor = 5, combat_def = 7, @@ -138,7 +138,7 @@ newEntity{ base = "BASE_NPC_THIEF", newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_ASSASSIN", name = "assassin", color_r=resolvers.rngrange(0, 10), color_g=resolvers.rngrange(0, 10), color_b=resolvers.rngrange(0, 10), - desc = [[Before you looms a pair of eyes... a glint of steel... death.]], + desc = _t[[Before you looms a pair of eyes... a glint of steel... death.]], level_range = {12, nil}, exp_worth = 1, rarity = 3, combat_armor = 3, combat_def = 10, @@ -161,7 +161,7 @@ newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_ASSASSIN", newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_ASSASSIN", name = "shadowblade", color_r=resolvers.rngrange(0, 10), color_g=resolvers.rngrange(0, 10), color_b=resolvers.rngrange(100, 120), - desc = [[Stealthy fighters trying to achieve victory with trickery. Be careful or they will steal your life!]], + desc = _t[[Stealthy fighters trying to achieve victory with trickery. Be careful or they will steal your life!]], level_range = {14, nil}, exp_worth = 1, rarity = 4, combat_armor = 3, combat_def = 10, @@ -190,7 +190,7 @@ newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_ASSASSIN", newEntity{ base = "BASE_NPC_THIEF", define_as = "THIEF_SAPPER", name = "rogue sapper", color_r=resolvers.rngrange(0, 10), color_g=resolvers.rngrange(0, 10), color_b=resolvers.rngrange(0, 10), image = "npc/humanoid_human_assassin.png", - desc = [[Stealthy tricksters that leave a wake of deadfalls and other hazards. They really just make a mess of things.]], + desc = _t[[Stealthy tricksters that leave a wake of deadfalls and other hazards. They really just make a mess of things.]], level_range = {12, nil}, exp_worth = 1, rarity = 5, combat_armor = 3, combat_def = 10, diff --git a/game/modules/tome/data/general/npcs/troll.lua b/game/modules/tome/data/general/npcs/troll.lua index 5df3aee429d07411d93cf3d5eb272482ebea486b..ddb10f889a16da9e97e85ba5baf22eaa97235c97 100644 --- a/game/modules/tome/data/general/npcs/troll.lua +++ b/game/modules/tome/data/general/npcs/troll.lua @@ -53,7 +53,7 @@ newEntity{ newEntity{ base = "BASE_NPC_TROLL", name = "forest troll", color=colors.YELLOW_GREEN, image="npc/troll_f.png", - desc = [[Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists.]], + desc = _t[[Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(50,70), @@ -63,7 +63,7 @@ newEntity{ base = "BASE_NPC_TROLL", newEntity{ base = "BASE_NPC_TROLL", name = "stone troll", color=colors.DARK_SLATE_GRAY, image="npc/troll_s.png", - desc = [[A giant troll with scabrous black skin. With a shudder, you notice the belt of dwarf skulls around his massive waist.]], + desc = _t[[A giant troll with scabrous black skin. With a shudder, you notice the belt of dwarf skulls around his massive waist.]], level_range = {3, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(70,90), @@ -73,7 +73,7 @@ newEntity{ base = "BASE_NPC_TROLL", newEntity{ base = "BASE_NPC_TROLL", name = "cave troll", color=colors.SLATE, image="npc/troll_c.png", - desc = [[This huge troll wields a massive spear and has a disturbingly intelligent look in its piggy eyes.]], + desc = _t[[This huge troll wields a massive spear and has a disturbingly intelligent look in its piggy eyes.]], level_range = {7, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(120,140), @@ -83,7 +83,7 @@ newEntity{ base = "BASE_NPC_TROLL", newEntity{ base = "BASE_NPC_TROLL", name = "mountain troll", color=colors.UMBER, image="npc/troll_m.png", - desc = [[A large and athletic troll with an extremely tough and warty hide.]], + desc = _t[[A large and athletic troll with an extremely tough and warty hide.]], level_range = {12, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(120,140), @@ -93,7 +93,7 @@ newEntity{ base = "BASE_NPC_TROLL", newEntity{ base = "BASE_NPC_TROLL", name = "mountain troll thunderer", color=colors.AQUAMARINE, image="npc/troll_mt.png", - desc = [[A large and athletic troll with an extremely tough and warty hide.]], + desc = _t[[A large and athletic troll with an extremely tough and warty hide.]], level_range = {20, nil}, exp_worth = 1, rarity = 5, rank = 3, @@ -113,7 +113,7 @@ newEntity{ base = "BASE_NPC_TROLL", newEntity{ base = "BASE_NPC_TROLL", name = "patchwork troll", color=colors.PURPLE, - desc = [[A disgusting and mismatched construct of necromantically-enhanced troll bits and shattered weapons. Confused and furious, it rends and shatters its surroundings with impossible strength, moving with speed found nowhere in nature.]], + desc = _t[[A disgusting and mismatched construct of necromantically-enhanced troll bits and shattered weapons. Confused and furious, it rends and shatters its surroundings with impossible strength, moving with speed found nowhere in nature.]], resolvers.nice_tile{tall=1}, level_range = {38, nil}, exp_worth = 1, rarity = 6, @@ -145,7 +145,7 @@ newEntity{ base = "BASE_NPC_TROLL", newEntity{ base = "BASE_NPC_TROLL", unique=true, name = "Forest Troll Hedge-Wizard", color=colors.YELLOW_GREEN, resolvers.nice_tile{tall=1}, - desc = [[This old-looking troll glares at you with malice. His muscles appear atrophied, but a certain power surrounds him nonetheless.]], + desc = _t[[This old-looking troll glares at you with malice. His muscles appear atrophied, but a certain power surrounds him nonetheless.]], level_range = {3, nil}, exp_worth = 2, rank=3.5, rarity = 40, diff --git a/game/modules/tome/data/general/npcs/undead-rat.lua b/game/modules/tome/data/general/npcs/undead-rat.lua index 913e48eb6b47efec7a9cd34844efb7d81f2e28f1..ee6fce45cfd7db9ca3e49a38ec4507b5526df7aa 100644 --- a/game/modules/tome/data/general/npcs/undead-rat.lua +++ b/game/modules/tome/data/general/npcs/undead-rat.lua @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_UNDEAD_RAT", name = "skeletal rat", color=colors.WHITE, - desc = [[A skeletal rat, teeth and claws ground to a sharp point. It glares at you menacingly.]], + desc = _t[[A skeletal rat, teeth and claws ground to a sharp point. It glares at you menacingly.]], level_range = {5, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(25,45), @@ -63,12 +63,12 @@ newEntity{ base = "BASE_NPC_UNDEAD_RAT", [Talents.T_SKELETON_REASSEMBLE]={base=1, every=5, max=4}, }, - emote_random = {chance=1, "*squeak*", "Squeak!", "Squeak??", "SQUEAK!!!!!"}, + emote_random = {chance=1, _t"*squeak*", _t"Squeak!", _t"Squeak??", _t"SQUEAK!!!!!"}, } newEntity{ base = "BASE_NPC_UNDEAD_RAT", name = "ghoulish rat", color=colors.TAN, - desc = [[Layers of rotting skin are peeling off of this rat. One of the eye sockets appears empty.]], + desc = _t[[Layers of rotting skin are peeling off of this rat. One of the eye sockets appears empty.]], level_range = {6, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(34,56), @@ -88,12 +88,12 @@ newEntity{ base = "BASE_NPC_UNDEAD_RAT", [Talents.T_ROTTING_DISEASE]={base=1, every=7, max=4}, [Talents.T_GHOULISH_LEAP]={base=2, every=8, max=4}, }, - emote_random = {chance=1, "*s.q.u.e.a.k*", "Squeeeeeeak!", "Squeakkkkkkk??"}, + emote_random = {chance=1, _t"*s.q.u.e.a.k*", _t"Squeeeeeeak!", _t"Squeakkkkkkk??"}, } newEntity{ base = "BASE_NPC_UNDEAD_RAT", name = "spectral rat", color=colors.GREY, - desc = [[An eerie haze surrounds this translucent rat.]], + desc = _t[[An eerie haze surrounds this translucent rat.]], level_range = {9, nil}, exp_worth = 1, rarity = 3, rank = 2, @@ -124,12 +124,12 @@ newEntity{ base = "BASE_NPC_UNDEAD_RAT", resolvers.sustains_at_birth(), - emote_random = {chance=1, "Eerie Squeak!", "Frightening Squeak??", "SQUEAK!!!!!"}, + emote_random = {chance=1, _t"Eerie Squeak!", _t"Frightening Squeak??", _t"SQUEAK!!!!!"}, } newEntity{ base = "BASE_NPC_UNDEAD_RAT", name = "vampire rat", color=colors.WHITE, - desc = [[Looks much like a normal rat. That is, other than the very large fangs.]], + desc = _t[[Looks much like a normal rat. That is, other than the very large fangs.]], level_range = {8, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(45,60), @@ -146,12 +146,12 @@ newEntity{ base = "BASE_NPC_UNDEAD_RAT", [Talents.T_COLD_FLAMES]={base=1, every=9, max=5}, }, - emote_random = {chance=1, "Squeak! Blood!", "Squeak??", "SQUEAK!!!!!"}, + emote_random = {chance=1, _t"Squeak! Blood!", _t"Squeak??", _t"SQUEAK!!!!!"}, } newEntity{ base = "BASE_NPC_UNDEAD_RAT", name = "gigantic bone rat", color=colors.LIGHTGREY, - desc = [[This massive beast appears to be a rat composed of countless bones fused together.]], + desc = _t[[This massive beast appears to be a rat composed of countless bones fused together.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_rodent_gigantic_bone_rat.png", display_h=2, display_y=-1}}}, level_range = {14, nil}, exp_worth = 1, rarity = 6, @@ -179,12 +179,12 @@ newEntity{ base = "BASE_NPC_UNDEAD_RAT", [Talents.T_KNOCKBACK]={base=1, every=7, max=4}, }, - emote_random = {chance=1, "*SQUEAK*", "SQUEAK!!!!!"}, + emote_random = {chance=1, _t"*SQUEAK*", _t"SQUEAK!!!!!"}, } newEntity{ base = "BASE_NPC_UNDEAD_RAT", define_as="RATLICH", name = "Rat Lich", color=colors.BLACK, - desc = [[The master of the pit is before you. It squeaks with menace as it and a horde of minions approach you.]], + desc = _t[[The master of the pit is before you. It squeaks with menace as it and a horde of minions approach you.]], level_range = {16, nil}, exp_worth = 2, rarity = false, rank=3.5, @@ -241,7 +241,7 @@ newEntity{ base = "BASE_NPC_UNDEAD_RAT", define_as="RATLICH", game.logSeen(self, "#RED#Rising again, the Rat Lich's eyes glow with renewed energy!") - self.desc = self.desc.."\nThe Rat Lich's true power has been unveiled! Swirling with arcane energy, it stalks towards you uttering warsqueaks at its minions!" + self.desc = self.desc.._t"\nThe Rat Lich's true power has been unveiled! Swirling with arcane energy, it stalks towards you uttering warsqueaks at its minions!" self:forceUseTalent(self.T_SUMMON, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true}) self:forceUseTalent(self.T_SUMMON, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true}) @@ -268,7 +268,7 @@ newEntity{ base = "BASE_NPC_UNDEAD_RAT", define_as="RATLICH", resolvers.drops{chance=100, nb=3, {tome_drops="boss"} }, resolvers.drops{chance=100, nb=1, {defined="RATLICH_SKULL"} }, - emote_random = {chance=1, "*squeak*", "Squeak!", "Squeak??", "SQUEAK!!!!!", '"Squeak" I say, yes .. "Squeak!"'}, + emote_random = {chance=1, _t"*squeak*", _t"Squeak!", _t"Squeak??", _t"SQUEAK!!!!!", _t'"Squeak" I say, yes .. "Squeak!"'}, on_die = function(self) world:gainAchievement("EVENT_RATLICH", game:getPlayer(true)) end, } diff --git a/game/modules/tome/data/general/npcs/vampire.lua b/game/modules/tome/data/general/npcs/vampire.lua index 5d7d0bba89e7a21fee4fca668726690e46bc0e3c..3397450fbfadc10dfc41b97727c9a7cc2e8b5341 100644 --- a/game/modules/tome/data/general/npcs/vampire.lua +++ b/game/modules/tome/data/general/npcs/vampire.lua @@ -23,7 +23,7 @@ newEntity{ define_as = "BASE_NPC_VAMPIRE", type = "undead", subtype = "vampire", display = "V", color=colors.WHITE, - desc = [[These ancient cursed beings often take the form of a bat and attack their prey.]], + desc = _t[[These ancient cursed beings often take the form of a bat and attack their prey.]], combat = { dam=resolvers.levelup(resolvers.mbonus(30, 10), 1, 0.8), atk=10, apr=9, damtype=DamageType.DRAINLIFE, dammod={str=1.9} }, @@ -61,7 +61,7 @@ newEntity{ newEntity{ base = "BASE_NPC_VAMPIRE", name = "lesser vampire", color=colors.SLATE, image = "npc/lesser_vampire.png", - desc=[[This vampire has only just begun its new life. It has not yet fathomed its newfound power, yet it still has a thirst for blood.]], + desc=_t[[This vampire has only just begun its new life. It has not yet fathomed its newfound power, yet it still has a thirst for blood.]], level_range = {10, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(40,50), @@ -75,7 +75,7 @@ newEntity{ base = "BASE_NPC_VAMPIRE", newEntity{ base = "BASE_NPC_VAMPIRE", name = "vampire", color=colors.SLATE, image = "npc/vampire.png", - desc=[[It is a humanoid with an aura of power. You notice a sharp set of front teeth.]], + desc=_t[[It is a humanoid with an aura of power. You notice a sharp set of front teeth.]], level_range = {15, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(70,80), @@ -92,7 +92,7 @@ newEntity{ base = "BASE_NPC_VAMPIRE", newEntity{ base = "BASE_NPC_VAMPIRE", name = "master vampire", color=colors.GREEN, image = "npc/master_vampire.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/master_vampire.png", display_h=2, display_y=-1}}}, - desc=[[It is a humanoid form dressed in robes. Power emanates from its chilling frame.]], + desc=_t[[It is a humanoid form dressed in robes. Power emanates from its chilling frame.]], level_range = {20, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(80,90), @@ -109,7 +109,7 @@ newEntity{ base = "BASE_NPC_VAMPIRE", newEntity{ base = "BASE_NPC_VAMPIRE", name = "elder vampire", color=colors.RED, image = "npc/elder_vampire.png", - desc=[[A terrible robed undead figure, this creature has existed in its unlife for many centuries by stealing the life of others. + desc=_t[[A terrible robed undead figure, this creature has existed in its unlife for many centuries by stealing the life of others. It can summon the very shades of its victims from beyond the grave to come enslaved to its aid.]], level_range = {25, nil}, exp_worth = 1, rarity = 1, @@ -132,7 +132,7 @@ It can summon the very shades of its victims from beyond the grave to come ensla newEntity{ base = "BASE_NPC_VAMPIRE", name = "vampire lord", color=colors.BLUE, image = "npc/vampire_lord.png", - desc=[[A foul wind chills your bones as this ghastly figure approaches.]], + desc=_t[[A foul wind chills your bones as this ghastly figure approaches.]], level_range = {30, nil}, exp_worth = 1, rarity = 4, max_life = resolvers.rngavg(100,120), diff --git a/game/modules/tome/data/general/npcs/venom-drake.lua b/game/modules/tome/data/general/npcs/venom-drake.lua index 23824bf123d494924fdbbc44f02b88a095f3cc94..91202860f7ff76505dfba9ab525c984a37409f01 100644 --- a/game/modules/tome/data/general/npcs/venom-drake.lua +++ b/game/modules/tome/data/general/npcs/venom-drake.lua @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_VENOM_DRAKE", name = "venom drake hatchling", color=colors.GREEN, display="d", - desc = [[A corrosive venom drake hatchling; not too powerful by itself, but it usually comes with its brothers and sisters.]], + desc = _t[[A corrosive venom drake hatchling; not too powerful by itself, but it usually comes with its brothers and sisters.]], level_range = {8, nil}, exp_worth = 1, rarity = 1, rank = 1, size_category = 2, @@ -61,7 +61,7 @@ newEntity{ base = "BASE_NPC_VENOM_DRAKE", newEntity{ base = "BASE_NPC_VENOM_DRAKE", name = "venom drake", color=colors.GREEN, display="D", - desc = [[A mature corrosive venom drake, armed with deadly breath and nasty claws.]], + desc = _t[[A mature corrosive venom drake, armed with deadly breath and nasty claws.]], level_range = {14, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(100,110), @@ -83,7 +83,7 @@ newEntity{ base = "BASE_NPC_VENOM_DRAKE", newEntity{ base = "BASE_NPC_VENOM_DRAKE", name = "venom wyrm", color=colors.LIGHT_GREEN, display="D", - desc = [[An old and powerful corrosive venom drake, armed with deadly breath and nasty claws.]], + desc = _t[[An old and powerful corrosive venom drake, armed with deadly breath and nasty claws.]], resolvers.nice_tile{tall=1}, level_range = {25, nil}, exp_worth = 1, rarity = 5, diff --git a/game/modules/tome/data/general/npcs/vermin.lua b/game/modules/tome/data/general/npcs/vermin.lua index ddb36b9e9484649c7a0d8a503c46c2742ba688e5..cd0fef5edfaf5ce71e814031901634c7911d0f91 100644 --- a/game/modules/tome/data/general/npcs/vermin.lua +++ b/game/modules/tome/data/general/npcs/vermin.lua @@ -87,6 +87,6 @@ newEntity{ base = "BASE_NPC_WORM", define_as = "CARRION_WORM_MASS", 5, nil, engine.MapEffect.new{color_br=150, color_bg=255, color_bb=150, effect_shader="shader_images/poison_effect.png"} ) - game.logSeen(self, "%s exudes a corrupted gas as it dies.", self.name:capitalize()) + game.logSeen(self, "%s exudes a corrupted gas as it dies.", self:getName():capitalize()) end, } diff --git a/game/modules/tome/data/general/npcs/wight.lua b/game/modules/tome/data/general/npcs/wight.lua index 084eb53b670d2c070e4470c8658f1cf9f3963947..a3287910484de55c50376522d4bcaee704f26318 100644 --- a/game/modules/tome/data/general/npcs/wight.lua +++ b/game/modules/tome/data/general/npcs/wight.lua @@ -31,7 +31,7 @@ newEntity{ define_as = "BASE_NPC_WIGHT", type = "undead", subtype = "wight", display = "W", color=colors.WHITE, - desc = [[These be white wights.]], + desc = _t[[These be white wights.]], combat = { dam=resolvers.mbonus(30, 10), atk=10, apr=9, damtype=DamageType.DRAINEXP }, @@ -64,7 +64,7 @@ newEntity{ newEntity{ base = "BASE_NPC_WIGHT", name = "forest wight", color=colors.GREEN, image="npc/forest_wight.png", - desc=[[It is a ghostly apparition with a humanoid form.]], + desc=_t[[It is a ghostly apparition with a humanoid form.]], level_range = {16, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(40,50), @@ -78,7 +78,7 @@ newEntity{ base = "BASE_NPC_WIGHT", newEntity{ base = "BASE_NPC_WIGHT", name = "grave wight", color=colors.SLATE, image="npc/grave_wight.png", - desc=[[It is a ghostly form with eyes that haunt you.]], + desc=_t[[It is a ghostly form with eyes that haunt you.]], level_range = {22, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(70,80), @@ -92,7 +92,7 @@ newEntity{ base = "BASE_NPC_WIGHT", newEntity{ base = "BASE_NPC_WIGHT", name = "barrow wight", color=colors.LIGHT_RED, image="npc/barrow_wight.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/barrow_wight.png", display_h=2, display_y=-1}}}, - desc=[[It is a ghostly nightmare of an entity.]], + desc=_t[[It is a ghostly nightmare of an entity.]], level_range = {28, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(80,90), @@ -106,7 +106,7 @@ newEntity{ base = "BASE_NPC_WIGHT", newEntity{ base = "BASE_NPC_WIGHT", name = "emperor wight", color=colors.RED, image="npc/emperor_wight.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/emperor_wight.png", display_h=2, display_y=-1}}}, - desc=[[Your life force is torn from your body as this powerful unearthly being approaches.]], + desc=_t[[Your life force is torn from your body as this powerful unearthly being approaches.]], level_range = {36, nil}, exp_worth = 1, rarity = 5, rank = 3, diff --git a/game/modules/tome/data/general/npcs/wild-drake.lua b/game/modules/tome/data/general/npcs/wild-drake.lua index 0a89a73493ee47ec291fcef95f5eff0d6aca1483..4adcbb90db5ea4b192cd8588094019bd718daf4d 100644 --- a/game/modules/tome/data/general/npcs/wild-drake.lua +++ b/game/modules/tome/data/general/npcs/wild-drake.lua @@ -45,7 +45,7 @@ newEntity{ newEntity{ base = "BASE_NPC_WILD_DRAKE", name = "spire dragon", color=colors.SLATE, display="D", - desc = [[A monstrous, coiled wyrm, patient and hateful. Its hide, studded with spikes and crests and blades, turns aside steel and sorcery with equal ease.]], + desc = _t[[A monstrous, coiled wyrm, patient and hateful. Its hide, studded with spikes and crests and blades, turns aside steel and sorcery with equal ease.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_wild_spire_dragon.png", display_h=2, display_y=-1}}}, level_range = {35, nil}, exp_worth = 1, rarity = 6, @@ -74,7 +74,7 @@ newEntity{ base = "BASE_NPC_WILD_DRAKE", newEntity{ base = "BASE_NPC_WILD_DRAKE", name = "blinkwyrm", color=colors.YELLOW, display="D", - desc = [[A shifting, writhing, snake-like dragon, blinking in and out of existence, just waiting for you to turn your back.]], + desc = _t[[A shifting, writhing, snake-like dragon, blinking in and out of existence, just waiting for you to turn your back.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_wild_blinkwyrm.png", display_h=2, display_y=-1}}}, level_range = {40, nil}, exp_worth = 1, rarity = 7, diff --git a/game/modules/tome/data/general/npcs/xorn.lua b/game/modules/tome/data/general/npcs/xorn.lua index 6ded3ce0337259111dbe9c472ed2c31232de41cd..b78a540d8c9f087889916475c19d07a51492a6dc 100644 --- a/game/modules/tome/data/general/npcs/xorn.lua +++ b/game/modules/tome/data/general/npcs/xorn.lua @@ -58,7 +58,7 @@ newEntity{ newEntity{ base = "BASE_NPC_XORN", name = "umber hulk", color=colors.LIGHT_UMBER, - desc = [[This bizarre creature has glaring eyes and large mandibles capable of slicing through rock.]], + desc = _t[[This bizarre creature has glaring eyes and large mandibles capable of slicing through rock.]], level_range = {10, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(100,120), @@ -69,7 +69,7 @@ newEntity{ base = "BASE_NPC_XORN", newEntity{ base = "BASE_NPC_XORN", name = "xorn", color=colors.UMBER, - desc = [[A huge creature of the element Earth. Able to merge with its element, it has four huge arms protruding from its enormous torso.]], + desc = _t[[A huge creature of the element Earth. Able to merge with its element, it has four huge arms protruding from its enormous torso.]], level_range = {15, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(130,140), @@ -80,7 +80,7 @@ newEntity{ base = "BASE_NPC_XORN", newEntity{ base = "BASE_NPC_XORN", name = "xaren", color=colors.SLATE, - desc = [[It is a tougher relative of the Xorn. Its hide glitters with metal ores.]], + desc = _t[[It is a tougher relative of the Xorn. Its hide glitters with metal ores.]], level_range = {15, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(130,140), @@ -92,7 +92,7 @@ newEntity{ base = "BASE_NPC_XORN", newEntity{ base = "BASE_NPC_XORN", name = "The Fragmented Essence of Harkor'Zun", color=colors.VIOLET, unique=true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_xorn_fragmented_harkor_zun.png", display_h=2, display_y=-1}}}, - desc = [[Fragmented essence... maybe it'd be best if it stayed fragmented.]], + desc = _t[[Fragmented essence... maybe it'd be best if it stayed fragmented.]], level_range = {17, nil}, exp_worth = 0, rank = 3.5, size_category = 4, @@ -138,7 +138,7 @@ newEntity{ base = "BASE_NPC_XORN", for _, m in ipairs(self.all_fragments) do if not m.dead then nb_alive = nb_alive + 1 - game.logSeen(self, "#AQUAMARINE#%s absorbs the energy of the destroyed fragment!", self.name) + game.logSeen(self, "#AQUAMARINE#%s absorbs the energy of the destroyed fragment!", self:getName()) m.max_life = m.max_life + m.add_max_life m:heal(m.add_max_life) m.inc_damage.all = (m.inc_damage.all or 0) + 20 @@ -166,7 +166,7 @@ newEntity{ base = "BASE_NPC_XORN", newEntity{ base = "BASE_NPC_XORN", define_as = "FULL_HARKOR_ZUN", name = "Harkor'Zun", color=colors.VIOLET, unique=true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_xorn_harkor_zun.png", display_h=2, display_y=-1}}}, - desc = [[A gigantic demon composed of elemental Earth, resembling a twisted Xaren but much, much larger. It doesn't seem pleased with your presence.]], + desc = _t[[A gigantic demon composed of elemental Earth, resembling a twisted Xaren but much, much larger. It doesn't seem pleased with your presence.]], level_range = {23, nil}, exp_worth = 2, rank = 3.5, size_category = 5, diff --git a/game/modules/tome/data/general/npcs/yaech.lua b/game/modules/tome/data/general/npcs/yaech.lua index a59bf050bef3d1e2e4bf5ddf09ab48ac54d45e07..c61d4e9b0ff6c4b2f7cefeaab04359d5d30c78be 100644 --- a/game/modules/tome/data/general/npcs/yaech.lua +++ b/game/modules/tome/data/general/npcs/yaech.lua @@ -47,7 +47,7 @@ newEntity{ newEntity{ base = "BASE_NPC_YAECH", name = "yaech diver", color=colors.BLUE, - desc = [[Yaeches are an aquatic subspecies of yeeks. They share the same psionic powers, but they refuse to take part in the Way.]], + desc = _t[[Yaeches are an aquatic subspecies of yeeks. They share the same psionic powers, but they refuse to take part in the Way.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(50,70), @@ -62,7 +62,7 @@ newEntity{ base = "BASE_NPC_YAECH", newEntity{ base = "BASE_NPC_YAECH", name = "yaech hunter", color=colors.UMBER, - desc = [[Yaeches are an aquatic subspecies of yeeks. They share the same psionic powers, but they refuse to take part in the Way.]], + desc = _t[[Yaeches are an aquatic subspecies of yeeks. They share the same psionic powers, but they refuse to take part in the Way.]], level_range = {1, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(90,110), @@ -78,7 +78,7 @@ newEntity{ base = "BASE_NPC_YAECH", newEntity{ base = "BASE_NPC_YAECH", name = "yaech mindslayer", color=colors.YELLOW, - desc = [[Yaeches are an aquatic subspecies of yeeks. They share the same psionic powers, but they refuse to take part in the Way.]], + desc = _t[[Yaeches are an aquatic subspecies of yeeks. They share the same psionic powers, but they refuse to take part in the Way.]], level_range = {2, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(90,110), @@ -96,7 +96,7 @@ newEntity{ base = "BASE_NPC_YAECH", newEntity{ base = "BASE_NPC_YAECH", name = "yaech psion", color=colors.RED, - desc = [[Yaeches are an aquatic subspecies of yeeks. They share the same psionic powers, but they refuse to take part in the Way.]], + desc = _t[[Yaeches are an aquatic subspecies of yeeks. They share the same psionic powers, but they refuse to take part in the Way.]], level_range = {3, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(80,90), diff --git a/game/modules/tome/data/general/npcs/ziguranth.lua b/game/modules/tome/data/general/npcs/ziguranth.lua index 841dc2113147343a68021ac58f01c5718f9bc593..d793b880774edf0e255eaf9bd02aed242b550ead 100644 --- a/game/modules/tome/data/general/npcs/ziguranth.lua +++ b/game/modules/tome/data/general/npcs/ziguranth.lua @@ -26,7 +26,7 @@ newEntity{ type = "humanoid", subtype = "human", display = "p", color=colors.UMBER, faction = "zigur", - killer_message = "and burned on a pyre", + killer_message = _t"and burned on a pyre", combat = { dam=resolvers.rngavg(5,12), atk=2, apr=6, physspeed=2 }, @@ -54,7 +54,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ZIGURANTH", name = "ziguranth warrior", color=colors.CRIMSON, - desc = [[A Ziguranth warrior, clad in heavy armour.]], + desc = _t[[A Ziguranth warrior, clad in heavy armour.]], subtype = "dwarf", level_range = {20, nil}, exp_worth = 1, rarity = 1, @@ -78,7 +78,7 @@ newEntity{ base = "BASE_NPC_ZIGURANTH", newEntity{ base = "BASE_NPC_ZIGURANTH", name = "ziguranth summoner", color=colors.CRIMSON, - desc = [[A Ziguranth wilder, attuned to nature.]], + desc = _t[[A Ziguranth wilder, attuned to nature.]], subtype = "thalore", level_range = {20, nil}, exp_worth = 1, rarity = 2, @@ -109,7 +109,7 @@ newEntity{ base = "BASE_NPC_ZIGURANTH", newEntity{ base = "BASE_NPC_ZIGURANTH", name = "ziguranth wyrmic", color=colors.CRIMSON, - desc = [[A Ziguranth wilder, attuned to nature.]], + desc = _t[[A Ziguranth wilder, attuned to nature.]], level_range = {20, nil}, exp_worth = 1, rarity = 2, rank = 3, diff --git a/game/modules/tome/data/general/objects/2haxes.lua b/game/modules/tome/data/general/objects/2haxes.lua index d4d1de245f67cc01369f93a86a1f6fc54e39b087..4c51e553e6f30a38ecc28563b1d7df076dbffa06 100644 --- a/game/modules/tome/data/general/objects/2haxes.lua +++ b/game/modules/tome/data/general/objects/2haxes.lua @@ -29,7 +29,7 @@ newEntity{ rarity = 5, metallic = true, combat = { talented = "axe", damrange = 1.5, physspeed = 1, sound = {"actions/melee", pitch=0.6, vol=1.2}, sound_miss = {"actions/melee", pitch=0.6, vol=1.2} }, - desc = [[Massive two-handed battleaxes.]], + desc = _t[[Massive two-handed battleaxes.]], twohanded = true, ego_bonus_mult = 0.4, randart_able = "/data/general/objects/random-artifacts/melee.lua", diff --git a/game/modules/tome/data/general/objects/2hmaces.lua b/game/modules/tome/data/general/objects/2hmaces.lua index 1a3384a2e1a8a0596d27ae0453d5efa8e9a83e6c..80468cbf545cb7fc44086154a11a339b6c2054c3 100644 --- a/game/modules/tome/data/general/objects/2hmaces.lua +++ b/game/modules/tome/data/general/objects/2hmaces.lua @@ -29,7 +29,7 @@ newEntity{ rarity = 5, metallic = true, combat = { talented = "mace", damrange = 1.5, physspeed = 1, sound = {"actions/melee", pitch=0.6, vol=1.2}, sound_miss = {"actions/melee", pitch=0.6, vol=1.2} }, - desc = [[Massive two-handed mauls.]], + desc = _t[[Massive two-handed mauls.]], twohanded = true, ego_bonus_mult = 0.4, randart_able = "/data/general/objects/random-artifacts/melee.lua", diff --git a/game/modules/tome/data/general/objects/2hswords.lua b/game/modules/tome/data/general/objects/2hswords.lua index b6353c5887ef013a22da86b658ce611c09ed1dea..48551d69651455d89dfe237fb263d37c666b3458 100644 --- a/game/modules/tome/data/general/objects/2hswords.lua +++ b/game/modules/tome/data/general/objects/2hswords.lua @@ -28,7 +28,7 @@ newEntity{ encumber = 3, rarity = 5, combat = { talented = "sword", damrange = 1.6, physspeed = 1, sound = {"actions/melee", pitch=0.6, vol=1.2}, sound_miss = {"actions/melee", pitch=0.6, vol=1.2} }, - desc = [[Massive two-handed swords.]], + desc = _t[[Massive two-handed swords.]], twohanded = true, metallic = true, ego_bonus_mult = 0.4, diff --git a/game/modules/tome/data/general/objects/2htridents.lua b/game/modules/tome/data/general/objects/2htridents.lua index eba204800702ea0722c917c23f2bfafb4f57e511..4ffaa68037ef59b2a03c1985824689d74f2b31ea 100644 --- a/game/modules/tome/data/general/objects/2htridents.lua +++ b/game/modules/tome/data/general/objects/2htridents.lua @@ -30,7 +30,7 @@ newEntity{ metallic = true, no_rust = true, combat = { talented = "trident", accuracy_effect = "mace", damrange = 1.6, physspeed = 1, sound = {"actions/melee", pitch=0.6, vol=1.2}, sound_miss = {"actions/melee", pitch=0.6, vol=1.2} }, - desc = [[A two-handed massive trident. + desc = _t[[A two-handed massive trident. Tridents require the exotic weapons mastery talent to use correctly.]], twohanded = true, ego_bonus_mult = 0.4, diff --git a/game/modules/tome/data/general/objects/axes.lua b/game/modules/tome/data/general/objects/axes.lua index 3682f6323c808e5216b59f057a48153159b9b393..0aaa52bfad4c9079e06f07292d134bf733f93dd7 100644 --- a/game/modules/tome/data/general/objects/axes.lua +++ b/game/modules/tome/data/general/objects/axes.lua @@ -28,7 +28,7 @@ newEntity{ rarity = 3, metallic = true, combat = { talented = "axe", damrange = 1.4, physspeed = 1, sound = {"actions/melee", pitch=0.6, vol=1.2}, sound_miss = {"actions/melee", pitch=0.6, vol=1.2}}, - desc = [[One-handed war axes.]], + desc = _t[[One-handed war axes.]], randart_able = "/data/general/objects/random-artifacts/melee.lua", egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/boss-artifacts-far-east.lua b/game/modules/tome/data/general/objects/boss-artifacts-far-east.lua index 7fc00fa2ffeba9b23f3fddcf52f34d3e69fdaa28..056ae508fdf7318161a6cf65cf4dc491b33ac097 100644 --- a/game/modules/tome/data/general/objects/boss-artifacts-far-east.lua +++ b/game/modules/tome/data/general/objects/boss-artifacts-far-east.lua @@ -26,10 +26,10 @@ newEntity{ base = "BASE_KNIFE", define_as = "LIFE_DRINKER", power_source = {arcane=true}, unique = true, name = "Life Drinker", image = "object/artifact/dagger_life_drinker.png", - unided_name = "blood coated dagger", + unided_name = _t"blood coated dagger", moddable_tile = "special/%s_dagger_life_drinker", moddable_tile_big = true, - desc = [[Black blood for foul deeds. This dagger serves evil.]], + desc = _t[[Black blood for foul deeds. This dagger serves evil.]], level_range = {40, 50}, rarity = 300, require = { stat = { mag=44 }, }, @@ -62,11 +62,11 @@ newEntity{ base = "BASE_KNIFE", define_as = "LIFE_DRINKER", newEntity{ base = "BASE_TRIDENT", power_source = {nature=true}, define_as = "TRIDENT_TIDES", - unided_name = "ever-dripping trident", + unided_name = _t"ever-dripping trident", name = "Trident of the Tides", unique=true, image = "object/artifact/trident_of_the_tides.png", moddable_tile = "special/%s_trident_of_the_tides", moddable_tile_big = true, - desc = [[The power of the tides rush through this trident. + desc = _t[[The power of the tides rush through this trident. Tridents require the exotic weapons mastery talent to use correctly.]], require = { stat = { str=35 }, }, level_range = {30, 40}, @@ -103,9 +103,9 @@ Tridents require the exotic weapons mastery talent to use correctly.]], newEntity{ base = "BASE_AMULET", power_source = {arcane=true}, define_as = "FIERY_CHOKER", - unided_name = "flame-wrought amulet", + unided_name = _t"flame-wrought amulet", name = "Fiery Choker", unique=true, image="object/artifact/fiery_choker.png", - desc = [[A choker made of pure flame, casting forever shifting patterns around the neck of its wearer. Its fire seems to not harm the wearer.]], + desc = _t[[A choker made of pure flame, casting forever shifting patterns around the neck of its wearer. Its fire seems to not harm the wearer.]], level_range = {32, 42}, rarity = 220, cost = 190, @@ -134,8 +134,8 @@ newEntity{ base = "BASE_HEAVY_ARMOR", power_source = {nature=true}, define_as = "CHROMATIC_HARNESS", image = "object/artifact/armor_chromatic_harness.png", name = "Chromatic Harness", unique=true, - unided_name = "multi-hued scale-mail armour", color=colors.VIOLET, - desc = [[This dragon scale harness shines with multiple colors, quickly shifting through them in a seemingly chaotic manner.]], + unided_name = _t"multi-hued scale-mail armour", color=colors.VIOLET, + desc = _t[[This dragon scale harness shines with multiple colors, quickly shifting through them in a seemingly chaotic manner.]], level_range = {40, 50}, rarity = 280, cost = 500, @@ -165,8 +165,8 @@ newEntity{ base = "BASE_RING", power_source = {technique=true}, define_as = "PRIDE_GLORY", name = "Glory of the Pride", unique=true, image="object/artifact/glory_of_the_pride.png", - desc = [[The most prized treasure of the Battlemaster of the Pride, Grushnak. This gold ring is inscribed in the now lost orc tongue.]], - unided_name = "deep black ring", + desc = _t[[The most prized treasure of the Battlemaster of the Pride, Grushnak. This gold ring is inscribed in the now lost orc tongue.]], + unided_name = _t"deep black ring", level_range = {40, 50}, rarity = 280, cost = 500, @@ -193,9 +193,9 @@ newEntity{ base = "BASE_CLOTH_ARMOR", power_source = {arcane=true}, define_as = "BLACK_ROBE", name = "Black Robe", unique=true, - unided_name = "black robe", color=colors.DARK_GREY, image = "object/artifact/robe_black_robe.png", + unided_name = _t"black robe", color=colors.DARK_GREY, image = "object/artifact/robe_black_robe.png", moddable_tile = "special/robe_black_robe", - desc = [[A silk robe, darker than the darkest night sky, it radiates power.]], + desc = _t[[A silk robe, darker than the darkest night sky, it radiates power.]], level_range = {40, 50}, rarity = 280, cost = 500, @@ -219,8 +219,8 @@ newEntity{ base = "BASE_LEATHER_CAP", power_source = {arcane=true}, define_as = "CROWN_ELEMENTS", name = "Crown of the Elements", unique=true, image = "object/artifact/crown_of_the_elements.png", - unided_name = "jeweled crown", color=colors.DARK_GREY, - desc = [[This jeweled crown shimmers with colors.]], + unided_name = _t"jeweled crown", color=colors.DARK_GREY, + desc = _t[[This jeweled crown shimmers with colors.]], level_range = {40, 50}, rarity = 280, cost = 500, @@ -256,8 +256,8 @@ newEntity{ base = "BASE_GREATSWORD", power_source = {technique=true}, define_as = "MURDERBLADE", name = "Warmaster Gnarg's Murderblade", unique=true, image="object/artifact/warmaster_gnargs_murderblade.png", - unided_name = "blood-etched greatsword", color=colors.CRIMSON, - desc = [[A blood-etched greatsword, it has seen many foes. From the inside.]], + unided_name = _t"blood-etched greatsword", color=colors.CRIMSON, + desc = _t[[A blood-etched greatsword, it has seen many foes. From the inside.]], require = { stat = { str=35 }, }, level_range = {32, 45}, rarity = 230, @@ -268,7 +268,7 @@ newEntity{ base = "BASE_GREATSWORD", apr = 19, physcrit = 10, dammod = {str=1.2}, - special_on_hit = {desc="10% chance to send the wielder into a killing frenzy", on_kill=1, fct=function(combat, who) + special_on_hit = {desc=_t"10% chance to send the wielder into a killing frenzy", on_kill=1, fct=function(combat, who) if not rng.percent(10) then return end who:setEffect(who.EFF_FRENZY, 3, {crit=12, power=0.3, dieat=0.25}) end}, @@ -289,9 +289,9 @@ newEntity{ base = "BASE_GREATSWORD", newEntity{ base = "BASE_WHIP", power_source = {arcane=true}, define_as = "WHIP_URH_ROK", - unided_name = "fiery whip", + unided_name = _t"fiery whip", name = "Whip of Urh'Rok", color=colors.PURPLE, unique = true, image = "object/artifact/whip_of_urh_rok.png", - desc = [[With this unbearably bright whip of flame, the demon master Urh'Rok has become known for never having lost in combat.]], + desc = _t[[With this unbearably bright whip of flame, the demon master Urh'Rok has become known for never having lost in combat.]], require = { stat = { dex=48 }, }, level_range = {40, 50}, rarity = 390, @@ -327,8 +327,8 @@ newEntity{ base = "BASE_LONGBOW", power_source = {arcane=true}, define_as = "STORM_FURY", name = "Storm Fury", unique=true, - unided_name = "crackling longbow", color=colors.BLUE, image = "object/artifact/storm_fury.png", - desc = [[This dragonbone longbow is enhanced with bands of steel, which arc with intense lightning. Bolts travel up and down the string, ignorant of you.]], + unided_name = _t"crackling longbow", color=colors.BLUE, image = "object/artifact/storm_fury.png", + desc = _t[[This dragonbone longbow is enhanced with bands of steel, which arc with intense lightning. Bolts travel up and down the string, ignorant of you.]], require = { stat = { dex=30, mag=30 }, }, level_range = {40, 50}, rarity = 250, @@ -339,7 +339,7 @@ newEntity{ base = "BASE_LONGBOW", local dam = (40+ who:getMag()) local dam2 = (40+ who:getMag()) * 2 return ("Automatically fires lightning bolts every game turn at nearby enemies dealing %d to %d lightning damage based on Magic with a chance to inflict Daze."): - format(dam, dam2) + tformat(dam, dam2) end, combat = { range = 10, @@ -406,8 +406,8 @@ newEntity{ base = "BASE_CLOAK", define_as="GLACIAL_CLOAK", power_source = {arcane=true}, unique = true, name = "Frozen Shroud", - unided_name = "chilling cloak", image = "object/artifact/frozen_shroud.png", - desc = [[All that remains of the Glacial Legion. This cloak seems to exude an icy cold vapor that freezes all it touches.]], + unided_name = _t"chilling cloak", image = "object/artifact/frozen_shroud.png", + desc = _t[[All that remains of the Glacial Legion. This cloak seems to exude an icy cold vapor that freezes all it touches.]], level_range = {40, 50}, rarity = 250, cost = 300, @@ -423,7 +423,7 @@ newEntity{ base = "BASE_CLOAK", define_as="GLACIAL_CLOAK", use_power = { name = function(self, who) local dam = who:damDesc(engine.DamageType.COLD, self.use_power.damage(self, who)) - return ("release a radius %d chilling blast, instantly dealing %0.2f cold damage and condensing the air into freezing vapors that deal %0.2f cold damage (based on Magic) each turn for %d turns"):format(self.use_power.radius, dam*3, dam, self.use_power.duration) + return ("release a radius %d chilling blast, instantly dealing %0.2f cold damage and condensing the air into freezing vapors that deal %0.2f cold damage (based on Magic) each turn for %d turns"):tformat(self.use_power.radius, dam*3, dam, self.use_power.duration) end, power = 30, damage = function(self, who) return 25 + who:getMag() end, @@ -439,7 +439,7 @@ newEntity{ base = "BASE_CLOAK", define_as="GLACIAL_CLOAK", local radius = self.use_power.radius local dam = self.use_power.damage(self, who) local blast = self.use_power.target(self, who) - game.logSeen(who, "%s releases an icy blast from %s %s!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) + game.logSeen(who, "%s releases an icy blast from %s %s!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) who:project(blast, who.x, who.y, engine.DamageType.COLD, dam*3) who:project(blast, who.x, who.y, engine.DamageType.FREEZE, {dur=6, hp=80+dam}) game.level.map:particleEmitter(who.x, who.y, blast.radius, "iceflash", {radius=blast.radius}) @@ -456,7 +456,7 @@ newEntity{ base = "BASE_CLOAK", define_as="GLACIAL_CLOAK", end, false ) - eff.name = "icy vapors" + eff.name = _t"icy vapors" return {id=true, used=true} end }, @@ -467,8 +467,8 @@ newEntity{ base = "BASE_GREATMAUL", define_as="ROTTING_MAUL", power_source = {arcane=true}, unique = true, name = "Blighted Maul", color = colors.LIGHT_RED, image = "object/artifact/blighted_maul.png", - unided_name = "rotten stone limb", - desc = [[The massive stone limb of the Rotting Titan, a mass of stone and rotting flesh. You think you can lift it, but it is very heavy.]], + unided_name = _t"rotten stone limb", + desc = _t[[The massive stone limb of the Rotting Titan, a mass of stone and rotting flesh. You think you can lift it, but it is very heavy.]], level_range = {40, 50}, rarity = 250, require = { stat = { str=60 }, }, @@ -487,7 +487,7 @@ newEntity{ base = "BASE_GREATMAUL", define_as="ROTTING_MAUL", special_on_hit = { desc=function(self, who, special) local dam = who:damDesc(engine.DamageType.PHYSICAL, special.shockwavedam(self, who, special)) - return ("Blasts creatures in a radius 1 shockwave around your target for %0.2f to %0.2f physical damage (based on Strength)."):format(dam, dam *3) + return ("Blasts creatures in a radius 1 shockwave around your target for %0.2f to %0.2f physical damage (based on Strength)."):tformat(dam, dam *3) end, on_kill=1, shockwavedam = function(self, who, special) return 70+ who:getStr() end, @@ -495,7 +495,7 @@ newEntity{ base = "BASE_GREATMAUL", define_as="ROTTING_MAUL", local o, item, inven_id = who:findInAllInventoriesBy("define_as", "ROTTING_MAUL") if not o or not who:getInven(inven_id).worn then return end local dam = rng.avg(1,3) * special.shockwavedam(self, who, special) - game.logSeen(who, "%s's %s shakes the ground with its impact!", who.name:capitalize(), o:getName({no_add_name = true})) + game.logSeen(who, "%s's %s shakes the ground with its impact!", who:getName():capitalize(), o:getName({no_add_name = true})) local tg = {type="ball", range=10, selffire=false, force_target=target, radius=1, no_restrict=true, act_exclude = {[target.uid]=true}} who:project(tg, target.x, target.y, engine.DamageType.PHYSICAL, dam) end @@ -510,7 +510,7 @@ newEntity{ base = "BASE_GREATMAUL", define_as="ROTTING_MAUL", use_power = { name = function(self, who) local dam = who:damDesc(engine.DamageType.PHYSICAL, self.use_power.damage(self, who)) - return ("knock away other creatures within radius %d), dealing %0.2f to %0.2f physical damage (based on Strength) to each"):format(self.use_power.radius, dam, dam*2) + return ("knock away other creatures within radius %d), dealing %0.2f to %0.2f physical damage (based on Strength) to each"):tformat(self.use_power.radius, dam, dam*2) end, power = 50, damage = function(self, who) return 125 + 3*who:getStr() end, @@ -521,7 +521,7 @@ newEntity{ base = "BASE_GREATMAUL", define_as="ROTTING_MAUL", use = function(self, who) local dam = rng.float(1,2) * self.use_power.damage(self, who) local tg = {type="ball", range=self.use_power.range, selffire=false, radius=self.use_power.radius, no_restrict=true} - game.logSeen(who, "%s slams %s %s into the ground, sending out a shockwave!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) + game.logSeen(who, "%s slams %s %s into the ground, sending out a shockwave!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) who:project(tg, who.x, who.y, engine.DamageType.PHYSKNOCKBACK, {dam=dam, dist=self.use_power.radius}) return {id=true, used=true} end @@ -532,9 +532,9 @@ newEntity{ base = "BASE_GREATMAUL", define_as="ROTTING_MAUL", newEntity{ base = "BASE_LIGHT_ARMOR", power_source = {arcane=true}, define_as = "ARMOR_MOLTEN", - unided_name = "melting bony armour", + unided_name = _t"melting bony armour", name = "Molten Skin", unique=true, image = "object/artifact/molten_skin.png", - desc = [[This mass of fused molten bone from the Heavy Sentinel radiates intense power. It still glows red with the heat of the Sentinel's core, and yet seems to do you no harm.]], + desc = _t[[This mass of fused molten bone from the Heavy Sentinel radiates intense power. It still glows red with the heat of the Sentinel's core, and yet seems to do you no harm.]], level_range = {40, 50}, rarity = 250, cost = 300, @@ -583,8 +583,8 @@ newEntity{ base = "BASE_RING", power_source = {arcane=true}, define_as = "AETHER_RING", name = "Void Orb", unique=true, image = "object/artifact/void_orbs.png", - desc = [[This thin grey ring is adorned with a deep black orb. Tiny white dots swirl slowly within it, and a faint purple light glows from its core.]], - unided_name = "ethereal ring", + desc = _t[[This thin grey ring is adorned with a deep black orb. Tiny white dots swirl slowly within it, and a faint purple light glows from its core.]], + unided_name = _t"ethereal ring", level_range = {40, 50}, rarity = 250, cost = 300, diff --git a/game/modules/tome/data/general/objects/boss-artifacts-maj-eyal.lua b/game/modules/tome/data/general/objects/boss-artifacts-maj-eyal.lua index f12e9cb3c6110537a7667ef2f7175518f7efc9a3..27e25496fc831bcb93a362fce8940dfe963c7344 100644 --- a/game/modules/tome/data/general/objects/boss-artifacts-maj-eyal.lua +++ b/game/modules/tome/data/general/objects/boss-artifacts-maj-eyal.lua @@ -26,11 +26,11 @@ local Talents = require "engine.interface.ActorTalents" -- Balance: A cold themed weapon doesn't play nice with melee scalers, and Ice Block on hit, while useful overall, has some obvious anti-synergy. So instead of focusing on stats I added a decent passive on hit and a very powerful active. The active is a "better" Stone Wall but you have to be actively using the weapon in melee to make use of it. The delayed expansion of the storm also limits its strength as an "oh shit" button. newEntity{ base = "BASE_LONGSWORD", power_source = {arcane=true}, - define_as = "LONGSWORD_WINTERTIDE", unided_name = "glittering longsword", image="object/artifact/wintertide.png", + define_as = "LONGSWORD_WINTERTIDE", unided_name = _t"glittering longsword", image="object/artifact/wintertide.png", name = "Wintertide", unique=true, moddable_tile = "special/%s_wintertide", moddable_tile_big = true, - desc = [[The air seems to freeze around the blade of this sword, draining all heat from the area. + desc = _t[[The air seems to freeze around the blade of this sword, draining all heat from the area. It is said the Conclave created this weapon for their warmaster during the dark times of the first allure war.]], require = { stat = { str=35 }, }, level_range = {35, 45}, @@ -41,9 +41,9 @@ It is said the Conclave created this weapon for their warmaster during the dark special_desc = function(self) local storm = self.winterStorm if not storm or storm.duration <=0 then - return ("No Winter Storm Active") + return (_t"No Winter Storm Active") else - return ("Winter Storm: " .. ((storm.duration and storm.radius) and ("radius %d (%d turns remaining)"):format(math.floor(storm.radius), storm.duration) or "None")) + return (_t"Winter Storm: " .. ((storm.duration and storm.radius) and ("radius %d (%d turns remaining)"):tformat(math.floor(storm.radius), storm.duration) or _t"None")) end end, combat = { @@ -56,7 +56,7 @@ It is said the Conclave created this weapon for their warmaster during the dark special_on_hit = { desc=function(self, who, special) local dam = who:damDesc(engine.DamageType.COLD, special:damage(self, who)) - return ("Create a Winter Storm that gradually expands (from radius %d to radius %d), dealing %0.2f cold damage (based on Strength) to your enemies each turn and slowing their ability to act by 20%%. Subsequent melee strikes will relocate the storm on top of your target and increase its duration."):format(special.radius, special.max_radius, dam) + return ("Create a Winter Storm that gradually expands (from radius %d to radius %d), dealing %0.2f cold damage (based on Strength) to your enemies each turn and slowing their ability to act by 20%%. Subsequent melee strikes will relocate the storm on top of your target and increase its duration."):tformat(special.radius, special.max_radius, dam) end, on_kill=1, damage = function(special, self, who) return who:combatStatScale("str", 20, 80, 0.75) end, @@ -89,7 +89,7 @@ It is said the Conclave created this weapon for their warmaster during the dark -- If the map has no Winter Storm then create one if not self.winterStorm then - game.logSeen(target, "#LIGHT_BLUE#A Winter Storm forms around %s.", target.name:capitalize()) + game.logSeen(target, "#LIGHT_BLUE#A Winter Storm forms around %s.", target:getName():capitalize()) local stormDam = special:damage(self, who) self.winterStorm = game.level.map:addEffect(who, target.x, target.y, special.duration, @@ -136,7 +136,7 @@ It is said the Conclave created this weapon for their warmaster during the dark inc_damage = { [DamageType.COLD] = 20 }, }, max_power = 40, power_regen = 1, - use_power = { name ="precipitate ice walls (lasting 10 turns) within your Winter Storm's area", power = 30, + use_power = { name =_t"precipitate ice walls (lasting 10 turns) within your Winter Storm's area", power = 30, use = function(self, who) local Object = require "mod.class.Object" @@ -150,7 +150,7 @@ It is said the Conclave created this weapon for their warmaster during the dark end local grids = core.fov.circle_grids(self.winterStorm.x, self.winterStorm.y, self.winterStorm.radius, true) - game.logSeen(who, "#LIGHT_BLUE#%s brandishes %s %s, releasing a wave of Winter cold!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "#LIGHT_BLUE#%s brandishes %s %s, releasing a wave of Winter cold!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) self.use_power.last_use = {turn = game.turn, x = self.winterStorm.x, y = self.winterStorm.y, radius = self.winterStorm.radius} -- for ai purposes local msg = false @@ -163,10 +163,10 @@ It is said the Conclave created this weapon for their warmaster during the dark elseif not oe:check("block_move", x, y) then local e = Object.new{ old_feat = oe, - name = "winter wall", image = "npc/iceblock.png", + name = _t"winter wall", image = "npc/iceblock.png", _wintertide_ice_wall = true, display = '#', color_r=255, color_g=255, color_b=255, back_color=colors.GREY, - desc = "a summoned wall of ice", + desc = _t"a summoned wall of ice", type = "wall", --subtype = "floor", always_remember = true, can_pass = {pass_wall=1}, @@ -273,9 +273,9 @@ It is said the Conclave created this weapon for their warmaster during the dark newEntity{ base = "BASE_LITE", define_as = "WINTERTIDE_PHIAL", power_source = {arcane=true}, - unided_name = "phial filled with darkness", unique = true, image="object/artifact/wintertide_phial.png", + unided_name = _t"phial filled with darkness", unique = true, image="object/artifact/wintertide_phial.png", name = "Wintertide Phial", color=colors.DARK_GREY, - desc = [[This phial seems filled with darkness, yet it cleanses your thoughts.]], + desc = _t[[This phial seems filled with darkness, yet it cleanses your thoughts.]], level_range = {1, 25}, rarity = 200, encumber = 2, @@ -289,7 +289,7 @@ newEntity{ base = "BASE_LITE", define_as = "WINTERTIDE_PHIAL", max_power = 60, power_regen = 1, use_power = { - name = function(self, who) return ("cleanse your mind of up to %d (based on Magic) detrimental mental effects"):format(self.use_power.nbcure(self, who)) end, + name = function(self, who) return ("cleanse your mind of up to %d (based on Magic) detrimental mental effects"):tformat(self.use_power.nbcure(self, who)) end, power = 40, nbcure = function(self, who) return math.floor(who:combatStatScale("mag", 2.5, 6, "log")) end, use = function(self, who) @@ -297,7 +297,7 @@ newEntity{ base = "BASE_LITE", define_as = "WINTERTIDE_PHIAL", local effs = {} local known = false - game.logSeen(who, "%s uses %s %s to cleanse %s mind!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color=true}), who:his_her()) + game.logSeen(who, "%s uses %s %s to cleanse %s mind!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color=true}), who:his_her()) -- Go through all mental effects for eff_id, p in pairs(target.tmp) do local e = target.tempeffect_def[eff_id] @@ -335,14 +335,14 @@ newEntity{ base = "BASE_LITE", define_as = "WINTERTIDE_PHIAL", newEntity{ base = "BASE_LEATHER_BOOT", power_source = {nature=true}, define_as = "FROST_TREADS", - unided_name = "ice-covered boots", + unided_name = _t"ice-covered boots", name = "Frost Treads", unique=true, image="object/artifact/frost_treads.png", - desc = [[A pair of leather boots. Cold to the touch, they radiate a cold blue light.]], + desc = _t[[A pair of leather boots. Cold to the touch, they radiate a cold blue light.]], level_range = {10, 18}, material_level = 2, rarity = 220, cost = 200, - special_desc = function(self) return "Each step taken casts a ground frost effect in a radius of 1 around you for 5 turns, giving you a 20% cold damage bonus for 3 turns. Additionally, any enemy standing in the frost has a 20% chance of talent failure for 3 turns." end, + special_desc = function(self) return _t"Each step taken casts a ground frost effect in a radius of 1 around you for 5 turns, giving you a 20% cold damage bonus for 3 turns. Additionally, any enemy standing in the frost has a 20% chance of talent failure for 3 turns." end, callbackOnMove = function(self, who, moved, force, ox, oy, x, y) if not moved or force or (ox == who.x and oy == who.y) then return end local Talents = require "engine.interface.ActorTalents" @@ -430,8 +430,8 @@ newEntity{ base = "BASE_LEATHER_BOOT", newEntity{ base = "BASE_HELM", power_source = {technique=true}, define_as = "DRAGON_SKULL", - name = "Dragonskull Helm", unique=true, unided_name="skull helm", image = "object/artifact/dragonskull_helmet.png", - desc = [[Traces of a dragon's power still remain in this bleached and cracked skull.]], + name = "Dragonskull Helm", unique=true, unided_name=_t"skull helm", image = "object/artifact/dragonskull_helmet.png", + desc = _t[[Traces of a dragon's power still remain in this bleached and cracked skull.]], require = { stat = { wil=24 }, }, level_range = {45, 50}, material_level = 5, @@ -459,8 +459,8 @@ newEntity{ base = "BASE_LIGHT_ARMOR", power_source = {nature=true}, define_as = "EEL_SKIN", image = "object/artifact/eel_skin_armor.png", name = "Eel-skin armour", unique=true, - unided_name = "slippery armour", color=colors.VIOLET, - desc = [[This armour seems to have been patched together from many eels. Yuck.]], + unided_name = _t"slippery armour", color=colors.VIOLET, + desc = _t[[This armour seems to have been patched together from many eels. Yuck.]], level_range = {5, 12}, rarity = 200, cost = 500, @@ -483,8 +483,8 @@ newEntity{ base = "BASE_RING", power_source = {psionic=true}, define_as = "NIGHT_SONG", name = "Nightsong", unique=true, image = "object/artifact/ring_nightsong.png", - desc = [[A pitch black ring, unadorned. It seems as though tendrils of darkness creep upon it.]], - unided_name = "obsidian ring", + desc = _t[[A pitch black ring, unadorned. It seems as though tendrils of darkness creep upon it.]], + unided_name = _t"obsidian ring", level_range = {15, 23}, rarity = 250, cost = 500, @@ -508,9 +508,9 @@ newEntity{ base = "BASE_RING", newEntity{ base = "BASE_HELM", power_source = {nature=true}, define_as = "HELM_OF_GARKUL", - unided_name = "tribal helm", + unided_name = _t"tribal helm", name = "Steel Helm of Garkul", unique=true, image="object/artifact/helm_of_garkul.png", - desc = [[A great helm that belonged to Garkul the Devourer, one of the greatest orcs ever to live.]], + desc = _t[[A great helm that belonged to Garkul the Devourer, one of the greatest orcs ever to live.]], require = { stat = { str=16 }, }, level_range = {12, 22}, rarity = 200, @@ -531,7 +531,7 @@ newEntity{ base = "BASE_HELM", set_list = { {"define_as","SET_GARKUL_TEETH"} }, set_desc = { - garkul = "Another of Garkul's heirlooms would bring out his spirit.", + garkul = _t"Another of Garkul's heirlooms would bring out his spirit.", }, on_set_complete = function(self, who) self:specialSetAdd("skullcracker_mult", 1) @@ -546,8 +546,8 @@ newEntity{ base = "BASE_SHIELD", name = "Lunar Shield", image = "object/artifact/shield_lunar_shield.png", moddable_tile = "special/%s_lunar_shield", moddable_tile_big = true, - unided_name = "chitinous shield", - desc = [[A large section of chitin removed from Nimisil. It continues to give off a strange white glow.]], + unided_name = _t"chitinous shield", + desc = _t[[A large section of chitin removed from Nimisil. It continues to give off a strange white glow.]], color = colors.YELLOW, metallic = false, require = { stat = { str=35 }, }, @@ -580,11 +580,11 @@ newEntity{ base = "BASE_SHIELD", newEntity{ base = "BASE_SHIELD", power_source = {nature=true}, define_as = "WRATHROOT_SHIELD", - unided_name = "large chunk of wood", + unided_name = _t"large chunk of wood", moddable_tile = "special/%s_wrathroots_barkwood", moddable_tile_big = true, name = "Wrathroot's Barkwood", unique=true, image="object/artifact/shield_wrathroots_barkwood.png", - desc = [[The barkwood of Wrathroot, made into roughly the shape of a shield.]], + desc = _t[[The barkwood of Wrathroot, made into roughly the shape of a shield.]], require = { stat = { str=25 }, }, level_range = {12, 22}, rarity = 200, @@ -614,12 +614,12 @@ newEntity{ base = "BASE_SHIELD", newEntity{ base = "BASE_GEM", power_source = {nature=true}, unique = true, define_as = "PETRIFIED_WOOD", - unided_name = "burned piece of wood", + unided_name = _t"burned piece of wood", name = "Petrified Wood", subtype = "red", --Visually black, but associate with fire, not acid color = colors.WHITE, image = "object/artifact/petrified_wood.png", level_range = {35, 45}, rarity = 280, - desc = [[A piece of the scorched wood taken from the remains of Snaproot.]], + desc = _t[[A piece of the scorched wood taken from the remains of Snaproot.]], cost = 100, material_level = 4, color_attributes = { @@ -644,12 +644,12 @@ newEntity{ base = "BASE_STAFF", power_source = {arcane=true}, unique = true, define_as = "CRYSTAL_SHARD", name = "Crystal Shard", - unided_name = "crystalline tree branch", + unided_name = _t"crystalline tree branch", flavor_name = "magestaff", level_range = {10, 22}, color=colors.BLUE, image = "object/artifact/crystal_shard.png", rarity = 300, - desc = [[This crystalline tree branch is remarkably rigid, and refracts light in myriad colors. Gazing at it entrances you, and you worry where its power may have come from.]], + desc = _t[[This crystalline tree branch is remarkably rigid, and refracts light in myriad colors. Gazing at it entrances you, and you worry where its power may have come from.]], cost = 200, material_level = 2, require = { stat = { mag=20 }, }, @@ -678,12 +678,12 @@ newEntity{ base = "BASE_STAFF", }, }, max_power = 45, power_regen = 1, - use_power = { name = "create 2 living shards of crystal to serve you for 10 turns", power = 45, use = function(self, who) + use_power = { name = _t"create 2 living shards of crystal to serve you for 10 turns", power = 45, use = function(self, who) if not who:canBe("summon") then game.logPlayer(who, "You cannot summon; you are suppressed!") return end local NPC = require "mod.class.NPC" local list = NPC:loadList("/data/general/npcs/crystal.lua") - game.logSeen(who, "Crystals splinter off of %s's %s and animate!", who.name:capitalize(), self:getName({no_add_name = true, do_color=true})) + game.logSeen(who, "Crystals splinter off of %s's %s and animate!", who:getName():capitalize(), self:getName({no_add_name = true, do_color=true})) for i = 1, 2 do -- Find space local x, y = util.findFreeGrid(who.x, who.y, 5, true, {[engine.Map.ACTOR]=true}) @@ -716,11 +716,11 @@ newEntity{ base = "BASE_STAFF", newEntity{ base = "BASE_WARAXE", power_source = {arcane=true}, define_as = "MALEDICTION", - unided_name = "pestilent waraxe", + unided_name = _t"pestilent waraxe", name = "Malediction", unique=true, image = "object/artifact/axe_malediction.png", moddable_tile = "special/%s_axe_malediction", moddable_tile_big = true, - desc = [[The land withers and crumbles wherever this cursed axe rests.]], + desc = _t[[The land withers and crumbles wherever this cursed axe rests.]], require = { stat = { str=55 }, }, level_range = {35, 45}, rarity = 290, @@ -751,11 +751,11 @@ newEntity{ base = "BASE_WARAXE", newEntity{ base = "BASE_STAFF", power_source = {arcane=true}, define_as = "STAFF_KOR", image = "object/artifact/staff_kors_fall.png", - unided_name = "dark staff", + unided_name = _t"dark staff", flavor_name = "vilestaff", flavors = {vilestaff=true}, name = "Kor's Fall", unique=true, - desc = [[Made from the bones of many creatures, this staff glows with power. You can feel its evil presence even from a distance.]], + desc = _t[[Made from the bones of many creatures, this staff glows with power. You can feel its evil presence even from a distance.]], require = { stat = { mag=25 }, }, level_range = {1, 10}, rarity = 200, @@ -790,8 +790,8 @@ newEntity{ base = "BASE_AMULET", power_source = {arcane=true}, define_as = "VOX", name = "Vox", unique=true, - unided_name = "ringing amulet", color=colors.BLUE, image="object/artifact/jewelry_amulet_vox.png", - desc = [[No force can hope to silence the wearer of this amulet.]], + unided_name = _t"ringing amulet", color=colors.BLUE, image="object/artifact/jewelry_amulet_vox.png", + desc = _t[[No force can hope to silence the wearer of this amulet.]], level_range = {40, 50}, rarity = 220, cost = 3000, @@ -812,10 +812,10 @@ newEntity{ base = "BASE_STAFF", define_as = "TELOS_TOP_HALF", image = "object/artifact/staff_broken_top_telos.png", slot_forbid = false, twohanded = false, - unided_name = "broken staff", flavor_name = "magestaff", + unided_name = _t"broken staff", flavor_name = "magestaff", flavors = {magestaff=true}, name = "Telos's Staff (Top Half)", unique=true, - desc = [[The top part of Telos' broken staff.]], + desc = _t[[The top part of Telos' broken staff.]], require = { stat = { mag=35 }, }, level_range = {40, 50}, rarity = 210, @@ -848,8 +848,8 @@ newEntity{ base = "BASE_AMULET", power_source = {arcane=true}, define_as = "AMULET_DREAD", name = "Choker of Dread", unique=true, image = "object/artifact/amulet_choker_of_dread.png", - unided_name = "dark amulet", color=colors.LIGHT_DARK, - desc = [[The evilness of undeath radiates from this amulet.]], + unided_name = _t"dark amulet", color=colors.LIGHT_DARK, + desc = _t[[The evilness of undeath radiates from this amulet.]], level_range = {20, 28}, rarity = 220, cost = 500, @@ -865,7 +865,7 @@ newEntity{ base = "BASE_AMULET", self.summoned_vampire = nil end, max_power = 60, power_regen = 1, - use_power = { name = "summon an elder vampire with Taunt to your side for 15 turns", power = 60, use = function(self, who) + use_power = { name = _t"summon an elder vampire with Taunt to your side for 15 turns", power = 60, use = function(self, who) if not who:canBe("summon") then game.logPlayer(who, "You cannot summon; you are suppressed!") return end local tg = {type="ball", radius=10, friendlyfire=false, selffire=false} @@ -887,7 +887,7 @@ newEntity{ base = "BASE_AMULET", return end print("Invoking guardian on", x, y) - game.logSeen(who, "%s taps %s %s, summoning a vampire thrall!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color=true})) + game.logSeen(who, "%s taps %s %s, summoning a vampire thrall!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color=true})) -- No gear melee that forces things to attack it, we have to do some work to make this useful.. -- Worse, we need to be able to beat accuracy and ppower checks to land our talents, but scaling off our source on an item is bad for those @@ -896,8 +896,8 @@ newEntity{ base = "BASE_AMULET", local vampire = NPC.new{ type = "undead", subtype = "vampire", display = "V", image = "npc/elder_vampire.png", - name = "elder vampire", color=colors.RED, - desc=[[A terrible robed undead figure, this creature has existed in its unlife for many centuries by stealing the life of others. It can summon the very shades of its victims from beyond the grave to come enslaved to its aid.]], + name = _t"elder vampire", color=colors.RED, + desc=_t[[A terrible robed undead figure, this creature has existed in its unlife for many centuries by stealing the life of others. It can summon the very shades of its victims from beyond the grave to come enslaved to its aid.]], combat = { dam=resolvers.levelup(80, 1, 4), atk=10, apr=who.level / 2, damtype=engine.DamageType.DRAINLIFE, dammod={str=1.9} }, combat_atk = resolvers.levelup(1, 1, 4), @@ -956,7 +956,7 @@ newEntity{ base = "BASE_AMULET", control="no", temporary_level = true, type="minion", - title="Vampire", + title=_t"Vampire", }) end self.summoned_vampire = vampire @@ -971,7 +971,7 @@ newEntity{ define_as = "RUNED_SKULL", power_source = {arcane=true}, unique = true, type = "gem", subtype="red", image = "object/artifact/bone_runed_skull.png", - unided_name = "human skull", + unided_name = _t"human skull", name = "Runed Skull", display = "*", color=colors.RED, level_range = {40, 50}, @@ -979,7 +979,7 @@ newEntity{ define_as = "RUNED_SKULL", cost = 150, encumber = 3, material_level = 5, - desc = [[Dull red runes are etched all over this blackened skull.]], + desc = _t[[Dull red runes are etched all over this blackened skull.]], color_attributes = { damage_type = 'FIRE', alt_damage_type = 'FLAMESHOCK', @@ -995,9 +995,9 @@ newEntity{ define_as = "RUNED_SKULL", newEntity{ base = "BASE_GREATMAUL", power_source = {technique=true}, define_as = "GREATMAUL_BILL_TRUNK", - unided_name = "tree trunk", image = "object/artifact/bill_treestump.png", + unided_name = _t"tree trunk", image = "object/artifact/bill_treestump.png", name = "Bill's Tree Trunk", unique=true, - desc = [[This is a big, nasty-looking tree trunk that Bill the Troll used as a weapon. It could still serve this purpose, should you be strong enough to wield it!]], + desc = _t[[This is a big, nasty-looking tree trunk that Bill the Troll used as a weapon. It could still serve this purpose, should you be strong enough to wield it!]], require = { stat = { str=25 }, }, level_range = {1, 10}, material_level = 1, @@ -1024,10 +1024,10 @@ newEntity{ base = "BASE_GREATMAUL", newEntity{ base = "BASE_SHIELD", power_source = {technique=true}, define_as = "SANGUINE_SHIELD", - unided_name = "bloody shield", + unided_name = _t"bloody shield", name = "Sanguine Shield", unique=true, image = "object/artifact/sanguine_shield.png", moddable_tile = "special/%s_hand_sanguine_shield", moddable_tile_big = true, - desc = [[Though tarnished and spattered with blood, the emblem of the Sun still manages to shine through on this shield.]], + desc = _t[[Though tarnished and spattered with blood, the emblem of the Sun still manages to shine through on this shield.]], require = { stat = { str=39 }, }, level_range = {35, 45}, material_level = 4, @@ -1059,8 +1059,8 @@ newEntity{ base = "BASE_GLOVES", define_as = "FLAMEWROUGHT", power_source = {nature=true}, unique = true, name = "Flamewrought", color = colors.RED, image = "object/artifact/gloves_flamewrought.png", - unided_name = "chitinous gloves", - desc = [[These gloves seems to be made out of the exoskeletons of ritches. They are hot to the touch.]], + unided_name = _t"chitinous gloves", + desc = _t[[These gloves seems to be made out of the exoskeletons of ritches. They are hot to the touch.]], level_range = {5, 12}, rarity = 180, cost = 50, @@ -1089,12 +1089,12 @@ newEntity{ base = "BASE_GLOVES", define_as = "FLAMEWROUGHT", newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_FOCUS", power_source = {arcane=true}, unique = true, - unided_name = "scintillating crystal", + unided_name = _t"scintillating crystal", name = "Crystal Focus", subtype = "multi-hued", color = colors.WHITE, image = "object/artifact/crystal_focus.png", level_range = {5, 12}, - desc = [[This crystal radiates the power of the Spellblaze itself.]], - special_desc = function(self) return "(The created item can be activated to recover the Focus.)" end, + desc = _t[[This crystal radiates the power of the Spellblaze itself.]], + special_desc = function(self) return _t"(The created item can be activated to recover the Focus.)" end, rarity = 200, identified = false, cost = 50, @@ -1111,8 +1111,8 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_FOCUS", }, max_power = 1, power_regen = 1, - use_power = { name = "combine with a weapon (makes a non enchanted weapon into an artifact)", power = 1, use = function(self, who, gem_inven, gem_item) - who:showInventory("Fuse with which weapon?", who:getInven("INVEN"), function(o) return (o.type == "weapon" or o.subtype == "hands" or o.subtype == "shield") and o.subtype ~= "mindstar" and not o.egoed and not o.unique and not o.rare and not o.archery end, function(o, item) + use_power = { name = _t"combine with a weapon (makes a non enchanted weapon into an artifact)", power = 1, use = function(self, who, gem_inven, gem_item) + who:showInventory(_t"Fuse with which weapon?", who:getInven("INVEN"), function(o) return (o.type == "weapon" or o.subtype == "hands" or o.subtype == "shield") and o.subtype ~= "mindstar" and not o.egoed and not o.unique and not o.rare and not o.archery end, function(o, item) local oldname = o:getName{do_color=true} -- Remove the gem @@ -1122,7 +1122,7 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_FOCUS", local Entity = require("engine.Entity") local ActorStats = require("engine.interface.ActorStats") local crystalline_ego = Entity.new{ - name = "crystalline weapon", + name = _t"crystalline weapon", no_unique_lore = true, is_crystalline_weapon = true, power_source = {arcane=true}, @@ -1152,9 +1152,9 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_FOCUS", game.logPlayer(wearer, "#GOLD#The humming from the crystalline artifacts fades as they are separated.") end, resolvers.generic(function(o) - o.name = "Crystalline "..o.name:capitalize() + o.name = ("Crystalline %s"):tformat(o:getName{trans_only=true}:capitalize()) o.unique = o.name - o.desc = (o.desc or "") .." Transformed with the power of the Spellblaze." + o.desc = (o.desc or "") .._t" Transformed with the power of the Spellblaze." end), resolvers.generic(function(o) if o.combat and o.combat.dam then @@ -1178,7 +1178,7 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_FOCUS", o.max_power = 1 o.power_regen = 1 o.use_no_wear = true - o.use_power = { name = "recover the Crystal Focus (destroys this weapon)", power = 1, use = function(self, who, inven, item) + o.use_power = { name = _t"recover the Crystal Focus (destroys this weapon)", power = 1, use = function(self, who, inven, item) local art_list = mod.class.Object:loadList("/data/general/objects/objects-maj-eyal.lua") local o = art_list.CRYSTAL_FOCUS:clone() o:resolve() @@ -1227,12 +1227,12 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_FOCUS", newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_HEART", power_source = {arcane=true}, unique = true, - unided_name = "coruscating crystal", + unided_name = _t"coruscating crystal", name = "Crystal Heart", subtype = "multi-hued", color = colors.RED, image = "object/artifact/crystal_heart.png", level_range = {35, 42}, - desc = [[This crystal is huge, easily the size of your head. It sparkles brilliantly almost of its own accord.]], - special_desc = function(self) return "(The created item can be activated to recover the Heart.)" end, + desc = _t[[This crystal is huge, easily the size of your head. It sparkles brilliantly almost of its own accord.]], + special_desc = function(self) return _t"(The created item can be activated to recover the Heart.)" end, rarity = 250, identified = false, cost = 200, @@ -1249,9 +1249,9 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_HEART", }, max_power = 1, power_regen = 1, - use_power = { name = "combine with a suit of body armor (makes a non enchanted armour into an artifact)", power = 1, use = function(self, who, gem_inven, gem_item) + use_power = { name = _t"combine with a suit of body armor (makes a non enchanted armour into an artifact)", power = 1, use = function(self, who, gem_inven, gem_item) -- Body armour only, can be cloth, light, heavy, or massive though. No clue if o.slot works for this. - who:showInventory("Fuse with which armor?", who:getInven("INVEN"), function(o) return o.type == "armor" and o.slot == "BODY" and not o.egoed and not o.unique and not o.rare end, function(o, item) + who:showInventory(_t"Fuse with which armor?", who:getInven("INVEN"), function(o) return o.type == "armor" and o.slot == "BODY" and not o.egoed and not o.unique and not o.rare end, function(o, item) local oldname = o:getName{do_color=true} -- Remove the gem @@ -1261,7 +1261,7 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_HEART", local Entity = require("engine.Entity") local ActorStats = require("engine.interface.ActorStats") local crystalline_ego = Entity.new{ - name = "crystalline armour", + name = _t"crystalline armour", no_unique_lore = true, is_crystalline_armor = true, power_source = {arcane=true}, @@ -1283,9 +1283,9 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_HEART", self:specialSetAdd({"wielder","blind_immune"}, 0.5) end, resolvers.generic(function(o) - o.name = "Crystalline "..o.name:capitalize() + o.name = ("Crystalline %s"):tformat(o:getName{trans_only=true}:capitalize()) o.unique = o.name - o.desc = (o.desc or "") .." Transformed with the power of the Spellblaze." + o.desc = (o.desc or "") .._t" Transformed with the power of the Spellblaze." end), resolvers.generic(function(o) -- This is supposed to add 1 def for crap cloth robes if for some reason you choose it instead of better robes, and then multiply by 1.25. @@ -1297,7 +1297,7 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_HEART", o.max_power = 1 o.power_regen = 1 o.use_no_wear = true - o.use_power = { name = "recover the Crystal Heart (destroys this armour)", power = 1, use = function(self, who, inven, item) + o.use_power = { name = _t"recover the Crystal Heart (destroys this armour)", power = 1, use = function(self, who, inven, item) local art_list = mod.class.Object:loadList("/data/general/objects/objects-maj-eyal.lua") local o = art_list["CRYSTAL_HEART"]:clone() o:resolve() @@ -1336,9 +1336,9 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_HEART", newEntity{ base = "BASE_ROD", define_as = "ROD_OF_ANNULMENT", power_source = {arcane=true}, - unided_name = "dark rod", + unided_name = _t"dark rod", name = "Rod of Annulment", color=colors.LIGHT_BLUE, unique=true, image = "object/artifact/rod_of_annulment.png", - desc = [[You can feel magic draining out around this rod. Even nature itself seems affected.]], + desc = _t[[You can feel magic draining out around this rod. Even nature itself seems affected.]], cost = 50, rarity = 380, level_range = {5, 12}, @@ -1347,7 +1347,7 @@ newEntity{ base = "BASE_ROD", define_as = "ROD_OF_ANNULMENT", material_level = 2, max_power = 30, power_regen = 1, use_power = { - name = function(self, who) return ("put up to 3 of the target's runes, infusions or talents on cooldown for 3-5 turns (range %d)"):format(self.use_power.range) end, + name = function(self, who) return ("put up to 3 of the target's runes, infusions or talents on cooldown for 3-5 turns (range %d)"):tformat(self.use_power.range) end, power = 30, range = 5, requires_target = true, @@ -1374,7 +1374,7 @@ newEntity{ base = "BASE_ROD", define_as = "ROD_OF_ANNULMENT", local t = rng.tableRemove(tids) if not t then break end target.talents_cd[t.id] = rng.range(3, 5) - game.logSeen(target, "%s's %s is disrupted!", target.name:capitalize(), t.name) + game.logSeen(target, "%s's %s is disrupted!", target:getName():capitalize(), t.name) end target.changed = true end, nil, {type="flame"}) @@ -1394,11 +1394,11 @@ newEntity{ base = "BASE_ROD", define_as = "ROD_OF_ANNULMENT", newEntity{ base = "BASE_WARAXE", power_source = {arcane=true}, define_as = "SKULLCLEAVER", - unided_name = "crimson waraxe", + unided_name = _t"crimson waraxe", name = "Skullcleaver", unique=true, image = "object/artifact/axe_skullcleaver.png", moddable_tile = "special/%s_axe_skullcleaver", moddable_tile_big = true, - desc = [[A small but sharp axe, with a handle made of polished bone. The blade has chopped through the skulls of many, and has been stained a deep crimson.]], + desc = _t[[A small but sharp axe, with a handle made of polished bone. The blade has chopped through the skulls of many, and has been stained a deep crimson.]], require = { stat = { str=18 }, }, level_range = {5, 12}, material_level = 1, @@ -1420,9 +1420,9 @@ newEntity{ base = "BASE_WARAXE", newEntity{ base = "BASE_DIGGER", power_source = {unknown=true}, define_as = "TOOTH_MOUTH", - unided_name = "a tooth", unique = true, + unided_name = _t"a tooth", unique = true, name = "Tooth of the Mouth", image = "object/artifact/tooth_of_the_mouth.png", - desc = [[A huge tooth taken from the Mouth, in the Deep Bellow.]], + desc = _t[[A huge tooth taken from the Mouth, in the Deep Bellow.]], level_range = {5, 12}, cost = 50, rarity = 200, @@ -1440,8 +1440,8 @@ newEntity{ base = "BASE_HEAVY_BOOTS", power_source = {unknown=true}, unique = true, name = "The Warped Boots", image = "object/artifact/the_warped_boots.png", - unided_name = "pair of painful-looking boots", - desc = [[These blackened boots have lost all vestiges of any former glory they might have had. Now, they are a testament to the corruption of the Deep Bellow, and its power.]], + unided_name = _t"pair of painful-looking boots", + desc = _t[[These blackened boots have lost all vestiges of any former glory they might have had. Now, they are a testament to the corruption of the Deep Bellow, and its power.]], color = colors.DARK_GREEN, level_range = {35, 45}, rarity = 250, @@ -1470,8 +1470,8 @@ newEntity{ base = "BASE_AMULET", define_as = "WITHERING_ORBS", unique = true, name = "Withering Orbs", color = colors.WHITE, image = "object/artifact/artifact_jewelry_withering_orbs.png", - unided_name = "shadow-strung orbs", - desc = [[These opalescent orbs stare at you with deathly knowledge, undeceived by your vanities and pretences. They have lived and died through horrors you could never imagine, and now they lie strung in black chords watching every twitch of the shadows. + unided_name = _t"shadow-strung orbs", + desc = _t[[These opalescent orbs stare at you with deathly knowledge, undeceived by your vanities and pretences. They have lived and died through horrors you could never imagine, and now they lie strung in black chords watching every twitch of the shadows. If you close your eyes a moment, you can almost imagine what dread sights they see...]], level_range = {5, 12}, rarity = 200, @@ -1497,8 +1497,8 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", define_as = "BORFAST_CAGE", unique = true, name = "Borfast's Cage", - unided_name = "a suit of pitted and pocked plate-mail", - desc = [[Inch-thick stralite plates lock together with voratun joints. The whole suit looks impenetrable, but has clearly been subjected to terrible treatment - great dents and misshaping warps, and caustic fissures bored across the surface. + unided_name = _t"a suit of pitted and pocked plate-mail", + desc = _t[[Inch-thick stralite plates lock together with voratun joints. The whole suit looks impenetrable, but has clearly been subjected to terrible treatment - great dents and misshaping warps, and caustic fissures bored across the surface. Though clearly a powerful piece, it must once have been much greater.]], color = colors.WHITE, image = "object/artifact/armor_plate_borfasts_cage.png", moddable_tile = "special/armor_plate_borfasts_cage", @@ -1531,9 +1531,9 @@ Though clearly a powerful piece, it must once have been much greater.]], newEntity{ base = "BASE_LEATHER_CAP", -- No armor training requirement power_source = {psionic=true}, define_as = "ALETTA_DIADEM", - name = "Aletta's Diadem", unique=true, unided_name="jeweled diadem", image = "object/artifact/diadem_alettas_diadem.png", + name = "Aletta's Diadem", unique=true, unided_name=_t"jeweled diadem", image = "object/artifact/diadem_alettas_diadem.png", moddable_tile = "special/diadem_alettas_diadem", - desc = [[A filigree of silver set with many small jewels, this diadem seems radiant - ethereal almost. But its touch seems to freeze your skin and brings wild thoughts to your mind. You want to drop it, throw it away, and yet you cannot resist thinking of what powers it might bring you. + desc = _t[[A filigree of silver set with many small jewels, this diadem seems radiant - ethereal almost. But its touch seems to freeze your skin and brings wild thoughts to your mind. You want to drop it, throw it away, and yet you cannot resist thinking of what powers it might bring you. Is this temptation a weak will on your part, or some domination from the artifact itself...?]], require = { stat = { wil=24 }, }, level_range = {20, 28}, @@ -1555,9 +1555,9 @@ Is this temptation a weak will on your part, or some domination from the artifac newEntity{ base = "BASE_SLING", power_source = {nature=true}, define_as = "HARESKIN_SLING", - name = "Hare-Skin Sling", unique=true, unided_name = "hare-skin sling", image = "object/artifact/sling_hareskin_sling.png", + name = "Hare-Skin Sling", unique=true, unided_name = _t"hare-skin sling", image = "object/artifact/sling_hareskin_sling.png", moddable_tile = "special/%s_hareskin_sling", - desc = [[This well-tended sling is made from the leather and sinews of a large hare. It feels smooth to the touch, yet very durable. Some say that the skin of a hare brings luck and fortune. + desc = _t[[This well-tended sling is made from the leather and sinews of a large hare. It feels smooth to the touch, yet very durable. Some say that the skin of a hare brings luck and fortune. Hard to tell if that really helped its former owner, but it's clear that the skin is at least also strong and reliable.]], level_range = {20, 28}, rarity = 200, @@ -1584,8 +1584,8 @@ newEntity{ base = "BASE_TOOL_MISC", define_as = "LUCKY_FOOT", unique = true, name = "Prox's Lucky Halfling Foot", color = colors.WHITE, - unided_name = "a mummified halfling foot", image = "object/artifact/proxs_lucky_halfling_foot.png", - desc = [[A large hairy foot, very recognizably a halfling's, is strung on a piece of thick twine. In its decomposed state it's hard to tell how long ago it parted with its owner, but from what look like teeth marks around the ankle you get the impression that it wasn't given willingly. + unided_name = _t"a mummified halfling foot", image = "object/artifact/proxs_lucky_halfling_foot.png", + desc = _t[[A large hairy foot, very recognizably a halfling's, is strung on a piece of thick twine. In its decomposed state it's hard to tell how long ago it parted with its owner, but from what look like teeth marks around the ankle you get the impression that it wasn't given willingly. It has been kept somewhat intact with layers of salt and clay, but in spite of this it's clear that nature is beginning to take its toll on the dead flesh. Some say the foot of a halfling brings luck to its bearer - right now the only thing you can be sure of is that it stinks.]], level_range = {5, 12}, rarity = 200, @@ -1596,7 +1596,7 @@ It has been kept somewhat intact with layers of salt and clay, but in spite of t cooldown=0, special_desc = function(self) local ready = self:min_power_to_trigger() - self.power - return ("Detects traps.\nRemoves (25%% chance) up to three stuns, pins, or dazes each turn%s"):format((ready > 0) and (" (cooling down: %d turns)"):format(ready) or "") + return ("Detects traps.\nRemoves (25%% chance) up to three stuns, pins, or dazes each turn%s"):tformat((ready > 0) and (" (cooling down: %d turns)"):tformat(ready) or "") end, max_power = 10, power_regen = 1, min_power_to_trigger = function(self) return self.max_power * (self.worn_by and (100 - (self.worn_by:attr("use_object_cooldown_reduce") or 0))/100 or 1) end, -- special handling of the Charm Mastery attribute @@ -1605,7 +1605,7 @@ It has been kept somewhat intact with layers of salt and clay, but in spite of t combat_def = 5, disarm_bonus = 5, }, - use_power = { name = "", power = 10, hidden = true, use = function(self, who) return end, no_npc_use = true}, + use_power = { name = _t"", power = 10, hidden = true, use = function(self, who) return end, no_npc_use = true}, act = function(self) self:useEnergy() if self.worn_by then @@ -1624,7 +1624,7 @@ It has been kept somewhat intact with layers of salt and clay, but in spite of t end end -- only one twitch per action if is_trap then - game.logSeen(actor, "#CRIMSON#%s twitches, alerting %s that a hidden trap is nearby.", self:getName(), actor.name:capitalize()) + game.logSeen(actor, "#CRIMSON#%s twitches, alerting %s that a hidden trap is nearby.", self:getName(), actor:getName():capitalize()) if actor == game.player then game.player:runStop() end @@ -1652,7 +1652,7 @@ It has been kept somewhat intact with layers of salt and clay, but in spite of t end end if num == 1 then - game.logSeen(who, "%s shrugs off some effects!", who.name:capitalize()) + game.logSeen(who, "%s shrugs off some effects!", who:getName():capitalize()) self.power = 0 end for i = 1, 3 do @@ -1685,11 +1685,11 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "PSIONIC_FURY", power_source = {psionic=true}, unique = true, name = "Psionic Fury", - unided_name = "vibrating mindstar", + unided_name = _t"vibrating mindstar", level_range = {24, 32}, color=colors.AQUAMARINE, image = "object/artifact/psionic_fury.png", rarity = 250, - desc = [[This mindstar constantly shakes and vibrates, as if a powerful force is desperately trying to escape.]], + desc = _t[[This mindstar constantly shakes and vibrates, as if a powerful force is desperately trying to escape.]], cost = 85, require = { stat = { wil=24 }, }, material_level = 3, @@ -1715,7 +1715,7 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "PSIONIC_FURY", max_power = 40, power_regen = 1, use_power = { name = function(self, who) return ("release a wave of psionic power, dealing %0.2f mind damage (based on Willpower) to all within radius %d"): - format(who:damDesc(engine.DamageType.MIND, self.use_power.damage(self, who)), self.use_power.radius) end, + tformat(who:damDesc(engine.DamageType.MIND, self.use_power.damage(self, who)), self.use_power.radius) end, power = 40, radius = 5, range = 0, @@ -1726,7 +1726,7 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "PSIONIC_FURY", local radius = self.use_power.radius local dam = self.use_power.damage(self, who) local blast = self.use_power.target(self, who) - game.logSeen(who, "%s's %s sends out a blast of psionic energy!", who.name:capitalize(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s's %s sends out a blast of psionic energy!", who:getName():capitalize(), self:getName({no_add_name = true, do_color = true})) who:project(blast, who.x, who.y, engine.DamageType.MIND, dam) game.level.map:particleEmitter(who.x, who.y, blast.radius, "force_blast", {radius=blast.radius}) return {id=true, used=true} @@ -1738,8 +1738,8 @@ newEntity{ base = "BASE_GAUNTLETS", define_as = "STORM_BRINGER_GAUNTLETS", power_source = {arcane=true}, unique = true, name = "Storm Bringer's Gauntlets", color = colors.LIGHT_STEEL_BLUE, image = "object/artifact/storm_bringers_gauntlets.png", - unided_name = "fine-mesh gauntlets", - desc = [[This pair of fine mesh voratun gauntlets is covered with glyphs of power that spark with azure energy. The metal is supple and light so as not to interfere with spell-casting. When and where these gauntlets were forged is a mystery, but odds are the crafter knew a thing or two about magic.]], + unided_name = _t"fine-mesh gauntlets", + desc = _t[[This pair of fine mesh voratun gauntlets is covered with glyphs of power that spark with azure energy. The metal is supple and light so as not to interfere with spell-casting. When and where these gauntlets were forged is a mystery, but odds are the crafter knew a thing or two about magic.]], level_range = {25, 35}, rarity = 250, cost = 1000, @@ -1772,11 +1772,11 @@ newEntity{ base = "BASE_GAUNTLETS", define_as = "STORM_BRINGER_GAUNTLETS", newEntity{ base = "BASE_TRIDENT", power_source = {arcane=true}, define_as = "TRIDENT_STREAM", - unided_name = "ornate trident", + unided_name = _t"ornate trident", name = "River's Fury", unique=true, image = "object/artifact/the_rivers_fury.png", moddable_tile = "special/%s_the_rivers_fury", moddable_tile_big = true, - desc = [[This gorgeous and ornate trident was wielded by Lady Nashva, and when you hold it, you can faintly hear the roar of a rushing river.]], + desc = _t[[This gorgeous and ornate trident was wielded by Lady Nashva, and when you hold it, you can faintly hear the roar of a rushing river.]], require = { stat = { str=12 }, }, level_range = {1, 10}, rarity = 230, @@ -1809,10 +1809,10 @@ newEntity{ base = "BASE_KNIFE", define_as = "UNERRING_SCALPEL", unique = true, name = "Unerring Scalpel", image = "object/artifact/unerring_scalpel.png", - unided_name = "long sharp scalpel", + unided_name = _t"long sharp scalpel", moddable_tile = "special/%s_unerring_scalpel", moddable_tile_big = true, - desc = [[This scalpel was used by the dread sorcerer Kor'Pul when he began learning the necromantic arts in the Age of Dusk. Many were the bodies, living and dead, that became unwilling victims of his terrible experiments.]], + desc = _t[[This scalpel was used by the dread sorcerer Kor'Pul when he began learning the necromantic arts in the Age of Dusk. Many were the bodies, living and dead, that became unwilling victims of his terrible experiments.]], level_range = {1, 12}, rarity = 200, require = { stat = { cun=16 }, }, @@ -1835,8 +1835,8 @@ newEntity{ base = "BASE_GLOVES", define_as = "VARSHA_CLAW", power_source = {nature=true}, unique = true, name = "Wyrmbreath", color = colors.RED, image = "object/artifact/wyrmbreath.png", - unided_name = "clawed dragon-scale gloves", - desc = [[These dragon scale gloves are tipped with the claws and teeth of a vicious Wyrm. The gloves are warm to the touch.]], + unided_name = _t"clawed dragon-scale gloves", + desc = _t[[These dragon scale gloves are tipped with the claws and teeth of a vicious Wyrm. The gloves are warm to the touch.]], level_range = {12, 22}, rarity = 180, cost = 50, @@ -1864,11 +1864,11 @@ newEntity{ base = "BASE_TOOL_MISC", define_as = "EYE_OF_THE_DREAMING_ONE", power_source = {psionic=true}, unique=true, rarity=240, name = "Eye of the Dreaming One", - unided_name = "translucent sphere", + unided_name = _t"translucent sphere", color = colors.YELLOW, level_range = {1, 10}, image = "object/artifact/eye_of_the_dreaming_one_new.png", - desc = [[This ethereal eye stares eternally, as if seeing things that do not truly exist.]], + desc = _t[[This ethereal eye stares eternally, as if seeing things that do not truly exist.]], cost = 320, material_level = 1, wielder = { diff --git a/game/modules/tome/data/general/objects/boss-artifacts.lua b/game/modules/tome/data/general/objects/boss-artifacts.lua index cea2c5adc85d7e1bee737ca184c37e783441dbff..e09ba56ed14d5194b918933b313dba13f7f456cc 100644 --- a/game/modules/tome/data/general/objects/boss-artifacts.lua +++ b/game/modules/tome/data/general/objects/boss-artifacts.lua @@ -26,7 +26,7 @@ newEntity{ define_as = "RUNGOF_FANG", power_source = {nature=true}, unique = true, type = "misc", subtype="fang", - unided_name = "bloodied fang", + unided_name = _t"bloodied fang", name = "Rungof's Fang", image = "object/artifact/rungof_fang.png", level_range = {20, 35}, rarity = false, @@ -34,7 +34,7 @@ newEntity{ define_as = "RUNGOF_FANG", cost = 100, encumber = 1, not_in_stores = true, - desc = [[A fang from the great warg, Rungof, still covered in blood.]], + desc = _t[[A fang from the great warg, Rungof, still covered in blood.]], carrier = { combat_apr = 7, @@ -46,10 +46,10 @@ newEntity{ base = "BASE_BATTLEAXE", power_source = {arcane=true}, define_as = "KHULMANAR_WRATH", name = "Khulmanar's Wrath", color = colors.DARK_RED, image = "object/artifact/hellfire.png", - unided_name = "firey blackened battleaxe", unique = true, + unided_name = _t"firey blackened battleaxe", unique = true, moddable_tile = "special/%s_hellfire", moddable_tile_big = true, - desc = [[Blackened with soot and covered in spikes, this battleaxe roars with the flames of the Fearscape. Given by Urh'Rok himself to his general, this powerful weapon can burn even the most resilient of foes.]], + desc = _t[[Blackened with soot and covered in spikes, this battleaxe roars with the flames of the Fearscape. Given by Urh'Rok himself to his general, this powerful weapon can burn even the most resilient of foes.]], level_range = {37, 50}, rarity = 300, require = { stat = { str=52 }, }, @@ -84,8 +84,8 @@ newEntity{ base = "BASE_TOOL_MISC", image="object/temporal_instability.png", define_as = "BLADE_RIFT", unique = true, name = "Bladed Rift", color = colors.BLUE, image = "object/artifact/bladed_rift.png", - unided_name = "hole in space", - desc = [[Upon defeat, Ak'Gishil collapsed into this tiny rift. How it remains stable, you are unsure. If you focus, you think you can call forth a sword from it.]], + unided_name = _t"hole in space", + desc = _t[[Upon defeat, Ak'Gishil collapsed into this tiny rift. How it remains stable, you are unsure. If you focus, you think you can call forth a sword from it.]], level_range = {30, 50}, rarity = 500, cost = 500, @@ -114,10 +114,10 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "RIFT_SWORD", power_source = {arcane=true}, unique = true, name = "Blade of Distorted Time", image = "object/artifact/blade_of_distorted_time.png", - unided_name = "time-warped sword", + unided_name = _t"time-warped sword", moddable_tile = "special/%s_blade_of_distorted_time", moddable_tile_big = true, - desc = [[The remnants of a damaged timeline, this blade shifts and fades at random.]], + desc = _t[[The remnants of a damaged timeline, this blade shifts and fades at random.]], level_range = {30, 50}, rarity = 220, require = { stat = { str=44 }, }, @@ -132,7 +132,7 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "RIFT_SWORD", special_on_hit = { desc=function(self, who, special) local dam, slow = special.proc_values(who) - return ("deals %d temporal damage and slows enemies in radius 6 of the target by %d%% based on Magic"):format(dam, slow*100) + return ("deals %d temporal damage and slows enemies in radius 6 of the target by %d%% based on Magic"):tformat(dam, slow*100) end, proc_values=function(who) local dam = (20 + who:getMag()) @@ -159,8 +159,8 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "RIFT_SWORD", newEntity{ base = "BASE_RUNE", define_as = "RUNE_REFLECT", name = "Rune of Reflection", unique=true, image = "object/artifact/rune_of_reflection.png", - desc = [[You can see your own image mirrored in the surface of this silvery rune.]], - unided_name = "shiny rune", + desc = _t[[You can see your own image mirrored in the surface of this silvery rune.]], + unided_name = _t"shiny rune", level_range = {5, 15}, rarity = 240, cost = 100, @@ -181,10 +181,10 @@ newEntity{ base = "BASE_BATTLEAXE", power_source = {nature=true, antimagic=true}, define_as = "GAPING_MAW", name = "The Gaping Maw", color = colors.SLATE, image = "object/artifact/battleaxe_the_gaping_maw.png", - unided_name = "huge granite battleaxe", unique = true, + unided_name = _t"huge granite battleaxe", unique = true, moddable_tile = "special/%s_battleaxe_the_gaping_maw", moddable_tile_big = true, - desc = [[This huge granite battleaxe is as much mace as it is axe. The shaft is made of blackened wood tightly bound in drakeskin leather and the sharpened granite head glistens with a viscous green fluid.]], + desc = _t[[This huge granite battleaxe is as much mace as it is axe. The shaft is made of blackened wood tightly bound in drakeskin leather and the sharpened granite head glistens with a viscous green fluid.]], level_range = {38, 50}, rarity = 300, require = { stat = { str=60 }, }, @@ -197,7 +197,7 @@ newEntity{ base = "BASE_BATTLEAXE", physcrit = 8, dammod = {str=1.2}, melee_project={[DamageType.SLIME] = 50, [DamageType.ACID] = 50}, - special_on_crit = {desc="deal manaburn damage equal to your mindpower in a radius 3 cone", on_kill=1, fct=function(combat, who, target) + special_on_crit = {desc=_t"deal manaburn damage equal to your mindpower in a radius 3 cone", on_kill=1, fct=function(combat, who, target) who.turn_procs.gaping_maw = (who.turn_procs.gaping_maw or 0) + 1 local tg = {type="cone", range=10, radius=3, force_target=target, selffire=false} local grids = who:project(tg, target.x, target.y, engine.DamageType.MANABURN, who:combatMindpower() / (who.turn_procs.gaping_maw)) diff --git a/game/modules/tome/data/general/objects/bows.lua b/game/modules/tome/data/general/objects/bows.lua index ead5f9a426d4d36378f9bca0c7d5d76ea2e0da88..7e386d6532694d23f36da27574e659bc938ea4e8 100644 --- a/game/modules/tome/data/general/objects/bows.lua +++ b/game/modules/tome/data/general/objects/bows.lua @@ -33,7 +33,7 @@ newEntity{ archery_kind = "bow", archery = "bow", proj_image = resolvers.image_material("arrow", "wood"), - desc = [[Longbows are used to shoot arrows at your foes.]], + desc = _t[[Longbows are used to shoot arrows at your foes.]], randart_able = "/data/general/objects/random-artifacts/ranged.lua", ego_bonus_mult = 0.5, egos = "/data/general/objects/egos/bow.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, @@ -111,7 +111,7 @@ newEntity{ }, proj_image = resolvers.image_material("arrow", "wood"), archery_ammo = "bow", - desc = [[Arrows are used with bows to pierce your foes to death.]], + desc = _t[[Arrows are used with bows to pierce your foes to death.]], randart_able = "/data/general/objects/random-artifacts/ammo.lua", ego_bonus_mult = 0.5, egos = "/data/general/objects/egos/ammo.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, diff --git a/game/modules/tome/data/general/objects/brotherhood-artifacts.lua b/game/modules/tome/data/general/objects/brotherhood-artifacts.lua index 39eebf6e3c017575f5bfb3753bb6393a036f31f8..f3198f3bf3ff05232d785d404eb395e70721a89b 100644 --- a/game/modules/tome/data/general/objects/brotherhood-artifacts.lua +++ b/game/modules/tome/data/general/objects/brotherhood-artifacts.lua @@ -28,14 +28,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_FOX", type = "potion", subtype="potion", image = "object/elixir_of_the_fox.png", - name = "Elixir of the Fox", unique=true, unided_name="vial of pink fluid", + name = "Elixir of the Fox", unique=true, unided_name=_t"vial of pink fluid", display = "!", color=colors.VIOLET, - desc = [[A vial of pink, airy fluid.]], + desc = _t[[A vial of pink, airy fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="permanently increase your dexterity and cunning by three", use = function(self, who) + use_simple = { name=_t"permanently increase your dexterity and cunning by three", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.inc_stats[who.STAT_DEX] = who.inc_stats[who.STAT_DEX] + 3 who:onStatChange(who.STAT_DEX, 3) @@ -50,14 +50,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_AVOIDANCE", type = "potion", subtype="potion", image = "object/elixir_of_avoidance.png", - name = "Elixir of Avoidance", unique=true, unided_name="vial of green fluid", + name = "Elixir of Avoidance", unique=true, unided_name=_t"vial of green fluid", display = "!", color=colors.GREEN, - desc = [[A vial of opaque green fluid.]], + desc = _t[[A vial of opaque green fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="permanently increase your defense and ranged defense by six", use = function(self, who) + use_simple = { name=_t"permanently increase your defense and ranged defense by six", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.combat_def = who.combat_def + 6 game.logPlayer(who, "#00FF00#The elixir has improved your defensive instincts!") @@ -69,14 +69,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_PRECISION", type = "potion", subtype="potion", image = "object/elixir_of_precision.png", - name = "Elixir of Precision", unique=true, unided_name="vial of red fluid", + name = "Elixir of Precision", unique=true, unided_name=_t"vial of red fluid", display = "!", color=colors.RED, - desc = [[A vial of chunky red fluid.]], + desc = _t[[A vial of chunky red fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="permanently increase your physical critical strike chance by 4%", use = function(self, who) + use_simple = { name=_t"permanently increase your physical critical strike chance by 4%", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.combat_physcrit = who.combat_physcrit + 4 game.logPlayer(who, "#00FF00#The elixir has improved your eye for an enemy's weak points!") @@ -88,14 +88,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_MYSTICISM", type = "potion", subtype="potion", image = "object/elixir_of_mysticism.png", - name = "Elixir of Mysticism", unique=true, unided_name="vial of cyan fluid", + name = "Elixir of Mysticism", unique=true, unided_name=_t"vial of cyan fluid", display = "!", color=colors.AQUAMARINE, - desc = [[A vial of glowing cyan fluid.]], + desc = _t[[A vial of glowing cyan fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="permanently increase your magic and willpower by three", use = function(self, who) + use_simple = { name=_t"permanently increase your magic and willpower by three", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.inc_stats[who.STAT_MAG] = who.inc_stats[who.STAT_MAG] + 3 who:onStatChange(who.STAT_MAG, 3) @@ -110,14 +110,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_SAVIOR", type = "potion", subtype="potion", image = "object/elixir_of_the_saviour.png", - name = "Elixir of the Savior", unique=true, unided_name="vial of grey fluid", + name = "Elixir of the Savior", unique=true, unided_name=_t"vial of grey fluid", display = "!", color=colors.GREY, - desc = [[A vial of bubbling, slate-colored fluid.]], + desc = _t[[A vial of bubbling, slate-colored fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="permanently increase all your saving throws by 4", use = function(self, who) + use_simple = { name=_t"permanently increase all your saving throws by 4", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.combat_physresist = who.combat_physresist + 4 who.combat_spellresist = who.combat_spellresist + 4 @@ -131,14 +131,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_MASTERY", type = "potion", subtype="potion", image = "object/elixir_of_mastery.png", - name = "Elixir of Mastery", unique=true, unided_name="vial of maroon fluid", + name = "Elixir of Mastery", unique=true, unided_name=_t"vial of maroon fluid", display = "!", color=colors.DARK_RED, - desc = [[A vial of thick maroon fluid.]], + desc = _t[[A vial of thick maroon fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="grant you four additional stat points", use = function(self, who) + use_simple = { name=_t"grant you four additional stat points", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.unused_stats = who.unused_stats + 4 game.logPlayer(who, "#00FF00#The elixir has greatly expanded your capacity for improving your mind and body.") @@ -151,14 +151,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_FORCE", type = "potion", subtype="potion", image = "object/elixir_of_explosive_force.png", - name = "Elixir of Explosive Force", unique=true, unided_name="vial of orange fluid", + name = "Elixir of Explosive Force", unique=true, unided_name=_t"vial of orange fluid", display = "!", color=colors.ORANGE, - desc = [[A vial of churning orange fluid.]], + desc = _t[[A vial of churning orange fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="permanently increase your chance to critically strike with spells by 4%", use = function(self, who) + use_simple = { name=_t"permanently increase your chance to critically strike with spells by 4%", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.combat_spellcrit = who.combat_spellcrit + 4 game.logPlayer(who, "#00FF00#The elixir has improved your eye for an enemy's magical weak points!") @@ -170,14 +170,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_SERENDIPITY", type = "potion", subtype="potion", image = "object/elixir_of_serendipity.png", - name = "Elixir of Serendipity", unique=true, unided_name="vial of yellow fluid", + name = "Elixir of Serendipity", unique=true, unided_name=_t"vial of yellow fluid", display = "!", color=colors.YELLOW, - desc = [[A vial of lively yellow fluid.]], + desc = _t[[A vial of lively yellow fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="permanently increase your luck by 5", use = function(self, who) + use_simple = { name=_t"permanently increase your luck by 5", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.inc_stats[who.STAT_LCK] = who.inc_stats[who.STAT_LCK] + 5 who:onStatChange(who.STAT_LCK, 5) @@ -190,14 +190,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_FOCUS", type = "potion", subtype="potion", image = "object/elixir_of_focus.png", - name = "Elixir of Focus", unique=true, unided_name="vial of clear fluid", + name = "Elixir of Focus", unique=true, unided_name=_t"vial of clear fluid", display = "!", color=colors.WHITE, - desc = [[A vial of clear, steaming fluid.]], + desc = _t[[A vial of clear, steaming fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="grant you two additional class talent points", use = function(self, who) + use_simple = { name=_t"grant you two additional class talent points", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.unused_talents = who.unused_talents + 2 game.logPlayer(who, "#00FF00#The elixir has improved your capacity for exercising your core talents.") @@ -209,14 +209,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_BRAWN", type = "potion", subtype="potion", image = "object/elixir_of_brawn.png", - name = "Elixir of Brawn", unique=true, unided_name="vial of tan fluid", + name = "Elixir of Brawn", unique=true, unided_name=_t"vial of tan fluid", display = "!", color=colors.TAN, - desc = [[A vial of sluggish tan fluid.]], + desc = _t[[A vial of sluggish tan fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="permanently increase your strength and constitution by three", use = function(self, who) + use_simple = { name=_t"permanently increase your strength and constitution by three", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.inc_stats[who.STAT_STR] = who.inc_stats[who.STAT_STR] + 3 who:onStatChange(who.STAT_STR, 3) @@ -231,14 +231,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_STONESKIN", type = "potion", subtype="potion", image = "object/elixir_of_stoneskin.png", - name = "Elixir of Stoneskin", unique=true, unided_name="vial of iron-colored fluid", + name = "Elixir of Stoneskin", unique=true, unided_name=_t"vial of iron-colored fluid", display = "!", color=colors.SLATE, - desc = [[A vial of grainy, iron-colored fluid.]], + desc = _t[[A vial of grainy, iron-colored fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="permanently increase your armor by four", use = function(self, who) + use_simple = { name=_t"permanently increase your armor by four", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.combat_armor = who.combat_armor + 4 game.logPlayer(who, "#00FF00#The elixir has reinforced your entire body!") @@ -250,14 +250,14 @@ newEntity{ power_source = {nature=true}, define_as = "ELIXIR_FOUNDATIONS", type = "potion", subtype="potion", image = "object/elixir_of_foundations.png", - name = "Elixir of Foundations", unique=true, unided_name="vial of white fluid", + name = "Elixir of Foundations", unique=true, unided_name=_t"vial of white fluid", display = "!", color=colors.WHITE, - desc = [[A vial of murky white fluid.]], + desc = _t[[A vial of murky white fluid.]], no_unique_lore = true, cost = 1000, quest = 1, - use_simple = { name="grant you two additional generic talent points", use = function(self, who) + use_simple = { name=_t"grant you two additional generic talent points", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the elixir and feel forever transformed!") who.unused_generics = who.unused_generics + 2 game.logPlayer(who, "#00FF00#The elixir has improved your capacity for exercising your core talents.") @@ -303,10 +303,10 @@ newEntity{ base = "BASE_GEM", define_as = "LIFEBINDING_EMERALD", power_source = {nature=true}, unique = true, - unided_name = "cloudy, heavy emerald", + unided_name = _t"cloudy, heavy emerald", name = "Lifebinding Emerald", subtype = "green", image = "object/lifebinding_emerald.png", color = colors.GREEN, - desc = [[A lopsided, heavy emerald with murky green clouds shifting sluggishly under the surface.]], + desc = _t[[A lopsided, heavy emerald with murky green clouds shifting sluggishly under the surface.]], cost = 200, quest = 1, material_level = 5, @@ -345,13 +345,13 @@ newEntity{ define_as = "ELIXIR_INVULNERABILITY", encumber = 2, type = "potion", subtype="potion", image = "object/elixir_of_invulnerability.png", - name = "Elixir of Invulnerability", unique=true, unided_name="vial of black fluid", + name = "Elixir of Invulnerability", unique=true, unided_name=_t"vial of black fluid", display = "!", color=colors.SLATE, - desc = [[A vial of thick fluid, metallic and reflective. It's incredibly heavy.]], + desc = _t[[A vial of thick fluid, metallic and reflective. It's incredibly heavy.]], cost = 200, quest = 1, - use_simple = { name="grant you complete invulnerability for five turns", use = function(self, who) + use_simple = { name=_t"grant you complete invulnerability for five turns", use = function(self, who) who:setEffect(who.EFF_DAMAGE_SHIELD, 5, {power=1000000}) game.logPlayer(who, "#00FF00#You feel indestructible!") return {used=true, id=true, destroy=true} diff --git a/game/modules/tome/data/general/objects/cloak.lua b/game/modules/tome/data/general/objects/cloak.lua index 4068f73226b8b90b6b86cde851ea229bd558459a..90e401b35f828da490fab3200e032f8a35d085c4 100644 --- a/game/modules/tome/data/general/objects/cloak.lua +++ b/game/modules/tome/data/general/objects/cloak.lua @@ -26,7 +26,7 @@ newEntity{ moddable_tile = resolvers.moddable_tile("cloak"), moddable_tile_hood = true, encumber = 2, rarity = 6, - desc = [[A cloth coat typically worn as a loose outer garment. It is spacious enough to be worn even over bulky metal armour.]], + desc = _t[[A cloth coat typically worn as a loose outer garment. It is spacious enough to be worn even over bulky metal armour.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/cloak.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/cloth-armors.lua b/game/modules/tome/data/general/objects/cloth-armors.lua index 5a4650505e6127c53381c96a9df28d89af73872b..4531dbff4bf044e4a69f8e67095a3396a9801c3a 100644 --- a/game/modules/tome/data/general/objects/cloth-armors.lua +++ b/game/modules/tome/data/general/objects/cloth-armors.lua @@ -26,7 +26,7 @@ newEntity{ moddable_tile = resolvers.moddable_tile("robe"), encumber = 2, rarity = 5, - desc = [[A cloth vestment. It offers no intrinsic protection but can be enchanted.]], + desc = _t[[A cloth vestment. It offers no intrinsic protection but can be enchanted.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/robe.lua", egos_chance = { prefix=resolvers.mbonus(30, 15), suffix=resolvers.mbonus(30, 15) }, wielder = { diff --git a/game/modules/tome/data/general/objects/digger.lua b/game/modules/tome/data/general/objects/digger.lua index 69e542da3cb622378144c2810d4c67dada7b9f64..40449282a45c5c839f0d7a44d5dd3c4130d4bbcc 100644 --- a/game/modules/tome/data/general/objects/digger.lua +++ b/game/modules/tome/data/general/objects/digger.lua @@ -27,7 +27,7 @@ newEntity{ display = "\\", color=colors.LIGHT_BLUE, image = resolvers.image_material("pickaxe", "metal"), encumber = 3, rarity = 14, - desc = [[Allows you to dig a wall, remove a tree, create ways.]], + desc = _t[[Allows you to dig a wall, remove a tree, create ways.]], add_name = " (#DIGSPEED#)", carrier = { diff --git a/game/modules/tome/data/general/objects/egos/ammo.lua b/game/modules/tome/data/general/objects/egos/ammo.lua index a1d4d2569cd524a561e98d36f40944f559544b1d..f63aa7f807f6aefa7d54b25beecdd5ea838008e5 100644 --- a/game/modules/tome/data/general/objects/egos/ammo.lua +++ b/game/modules/tome/data/general/objects/egos/ammo.lua @@ -40,7 +40,7 @@ newEntity{ special_on_crit = { desc=function(self, who, special) local dam, hf = special.wound(self.combat, who) - return ("Wound the target dealing #RED#%d#LAST# physical damage across 5 turns and reducing healing by %d%%"):format(dam, hf) + return ("Wound the target dealing #RED#%d#LAST# physical damage across 5 turns and reducing healing by %d%%"):tformat(dam, hf) end, wound=function(combat, who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 350))) -- Doesn't stack @@ -109,7 +109,7 @@ newEntity{ cost = 40, combat = { physcrit = resolvers.mbonus_material(10, 5), - special_on_crit = {desc="Cripple the target reducing mind, spell, and combat action speeds by 30%", fct=function(combat, who, target) + special_on_crit = {desc=_t"Cripple the target reducing mind, spell, and combat action speeds by 30%", fct=function(combat, who, target) target:setEffect(target.EFF_CRIPPLE, 4, {src=who, apply_power=who:combatAttack(combat)}) end}, }, @@ -146,7 +146,7 @@ newEntity{ special_on_crit = { desc=function(self, who, special) local dam = special.acid_splash(who) - return ("Splash the target with acid dealing #VIOLET#%d#LAST# damage over 5 turns and reducing armor and accuracy by #VIOLET#%d#LAST#"):format(dam, math.ceil(dam / 8)) + return ("Splash the target with acid dealing #VIOLET#%d#LAST# damage over 5 turns and reducing armor and accuracy by #VIOLET#%d#LAST#"):tformat(dam, math.ceil(dam / 8)) end, acid_splash=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 250))) @@ -173,7 +173,7 @@ newEntity{ special_on_hit = { desc=function(self, who, special) local dam = special.arc(who) - return ("#LIGHT_GREEN#25%%#LAST# chance for lightning to strike from the target to a second target dealing #VIOLET#%d#LAST# damage"):format(dam) + return ("#LIGHT_GREEN#25%%#LAST# chance for lightning to strike from the target to a second target dealing #VIOLET#%d#LAST# damage"):tformat(dam) end, arc=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150))) @@ -308,16 +308,16 @@ newEntity{ combat = { elemental_bonus = resolvers.mbonus_material(25, 5), -- We can't use the wielder bonuses this ego normally gets, so give it a scaling bonus instead elemental_element = resolvers.rngtable{ - {engine.DamageType.FIRE, "flame", "fire"}, - {engine.DamageType.COLD, "freeze", "cold"}, - {engine.DamageType.LIGHTNING, "lightning_explosion", "lightning"}, - {engine.DamageType.ACID, "acid", "acid"}, + {engine.DamageType.FIRE, "flame", _t"fire"}, + {engine.DamageType.COLD, "freeze", _t"cold"}, + {engine.DamageType.LIGHTNING, "lightning_explosion", _t"lightning"}, + {engine.DamageType.ACID, "acid", _t"acid"}, }, special_on_hit = { on_kill = 1, desc=function(self, who, special) local dam = special.explosion(self.combat, who) - return ("Create an explosion dealing #VIOLET#%d#LAST# %s damage (1/turn)"):format(dam, self.combat.elemental_element and self.combat.elemental_element[3] or "<random on generation>" ) + return ("Create an explosion dealing #VIOLET#%d#LAST# %s damage (1/turn)"):tformat(dam, self.combat.elemental_element and self.combat.elemental_element[3] or "<random on generation>" ) end, explosion=function(self, who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150)) * (1 + (self.elemental_bonus or 0) / 100)) @@ -465,7 +465,7 @@ newEntity{ on_kill = 1, desc=function(self, who, special) local dam = special.explosion(who) - return ("#LIGHT_GREEN#20%%#LAST# chance to create an air burst in radius 3 knocking enemies back 2 spaces and dealing #RED#%d#LAST# physical damage"):format(dam) + return ("#LIGHT_GREEN#20%%#LAST# chance to create an air burst in radius 3 knocking enemies back 2 spaces and dealing #RED#%d#LAST# physical damage"):tformat(dam) end, explosion=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 250))) @@ -496,7 +496,7 @@ newEntity{ special_on_hit = { desc=function(self, who, special) local dam = special.damage(who) - return ("#LIGHT_GREEN#20%%#LAST# chance to create vines that bind the target to the ground dealing #YELLOW#%d#LAST# nature damage and pinning them for 3 turns"):format(dam) + return ("#LIGHT_GREEN#20%%#LAST# chance to create vines that bind the target to the ground dealing #YELLOW#%d#LAST# nature damage and pinning them for 3 turns"):tformat(dam) end, damage=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatMindpower(), 1, 350))) @@ -510,7 +510,7 @@ newEntity{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, 3, {src=who, apply_power=check}) else - game.logSeen(target, "%s resists the grasping vines!", target.name:capitalize()) + game.logSeen(target, "%s resists the grasping vines!", target:getName():capitalize()) end end }, @@ -575,7 +575,7 @@ newEntity{ desc=function(self, who, special) local manaburn = special.manaburn(who) return ("Deals #YELLOW#%d#LAST# Manaburn damage and puts 1 random spell talent on cooldown for #YELLOW#%d#LAST# turns (checks Confusion immunity)"): - format(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20)) + tformat(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20)) end, manaburn=function(who) local dam = math.max(10, math.floor(who:combatStatScale(who:combatMindpower(), 1, 150))) @@ -599,7 +599,7 @@ newEntity{ local t = rng.tableRemove(tids) if not t then return end target.talents_cd[t.id] = turns - game.logSeen(target, "#YELLOW#%s has their %s spell disrupted for for %d turns!", target.name:capitalize(), t.name, turns) + game.logSeen(target, "#YELLOW#%s has their %s spell disrupted for for %d turns!", target:getName():capitalize(), t.name, turns) end }, }, @@ -620,7 +620,7 @@ newEntity{ }, special_on_hit = { desc=function(self, who, special) - return ("Cause the target to have a 10%% chance to fail spellcasting and 10%% chance to lose a magical sustain each turn, stacking up to 50%%"):format() + return ("Cause the target to have a 10%% chance to fail spellcasting and 10%% chance to lose a magical sustain each turn, stacking up to 50%%"):tformat() end, fct=function(combat, who, target, dam, special) local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack()) @@ -680,7 +680,7 @@ newEntity{ special_on_hit = { desc=function(self, who, special) local dam = special.psychokinetic_damage(who) - return ("#LIGHT_GREEN#20%%#LAST# chance to knock the target back 3 spaces and deal #YELLOW#%d#LAST# physical damage"):format(dam) + return ("#LIGHT_GREEN#20%%#LAST# chance to knock the target back 3 spaces and deal #YELLOW#%d#LAST# physical damage"):tformat(dam) end, psychokinetic_damage=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatMindpower(), 1, 350))) @@ -708,7 +708,7 @@ newEntity{ combat = { special_on_hit = { desc=function(self, who, special) - return ("#LIGHT_GREEN#50%%#LAST# chance to put 1 talent on cooldown for #YELLOW#%d#LAST# turns (checks Confusion immunity)"):format(1 + math.ceil(who:combatMindpower() / 20)) + return ("#LIGHT_GREEN#50%%#LAST# chance to put 1 talent on cooldown for #YELLOW#%d#LAST# turns (checks Confusion immunity)"):tformat(1 + math.ceil(who:combatMindpower() / 20)) end, fct=function(combat, who, target, dam, special) if not rng.percent(50) then return nil end @@ -727,7 +727,7 @@ newEntity{ local t = rng.tableRemove(tids) if not t then break end target.talents_cd[t.id] = turns - game.logSeen(target, "#YELLOW#%s has temporarily forgotten %s for %d turns!", target.name:capitalize(), t.name, turns) + game.logSeen(target, "#YELLOW#%s has temporarily forgotten %s for %d turns!", target:getName():capitalize(), t.name, turns) end end }, @@ -745,7 +745,7 @@ newEntity{ cost = 30, combat = { special_on_hit = { - desc="#LIGHT_GREEN#20%#LAST# chance to stun, blind, pin, confuse, or silence the target for 3 turns", + desc=_t"#LIGHT_GREEN#20%#LAST# chance to stun, blind, pin, confuse, or silence the target for 3 turns", fct=function(combat, who, target, dam, special) if not rng.percent(20) then return end local eff = rng.table{"stun", "blind", "pin", "confusion", "silence",} diff --git a/game/modules/tome/data/general/objects/egos/belt.lua b/game/modules/tome/data/general/objects/egos/belt.lua index b1755d0306900a942e30d45c4edc34f4cddb225c..9fb961c4880e94302f5ae4a70a9a3349f108c5fb 100644 --- a/game/modules/tome/data/general/objects/egos/belt.lua +++ b/game/modules/tome/data/general/objects/egos/belt.lua @@ -375,10 +375,10 @@ newEntity{ charm_power = resolvers.mbonus_material(80, 30), charm_power_def = {add=80, max=300, floor=true}, - resolvers.charm("create a temporary shield that absorbs %d damage", 30, function(self, who) + resolvers.charm(_t"create a temporary shield that absorbs %d damage", 30, function(self, who) local power = self:getCharmPower(who) who:setEffect(who.EFF_DAMAGE_SHIELD, 10, {power=power}) - game.logSeen(who, "%s uses %s!", who.name:capitalize(), self:getName{no_add_name=true, do_color=true}) + game.logSeen(who, "%s uses %s!", who:getName():capitalize(), self:getName{no_add_name=true, do_color=true}) return {id=true, used=true} end, "T_GLOBAL_CD", diff --git a/game/modules/tome/data/general/objects/egos/boots.lua b/game/modules/tome/data/general/objects/egos/boots.lua index 4f12eef30f815c81b323487788316ffe17af44a0..415cf6aded9d8ea6ec60b6ae43fced7a1450bd72 100644 --- a/game/modules/tome/data/general/objects/egos/boots.lua +++ b/game/modules/tome/data/general/objects/egos/boots.lua @@ -89,8 +89,8 @@ newEntity{ }, charm_power = resolvers.mbonus_material(80, 20), charm_power_def = {add=5, max=10, floor=true}, - resolvers.charm("blink to a nearby random location (rad %d)", 25, function(self, who) - game.logSeen(who, "%s uses %s!", who.name:capitalize(), self:getName{no_add_name=true, do_color=true}) + resolvers.charm(_t"blink to a nearby random location (rad %d)", 25, function(self, who) + game.logSeen(who, "%s uses %s!", who:getName():capitalize(), self:getName{no_add_name=true, do_color=true}) game.level.map:particleEmitter(who.x, who.y, 1, "teleport") who:teleportRandom(who.x, who.y, self:getCharmPower(who)) game.level.map:particleEmitter(who.x, who.y, 1, "teleport") diff --git a/game/modules/tome/data/general/objects/egos/charms.lua b/game/modules/tome/data/general/objects/egos/charms.lua index 87be47a0375e1a4379951baa7d10336d6d993c40..ab4345eb17b8574b4f6a4197d7b2f97e577e857e 100644 --- a/game/modules/tome/data/general/objects/egos/charms.lua +++ b/game/modules/tome/data/general/objects/egos/charms.lua @@ -185,7 +185,7 @@ newEntity{ cost = 5, focusing_amt = resolvers.mbonus_material(2, 1), charm_on_use = { - {100, function(self, who) return ("reduce %d talent cooldowns by 2"):format(self.focusing_amt, self.focusing_reduction) end, function(self, who) + {100, function(self, who) return ("reduce %d talent cooldowns by 2"):tformat(self.focusing_amt, self.focusing_reduction) end, function(self, who) who:talentCooldownFilter(nil, self.focusing_amt, 2, true) end}, }, @@ -202,7 +202,7 @@ newEntity{ cost = 5, focusing_amt = resolvers.mbonus_material(2, 1), charm_on_use = { - {100, function(self, who) return ("reduce %d talent cooldowns by 2"):format(self.focusing_amt, self.focusing_reduction) end, function(self, who) + {100, function(self, who) return ("reduce %d talent cooldowns by 2"):tformat(self.focusing_amt, self.focusing_reduction) end, function(self, who) who:talentCooldownFilter(nil, self.focusing_amt, 2, true) end}, }, @@ -221,7 +221,7 @@ newEntity{ extending_dur = resolvers.mbonus_material(1.5, 1), charm_on_use = { - {100, function(self, who) return ("increase the duration of %d beneficial effects by %d"):format(self.extending_amt, self.extending_dur) end, function(self, who) + {100, function(self, who) return ("increase the duration of %d beneficial effects by %d"):tformat(self.extending_amt, self.extending_dur) end, function(self, who) local effs = who:effectsFilter(function(eff) if eff.status == "beneficial" and eff.type ~= "other" then return true end end) @@ -249,7 +249,7 @@ newEntity{ extending_dur = resolvers.mbonus_material(1.5, 1), charm_on_use = { - {100, function(self, who) return ("increase the duration of %d beneficial effects by %d"):format(self.extending_amt, self.extending_dur) end, function(self, who) + {100, function(self, who) return ("increase the duration of %d beneficial effects by %d"):tformat(self.extending_amt, self.extending_dur) end, function(self, who) local effs = who:effectsFilter(function(eff) if eff.status == "beneficial" and eff.type ~= "other" then return true end end) @@ -275,7 +275,7 @@ newEntity{ cost = 5, evasive_chance = resolvers.mbonus_material(30, 10), charm_on_use = { - {100, function(self, who) return ("gain a %d%% chance to evade weapon attacks for 2 turns"):format(self.evasive_chance) end, function(self, who) + {100, function(self, who) return ("gain a %d%% chance to evade weapon attacks for 2 turns"):tformat(self.evasive_chance) end, function(self, who) who:setEffect(who.EFF_ITEM_CHARM_EVASIVE, 2, {chance = self.evasive_chance}) end}, }, @@ -292,7 +292,7 @@ newEntity{ cost = 5, evasive_chance = resolvers.mbonus_material(30, 10), charm_on_use = { - {100, function(self, who) return ("gain a %d%% chance to evade weapon attacks for 2 turns"):format(self.evasive_chance) end, function(self, who) + {100, function(self, who) return ("gain a %d%% chance to evade weapon attacks for 2 turns"):tformat(self.evasive_chance) end, function(self, who) who:setEffect(who.EFF_ITEM_CHARM_EVASIVE, 2, {chance = self.evasive_chance}) end}, }, @@ -308,7 +308,7 @@ newEntity{ cost = 5, soothing_heal = resolvers.mbonus_material(80, 30), charm_on_use = { - {100, function(self, who) return ("heal for %d"):format(self.soothing_heal) end, function(self, who) + {100, function(self, who) return ("heal for %d"):tformat(self.soothing_heal) end, function(self, who) who:attr("allow_on_heal", 1) who:heal(who:mindCrit(self.soothing_heal), who) who:attr("allow_on_heal", -1) @@ -327,7 +327,7 @@ newEntity{ cost = 5, soothing_heal = resolvers.mbonus_material(80, 30), charm_on_use = { - {100, function(self, who) return ("heal for %d"):format(self.soothing_heal) end, function(self, who) + {100, function(self, who) return ("heal for %d"):tformat(self.soothing_heal) end, function(self, who) who:attr("allow_on_heal", 1) who:heal(who:mindCrit(self.soothing_heal), who) who:attr("allow_on_heal", -1) @@ -345,7 +345,7 @@ newEntity{ cost = 5, cleansing_amount = resolvers.mbonus_material(2, 1), charm_on_use = { - {100, function(self, who) return ("cleanse %d total effects of type disease, wound, or poison"):format(self.cleansing_amount) end, function(self, who) + {100, function(self, who) return ("cleanse %d total effects of type disease, wound, or poison"):tformat(self.cleansing_amount) end, function(self, who) who:removeEffectsFilter(function(e) return e.subtype.poison or e.subtype.wound or e.subtype.disease end, self.cleansing_amount) end}, }, @@ -362,7 +362,7 @@ newEntity{ cost = 5, cleansing_amount = resolvers.mbonus_material(2, 1), charm_on_use = { - {100, function(self, who) return ("cleanse %d total effects of type disease, wound, or poison"):format(self.cleansing_amount) end, function(self, who) + {100, function(self, who) return ("cleanse %d total effects of type disease, wound, or poison"):tformat(self.cleansing_amount) end, function(self, who) who:removeEffectsFilter(function(e) return e.subtype.poison or e.subtype.wound or e.subtype.disease end, self.cleansing_amount) end}, }, @@ -378,7 +378,7 @@ newEntity{ cost = 5, piercing_penetration = resolvers.mbonus_material(20, 10), charm_on_use = { - {100, function(self, who) return ("increase all damage penetration by %d%% for 2 turns"):format(self.piercing_penetration) end, function(self, who) + {100, function(self, who) return ("increase all damage penetration by %d%% for 2 turns"):tformat(self.piercing_penetration) end, function(self, who) who:setEffect(who.EFF_ITEM_CHARM_PIERCING, 2, {penetration = self.piercing_penetration}) end}, }, @@ -395,7 +395,7 @@ newEntity{ cost = 5, piercing_penetration = resolvers.mbonus_material(20, 10), charm_on_use = { - {100, function(self, who) return ("increase all damage penetration by %d%% for 2 turns"):format(self.piercing_penetration) end, function(self, who) + {100, function(self, who) return ("increase all damage penetration by %d%% for 2 turns"):tformat(self.piercing_penetration) end, function(self, who) who:setEffect(who.EFF_ITEM_CHARM_PIERCING, 2, {penetration = self.piercing_penetration}) end}, }, @@ -411,7 +411,7 @@ newEntity{ cost = 5, powerful_damage = resolvers.mbonus_material(20, 10), charm_on_use = { - {100, function(self, who) return ("increase all damage by %d%% for 2 turns"):format(self.powerful_damage) end, function(self, who) + {100, function(self, who) return ("increase all damage by %d%% for 2 turns"):tformat(self.powerful_damage) end, function(self, who) who:setEffect(who.EFF_ITEM_CHARM_POWERFUL, 2, {damage = self.powerful_damage}) end}, }, @@ -428,7 +428,7 @@ newEntity{ cost = 5, powerful_damage = resolvers.mbonus_material(20, 10), charm_on_use = { - {100, function(self, who) return ("increase all damage by %d%% for 2 turns"):format(self.powerful_damage) end, function(self, who) + {100, function(self, who) return ("increase all damage by %d%% for 2 turns"):tformat(self.powerful_damage) end, function(self, who) who:setEffect(who.EFF_ITEM_CHARM_POWERFUL, 2, {damage = self.powerful_damage}) end}, }, @@ -444,7 +444,7 @@ newEntity{ cost = 5, innervating_fatigue = resolvers.mbonus_material(40, 20), charm_on_use = { - {100, function(self, who) return ("reduce fatigue by %d%% for 2 turns"):format(self.innervating_fatigue) end, function(self, who) + {100, function(self, who) return ("reduce fatigue by %d%% for 2 turns"):tformat(self.innervating_fatigue) end, function(self, who) who:setEffect(who.EFF_ITEM_CHARM_INNERVATING, 2, {fatigue = self.innervating_fatigue}) end}, }, @@ -462,7 +462,7 @@ newEntity{ cost = 5, innervating_fatigue = resolvers.mbonus_material(40, 20), charm_on_use = { - {100, function(self, who) return ("reduce fatigue by %d%% for 2 turns"):format(self.innervating_fatigue) end, function(self, who) + {100, function(self, who) return ("reduce fatigue by %d%% for 2 turns"):tformat(self.innervating_fatigue) end, function(self, who) who:setEffect(who.EFF_ITEM_CHARM_INNERVATING, 2, {fatigue = self.innervating_fatigue}) end}, }, diff --git a/game/modules/tome/data/general/objects/egos/cloak.lua b/game/modules/tome/data/general/objects/egos/cloak.lua index 957e07cdb32f4c3e00c11f4a696593f4c2d79786..cef179298f0dd7f9d86687032b87ed41dcdd4ae0 100644 --- a/game/modules/tome/data/general/objects/egos/cloak.lua +++ b/game/modules/tome/data/general/objects/egos/cloak.lua @@ -421,7 +421,7 @@ newEntity{ }, }, charm_power_def = {add=5, max=10, floor=true}, - resolvers.charm("blink randomly (up to range 8) within 2 spaces of a target hostile creature", 10, function(self, who) + resolvers.charm(_t"blink randomly (up to range 8) within 2 spaces of a target hostile creature", 10, function(self, who) local tg = self.use_power.target(self, who) local x, y = who:getTarget(tg) if not x or not y then return nil end @@ -432,7 +432,7 @@ newEntity{ game.level.map:particleEmitter(who.x, who.y, 1, "teleport") who:teleportRandom(target.x, target.y, 2) game.level.map:particleEmitter(who.x, who.y, 1, "teleport") - game.logSeen(who, "%s uses %s!", who.name:capitalize(), self:getName{no_add_name=true, do_color=true}) + game.logSeen(who, "%s uses %s!", who:getName():capitalize(), self:getName{no_add_name=true, do_color=true}) return {id=true, used=true} end, "T_GLOBAL_CD", diff --git a/game/modules/tome/data/general/objects/egos/light-armor.lua b/game/modules/tome/data/general/objects/egos/light-armor.lua index f7beccd4a894095add47c38ab8236aeb94007084..be42a720654cb901de8a0d21635d899d2c85a3e2 100644 --- a/game/modules/tome/data/general/objects/egos/light-armor.lua +++ b/game/modules/tome/data/general/objects/egos/light-armor.lua @@ -142,8 +142,8 @@ newEntity{ charm_power = resolvers.mbonus_material(80, 20), charm_power_def = {add=5, max=10, floor=true}, - resolvers.charm("blink to a nearby random location (rad %d)", 25, function(self, who) - game.logSeen(who, "%s uses %s %s!", who.name:capitalize(), who:his_her(), self:getName{no_add_name=true, do_color=true}) + resolvers.charm(_t"blink to a nearby random location (rad %d)", 25, function(self, who) + game.logSeen(who, "%s uses %s %s!", who:getName():capitalize(), who:his_her(), self:getName{no_add_name=true, do_color=true}) game.level.map:particleEmitter(who.x, who.y, 1, "teleport") who:teleportRandom(who.x, who.y, self:getCharmPower(who)) game.level.map:particleEmitter(who.x, who.y, 1, "teleport") diff --git a/game/modules/tome/data/general/objects/egos/mindstars.lua b/game/modules/tome/data/general/objects/egos/mindstars.lua index ad4f84f889419d88691c1e58ce798dd77a75e0b5..b057754dbf5176dc80bc4c0d418893a74e33fd6c 100644 --- a/game/modules/tome/data/general/objects/egos/mindstars.lua +++ b/game/modules/tome/data/general/objects/egos/mindstars.lua @@ -170,7 +170,7 @@ newEntity{ melee_project = { [DamageType.ITEM_ACID_CORRODE]= resolvers.mbonus_material(15, 5), [DamageType.ITEM_NATURE_SLOW]= resolvers.mbonus_material(15, 5),}, }, no_auto_hotkey = true, - resolvers.charm("divide the mindstar in two", 1, + resolvers.charm(_t"divide the mindstar in two", 1, function(self, who) -- Check for free slot first if who:getFreeHands() == 0 then @@ -212,10 +212,10 @@ newEntity{ o.set_list = { {"define_as", "MS_EGO_SET_MITOTIC_SLIME"} } o2.set_list = { {"define_as", "MS_EGO_SET_MITOTIC_ACID"} } o.set_desc = { - mitotic = "This mindstar would symbiotize with another like it.", + mitotic = _t"This mindstar would symbiotize with another like it.", } o2.set_desc = { - mitotic = "This mindstar would symbiotize with another like it.", + mitotic = _t"This mindstar would symbiotize with another like it.", } o.on_set_complete = function(self, who) @@ -464,7 +464,7 @@ newEntity{ desc=function(self, who, special) local manaburn = special.manaburn(who) return ("Deals #YELLOW#%d#LAST# Manaburn damage and puts 1 random spell talent on cooldown for #YELLOW#%d#LAST# turns (checks Confusion immunity)"): - format(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20)) + tformat(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20)) end, manaburn=function(who) local dam = math.max(10, math.floor(who:combatStatScale(who:combatMindpower(), 1, 150))) @@ -489,7 +489,7 @@ newEntity{ if not t then return end target.talents_cd[t.id] = turns - game.logSeen(target, "#YELLOW#%s has their %s spell disrupted for for %d turns!", target.name:capitalize(), t.name, turns) + game.logSeen(target, "#YELLOW#%s has their %s spell disrupted for for %d turns!", target:getName():capitalize(), t.name, turns) end }, }, @@ -530,7 +530,7 @@ newEntity{ }, special_on_hit = { desc=function(self, who, special) - return ("Cause the target to have a 10%% chance to fail spellcasting and 10%% chance to lose a magical sustain each turn, stacking up to 50%%"):format() + return ("Cause the target to have a 10%% chance to fail spellcasting and 10%% chance to lose a magical sustain each turn, stacking up to 50%%"):tformat() end, fct=function(combat, who, target, dam, special) local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack()) @@ -733,7 +733,7 @@ newEntity{ charm_power = resolvers.mbonus_material(80, 20), charm_power_def = {add=5, max=10, floor=true}, resolvers.charm(function(self, who) - return ("inflict %0.2f mind damage (range 10), gaining psi and hate equal to 10%%%% of the damage done"):format(who:damDesc(engine.DamageType.MIND, self.use_power.damage(self, who))) + return ("inflict %0.2f mind damage (range 10), gaining psi and hate equal to 10%%%% of the damage done"):tformat(who:damDesc(engine.DamageType.MIND, self.use_power.damage(self, who))) end, 20, function(self, who) @@ -741,14 +741,14 @@ newEntity{ local x, y, target = who:getTarget(tg) if not x or not y then return nil end if target then - game.logSeen(who, "%s feeds %s %s with psychic energy from %s!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true}), target.name:capitalize()) + game.logSeen(who, "%s feeds %s %s with psychic energy from %s!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true}), target:getName():capitalize()) if target:checkHit(who:combatMindpower(), target:combatMentalResist(), 0, 95, 5) then local damage = self.use_power.damage(self, who) who:project(tg, x, y, engine.DamageType.MIND, {dam=damage, alwaysHit=true}, {type="mind"}) who:incPsi(damage/10) who:incHate(damage/10) else - game.logSeen(target, "%s resists the mind attack!", target.name:capitalize()) + game.logSeen(target, "%s resists the mind attack!", target:getName():capitalize()) end end return {id=true, used=true} diff --git a/game/modules/tome/data/general/objects/egos/ranged.lua b/game/modules/tome/data/general/objects/egos/ranged.lua index 8e6094386f03022f023a708fe615769dc4cb0164..edfb0b8cbdea17312a241b0248fdfc5a0c8b1a47 100644 --- a/game/modules/tome/data/general/objects/egos/ranged.lua +++ b/game/modules/tome/data/general/objects/egos/ranged.lua @@ -288,9 +288,9 @@ newEntity{ }, charm_power = resolvers.mbonus_material(100, 5), charm_power_def = {add=50, max=200, floor=true}, - resolvers.charm("regenerate %d life over 5 turns", 20, + resolvers.charm(_t"regenerate %d life over 5 turns", 20, function(self, who) - game.logSeen(who, "%s uses %s %s!", who.name:capitalize(), who:his_her(), self:getName{no_add_name=true, do_color=true}) + game.logSeen(who, "%s uses %s %s!", who:getName():capitalize(), who:his_her(), self:getName{no_add_name=true, do_color=true}) who:setEffect(who.EFF_REGENERATION, 5, {power=self:getCharmPower(who)/5}) return {id=true, used=true} end, @@ -465,7 +465,7 @@ newEntity{ ranged_project = { [DamageType.NATURE] = resolvers.mbonus_material(20, 5), }, - special_on_crit = {desc="silences the target", fct=function(combat, who, target) + special_on_crit = {desc=_t"silences the target", fct=function(combat, who, target) if target:canBe("silence") then target:setEffect(target.EFF_SILENCED, 2, {apply_power=who:combatAttack(), no_ct_effect=true}) end diff --git a/game/modules/tome/data/general/objects/egos/shield.lua b/game/modules/tome/data/general/objects/egos/shield.lua index 9eef8c5c881a70495722e1db284cc42ba13018b8..0b8f4a6272c5e8271c193a69827f120549c716b4 100644 --- a/game/modules/tome/data/general/objects/egos/shield.lua +++ b/game/modules/tome/data/general/objects/egos/shield.lua @@ -337,7 +337,7 @@ newEntity{ on_block = { desc=function(self, who, special) local dam = special.shield_wintry(who) - return ("Deals #YELLOW#%d#LAST# cold damage and freezes enemies in radius 4 to the ground for 3 turns (1/turn)"):format(dam) + return ("Deals #YELLOW#%d#LAST# cold damage and freezes enemies in radius 4 to the ground for 3 turns (1/turn)"):tformat(dam) end, shield_wintry=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatMindpower(), 1, 300))) @@ -477,7 +477,7 @@ newEntity{ greater_ego = 1, cost = 5, special_combat = { - special_on_hit = {desc="reduce the cooldown of your ward talent by 1", fct=function(combat, who, target) + special_on_hit = {desc=_t"reduce the cooldown of your ward talent by 1", fct=function(combat, who, target) if who.talents_cd[who.T_WARD] then who.talents_cd[who.T_WARD] = who.talents_cd[who.T_WARD] - 1 end @@ -525,7 +525,7 @@ newEntity{ on_block = { desc=function(self, who, special) local dam = special.shield_wrathful(who) - return ("Deals #VIOLET#%d#LAST# light and fire damage to each enemy blocked"):format(dam) + return ("Deals #VIOLET#%d#LAST# light and fire damage to each enemy blocked"):tformat(dam) end, shield_wrathful=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 450) / 2)) @@ -669,7 +669,7 @@ newEntity{ special_combat = { dam = resolvers.mbonus_material(5, 5), special_on_crit = { - desc="Smash the target reducing mind, spell, and combat action speeds by 30%", + desc=_t"Smash the target reducing mind, spell, and combat action speeds by 30%", fct=function(combat, who, target) target:setEffect(target.EFF_CRIPPLE, 4, {src=who, apply_power=who:combatAttack(combat)}) end @@ -694,7 +694,7 @@ newEntity{ on_block = { desc=function(self, who, special) local dam = special.shield_shrapnel(who) - return ("Cause enemies within radius 6 to bleed for #RED#%d#LAST# physical damage over 5 turns (1/turn)"):format(dam) + return ("Cause enemies within radius 6 to bleed for #RED#%d#LAST# physical damage over 5 turns (1/turn)"):tformat(dam) end, shield_shrapnel=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 350))) @@ -703,7 +703,7 @@ newEntity{ fct=function(self, who, target, type, dam, eff, special) if who.turn_procs and who.turn_procs.shield_shrapnel then return end who.turn_procs.shield_shrapnel = true - game.logSeen(who, "Shards of metal explode from %s's shield!", who.name:capitalize()) + game.logSeen(who, "Shards of metal explode from %s's shield!", who:getName():capitalize()) local tg = {type="ball", friendlyfire=false, radius=6} local dam = special.shield_shrapnel(who) local damage = who:physicalCrit(dam) @@ -725,7 +725,7 @@ newEntity{ special_on_hit = { desc=function(self, who, special) local dam = who:combatArmor() - return ("Deal physical damage equal to your armor (%d)"):format(dam) + return ("Deal physical damage equal to your armor (%d)"):tformat(dam) end, fct=function(combat, who, target) local tg = {type="hit", range=1} diff --git a/game/modules/tome/data/general/objects/egos/staves.lua b/game/modules/tome/data/general/objects/egos/staves.lua index 09e89029a2a35918ff9b6eeb972720d617ab2c1d..8f1f531de8d5ce33949d6fc82b84133f74eba673 100644 --- a/game/modules/tome/data/general/objects/egos/staves.lua +++ b/game/modules/tome/data/general/objects/egos/staves.lua @@ -262,10 +262,10 @@ newEntity{ combat_spellpower = resolvers.mbonus_material(10, 8), mana_regen = resolvers.mbonus_material(50, 10, function(e, v) v=v/100 return 0, v end), }, - resolvers.charm("channel mana (increasing mana regeneration by 2000%% for 5 turns)", 30, + resolvers.charm(_t"channel mana (increasing mana regeneration by 2000%% for 5 turns)", 30, function(self, who) if who.mana_regen > 0 and not who:hasEffect(who.EFF_MANASURGE) then - game.logSeen(who, "%s channels mana through %s %s!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s channels mana through %s %s!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) who:setEffect(who.EFF_MANASURGE, 5, {power=who.mana_regen * 20}) else if who.mana_regen < 0 then @@ -322,7 +322,7 @@ newEntity{ local radius = self.use_power.radius(self) local dam = who:damDesc(damtype, self.use_power.damage(self, who)) local damrange = self.use_power.damrange(self, who) - return ("conjure elemental energy in a radius %d cone, dealing %0.2f to %0.2f %s damage"):format( radius, dam, dam*damrange, damtype.name) + return ("conjure elemental energy in a radius %d cone, dealing %0.2f to %0.2f %s damage"):tformat( radius, dam, dam*damrange, damtype.name) end, 8, function(self, who) @@ -357,7 +357,7 @@ newEntity{ local damTyp = DamageType:get(damtype or "ARCANE") dam = rng.range(dam, dam * damrange) dam = who:spellCrit(dam) - game.logSeen(who, "%s channels a cone of %s%s#LAST# energy through %s %s!", who.name:capitalize(), damTyp.text_color, damTyp.name, who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s channels a cone of %s%s#LAST# energy through %s %s!", who:getName():capitalize(), damTyp.text_color, damTyp.name, who:his_her(), self:getName({no_add_name = true, do_color = true})) who:project(tg, x, y, damtype, dam, {type=explosion}) game:playSoundNear(who, "talents/arcane") diff --git a/game/modules/tome/data/general/objects/egos/torques-powers.lua b/game/modules/tome/data/general/objects/egos/torques-powers.lua index 2f40796c173660faad8fbbce32cbf279da54a89f..f2fb8d6d2909b4f998e946e158088b7f348bafa5 100644 --- a/game/modules/tome/data/general/objects/egos/torques-powers.lua +++ b/game/modules/tome/data/general/objects/egos/torques-powers.lua @@ -23,9 +23,9 @@ newEntity{ level_range = {1, 50}, rarity = 15, charm_power_def = {add=3, max=200, floor=true}, - resolvers.charm("setup a psionic shield, reducing all damage taken by %d for 5 turns", 25, function(self, who) + resolvers.charm(_t"setup a psionic shield, reducing all damage taken by %d for 5 turns", 25, function(self, who) who:setEffect(who.EFF_PSIONIC_SHIELD, 5, {kind="all", power=self:getCharmPower(who)}) - game.logSeen(who, "%s uses %s!", who.name:capitalize(), self:getName{no_add_name=true, do_color=true}) + game.logSeen(who, "%s uses %s!", who:getName():capitalize(), self:getName{no_add_name=true, do_color=true}) return {id=true, used=true} end, "T_GLOBAL_CD", @@ -43,10 +43,10 @@ newEntity{ level_range = {1, 50}, rarity = 20, charm_power_def = {add=1, max=5, floor=true}, - resolvers.charm("remove 1 confusion or silence effect and prevent the application of %d detrimental mental effects for 5 turns", 25, function(self, who) + resolvers.charm(_t"remove 1 confusion or silence effect and prevent the application of %d detrimental mental effects for 5 turns", 25, function(self, who) who:removeEffectsFilter(function(e) return (e.subtype.confusion or e.subtype.silence) end, 1) who:setEffect(who.EFF_CLEAR_MIND, 5, {power=self:getCharmPower(who)}) - game.logSeen(who, "%s uses %s!", who.name:capitalize(), self:getName{no_add_name=true, do_color=true}) + game.logSeen(who, "%s uses %s!", who:getName():capitalize(), self:getName{no_add_name=true, do_color=true}) return {id=true, used=true} end, "T_GLOBAL_CD", @@ -73,7 +73,7 @@ newEntity{ resolvers.charm( function(self, who) local dam = who:damDesc(engine.DamageType.PHYSICAL, self.use_power.damage(self, who)) - return ("project a gust of wind in a cone knocking enemies back %d spaces and dealing %d physical damage"):format(self.use_power.knockback(self, who), dam) + return ("project a gust of wind in a cone knocking enemies back %d spaces and dealing %d physical damage"):tformat(self.use_power.knockback(self, who), dam) end, 15, function(self, who) @@ -83,7 +83,7 @@ newEntity{ local dam = self.use_power.damage(self, who) local kb = self.use_power.knockback(self, who) - game.logSeen(who, "%s uses %s %s!", who.name:capitalize(), who:his_her(), self:getName{no_add_name=true, do_color=true}) + game.logSeen(who, "%s uses %s %s!", who:getName():capitalize(), who:his_her(), self:getName{no_add_name=true, do_color=true}) local DamageType = require "engine.DamageType" local state = {} game.level.map:particleEmitter(who.x, who.y, tg.radius, "mudflow", {radius=tg.radius, tx=x-who.x, ty=y-who.y}) @@ -118,7 +118,7 @@ newEntity{ charm_power_def = {add=50, max=500, floor=true}, resolvers.charm(function(self, who) local dam = who:damDesc(engine.DamageType.MIND, self.use_power.damage(self, who)) - return ("blast the opponent's mind dealing %d mind damage and silencing them for 4 turns"):format(dam ) + return ("blast the opponent's mind dealing %d mind damage and silencing them for 4 turns"):tformat(dam ) end, 15, function(self, who) @@ -126,7 +126,7 @@ newEntity{ local x, y = who:getTarget(tg) if not x or not y then return nil end local damage = self.use_power.damage(self, who) - game.logSeen(who, "%s activates %s %s!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s activates %s %s!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) if not x or not y then return nil end who:project(tg, x, y, function(tx, ty) local target = game.level.map(tx, ty, engine.Map.ACTOR) diff --git a/game/modules/tome/data/general/objects/egos/totems-powers.lua b/game/modules/tome/data/general/objects/egos/totems-powers.lua index 3f58d768f56dadda9e65015981e953a6feb69117..9bf2be90ca42d550bc34e09bcd02be91a9e82bea 100644 --- a/game/modules/tome/data/general/objects/egos/totems-powers.lua +++ b/game/modules/tome/data/general/objects/egos/totems-powers.lua @@ -29,12 +29,12 @@ newEntity{ function(self, who) local heal = self.use_power.heal(self, who) return ("heal yourself and all friendly characters within 10 spaces for %d"): - format(heal) end, + tformat(heal) end, 15, function(self, who) local tg = self.use_power.target(self, who) local heal = self.use_power.heal(self, who) - game.logSeen(who, "%s activates %s %s!", who.name:capitalize(), who:his_her(), self:getName{no_add_name = true, do_color = true}) + game.logSeen(who, "%s activates %s %s!", who:getName():capitalize(), who:his_her(), self:getName{no_add_name = true, do_color = true}) who:project(tg, who.x, who.y, function(px, py) local target = game.level.map(px, py, engine.Map.ACTOR) if not target then return end @@ -64,7 +64,7 @@ newEntity{ charm_power_def = {add=50, max=600, floor=true}, -- Higher damage because the damage can be cleansed and is delayed resolvers.charm(function(self, who) local dam = who:damDesc(engine.DamageType.NATURE, self.use_power.damage(self, who)) - return ("sting an enemy dealing %d nature damage over 7 turns and reducing their healing by 50%%%%"):format(dam, 50) + return ("sting an enemy dealing %d nature damage over 7 turns and reducing their healing by 50%%%%"):tformat(dam, 50) end, 15, function(self, who) @@ -72,7 +72,7 @@ newEntity{ local x, y = who:getTarget(tg) if not x or not y then return nil end local dam = {dam = self.use_power.damage(self, who), heal_factor = 50, dur = 7} - game.logSeen(who, "%s activates %s %s!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s activates %s %s!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) who:project(tg, x, y, engine.DamageType.INSIDIOUS_POISON, dam, {type="slime"}) return {id=true, used=true} end, @@ -92,8 +92,8 @@ newEntity{ rarity = 16, charm_power_def = {add=5, max=100, floor=true}, - resolvers.charm(function(self) return ("harden the skin for 7 turns increasing armour by %d and armour hardiness by %d%%%%"):format(self:getCharmPower(who), 20 + self.material_level * 10) end, 20, function(self, who) - game.logSeen(who, "%s activates %s %s!", who.name:capitalize(), who:his_her(), self:getName{no_add_name = true, do_color = true}) + resolvers.charm(function(self) return ("harden the skin for 7 turns increasing armour by %d and armour hardiness by %d%%%%"):tformat(self:getCharmPower(who), 20 + self.material_level * 10) end, 20, function(self, who) + game.logSeen(who, "%s activates %s %s!", who:getName():capitalize(), who:his_her(), self:getName{no_add_name = true, do_color = true}) who:setEffect(who.EFF_THORNY_SKIN, 7, {ac=self:getCharmPower(who), hard=20 + self.material_level * 10}) game:playSoundNear(who, "talents/heal") return {id=true, used=true} @@ -114,9 +114,9 @@ newEntity{ charm_power_def = {add=45, max=500, floor=true}, resolvers.charm(function(self, who) local stats = self.use_power.tentacleStats(self, who) - local str = ("(Tentacle Stats)\nLife: %d\nBase Damage: %d\nArmor: %d\nAll Resist: %d"):format(stats.max_life, stats.combat.dam, stats.combat_armor, stats.resists.all) + local str = ("(Tentacle Stats)\nLife: %d\nBase Damage: %d\nArmor: %d\nAll Resist: %d"):tformat(stats.max_life, stats.combat.dam, stats.combat_armor, stats.resists.all) return ("summon a resilient tentacle up to %d spaces away for %d turns. Each turn the tentacle will strike a random enemy in range 3 dealing physical damage and attempting to pin them.\n\n%s"): - format(5, stats.summon_time, str) + tformat(5, stats.summon_time, str) end, 20, function(self, who) @@ -136,9 +136,9 @@ newEntity{ local NPC = require "mod.class.NPC" local m = NPC.new{ resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_eldritch_grgglck_s_tentacle.png", display_h=1, display_y=0}}}, - name = "Lashing Tentacle", + name = _t"Lashing Tentacle", type = "horror", subtype = "tentacle", - desc = "A lashing tentacle.", + desc = _t"A lashing tentacle.", rank = 1, display = "T", color = colors.GREY, life_rating=1, @@ -183,21 +183,21 @@ newEntity{ } m:resolve() - who:logCombat(target or {name = "a spot nearby"}, "#Source# points %s %s at #target#, releasing a writhing tentacle!", who:his_her(), self:getName({do_color = true, no_add_name = true})) + who:logCombat(target or {name = _t"a spot nearby"}, "#Source# points %s %s at #target#, releasing a writhing tentacle!", who:his_her(), self:getName({do_color = true, no_add_name = true})) game.zone:addEntity(game.level, m, "actor", x, y) m.remove_from_party_on_death = true if game.party:hasMember(who) then game.party:addMember(m, { control=false, type="summon", - title="Summon", + title=_t"Summon", }) end local stats = self.use_power.tentacleStats(self, who) table.mergeAdd(m, stats, true) m.life = m.max_life - game.logSeen(who, "%s activates %s %s!", who.name:capitalize(), who:his_her(), self:getName{no_add_name = true, do_color = true}) + game.logSeen(who, "%s activates %s %s!", who:getName():capitalize(), who:his_her(), self:getName{no_add_name = true, do_color = true}) return {id=true, used=true} end, "T_GLOBAL_CD", diff --git a/game/modules/tome/data/general/objects/egos/wands-powers.lua b/game/modules/tome/data/general/objects/egos/wands-powers.lua index c2e751fe895871b7e32b2cc60b3cd6e58e290beb..3ef3679d6fe426676ae8e98dbfdfb64686b9e1f6 100644 --- a/game/modules/tome/data/general/objects/egos/wands-powers.lua +++ b/game/modules/tome/data/general/objects/egos/wands-powers.lua @@ -25,7 +25,7 @@ newEntity{ charm_power_def = {add=8, max=10, floor=true}, resolvers.charm(function(self, who) - return ("reveal the area around you, dispelling darkness (radius %d, power %d based on Magic), and detect the presence of nearby creatures for 10 turns"):format(self.use_power.radius(self, who), self.use_power.litepower(self, who)) + return ("reveal the area around you, dispelling darkness (radius %d, power %d based on Magic), and detect the presence of nearby creatures for 10 turns"):tformat(self.use_power.radius(self, who), self.use_power.litepower(self, who)) end, 15, function(self, who) @@ -34,7 +34,7 @@ newEntity{ range = rad, actor = 1, }) - game.logSeen(who, "%s uses %s %s!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s uses %s %s!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) who:project({type="ball", range=0, selffire=true, radius=rad}, who.x, who.y, engine.DamageType.LITE, self.use_power.litepower(self, who)) return {id=true, used=true} @@ -57,7 +57,7 @@ newEntity{ local radius = self.use_power.radius local duration = 5 return ("create a radius %d storm for %d turns. Each turn, creatures within take %d lightning damage and will be dazed for 1 turn (%d total damage)"): - format(radius, duration, math.floor(dam / duration), math.floor(dam)) + tformat(radius, duration, math.floor(dam / duration), math.floor(dam)) end, 15, function(self, who) @@ -65,7 +65,7 @@ newEntity{ local x, y = who:getTarget(tg) if not x or not y then return nil end local dam = {dam = self.use_power.damage(self, who) / 5, daze = 100, daze_duration = 1} - game.logSeen(who, "%s conjures a lightning storm from %s %s!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s conjures a lightning storm from %s %s!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) local DamageType = require "engine.DamageType" local MapEffect = require "engine.MapEffect" who:project(tg, x, y, function(px, py) @@ -104,10 +104,9 @@ newEntity{ charm_power_def = {add=50, max=500, floor=true}, resolvers.charm(function(self, who) - local dt = engine.DamageType[self.elem[3]:capitalize()] + local dt = engine.DamageType[self.elem[3]:upper()] local dam = who:damDesc(dt, self.use_power.damage(self, who)) - - return ("fire a magical bolt dealing %d %s damage"):format(dam, self.elem[3] ) + return ("fire a magical bolt dealing %d %s damage"):tformat(dam, engine.DamageType:get(dt).name) end, 15, function(self, who) @@ -116,7 +115,7 @@ newEntity{ if not x or not y then return nil end local dam = self.use_power.damage(self, who) local elem = self.elem - game.logSeen(who, "%s activates %s %s!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s activates %s %s!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) who:project(tg, x, y, elem[1], dam, {type=elem[2]}) game:playSoundNear(who, "talents/fire") return {id=true, used=true} @@ -142,12 +141,12 @@ newEntity{ function(self, who) local shield = self.use_power.shield(self, who) * (100 + (who:attr("shield_factor") or 0)) / 100 return ("create a shield absorbing up to %d damage on yourself and all friendly characters within 10 spaces for %d turns"): - format(shield, 4) end, + tformat(shield, 4) end, 20, function(self, who) local tg = self.use_power.target(self, who) local shield = self.use_power.shield(self, who) - game.logSeen(who, "%s activates %s %s!", who.name:capitalize(), who:his_her(), self:getName{no_add_name = true, do_color = true}) + game.logSeen(who, "%s activates %s %s!", who:getName():capitalize(), who:his_her(), self:getName{no_add_name = true, do_color = true}) who:project(tg, who.x, who.y, function(px, py) local target = game.level.map(px, py, engine.Map.ACTOR) if not target then return end diff --git a/game/modules/tome/data/general/objects/egos/weapon.lua b/game/modules/tome/data/general/objects/egos/weapon.lua index e3ab94a0a2f84fd35166675425fe3d315eebb483..70da622c71bb1eb3a5e14dee845964d7618762ed 100644 --- a/game/modules/tome/data/general/objects/egos/weapon.lua +++ b/game/modules/tome/data/general/objects/egos/weapon.lua @@ -121,7 +121,7 @@ newEntity{ combat_physcrit = resolvers.mbonus_material(10, 5), }, combat = { - special_on_crit = {desc="Cripple the target reducing mind, spell, and combat action speeds by 30%", fct=function(combat, who, target) + special_on_crit = {desc=_t"Cripple the target reducing mind, spell, and combat action speeds by 30%", fct=function(combat, who, target) target:setEffect(target.EFF_CRIPPLE, 4, {src=who, apply_power=who:combatAttack(combat)}) end}, }, @@ -144,7 +144,7 @@ newEntity{ special_on_crit = { desc=function(self, who, special) local dam, hf = special.wound(self.combat, who) - return ("Wound the target dealing #RED#%d#LAST# physical damage across 5 turns and reducing healing by %d%%"):format(dam, hf) + return ("Wound the target dealing #RED#%d#LAST# physical damage across 5 turns and reducing healing by %d%%"):tformat(dam, hf) end, wound=function(combat, who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 350))) -- Doesn't stack @@ -228,7 +228,7 @@ newEntity{ special_on_crit = { desc=function(self, who, special) local dam = special.acid_splash(who) - return ("Splash the target with acid dealing #VIOLET#%d#LAST# damage over 5 turns and reducing armor and accuracy by #VIOLET#%d#LAST#"):format(dam, math.ceil(dam / 8)) + return ("Splash the target with acid dealing #VIOLET#%d#LAST# damage over 5 turns and reducing armor and accuracy by #VIOLET#%d#LAST#"):tformat(dam, math.ceil(dam / 8)) end, acid_splash=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 250))) @@ -255,7 +255,7 @@ newEntity{ special_on_hit = { desc=function(self, who, special) local dam = special.arc(who) - return ("#LIGHT_GREEN#25%%#LAST# chance for lightning to strike from the target to a second target dealing #VIOLET#%d#LAST# damage"):format(dam) + return ("#LIGHT_GREEN#25%%#LAST# chance for lightning to strike from the target to a second target dealing #VIOLET#%d#LAST# damage"):tformat(dam) end, arc=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150))) @@ -397,16 +397,16 @@ newEntity{ }, combat = { elemental_element = resolvers.rngtable{ -- We put this in the combat table because special_on_hit isn't passed the full object - {engine.DamageType.FIRE, "flame", "fire"}, - {engine.DamageType.COLD, "freeze", "cold"}, - {engine.DamageType.LIGHTNING, "lightning_explosion", "lightning"}, - {engine.DamageType.ACID, "acid", "acid"}, + {engine.DamageType.FIRE, "flame", _t"fire"}, + {engine.DamageType.COLD, "freeze", _t"cold"}, + {engine.DamageType.LIGHTNING, "lightning_explosion", _t"lightning"}, + {engine.DamageType.ACID, "acid", _t"acid"}, }, special_on_hit = { on_kill = 1, desc=function(self, who, special) local dam = special.explosion(who) - return ("Create an explosion dealing #VIOLET#%d#LAST# %s damage (1/turn)"):format(dam, self.combat.elemental_element and self.combat.elemental_element[3] or "<random on generation>" ) + return ("Create an explosion dealing #VIOLET#%d#LAST# %s damage (1/turn)"):tformat(dam, self.combat.elemental_element and self.combat.elemental_element[3] or "<random on generation>" ) end, explosion=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150))) @@ -659,7 +659,7 @@ newEntity{ desc=function(self, who, special) local manaburn = special.manaburn(who) return ("Deals #YELLOW#%d#LAST# Manaburn damage and puts 1 random spell talent on cooldown for #YELLOW#%d#LAST# turns (checks Confusion immunity)"): - format(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20)) + tformat(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20)) end, manaburn=function(who) local dam = math.max(15, math.floor(who:combatStatScale(who:combatMindpower(), 1, 150))) @@ -683,7 +683,7 @@ newEntity{ local t = rng.tableRemove(tids) if not t then return end target.talents_cd[t.id] = turns - game.logSeen(target, "#YELLOW#%s has their %s spell disrupted for for %d turns!", target.name:capitalize(), t.name, turns) + game.logSeen(target, "#YELLOW#%s has their %s spell disrupted for for %d turns!", target:getName():capitalize(), t.name, turns) end }, }, @@ -704,7 +704,7 @@ newEntity{ }, special_on_hit = { desc=function(self, who, special) - return ("Cause the target to have a 10%% chance to fail spellcasting and 10%% chance to lose a magical sustain each turn, stacking up to 50%%"):format() + return ("Cause the target to have a 10%% chance to fail spellcasting and 10%% chance to lose a magical sustain each turn, stacking up to 50%%"):tformat() end, fct=function(combat, who, target, dam, special) local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack()) @@ -764,7 +764,7 @@ newEntity{ on_kill = 1, desc=function(self, who, special) local targets = self.combat.projection_targets - return ("Projects up to %d attacks dealing 30%% weapon damage to other random targets in range 7 as mind damage (1/turn)"):format(targets or 0) + return ("Projects up to %d attacks dealing 30%% weapon damage to other random targets in range 7 as mind damage (1/turn)"):tformat(targets or 0) end, fct=function(combat, who, target, dam, special) if table.get(who.turn_procs, "ego_projection", combat) then return end @@ -822,7 +822,7 @@ newEntity{ combat = { special_on_hit = { desc=function(self, who, special) - return ("#LIGHT_GREEN#50%%#LAST# chance to put 1 talent on cooldown for #YELLOW#%d#LAST# turns (checks Confusion immunity)"):format(1 + math.ceil(who:combatMindpower() / 20)) + return ("#LIGHT_GREEN#50%%#LAST# chance to put 1 talent on cooldown for #YELLOW#%d#LAST# turns (checks Confusion immunity)"):tformat(1 + math.ceil(who:combatMindpower() / 20)) end, fct=function(combat, who, target, dam, special) if not rng.percent(50) then return nil end @@ -841,7 +841,7 @@ newEntity{ local t = rng.tableRemove(tids) if not t then break end target.talents_cd[t.id] = turns - game.logSeen(target, "#YELLOW#%s has temporarily forgotten %s for %d turns!", target.name:capitalize(), t.name, turns) + game.logSeen(target, "#YELLOW#%s has temporarily forgotten %s for %d turns!", target:getName():capitalize(), t.name, turns) end end }, @@ -859,7 +859,7 @@ newEntity{ cost = 30, combat = { special_on_hit = { - desc="#LIGHT_GREEN#20%#LAST# chance to stun, blind, pin, confuse, or silence the target for 3 turns", + desc=_t"#LIGHT_GREEN#20%#LAST# chance to stun, blind, pin, confuse, or silence the target for 3 turns", fct=function(combat, who, target, dam, special) if not rng.percent(20) then return end local eff = rng.table{"stun", "blind", "pin", "confusion", "silence",} diff --git a/game/modules/tome/data/general/objects/elixir-ingredients.lua b/game/modules/tome/data/general/objects/elixir-ingredients.lua index ea9ef5d87aac1d586e3522e2edde8cbf153e2b57..ec10b4c04a483909332804304f7f3324b6a779b7 100644 --- a/game/modules/tome/data/general/objects/elixir-ingredients.lua +++ b/game/modules/tome/data/general/objects/elixir-ingredients.lua @@ -23,46 +23,46 @@ newEntity{ define_as = "TROLL_INTESTINE", type = "misc", subtype="ingredient", image = "object/troll_intestine.png", level_range = {50, 50}, encumber = 0, - unided_name = "troll guts", + unided_name = _t"troll guts", name = "length of troll intestine", display = "&", color=colors.VIOLET, - desc = [[A length of troll intestines. Fortunately, the troll appears to have eaten nothing in some time.]], + desc = _t[[A length of troll intestines. Fortunately, the troll appears to have eaten nothing in some time.]], alch = "Kindly empty it before returning.", } newEntity{ define_as = "SKELETON_MAGE_SKULL", quest=true, identified=true, no_unique_lore=true, type = "misc", subtype="ingredient", image = "object/skeleton_mage_skull.png", - unided_name = "battered skull", + unided_name = _t"battered skull", name = "skeleton mage skull", level_range = {50, 50}, display = "*", color=colors.WHITE, encumber = 0, - desc = [[The skull of a skeleton mage. The eyes have stopped glowing... for now.]], + desc = _t[[The skull of a skeleton mage. The eyes have stopped glowing... for now.]], alch = "If the eyes are still glowing, please bash it around a bit until they fade. I'll not have another one of those coming alive and wreaking havoc in my lab.", } newEntity{ define_as = "RITCH_STINGER", quest=true, identified=true, no_unique_lore=true, type = "misc", subtype="ingredient", image = "object/ritch_stinger.png", - unided_name = "giant stinger", + unided_name = _t"giant stinger", name = "ritch stinger", level_range = {50, 50}, display = "/", color=colors.GREEN, encumber = 0, - desc = [[A ritch stinger, still glistening with venom.]], + desc = _t[[A ritch stinger, still glistening with venom.]], alch = "Keep as much venom in it as possible.", } newEntity{ define_as = "ORC_HEART", quest=true, identified=true, no_unique_lore=true, type = "misc", subtype="ingredient", image = "object/orc_heart.png", - unided_name = "heart", + unided_name = _t"heart", name = "orc heart", level_range = {50, 50}, display = "*", color=colors.RED, encumber = 0, - desc = [[The heart of an orc. Perhaps surprisingly, it isn't green.]], + desc = _t[[The heart of an orc. Perhaps surprisingly, it isn't green.]], alch = "If you can fetch me a still-beating orc heart, that would be even better. But you don't look like a master necromancer to me.", } @@ -71,10 +71,10 @@ newEntity{ define_as = "NAGA_TONGUE", type = "misc", subtype="ingredient", image = "object/naga_tongue.png", level_range = {50, 50}, encumber = 0, - unided_name = "naga tongue", + unided_name = _t"naga tongue", name = "naga tongue", display = "-", color=colors.RED, - desc = [[A severed naga tongue. It reeks of brine.]], + desc = _t[[A severed naga tongue. It reeks of brine.]], alch = "Best results occur with tongues never tainted by profanity, so if you happen to know any saintly nagas...", } @@ -83,10 +83,10 @@ newEntity{ define_as = "GREATER_DEMON_BILE", type = "misc", subtype="ingredient", image = "object/phial_demon_blood.png", level_range = {50, 50}, encumber = 0, - unided_name = "demon bile", + unided_name = _t"demon bile", name = "vial of greater demon bile", display = "~", color=colors.GREEN, - desc = [[A vial of greater demon bile. It hurts your sinuses even with the vial's stopper firmly in place.]], + desc = _t[[A vial of greater demon bile. It hurts your sinuses even with the vial's stopper firmly in place.]], alch = "Don't drink it, even if it tells you to.", } @@ -95,10 +95,10 @@ newEntity{ define_as = "BONE_GOLEM_DUST", type = "misc", subtype="ingredient", image = "object/pouch_bone_giant_dust.png", level_range = {50, 50}, encumber = 0, - unided_name = "bone giant dust", + unided_name = _t"bone giant dust", name = "pouch of bone giant dust", display = "~", color=colors.WHITE, - desc = [[Once the magics animating the bone giant fled, its remains crumbled to dust. It might be your imagination, but it looks like the dust occasionally stirs on its own.]], + desc = _t[[Once the magics animating the bone giant fled, its remains crumbled to dust. It might be your imagination, but it looks like the dust occasionally stirs on its own.]], alch = "Never, ever to be confused with garlic powder. Trust me.", } @@ -107,10 +107,10 @@ newEntity{ define_as = "FROST_ANT_STINGER", type = "misc", subtype="ingredient", image = "object/ice_ant_stinger.png", level_range = {50, 50}, encumber = 0, - unided_name = "stinger", + unided_name = _t"stinger", name = "ice ant stinger", display = "-", color=colors.WHITE, - desc = [[Wickedly sharp and still freezing cold.]], + desc = _t[[Wickedly sharp and still freezing cold.]], alch = "If you've the means to eliminate the little venom problem, these make miraculous instant drink-chilling straws.", } @@ -119,10 +119,10 @@ newEntity{ define_as = "MINOTAUR_NOSE", type = "misc", subtype="ingredient", image = "object/minotaur_nose.png", level_range = {50, 50}, encumber = 0, - unided_name = "minotaur nose", + unided_name = _t"minotaur nose", name = "minotaur nose", display = "*", color=colors.GREY, - desc = [[The severed front half of a minotaur snout, ring and all.]], + desc = _t[[The severed front half of a minotaur snout, ring and all.]], alch = "You'll need to find one with a ring, preferably an expensive one.", } @@ -131,10 +131,10 @@ newEntity{ define_as = "ELDER_VAMPIRE_BLOOD", type = "misc", subtype="ingredient", image = "object/vial_elder_vampire_blood.png", level_range = {50, 50}, encumber = 0, - unided_name = "black blood", + unided_name = _t"black blood", name = "vial of elder vampire blood", display = "~", color=colors.GREY, - desc = [[Thick, clotted, and foul. The vial is cold to the touch.]], + desc = _t[[Thick, clotted, and foul. The vial is cold to the touch.]], alch = "Once you've gotten it, cross some moving water on your way back.", } @@ -143,10 +143,10 @@ newEntity{ define_as = "MULTIHUED_WYRM_SCALE", type = "misc", subtype="ingredient", image = "object/dragon_scale_multihued.png", level_range = {50, 50}, encumber = 0, - unided_name = "shimmering scale", + unided_name = _t"shimmering scale", name = "multi-hued wyrm scale", display = "~", color=colors.VIOLET, - desc = [[Beautiful and nearly impregnable. Separating it from the dragon must have been hard work.]], + desc = _t[[Beautiful and nearly impregnable. Separating it from the dragon must have been hard work.]], alch = "If you think collecting one of these is hard, try liquefying one.", } @@ -155,10 +155,10 @@ newEntity{ define_as = "SPIDER_SPINNERET", type = "misc", subtype="ingredient", image = "object/spider_spinnarets.png", level_range = {50, 50}, encumber = 0, - unided_name = "spinneret", + unided_name = _t"spinneret", name = "giant spider spinneret", display = "*", color=colors.GREEN, - desc = [[An ugly, ripped-out chunk of giant spider. Bits of silk protrude from an orifice.]], + desc = _t[[An ugly, ripped-out chunk of giant spider. Bits of silk protrude from an orifice.]], alch = "The spiders in your barn won't do. You'll know a giant spider when you see one, though they're rare in Maj'Eyal.", } @@ -167,10 +167,10 @@ newEntity{ define_as = "HONEY_TREE_ROOT", type = "misc", subtype="ingredient", image = "object/honey_tree_root.png", level_range = {50, 50}, encumber = 0, - unided_name = "dirty root", + unided_name = _t"dirty root", name = "honey tree root", display = "~", color=colors.TAN, - desc = [[The severed end of one of a honey tree's roots. It wriggles around occasionally, seemingly unwilling to admit that it's dead... and a *plant*.]], + desc = _t[[The severed end of one of a honey tree's roots. It wriggles around occasionally, seemingly unwilling to admit that it's dead... and a *plant*.]], alch = "Keep a firm grip on it. These things will dig themselves right back into the ground if you drop them.", } @@ -179,10 +179,10 @@ newEntity{ define_as = "BLOATED_HORROR_HEART", type = "misc", subtype="ingredient", image = "object/bloated_horror_heart.png", level_range = {50, 50}, encumber = 0, - unided_name = "heart", + unided_name = _t"heart", name = "bloated horror heart", display = "*", color=colors.GREY, - desc = [[Diseased-looking and reeking. It seems to be decaying as you watch.]], + desc = _t[[Diseased-looking and reeking. It seems to be decaying as you watch.]], alch = "Don't worry if it dissolves. Just don't get any on you.", } @@ -191,10 +191,10 @@ newEntity{ define_as = "ELECTRIC_EEL_TAIL", type = "misc", subtype="ingredient", image = "object/electric_eel_tail.png", level_range = {50, 50}, encumber = 0, - unided_name = "eel tail", + unided_name = _t"eel tail", name = "electric eel tail", display = "~", color=colors.BLUE, - desc = [[Slimy, wriggling, and crackling with electricity.]], + desc = _t[[Slimy, wriggling, and crackling with electricity.]], alch = "I know, I know. Where does the eel stop and the tail start? It doesn't much matter. The last ten inches or so should do nicely.", } @@ -203,10 +203,10 @@ newEntity{ define_as = "SQUID_INK", type = "misc", subtype="ingredient", image = "object/vial_squid_ink.png", level_range = {50, 50}, encumber = 0, - unided_name = "black liquid", + unided_name = _t"black liquid", name = "vial of squid ink", display = "~", color=colors.VIOLET, - desc = [[Thick, black and opaque.]], + desc = _t[[Thick, black and opaque.]], alch = "However annoying this will be for you to gather, I promise that the reek it produces in my lab will prove even more annoying.", } @@ -215,10 +215,10 @@ newEntity{ define_as = "BEAR_PAW", type = "misc", subtype="ingredient", image = "object/bear_paw.png", level_range = {50, 50}, encumber = 0, - unided_name = "large, clawed paw", + unided_name = _t"large, clawed paw", name = "bear paw", display = "*", color=colors.TAN, - desc = [[Large and hairy with flesh-rending claws. It smells slightly of fish.]], + desc = _t[[Large and hairy with flesh-rending claws. It smells slightly of fish.]], alch = "You'd think I could get one of these from a local hunter, but they've had no luck. Don't get eaten.", } @@ -227,10 +227,10 @@ newEntity{ define_as = "ICE_WYRM_TOOTH", type = "misc", subtype="ingredient", image = "object/frost_wyrm_tooth.png", level_range = {50, 50}, encumber = 0, - unided_name = "tooth", + unided_name = _t"tooth", name = "ice wyrm tooth", display = "/", color=colors.WHITE, - desc = [[This tooth has been blunted with age, but still looks more than capable of doing its job.]], + desc = _t[[This tooth has been blunted with age, but still looks more than capable of doing its job.]], alch = "Ice Wyrms lose teeth fairly often, so you might get lucky and not have to do battle with one. But dress warm just in case.", } @@ -239,10 +239,10 @@ newEntity{ define_as = "RED_CRYSTAL_SHARD", type = "misc", subtype="ingredient", image = "object/red_crystal_shard.png", level_range = {50, 50}, encumber = 0, - unided_name = "red crystal shard", + unided_name = _t"red crystal shard", name = "red crystal shard", display = "/", color=colors.RED, - desc = [[Tiny flames still dance ethereally inside this transparent crystal, though its heat seems to have faded... you hope.]], + desc = _t[[Tiny flames still dance ethereally inside this transparent crystal, though its heat seems to have faded... you hope.]], alch = "I hear these can be found in a cave near Elvala. I also hear that they can cause you to spontaneously combust, so no need to explain if you come back hideously scarred.", } @@ -251,10 +251,10 @@ newEntity{ define_as = "FIRE_WYRM_SALIVA", type = "misc", subtype="ingredient", image = "object/vial_fire_wyrm_saliva.png", level_range = {50, 50}, encumber = 0, - unided_name = "wyrm saliva", + unided_name = _t"wyrm saliva", name = "vial of fire wyrm saliva", display = "~", color=colors.RED, - desc = [[Clear and slightly thicker than water. It froths when shaken.]], + desc = _t[[Clear and slightly thicker than water. It froths when shaken.]], alch = "Keep this stuff well away from your campfire unless you want me to have to find a new, more alive adventurer.", } @@ -263,10 +263,10 @@ newEntity{ define_as = "GHOUL_FLESH", type = "misc", subtype="ingredient", image = "object/ghoul_flesh.png", level_range = {50, 50}, encumber = 0, - unided_name = "chunk of rotten flesh", + unided_name = _t"chunk of rotten flesh", name = "chunk of ghoul flesh", display = "*", color=colors.TAN, - desc = [[Rotten and reeking. It still twitches occasionally.]], + desc = _t[[Rotten and reeking. It still twitches occasionally.]], alch = "Unfortunately for you, the chunks that regularly fall off ghouls won't do. I need one freshly carved off.", } @@ -275,10 +275,10 @@ newEntity{ define_as = "MUMMY_BONE", type = "misc", subtype="ingredient", image = "object/mummified_bone.png", level_range = {50, 50}, encumber = 0, - unided_name = "dry, flesh-encrusted bone", + unided_name = _t"dry, flesh-encrusted bone", name = "mummified bone", display = "-", color=colors.WHITE, - desc = [[Bits of dry flesh still cling to this ancient bone.]], + desc = _t[[Bits of dry flesh still cling to this ancient bone.]], alch = "That is, a bone from a corpse that's undergone mummification. Actually, any bit of the body would do, but the bones are the only parts you're certain to find when you kick a mummy apart. I recommend finding one that doesn't apply curses.", } @@ -287,10 +287,10 @@ newEntity{ define_as = "SANDWORM_TOOTH", type = "misc", subtype="ingredient", image = "object/sandworm_tooth.png", level_range = {50, 50}, encumber = 0, - unided_name = "small, pointed tooth", + unided_name = _t"small, pointed tooth", name = "sandworm tooth", display = "/", color=colors.GREY, - desc = [[Tiny, dark grey, and wickedly sharp. It looks more like rock than bone.]], + desc = _t[[Tiny, dark grey, and wickedly sharp. It looks more like rock than bone.]], alch = "Yes, sandworms have teeth. They're just very small and well back from where you're ever likely to see them and live.", } @@ -299,10 +299,10 @@ newEntity{ define_as = "BLACK_MAMBA_HEAD", type = "misc", subtype="ingredient", image = "object/black_mamba_head.png", level_range = {50, 50}, encumber = 0, - unided_name = "snake head", + unided_name = _t"snake head", name = "black mamba head", display = "*", color=colors.GREY, - desc = [[Unlike the rest of the black mamba, the severed head isn't moving.]], + desc = _t[[Unlike the rest of the black mamba, the severed head isn't moving.]], alch = "If you get bitten, I can save your life if you still manage to bring back the head... and if it happens within about a minute from my door. Good luck.", } @@ -311,10 +311,10 @@ newEntity{ define_as = "SNOW_GIANT_KIDNEY", type = "misc", subtype="ingredient", image = "object/snow_giant_kidney.png", level_range = {50, 50}, encumber = 0, - unided_name = "kidney", + unided_name = _t"kidney", name = "snow giant kidney", display = "*", color=colors.VIOLET, - desc = [[As unpleasant-looking as any exposed organ.]], + desc = _t[[As unpleasant-looking as any exposed organ.]], alch = "I suggest not killing the snow giant by impaling it through the kidneys. You'll just have to find another.", } @@ -323,10 +323,10 @@ newEntity{ define_as = "STORM_WYRM_CLAW", type = "misc", subtype="ingredient", image = "object/storm_wyrm_claw.png", level_range = {50, 50}, encumber = 0, - unided_name = "claw", + unided_name = _t"claw", name = "storm wyrm claw", display = "/", color=colors.BLUE, - desc = [[Bluish and wickedly sharp. It makes your arm hair stand on end.]], + desc = _t[[Bluish and wickedly sharp. It makes your arm hair stand on end.]], alch = "I recommend severing one of dewclaws. They're smaller and easier to remove, but they've never been blunted by use, so be careful you don't poke yourself. Oh yes, and don't get eaten.", } @@ -335,10 +335,10 @@ newEntity{ define_as = "GREEN_WORM", type = "misc", subtype="ingredient", image = "object/green_worm.png", level_range = {50, 50}, encumber = 0, - unided_name = "dead green worm", + unided_name = _t"dead green worm", name = "green worm", display = "~", color=colors.GREEN, - desc = [[A dead green worm, painstakingly separated from its tangle of companions.]], + desc = _t[[A dead green worm, painstakingly separated from its tangle of companions.]], alch = "Try to get any knots out before returning. Wear gloves.", } @@ -347,10 +347,10 @@ newEntity{ define_as = "WIGHT_ECTOPLASM", type = "misc", subtype="ingredient", image = "object/vial_wight_ectoplasm.png", level_range = {50, 50}, encumber = 0, - unided_name = "viscous slime", + unided_name = _t"viscous slime", name = "vial of wight ectoplasm", display = "*", color=colors.GREEN, - desc = [[Cloudy and thick. Only by bottling it can you prevent it from evaporating within minutes.]], + desc = _t[[Cloudy and thick. Only by bottling it can you prevent it from evaporating within minutes.]], alch = "If you ingest any of this, never mind coming back here. Please.", } @@ -359,10 +359,10 @@ newEntity{ define_as = "XORN_FRAGMENT", type = "misc", subtype="ingredient", image = "object/xorn_fragment.png", level_range = {50, 50}, encumber = 0, - unided_name = "chunk of stone", + unided_name = _t"chunk of stone", name = "xorn fragment", display = "*", color=colors.TAN, - desc = [[Looks much like any other rock, though this one was recently sentient and trying to murder you.]], + desc = _t[[Looks much like any other rock, though this one was recently sentient and trying to murder you.]], alch = "Avoid fragments that contained the xorn's eyes. You've no idea how unpleasant it is being watched by your ingredients.", } @@ -371,10 +371,10 @@ newEntity{ define_as = "WARG_CLAW", type = "misc", subtype="ingredient", image = "object/warg_claw.png", level_range = {50, 50}, encumber = 0, - unided_name = "claw", + unided_name = _t"claw", name = "warg claw", display = "/", color=colors.TAN, - desc = [[Unpleasantly large and sharp for a canine's claw.]], + desc = _t[[Unpleasantly large and sharp for a canine's claw.]], alch = "My usual ingredient gatherers draw the line at hunting wargs. Feel free to mock them on your way back.", } @@ -383,10 +383,10 @@ newEntity{ define_as = "FAEROS_ASH", type = "misc", subtype="ingredient", image = "object/pharao_ash.png", level_range = {50, 50}, encumber = 0, - unided_name = "ash", + unided_name = _t"ash", name = "pouch of faeros ash", display = "*", color=colors.GREY, - desc = [[Unremarkable grey ash.]], + desc = _t[[Unremarkable grey ash.]], alch = "They're creatures of pure flame, and likely of extraplanar origin, but the ash of objects consumed by their fire has remarkable properties.", } @@ -395,10 +395,10 @@ newEntity{ define_as = "WRETCHLING_EYE", type = "misc", subtype="ingredient", image = "object/wretchling_eyeball.png", level_range = {50, 50}, encumber = 0, - unided_name = "eyeball", + unided_name = _t"eyeball", name = "wretchling eyeball", display = "*", color=colors.WHITE, - desc = [[Small and bloodshot. Its dead gaze still burns your skin.]], + desc = _t[[Small and bloodshot. Its dead gaze still burns your skin.]], alch = "Evil little things, wretchlings. Feel free to kill as many as you can, though I just need the one intact eyeball.", } @@ -407,10 +407,10 @@ newEntity{ define_as = "FAERLHING_FANG", type = "misc", subtype="ingredient", image = "object/faerlhing_fang.png", level_range = {50, 50}, encumber = 0, - unided_name = "fang", + unided_name = _t"fang", name = "faerlhing fang", display = "/", color=colors.GREEN, - desc = [[It still drips venom and crackles with magical energy.]], + desc = _t[[It still drips venom and crackles with magical energy.]], alch = "I've lost a number of adventurers to this one, but I'm sure you'll be fine.", } @@ -419,10 +419,10 @@ newEntity{ define_as = "VAMPIRE_LORD_FANG", type = "misc", subtype="ingredient", image = "object/vampire_lord_fang.png", level_range = {50, 50}, encumber = 0, - unided_name = "fang", + unided_name = _t"fang", name = "vampire lord fang", display = "/", color=colors.WHITE, - desc = [[Brilliantly white, but surrounded by blackest magic.]], + desc = _t[[Brilliantly white, but surrounded by blackest magic.]], alch = "You should definitely consider not pricking yourself with it.", } @@ -431,10 +431,10 @@ newEntity{ define_as = "HUMMERHORN_WING", type = "misc", subtype="ingredient", image = "object/hummerhorn_wing.png", level_range = {50, 50}, encumber = 0, - unided_name = "translucent insect wing", + unided_name = _t"translucent insect wing", name = "hummerhorn wing", display = "~", color=colors.VIOLET, - desc = [[Translucent and delicate-looking, but surprisingly durable.]], + desc = _t[[Translucent and delicate-looking, but surprisingly durable.]], alch = "If you've not encountered hummerhorns before, they're like wasps, only gigantic and lethal.", } @@ -443,9 +443,9 @@ newEntity{ define_as = "LUMINOUS_HORROR_DUST", type = "misc", subtype="ingredient", image = "object/pouch_luminous_horror_dust.png", level_range = {50, 50}, encumber = 0, - unided_name = "glowing dust", + unided_name = _t"glowing dust", name = "pouch of luminous horror dust", display = "*", color=colors.YELLOW, - desc = [[Weightless and glowing; not your usual dust.]], + desc = _t[[Weightless and glowing; not your usual dust.]], alch = "Not to be confused with radiant horrors. If you encounter the latter, then I suppose there are always more adventurers.", } diff --git a/game/modules/tome/data/general/objects/gauntlets.lua b/game/modules/tome/data/general/objects/gauntlets.lua index 4ea5d05ccf458b764c0022dd77c7b92e40d3300d..d623bfa6d24a8a7feae7cb646f42359a853bb273 100644 --- a/game/modules/tome/data/general/objects/gauntlets.lua +++ b/game/modules/tome/data/general/objects/gauntlets.lua @@ -32,7 +32,7 @@ newEntity{ rarity = 9, metallic = true, wielder={combat = {accuracy_effect = "mace"},}, - desc = [[Metal gloves protecting the hands up to the middle of the lower arm.]], + desc = _t[[Metal gloves protecting the hands up to the middle of the lower arm.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/gloves.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/gem.lua b/game/modules/tome/data/general/objects/gem.lua index ca209d830a24b63204e958cc7ad2c29ed770f308..25ec40e1cd51012c0ae0b90e6543b16f4afa0775 100644 --- a/game/modules/tome/data/general/objects/gem.lua +++ b/game/modules/tome/data/general/objects/gem.lua @@ -27,7 +27,7 @@ newEntity{ identified = true, stacking = true, auto_pickup = true, pickup_sound = "actions/gem", - desc = [[Gems can be sold for money or used in arcane rituals.]], + desc = _t[[Gems can be sold for money or used in arcane rituals.]], } local gem_color_attributes = { @@ -98,7 +98,7 @@ newGem("Diamond", "object/diamond.png",5, 18, "white", 40, 50, 5, 70, ) newGem("Pearl", "object/pearl.png", 5, 18, "white", 40, 50, 5, 70, { resists = {all=5}, combat_armor = 5 }, - { splash={type="LITE", dam=100, desc = "Lights terrain (power 100)"} } + { splash={type="LITE", dam=100, desc = _t"Lights terrain (power 100)"} } ) newGem("Moonstone", "object/moonstone.png",5, 18, "white", 40, 50, 5, 70, { combat_def=10, combat_mentalresist=10, combat_spellresist=10, combat_physresist=10, }, @@ -126,7 +126,7 @@ newGem("Turquoise", "object/turquoise.png",4, 16, "green", 30, 40, 4, 65, ) newGem("Jade", "object/jade.png", 4, 16, "green", 30, 40, 4, 65, { resists = {all=4}, combat_armor = 4 }, - { splash={type="SLOW", dam= 1 - 1 / (1 + 0.20), desc = "Slows by 17%"} } + { splash={type="SLOW", dam= 1 - 1 / (1 + 0.20), desc = _t"Slows by 17%"} } ) newGem("Sapphire", "object/sapphire.png",4, 16, "blue", 30, 40, 4, 65, { combat_def=8, combat_mentalresist=8, combat_spellresist=8, combat_physresist=8, }, @@ -170,7 +170,7 @@ newGem("Aquamarine", "object/aquamarine.png",2, 10, "blue", 10, 20, 2, 35, ) newGem("Ametrine", "object/ametrine.png",1, 8, "yellow", 1, 10, 1, 20, { inc_damage = {all=2}, combat_physcrit=1, combat_mindcrit=1, combat_spellcrit=1, }, - { splash={type="LITE", dam=10, desc = "Lights terrain (power 10)"} } + { splash={type="LITE", dam=10, desc = _t"Lights terrain (power 10)"} } ) newGem("Zircon", "object/zircon.png",1, 8, "yellow", 1, 10, 1, 20, { resists = {all=1}, combat_armor = 1 }, diff --git a/game/modules/tome/data/general/objects/gloves.lua b/game/modules/tome/data/general/objects/gloves.lua index 2a1fa9d5d97274ca297f593935fc77e7761a03b1..4dd372a6419bc7479225d1b16f691685dcf6e907 100644 --- a/game/modules/tome/data/general/objects/gloves.lua +++ b/game/modules/tome/data/general/objects/gloves.lua @@ -30,7 +30,7 @@ newEntity{ encumber = 1, rarity = 9, wielder={combat = {accuracy_effect = "axe", physspeed = 0},}, - desc = [[Light gloves which do not seriously hinder finger movements, while still protecting the hands somewhat.]], + desc = _t[[Light gloves which do not seriously hinder finger movements, while still protecting the hands somewhat.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/gloves.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/heavy-armors.lua b/game/modules/tome/data/general/objects/heavy-armors.lua index af9b0b3ad8e8f0101772b66687951916ec6f2667..6f2b5f3b99336ffa0d2da4bf0a023c3ba143f648 100644 --- a/game/modules/tome/data/general/objects/heavy-armors.lua +++ b/game/modules/tome/data/general/objects/heavy-armors.lua @@ -30,7 +30,7 @@ newEntity{ encumber = 14, rarity = 5, metallic = true, - desc = [[A suit of armour made of mail.]], + desc = _t[[A suit of armour made of mail.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/heavy-armor.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/heavy-boots.lua b/game/modules/tome/data/general/objects/heavy-boots.lua index 9cb560f41097322568cff4da2ce61ed87d945eaa..58365d48eb9fc2e9b0a5245ed343835bb6ae3418 100644 --- a/game/modules/tome/data/general/objects/heavy-boots.lua +++ b/game/modules/tome/data/general/objects/heavy-boots.lua @@ -30,7 +30,7 @@ newEntity{ encumber = 3, rarity = 7, metallic = true, - desc = [[Heavy boots, with metal strips at the toes, heels and other vulnerable parts, to better protect the wearer's feet from harm.]], + desc = _t[[Heavy boots, with metal strips at the toes, heels and other vulnerable parts, to better protect the wearer's feet from harm.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/boots.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/helms.lua b/game/modules/tome/data/general/objects/helms.lua index 71a2316e33f46965b898d73b5eb3a578885de2a1..185d80739fd88c012cb1c6e585e05ebc027b56f4 100644 --- a/game/modules/tome/data/general/objects/helms.lua +++ b/game/modules/tome/data/general/objects/helms.lua @@ -30,7 +30,7 @@ newEntity{ encumber = 3, rarity = 7, metallic = true, - desc = [[A large helmet that can protect the entire head. Ventilation and bad vision can be a problem, however.]], + desc = _t[[A large helmet that can protect the entire head. Ventilation and bad vision can be a problem, however.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/helm.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/jewelry.lua b/game/modules/tome/data/general/objects/jewelry.lua index a29dfa5b5ce1f1a71ce0d116bf98ea4b058e54ae..9468383226f0f0540d0c40ea2d6f7cf2758f7464 100644 --- a/game/modules/tome/data/general/objects/jewelry.lua +++ b/game/modules/tome/data/general/objects/jewelry.lua @@ -24,7 +24,7 @@ newEntity{ display = "=", encumber = 0.1, rarity = 6, - desc = [[Rings can have magical properties.]], + desc = _t[[Rings can have magical properties.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", -- Most rings are ego items egos = "/data/general/objects/egos/rings.lua", egos_chance = { prefix=resolvers.mbonus(50, 40), suffix=resolvers.mbonus(50, 40) }, egos_chance_decay = 0.5, @@ -36,42 +36,42 @@ newEntity{ display = '"', encumber = 0.1, rarity = 8, - desc = [[Amulets can have magical properties.]], + desc = _t[[Amulets can have magical properties.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/amulets.lua", egos_chance = { prefix=resolvers.mbonus(50, 40), suffix=resolvers.mbonus(50, 40) }, egos_chance_decay = 0.5, } newEntity{ base = "BASE_RING", name = "copper ring", color = colors.UMBER, - unided_name = "copper ring", short_name = "copper", + unided_name = _t"copper ring", short_name = "copper", level_range = {1, 10}, cost = 1, material_level = 1, } newEntity{ base = "BASE_RING", name = "steel ring", color = colors.SLATE, - unided_name = "steel ring", short_name = "steel", + unided_name = _t"steel ring", short_name = "steel", level_range = {10, 20}, cost = 2, material_level = 2, } newEntity{ base = "BASE_RING", name = "gold ring", color = colors.YELLOW, - unided_name = "gold ring", short_name = "gold", + unided_name = _t"gold ring", short_name = "gold", level_range = {20, 30}, cost = 5, material_level = 3, } newEntity{ base = "BASE_RING", name = "stralite ring", color = {r=50, g=50, b=50}, - unided_name = "stralite ring", short_name = "stralite", + unided_name = _t"stralite ring", short_name = "stralite", level_range = {30, 40}, cost = 10, material_level = 4, } newEntity{ base = "BASE_RING", name = "voratun ring", color = colors.WHITE, - unided_name = "voratun ring", short_name = "voratun", + unided_name = _t"voratun ring", short_name = "voratun", level_range = {40, 50}, cost = 15, material_level = 5, @@ -79,35 +79,35 @@ newEntity{ base = "BASE_RING", newEntity{ base = "BASE_AMULET", name = "copper amulet", color = colors.UMBER, - unided_name = "copper amulet", short_name = "copper", + unided_name = _t"copper amulet", short_name = "copper", level_range = {1, 10}, cost = 1, material_level = 1, } newEntity{ base = "BASE_AMULET", name = "steel amulet", color = colors.SLATE, - unided_name = "steel amulet", short_name = "steel", + unided_name = _t"steel amulet", short_name = "steel", level_range = {10, 20}, cost = 2, material_level = 2, } newEntity{ base = "BASE_AMULET", name = "gold amulet", color = colors.YELLOW, - unided_name = "gold amulet", short_name = "gold", + unided_name = _t"gold amulet", short_name = "gold", level_range = {20, 30}, cost = 5, material_level = 3, } newEntity{ base = "BASE_AMULET", name = "stralite amulet", color = {r=50, g=50, b=50}, - unided_name = "stralite amulet", short_name = "stralite", + unided_name = _t"stralite amulet", short_name = "stralite", level_range = {30, 40}, cost = 10, material_level = 4, } newEntity{ base = "BASE_AMULET", name = "voratun amulet", color = colors.WHITE, - unided_name = "voratun amulet", short_name = "voratun", + unided_name = _t"voratun amulet", short_name = "voratun", level_range = {40, 50}, cost = 15, material_level = 5, diff --git a/game/modules/tome/data/general/objects/knifes.lua b/game/modules/tome/data/general/objects/knifes.lua index a483d61f30f6eb898db829a10f0246862b79e4bd..afc1cecd2a86f9faa9b86381b968cb98d7e3b20a 100644 --- a/game/modules/tome/data/general/objects/knifes.lua +++ b/game/modules/tome/data/general/objects/knifes.lua @@ -28,7 +28,7 @@ newEntity{ rarity = 4, metallic = true, combat = { talented = "knife", accuracy_effect="axe", damrange = 1.3, physspeed = 1, sound = {"actions/melee", pitch=1.2, vol=1.2}, sound_miss = {"actions/melee", pitch=1.2, vol=1.2} }, - desc = [[Sharp, short and deadly.]], + desc = _t[[Sharp, short and deadly.]], randart_able = "/data/general/objects/random-artifacts/melee.lua", egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/leather-belt.lua b/game/modules/tome/data/general/objects/leather-belt.lua index 9e49eee0d76c68c17d1c8cf4ebea154f1d3318ce..ac550376048f70fa10b594fab6552cefccc3c79e 100644 --- a/game/modules/tome/data/general/objects/leather-belt.lua +++ b/game/modules/tome/data/general/objects/leather-belt.lua @@ -24,7 +24,7 @@ newEntity{ display = "(", color=colors.UMBER, image = resolvers.image_material("belt", "leather"), encumber = 1, rarity = 6, - desc = [[A belt that goes around your waist.]], + desc = _t[[A belt that goes around your waist.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/belt.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/leather-boots.lua b/game/modules/tome/data/general/objects/leather-boots.lua index 6920f6d084355633a9f7b7987f7fff185ec14b84..4da34f1e4aa94207cf9a6ac4cfab5f3998a805d2 100644 --- a/game/modules/tome/data/general/objects/leather-boots.lua +++ b/game/modules/tome/data/general/objects/leather-boots.lua @@ -26,7 +26,7 @@ newEntity{ moddable_tile = resolvers.moddable_tile("leather_boots"), encumber = 2, rarity = 6, - desc = [[A pair of boots made of leather.]], + desc = _t[[A pair of boots made of leather.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/light-boots.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/leather-caps.lua b/game/modules/tome/data/general/objects/leather-caps.lua index 1410ec514e9c2acf36533ef905ba70a3c24a0954..dc997191fb12aaa08eb21a1e6df043273bf332eb 100644 --- a/game/modules/tome/data/general/objects/leather-caps.lua +++ b/game/modules/tome/data/general/objects/leather-caps.lua @@ -26,7 +26,7 @@ newEntity{ moddable_tile = resolvers.moddable_tile("leather_cap"), encumber = 2, rarity = 6, - desc = [[A cap made of leather.]], + desc = _t[[A cap made of leather.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/helm.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/light-armors.lua b/game/modules/tome/data/general/objects/light-armors.lua index d999af1f00a538afc5f2b22b1b9cc2d51e91552d..664411ea77cb4b4cba999c9ddd80246f80b4732c 100644 --- a/game/modules/tome/data/general/objects/light-armors.lua +++ b/game/modules/tome/data/general/objects/light-armors.lua @@ -26,7 +26,7 @@ newEntity{ moddable_tile = resolvers.moddable_tile("light"), encumber = 9, rarity = 5, - desc = [[A suit of armour made of leather.]], + desc = _t[[A suit of armour made of leather.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/light-armor.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/lites.lua b/game/modules/tome/data/general/objects/lites.lua index d8d99d25fd41b264fd5d1d2fbd82c1f380b46fbb..099ce56e2e27dddff648e8dd961af3b378543de6 100644 --- a/game/modules/tome/data/general/objects/lites.lua +++ b/game/modules/tome/data/general/objects/lites.lua @@ -22,14 +22,14 @@ newEntity{ slot = "LITE", type = "lite", subtype="lite", image = resolvers.image_material("lite", {"brass","","dwarven","","faenorian"}), display = "~", - desc = [[Light up the dark places of the world!]], + desc = _t[[Light up the dark places of the world!]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/lite.lua", egos_chance = { prefix=resolvers.mbonus(15, 3), suffix=resolvers.mbonus(15, 3) }, } newEntity{ base = "BASE_LITE", name = "brass lantern", color=colors.UMBER, short_name = "brass", - desc = [[A brass container with a wick emerging from it, protected from draughts by a sheet of greased paper. It can be carried by a handle.]], + desc = _t[[A brass container with a wick emerging from it, protected from draughts by a sheet of greased paper. It can be carried by a handle.]], level_range = {1, 20}, rarity = 7, encumber = 2, @@ -43,7 +43,7 @@ newEntity{ base = "BASE_LITE", newEntity{ base = "BASE_LITE", name = "alchemist's lamp", color=colors.LIGHT_UMBER, short_name = "alchemist", - desc = [[A normal brass lantern, enhanced by alchemy to make it brighter.]], + desc = _t[[A normal brass lantern, enhanced by alchemy to make it brighter.]], level_range = {20, 35}, rarity = 10, encumber = 1, @@ -57,7 +57,7 @@ newEntity{ base = "BASE_LITE", newEntity{ base = "BASE_LITE", name = "dwarven lantern", color=colors.GOLD, short_name = "dwarven", - desc = [[Made by the Dwarves, this lantern provides light in the darkest recesses of the earth.]], + desc = _t[[Made by the Dwarves, this lantern provides light in the darkest recesses of the earth.]], level_range = {35, 50}, rarity = 12, encumber = 1, diff --git a/game/modules/tome/data/general/objects/lore/fun.lua b/game/modules/tome/data/general/objects/lore/fun.lua index 71409ac2aa46139f7f1295df47280d703e15d5b2..f74f8b9736ab9071ece11d54a875cb50c13e9901 100644 --- a/game/modules/tome/data/general/objects/lore/fun.lua +++ b/game/modules/tome/data/general/objects/lore/fun.lua @@ -19,7 +19,7 @@ newEntity{ base = "BASE_LORE_RANDOM", name = "trollish poem", lore="troll-poem", unique=true, - desc = [[A poem written by a... troll?]], + desc = _t[[A poem written by a... troll?]], level_range = {1, 50}, rarity = 40, encumber = 0, @@ -27,7 +27,7 @@ newEntity{ base = "BASE_LORE_RANDOM", newEntity{ base = "BASE_LORE_RANDOM", name = "necromancer poem", lore="necromancer-poem", unique=true, - desc = [[A poem written by a... Necromancer?]], + desc = _t[[A poem written by a... Necromancer?]], level_range = {15, 50}, rarity = 40, encumber = 0, @@ -35,7 +35,7 @@ newEntity{ base = "BASE_LORE_RANDOM", newEntity{ base = "BASE_LORE_RANDOM", name = "rogues do it from behind", lore="rogue-poem", unique=true, - desc = [[A poem written for a rogue?]], + desc = _t[[A poem written for a rogue?]], level_range = {15, 50}, rarity = 40, encumber = 0, @@ -43,8 +43,8 @@ newEntity{ base = "BASE_LORE_RANDOM", for i = 1, 4 do newEntity{ base = "BASE_LORE_RANDOM", - name = "how to become a necromancer, part "..i, lore="necromancer-primer-"..i, unique=true, - desc = [[How to become a powerful Necromancer!]], + name = ("how to become a necromancer, part %d"):tformat(i), lore="necromancer-primer-"..i, unique=true, + desc = _t[[How to become a powerful Necromancer!]], level_range = {15, 50}, rarity = 40, } @@ -52,22 +52,22 @@ end newEntity{ base = "BASE_LORE_RANDOM", name = [["Dust to Dust", an undead hunter's guide, by Aslabor Borys]], lore="dust-to-dust", unique=true, - desc = [[An undead hunter's guide, by Aslabor Borys.]], + desc = _t[[An undead hunter's guide, by Aslabor Borys.]], level_range = {15, 50}, rarity = 60, } for i = 1, 5 do local who -if i == 1 then who = "Rolf" nb = 1 -elseif i == 2 then who = "Weisman" nb = 1 -elseif i == 3 then who = "Rolf" nb = 2 -elseif i == 4 then who = "Weisman" nb = 2 -elseif i == 5 then who = "Weisman" nb = 3 +if i == 1 then who = _t"Rolf" nb = 1 +elseif i == 2 then who = _t"Weisman" nb = 1 +elseif i == 3 then who = _t"Rolf" nb = 2 +elseif i == 4 then who = _t"Weisman" nb = 2 +elseif i == 5 then who = _t"Weisman" nb = 3 end newEntity{ base = "BASE_LORE_RANDOM", - name = "letter to "..who.."("..nb..")", lore="adventurer-letter-"..i, unique=true, - desc = [[A part of the correspondence between two adventurers.]], + name = ("letter to %s (%d)"):tformat(who, nb), lore="adventurer-letter-"..i, unique=true, + desc = _t[[A part of the correspondence between two adventurers.]], level_range = {1, 20}, rarity = 20, bloodstains = (i == 5) and 2 or nil, @@ -76,7 +76,7 @@ end newEntity{ base = "BASE_LORE_RANDOM", name = "of halfling feet", lore="halfling-feet", unique=true, - desc = [[Notes about... Halfling feet??]], + desc = _t[[Notes about... Halfling feet??]], level_range = {10, 30}, rarity = 40, encumber = 0, diff --git a/game/modules/tome/data/general/objects/lore/misc.lua b/game/modules/tome/data/general/objects/lore/misc.lua index b66c578b37bd62005b61c2f9f5b454adc9752d0c..5e5b4f3fd6f476d612e6f11224b37b24cde76847 100644 --- a/game/modules/tome/data/general/objects/lore/misc.lua +++ b/game/modules/tome/data/general/objects/lore/misc.lua @@ -19,21 +19,21 @@ newEntity{ base = "BASE_LORE_RANDOM", name = "The story of my salvation", lore="zigur-potion", unique=true, - desc = [[An old tale about the fear of magic.]], + desc = _t[[An old tale about the fear of magic.]], level_range = {1, 20}, rarity = 40, } newEntity{ base = "BASE_LORE_RANDOM", name = "On Adventuring", lore="kestin-highfin-adventuring-notes", unique=true, - desc = [[Fragments of a fabled traveler.]], + desc = _t[[Fragments of a fabled traveler.]], level_range = {10, 25}, rarity = 35, } newEntity{ base = "BASE_LORE_RANDOM", name = "memories of Artelia Firstborn", lore="creation-elf", unique=true, - desc = [[The memories of the first elf ever to awaken.]], + desc = _t[[The memories of the first elf ever to awaken.]], level_range = {1, 25}, rarity = 40, -- Only elves can find it @@ -42,7 +42,7 @@ newEntity{ base = "BASE_LORE_RANDOM", newEntity{ base = "BASE_LORE_RANDOM", name = "human myth of creation", lore="creation-human", unique=true, - desc = [[Myth of creation of the humans.]], + desc = _t[[Myth of creation of the humans.]], level_range = {1, 25}, rarity = 40, -- Only humans can find it @@ -51,7 +51,7 @@ newEntity{ base = "BASE_LORE_RANDOM", newEntity{ base = "BASE_LORE_RANDOM", name = "a logical analysis of creation, by philosopher Smythen", lore="creation-halfling", unique=true, - desc = [[Myth of creation of the halflings.]], + desc = _t[[Myth of creation of the halflings.]], level_range = {1, 25}, rarity = 40, -- Only hhalflings can find it @@ -60,7 +60,7 @@ newEntity{ base = "BASE_LORE_RANDOM", newEntity{ base = "BASE_LORE_RANDOM", name = "Tale of the Moonsisters", lore="moons-human", unique=true, - desc = [[The creation of Eyal's moons.]], + desc = _t[[The creation of Eyal's moons.]], level_range = {1, 35}, rarity = 40, -- Only humans can find it diff --git a/game/modules/tome/data/general/objects/lore/spellhunt.lua b/game/modules/tome/data/general/objects/lore/spellhunt.lua index 933db338ce40b66bdc2457772f96f8d76bd1f4b6..3dd772017446ab3687260ee996660616318e8490 100644 --- a/game/modules/tome/data/general/objects/lore/spellhunt.lua +++ b/game/modules/tome/data/general/objects/lore/spellhunt.lua @@ -19,7 +19,7 @@ newEntity{ base = "BASE_LORE_RANDOM", name = "memories of archmage Varil", lore="spellhunt-note-1", unique=true, - desc = [[A collection of thoughts and memories of the archmage Varil, during the Age of Dusk.]], + desc = _t[[A collection of thoughts and memories of the archmage Varil, during the Age of Dusk.]], level_range = {1, 25}, rarity = 40, encumber = 0, @@ -27,21 +27,21 @@ newEntity{ base = "BASE_LORE_RANDOM", newEntity{ base = "BASE_LORE_RANDOM", name = "Spellhunter's Guide part 1: How to Detect a Spellweaver", lore="spellhunt-note-2", unique=true, - desc = [[The definitive guide to hunting magic users.]], + desc = _t[[The definitive guide to hunting magic users.]], level_range = {1, 25}, rarity = 40, encumber = 0, } newEntity{ base = "BASE_LORE_RANDOM", name = "Spellhunter's Guide part 2: How to Battle a Magic-User", lore="spellhunt-note-3", unique=true, - desc = [[The definitive guide to hunting magic users.]], + desc = _t[[The definitive guide to hunting magic users.]], level_range = {1, 25}, rarity = 40, encumber = 0, } newEntity{ base = "BASE_LORE_RANDOM", name = "Spellhunter's Guide part 3: How to Kill a Magic-User", lore="spellhunt-note-4", unique=true, - desc = [[The definitive guide to hunting magic users.]], + desc = _t[[The definitive guide to hunting magic users.]], level_range = {1, 25}, rarity = 40, encumber = 0, diff --git a/game/modules/tome/data/general/objects/lore/sunwall.lua b/game/modules/tome/data/general/objects/lore/sunwall.lua index fcc00d5d785b8d6c830c7f02440421e7722da2a7..297c0074705c8d392af7f7791cc3484b92e9d0e8 100644 --- a/game/modules/tome/data/general/objects/lore/sunwall.lua +++ b/game/modules/tome/data/general/objects/lore/sunwall.lua @@ -21,7 +21,7 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE_RANDOM", define_as = "SUNWALL_LORE_NOTE"..i, name = "Loremaster Verutir's note", lore="sunwall-note-"..i, unique="Loremaster Verutir's note "..i, - desc = [[A paper scrap containing some lore.]], + desc = _t[[A paper scrap containing some lore.]], level_range = {1, 50}, rarity = 50, encumber = 0, diff --git a/game/modules/tome/data/general/objects/maces.lua b/game/modules/tome/data/general/objects/maces.lua index cef169454d4a361069ddae23348a395fe32a714f..39ec6be9781a2db49e575be9ae794ca643e7a3eb 100644 --- a/game/modules/tome/data/general/objects/maces.lua +++ b/game/modules/tome/data/general/objects/maces.lua @@ -28,7 +28,7 @@ newEntity{ rarity = 5, metallic = true, combat = { talented = "mace", damrange = 1.4, physspeed = 1, sound = {"actions/melee", pitch=0.6, vol=1.2}, sound_miss = {"actions/melee", pitch=0.6, vol=1.2}}, - desc = [[Blunt and deadly.]], + desc = _t[[Blunt and deadly.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/massive-armors.lua b/game/modules/tome/data/general/objects/massive-armors.lua index 8167354bedd770a62291975f5ff26252102847f7..4fa0fb979cb8da12cac0ca49aabb975a6818b73e 100644 --- a/game/modules/tome/data/general/objects/massive-armors.lua +++ b/game/modules/tome/data/general/objects/massive-armors.lua @@ -31,7 +31,7 @@ newEntity{ encumber = 17, rarity = 5, metallic = true, - desc = [[A suit of armour made of metal plates.]], + desc = _t[[A suit of armour made of metal plates.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/massive-armor.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/mindstars.lua b/game/modules/tome/data/general/objects/mindstars.lua index b89f1f330bebbf23d127d7bb905d33887e29a0df..64e5583e1f1fc297e1145a703bdae9c6588e5aa4 100644 --- a/game/modules/tome/data/general/objects/mindstars.lua +++ b/game/modules/tome/data/general/objects/mindstars.lua @@ -41,7 +41,7 @@ newEntity{ sound = {"actions/melee", pitch=0.6, vol=1.2}, sound_miss = {"actions/melee", pitch=0.6, vol=1.2}, damtype = DamageType.NATURE, }, - desc = [[Mindstars are natural products. Natural gems covered in living matter, they are used to focus the mental powers of all nature defenders and psionics. + desc = _t[[Mindstars are natural products. Natural gems covered in living matter, they are used to focus the mental powers of all nature defenders and psionics. Using mindstars in the offhand does not incur the normal offhand damage penalty.]], egos = "/data/general/objects/egos/mindstars.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/misc-tools.lua b/game/modules/tome/data/general/objects/misc-tools.lua index daaa318c6788c52c9b6086de5a642ac3384ccc74..9365b122ea7b24e26a7488c4dc8b7c147ab04b75 100644 --- a/game/modules/tome/data/general/objects/misc-tools.lua +++ b/game/modules/tome/data/general/objects/misc-tools.lua @@ -23,5 +23,5 @@ newEntity{ type = "tool", subtype="misc", display = "\\", color=colors.LIGHT_BLUE, encumber = 2, - desc = [[A miscellaneous tool.]], + desc = _t[[A miscellaneous tool.]], } \ No newline at end of file diff --git a/game/modules/tome/data/general/objects/money.lua b/game/modules/tome/data/general/objects/money.lua index 7a84e266cac119d3ad1f366d9c562c99b2a98433..15cad475881fa99fbd5ab80aa0f081ec92d824ce 100644 --- a/game/modules/tome/data/general/objects/money.lua +++ b/game/modules/tome/data/general/objects/money.lua @@ -24,7 +24,7 @@ newEntity{ encumber = 0, rarity = 5, identified = true, - desc = [[All that glitters is not gold; all that is gold does not glitter.]], + desc = _t[[All that glitters is not gold; all that is gold does not glitter.]], on_prepickup = function(self, who, id) who:incMoney(self.money_value / 10) game.logPlayer(who, "You pickup %0.2f gold pieces.", self.money_value / 10) diff --git a/game/modules/tome/data/general/objects/mounts.lua b/game/modules/tome/data/general/objects/mounts.lua index cf050d24fd1a9fddd7bcabdba25027dfb708d2ee..1f5e3942d2842a0a32f9061cddd4d601b28a9e51 100644 --- a/game/modules/tome/data/general/objects/mounts.lua +++ b/game/modules/tome/data/general/objects/mounts.lua @@ -23,7 +23,7 @@ newEntity{ type = "mount", display = "&", color=colors.SLATE, encumber = 0, - desc = [[A mount.]], + desc = _t[[A mount.]], } newEntity{ base = "BASE_MOUNT", define_as = "ALCHEMIST_GOLEM_MOUNT", diff --git a/game/modules/tome/data/general/objects/mummy-wrappings.lua b/game/modules/tome/data/general/objects/mummy-wrappings.lua index 8febf31e33ef158646a5e88a20d747c4f880fd08..8b6b6f638b91dbf6a2e292a6dbc1471f2b06de31 100644 --- a/game/modules/tome/data/general/objects/mummy-wrappings.lua +++ b/game/modules/tome/data/general/objects/mummy-wrappings.lua @@ -29,7 +29,7 @@ newEntity{ display = "[", color=colors.ANTIQUE_WHITE, image="object/mummy_wrappings.png", moddable_tile = resolvers.moddable_tile("mummy_wrapping"), encumber = 6, - desc = [[Decaying mummy wrappings.]], + desc = _t[[Decaying mummy wrappings.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/robe.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, wielder = { diff --git a/game/modules/tome/data/general/objects/objects-far-east.lua b/game/modules/tome/data/general/objects/objects-far-east.lua index b4765402732d4e7e4f2b60664ac6d2fbf7a18d21..4538550d74f4b732c26114156768e758201caadc 100644 --- a/game/modules/tome/data/general/objects/objects-far-east.lua +++ b/game/modules/tome/data/general/objects/objects-far-east.lua @@ -31,7 +31,7 @@ loadIfNot("/data/general/objects/boss-artifacts-far-east.lua") -- This one starts a quest it has a level and rarity so it can drop randomly, but there are places where it is more likely to appear newEntity{ base = "BASE_SCROLL", define_as = "JEWELER_TOME", subtype="tome", no_unique_lore=true, unique = true, quest=true, - unided_name = "ancient tome", + unided_name = _t"ancient tome", name = "Ancient Tome titled 'Gems and their uses'", image = "object/artifact/ancient_tome_gems_and_their_uses.png", level_range = {30, 40}, rarity = 120, color = colors.VIOLET, diff --git a/game/modules/tome/data/general/objects/potions.lua b/game/modules/tome/data/general/objects/potions.lua index 8eef992e8c6dd9e40c09e0e6e595e79eb223ec11..a55638160d6edd267db4415cc38dfddad025c634 100644 --- a/game/modules/tome/data/general/objects/potions.lua +++ b/game/modules/tome/data/general/objects/potions.lua @@ -20,12 +20,12 @@ newEntity{ define_as = "BASE_POTION", type = "potion", subtype="potion", - unided_name = "potion", id_by_type = true, + unided_name = _t"potion", id_by_type = true, display = "!", color=colors.WHITE, image="object/potion-0x0.png", use_sound = "actions/quaff", encumber = 0.2, stacking = true, acid_destroy = {{10,1}, {20,2}, {40,5}, {60,10}, {120,20}}, - desc = [[Magical potions can have wildly different effects, from healing to killing you -- beware! Most of them function better with a high Magic score.]], + desc = _t[[Magical potions can have wildly different effects, from healing to killing you -- beware! Most of them function better with a high Magic score.]], egos = "/data/general/objects/egos/potions.lua", egos_chance = resolvers.mbonus(10, 5), } diff --git a/game/modules/tome/data/general/objects/quest-artifacts.lua b/game/modules/tome/data/general/objects/quest-artifacts.lua index 359925c4b42d65e425b9e599d767c0722bfed9d1..eace9c003d60491f1b60523b7ea30255a8864a1e 100644 --- a/game/modules/tome/data/general/objects/quest-artifacts.lua +++ b/game/modules/tome/data/general/objects/quest-artifacts.lua @@ -26,7 +26,7 @@ newEntity{ define_as = "STAFF_ABSORPTION", slot = "MAINHAND", slot_forbid = "OFFHAND", type = "weapon", subtype="staff", - unided_name = "dark runed staff", + unided_name = _t"dark runed staff", name = "Staff of Absorption", flavor_name = "magestaff", level_range = {30, 30}, @@ -35,7 +35,7 @@ newEntity{ define_as = "STAFF_ABSORPTION", encumber = 7, auto_pickup = 1, plot = true, quest = true, - desc = [[Carved with runes of power, this staff seems to have been made long ago, yet it bears no signs of tarnish. + desc = _t[[Carved with runes of power, this staff seems to have been made long ago, yet it bears no signs of tarnish. Light around it seems to dim and you can feel its tremendous power simply by touching it.]], require = { stat = { mag=40 }, }, @@ -53,7 +53,7 @@ Light around it seems to dim and you can feel its tremendous power simply by tou }, max_power = 1000, power_regen = 1, - use_power = { name = "absorb energies", power = 1000, + use_power = { name = _t"absorb energies", power = 1000, no_npc_use = true, use = function(self, who) game.logPlayer(who, "This power seems too much to wield; you fear it might absorb YOU.") @@ -79,19 +79,19 @@ newEntity{ define_as = "ORB_MANY_WAYS", power_source = {unknown=true}, unique = true, quest=true, type = "orb", subtype="orb", - unided_name = "swirling orb", + unided_name = _t"swirling orb", name = "Orb of Many Ways", level_range = {30, 30}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_many_ways.png", encumber = 1, plot = true, quest = true, - desc = [[The orb projects images of distant places, some that seem to be not of this world, switching rapidly. + desc = _t[[The orb projects images of distant places, some that seem to be not of this world, switching rapidly. If used near a portal it could probably activate it.]], auto_hotkey = 1, max_power = 30, power_regen = 1, - use_power = { name = "activate a portal", power = 10, + use_power = { name = _t"activate a portal", power = 10, no_npc_use = true, use = function(self, who) self:identify(true) @@ -119,17 +119,17 @@ newEntity{ define_as = "ORB_MANY_WAYS_DEMON", power_source = {unknown=true}, unique = "Orb of Many Ways Demon", quest=true, no_unique_lore=true, type = "orb", subtype="orb", - unided_name = "swirling orb", identified=true, + unided_name = _t"swirling orb", identified=true, name = "Orb of Many Ways", level_range = {30, 30}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_many_ways.png", encumber = 1, plot = true, quest = true, - desc = [[The orb projects images of distant places, some that seem to be not of this world, switching rapidly. + desc = _t[[The orb projects images of distant places, some that seem to be not of this world, switching rapidly. If used near a portal it could probably activate it.]], max_power = 30, power_regen = 1, - use_power = { name = "activate a portal", power = 10, + use_power = { name = _t"activate a portal", power = 10, no_npc_use = true, use = function(self, who) local g = game.level.map(who.x, who.y, game.level.map.TERRAIN) @@ -138,12 +138,12 @@ If used near a portal it could probably activate it.]], who:useOrbPortal{ change_level = 1, change_zone = "demon-plane", - message = "#VIOLET#The world twists sickeningly around you and you find yourself someplace unexpected! It felt nothing like your previous uses of the Orb of Many Ways. Tannen must have switched the Orb out for a fake!", + message = _t"#VIOLET#The world twists sickeningly around you and you find yourself someplace unexpected! It felt nothing like your previous uses of the Orb of Many Ways. Tannen must have switched the Orb out for a fake!", on_use = function(self, who) who:setQuestStatus("east-portal", engine.Quest.COMPLETED, "tricked-demon") local orb = who:findInAllInventoriesBy("define_as", "ORB_MANY_WAYS_DEMON") if orb then orb.name = "Demonic Orb of Many Ways" end - require("engine.ui.Dialog"):simplePopup("Demonic Orb of Many Ways", "It felt nothing like your previous uses of the Orb of Many Ways. Tannen must have switched the Orb out for a fake!") + require("engine.ui.Dialog"):simplePopup(_t"Demonic Orb of Many Ways", _t"It felt nothing like your previous uses of the Orb of Many Ways. Tannen must have switched the Orb out for a fake!") end, } else @@ -168,13 +168,13 @@ newEntity{ define_as = "ORB_UNDEATH", power_source = {unknown=true}, unique = true, quest=true, type = "orb", subtype="orb", - unided_name = "orb of command", + unided_name = _t"orb of command", name = "Orb of Undeath (Orb of Command)", level_range = {50, 50}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_undeath.png", encumber = 1, plot = true, quest = true, - desc = [[Dark visions fill your mind as you lift the orb. It is cold to the touch.]], + desc = _t[[Dark visions fill your mind as you lift the orb. It is cold to the touch.]], on_drop = function(self, who) if who == game.player then @@ -184,7 +184,7 @@ newEntity{ define_as = "ORB_UNDEATH", end, max_power = 1, power_regen = 1, - use_power = { name = "use the orb", power = 1, + use_power = { name = _t"use the orb", power = 1, no_npc_use = true, use = function(self, who) who:useCommandOrb(self) return {id=true, used=true} end }, @@ -199,13 +199,13 @@ newEntity{ define_as = "ORB_DRAGON", power_source = {unknown=true}, unique = true, quest=true, type = "orb", subtype="orb", - unided_name = "orb of command", + unided_name = _t"orb of command", name = "Dragon Orb (Orb of Command)", level_range = {50, 50}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_dragon.png", encumber = 1, plot = true, quest = true, - desc = [[This orb is warm to the touch.]], + desc = _t[[This orb is warm to the touch.]], on_drop = function(self, who) if who == game.player then @@ -215,7 +215,7 @@ newEntity{ define_as = "ORB_DRAGON", end, max_power = 1, power_regen = 1, - use_power = { name = "use the orb", power = 1, + use_power = { name = _t"use the orb", power = 1, no_npc_use = true, use = function(self, who) who:useCommandOrb(self) return {id=true, used=true} end }, @@ -230,13 +230,13 @@ newEntity{ define_as = "ORB_ELEMENTS", power_source = {unknown=true}, unique = true, quest=true, type = "orb", subtype="orb", - unided_name = "orb of command", + unided_name = _t"orb of command", name = "Elemental Orb (Orb of Command)", level_range = {50, 50}, display = "*", color=colors.VIOLET, image = "object/artifact/elemental_orb.png", encumber = 1, plot = true, quest = true, - desc = [[Flames swirl on the icy surface of this orb.]], + desc = _t[[Flames swirl on the icy surface of this orb.]], on_drop = function(self, who) if who == game.player then @@ -246,7 +246,7 @@ newEntity{ define_as = "ORB_ELEMENTS", end, max_power = 1, power_regen = 1, - use_power = { name = "use the orb", power = 1, + use_power = { name = _t"use the orb", power = 1, no_npc_use = true, use = function(self, who) who:useCommandOrb(self) return {id=true, used=true} end }, @@ -261,13 +261,13 @@ newEntity{ define_as = "ORB_DESTRUCTION", power_source = {unknown=true}, unique = true, quest=true, type = "orb", subtype="orb", - unided_name = "orb of command", + unided_name = _t"orb of command", name = "Orb of Destruction (Orb of Command)", level_range = {50, 50}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_destruction.png", encumber = 1, plot = true, quest = true, - desc = [[Visions of death and destruction fill your mind as you lift this orb.]], + desc = _t[[Visions of death and destruction fill your mind as you lift this orb.]], on_drop = function(self, who) if who == game.player then @@ -277,7 +277,7 @@ newEntity{ define_as = "ORB_DESTRUCTION", end, max_power = 1, power_regen = 1, - use_power = { name = "use the orb", power = 1, + use_power = { name = _t"use the orb", power = 1, no_npc_use = true, use = function(self, who) who:useCommandOrb(self) return {id=true, used=true} end }, @@ -292,12 +292,12 @@ newEntity{ define_as = "ORB_SCRYING", power_source = {unknown=true}, unique = true, quest=true, no_unique_lore=true, type = "orb", subtype="orb", - unided_name = "orb of scrying", + unided_name = _t"orb of scrying", name = "Scrying Orb", display = "*", color=colors.VIOLET, image = "object/artifact/orb_scrying.png", encumber = 1, plot = true, quest = true, - desc = [[This orb will automatically identify items you find.]], + desc = _t[[This orb will automatically identify items you find.]], on_drop = function(self, who) if who == game.player then @@ -314,16 +314,16 @@ newEntity{ define_as = "ORB_SCRYING", newEntity{ base = "BASE_ROD", power_source = {unknown=true, arcane=false}, define_as = "ROD_OF_RECALL", - unided_name = "unstable rod", identified=true, force_lore_artifact=true, + unided_name = _t"unstable rod", identified=true, force_lore_artifact=true, name = "Rod of Recall", color=colors.LIGHT_BLUE, unique=true, image = "object/artifact/rod_of_recall.png", - desc = [[This rod is made entirely of voratun, infused with raw magical energies that can bend space itself. + desc = _t[[This rod is made entirely of voratun, infused with raw magical energies that can bend space itself. You have heard of such items before. They are very useful to adventurers, allowing faster travel.]], cost = 0, quest=true, auto_hotkey = 1, max_power = 400, power_regen = 1, - use_power = { name = "recall the user to the worldmap after 40 turns", power = 202, + use_power = { name = _t"recall the user to the worldmap after 40 turns", power = 202, no_npc_use = true, use = function(self, who) if who:hasEffect(who.EFF_RECALL) then @@ -337,7 +337,7 @@ You have heard of such items before. They are very useful to adventurers, allowi game.logPlayer(who, "Space around you starts to dissolve...") return {id=true, used=true} elseif game.zone.force_farportal_recall then - require("engine.ui.Dialog"):yesnoLongPopup("Force a recall", "The Fortress Shadow warned you that trying to force a recall without finding the portal back could break the exploratory farportal forever.", 500, function(ret) + require("engine.ui.Dialog"):yesnoLongPopup(_t"Force a recall", _t"The Fortress Shadow warned you that trying to force a recall without finding the portal back could break the exploratory farportal forever.", 500, function(ret) if not ret then who:setEffect(who.EFF_RECALL, 40, { where = self.shertul_fortress and "shertul-fortress" or nil, allow_override=true }) game.logPlayer(who, "Space around you starts to dissolve...") @@ -345,7 +345,7 @@ You have heard of such items before. They are very useful to adventurers, allowi who:hasQuest("shertul-fortress"):break_farportal() end end - end, "Cancel", "Recall", true) + end, _t"Cancel", _t"Recall", true) return {id=true, used=true} end end @@ -363,7 +363,7 @@ You have heard of such items before. They are very useful to adventurers, allowi on_pickup = function(self, who) if who == game.player then - require("engine.ui.Dialog"):simplePopup("Rod of Recall", "You found a Rod of Recall. You can use it to quickly get out of your current zone and return to the worldmap.") + require("engine.ui.Dialog"):simplePopup(_t"Rod of Recall", _t"You found a Rod of Recall. You can use it to quickly get out of your current zone and return to the worldmap.") end end, } @@ -375,7 +375,7 @@ newEntity{ base = "BASE_ROD", add_name = false, identified=true, force_lore_artifact=true, name = "Transmogrification Chest", display = '~', color=colors.GOLD, unique=true, image = "object/chest4.png", - desc = [[This chest is an extension of old Sher'tul places of power. Any items dropped inside are transported to an other place, processed and destroyed to extract energy. + desc = _t[[This chest is an extension of old Sher'tul places of power. Any items dropped inside are transported to an other place, processed and destroyed to extract energy. The byproduct of this effect is the creation of gold, which is useless to process, so it is sent back to you. When you possess the chest all items you walk upon will automatically be put inside and transmogrified when you leave the level. @@ -388,7 +388,7 @@ Items in the chest will not encumber you.]], }, max_power = 1000, power_regen = 1, - use_power = { name = "transmogrify all the items in your chest at once (also done automatically when you change level)", power = 0, + use_power = { name = _t"transmogrify all the items in your chest at once (also done automatically when you change level)", power = 0, no_npc_use = true, use = function(self, who) if not who.player then return {id=true, used=false} end @@ -402,14 +402,14 @@ Items in the chest will not encumber you.]], local floor = game.level.map:getObjectTotal(who.x, who.y) if floor == 0 then if who:attr("has_transmo") >= 2 then - require("engine.ui.Dialog"):yesnoPopup("Transmogrification Chest", "Make the Transmogrification Chest the default item's destroyer?", function(ret) if ret then + require("engine.ui.Dialog"):yesnoPopup(_t"Transmogrification Chest", _t"Make the Transmogrification Chest the default item's destroyer?", function(ret) if ret then who.default_transmo_source = self end end) else - require("engine.ui.Dialog"):simplePopup("Transmogrification Chest", "You do not have any items to transmogrify in your chest or on the floor.") + require("engine.ui.Dialog"):simplePopup(_t"Transmogrification Chest", _t"You do not have any items to transmogrify in your chest or on the floor.") end else - require("engine.ui.Dialog"):yesnoPopup("Transmogrification Chest", "Transmogrify all "..floor.." item(s) on the floor?", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Transmogrification Chest", ("Transmogrify all %s item(s) on the floor?"):tformat(floor), function(ret) if not ret then return end for i = floor, 1, -1 do local o = game.level.map:getObject(who.x, who.y, i) @@ -423,7 +423,7 @@ Items in the chest will not encumber you.]], return {id=true, used=true} end - require("engine.ui.Dialog"):yesnoPopup("Transmogrification Chest", "Transmogrify all "..nb.." item(s) in your chest?", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Transmogrification Chest", ("Transmogrify all %s item(s) in your chest?"):tformat(nb), function(ret) if not ret then return end for i = #inven, 1, -1 do local o = inven[i] @@ -438,7 +438,7 @@ Items in the chest will not encumber you.]], on_pickup = function(self, who) who.default_transmo_source = self - require("engine.ui.Dialog"):simpleLongPopup("Transmogrification Chest", [[This chest is an extension of old Sher'Tul places of power. Any items dropped inside is transported to an other place, processed and destroyed to extract energy. + require("engine.ui.Dialog"):simpleLongPopup(_t"Transmogrification Chest", _t[[This chest is an extension of old Sher'Tul places of power. Any items dropped inside is transported to an other place, processed and destroyed to extract energy. The byproduct of this effect is the creation of gold, which is useless to process, so it is sent back to you. When you possess the chest all items you walk upon will automatically be put inside and transmogrified when you leave the level. @@ -457,8 +457,8 @@ Items in the chest will not encumber you.]], 500) newEntity{ base = "BASE_CLOTH_ARMOR", define_as = "FUN_BIKINI", unique = true, name = "Bikini", color = colors.RED, image = "object/artifact/bikini.png", - unided_name = "tiny piece of cloth", - desc = [[Revealing, pink, fun. + unided_name = _t"tiny piece of cloth", + desc = _t[[Revealing, pink, fun. #{bold}#If you never take it off and win you will gain a neat achievement and bragging rights!#{normal}#]], level_range = {1, 1}, rarity = false, @@ -466,7 +466,7 @@ newEntity{ base = "BASE_CLOTH_ARMOR", define_as = "FUN_BIKINI", material_level = 1, moddable_tile = "special/bikini_01", moddable_tile_big = true, - special_desc = function(self) return "You have never taken it off." end, + special_desc = function(self) return _t"You have never taken it off." end, on_win = function(self) world:gainAchievement("WIN_BIKINI", game.player) end, @@ -482,8 +482,8 @@ newEntity{ base = "BASE_CLOTH_ARMOR", define_as = "FUN_BIKINI", newEntity{ base = "BASE_CLOTH_ARMOR", define_as = "FUN_MANKINI", unique = true, name = "Mankini", color = colors.RED, image = "object/artifact/mankini.png", - unided_name = "tiny piece of cloth", - desc = [[Revealing, green, fun. + unided_name = _t"tiny piece of cloth", + desc = _t[[Revealing, green, fun. #{bold}#If you never take it off and win you will gain a neat achievement and bragging rights!#{normal}#]], level_range = {1, 1}, rarity = false, @@ -491,7 +491,7 @@ newEntity{ base = "BASE_CLOTH_ARMOR", define_as = "FUN_MANKINI", material_level = 1, moddable_tile = "special/mankini_01", moddable_tile_big = true, - special_desc = function(self) return "You have never taken it off." end, + special_desc = function(self) return _t"You have never taken it off." end, on_win = function(self) world:gainAchievement("WIN_MANKINI", game.player) end, diff --git a/game/modules/tome/data/general/objects/rods.lua b/game/modules/tome/data/general/objects/rods.lua index 9f512a5154280fb9cad3d80b6333dc4f9e13e044..6fc005167df0ae4869badf0e4cb27ba7851b51ac 100644 --- a/game/modules/tome/data/general/objects/rods.lua +++ b/game/modules/tome/data/general/objects/rods.lua @@ -20,11 +20,11 @@ newEntity{ define_as = "BASE_ROD", type = "charm", subtype="rod", - unided_name = "rod", id_by_type = true, + unided_name = _t"rod", id_by_type = true, display = "-", color=colors.WHITE, image = resolvers.image_material("wand", "wood"), encumber = 2, rarity = 9, add_name = "#CHARGES#", use_sound = "talents/spell_generic", - desc = [[]], + desc = _t[[]], } diff --git a/game/modules/tome/data/general/objects/scrolls.lua b/game/modules/tome/data/general/objects/scrolls.lua index a84bf09054e5d51905350f22705a7a35abacad7a..31084159be892c62b21e574652e89438f0208a1d 100644 --- a/game/modules/tome/data/general/objects/scrolls.lua +++ b/game/modules/tome/data/general/objects/scrolls.lua @@ -20,7 +20,7 @@ newEntity{ define_as = "BASE_SCROLL", type = "scroll", subtype="scroll", - unided_name = "scroll", id_by_type = true, + unided_name = _t"scroll", id_by_type = true, display = "?", color=colors.WHITE, image="object/scroll.png", encumber = 0.1, stacking = true, @@ -28,26 +28,26 @@ newEntity{ use_no_blind = true, use_no_silence = true, fire_destroy = {{10,1}, {20,2}, {40,5}, {60,10}, {120,20}}, - desc = [[Magical scrolls can have wildly different effects!]], + desc = _t[[Magical scrolls can have wildly different effects!]], egos = "/data/general/objects/egos/scrolls.lua", egos_chance = resolvers.mbonus(10, 5), } newEntity{ define_as = "BASE_INFUSION", type = "scroll", subtype="infusion", add_name = " (#INSCRIPTION#)", - unided_name = "infusion", id_by_type = true, + unided_name = _t"infusion", id_by_type = true, display = "?", color=colors.LIGHT_GREEN, image="object/rune_green.png", encumber = 0.1, use_sound = "actions/read", use_no_blind = true, use_no_silence = true, fire_destroy = {{100,1}, {200,2}, {400,5}, {600,10}, {1200,20}}, - desc = [[Natural infusions may be grafted onto your body, granting you an on-demand nature talent.]], + desc = _t[[Natural infusions may be grafted onto your body, granting you an on-demand nature talent.]], egos = "/data/general/objects/egos/infusions.lua", egos_chance = resolvers.mbonus(30, 5), material_level_min_only = true, power_source = {nature=true}, - use_simple = { name="inscribe your skin with the infusion", use = function(self, who, inven, item) + use_simple = { name=_t"inscribe your skin with the infusion", use = function(self, who, inven, item) if who:setInscription(nil, self.inscription_talent, self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then return {used=true, id=true, destroy=true} end @@ -57,19 +57,19 @@ newEntity{ newEntity{ define_as = "BASE_RUNE", type = "scroll", subtype="rune", add_name = " (#INSCRIPTION#)", - unided_name = "rune", id_by_type = true, + unided_name = _t"rune", id_by_type = true, display = "?", color=colors.LIGHT_BLUE, image="object/rune_red.png", encumber = 0.1, use_sound = "actions/read", use_no_blind = true, use_no_silence = true, fire_destroy = {{10,1}, {20,2}, {40,5}, {60,10}, {120,20}}, - desc = [[Magical runes may be inscribed onto your body, granting you an on-demand spell talent.]], + desc = _t[[Magical runes may be inscribed onto your body, granting you an on-demand spell talent.]], egos = "/data/general/objects/egos/infusions.lua", egos_chance = resolvers.mbonus(30, 5), material_level_min_only = true, power_source = {arcane=true}, - use_simple = { name="inscribe your skin with the rune", use = function(self, who, inven, item) + use_simple = { name=_t"inscribe your skin with the rune", use = function(self, who, inven, item) if who:setInscription(nil, self.inscription_talent, self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then return {used=true, id=true, destroy=true} end @@ -79,18 +79,18 @@ newEntity{ newEntity{ define_as = "BASE_TAINT", type = "scroll", subtype="taint", add_name = " (#INSCRIPTION#)", - unided_name = "taint", id_by_type = true, + unided_name = _t"taint", id_by_type = true, display = "?", color=colors.LIGHT_BLUE, image="object/rune_yellow.png", encumber = 0.1, use_sound = "actions/read", use_no_blind = true, use_no_silence = true, fire_destroy = {{10,1}, {20,2}, {40,5}, {60,10}, {120,20}}, - desc = [[Corrupted taints may be inscribed onto your body, granting you an on-demand ability.]], + desc = _t[[Corrupted taints may be inscribed onto your body, granting you an on-demand ability.]], egos = "/data/general/objects/egos/infusions.lua", egos_chance = resolvers.mbonus(30, 5), power_source = {arcane=true}, - use_simple = { name="inscribe your skin with the taint", use = function(self, who, inven, item) + use_simple = { name=_t"inscribe your skin with the taint", use = function(self, who, inven, item) if who:setInscription(nil, self.inscription_talent, self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then return {used=true, id=true, destroy=true} end @@ -100,12 +100,12 @@ newEntity{ newEntity{ define_as = "BASE_LORE", type = "lore", subtype="lore", not_in_stores=true, no_unique_lore=true, - unided_name = "scroll", identified=true, + unided_name = _t"scroll", identified=true, display = "?", color=colors.ANTIQUE_WHITE, image="object/scroll-lore.png", encumber = 0, checkFilter = function(self) if self.lore and game.party.lore_known and game.party.lore_known[self.lore] then print('[LORE] refusing', self.lore) return false else return true end end, - desc = [[This parchment contains some lore.]], - use_simple = { name="read it", use = function(self, who, inven, item) + desc = _t[[This parchment contains some lore.]], + use_simple = { name=_t"read it", use = function(self, who, inven, item) game.party:learnLore(self.lore) return {used=true, id=true, destroy=true} end} @@ -114,12 +114,12 @@ newEntity{ newEntity{ define_as = "BASE_LORE_RANDOM", type = "lore", subtype="lore", not_in_stores=true, no_unique_lore=true, - unided_name = "scroll", identified=true, + unided_name = _t"scroll", identified=true, display = "?", color=colors.ANTIQUE_WHITE, image="object/scroll.png", encumber = 0, checkFilter = function(self) if self.lore and game.party.lore_known and game.party.lore_known[self.lore] then print('[LORE] refusing', self.lore) return false else return true end end, - desc = [[This parchment contains some lore.]], - use_simple = { name="read it", use = function(self, who, inven, item) + desc = _t[[This parchment contains some lore.]], + use_simple = { name=_t"read it", use = function(self, who, inven, item) game.party:learnLore(self.lore) return {used=true, id=true, destroy=true} end} diff --git a/game/modules/tome/data/general/objects/shields.lua b/game/modules/tome/data/general/objects/shields.lua index ce989be700ea20ef1fd0f04e328a54f88f557cfc..13de9aa342879295ba0b4c897b21ebd55567c12d 100644 --- a/game/modules/tome/data/general/objects/shields.lua +++ b/game/modules/tome/data/general/objects/shields.lua @@ -29,7 +29,7 @@ newEntity{ rarity = 5, encumber = 7, metallic = true, - desc = [[Handheld deflection devices.]], + desc = _t[[Handheld deflection devices.]], require = { flag = { "allow_wear_shield" }, }, randart_able = "/data/general/objects/random-artifacts/shields.lua", special_combat = { talented="shield", accuracy_effect="staff", damrange = 1.2, no_offhand_penalty=true }, diff --git a/game/modules/tome/data/general/objects/slings.lua b/game/modules/tome/data/general/objects/slings.lua index da887b7b5207309cc50297c14e51d2514416d319..0a678e00e6c31225b0813fab03863501c8785882 100644 --- a/game/modules/tome/data/general/objects/slings.lua +++ b/game/modules/tome/data/general/objects/slings.lua @@ -32,7 +32,7 @@ newEntity{ archery = "sling", require = { talent = { Talents.T_SHOOT }, }, proj_image = resolvers.image_material("shot_s", "metal"), - desc = [[Slings are used to hurl stones or metal shots at your foes.]], + desc = _t[[Slings are used to hurl stones or metal shots at your foes.]], randart_able = "/data/general/objects/random-artifacts/ranged.lua", egos = "/data/general/objects/egos/sling.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } @@ -107,7 +107,7 @@ newEntity{ combat = { talented = "sling", accuracy_effect = "mace", damrange = 1.2}, proj_image = resolvers.image_material("shot_s", "metal"), archery_ammo = "sling", - desc = [[Shots are used with slings to pummel your foes to death.]], + desc = _t[[Shots are used with slings to pummel your foes to death.]], randart_able = "/data/general/objects/random-artifacts/ammo.lua", egos = "/data/general/objects/egos/ammo.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, resolvers.shooter_capacity(), diff --git a/game/modules/tome/data/general/objects/special-artifacts.lua b/game/modules/tome/data/general/objects/special-artifacts.lua index 245992947f1f229589832f2fd7fc5321361badb8..3efa7dbb8241181aa87a2ea7f3d4cdb6b4101fa3 100644 --- a/game/modules/tome/data/general/objects/special-artifacts.lua +++ b/game/modules/tome/data/general/objects/special-artifacts.lua @@ -28,11 +28,11 @@ newEntity{ base = "BASE_STAFF", define_as = "TELOS_SPIRE", power_source = {arcane=true}, unique = true, name = "Telos Spire of Power", image = "object/artifact/telos_spire_of_power.png", - unided_name = "pulsing staff", + unided_name = _t"pulsing staff", level_range = {37, 50}, color=colors.VIOLET, rarity = false, - desc = [[Telos was an extremely powerful mage during the Age of Dusk, hated by his peers and feared by the common folk; he was hunted for a long while. He finally fell from his place of power, Telmur, but his spirit still lingers.]], + desc = _t[[Telos was an extremely powerful mage during the Age of Dusk, hated by his peers and feared by the common folk; he was hunted for a long while. He finally fell from his place of power, Telmur, but his spirit still lingers.]], cost = 400, material_level = 5, plot = true, @@ -67,7 +67,7 @@ newEntity{ base = "BASE_STAFF", define_as = "TELOS_SPIRE", learn_talent = {[Talents.T_COMMAND_STAFF] = 1,}, }, max_power = 15, power_regen = 1, - use_power = { name = "turn into a corrupted losgoroth (poison, disease, cut and confusion immune; converts half damage into life drain; does not require breath) for 10 turns", + use_power = { name = _t"turn into a corrupted losgoroth (poison, disease, cut and confusion immune; converts half damage into life drain; does not require breath) for 10 turns", power = 15, tactical = {BUFF = 2, HEAL = 2, DEFEND = function(who, t, aitarget) -- if the target can debuff us with things this item can prevent, prepare @@ -96,7 +96,7 @@ newEntity{ base = "BASE_STAFF", define_as = "TELOS_SPIRE", end}, on_pre_use_ai = function(self, who) return not who:hasEffect(who.EFF_CORRUPT_LOSGOROTH_FORM) end, use = function(self, who) - game.logSeen(who, "%s brandishes %s %s, turning into a corrupted losgoroth!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name =true})) + game.logSeen(who, "%s brandishes %s %s, turning into a corrupted losgoroth!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name =true})) who:setEffect(who.EFF_CORRUPT_LOSGOROTH_FORM, 10, {}) return {id=true, used=true} end diff --git a/game/modules/tome/data/general/objects/staves.lua b/game/modules/tome/data/general/objects/staves.lua index c884191ae429cb714b2168551622fba204761e9d..462e1303fa35b7115ed9da7ff0414b149b7912ab 100644 --- a/game/modules/tome/data/general/objects/staves.lua +++ b/game/modules/tome/data/general/objects/staves.lua @@ -39,7 +39,7 @@ newEntity{ sound = {"actions/melee", pitch=0.6, vol=1.2}, sound_miss = {"actions/melee", pitch=0.6, vol=1.2}, }, command_staff = {inc_damage = 1,}, - desc = [[Staves designed for wielders of magic, by the greats of the art.]], + desc = _t[[Staves designed for wielders of magic, by the greats of the art.]], egos = "/data/general/objects/egos/staves.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/swords.lua b/game/modules/tome/data/general/objects/swords.lua index 2c65b289ca41c89e28575abefcdc083db94b9e36..2c75179e4c1bfc4c89f51011517b9d3330febcce 100644 --- a/game/modules/tome/data/general/objects/swords.lua +++ b/game/modules/tome/data/general/objects/swords.lua @@ -28,7 +28,7 @@ newEntity{ rarity = 5, metallic = true, combat = { talented = "sword", damrange = 1.4, physspeed = 1, sound = {"actions/melee", pitch=0.6, vol=1.2}, sound_miss = {"actions/melee", pitch=0.6, vol=1.2}}, - desc = [[Sharp, long, and deadly.]], + desc = _t[[Sharp, long, and deadly.]], randart_able = "/data/general/objects/random-artifacts/melee.lua", egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/torques.lua b/game/modules/tome/data/general/objects/torques.lua index a6d7b6f56501c4812b4be75479c33a024422f5a7..e68b4c58fdbd49072bac2500447dbd9aea719242 100644 --- a/game/modules/tome/data/general/objects/torques.lua +++ b/game/modules/tome/data/general/objects/torques.lua @@ -21,13 +21,13 @@ newEntity{ define_as = "BASE_TORQUE", slot = "TOOL", type = "charm", subtype="torque", - unided_name = "torque", id_by_type = true, + unided_name = _t"torque", id_by_type = true, display = "-", color=colors.WHITE, image = resolvers.image_material("torque", "metal"), encumber = 2, rarity = 12, add_name = "#CHARM# #CHARGES#", use_sound = "talents/spell_generic", - desc = [[Torques are made by powerful psionics to store psionic powers.]], + desc = _t[[Torques are made by powerful psionics to store psionic powers.]], egos = "/data/general/objects/egos/torques.lua", egos_chance = { prefix=resolvers.mbonus(20, 5), suffix=resolvers.mbonus(20, 5) }, addons = "/data/general/objects/egos/torques-powers.lua", power_source = {psionic=true}, diff --git a/game/modules/tome/data/general/objects/totems.lua b/game/modules/tome/data/general/objects/totems.lua index 8db2f7b877234ab09b29964956570c1319ac1bd1..b1a1ba27542f89a4f1c7dc0771c8d8d05626735c 100644 --- a/game/modules/tome/data/general/objects/totems.lua +++ b/game/modules/tome/data/general/objects/totems.lua @@ -21,13 +21,13 @@ newEntity{ define_as = "BASE_TOTEM", slot = "TOOL", type = "charm", subtype="totem", - unided_name = "totem", id_by_type = true, + unided_name = _t"totem", id_by_type = true, display = "-", color=colors.WHITE, image = resolvers.image_material("totem", "wood"), encumber = 2, rarity = 12, add_name = "#CHARM# #CHARGES#", use_sound = "talents/spell_generic", - desc = [[Natural totems are made by powerful wilders to store nature power.]], + desc = _t[[Natural totems are made by powerful wilders to store nature power.]], egos = "/data/general/objects/egos/totems.lua", egos_chance = { prefix=resolvers.mbonus(20, 5), suffix=resolvers.mbonus(20, 5) }, addons = "/data/general/objects/egos/totems-powers.lua", power_source = {nature=true}, diff --git a/game/modules/tome/data/general/objects/wands.lua b/game/modules/tome/data/general/objects/wands.lua index 004e103512e3057f6df0b17ca69deff2c5d3fc49..30edb3863198b17fdee74727398869055d27d0a7 100644 --- a/game/modules/tome/data/general/objects/wands.lua +++ b/game/modules/tome/data/general/objects/wands.lua @@ -21,13 +21,13 @@ newEntity{ define_as = "BASE_WAND", slot = "TOOL", type = "charm", subtype="wand", - unided_name = "wand", id_by_type = true, + unided_name = _t"wand", id_by_type = true, display = "-", color=colors.WHITE, image = resolvers.image_material("wand", "wood"), encumber = 2, rarity = 12, add_name = "#CHARM# #CHARGES#", use_sound = "talents/spell_generic", - desc = [[Magical wands are made by powerful Alchemists and Archmagi to store spells. Anybody can use them to release the spells.]], + desc = _t[[Magical wands are made by powerful Alchemists and Archmagi to store spells. Anybody can use them to release the spells.]], egos = "/data/general/objects/egos/wands.lua", egos_chance = { prefix=resolvers.mbonus(20, 5), }, addons = "/data/general/objects/egos/wands-powers.lua", power_source = {arcane=true}, diff --git a/game/modules/tome/data/general/objects/whips.lua b/game/modules/tome/data/general/objects/whips.lua index 761e85b68d113f2c1d4e81104a8b4cd14a32464b..34a75416c06a76e792d7da82eee00e78d302ba2d 100644 --- a/game/modules/tome/data/general/objects/whips.lua +++ b/game/modules/tome/data/general/objects/whips.lua @@ -28,7 +28,7 @@ newEntity{ rarity = 5, metallic = true, combat = { talented = "whip", accuracy_effect = "sword", damrange = 1.1, physspeed = 0.8, sound = "actions/whip_hit", sound_miss = "actions/whip_miss",}, - desc = [[Sharp, long and deadly.]], + desc = _t[[Sharp, long and deadly.]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/wizard-hat.lua b/game/modules/tome/data/general/objects/wizard-hat.lua index bf85b4586cb05839d8199c70cefe1bf8cfdb6904..aceacdcce52d7bf895d5d839116f511956259fb3 100644 --- a/game/modules/tome/data/general/objects/wizard-hat.lua +++ b/game/modules/tome/data/general/objects/wizard-hat.lua @@ -26,7 +26,7 @@ newEntity{ moddable_tile = resolvers.moddable_tile("wizard_hat"), encumber = 2, rarity = 6, - desc = [[A pointy cloth hat, very wizardly...]], + desc = _t[[A pointy cloth hat, very wizardly...]], randart_able = "/data/general/objects/random-artifacts/generic.lua", egos = "/data/general/objects/egos/wizard-hat.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } diff --git a/game/modules/tome/data/general/objects/world-artifacts-far-east.lua b/game/modules/tome/data/general/objects/world-artifacts-far-east.lua index d6fa5648b2cf8bc793f503b36fb069d12a2f035e..e19d631467333cc96ba3b60a4b5a94b2a9060158 100644 --- a/game/modules/tome/data/general/objects/world-artifacts-far-east.lua +++ b/game/modules/tome/data/general/objects/world-artifacts-far-east.lua @@ -24,11 +24,11 @@ local Talents = require "engine.interface.ActorTalents" newEntity{ base = "BASE_GEM", define_as = "ANCIENT_STORM_SAPHIR", power_source = {unknown=true}, unique = true, - unided_name = "strange sapphire", + unided_name = _t"strange sapphire", name = "Ancient Storm Sapphire", subtype = "blue", image = "object/ancient_storm_saphir.png", color = colors.ROYAL_BLUE, level_range = {30, 50}, - desc = [[This seemingly normal sapphire seems to be charged with the destructive power of a raging storm.]], + desc = _t[[This seemingly normal sapphire seems to be charged with the destructive power of a raging storm.]], rarity = 300, cost = 0, material_level = 4, @@ -45,7 +45,7 @@ newEntity{ base = "BASE_SCROLL", define_as = "JEWELER_SUMMON", subtype="tome", n fire_proof = true, max_power = 1, power_regen = 1, - use_power = { name = "summon Limmir the jeweler at the center of the lake of the moon", power = 1, + use_power = { name = _t"summon Limmir the jeweler at the center of the lake of the moon", power = 1, use = function(self, who) who:hasQuest("master-jeweler"):summon_limmir(who) return {id=true, used=true} end }, } @@ -54,13 +54,13 @@ newEntity{ base = "BASE_AMULET", power_source = {arcane=true}, unique = true, name = "Pendant of the Sun and Moons", color = colors.LIGHT_SLATE, image = "object/artifact/amulet_pendant_of_sun_and_the_moon.png", - unided_name = "a gray and gold pendant", - desc = [[This small pendant depicts a hematite moon eclipsing a golden sun and according to legend was worn by one of the Sunwall's founders.]], + unided_name = _t"a gray and gold pendant", + desc = _t[[This small pendant depicts a hematite moon eclipsing a golden sun and according to legend was worn by one of the Sunwall's founders.]], level_range = {35, 45}, rarity = 300, cost = 200, material_level = 4, - special_desc = function(self) return "All your damage is converted and split into light and darkness." end, + special_desc = function(self) return _t"All your damage is converted and split into light and darkness." end, wielder = { twilight_mastery = 0.5, combat_spellpower = 8, @@ -77,11 +77,11 @@ newEntity{ base = "BASE_AMULET", newEntity{ base = "BASE_SHIELD", define_as = "SHIELD_UNSETTING", power_source = {arcane=true}, unique = true, - unided_name = "shimmering gold shield", + unided_name = _t"shimmering gold shield", name = "Unsetting Sun", image = "object/artifact/shield_unsetting_sun.png", moddable_tile = "special/%s_unsetting_sun", moddable_tile_big = true, - desc = [[When Elmio Panason, captain of the Vanguard, first sought shelter for his shipwrecked crew, he reflected the last rays of the setting sun off his shield. Where the beam hit they rested and built the settlement that would become the Sunwall. In the dark days that followed the shield became a symbol of hope for a better future.]], + desc = _t[[When Elmio Panason, captain of the Vanguard, first sought shelter for his shipwrecked crew, he reflected the last rays of the setting sun off his shield. Where the beam hit they rested and built the settlement that would become the Sunwall. In the dark days that followed the shield became a symbol of hope for a better future.]], color = colors.YELLOW, rarity = 300, level_range = {35, 45}, @@ -107,7 +107,7 @@ newEntity{ base = "BASE_SHIELD", define_as = "SHIELD_UNSETTING", }, set_list = { {"define_as","SWORD_DAWN"} }, set_desc = { - dawn = "Glows brightly in the light of dawn.", + dawn = _t"Glows brightly in the light of dawn.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","life_regen"}, 5) @@ -122,8 +122,8 @@ newEntity{ base = "BASE_HEAVY_BOOTS", power_source = {arcane=true}, unique = true, name = "Scorched Boots", image = "object/artifact/scorched_boots.png", - unided_name = "pair of blackened boots", - desc = [[The master blood mage Ru'Khan was the first orc to experiment with the power of the Sher'Tul farportals in the Age of Pyre. However, that first experiment was not particularly successful, and after the explosion of energy all that could be found of Ru'Khan was a pair of scorched boots.]], + unided_name = _t"pair of blackened boots", + desc = _t[[The master blood mage Ru'Khan was the first orc to experiment with the power of the Sher'Tul farportals in the Age of Pyre. However, that first experiment was not particularly successful, and after the explosion of energy all that could be found of Ru'Khan was a pair of scorched boots.]], color = colors.DARK_GRAY, level_range = {30, 40}, rarity = 250, @@ -145,12 +145,12 @@ newEntity{ base = "BASE_HEAVY_BOOTS", newEntity{ base = "BASE_GEM", power_source = {arcane=true}, unique = true, - unided_name = "unearthly black stone", + unided_name = _t"unearthly black stone", name = "Goedalath Rock", subtype = "demonic", image = "object/artifact/goedalath_rock.png", define_as = 'GOEDALATH_ROCK', color = colors.PURPLE, level_range = {42, 50}, - desc = [[A small rock that seems from beyond this world, vibrating with a fierce energy. It feels warped and terrible and evil... and yet oh so powerful.]], + desc = _t[[A small rock that seems from beyond this world, vibrating with a fierce energy. It feels warped and terrible and evil... and yet oh so powerful.]], rarity = 300, cost = 300, material_level = 5, @@ -177,8 +177,8 @@ newEntity{ base = "BASE_GEM", }, on_pickup = function(self, who) if who == game.player then - who:runStop("evil touch") - who:restStop("evil touch") + who:runStop(_t"evil touch") + who:restStop(_t"evil touch") end end, color_attributes = {damage_type = 'SHADOWFLAME',},} @@ -187,8 +187,8 @@ newEntity{ base = "BASE_CLOAK", power_source = {arcane=true}, define_as = "THREADS_FATE", unique = true, name = "Threads of Fate", image = "object/artifact/cloak_threads_of_fate.png", - unided_name = "a shimmering white cloak", - desc = [[Untouched by the ravages of time, this fine spun white cloak appears to be crafted of an otherworldly material that shifts and shimmers in the light.]], + unided_name = _t"a shimmering white cloak", + desc = _t[[Untouched by the ravages of time, this fine spun white cloak appears to be crafted of an otherworldly material that shifts and shimmers in the light.]], level_range = {45, 50}, color = colors.WHITE, rarity = 500, @@ -223,13 +223,13 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "BLOODEDGE", power_source = {arcane=true}, unique = true, name = "Blood-Edge", image = "object/artifact/sword_blood_edge.png", - unided_name = "red crystalline sword", + unided_name = _t"red crystalline sword", moddable_tile = "special/%s_sword_blood_edge", moddable_tile_big = true, level_range = {36, 48}, color=colors.RED, rarity = 260, - desc = [[This deep red sword weeps blood continuously. It was born in the labs of the orcish corrupter Hurik, who sought to make a crystal that would house his soul after death. But his plans were disrupted by a band of sun paladins, and though most died purging his keep of dread minions, their leader Raasul fought through to Hurik's lab, sword in hand. There the two did battle, blade against blood magic, till both fell to the floor with weeping wounds. The orc with his last strength crawled towards his fashioned phylactery, hoping to save himself, but Raasul saw his plans and struck the crystal with his light-bathed sword. It shattered, and in the sudden impulse of energies the steel, crystal and blood were fused into one. + desc = _t[[This deep red sword weeps blood continuously. It was born in the labs of the orcish corrupter Hurik, who sought to make a crystal that would house his soul after death. But his plans were disrupted by a band of sun paladins, and though most died purging his keep of dread minions, their leader Raasul fought through to Hurik's lab, sword in hand. There the two did battle, blade against blood magic, till both fell to the floor with weeping wounds. The orc with his last strength crawled towards his fashioned phylactery, hoping to save himself, but Raasul saw his plans and struck the crystal with his light-bathed sword. It shattered, and in the sudden impulse of energies the steel, crystal and blood were fused into one. Now the broken fragments of Raasul's soul are trapped in this terrible artifact, his mind warped beyond all sanity by decades of imprisonment. Only the taste of blood calls him forth, his soul stealing the lifeblood of others to take on physical form again, that he may thrash and wail against the living.]], cost = 1000, require = { stat = { mag=20, str=32,}, }, @@ -255,7 +255,7 @@ Now the broken fragments of Raasul's soul are trapped in this terrible artifact, dammod = {str=1, mag=0.1}, convert_damage = {[DamageType.BLIGHT] = 50}, lifesteal=5, - special_on_hit = {desc="15% chance to animate a bleeding foe's blood", fct=function(combat, who, target) + special_on_hit = {desc=_t"15% chance to animate a bleeding foe's blood", fct=function(combat, who, target) if not rng.percent(15) then return end local cut = false @@ -277,9 +277,9 @@ Now the broken fragments of Raasul's soul are trapped in this terrible artifact, local m = NPC.new{ type = "undead", subtype = "blood", display = "L", - name = "animated blood", color=colors.RED, + name = _t"animated blood", color=colors.RED, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_horror_animated_blood.png", display_h=1, display_y=0}}}, - desc = "A haze of blood, vibrant and pulsing through the air, possessed by a warped and cracked soul. Every now and then a scream or wail of agony garbles through it, telling of the mindless suffering undergone by its possessor.", + desc = _t"A haze of blood, vibrant and pulsing through the air, possessed by a warped and cracked soul. Every now and then a scream or wail of agony garbles through it, telling of the mindless suffering undergone by its possessor.", body = { INVEN = 10, MAINHAND=1, OFFHAND=1, }, rank = 3, life_rating = 10, exp_worth = 0, @@ -322,13 +322,13 @@ Now the broken fragments of Raasul's soul are trapped in this terrible artifact, game.party:addMember(m, { control=false, type="summon", - title="Summon", + title=_t"Summon", orders = {target=true, leash=true, anchor=true, talents=true}, }) - game.logSeen(who, "#GOLD#As the blade touches %s's spilt blood, the blood rises, animated!", target.name:capitalize()) + game.logSeen(who, "#GOLD#As the blade touches %s's spilt blood, the blood rises, animated!", target:getName():capitalize()) if who:knowTalent(who.T_VIM_POOL) then - game.logSeen(who, "#GOLD#%s draws power from the spilt blood!", who.name:capitalize()) + game.logSeen(who, "#GOLD#%s draws power from the spilt blood!", who:getName():capitalize()) end end}, @@ -339,13 +339,13 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "SWORD_DAWN", power_source = {arcane=true}, unique = true, name = "Dawn's Blade", - unided_name = "shining longsword", + unided_name = _t"shining longsword", moddable_tile = "special/%s_dawn_blade", moddable_tile_big = true, level_range = {35, 42}, color=colors.YELLOW, image = "object/artifact/dawn_blade.png", rarity = 260, - desc = [[Said to have been forged in the earliest days of the Sunwall, this longsword shines with the light of daybreak, capable of banishing all shadows.]], + desc = _t[[Said to have been forged in the earliest days of the Sunwall, this longsword shines with the light of daybreak, capable of banishing all shadows.]], cost = 1000, require = { stat = { mag=18, str=35,}, }, material_level = 5, @@ -373,7 +373,7 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "SWORD_DAWN", }, max_power = 35, power_regen = 1, use_power = { - name = function(self, who) return ("invoke dawn, inflicting %0.2f light damage in radius %d (based on Magic) and lighting the area within radius %d"):format(engine.interface.ActorTalents.damDesc(who, engine.DamageType.LIGHT, self.use_power.damage(who)), self.use_power.radius, self.use_power.radius*2) end, + name = function(self, who) return ("invoke dawn, inflicting %0.2f light damage in radius %d (based on Magic) and lighting the area within radius %d"):tformat(engine.interface.ActorTalents.damDesc(who, engine.DamageType.LIGHT, self.use_power.damage(who)), self.use_power.radius, self.use_power.radius*2) end, power = 35, radius = 5, damage = function(who) return 75 + who:getMag()*2 end, @@ -384,7 +384,7 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "SWORD_DAWN", game.level.map:particleEmitter(who.x, who.y, blast.radius, "sunburst", {radius=blast.radius}) who:project({type="ball", range=0, radius=self.use_power.radius*2}, who.x, who.y, engine.DamageType.LITE, dam/2) game:playSoundNear(self, "talents/fireflash") - game.logSeen(who, "%s raises %s and sends out a burst of light!", who.name:capitalize(), self:getName()) + game.logSeen(who, "%s raises %s and sends out a burst of light!", who:getName():capitalize(), self:getName()) return {id=true, used=true} end }, @@ -409,7 +409,7 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "SWORD_DAWN", set_list = { {"define_as","SHIELD_UNSETTING"} }, set_desc = { - dawn = "If the sun doesn't set, dawn's power lasts forever.", + dawn = _t"If the sun doesn't set, dawn's power lasts forever.", }, on_set_complete = function(self, who) self:specialSetAdd({"combat","melee_project"}, {[engine.DamageType.LIGHT]=15, [engine.DamageType.FIRE]=15}) @@ -425,8 +425,8 @@ newEntity{ base = "BASE_AMULET", power_source = {arcane=true}, unique = true, name = "Zemekkys' Broken Hourglass", color = colors.WHITE, - unided_name = "a broken hourglass", image="object/artifact/amulet_zemekkys_broken_hourglass.png", - desc = [[This small broken hourglass hangs from a thin gold chain. The glass is cracked and the sand has long since escaped.]], + unided_name = _t"a broken hourglass", image="object/artifact/amulet_zemekkys_broken_hourglass.png", + desc = _t[[This small broken hourglass hangs from a thin gold chain. The glass is cracked and the sand has long since escaped.]], level_range = {30, 40}, rarity = 300, cost = 200, @@ -448,10 +448,10 @@ newEntity{ base = "BASE_KNIFE", define_as = "MANDIBLE_UNGOLMOR", power_source = {nature=true}, unique = true, name = "Mandible of Ungolmor", image = "object/artifact/mandible_of_ungolmor.png", - unided_name = "curved, serrated black dagger", + unided_name = _t"curved, serrated black dagger", moddable_tile = "special/%s_mandible_of_ungolmor", moddable_tile_big = true, - desc = [[This obsidian-crafted, curved blade is studded with the deadly fangs of the Ungolmor. It seems to drain light from the world around it.]], + desc = _t[[This obsidian-crafted, curved blade is studded with the deadly fangs of the Ungolmor. It seems to drain light from the world around it.]], level_range = {40, 50}, rarity = 270, require = { stat = { cun=38 }, }, @@ -464,7 +464,7 @@ newEntity{ base = "BASE_KNIFE", define_as = "MANDIBLE_UNGOLMOR", physcrit = 22, dammod = {cun=0.30, str=0.35, dex=0.35}, convert_damage ={[DamageType.DARKNESS] = 30}, - special_on_crit = {desc="inflicts spydric poison dealing 200 damage over 3 turns and pinning the target", fct=function(combat, who, target) + special_on_crit = {desc=_t"inflicts spydric poison dealing 200 damage over 3 turns and pinning the target", fct=function(combat, who, target) if target:canBe("poison") then local tg = {type="hit", range=1} who:project(tg, target.x, target.y, engine.DamageType.SPYDRIC_POISON, {src=who, dam=200, dur=3}) @@ -486,10 +486,10 @@ newEntity{ base = "BASE_KNIFE", define_as = "KINETIC_SPIKE", power_source = {psionic=true}, unique = true, name = "Kinetic Spike", image = "object/artifact/kinetic_spike.png", - unided_name = "bladeless hilt", + unided_name = _t"bladeless hilt", moddable_tile = "special/%s_kinetic_spike", moddable_tile_big = true, - desc = [[A simple, rudely crafted stone hilt, this object manifests a blade of wavering, nearly invisible force, like a heat haze, as you grasp it. Despite its simple appearance, it is capable of shearing through solid granite, in the hands of those with the necessary mental fortitude to use it properly.]], + desc = _t[[A simple, rudely crafted stone hilt, this object manifests a blade of wavering, nearly invisible force, like a heat haze, as you grasp it. Despite its simple appearance, it is capable of shearing through solid granite, in the hands of those with the necessary mental fortitude to use it properly.]], level_range = {42, 50}, rarity = 310, require = { stat = { wil=42 }, }, @@ -512,7 +512,7 @@ newEntity{ base = "BASE_KNIFE", define_as = "KINETIC_SPIKE", }, max_power = 10, power_regen = 1, use_power = { - name = function(self, who) return ("fire a bolt of kinetic force (range %d), dealing 150%% (physical) weapon damage"):format(self.use_power.range) end, + name = function(self, who) return ("fire a bolt of kinetic force (range %d), dealing 150%% (physical) weapon damage"):tformat(self.use_power.range) end, power = 10, range = 8, use = function(self, who) @@ -536,12 +536,12 @@ newEntity{ base = "BASE_STAFF", power_source = {unknown=true}, unique = true, name = "Rod of Sarrilon", image = "object/artifact/rod_of_sarrilon.png", - unided_name = "ceremonial staff", + unided_name = _t"ceremonial staff", flavor_name = "starstaff", level_range = {37, 50}, color=colors.VIOLET, rarity = 250, - desc = [[A plain looking ceremonial rod. It has connections with Time that even chronomancers do not yet understand.]], + desc = _t[[A plain looking ceremonial rod. It has connections with Time that even chronomancers do not yet understand.]], cost = math.random(700,1100), material_level = 5, diff --git a/game/modules/tome/data/general/objects/world-artifacts-maj-eyal.lua b/game/modules/tome/data/general/objects/world-artifacts-maj-eyal.lua index 208b545683407bbab51abc9b5c3b5245f9011503..75f2eddac248ee36f9c3f86b494d6df27006913a 100644 --- a/game/modules/tome/data/general/objects/world-artifacts-maj-eyal.lua +++ b/game/modules/tome/data/general/objects/world-artifacts-maj-eyal.lua @@ -25,11 +25,11 @@ newEntity{ base = "BASE_STAFF", unique = true, name = "Penitence", flavor_name = "harmonystaff", - unided_name = "glowing staff", image = "object/artifact/staff_penitence.png", + unided_name = _t"glowing staff", image = "object/artifact/staff_penitence.png", level_range = {10, 18}, color=colors.VIOLET, rarity = 200, - desc = [[A powerful staff sent in secret to Angolwen by the Shaloren, to aid their fighting of the plagues following the Spellblaze. Its power is not to harm, but to heal and protect.]], + desc = _t[[A powerful staff sent in secret to Angolwen by the Shaloren, to aid their fighting of the plagues following the Spellblaze. Its power is not to harm, but to heal and protect.]], cost = math.random(125,200), material_level = 2, @@ -70,7 +70,7 @@ newEntity{ base = "BASE_STAFF", }, max_power = 60, power_regen = 1, use_power = { - name = function(self, who) return ("cure up to %d diseases or poisons (based on Magic)"):format(self.use_power.cures(self, who)) end, + name = function(self, who) return ("cure up to %d diseases or poisons (based on Magic)"):tformat(self.use_power.cures(self, who)) end, power = 10, tactical = {CURE = function(who, t, aitarget) -- count number of disease and poisons local nb = 0 @@ -90,7 +90,7 @@ newEntity{ base = "BASE_STAFF", local effs = {} local known = false - game.logSeen(who, "%s uses %s %s, curing %s afflictions!", who.name:capitalize(), who:his_her(), self:getName({do_color=true, no_add_name = true}), who:his_her()) + game.logSeen(who, "%s uses %s %s, curing %s afflictions!", who:getName():capitalize(), who:his_her(), self:getName({do_color=true, no_add_name = true}), who:his_her()) -- Create list of poison/disease effects for eff_id, p in pairs(target.tmp) do local e = target.tempeffect_def[eff_id] @@ -129,13 +129,13 @@ newEntity{ base = "BASE_STAFF", define_as = "STAFF_TARELION", power_source = {arcane=true}, unique = true, name = "Lost Staff of Archmage Tarelion", image = "object/artifact/staff_lost_staff_archmage_tarelion.png", - unided_name = "shining staff", + unided_name = _t"shining staff", flavor_name = "magestaff", flavors = {magestaff=true}, level_range = {37, 50}, color=colors.VIOLET, rarity = 250, - desc = [[Archmage Tarelion travelled the world in his youth. But the world is not a nice place and it seems he had to run fast.]], + desc = _t[[Archmage Tarelion travelled the world in his youth. But the world is not a nice place and it seems he had to run fast.]], cost = math.random(700,1100), material_level = 5, @@ -170,8 +170,8 @@ newEntity{ base = "BASE_AMULET", power_source = {arcane=true}, unique = true, name = "Spellblaze Echoes", color = colors.DARK_GREY, image = "object/artifact/amulet_spellblaze_echoes.png", - unided_name = "deep black amulet", - desc = [[This ancient charm still retains a distant echo of the destruction wrought by the Spellblaze]], + unided_name = _t"deep black amulet", + desc = _t[[This ancient charm still retains a distant echo of the destruction wrought by the Spellblaze]], level_range = {30, 39}, rarity = 290, cost = 500, @@ -186,7 +186,7 @@ newEntity{ base = "BASE_AMULET", }, max_power = 60, power_regen = 1, use_power = { name = function(self, who) - return ("unleash a destructive wail, destroying terrain and dealing %0.2f physical damage (based on Magic) in a radius of %d"):format(engine.interface.ActorTalents.damDesc(who, engine.DamageType.PHYSICAL, self.use_power.damage(who)), self.use_power.radius) + return ("unleash a destructive wail, destroying terrain and dealing %0.2f physical damage (based on Magic) in a radius of %d"):tformat(engine.interface.ActorTalents.damDesc(who, engine.DamageType.PHYSICAL, self.use_power.damage(who)), self.use_power.radius) end, power = 60, radius = 3, @@ -197,7 +197,7 @@ newEntity{ base = "BASE_AMULET", who:project({type="ball", range=0, selffire=false, radius=3}, who.x, who.y, engine.DamageType.DIG, 1) who:project({type="ball", range=0, selffire=false, radius=3}, who.x, who.y, engine.DamageType.DIG, 1) who:project({type="ball", range=0, selffire=false, radius=3}, who.x, who.y, engine.DamageType.PHYSICAL, self.use_power.damage(who)) - game.logSeen(who, "%s uses the %s!", who.name:capitalize(), self:getName()) + game.logSeen(who, "%s uses the %s!", who:getName():capitalize(), self:getName()) return {id=true, used=true} end }, @@ -207,8 +207,8 @@ newEntity{ base = "BASE_AMULET", power_source = {technique=true}, unique = true, name = "Daneth's Neckguard", color = colors.STEEL_BLUE, image = "object/artifact/daneths_neckguard.png", - unided_name = "a thick steel gorget", - desc = [[A thick steel gorget designed to protect its wearer from fatal attacks to the neck. This particular gorget was worn by the Halfling General Daneth Tendermourn during the pyre wars, and judging by the marks along its surface may have saved the General's life on more than one occasion.]], + unided_name = _t"a thick steel gorget", + desc = _t[[A thick steel gorget designed to protect its wearer from fatal attacks to the neck. This particular gorget was worn by the Halfling General Daneth Tendermourn during the pyre wars, and judging by the marks along its surface may have saved the General's life on more than one occasion.]], level_range = {20, 30}, rarity = 300, cost = 300, @@ -238,8 +238,8 @@ newEntity{ base = "BASE_AMULET", -- Vaguely AM oriented, about on par with above average randarts unless you use both damage types newEntity{ base = "BASE_LONGBOW", power_source = {nature=true}, - name = "Thaloren-Tree Longbow", unided_name = "glowing elven-wood longbow", unique=true, image = "object/artifact/thaloren_tree_longbow.png", - desc = [[In the aftermath of the Spellblaze, the Thaloren had to defend their forests against foes and fires alike. Many of the trees died despite the efforts of the Elves to save them. Their wood was fashioned into a bow to be wielded against the darkness.]], + name = "Thaloren-Tree Longbow", unided_name = _t"glowing elven-wood longbow", unique=true, image = "object/artifact/thaloren_tree_longbow.png", + desc = _t[[In the aftermath of the Spellblaze, the Thaloren had to defend their forests against foes and fires alike. Many of the trees died despite the efforts of the Elves to save them. Their wood was fashioned into a bow to be wielded against the darkness.]], level_range = {40, 50}, rarity = 200, require = { stat = { dex=36 }, }, @@ -271,8 +271,8 @@ newEntity{ base = "BASE_LONGBOW", newEntity{ base = "BASE_LONGBOW", power_source = {arcane=true, nature=true}, - name = "Corpsebow", unided_name = "rotting longbow", unique=true, image = "object/artifact/bow_corpsebow.png", - desc = [[A lost artifact of the Age of Dusk, the Corpsebow is filled with a lingering essence of that era's terrible plagues. Those struck by arrows fired from its rotten string find themselves afflicted by echoes of ancient sickness.]], + name = "Corpsebow", unided_name = _t"rotting longbow", unique=true, image = "object/artifact/bow_corpsebow.png", + desc = _t[[A lost artifact of the Age of Dusk, the Corpsebow is filled with a lingering essence of that era's terrible plagues. Those struck by arrows fired from its rotten string find themselves afflicted by echoes of ancient sickness.]], level_range = {10, 20}, rarity = 200, require = { stat = { dex=16 }, }, @@ -306,13 +306,13 @@ newEntity{ base = "BASE_LONGSWORD", power_source = {arcane=true}, unique = true, name = "Spellblade", image = "object/artifact/weapon_spellblade.png", - unided_name = "glowing long sword", + unided_name = _t"glowing long sword", moddable_tile = "special/%s_weapon_spellblade", moddable_tile_big = true, level_range = {35, 50}, color=colors.AQUAMARINE, rarity = 250, - desc = [[Mages sometimes have funny ideas. Archmage Varil once learned how to handle a sword and found he preferred wielding it instead of his staff.]], + desc = _t[[Mages sometimes have funny ideas. Archmage Varil once learned how to handle a sword and found he preferred wielding it instead of his staff.]], on_id_lore = "spellblade", cost = math.random(700,1100), @@ -346,11 +346,11 @@ newEntity{ base = "BASE_GREATSWORD", power_source = {nature=true, technique=true}, unique = true, name = "Genocide", - unided_name = "pitch black blade", image = "object/artifact/weapon_sword_genocide.png", + unided_name = _t"pitch black blade", image = "object/artifact/weapon_sword_genocide.png", level_range = {25, 35}, color=colors.GRAY, rarity = 300, - desc = [[Farian was King Toknor's captain, and fought by his side in the great Battle of Last Hope. However, when he returned after the battle to find his hometown burnt in an orcish pyre, a madness overtook him. The desire for vengeance made him quit the army and strike out on his own, lightly armoured and carrying nought but his sword. Most thought him dead until the reports came back of a fell figure tearing through the orcish encampments, slaughtering all before him and mercilessly butchering the corpses after. It is said his blade drank the blood of 100 orcs each day until finally all of Maj'Eyal was cleared of their presence. When the final orc was slain and no more were to be found, Farian at the last turned the blade on himself and stuck it through his chest. Those nearby said his body shook with convulsions as he did so, though they could not tell whether he was laughing or crying.]], + desc = _t[[Farian was King Toknor's captain, and fought by his side in the great Battle of Last Hope. However, when he returned after the battle to find his hometown burnt in an orcish pyre, a madness overtook him. The desire for vengeance made him quit the army and strike out on his own, lightly armoured and carrying nought but his sword. Most thought him dead until the reports came back of a fell figure tearing through the orcish encampments, slaughtering all before him and mercilessly butchering the corpses after. It is said his blade drank the blood of 100 orcs each day until finally all of Maj'Eyal was cleared of their presence. When the final orc was slain and no more were to be found, Farian at the last turned the blade on himself and stuck it through his chest. Those nearby said his body shook with convulsions as he did so, though they could not tell whether he was laughing or crying.]], cost = 400, require = { stat = { str=40, wil=20 }, }, material_level = 3, @@ -375,11 +375,11 @@ newEntity{ base = "BASE_STAFF", unique = true, name = "Bolbum's Big Knocker", image = "object/artifact/staff_bolbums_big_knocker.png", moddable_tile = "special/%s_staff_bolbums_big_knocker", - unided_name = "thick staff", + unided_name = _t"thick staff", level_range = {20, 35}, color=colors.UMBER, rarity = 220, - desc = [[A thick staff with a heavy knob on the end. It was said to be used by the grand alchemist Bolbum in the Age of Allure. Much renowned is the fear of his students for their master, and the high rate of cranial injuries amongst them. Bolbum died with seven daggers in his back and his much-cursed staff went missing after.]], + desc = _t[[A thick staff with a heavy knob on the end. It was said to be used by the grand alchemist Bolbum in the Age of Allure. Much renowned is the fear of his students for their master, and the high rate of cranial injuries amongst them. Bolbum died with seven daggers in his back and his much-cursed staff went missing after.]], cost = 300, material_level = 3, @@ -410,12 +410,12 @@ newEntity{ base = "BASE_LITE", power_source = {nature=true, antimagic=true}, unique = true, name = "Guidance", image = "object/artifact/guidance.png", - unided_name = "a softly glowing crystal", + unided_name = _t"a softly glowing crystal", level_range = {38, 50}, color = colors.YELLOW, encumber = 1, rarity = 300, - desc = [[Said to have once belonged to Inquisitor Marcus Dunn during the Spellhunt this fist sized quartz crystal glows constantly with a soft white light and was rumoured to be a great aid in meditation, helping focus the mind, body, and soul of the owner as well as protecting them from the foulest of magics. + desc = _t[[Said to have once belonged to Inquisitor Marcus Dunn during the Spellhunt this fist sized quartz crystal glows constantly with a soft white light and was rumoured to be a great aid in meditation, helping focus the mind, body, and soul of the owner as well as protecting them from the foulest of magics. It seems somebody well versed in antimagic could use it to its fullest potential.]], cost = math.random(700,1100), material_level = 5, @@ -449,9 +449,9 @@ newEntity{ base = "BASE_SLING", power_source = {technique=true}, unique = true, name = "Eldoral Last Resort", image = "object/artifact/sling_eldoral_last_resort.png", - unided_name = "well-made sling", - desc = [[A sling with an inscription on its handle: 'May the wielder be granted cunning in his fight against the darkness'.]], - special_desc = function(self) return "When dropping below 30% max HP, you gain 20% attack speed, lose 100% fatigue, and your shots don't consume ammo for 5 turns. 30 turns cd." end, + unided_name = _t"well-made sling", + desc = _t[[A sling with an inscription on its handle: 'May the wielder be granted cunning in his fight against the darkness'.]], + special_desc = function(self) return _t"When dropping below 30% max HP, you gain 20% attack speed, lose 100% fatigue, and your shots don't consume ammo for 5 turns. 30 turns cd." end, level_range = {15, 25}, rarity = 200, require = { stat = { dex=26 }, }, @@ -488,10 +488,10 @@ newEntity{ base = "BASE_KNIFE", power_source = {technique=true}, unique = true, name = "Orc Feller", image = "object/artifact/dagger_orc_feller.png", - unided_name = "shining dagger", + unided_name = _t"shining dagger", moddable_tile = "special/%s_dagger_orc_feller", moddable_tile_big = true, - desc = [[During the invasion of Eldoral the Halfling Rogue Herah is said to have slain over one hundred orcs while defending a group of refugees.]], + desc = _t[[During the invasion of Eldoral the Halfling Rogue Herah is said to have slain over one hundred orcs while defending a group of refugees.]], level_range = {40, 50}, rarity = 300, require = { stat = { dex=44 }, }, @@ -527,10 +527,10 @@ newEntity{ base = "BASE_MACE", power_source = {nature=true, antimagic=true}, unique = true, name = "Nature's Vengeance", color = colors.BROWN, image = "object/artifact/mace_natures_vengeance.png", - unided_name = "thick wooden mace", + unided_name = _t"thick wooden mace", moddable_tile = "special/%s_mace_natures_vengeance", moddable_tile_big = true, - desc = [[This thick-set mace was used by the Spellhunter Vorlan, who crafted it from the wood of an ancient oak that was uprooted during the Spellblaze. Many were the wizards and witches felled by this weapon, brought to justice for the crimes they committed against nature.]], + desc = _t[[This thick-set mace was used by the Spellhunter Vorlan, who crafted it from the wood of an ancient oak that was uprooted during the Spellblaze. Many were the wizards and witches felled by this weapon, brought to justice for the crimes they committed against nature.]], level_range = {20, 34}, rarity = 340, require = { stat = { str=42 } }, @@ -565,8 +565,8 @@ newEntity{ base = "BASE_GAUNTLETS", define_as = "GAUNTLETS_SCORPION", unique = true, name = "Fists of the Desert Scorpion", color = colors.STEEL_BLUE, image = "object/artifact/scorpion_gauntlets.png", - unided_name = "viciously spiked gauntlets", - desc = [[These wickedly spiked gauntlets belonged to an orc captain in the Age of Pyre who conquered the western sands, using them as a base to lay raids on Elvala to the south. Known as The Scorpion, he seemed unconquerable in battle, able to pull enemies towards him with vicious mental force and lay down lethal blows on them. Often a flurry of these yellow and black gauntlets would be the last thing great Shaloren mages would see before having the life crushed from them. + unided_name = _t"viciously spiked gauntlets", + desc = _t[[These wickedly spiked gauntlets belonged to an orc captain in the Age of Pyre who conquered the western sands, using them as a base to lay raids on Elvala to the south. Known as The Scorpion, he seemed unconquerable in battle, able to pull enemies towards him with vicious mental force and lay down lethal blows on them. Often a flurry of these yellow and black gauntlets would be the last thing great Shaloren mages would see before having the life crushed from them. Finally The Scorpion was defeated by the alchemist Nessylia, who went to face the fiendish orc alone. The captain pulled the elf towards him with a brutish cackle, but before he could batter the life from her flesh she tore off her robes, revealing eighty incendiary bombs strapped to her flesh. With a spark from her fingers she triggered an explosion that could be seen for miles around. To this day Nessylia is still remembered in song for the sacrifice of her immortal life to protect her people.]], level_range = {20, 40}, @@ -599,8 +599,8 @@ newEntity{ base = "BASE_CLOAK", power_source = {arcane=true}, unique = true, name = "Wind's Whisper", image="object/artifact/cloak_winds_whisper.png", - unided_name = "flowing light cloak", - desc = [[When the enchanter Razeen was cornered by Spellhunters near the Daikara mountain pass she wrapped her cloak about her and fled down a narrow ravine. The hunters fired volley after volley of arrows at her, but by miracle or magic they all missed. Razeen was able to escape and flee to the hidden city in the west.]], + unided_name = _t"flowing light cloak", + desc = _t[[When the enchanter Razeen was cornered by Spellhunters near the Daikara mountain pass she wrapped her cloak about her and fled down a narrow ravine. The hunters fired volley after volley of arrows at her, but by miracle or magic they all missed. Razeen was able to escape and flee to the hidden city in the west.]], level_range = {15, 25}, rarity = 400, cost = 250, @@ -619,9 +619,9 @@ newEntity{ base = "BASE_CLOAK", newEntity{ base = "BASE_ROD", power_source = {arcane=true}, - unided_name = "glowing rod", + unided_name = _t"glowing rod", name = "Gwai's Burninator", color=colors.LIGHT_RED, unique=true, image = "object/artifact/wand_gwais_burninator.png", - desc = [[Gwai, a Pyromanceress that lived during the Spellhunt, was cornered by group of mage hunters. She fought to her last breath and is said to have killed at least ten people with this wand before she fell.]], + desc = _t[[Gwai, a Pyromanceress that lived during the Spellhunt, was cornered by group of mage hunters. She fought to her last breath and is said to have killed at least ten people with this wand before she fell.]], cost = 600, rarity = 220, level_range = {25, 35}, @@ -637,13 +637,13 @@ newEntity{ base = "BASE_ROD", target = function(self, who) return {type="cone", range=self.use_power.range, radius=self.use_power.radius} end, tactical = {ATTACKAREA = {FIRE = 2}}, name = function(self, who) - return ("shoot a cone of flames (radius %d) for %0.2f fire damage (based on Magic)"):format(self.use_power.radius, engine.interface.ActorTalents.damDesc(who, engine.DamageType.FIRE, self.use_power.damage(self, who))) + return ("shoot a cone of flames (radius %d) for %0.2f fire damage (based on Magic)"):tformat(self.use_power.radius, engine.interface.ActorTalents.damDesc(who, engine.DamageType.FIRE, self.use_power.damage(self, who))) end, use = function(self, who) local tg = self.use_power.target(self, who) local x, y = who:getTarget(tg) if not x or not y then return nil end - game.logSeen(who, "%s activates %s %s!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s activates %s %s!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) who:project(tg, x, y, engine.DamageType.FIRE, self.use_power.damage(self, who), {type="flame"}) return {id=true, used=true} end @@ -653,12 +653,12 @@ newEntity{ base = "BASE_ROD", newEntity{ base = "BASE_BATTLEAXE", power_source = {technique=true}, unique = true, - unided_name = "viciously sharp battle axe", + unided_name = _t"viciously sharp battle axe", name = "Drake's Bane", image = "object/artifact/axe_drakes_bane.png", moddable_tile = "special/%s_axe_drakes_bane", moddable_tile_big = true, color = colors.RED, - desc = [[The killing of Kroltar, mightiest of wyrms, took seven months and the lives of 20,000 dwarven warriors. Finally the beast was worn down and mastersmith Gruxim, standing atop the bodies of his fallen comrades, was able slit its throat with this axe crafted purely for the purpose of penetrating the wyrm's hide.]], + desc = _t[[The killing of Kroltar, mightiest of wyrms, took seven months and the lives of 20,000 dwarven warriors. Finally the beast was worn down and mastersmith Gruxim, standing atop the bodies of his fallen comrades, was able slit its throat with this axe crafted purely for the purpose of penetrating the wyrm's hide.]], require = { stat = { str=16 }, }, rarity = 300, cost = 400, @@ -684,10 +684,10 @@ newEntity{ base = "BASE_WARAXE", power_source = {technique=true, nature=true}, unique = true, name = "Blood-Letter", image = "object/artifact/weapon_axe_blood_letter.png", - unided_name = "glacial hatchet", + unided_name = _t"glacial hatchet", moddable_tile = "special/%s_weapon_axe_blood_letter", moddable_tile_big = true, - desc = [[A hand axe carved out of the most frozen parts of the northern wasteland.]], + desc = _t[[A hand axe carved out of the most frozen parts of the northern wasteland.]], level_range = {25, 35}, rarity = 235, require = { stat = { str=40, dex=24 }, }, @@ -716,11 +716,11 @@ newEntity{ base = "BASE_WARAXE", newEntity{ base = "BASE_GEM", define_as = "GEM_TELOS", power_source = {arcane=true}, unique = true, - unided_name = "scintillating white crystal", + unided_name = _t"scintillating white crystal", name = "Telos's Staff Crystal", subtype = "multi-hued", image = "object/artifact/telos_staff_crystal.png", color = colors.WHITE, level_range = {35, 50}, - desc = [[A closer look at this pure white crystal reveals that it is really a plethora of colors swirling and scintillating.]], + desc = _t[[A closer look at this pure white crystal reveals that it is really a plethora of colors swirling and scintillating.]], rarity = 240, identified = false, cost = 200, @@ -750,8 +750,8 @@ newEntity{ base = "BASE_GEM", define_as = "GEM_TELOS", }, max_power = 1, power_regen = 1, - use_power = { name = "combine with a staff", power = 1, use = function(self, who, gem_inven, gem_item) - who:showInventory("Fuse with which staff?", who:getInven("INVEN"), function(o) return o.type == "weapon" and o.subtype == "staff" and not o.egoed and not o.unique end, function(o, item) + use_power = { name = _t"combine with a staff", power = 1, use = function(self, who, gem_inven, gem_item) + who:showInventory(_t"Fuse with which staff?", who:getInven("INVEN"), function(o) return o.type == "weapon" and o.subtype == "staff" and not o.egoed and not o.unique end, function(o, item) local voice = game.zone:makeEntityByName(game.level, "object", "VOICE_TELOS") if voice then local oldname = o:getName{do_color=true} @@ -794,13 +794,13 @@ newEntity{ base = "BASE_GEM", define_as = "GEM_TELOS", on_wear = function(self, who) if who.is_alchemist_golem then self.old_golem_name = who.name - who.name = "Telos Golem (reluctant follower of "..who.summoner.name..")" - game.log("#ROYAL_BLUE#The golem decides to change it's name to #{bold}#%s#{normal}#.", who.name) + who.name = ("Telos Golem (reluctant follower of %s)"):tformat(who.summoner:getName()) + game.log("#ROYAL_BLUE#The golem decides to change it's name to #{bold}#%s#{normal}#.", who:getName()) end end, on_takeoff = function(self, who) if who.is_alchemist_golem then - who.name = self.old_golem_name or "I feel lost!" + who.name = self.old_golem_name or _t"I feel lost!" end end, } @@ -810,10 +810,10 @@ newEntity{ base = "BASE_STAFF", define_as = "VOICE_TELOS", power_source = {arcane=true}, unique = true, name = "Voice of Telos", - unided_name = "scintillating white staff", image="object/artifact/staff_voice_of_telos.png", + unided_name = _t"scintillating white staff", image="object/artifact/staff_voice_of_telos.png", color = colors.VIOLET, rarity = false, - desc = [[A closer look at this pure white staff reveals that it is really a plethora of colors swirling and scintillating.]], + desc = _t[[A closer look at this pure white staff reveals that it is really a plethora of colors swirling and scintillating.]], cost = 500, material_level = 5, @@ -836,8 +836,8 @@ newEntity{ base = "BASE_LEATHER_BELT", power_source = {nature=true}, unique = true, name = "Rope Belt of the Thaloren", image = "object/artifact/rope_belt_of_the_thaloren.png", - unided_name = "short length of rope", - desc = [[The simplest of belts, worn for centuries by Nessilla Tantaelen as she tended to her people and forests. Some of her wisdom and power have settled permanently into its fibers.]], + unided_name = _t"short length of rope", + desc = _t[[The simplest of belts, worn for centuries by Nessilla Tantaelen as she tended to her people and forests. Some of her wisdom and power have settled permanently into its fibers.]], color = colors.LIGHT_RED, level_range = {16, 30}, rarity = 200, @@ -865,8 +865,8 @@ newEntity{ base = "BASE_LEATHER_BELT", power_source = {arcane=true}, unique = true, name = "Neira's Memory", image = "object/artifact/neira_memory.png", - unided_name = "crackling belt", - desc = [[Ages ago this belt was worn by Linaniil herself in her youth, using its power she shielded herself from the Spellblaze rain of fire, but naught could she do for her sister Neira.]], + unided_name = _t"crackling belt", + desc = _t[[Ages ago this belt was worn by Linaniil herself in her youth, using its power she shielded herself from the Spellblaze rain of fire, but naught could she do for her sister Neira.]], color = colors.GOLD, level_range = {20, 30}, rarity = 200, @@ -880,11 +880,11 @@ newEntity{ base = "BASE_LEATHER_BELT", }, max_power = 20, power_regen = 1, use_power = { - name = function(self, who) return ("surround yourself with a magical shield (strength %d, based on Magic) for 10 turns"):format(self.use_power.shield(self, who)) end, + name = function(self, who) return ("surround yourself with a magical shield (strength %d, based on Magic) for 10 turns"):tformat(self.use_power.shield(self, who)) end, power = 20, shield = function(self, who) return 100 + who:getMag(250) * (100 + (who:attr("shield_factor") or 0)) / 100 end, use = function(self, who) - game.logSeen(who, "%s invokes the memory of Neira!", who.name:capitalize()) + game.logSeen(who, "%s invokes the memory of Neira!", who:getName():capitalize()) who:setEffect(who.EFF_DAMAGE_SHIELD, 10, {power=self.use_power.shield(self, who)}) game:playSoundNear(who, "talents/arcane") return {id=true, used=true} @@ -896,8 +896,8 @@ newEntity{ base = "BASE_LIGHT_ARMOR", power_source = {nature=true, antimagic=true}, unique = true, name = "Nature's Blessing", image = "object/artifact/armor_natures_blessing.png", - unided_name = "supple leather armour entwined with willow bark", - desc = [[Worn by Protector Ardon, who first formed the Ziguranth during the mage wars between the Humans and the Halflings. This armour is infused with the powers of nature, and protected against the disruptive forces of magic.]], + unided_name = _t"supple leather armour entwined with willow bark", + desc = _t[[Worn by Protector Ardon, who first formed the Ziguranth during the mage wars between the Humans and the Halflings. This armour is infused with the powers of nature, and protected against the disruptive forces of magic.]], color = colors.BROWN, level_range = {15, 30}, rarity = 350, @@ -938,8 +938,8 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", power_source = {technique=true}, unique = true, name = "Plate Armor of the King", image = "object/artifact/plate_armor_of_the_king.png", - unided_name = "suit of gleaming voratun plate", - desc = [[Beautifully detailed with images of King Toknor's defence of Last Hope. Despair fills the hearts of even the blackest villains at the sight of it.]], + unided_name = _t"suit of gleaming voratun plate", + desc = _t[[Beautifully detailed with images of King Toknor's defence of Last Hope. Despair fills the hearts of even the blackest villains at the sight of it.]], color = colors.WHITE, level_range = {45, 50}, rarity = 390, @@ -972,10 +972,10 @@ newEntity{ base = "BASE_LONGSWORD", power_source = {nature=true, antimagic=true}, unique = true, name = "Witch-Bane", color = colors.LIGHT_STEEL_BLUE, image = "object/artifact/sword_witch_bane.png", - unided_name = "an ivory handled voratun longsword", + unided_name = _t"an ivory handled voratun longsword", moddable_tile = "special/%s_sword_witch_bane", moddable_tile_big = true, - desc = [[A thin voratun blade with an ivory handle wrapped in purple cloth. The weapon is nearly as legendary as its former owner, Marcus Dunn, and was thought to have been destroyed after Marcus was slain near the end of the Spellhunt. + desc = _t[[A thin voratun blade with an ivory handle wrapped in purple cloth. The weapon is nearly as legendary as its former owner, Marcus Dunn, and was thought to have been destroyed after Marcus was slain near the end of the Spellhunt. It seems somebody well versed in antimagic could use it to its fullest potential.]], level_range = {38, 50}, rarity = 250, @@ -1019,12 +1019,12 @@ newEntity{ base = "BASE_STAFF", define_as = "SET_STAFF_CHANNELERS", power_source = {arcane=true}, unique = true, name = "Staff of Arcane Supremacy", - unided_name = "silver-runed staff", + unided_name = _t"silver-runed staff", flavor_name = "magestaff", level_range = {20, 40}, color=colors.BLUE, image = "object/artifact/staff_of_arcane_supremacy.png", rarity = 300, - desc = [[A long slender staff, made of ancient dragon-bone, with runes emblazoned all over its surface in bright silver. + desc = _t[[A long slender staff, made of ancient dragon-bone, with runes emblazoned all over its surface in bright silver. It hums faintly, as if great power is locked within, yet alone it seems incomplete.]], cost = 200, material_level = 3, @@ -1051,7 +1051,7 @@ It hums faintly, as if great power is locked within, yet alone it seems incomple use_talent = { id = Talents.T_ARCANE_SUPREMACY, level = 3, power = 20 }, set_list = { {"define_as", "SET_HAT_CHANNELERS"} }, set_desc = { - channelers = "A true understanding of the arcane is needed to release its full power.", + channelers = _t"A true understanding of the arcane is needed to release its full power.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","max_mana"}, 100) @@ -1063,8 +1063,8 @@ newEntity{ base = "BASE_WIZARD_HAT", define_as = "SET_HAT_CHANNELERS", power_source = {arcane=true}, unique = true, name = "Hat of Arcane Understanding", - unided_name = "silver-runed hat", - desc = [[A traditional pointed wizard's hat, made of fine purple elven-silk and decorated with bright silver runes. You sense it has been passed from ancient times, and has been born on the heads of great mages. + unided_name = _t"silver-runed hat", + desc = _t[[A traditional pointed wizard's hat, made of fine purple elven-silk and decorated with bright silver runes. You sense it has been passed from ancient times, and has been born on the heads of great mages. Touching the cloth you feel a sense of knowledge and power from bygone ages, yet it is partly sealed away, waiting for a trigger to release it.]], color = colors.BLUE, image = "object/artifact/wizard_hat_of_arcane_understanding.png", level_range = {20, 40}, @@ -1087,7 +1087,7 @@ Touching the cloth you feel a sense of knowledge and power from bygone ages, yet max_power = 40, power_regen = 1, set_list = { {"define_as", "SET_STAFF_CHANNELERS"} }, set_desc = { - channelers = "Only supremacy of the arcane can release its full power.", + channelers = _t"Only supremacy of the arcane can release its full power.", }, on_set_complete = function(self, who) local Talents = require "engine.interface.ActorTalents" @@ -1104,8 +1104,8 @@ newEntity{ base = "BASE_AMULET", --Thanks Grayswandir! power_source = {arcane=true}, unique = true, name = "Mirror Shards", - unided_name = "mirror lined chain", image = "object/artifact/mirror_shards.png", - desc = [[Said to have been created by a powerful mage after his home was destroyed by a mob following the Spellblaze. Though he fled, his possessions were crushed, burned, and smashed. When he returned to the ruins, he made this amulet from the remains of his shattered mirror.]], + unided_name = _t"mirror lined chain", image = "object/artifact/mirror_shards.png", + desc = _t[[Said to have been created by a powerful mage after his home was destroyed by a mob following the Spellblaze. Though he fled, his possessions were crushed, burned, and smashed. When he returned to the ruins, he made this amulet from the remains of his shattered mirror.]], color = colors.LIGHT_RED, level_range = {18, 30}, rarity = 220, @@ -1123,11 +1123,11 @@ newEntity{ base = "BASE_AMULET", --Thanks Grayswandir! }, max_power = 24, power_regen = 1, use_power = { - name = function(self, who) return ("create a reflective shield (50%% reflection rate, %d strength, based on Magic) for 5 turns"):format(self.use_power.shield(self, who) * (100 + (who:attr("shield_factor") or 0)) / 100) end, + name = function(self, who) return ("create a reflective shield (50%% reflection rate, %d strength, based on Magic) for 5 turns"):tformat(self.use_power.shield(self, who) * (100 + (who:attr("shield_factor") or 0)) / 100) end, power = 24, shield = function(self, who) return 150 + 2*who:getMag(100) end, use = function(self, who) - game.logSeen(who, "%s activates %s, forging a reflective barrier!", who.name:capitalize(), self:getName({no_add_name = true})) + game.logSeen(who, "%s activates %s, forging a reflective barrier!", who:getName():capitalize(), self:getName({no_add_name = true})) who:setEffect(who.EFF_DAMAGE_SHIELD, 5, {power=self.use_power.shield(self, who), reflect = 50}) game:playSoundNear(who, "talents/arcane") return {id=true, used=true} @@ -1139,8 +1139,8 @@ newEntity{ base = "BASE_CLOAK", power_source = {nature=true}, unique = true, name = "Destala's Scales", image = "object/artifact/destalas_scales.png", - unided_name = "green dragon-scale cloak", - desc = [[This cloak is made from the scales of an infamous Venom Drake that terrorized the country side towards the end of the Age of Dusk. It was slain by a party led by Kestin Highfin, who had this cloak fashioned personally.]], + unided_name = _t"green dragon-scale cloak", + desc = _t[[This cloak is made from the scales of an infamous Venom Drake that terrorized the country side towards the end of the Age of Dusk. It was slain by a party led by Kestin Highfin, who had this cloak fashioned personally.]], level_range = {20, 30}, rarity = 240, cost = 200, @@ -1162,10 +1162,10 @@ newEntity{ base = "BASE_KNIFE", -- Thanks Grayswandir! power_source = {arcane=true}, unique = true, name = "Spellblaze Shard", image = "object/artifact/spellblaze_shard.png", - unided_name = "crystalline dagger", + unided_name = _t"crystalline dagger", moddable_tile = "special/%s_spellblaze", moddable_tile_big = true, - desc = [[This jagged crystal glows with an unnatural light. A strap of cloth is wrapped around one end, as a handle.]], + desc = _t[[This jagged crystal glows with an unnatural light. A strap of cloth is wrapped around one end, as a handle.]], level_range = {12, 25}, rarity = 200, require = { stat = { dex=17 }, }, @@ -1194,10 +1194,10 @@ newEntity{ base = "BASE_KNIFE", --Razakai's idea, slightly modified power_source = {psionic=true}, unique = true, name = "Mercy", image = "object/artifact/mercy.png", - unided_name = "wickedly sharp dagger", + unided_name = _t"wickedly sharp dagger", moddable_tile = "special/%s_mercy", moddable_tile_big = true, - desc = [[This dagger was used by a nameless healer during the Age of Dusk. The plagues that ravaged his town were beyond the ability of mortal man to treat, so he took to using his dagger to as an act of mercy when faced with hopeless patients. Despite his good intentions, it is now cursed with dark power, letting it kill in a single stroke against those already weakened.]], + desc = _t[[This dagger was used by a nameless healer during the Age of Dusk. The plagues that ravaged his town were beyond the ability of mortal man to treat, so he took to using his dagger to as an act of mercy when faced with hopeless patients. Despite his good intentions, it is now cursed with dark power, letting it kill in a single stroke against those already weakened.]], level_range = {30, 40}, rarity = 250, require = { stat = { dex=42 }, }, @@ -1208,7 +1208,7 @@ newEntity{ base = "BASE_KNIFE", --Razakai's idea, slightly modified apr = 9, physcrit = 15, dammod = {str=0.45, dex=0.55}, - special_on_hit = {desc="deals 60 physical damage increased by 1% for each 1% life the target has lost", fct=function(combat, who, target) + special_on_hit = {desc=_t"deals 60 physical damage increased by 1% for each 1% life the target has lost", fct=function(combat, who, target) local tg = {type="ball", range=10, radius=0, selffire=false} local bonus = 1 + (1 - target.life / target.max_life) who:project(tg, target.x, target.y, engine.DamageType.PHYSICAL, 60*bonus) @@ -1224,8 +1224,8 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", -- Thanks SageAcrin! power_source = {technique = true, nature = true}, unique = true, name = "Thalore-Wood Cuirass", image = "object/artifact/thalore_wood_cuirass.png", - unided_name = "thick wooden plate armour", - desc = [[Expertly hewn from the bark of trees, this wooden armor provides excellent protection at a low weight.]], + unided_name = _t"thick wooden plate armour", + desc = _t[[Expertly hewn from the bark of trees, this wooden armor provides excellent protection at a low weight.]], color = colors.WHITE, level_range = {10, 24}, rarity = 220, diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index e41eeaec6db8c03c5a44014d108d75950518a09e..56bdc66ab39841d3e4c60f8861cb686b3ce1b566 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -31,11 +31,11 @@ end newEntity{ base = "BASE_GEM", power_source = {arcane=true}, unique = true, - unided_name = "windy gem", + unided_name = _t"windy gem", name = "Windborne Azurite", subtype = "blue", color = colors.BLUE, image = "object/artifact/windborn_azurite.png", level_range = {18, 40}, - desc = [[Air currents swirl around this bright blue jewel.]], + desc = _t[[Air currents swirl around this bright blue jewel.]], rarity = 240, cost = 200, identified = false, @@ -67,8 +67,8 @@ newEntity{ base = "BASE_GEM", newEntity{ base = "BASE_INFUSION", name = "Primal Infusion", unique=true, image = "object/artifact/primal_infusion.png", - desc = [[This wild infusion has evolved.]], - unided_name = "pulsing infusion", + desc = _t[[This wild infusion has evolved.]], + unided_name = _t"pulsing infusion", level_range = {15, 50}, rarity = 300, cost = 500, @@ -130,11 +130,11 @@ newEntity{ base = "BASE_STAFF", name = "Staff of Destruction", flavor_name = "magestaff", flavors = {magestaff=true}, - unided_name = "darkness infused staff", image = "object/artifact/staff_of_destruction.png", + unided_name = _t"darkness infused staff", image = "object/artifact/staff_of_destruction.png", level_range = {20, 25}, color=colors.VIOLET, rarity = 170, - desc = [[This unique-looking staff is carved with runes of destruction.]], + desc = _t[[This unique-looking staff is carved with runes of destruction.]], cost = resolvers.rngrange(225,350), material_level = 3, @@ -167,8 +167,8 @@ newEntity{ base = "BASE_RING", power_source = {nature=true}, unique = true, name = "Vargh Redemption", color = colors.LIGHT_BLUE, image="object/artifact/ring_vargh_redemption.png", - unided_name = "sea-blue ring", - desc = [[This azure ring seems to be always moist to the touch.]], + unided_name = _t"sea-blue ring", + desc = _t[[This azure ring seems to be always moist to the touch.]], level_range = {10, 20}, rarity = 150, cost = 500, @@ -179,7 +179,7 @@ newEntity{ base = "BASE_RING", name = function(self, who) local dam = self.use_power.damage(self, who) return ("summon a radius %d tidal wave that expands slowly over %d turns, dealing %0.2f cold and %0.2f physical damage (based on Willpower) each turn, knocking opponents back, and lowering their stun resistance"): - format(self.use_power.radius(self, who), self.use_power.duration, who:damDesc(engine.DamageType.COLD, dam/2), who:damDesc(engine.DamageType.PHYSICAL, dam/2)) + tformat(self.use_power.radius(self, who), self.use_power.duration, who:damDesc(engine.DamageType.COLD, dam/2), who:damDesc(engine.DamageType.PHYSICAL, dam/2)) end, power = 60, range = 0, @@ -206,8 +206,8 @@ newEntity{ base = "BASE_RING", end, false ) - wave.name = "tidal wave" - game.logSeen(who, "%s brandishes %s, calling forth the might of the oceans!", who.name:capitalize(), self:getName({no_add_name = true, do_color = true})) + wave.name = _t"tidal wave" + game.logSeen(who, "%s brandishes %s, calling forth the might of the oceans!", who:getName():capitalize(), self:getName({no_add_name = true, do_color = true})) return {id=true, used=true} end }, @@ -229,13 +229,13 @@ newEntity{ base = "BASE_RING", power_source = {nature=true}, unique = true, name = "Ring of the Dead", color = colors.DARK_GREY, image = "object/artifact/jewelry_ring_of_the_dead.png", - unided_name = "dull black ring", - desc = [[This ring is imbued with powers from beyond the grave. It is said that those who wear it may find a new path when all other roads turn dim.]], + unided_name = _t"dull black ring", + desc = _t[[This ring is imbued with powers from beyond the grave. It is said that those who wear it may find a new path when all other roads turn dim.]], level_range = {35, 42}, rarity = 250, cost = 500, material_level = 4, - special_desc = function(self) return "Will bring you back from death, but only once!" end, + special_desc = function(self) return _t"Will bring you back from death, but only once!" end, special = true, wielder = { inc_stats = { [Stats.STAT_LCK] = 10, }, @@ -252,13 +252,13 @@ newEntity{ base = "BASE_RING", power_source = {arcane=true}, unique = true, name = "Elemental Fury", color = colors.PURPLE, image = "object/artifact/ring_elemental_fury.png", - unided_name = "multi-hued ring", - desc = [[This ring shines with many colors.]], + unided_name = _t"multi-hued ring", + desc = _t[[This ring shines with many colors.]], level_range = {15, 30}, rarity = 200, cost = 200, material_level = 3, - special_desc = function(self) return "All your damage is converted and split into arcane, fire, cold and lightning." end, + special_desc = function(self) return _t"All your damage is converted and split into arcane, fire, cold and lightning." end, wielder = { elemental_mastery = 0.25, inc_stats = { [Stats.STAT_MAG] = 6, [Stats.STAT_CUN] = 6, }, @@ -281,8 +281,8 @@ newEntity{ base = "BASE_AMULET", power_source = {technique=true}, unique = true, name = "Feathersteel Amulet", color = colors.WHITE, image = "object/artifact/feathersteel_amulet.png", - unided_name = "light amulet", - desc = [[The weight of the world seems a little lighter with this amulet around your neck.]], + unided_name = _t"light amulet", + desc = _t[[The weight of the world seems a little lighter with this amulet around your neck.]], level_range = {5, 20}, rarity = 200, cost = 90, @@ -301,8 +301,8 @@ newEntity{ base = "BASE_AMULET", power_source = {unknown=true}, unique = true, name = "The Far-Hand", color = colors.YELLOW, image = "object/artifact/the_far_hand.png", - unided_name = "a weird metallic hand", - desc = [[You can feel this strange metallic hand wriggling around, it feels as if space distorts around it.]], + unided_name = _t"a weird metallic hand", + desc = _t[[You can feel this strange metallic hand wriggling around, it feels as if space distorts around it.]], level_range = {20, 40}, rarity = 200, cost = 1000, @@ -321,8 +321,8 @@ newEntity{ base = "BASE_AMULET", define_as = "SET_GARKUL_TEETH", power_source = {technique=true}, unique = true, name = "Garkul's Teeth", color = colors.YELLOW, image = "object/artifact/amulet_garkuls_teeth.png", - unided_name = "a necklace made of teeth", - desc = [[Hundreds of humanoid teeth have been strung together on multiple strands of thin leather, creating this tribal necklace. One would have to assume that these are not the teeth of Garkul the Devourer but rather the teeth of Garkul's many meals.]], + unided_name = _t"a necklace made of teeth", + desc = _t[[Hundreds of humanoid teeth have been strung together on multiple strands of thin leather, creating this tribal necklace. One would have to assume that these are not the teeth of Garkul the Devourer but rather the teeth of Garkul's many meals.]], level_range = {40, 50}, rarity = 300, cost = 1000, @@ -347,7 +347,7 @@ newEntity{ base = "BASE_AMULET", define_as = "SET_GARKUL_TEETH", set_list = { {"define_as", "HELM_OF_GARKUL"} }, set_desc = { - garkul = "Another of Garkul's heirlooms would bring out his spirit.", + garkul = _t"Another of Garkul's heirlooms would bring out his spirit.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","die_at"}, -100) @@ -362,23 +362,23 @@ newEntity{ base = "BASE_LITE", power_source = {nature=true}, unique = true, name = "Summertide Phial", image="object/artifact/summertide_phial.png", - unided_name = "glowing phial", + unided_name = _t"glowing phial", level_range = {1, 10}, color=colors.YELLOW, encumber = 1, rarity = 100, - desc = [[A small crystal phial that captured Sunlight during the Summertide.]], - special_desc = function(self) return "When attacking in melee, deals 15 light damage and lights tiles in radius 1." end, + desc = _t[[A small crystal phial that captured Sunlight during the Summertide.]], + special_desc = function(self) return _t"When attacking in melee, deals 15 light damage and lights tiles in radius 1." end, cost = 200, max_power = 15, power_regen = 1, use_power = { - name = function(self, who) return ("call light, dispelling darkness and lighting tiles in radius 20.(%d power, based on Willpower)"):format(self.use_power.litepower(self, who)) end, + name = function(self, who) return ("call light, dispelling darkness and lighting tiles in radius 20.(%d power, based on Willpower)"):tformat(self.use_power.litepower(self, who)) end, power = 10, litepower = function(self, who) return who:combatStatScale("wil", 50, 150) end, use = function(self, who) who:project({type="ball", range=0, radius=20}, who.x, who.y, engine.DamageType.LITE, self.use_power.litepower(self, who)) - game.logSeen(who, "%s brandishes %s %s and banishes all shadows!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s brandishes %s %s and banishes all shadows!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) return {id=true, used=true} end, no_npc_use = function(self, who) return not game.party:hasMember(who) end, @@ -396,7 +396,7 @@ newEntity{ base = "BASE_GEM", power_source = {arcane=true}, unique = true, name = "Burning Star", image = "object/artifact/jewel_gem_burning_star.png", - unided_name = "burning jewel", + unided_name = _t"burning jewel", level_range = {20, 30}, color=colors.YELLOW, encumber = 1, @@ -408,16 +408,16 @@ newEntity{ base = "BASE_GEM", alt_damage_type = 'LIGHT_BLIND', particle = 'light', }, - desc = [[The first Halfling mages during the Age of Allure discovered how to capture the Sunlight and infuse gems with it. + desc = _t[[The first Halfling mages during the Age of Allure discovered how to capture the Sunlight and infuse gems with it. This star is the culmination of their craft. Light radiates from its ever-shifting yellow surface.]], cost = 400, max_power = 30, power_regen = 1, - use_power = { name = "map surroundings within range 20", power = 30, + use_power = { name = _t"map surroundings within range 20", power = 30, no_npc_use = function(self, who) return not game.party:hasMember(who) end, use = function(self, who) who:magicMap(20) - game.logSeen(who, "%s brandishes the %s which radiates in all directions!", who.name:capitalize(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s brandishes the %s which radiates in all directions!", who:getName():capitalize(), self:getName({no_add_name = true, do_color = true})) return {id=true, used=true} end }, @@ -430,7 +430,7 @@ newEntity{ base = "BASE_LITE", power_source = {arcane=true}, unique = true, name = "Dúathedlen Heart", - unided_name = "a dark, fleshy mass", image = "object/artifact/dark_red_heart.png", + unided_name = _t"a dark, fleshy mass", image = "object/artifact/dark_red_heart.png", level_range = {30, 40}, color = colors.RED, encumber = 1, @@ -438,8 +438,8 @@ newEntity{ base = "BASE_LITE", rarity = 300, material_level = 4, sentient = true, - desc = [[This dark red heart still beats despite being separated from its owner. It also snuffs out any light source that comes near it.]], - special_desc = function(self) return "The heart seems to absorb light when you deal darkness damage. Standing on unlit tiles, you feel stronger." end, + desc = _t[[This dark red heart still beats despite being separated from its owner. It also snuffs out any light source that comes near it.]], + special_desc = function(self) return _t"The heart seems to absorb light when you deal darkness damage. Standing on unlit tiles, you feel stronger." end, cost = resolvers.rngrange(400,650), wielder = { @@ -486,17 +486,17 @@ newEntity{ unique = true, type = "potion", subtype="potion", name = "Blood of Life", - unided_name = "bloody phial", + unided_name = _t"bloody phial", level_range = {1, 50}, display = '!', color=colors.VIOLET, image="object/artifact/potion_blood_of_life.png", encumber = 0.4, rarity = 350, - desc = [[This vial of blood was drawn from an ancient race in the Age of Haze. Some of the power and vitality of those early days of the world still flows through it. "Drink me, mortal," the red liquid seems to whisper in your thoughts. "I will bring you light beyond darkness. Those who taste my essence fear not the death of flesh. Drink me, mortal, if you value your life..."]], + desc = _t[[This vial of blood was drawn from an ancient race in the Age of Haze. Some of the power and vitality of those early days of the world still flows through it. "Drink me, mortal," the red liquid seems to whisper in your thoughts. "I will bring you light beyond darkness. Those who taste my essence fear not the death of flesh. Drink me, mortal, if you value your life..."]], cost = 1000, special = true, - use_simple = { name = "quaff the Blood of Life to grant an extra life", use = function(self, who) - game.logSeen(who, "%s quaffs the %s!", who.name:capitalize(), self:getName({no_add_name = true, do_color = true})) + use_simple = { name = _t"quaff the Blood of Life to grant an extra life", use = function(self, who) + game.logSeen(who, "%s quaffs the %s!", who:getName():capitalize(), self:getName({no_add_name = true, do_color = true})) if not who:attr("undead") then who.blood_life = true game.logPlayer(who, "#LIGHT_RED#You feel the Blood of Life rushing through your veins.") @@ -512,8 +512,8 @@ newEntity{ base = "BASE_LEATHER_BOOT", unique = true, name = "Eden's Guile", image = "object/artifact/boots_edens_guile.png", moddable_tile = "special/boots_edens_guile", - unided_name = "pair of yellow boots", - desc = [[The boots of a Rogue outcast, who knew that the best way to deal with a problem was to run from it.]], + unided_name = _t"pair of yellow boots", + desc = _t[[The boots of a Rogue outcast, who knew that the best way to deal with a problem was to run from it.]], on_id_lore = "eden-guile", color = colors.YELLOW, level_range = {1, 20}, @@ -530,7 +530,7 @@ newEntity{ base = "BASE_LEATHER_BOOT", max_power = 50, power_regen = 1, use_power = { - name = function(self, who) return ("boost speed by %d%% (based on Cunning)"):format(100 * self.use_power.speedboost(self, who)) end, + name = function(self, who) return ("boost speed by %d%% (based on Cunning)"):tformat(100 * self.use_power.speedboost(self, who)) end, power = 50, speedboost = function(self, who) return math.min(0.20 + who:getCun() / 200, 0.7) end, use = function(self, who) @@ -544,10 +544,10 @@ newEntity{ base = "BASE_SHIELD", power_source = {nature=true, technique=true}, unique = true, name = "Fire Dragon Shield", image = "object/artifact/fire_dragon_shield.png", - unided_name = "dragon shield", + unided_name = _t"dragon shield", moddable_tile = "special/%s_fire_dragon_shield", moddable_tile_big = true, - desc = [[This large shield was made using scales of many fire drakes from the lost land of Tar'Eyal.]], + desc = _t[[This large shield was made using scales of many fire drakes from the lost land of Tar'Eyal.]], color = colors.LIGHT_RED, metallic = false, level_range = {27, 35}, @@ -572,7 +572,7 @@ newEntity{ base = "BASE_SHIELD", fatigue = 20, learn_talent = { [Talents.T_BLOCK] = 1, }, }, - on_block = {desc = "30% chance that you'll breathe fire in a cone at the attacker (if within range 6). This can only occur up to 4 times per turn.", fct = function(self, who, target, type, dam, eff) + on_block = {desc = _t"30% chance that you'll breathe fire in a cone at the attacker (if within range 6). This can only occur up to 4 times per turn.", fct = function(self, who, target, type, dam, eff) local hits = table.get(who.turn_procs, "flame_shield_procs") or 0 if hits and hits >= 4 then return end @@ -591,8 +591,8 @@ newEntity{ base = "BASE_SHIELD", name = "Titanic", image = "object/artifact/shield_titanic.png", moddable_tile = "special/%s_titanic", moddable_tile_big = true, - unided_name = "huge shield", - desc = [[This shield made of the darkest stralite is huge, heavy and very solid.]], + unided_name = _t"huge shield", + desc = _t[[This shield made of the darkest stralite is huge, heavy and very solid.]], color = colors.GREY, level_range = {20, 30}, rarity = 270, @@ -619,8 +619,8 @@ newEntity{ base = "BASE_SHIELD", power_source = {nature=true}, unique = true, name = "Black Mesh", image = "object/artifact/shield_mesh.png", - unided_name = "pile of tendrils", - desc = [[Black, interwoven tendrils form this mesh that can be used as a shield. It reacts visibly to your touch, clinging to your arm and engulfing it in a warm, black mass.]], + unided_name = _t"pile of tendrils", + desc = _t[[Black, interwoven tendrils form this mesh that can be used as a shield. It reacts visibly to your touch, clinging to your arm and engulfing it in a warm, black mass.]], color = colors.BLACK, level_range = {15, 30}, rarity = 270, @@ -645,7 +645,7 @@ newEntity{ base = "BASE_SHIELD", resists = { [DamageType.BLIGHT] = 25, [DamageType.DARKNESS] = 25, }, inc_stats = { [Stats.STAT_WIL] = 5, }, }, - on_block = {desc = "Up to once per turn, pull an attacker up to 15 spaces away into melee range, pinning and asphyxiating it", fct = function(self, who, src, type, dam, eff) + on_block = {desc = _t"Up to once per turn, pull an attacker up to 15 spaces away into melee range, pinning and asphyxiating it", fct = function(self, who, src, type, dam, eff) if not src then return end if who.turn_procs.black_mesh then return end if not src.canBe then return end @@ -656,7 +656,7 @@ newEntity{ base = "BASE_SHIELD", who:logCombat(src, "#ORCHID##Source#'s tendrils pull #Target# in!") src:pull(who.x, who.y, 15) else - game.logSeen(src, "#ORCHID#%s resists the tendrils' pull!", src.name:capitalize()) + game.logSeen(src, "#ORCHID#%s resists the tendrils' pull!", src:getName():capitalize()) end if core.fov.distance(who.x, who.y, src.x, src.y) <= 1 and src:canBe('pin') then src:setEffect(src.EFF_CONSTRICTED, 6, {src=who}) @@ -670,8 +670,8 @@ newEntity{ base = "BASE_LIGHT_ARMOR", unique = true, name = "Rogue Plight", image = "object/artifact/armor_rogue_plight.png", define_as = "ROGUE_PLIGHT", - unided_name = "blackened leather armour", - desc = [[No rogue blades shall incapacitate the wearer of this armour.]], + unided_name = _t"blackened leather armour", + desc = _t[[No rogue blades shall incapacitate the wearer of this armour.]], level_range = {25, 40}, rarity = 270, cost = 200, @@ -685,7 +685,7 @@ newEntity{ base = "BASE_LIGHT_ARMOR", on_takeoff = function(self, who) self.worn_by = nil end, - special_desc = function(self) return "Transfers a bleed, poison, or wound to its source or a nearby enemy every 4 turns." + special_desc = function(self) return _t"Transfers a bleed, poison, or wound to its source or a nearby enemy every 4 turns." end, wielder = { combat_def = 6, @@ -746,7 +746,7 @@ newEntity{ power_source = {nature=true}, unique = true, type = "misc", subtype="egg", - unided_name = "dark egg", + unided_name = _t"dark egg", define_as = "MUMMIFIED_EGGSAC", name = "Mummified Egg-sac of Ungolë", image = "object/artifact/mummified_eggsack.png", level_range = {20, 35}, @@ -755,13 +755,13 @@ newEntity{ display = "*", color=colors.DARK_GREY, encumber = 2, not_in_stores = true, - desc = [[Dry and dusty to the touch, it still seems to retain some shadow of life.]], + desc = _t[[Dry and dusty to the touch, it still seems to retain some shadow of life.]], carrier = { lite = -2, }, max_power = 100, power_regen = 1, - use_power = { name = "summon up to 2 spiders", power = 80, use = function(self, who) + use_power = { name = _t"summon up to 2 spiders", power = 80, use = function(self, who) if not who:canBe("summon") then game.logPlayer(who, "You cannot summon; you are suppressed!") return end local NPC = require "mod.class.NPC" @@ -798,8 +798,8 @@ newEntity{ base = "BASE_HELM", power_source = {technique=true}, unique = true, name = "Helm of the Dwarven Emperors", image = "object/artifact/helm_of_the_dwarven_emperors.png", - unided_name = "shining helm", - desc = [[A Dwarven helm embedded with a single diamond that can banish all underground shadows.]], + unided_name = _t"shining helm", + desc = _t[[A Dwarven helm embedded with a single diamond that can banish all underground shadows.]], level_range = {16, 28}, rarity = 240, cost = resolvers.rngrange(125,200), @@ -832,10 +832,10 @@ newEntity{ base = "BASE_KNIFE", power_source = {technique=true}, unique = true, name = "Silent Blade", image = "object/artifact/dagger_silent_blade.png", - unided_name = "shining dagger", + unided_name = _t"shining dagger", moddable_tile = "special/%s_dagger_silent_blade", moddable_tile_big = true, - desc = [[A thin, dark dagger that seems to meld seamlessly into the shadows.]], + desc = _t[[A thin, dark dagger that seems to meld seamlessly into the shadows.]], level_range = {23, 28}, rarity = 200, require = { stat = { cun=25 }, }, @@ -848,7 +848,7 @@ newEntity{ base = "BASE_KNIFE", dammod = {dex=0.55,str=0.35}, no_stealth_break = true, melee_project={[DamageType.RANDOM_SILENCE] = 10}, - special_on_kill = {desc="Enter stealth for 3 turns.", fct=function(combat, who, target) + special_on_kill = {desc=_t"Enter stealth for 3 turns.", fct=function(combat, who, target) who:setEffect(who.EFF_SILENT_STEALTH, 3, { power = 30 }) end}, }, @@ -862,10 +862,10 @@ newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_MOON", power_source = {arcane=true}, unique = true, name = "Moon", image = "object/artifact/dagger_moon.png", - unided_name = "crescent blade", + unided_name = _t"crescent blade", moddable_tile = "special/%s_dagger_moon", moddable_tile_big = true, - desc = [[A viciously curved blade that a folk story says is made from a material that originates from the moon. Devouring the light around it, it fades.]], + desc = _t[[A viciously curved blade that a folk story says is made from a material that originates from the moon. Devouring the light around it, it fades.]], level_range = {20, 50}, rarity = 200, require = { stat = { dex=24, cun=24 }, }, @@ -880,9 +880,9 @@ newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_MOON", local dam = special.damage(self, who) local str if self.set_complete then - str = ("Deal 200%% of your Cunning as Darkness damage (%d)."):format(dam) + str = ("Deal 200%% of your Cunning as Darkness damage (%d)."):tformat(dam) else - str = ("Deal %d Darkness damage."):format(dam) + str = ("Deal %d Darkness damage."):tformat(dam) end return str end, @@ -900,7 +900,7 @@ newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_MOON", }, set_list = { {"define_as","ART_PAIR_STAR"} }, set_desc = { - moon = "The moon shines alone in a starless sky.", + moon = _t"The moon shines alone in a starless sky.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","lite"}, 2) @@ -917,10 +917,10 @@ newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_STAR", power_source = {arcane=true}, unique = true, name = "Star", - unided_name = "jagged blade", image = "object/artifact/dagger_star.png", + unided_name = _t"jagged blade", image = "object/artifact/dagger_star.png", moddable_tile = "special/%s_dagger_star", moddable_tile_big = true, - desc = [[Legend tells of a blade, shining bright as a star. Forged from a material fallen from the skies, it glows.]], + desc = _t[[Legend tells of a blade, shining bright as a star. Forged from a material fallen from the skies, it glows.]], level_range = {20, 50}, rarity = 200, require = { stat = { dex=24, cun=24 }, }, @@ -935,9 +935,9 @@ newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_STAR", local dam = special.damage(self, who) local str if self.set_complete then - str = ("Deal 200%% of your Dexterity as Light damage (%d)."):format(dam) + str = ("Deal 200%% of your Dexterity as Light damage (%d)."):tformat(dam) else - str = ("Deal %d Light damage."):format(dam) + str = ("Deal %d Light damage."):tformat(dam) end return str end, @@ -955,7 +955,7 @@ newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_STAR", }, set_list = { {"define_as","ART_PAIR_MOON"} }, set_desc = { - star = "The star shines alone in a moonless sky.", + star = _t"The star shines alone in a moonless sky.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","lite"}, 2) @@ -969,8 +969,8 @@ newEntity{ base = "BASE_RING", power_source = {technique=true}, unique = true, name = "Ring of the War Master", color = colors.DARK_GREY, image = "object/artifact/ring_of_war_master.png", - unided_name = "blade-edged ring", - desc = [[A blade-edged ring that radiates power. As you put it on, strange thoughts of pain and destruction come to your mind.]], + unided_name = _t"blade-edged ring", + desc = _t[[A blade-edged ring that radiates power. As you put it on, strange thoughts of pain and destruction come to your mind.]], level_range = {40, 50}, rarity = 200, cost = 500, @@ -990,8 +990,8 @@ newEntity{ base = "BASE_GREATMAUL", power_source = {technique=true}, unique = true, name = "Unstoppable Mauler", color = colors.UMBER, image = "object/artifact/unstoppable_mauler.png", - unided_name = "heavy maul", - desc = [[A huge greatmaul of incredible weight. Wielding it, you feel utterly unstoppable.]], + unided_name = _t"heavy maul", + desc = _t[[A huge greatmaul of incredible weight. Wielding it, you feel utterly unstoppable.]], level_range = {23, 30}, rarity = 270, require = { stat = { str=40 }, }, @@ -1017,10 +1017,10 @@ newEntity{ base = "BASE_MACE", define_as = "CROOKED_CLUB", power_source = {technique=true}, unique = true, name = "Crooked Club", color = colors.GREEN, image = "object/artifact/weapon_crooked_club.png", - unided_name = "weird club", + unided_name = _t"weird club", moddable_tile = "special/%s_weapon_crooked_club", moddable_tile_big = true, - desc = [[An oddly twisted club with a hefty weight on the end. There's something very strange about it.]], + desc = _t[[An oddly twisted club with a hefty weight on the end. There's something very strange about it.]], level_range = {12, 20}, rarity = 192, require = { stat = { str=20 }, }, @@ -1036,7 +1036,7 @@ newEntity{ base = "BASE_MACE", define_as = "CROOKED_CLUB", [DamageType.PHYSICAL] = 30, }, - special_on_hit = {desc="Reduce targets accuracy and powers by 5 (stacks 5 times)", fct=function(combat, who, target) + special_on_hit = {desc=_t"Reduce targets accuracy and powers by 5 (stacks 5 times)", fct=function(combat, who, target) target:setEffect(target.EFF_CROOKED, 5, { power = 5 }) end}, }, @@ -1049,8 +1049,8 @@ newEntity{ base = "BASE_CLOTH_ARMOR", power_source = {nature=true}, unique = true, name = "Spider-Silk Robe of Spydrë", color = colors.DARK_GREEN, image = "object/artifact/robe_spider_silk_robe_spydre.png", - unided_name = "spider-silk robe", - desc = [[This set of robes is made wholly of spider silk. It looks outlandish and some sages think it came from another world, probably through a farportal.]], + unided_name = _t"spider-silk robe", + desc = _t[[This set of robes is made wholly of spider silk. It looks outlandish and some sages think it came from another world, probably through a farportal.]], level_range = {20, 30}, rarity = 190, cost = 250, @@ -1071,7 +1071,7 @@ newEntity{ base = "BASE_CLOTH_ARMOR", on_wear = function(self, who) if not game.state.spydre_mantra and who.player then game.state.spydre_mantra = true - require("engine.ui.Dialog"):simpleLongPopup("Huh?", "As you wear the strange set of robes, you notice something folded into one of its pockets...", 500, function() + require("engine.ui.Dialog"):simpleLongPopup(_t"Huh?", _t"As you wear the strange set of robes, you notice something folded into one of its pockets...", 500, function() game.party:learnLore("shiiak-mantra") end) end @@ -1083,8 +1083,8 @@ newEntity{ base = "BASE_HELM", define_as = "HELM_KROLTAR", power_source = {technique=true}, unique = true, name = "Dragon-helm of Kroltar", image = "object/artifact/dragon_helm_of_kroltar.png", - unided_name = "dragon-helm", - desc = [[A visored steel helm, embossed and embellished with gold, that bears as its crest the head of Kroltar, the greatest of the fire drakes.]], + unided_name = _t"dragon-helm", + desc = _t[[A visored steel helm, embossed and embellished with gold, that bears as its crest the head of Kroltar, the greatest of the fire drakes.]], require = { stat = { str=35 }, }, level_range = {37, 45}, rarity = 280, @@ -1105,7 +1105,7 @@ newEntity{ base = "BASE_HELM", define_as = "HELM_KROLTAR", use_talent = { id = Talents.T_BELLOWING_ROAR, level = 3, power = 45 }, set_list = { {"define_as","SCALE_MAIL_KROLTAR"} }, set_desc = { - kroltar = "Kroltar's power resides in his scales.", + kroltar = _t"Kroltar's power resides in his scales.", }, on_set_complete = function(self, who) local Stats = require "engine.interface.ActorStats" @@ -1125,8 +1125,8 @@ newEntity{ base = "BASE_HELM", power_source = {technique=true}, unique = true, name = "Crown of Command", image = "object/artifact/crown_of_command.png", - unided_name = "unblemished silver crown", - desc = [[This crown was worn by the Halfling king Roupar, who ruled over the Nargol lands in the Age of Dusk. Those were dark times, and the king enforced order and discipline under the harshest of terms. Any who deviated were punished, any who disagreed were repressed, and many disappeared without a trace into his numerous prisons. All must be loyal to the crown or suffer dearly. When he died without heir the crown was lost and his kingdom fell into chaos.]], + unided_name = _t"unblemished silver crown", + desc = _t[[This crown was worn by the Halfling king Roupar, who ruled over the Nargol lands in the Age of Dusk. Those were dark times, and the king enforced order and discipline under the harshest of terms. Any who deviated were punished, any who disagreed were repressed, and many disappeared without a trace into his numerous prisons. All must be loyal to the crown or suffer dearly. When he died without heir the crown was lost and his kingdom fell into chaos.]], require = { stat = { cun=25 } }, level_range = {20, 35}, rarity = 280, @@ -1161,8 +1161,8 @@ newEntity{ base = "BASE_GLOVES", power_source = {technique=true}, unique = true, name = "Gloves of the Firm Hand", image = "object/artifact/gloves_of_the_firm_hand.png", - unided_name = "heavy gloves", - desc = [[These gloves make you feel rock steady! These magical gloves feel really soft to the touch from the inside. On the outside, magical stones create a rough surface that is constantly shifting. When you brace yourself, a magical ray of earth energy seems to automatically bind them to the ground, granting you increased stability.]], + unided_name = _t"heavy gloves", + desc = _t[[These gloves make you feel rock steady! These magical gloves feel really soft to the touch from the inside. On the outside, magical stones create a rough surface that is constantly shifting. When you brace yourself, a magical ray of earth energy seems to automatically bind them to the ground, granting you increased stability.]], level_range = {17, 27}, rarity = 210, cost = 150, @@ -1188,8 +1188,8 @@ newEntity{ base = "BASE_GAUNTLETS", power_source = {arcane=true, technique=true}, unique = true, name = "Dakhtun's Gauntlets", color = colors.STEEL_BLUE, image = "object/artifact/dakhtuns_gauntlets.png", - unided_name = "expertly-crafted dwarven-steel gauntlets", - desc = [[Fashioned by Grand Smith Dakhtun in the Age of Allure, these dwarven-steel gauntlets have been etched with golden arcane runes and are said to grant the wearer unparalleled physical and magical might.]], + unided_name = _t"expertly-crafted dwarven-steel gauntlets", + desc = _t[[Fashioned by Grand Smith Dakhtun in the Age of Allure, these dwarven-steel gauntlets have been etched with golden arcane runes and are said to grant the wearer unparalleled physical and magical might.]], level_range = {40, 50}, rarity = 300, cost = resolvers.rngrange(700,1200), @@ -1218,8 +1218,8 @@ newEntity{ base = "BASE_GREATMAUL", power_source = {technique=true, arcane=true}, unique = true, name = "Voratun Hammer of the Deep Bellow", color = colors.LIGHT_RED, image = "object/artifact/voratun_hammer_of_the_deep_bellow.png", - unided_name = "flame scorched voratun hammer", - desc = [[The legendary hammer of the Dwarven master smiths. For ages it was used to forge powerful weapons with searing heat until it became highly powerful by itself.]], + unided_name = _t"flame scorched voratun hammer", + desc = _t[[The legendary hammer of the Dwarven master smiths. For ages it was used to forge powerful weapons with searing heat until it became highly powerful by itself.]], level_range = {38, 50}, rarity = 250, require = { stat = { str=48 }, }, @@ -1244,8 +1244,8 @@ newEntity{ base = "BASE_GLOVES", power_source = {nature=true}, define_as = "SET_GIANT_WRAPS", unique = true, name = "Snow Giant Wraps", color = colors.SANDY_BROWN, image = "object/artifact/snow_giant_arm_wraps.png", - unided_name = "fur-lined leather wraps", - desc = [[Two large pieces of leather designed to be wrapped about the hands and the forearms. This particular pair of wraps has been enchanted, imparting the wearer with great strength.]], + unided_name = _t"fur-lined leather wraps", + desc = _t[[Two large pieces of leather designed to be wrapped about the hands and the forearms. This particular pair of wraps has been enchanted, imparting the wearer with great strength.]], level_range = {15, 25}, rarity = 200, cost = 500, @@ -1270,7 +1270,7 @@ newEntity{ base = "BASE_GLOVES", set_list = { {"define_as", "SET_MIGHTY_GIRDLE"} }, set_desc = { - giantset = "This would be great with a mighty matching belt.", + giantset = _t"This would be great with a mighty matching belt.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","combat_dam"}, 10) @@ -1282,8 +1282,8 @@ newEntity{ base = "BASE_LEATHER_BELT", power_source = {technique=true}, define_as = "SET_MIGHTY_GIRDLE", unique = true, name = "Mighty Girdle", image = "object/artifact/belt_mighty_girdle.png", - unided_name = "massive, stained girdle", - desc = [[This girdle is enchanted with mighty wards against expanding girth. Whatever the source of its wondrous strength, it will prove of great aid in the transport of awkward burdens.]], + unided_name = _t"massive, stained girdle", + desc = _t[[This girdle is enchanted with mighty wards against expanding girth. Whatever the source of its wondrous strength, it will prove of great aid in the transport of awkward burdens.]], color = colors.LIGHT_RED, level_range = {5, 14}, rarity = 170, @@ -1299,7 +1299,7 @@ newEntity{ base = "BASE_LEATHER_BELT", set_list = { {"define_as", "SET_GIANT_WRAPS"} }, set_desc = { - giantset = "Some giant wraps would make you feel great.", + giantset = _t"Some giant wraps would make you feel great.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","max_life"}, 60) @@ -1317,8 +1317,8 @@ newEntity{ base = "BASE_CLOAK", power_source = {nature=true}, unique = true, name = "Serpentine Cloak", image = "object/artifact/serpentine_cloak.png", - unided_name = "tattered cloak", - desc = [[Cunning and malice seem to emanate from this cloak.]], + unided_name = _t"tattered cloak", + desc = _t[[Cunning and malice seem to emanate from this cloak.]], level_range = {20, 29}, rarity = 240, cost = resolvers.rngrange(225,350), @@ -1339,8 +1339,8 @@ newEntity{ base = "BASE_CLOTH_ARMOR", define_as = "CONCLAVE_ROBE", power_source = {arcane=true}, unique = true, name = "Vestments of the Conclave", color = colors.DARK_GREY, image = "object/artifact/robe_vestments_of_the_conclave.png", - unided_name = "tattered robe", - desc = [[An ancient set of robes that has survived from the Age of Allure. Primal magic forces inhabit it. + unided_name = _t"tattered robe", + desc = _t[[An ancient set of robes that has survived from the Age of Allure. Primal magic forces inhabit it. It was made by Humans for Humans; only they can harness the true power of the robes.]], level_range = {12, 22}, rarity = 220, @@ -1369,9 +1369,9 @@ newEntity{ base = "BASE_CLOTH_ARMOR", power_source = {arcane=true}, unique = true, name = "Firewalker", color = colors.RED, image = "object/artifact/robe_firewalker.png", - unided_name = "blazing robe", - desc = [[This fiery robe was worn by the mad pyromancer Halchot, who terrorised many towns in the late Age of Dusk, burning and looting villages as they tried to recover from the Spellblaze. Eventually he was tracked down by the Ziguranth, who cut out his tongue, chopped off his head, and rent his body to shreds. The head was encased in a block of ice and paraded through the streets of nearby towns amidst the cheers of the locals. Only this robe remains of the flames of Halchot.]], - special_desc = function(self) return "Damage all enemies in range 4 for 40 fire damage and yourself for 5 fire damage every turn." end, + unided_name = _t"blazing robe", + desc = _t[[This fiery robe was worn by the mad pyromancer Halchot, who terrorised many towns in the late Age of Dusk, burning and looting villages as they tried to recover from the Spellblaze. Eventually he was tracked down by the Ziguranth, who cut out his tongue, chopped off his head, and rent his body to shreds. The head was encased in a block of ice and paraded through the streets of nearby towns amidst the cheers of the locals. Only this robe remains of the flames of Halchot.]], + special_desc = function(self) return _t"Damage all enemies in range 4 for 40 fire damage and yourself for 5 fire damage every turn." end, level_range = {20, 30}, rarity = 300, cost = resolvers.rngrange(225,350), @@ -1428,8 +1428,8 @@ newEntity{ base = "BASE_CLOTH_ARMOR", power_source = {arcane=true}, unique = true, name = "Robe of the Archmage", color = colors.RED, image = "object/artifact/robe_of_the_archmage.png", - unided_name = "glittering robe", - desc = [[A plain elven-silk robe. It would be unremarkable if not for the sheer power it radiates.]], + unided_name = _t"glittering robe", + desc = _t[[A plain elven-silk robe. It would be unremarkable if not for the sheer power it radiates.]], level_range = {30, 40}, rarity = 290, cost = resolvers.rngrange(400,650), @@ -1456,8 +1456,8 @@ newEntity{ base = "BASE_CLOTH_ARMOR", define_as = "SET_TEMPORAL_ROBE", power_source = {arcane=true}, unique = true, name = "Temporal Augmentation Robe - Designed In-Style", color = colors.BLACK, image = "object/artifact/robe_temporal_augmentation_robe.png", - unided_name = "stylish robe with a scarf", - desc = [[Designed by a slightly quirky Paradox Mage, this robe always appears to be stylish in any time the user finds him, her, or itself in. Crafted to aid Paradox Mages through their adventures, this robe is of great help to those that understand what a wibbly-wobbly, timey-wimey mess time actually is. Curiously, as a result of a particularly prolonged battle involving its fourth wearer, the robe appends a very long, multi-coloured scarf to its present wearers.]], + unided_name = _t"stylish robe with a scarf", + desc = _t[[Designed by a slightly quirky Paradox Mage, this robe always appears to be stylish in any time the user finds him, her, or itself in. Crafted to aid Paradox Mages through their adventures, this robe is of great help to those that understand what a wibbly-wobbly, timey-wimey mess time actually is. Curiously, as a result of a particularly prolonged battle involving its fourth wearer, the robe appends a very long, multi-coloured scarf to its present wearers.]], level_range = {30, 40}, rarity = 310, cost = 540, @@ -1489,7 +1489,7 @@ newEntity{ base = "BASE_CLOTH_ARMOR", define_as = "SET_TEMPORAL_ROBE", set_list = { {"define_as", "SET_TEMPORAL_FEZ"} }, set_desc = { - tardis = "Oddly it never produces a hat.", + tardis = _t"Oddly it never produces a hat.", }, on_set_complete = function(self, who) end, @@ -1501,8 +1501,8 @@ newEntity{ base = "BASE_WIZARD_HAT", define_as = "SET_TEMPORAL_FEZ", power_source = {arcane=true, psionic=true}, unique = true, name = "Un'fezan's Cap", - unided_name = "red stylish hat", - desc = [[This fez once belonged to a traveler; it always seems to be found lying around in odd locations. + unided_name = _t"red stylish hat", + desc = _t[[This fez once belonged to a traveler; it always seems to be found lying around in odd locations. #{italic}#Fezzes are cool.#{normal}#]], color = colors.BLUE, image = "object/artifact/fez.png", moddable_tile = "special/fez", @@ -1530,7 +1530,7 @@ newEntity{ base = "BASE_WIZARD_HAT", define_as = "SET_TEMPORAL_FEZ", set_list = { {"define_as", "SET_TEMPORAL_ROBE"} }, set_desc = { - tardis = "Needs something equally stylish and cool to go with it.", + tardis = _t"Needs something equally stylish and cool to go with it.", }, on_set_complete = function(self, who) game.logPlayer(who, "#STEEL_BLUE#A time vortex briefly appears in front of you.") @@ -1549,11 +1549,11 @@ newEntity{ base = "BASE_WIZARD_HAT", define_as = "SET_TEMPORAL_FEZ", newEntity{ base = "BASE_BATTLEAXE", power_source = {technique=true}, unique = true, - unided_name = "crude iron battle axe", + unided_name = _t"crude iron battle axe", name = "Crude Iron Battle Axe of Kroll", color = colors.GREY, image = "object/artifact/crude_iron_battleaxe_of_kroll.png", moddable_tile = "special/%s_crude_iron_battleaxe_of_kroll", moddable_tile_big = true, - desc = [[Made in times before the Dwarves learned beautiful craftsmanship, the rough appearance of this axe belies its great power. Only Dwarves may harness its true strength, however.]], + desc = _t[[Made in times before the Dwarves learned beautiful craftsmanship, the rough appearance of this axe belies its great power. Only Dwarves may harness its true strength, however.]], require = { stat = { str=50 }, }, level_range = {39, 46}, rarity = 300, @@ -1586,9 +1586,9 @@ newEntity{ base = "BASE_BATTLEAXE", newEntity{ base = "BASE_WHIP", power_source = {nature=true}, - unided_name = "metal whip", + unided_name = _t"metal whip", name = "Scorpion's Tail", color=colors.GREEN, unique = true, image = "object/artifact/whip_scorpions_tail.png", - desc = [[A long whip of linked metal joints finished with a viciously sharp barb leaking terrible venom.]], + desc = _t[[A long whip of linked metal joints finished with a viciously sharp barb leaking terrible venom.]], require = { stat = { dex=28 }, }, cost = resolvers.rngrange(225,350), rarity = 340, @@ -1613,8 +1613,8 @@ newEntity{ base = "BASE_LEATHER_BELT", power_source = {nature=true}, unique = true, name = "Girdle of Preservation", image = "object/artifact/belt_girdle_of_preservation.png", - unided_name = "shimmering, flawless belt", - desc = [[A pristine belt of purest white leather with a runed voratun buckle. The ravages of neither time nor the elements have touched it.]], + unided_name = _t"shimmering, flawless belt", + desc = _t[[A pristine belt of purest white leather with a runed voratun buckle. The ravages of neither time nor the elements have touched it.]], color = colors.WHITE, level_range = {45, 50}, rarity = 400, @@ -1646,8 +1646,8 @@ newEntity{ base = "BASE_LEATHER_BELT", power_source = {nature=true}, unique = true, name = "Girdle of the Calm Waters", image = "object/artifact/girdle_of_the_calm_waters.png", - unided_name = "golden belt", - desc = [[A belt rumoured to have been worn by the Conclave healers.]], + unided_name = _t"golden belt", + desc = _t[[A belt rumoured to have been worn by the Conclave healers.]], color = colors.GOLD, level_range = {1, 25}, rarity = 120, @@ -1669,8 +1669,8 @@ newEntity{ base = "BASE_LIGHT_ARMOR", unique = true, name = "Behemoth Hide", image = "object/artifact/behemoth_skin.png", moddable_tile = "special/behemoth_skin", - unided_name = "tough weathered hide", - desc = [[A rough hide made from a massive beast. Seeing as it's so weathered but still usable, maybe it's a bit special...]], + unided_name = _t"tough weathered hide", + desc = _t[[A rough hide made from a massive beast. Seeing as it's so weathered but still usable, maybe it's a bit special...]], color = colors.BROWN, level_range = {18, 23}, rarity = 230, @@ -1699,11 +1699,11 @@ newEntity{ base = "BASE_LIGHT_ARMOR", define_as = "SKIN_OF_MANY", power_source = {technique=true}, unique = true, name = "Skin of Many", image = "object/artifact/robe_skin_of_many.png", - unided_name = "stitched skin armour", + unided_name = _t"stitched skin armour", moddable_tile = "special/skin_of_many", moddable_tile2 = "special/skin_of_many_legs", moddable_tile_big = true, - desc = [[The stitched-together skins of many creatures. Some eyes and mouths still decorate the robe, and some still live, screaming in tortured agony.]], + desc = _t[[The stitched-together skins of many creatures. Some eyes and mouths still decorate the robe, and some still live, screaming in tortured agony.]], color = colors.BROWN, level_range = {12, 22}, rarity = 200, @@ -1737,8 +1737,8 @@ newEntity{ base = "BASE_HEAVY_ARMOR", power_source = {arcane=true}, unique = true, name = "Iron Mail of Bloodletting", image = "object/artifact/iron_mail_of_bloodletting.png", - unided_name = "gore-encrusted suit of iron mail", - desc = [[Blood drips continuously from this fell suit of iron, and dark magics churn almost visibly around it. Bloody ruin comes to those who stand against its wearer.]], + unided_name = _t"gore-encrusted suit of iron mail", + desc = _t[[Blood drips continuously from this fell suit of iron, and dark magics churn almost visibly around it. Bloody ruin comes to those who stand against its wearer.]], color = colors.RED, level_range = {15, 25}, rarity = 190, @@ -1767,8 +1767,8 @@ newEntity{ base = "BASE_HEAVY_ARMOR", define_as = "SCALE_MAIL_KROLTAR", power_source = {technique=true, nature=true}, unique = true, name = "Scale Mail of Kroltar", image = "object/artifact/scale_mail_of_kroltar.png", - unided_name = "perfectly-wrought suit of dragon scales", - desc = [[A heavy shirt of scale mail constructed from the remains of Kroltar, whose armour was like tenfold shields.]], + unided_name = _t"perfectly-wrought suit of dragon scales", + desc = _t[[A heavy shirt of scale mail constructed from the remains of Kroltar, whose armour was like tenfold shields.]], color = colors.LIGHT_RED, metallic = false, level_range = {38, 45}, @@ -1794,7 +1794,7 @@ newEntity{ base = "BASE_HEAVY_ARMOR", define_as = "SCALE_MAIL_KROLTAR", use_talent = { id = Talents.T_DEVOURING_FLAME, level = 3, power = 50 }, set_list = { {"define_as","HELM_KROLTAR"} }, set_desc = { - kroltar = "Kroltar's head would turn up the heat.", + kroltar = _t"Kroltar's head would turn up the heat.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","max_life"}, 120) @@ -1807,8 +1807,8 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", power_source = {technique=true}, unique = true, name = "Cuirass of the Thronesmen", image = "object/artifact/armor_cuirass_of_the_thronesmen.png", - unided_name = "heavy dwarven-steel armour", - desc = [[This heavy dwarven-steel armour was created in the deepest forges of the Iron Throne. While it grants incomparable protection, it demands that you rely only on your own strength.]], + unided_name = _t"heavy dwarven-steel armour", + desc = _t[[This heavy dwarven-steel armour was created in the deepest forges of the Iron Throne. While it grants incomparable protection, it demands that you rely only on your own strength.]], color = colors.WHITE, level_range = {35, 40}, rarity = 320, @@ -1846,8 +1846,8 @@ newEntity{ base = "BASE_GREATSWORD", power_source = {psionic=true}, unique = true, name = "Golden Three-Edged Sword 'The Truth'", image = "object/artifact/golden_3_edged_sword.png", - unided_name = "three-edged sword", - desc = [[The wise ones say that truth is a three-edged sword. And sometimes, the truth hurts.]], + unided_name = _t"three-edged sword", + desc = _t[[The wise ones say that truth is a three-edged sword. And sometimes, the truth hurts.]], level_range = {27, 36}, require = { stat = { str=18, wil=18, cun=18 }, }, color = colors.GOLD, @@ -1862,7 +1862,7 @@ newEntity{ base = "BASE_GREATSWORD", apr = 9, physcrit = 9, dammod = {str=1.29}, - special_on_hit = {desc="9% chance to stun or confuse the target", fct=function(combat, who, target) + special_on_hit = {desc=_t"9% chance to stun or confuse the target", fct=function(combat, who, target) if not rng.percent(9) then return end local eff = rng.table{"stun", "confusion"} if not target:canBe(eff) then return end @@ -1878,10 +1878,10 @@ newEntity{ base = "BASE_GREATSWORD", newEntity{ base = "BASE_MACE", power_source = {nature=true}, name = "Ureslak's Femur", define_as = "URESLAK_FEMUR", image="object/artifact/club_ureslaks_femur.png", - unided_name = "a strangely colored bone", unique = true, + unided_name = _t"a strangely colored bone", unique = true, moddable_tile = "special/%s_club_ureslaks_femur", moddable_tile_big = true, - desc = [[A shortened femur of the mighty prismatic dragon Ureslak, this erratic club still resonates with his volatile nature.]], + desc = _t[[A shortened femur of the mighty prismatic dragon Ureslak, this erratic club still resonates with his volatile nature.]], level_range = {42, 50}, require = { stat = { str=45, dex=30 }, }, rarity = 400, @@ -1893,14 +1893,14 @@ newEntity{ base = "BASE_MACE", apr = 5, physcrit = 2.5, dammod = {str=1}, - special_on_hit = {desc="10% chance to shimmer to a different hue and gain powers", on_kill=1, fct=function(combat, who, target) + special_on_hit = {desc=_t"10% chance to shimmer to a different hue and gain powers", on_kill=1, fct=function(combat, who, target) if not rng.percent(10) then return end local o, item, inven_id = who:findInAllInventoriesBy("define_as", "URESLAK_FEMUR") if not o or not who:getInven(inven_id).worn then return end who:onTakeoff(o, inven_id, true) local b = rng.table(o.ureslak_bonuses) - o.name = "Ureslak's "..b.name.." Femur" + o.name = ("Ureslak's %s Femur"):tformat(b.name) o.combat.damtype = b.damtype o.wielder = b.wielder who:onWear(o, inven_id, true) @@ -1908,36 +1908,36 @@ newEntity{ base = "BASE_MACE", end }, }, ureslak_bonuses = { - { name = "Flaming", damtype = DamageType.FIREBURN, wielder = { + { name = _t"Flaming", damtype = DamageType.FIREBURN, wielder = { global_speed_add = 0.3, resists = { [DamageType.FIRE] = 45 }, resists_pen = { [DamageType.FIRE] = 30 }, inc_damage = { [DamageType.FIRE] = 30 }, } }, - { name = "Frozen", damtype = DamageType.ICE, wielder = { + { name = _t"Frozen", damtype = DamageType.ICE, wielder = { combat_armor = 15, resists = { [DamageType.COLD] = 45 }, resists_pen = { [DamageType.COLD] = 30 }, inc_damage = { [DamageType.COLD] = 30 }, } }, - { name = "Crackling", damtype = DamageType.LIGHTNING_DAZE, wielder = { + { name = _t"Crackling", damtype = DamageType.LIGHTNING_DAZE, wielder = { inc_stats = { [Stats.STAT_STR] = 6, [Stats.STAT_DEX] = 6, [Stats.STAT_CON] = 6, [Stats.STAT_CUN] = 6, [Stats.STAT_WIL] = 6, [Stats.STAT_MAG] = 6, }, resists = { [DamageType.LIGHTNING] = 45 }, resists_pen = { [DamageType.LIGHTNING] = 30 }, inc_damage = { [DamageType.LIGHTNING] = 30 }, } }, - { name = "Venomous", damtype = DamageType.POISON, wielder = { + { name = _t"Venomous", damtype = DamageType.POISON, wielder = { resists = { all = 15, [DamageType.NATURE] = 45 }, resists_pen = { [DamageType.NATURE] = 30 }, inc_damage = { [DamageType.NATURE] = 30 }, } }, - { name = "Starry", damtype = DamageType.DARKNESS_BLIND, wielder = { + { name = _t"Starry", damtype = DamageType.DARKNESS_BLIND, wielder = { combat_spellresist = 15, combat_mentalresist = 15, combat_physresist = 15, resists = { [DamageType.DARKNESS] = 45 }, resists_pen = { [DamageType.DARKNESS] = 30 }, inc_damage = { [DamageType.DARKNESS] = 30 }, } }, - { name = "Eldritch", damtype = DamageType.ARCANE, wielder = { + { name = _t"Eldritch", damtype = DamageType.ARCANE, wielder = { resists = { [DamageType.ARCANE] = 45 }, resists_pen = { [DamageType.ARCANE] = 30 }, inc_damage = { all = 12, [DamageType.ARCANE] = 30 }, @@ -1945,7 +1945,7 @@ newEntity{ base = "BASE_MACE", }, set_list = { {"define_as","URESLAK_CLOAK"} }, set_desc = { - ureslak = "What would happen if more of Ureslak's remains were reunited?", + ureslak = _t"What would happen if more of Ureslak's remains were reunited?", }, } @@ -1953,8 +1953,8 @@ newEntity{ base = "BASE_CLOAK", power_source = {nature=true}, unique = true, name = "Ureslak's Molted Scales", define_as = "URESLAK_CLOAK", image = "object/artifact/ureslaks_molted_scales.png", - unided_name = "scaly multi-hued cloak", - desc = [[This cloak is fashioned from the scales of some large reptilian creature. It appears to reflect every color of the rainbow.]], + unided_name = _t"scaly multi-hued cloak", + desc = _t[[This cloak is fashioned from the scales of some large reptilian creature. It appears to reflect every color of the rainbow.]], level_range = {40, 50}, rarity = 400, cost = 300, @@ -1982,12 +1982,12 @@ newEntity{ base = "BASE_CLOAK", name = function(self, who) local resists={"Fire", "Cold", "Lightning", "Nature", "Darkness"} if self.set_complete then table.insert(resists, "Arcane") end - return ("energize the scales for 16 turns, increasing resistance to %s damage by 15%% just before you are damaged. (This effect lasts 5 turns and only works on one type of damage.)"):format(table.concatNice(resists, ", ", ", or ")) + return ("energize the scales for 16 turns, increasing resistance to %s damage by 15%% just before you are damaged. (This effect lasts 5 turns and only works on one type of damage.)"):tformat(table.concatNice(table.capitalize(table.ts(table.lower(resists))), ", ", _t", or ")) end, tactical = { DEFEND = 1 }, power = 50, use = function(self, who) - game.logSeen(who, "%s empowers %s %s!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) + game.logSeen(who, "%s empowers %s %s!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) local resists = table.values({engine.DamageType.FIRE, engine.DamageType.COLD, engine.DamageType.LIGHTNING, engine.DamageType.NATURE, engine.DamageType.DARKNESS2, engine.DamageType.DARKNESS}) if self.set_complete then table.insert(resists, engine.DamageType.ARCANE) end who:setEffect(who.EFF_CHROMATIC_RESONANCE, 16, {resist_types=resists}) @@ -1996,7 +1996,7 @@ newEntity{ base = "BASE_CLOAK", }, set_list = { {"define_as","URESLAK_FEMUR"} }, set_desc = { - ureslak = "It would go well with another part of Ureslak.", + ureslak = _t"It would go well with another part of Ureslak.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","equilibrium_regen"}, -1) @@ -2013,11 +2013,11 @@ newEntity{ base = "BASE_CLOAK", -- Anti-mitigation DoT weapon newEntity{ base = "BASE_WARAXE", power_source = {psionic=true}, - unique = true, unided_name = "razor sharp war axe", + unique = true, unided_name = _t"razor sharp war axe", name = "Razorblade, the Cursed Waraxe", color = colors.LIGHT_BLUE, image = "object/artifact/razorblade_the_cursed_waraxe.png", moddable_tile = "special/%s_razorblade_the_cursed_waraxe", moddable_tile_big = true, - desc = [[This mighty axe can cleave through armour like the sharpest swords, yet hit with all the impact of a heavy club. + desc = _t[[This mighty axe can cleave through armour like the sharpest swords, yet hit with all the impact of a heavy club. It is said the wielder will slowly grow mad. This, however, has never been proven - no known possessor of this item has lived to tell the tale.]], require = { stat = { str=42 }, }, level_range = {40, 50}, @@ -2044,10 +2044,10 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "ART_PAIR_TWSWORD", power_source = {arcane=true}, unique = true, name = "Sword of Potential Futures", image = "object/artifact/sword_of_potential_futures.png", - unided_name = "under-wrought blade", + unided_name = _t"under-wrought blade", moddable_tile = "special/%s_sword_of_potential_futures", moddable_tile_big = true, - desc = [[Legend has it this blade is one of a pair: twin blades forged in the earliest of days of the Wardens. To an untrained wielder it is less than perfect; to a Warden, it represents the untapped potential of time.]], + desc = _t[[Legend has it this blade is one of a pair: twin blades forged in the earliest of days of the Wardens. To an untrained wielder it is less than perfect; to a Warden, it represents the untapped potential of time.]], level_range = {20, 30}, rarity = 250, require = { stat = { dex=24, mag=24 }, }, @@ -2080,10 +2080,10 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "ART_PAIR_TWSWORD", }, set_list = { {"define_as","ART_PAIR_TWDAG"} }, set_desc = { - twsword = "In the past there was a dagger with it.", + twsword = _t"In the past there was a dagger with it.", }, on_set_complete = function(self, who) - self.combat.special_on_hit = {desc="10% chance to reduce the target's resistances to all damage", fct=function(combat, who, target) + self.combat.special_on_hit = {desc=_t"10% chance to reduce the target's resistances to all damage", fct=function(combat, who, target) if not rng.percent(10) then return end target:setEffect(target.EFF_FLAWED_DESIGN, 3, {power=20}) end} @@ -2100,10 +2100,10 @@ newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_TWDAG", power_source = {arcane=true}, unique = true, name = "Dagger of the Past", image = "object/artifact/dagger_of_the_past.png", - unided_name = "rusted blade", + unided_name = _t"rusted blade", moddable_tile = "special/%s_dagger_of_the_past", moddable_tile_big = true, - desc = [[Legend has it this blade is one of a pair: twin blades forged in the earliest of days of the Wardens. To an untrained wielder it is less than perfect; to a Warden, it represents the opportunity to learn from the mistakes of the past.]], + desc = _t[[Legend has it this blade is one of a pair: twin blades forged in the earliest of days of the Wardens. To an untrained wielder it is less than perfect; to a Warden, it represents the opportunity to learn from the mistakes of the past.]], level_range = {20, 30}, rarity = 250, require = { stat = { dex=24, mag=24 }, }, @@ -2137,10 +2137,10 @@ newEntity{ base = "BASE_KNIFE", define_as = "ART_PAIR_TWDAG", }, set_list = { {"define_as","ART_PAIR_TWSWORD"} }, set_desc = { - twsword = "Potentially it would go with a sword in the future.", + twsword = _t"Potentially it would go with a sword in the future.", }, on_set_complete = function(self, who) - self.combat.special_on_hit = {desc="10% chance to return the target to a much younger state", fct=function(combat, who, target) + self.combat.special_on_hit = {desc=_t"10% chance to return the target to a much younger state", fct=function(combat, who, target) if not rng.percent(10) then return end target:setEffect(target.EFF_TURN_BACK_THE_CLOCK, 3, {power=10}) end} @@ -2156,8 +2156,8 @@ newEntity{ base = "BASE_GAUNTLETS", power_source = {arcane=true}, unique = true, name = "Stone Gauntlets of Harkor'Zun", image = "object/artifact/harkor_zun_gauntlets.png", - unided_name = "dark stone gauntlets", - desc = [[Fashioned in ancient times by cultists of Harkor'Zun, these heavy granite gauntlets were designed to protect the wearer from the wrath of their dark master.]], + unided_name = _t"dark stone gauntlets", + desc = _t[[Fashioned in ancient times by cultists of Harkor'Zun, these heavy granite gauntlets were designed to protect the wearer from the wrath of their dark master.]], level_range = {26, 31}, rarity = 210, encumber = 7, @@ -2191,8 +2191,8 @@ newEntity{ base = "BASE_AMULET", power_source = {arcane=true, psionic=true}, unique = true, name = "Unflinching Eye", color = colors.WHITE, image = "object/artifact/amulet_unflinching_eye.png", - unided_name = "a bloodshot eye", - desc = [[Someone has strung a thick black cord through this large bloodshot eyeball, allowing it to be worn around the neck, should you so choose.]], + unided_name = _t"a bloodshot eye", + desc = _t[[Someone has strung a thick black cord through this large bloodshot eyeball, allowing it to be worn around the neck, should you so choose.]], level_range = {30, 40}, rarity = 300, cost = 300, @@ -2214,8 +2214,8 @@ newEntity{ base = "BASE_DIGGER", power_source = {technique=true, arcane=true}, unique = true, name = "Pick of Dwarven Emperors", color = colors.GREY, image = "object/artifact/pick_of_dwarven_emperors.png", - unided_name = "crude iron pickaxe", - desc = [[This ancient pickaxe was used to pass down dwarven legends from one generation to the next. Every bit of the head and shaft is covered in runes that recount the stories of the dwarven people.]], + unided_name = _t"crude iron pickaxe", + desc = _t[[This ancient pickaxe was used to pass down dwarven legends from one generation to the next. Every bit of the head and shaft is covered in runes that recount the stories of the dwarven people.]], level_range = {40, 50}, rarity = 290, cost = 150, @@ -2249,8 +2249,8 @@ newEntity{ base = "BASE_ARROW", power_source = {arcane=true}, unique = true, name = "Quiver of the Sun", - unided_name = "bright quiver", - desc = [[This strange orange quiver is made of brass and etched with many bright red runes that glow and glitter in the light. The arrows themselves appear to be solid shafts of blazing hot light, like rays of sunshine, hammered and forged into a solid state.]], + unided_name = _t"bright quiver", + desc = _t[[This strange orange quiver is made of brass and etched with many bright red runes that glow and glitter in the light. The arrows themselves appear to be solid shafts of blazing hot light, like rays of sunshine, hammered and forged into a solid state.]], color = colors.BLUE, image = "object/artifact/quiver_of_the_sun.png", proj_image = "object/artifact/arrow_s_quiver_of_the_sun.png", level_range = {20, 40}, @@ -2276,8 +2276,8 @@ newEntity{ base = "BASE_ARROW", power_source = {psionic=true}, unique = true, name = "Quiver of Domination", - unided_name = "grey quiver", - desc = [[Powerful telepathic forces emanate from the arrows of this quiver. The tips appear dull, but touching them causes you intense pain.]], + unided_name = _t"grey quiver", + desc = _t[[Powerful telepathic forces emanate from the arrows of this quiver. The tips appear dull, but touching them causes you intense pain.]], color = colors.GREY, image = "object/artifact/quiver_of_domination.png", proj_image = "object/artifact/arrow_s_quiver_of_domination.png", level_range = {20, 40}, @@ -2292,7 +2292,7 @@ newEntity{ base = "BASE_ARROW", physcrit = 2, dammod = {dex=0.6, str=0.5, wil=0.2}, damtype = DamageType.MIND, - special_on_crit = {desc="dominate the target", fct=function(combat, who, target) + special_on_crit = {desc=_t"dominate the target", fct=function(combat, who, target) if not target or target == self then return end if target:canBe("instakill") then local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack()) @@ -2306,10 +2306,10 @@ newEntity{ base = "BASE_SHIELD", power_source = {nature=true, antimagic=true}, unique = true, name = "Blightstopper", - unided_name = "vine coated shield", + unided_name = _t"vine coated shield", moddable_tile = "special/%s_blightstopper", moddable_tile_big = true, - desc = [[This voratun shield, coated with thick vines, was imbued with nature's power long ago by the Halfling General Almadar Riul, who used it to stave off the magic and diseases of orcish corruptors during the peak of the Pyre Wars.]], + desc = _t[[This voratun shield, coated with thick vines, was imbued with nature's power long ago by the Halfling General Almadar Riul, who used it to stave off the magic and diseases of orcish corruptors during the peak of the Pyre Wars.]], color = colors.LIGHT_GREEN, image = "object/artifact/blightstopper.png", level_range = {36, 45}, rarity = 300, @@ -2343,7 +2343,7 @@ newEntity{ base = "BASE_SHIELD", use_power = { name = function(self, who) local effpower = self.use_power.effpower(self, who) - return ("purge up to %d diseases (based on Willpower) and gain disease immunity, %d%% blight resistance, and %d spell save for 5 turns"):format(self.use_power.nbdisease(self, who), effpower, effpower) + return ("purge up to %d diseases (based on Willpower) and gain disease immunity, %d%% blight resistance, and %d spell save for 5 turns"):tformat(self.use_power.nbdisease(self, who), effpower, effpower) end, tactical = {CURE = function(who, t, aitarget) -- cure diseases local nb, e = 0 @@ -2381,7 +2381,7 @@ newEntity{ base = "BASE_SHIELD", local effs = {} local known = false - game.logSeen(who, "%s holds %s %s close, cleansing %s of corruption!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true}), who:his_her_self()) + game.logSeen(who, "%s holds %s %s close, cleansing %s of corruption!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true}), who:his_her_self()) who:setEffect(who.EFF_PURGE_BLIGHT, 5, {power=self.use_power.effpower(self, who)}) -- Go through all spell effects @@ -2401,7 +2401,7 @@ newEntity{ base = "BASE_SHIELD", known = true end end - if known then game.logSeen(who, "%s is purged of diseases!", who.name:capitalize()) end + if known then game.logSeen(who, "%s is purged of diseases!", who:getName():capitalize()) end return {id=true, used=true} end, }, @@ -2422,8 +2422,8 @@ newEntity{ base = "BASE_SHOT", power_source = {arcane=true}, unique = true, name = "Star Shot", - unided_name = "blazing shot", - desc = [[Intense heat radiates from this powerful shot.]], + unided_name = _t"blazing shot", + desc = _t[[Intense heat radiates from this powerful shot.]], color = colors.RED, image = "object/artifact/star_shot.png", proj_image = "object/artifact/shot_s_star_shot.png", level_range = {25, 40}, @@ -2438,7 +2438,7 @@ newEntity{ base = "BASE_SHOT", physcrit = 10, dammod = {dex=0.7, cun=0.5}, damtype = DamageType.FIRE, - special_on_hit = {desc="sets off a powerful explosion", on_kill=1, fct=function(combat, who, target) + special_on_hit = {desc=_t"sets off a powerful explosion", on_kill=1, fct=function(combat, who, target) local tg = {type="ball", range=0, radius=3, friendlyfire=false} local grids = who:project(tg, target.x, target.y, engine.DamageType.FIREKNOCKBACK, {dist=3, dam=40 + who:getMag()*0.6 + who:getCun()*0.6}) game.level.map:particleEmitter(target.x, target.y, tg.radius, "ball_fire", {radius=tg.radius}) @@ -2451,7 +2451,7 @@ newEntity{ base = "BASE_MINDSTAR", power_source = {psionic=true}, unique = true, name = "Withered Force", define_as = "WITHERED_STAR", - unided_name = "dark mindstar", + unided_name = _t"dark mindstar", level_range = {28, 38}, color=colors.AQUAMARINE, rarity = 250, @@ -2485,14 +2485,14 @@ newEntity{ base = "BASE_MINDSTAR", hate_per_kill = 3, }, max_power = 40, power_regen = 1, - use_power = { name = "switch the weapon between an axe and a mindstar", power = 40, + use_power = { name = _t"switch the weapon between an axe and a mindstar", power = 40, use = function(self, who) if self.subtype == "mindstar" then ms_combat = table.clone(self.combat) --self.name = "Withered Axe" if self:isTalentActive (who.T_PSIBLADES) then self:forceUseTalent(who.T_PSIBLADES, {ignore_energy=true}) - game.logSeen(who, "%s rejects the inferior psionic blade!", self.name:capitalize()) + game.logSeen(who, "%s rejects the inferior psionic blade!", self:getName():capitalize()) end self.desc = [=[A hazy aura emanates from this dark axe, withering, thorny vines twisting around the handle.]=] self.subtype = "waraxe" @@ -2535,11 +2535,11 @@ newEntity{ base = "BASE_MINDSTAR", power_source = {psionic=true}, unique = true, name = "Nexus of the Way", - unided_name = "brilliant green mindstar", + unided_name = _t"brilliant green mindstar", level_range = {38, 50}, color=colors.AQUAMARINE, image = "object/artifact/nexus_of_the_way.png", rarity = 350, - desc = [[The vast psionic force of the Way reverberates through this gemstone. With a single touch, you can sense overwhelming power, and hear countless thoughts.]], + desc = _t[[The vast psionic force of the Way reverberates through this gemstone. With a single touch, you can sense overwhelming power, and hear countless thoughts.]], cost = 280, require = { stat = { wil=48 }, }, material_level = 5, @@ -2587,12 +2587,12 @@ newEntity{ base = "BASE_MINDSTAR", power_source = {psionic=true}, unique = true, name = "Amethyst of Sanctuary", - unided_name = "deep purple gem", + unided_name = _t"deep purple gem", level_range = {30, 38}, color=colors.AQUAMARINE, image = "object/artifact/amethyst_of_sanctuary.png", rarity = 250, - desc = [[This bright violet gem exudes a calming, focusing force. Holding it, you feel protected against outside forces.]], - special_desc = function(self) return "Reduce damage from attackers more than 3 tiles away by 25%" end, + desc = _t[[This bright violet gem exudes a calming, focusing force. Holding it, you feel protected against outside forces.]], + special_desc = function(self) return _t"Reduce damage from attackers more than 3 tiles away by 25%" end, cost = 185, require = { stat = { wil=28 }, }, material_level = 4, @@ -2632,11 +2632,11 @@ newEntity{ base = "BASE_STAFF", define_as = "SET_SCEPTRE_LICH", unique = true, name = "Sceptre of the Archlich", flavor_name = "vilestaff", - unided_name = "bone carved sceptre", + unided_name = _t"bone carved sceptre", level_range = {35, 50}, color=colors.VIOLET, image = "object/artifact/sceptre_of_the_archlich.png", rarity = 320, - desc = [[This sceptre, carved of ancient, blackened bone, holds a single gem of deep obsidian. You feel a dark power from deep within, looking to get out.]], + desc = _t[[This sceptre, carved of ancient, blackened bone, holds a single gem of deep obsidian. You feel a dark power from deep within, looking to get out.]], cost = resolvers.rngrange(700,1200), material_level = 5, @@ -2674,7 +2674,7 @@ newEntity{ base = "BASE_STAFF", define_as = "SET_SCEPTRE_LICH", end, set_list = { {"define_as", "SET_LICH_RING"} }, set_desc = { - archlich = "It desires to be surrounded by undeath.", + archlich = _t"It desires to be surrounded by undeath.", }, on_set_complete = function(self, who) end, @@ -2686,11 +2686,11 @@ newEntity{ base = "BASE_MINDSTAR", power_source = {nature=true, antimagic=true}, unique = true, name = "Oozing Heart", - unided_name = "slimy mindstar", + unided_name = _t"slimy mindstar", level_range = {27, 34}, color=colors.GREEN, image = "object/artifact/oozing_heart.png", rarity = 250, - desc = [[This mindstar oozes a thick, caustic liquid. Magic seems to die around it.]], + desc = _t[[This mindstar oozes a thick, caustic liquid. Magic seems to die around it.]], cost = 185, require = { stat = { wil=36 }, }, material_level = 4, @@ -2733,11 +2733,11 @@ newEntity{ base = "BASE_MINDSTAR", power_source = {nature=true}, unique = true, name = "Bloomsoul", - unided_name = "flower covered mindstar", + unided_name = _t"flower covered mindstar", level_range = {10, 20}, color=colors.GREEN, image = "object/artifact/bloomsoul.png", rarity = 180, - desc = [[Pristine flowers coat the surface of this mindstar. Touching it fills you with a sense of calm and refreshes your body.]], + desc = _t[[Pristine flowers coat the surface of this mindstar. Touching it fills you with a sense of calm and refreshes your body.]], cost = 40, require = { stat = { wil=18 }, }, material_level = 2, @@ -2764,11 +2764,11 @@ newEntity{ base = "BASE_STAFF", unique = true, name = "Gravitational Staff", flavor_name = "starstaff", - unided_name = "heavy staff", + unided_name = _t"heavy staff", level_range = {25, 33}, color=colors.VIOLET, image = "object/artifact/gravitational_staff.png", rarity = 240, - desc = [[Time and Space seem to warp and bend around the massive tip of this stave.]], + desc = _t[[Time and Space seem to warp and bend around the massive tip of this stave.]], cost = resolvers.rngrange(225,350), material_level = 3, require = { stat = { mag=35 }, }, @@ -2802,9 +2802,9 @@ newEntity{ base = "BASE_STAFF", newEntity{ base = "BASE_MINDSTAR", power_source = {nature=true}, name = "Eye of the Wyrm", define_as = "EYE_WYRM", - unided_name = "multi-colored mindstar", unique = true, - desc = [[A black iris cuts through the core of this mindstar, which shifts with myriad colours. It darts around, as if searching for something.]], - special_desc = function(self) return "The breath attack has a chance to shift randomly between Fire, Ice, Lightning, Acid, and Sand each turn." end, + unided_name = _t"multi-colored mindstar", unique = true, + desc = _t[[A black iris cuts through the core of this mindstar, which shifts with myriad colours. It darts around, as if searching for something.]], + special_desc = function(self) return _t"The breath attack has a chance to shift randomly between Fire, Ice, Lightning, Acid, and Sand each turn." end, color = colors.BLUE, image = "object/artifact/eye_of_the_wyrm.png", level_range = {30, 40}, require = { stat = { wil=45, }, }, @@ -2868,7 +2868,7 @@ newEntity{ base = "BASE_MINDSTAR", if not rng.percent(25) then return end self.use_talent.id=rng.table{ "T_FIRE_BREATH", "T_ICE_BREATH", "T_LIGHTNING_BREATH", "T_SAND_BREATH", "T_CORROSIVE_BREATH" } self.worn_by:check("useObjectEnable", self) --- game.logSeen(self.worn_by, "#GOLD#The %s shifts colour!", self.name:capitalize()) +-- game.logSeen(self.worn_by, "#GOLD#The %s shifts colour!", self:getName():capitalize()) end, max_power = 30, power_regen = 1, use_talent = { id = rng.table{ Talents.T_FIRE_BREATH, Talents.T_ICE_BREATH, Talents.T_LIGHTNING_BREATH, Talents.T_SAND_BREATH, Talents.T_CORROSIVE_BREATH }, level = 4, power = 30 } @@ -2877,9 +2877,9 @@ newEntity{ base = "BASE_MINDSTAR", newEntity{ base = "BASE_MINDSTAR", power_source = {nature=true}, name = "Great Caller", - unided_name = "humming mindstar", unique = true, image = "object", - desc = [[This mindstar constantly emits a low tone. Life seems to be pulled towards it.]], - special_desc = function(self) return "Gives a 30% chance that your nature summons appear as wild summons." end, + unided_name = _t"humming mindstar", unique = true, image = "object", + desc = _t[[This mindstar constantly emits a low tone. Life seems to be pulled towards it.]], + special_desc = function(self) return _t"Gives a 30% chance that your nature summons appear as wild summons." end, color = colors.GREEN, image = "object/artifact/great_caller.png", level_range = {20, 32}, require = { stat = { wil=34, }, }, @@ -2919,8 +2919,8 @@ newEntity{ base = "BASE_HELM", power_source = {arcane=true}, unique = true, name = "Corrupted Gaze", image = "object/artifact/corrupted_gaze.png", - unided_name = "dark visored helm", - desc = [[This helmet radiates a dark power. Its visor seems to twist and corrupt the vision of its wearer. You feel worried that if you were to lower it for long, the visions may affect your mind.]], + unided_name = _t"dark visored helm", + desc = _t[[This helmet radiates a dark power. Its visor seems to twist and corrupt the vision of its wearer. You feel worried that if you were to lower it for long, the visions may affect your mind.]], require = { stat = { mag=16 } }, level_range = {28, 40}, rarity = 300, @@ -2949,10 +2949,10 @@ newEntity{ base = "BASE_KNIFE", power_source = {arcane=true}, unique = true, name = "Umbral Razor", image = "object/artifact/dagger_umbral_razor.png", - unided_name = "shadowy dagger", + unided_name = _t"shadowy dagger", moddable_tile = "special/%s_dagger_silent_blade", moddable_tile_big = true, - desc = [[This dagger seems to be formed of pure shadows, with a strange miasma surrounding it.]], + desc = _t[[This dagger seems to be formed of pure shadows, with a strange miasma surrounding it.]], level_range = {12, 25}, rarity = 200, require = { stat = { dex=32 }, }, @@ -2966,11 +2966,11 @@ newEntity{ base = "BASE_KNIFE", convert_damage = { [DamageType.DARKNESS] = 50, }, - special_on_hit = {desc="20% chance to make the target bleed shadows. You heal for 15 whenever you hit an enemy bleeding shadows.", fct=function(combat, who, target) + special_on_hit = {desc=_t"20% chance to make the target bleed shadows. You heal for 15 whenever you hit an enemy bleeding shadows.", fct=function(combat, who, target) if target:canBe("cut") and rng.percent(20) then target:setEffect(target.EFF_SHADOW_CUT, 5, {apply_power=math.max(who:combatSpellpower(), who:combatAttack()), src=who, dam=20, heal=15}) else - game.logSeen(target, "%s resists the shadowy cut", target.name:capitalize()) + game.logSeen(target, "%s resists the shadowy cut", target:getName():capitalize()) end end}, }, @@ -2989,8 +2989,8 @@ newEntity{ base = "BASE_LEATHER_BELT", power_source = {technique=true}, unique = true, name = "Emblem of Evasion", color = colors.GOLD, - unided_name = "gold coated emblem", image = "object/artifact/emblem_of_evasion.png", - desc = [[Said to have belonged to a master of avoiding attacks, this gilded steel emblem symbolizes his talent.]], + unided_name = _t"gold coated emblem", image = "object/artifact/emblem_of_evasion.png", + desc = _t[[Said to have belonged to a master of avoiding attacks, this gilded steel emblem symbolizes his talent.]], level_range = {28, 38}, rarity = 200, cost = 450, @@ -3007,8 +3007,8 @@ newEntity{ base = "BASE_LEATHER_BELT", newEntity{ base = "BASE_LONGBOW", power_source = {technique=true}, - name = "Surefire", unided_name = "high-quality bow", unique=true, image = "object/artifact/surefire.png", - desc = [[This tightly strung bow appears to have been crafted by someone of considerable talent. When you pull the string, you feel incredible power behind it.]], + name = "Surefire", unided_name = _t"high-quality bow", unique=true, image = "object/artifact/surefire.png", + desc = _t[[This tightly strung bow appears to have been crafted by someone of considerable talent. When you pull the string, you feel incredible power behind it.]], level_range = {5, 15}, rarity = 200, require = { stat = { dex=18 }, }, @@ -3032,8 +3032,8 @@ newEntity{ base = "BASE_SHOT", unique = true, name = "Frozen Shards", image = "object/artifact/frozen_shards.png", proj_image = "object/artifact/shot_s_frozen_shards.png", - unided_name = "pouch of crystallized ice", - desc = [[In this dark blue pouch lie several small orbs of ice. A strange vapour surrounds them, and touching them chills you to the bone.]], + unided_name = _t"pouch of crystallized ice", + desc = _t[[In this dark blue pouch lie several small orbs of ice. A strange vapour surrounds them, and touching them chills you to the bone.]], color = colors.BLUE, level_range = {25, 40}, rarity = 300, @@ -3047,7 +3047,7 @@ newEntity{ base = "BASE_SHOT", physcrit = 10, dammod = {dex=0.7, cun=0.5}, damtype = DamageType.ICE, - special_on_hit = {desc="bursts into an icy cloud",on_kill=1, fct=function(combat, who, target) + special_on_hit = {desc=_t"bursts into an icy cloud",on_kill=1, fct=function(combat, who, target) local duration = 4 local radius = 1 local dam = (10 + who:getMag()/5 + who:getDex()/3) @@ -3068,9 +3068,9 @@ newEntity{ base = "BASE_SHOT", newEntity{ base = "BASE_WHIP", power_source = {arcane=true}, - unided_name = "electrified whip", + unided_name = _t"electrified whip", name = "Stormlash", color=colors.BLUE, unique = true, image = "object/artifact/stormlash.png", - desc = [[This steel plated whip arcs with intense electricity. The force feels uncontrollable, explosive, powerful.]], + desc = _t[[This steel plated whip arcs with intense electricity. The force feels uncontrollable, explosive, powerful.]], require = { stat = { dex=15 }, }, cost = resolvers.rngrange(50,80), rarity = 250, @@ -3082,7 +3082,7 @@ newEntity{ base = "BASE_WHIP", physcrit = 5, dammod = {dex=1}, convert_damage = {[DamageType.LIGHTNING_DAZE] = 50,}, - special_on_crit = {desc="Focus the lightning forces on an enemy", fct=function(combat, who, target) + special_on_crit = {desc=_t"Focus the lightning forces on an enemy", fct=function(combat, who, target) if rng.percent(25) then game.logPlayer(who, "The storm is on your side !") target:setEffect(target.EFF_HURRICANE, 5, {src=who, dam=who:getDex()*0.5+who:getMag()*0.5, radius=2 }) @@ -3099,7 +3099,7 @@ newEntity{ base = "BASE_WHIP", use_power = { name = function(self, who) local dam = who:damDesc(engine.DamageType.LIGHTNING, self.use_power.damage(self, who)) - return ("strike an enemy within range %d (for 100%% weapon damage as lightning) and release a radius %d burst of electricity dealing %0.2f to %0.2f lightning damage (based on Magic and Dexterity)"):format(self.use_power.range, self.use_power.radius, dam/3, dam) + return ("strike an enemy within range %d (for 100%% weapon damage as lightning) and release a radius %d burst of electricity dealing %0.2f to %0.2f lightning damage (based on Magic and Dexterity)"):tformat(self.use_power.range, self.use_power.radius, dam/3, dam) end, power = 10, range = 3, @@ -3130,9 +3130,9 @@ newEntity{ base = "BASE_WHIP", newEntity{ base = "BASE_WHIP", power_source = {psionic=true}, - unided_name = "gemmed whip handle", + unided_name = _t"gemmed whip handle", name = "Focus Whip", color=colors.YELLOW, unique = true, image = "object/artifact/focus_whip.png", - desc = [[A small mindstar rests at top of this handle. As you touch it, a translucent cord appears, flicking with your will.]], + desc = _t[[A small mindstar rests at top of this handle. As you touch it, a translucent cord appears, flicking with your will.]], require = { stat = { dex=15 }, }, cost = resolvers.rngrange(225,350), rarity = 250, @@ -3146,7 +3146,7 @@ newEntity{ base = "BASE_WHIP", dammod = {dex=0.7, wil=0.2, cun=0.1}, wil_attack = true, damtype=DamageType.MIND, - special_on_crit = {desc="Try to fry your enemies brain (25% chance to brainlock)", fct=function(combat, who, target) + special_on_crit = {desc=_t"Try to fry your enemies brain (25% chance to brainlock)", fct=function(combat, who, target) if rng.percent(25) then local maxpower = math.max(who:combatAttack(), who:combatMindpower()) target:crossTierEffect(target.EFF_BRAINLOCKED, maxpower) @@ -3159,7 +3159,7 @@ newEntity{ base = "BASE_WHIP", talent_on_hit = { [Talents.T_MINDLASH] = {level=1, chance=18} }, }, max_power = 10, power_regen = 1, - use_power = { name = "strike all targets in a line (for 100%% weapon damage as mind) out to range 4", power = 10, + use_power = { name = _t"strike all targets in a line (for 100%% weapon damage as mind) out to range 4", power = 10, range = 4, requires_target = true, tactical = {ATTACK = {weapon = 1, mind = 1}}, @@ -3185,11 +3185,11 @@ newEntity{ base = "BASE_GREATSWORD", power_source = {arcane=true, technique=true}, unique = true, name = "Latafayn", - unided_name = "flame covered greatsword", image = "object/artifact/latafayn.png", + unided_name = _t"flame covered greatsword", image = "object/artifact/latafayn.png", level_range = {32, 40}, color=colors.DARKRED, rarity = 300, - desc = [[This massive, flame-coated greatsword was stolen by the adventurer Kestin Highfin, during the Age of Dusk. It originally belonged to a demon named Frond'Ral the Red. It roars with vile flames and its very existence seems to be a blight upon the lands.]], + desc = _t[[This massive, flame-coated greatsword was stolen by the adventurer Kestin Highfin, during the Age of Dusk. It originally belonged to a demon named Frond'Ral the Red. It roars with vile flames and its very existence seems to be a blight upon the lands.]], cost = 400, require = { stat = { str=40 }, }, material_level = 4, @@ -3213,7 +3213,7 @@ newEntity{ base = "BASE_GREATSWORD", }, max_power = 25, power_regen = 1, use_power = { --slightly less obviously Pure's copy of Catalepsy - name = function(self, who) return ("accelerate burning effects on all creatures in a radius %d ball within range %d, consuming them to instantly inflict 125%% of all remaining burn damage"):format(self.use_power.radius(self, who), self.use_power.range(self, who)) end, + name = function(self, who) return ("accelerate burning effects on all creatures in a radius %d ball within range %d, consuming them to instantly inflict 125%% of all remaining burn damage"):tformat(self.use_power.radius(self, who), self.use_power.range(self, who)) end, power = 10, requires_target = true, range = function(self, who) return 5 end, @@ -3243,7 +3243,7 @@ newEntity{ base = "BASE_GREATSWORD", local tg = self.use_power.target(self, who) local x, y = who:getTarget(tg) if not x or not y then return nil end - game.logSeen(who, "%s's %s lashes out in a flaming arc, intensifying the burning of %s enemies!", who.name:capitalize(), self:getName({do_color = true, no_add_name = true}), who:his_her()) + game.logSeen(who, "%s's %s lashes out in a flaming arc, intensifying the burning of %s enemies!", who:getName():capitalize(), self:getName({do_color = true, no_add_name = true}), who:his_her()) who:project(tg, x, y, function(px, py) local target = game.level.map(px, py, engine.Map.ACTOR) if not target then return end @@ -3272,8 +3272,8 @@ newEntity{ base = "BASE_CLOTH_ARMOR", power_source = {psionic=true}, unique = true, name = "Robe of Force", color = colors.YELLOW, image = "object/artifact/robe_of_force.png", - unided_name = "rippling cloth robe", - desc = [[This thin cloth robe is surrounded by a pulsating shroud of telekinetic force.]], + unided_name = _t"rippling cloth robe", + desc = _t[[This thin cloth robe is surrounded by a pulsating shroud of telekinetic force.]], level_range = {20, 28}, rarity = 190, cost = 250, @@ -3293,7 +3293,7 @@ newEntity{ base = "BASE_CLOTH_ARMOR", use_power = { name = function(self, who) local dam = who:damDesc(engine.DamageType.PHYSICAL, self.use_power.damage(self, who)) - return ("send out a range %d beam of kinetic energy, dealing %0.2f to %0.2f physical damage (based on Willpower and Cunning) with knockback"):format(self.use_power.range, 0.8*dam, dam) end, + return ("send out a range %d beam of kinetic energy, dealing %0.2f to %0.2f physical damage (based on Willpower and Cunning) with knockback"):tformat(self.use_power.range, 0.8*dam, dam) end, power = 10, damage = function(self, who) return 15 + who:getWil()/3 + who:getCun()/3 end, range =5, @@ -3305,7 +3305,7 @@ newEntity{ base = "BASE_CLOTH_ARMOR", local tg = self.use_power.target(self, who) local x, y = who:getTarget(tg) if not x or not y then return nil end - game.logSeen(who, "%s focuses a beam of force from %s %s!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) + game.logSeen(who, "%s focuses a beam of force from %s %s!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) who:project(tg, x, y, engine.DamageType.MINDKNOCKBACK, who:mindCrit(rng.avg(0.8*dam, dam))) game.level.map:particleEmitter(who.x, who.y, tg.radius, "matter_beam", {tx=x-who.x, ty=y-who.y}) return {id=true, used=true} @@ -3317,11 +3317,11 @@ newEntity{ base = "BASE_MINDSTAR", power_source = {nature=true}, unique = true, name = "Serpent's Glare", image = "object/artifact/serpents_glare.png", - unided_name = "venomous gemstone", + unided_name = _t"venomous gemstone", level_range = {1, 10}, color=colors.GREEN, rarity = 180, - desc = [[A thick venom drips from this mindstar.]], + desc = _t[[A thick venom drips from this mindstar.]], cost = 20, require = { stat = { wil=12 }, }, material_level = 1, @@ -3353,12 +3353,12 @@ newEntity{ base = "BASE_LEATHER_CAP", power_source = {psionic=true}, unique = true, name = "The Inner Eye", image = "object/artifact/the_inner_eye.png", - unided_name = "engraved marble eye", + unided_name = _t"engraved marble eye", level_range = {24, 32}, color=colors.WHITE, encumber = 1, rarity = 140, - desc = [[This thick blindfold, with an embedded marble eye, is said to allow the wearer to sense beings around them, at the cost of physical sight. + desc = _t[[This thick blindfold, with an embedded marble eye, is said to allow the wearer to sense beings around them, at the cost of physical sight. You suspect the effects will require a moment to recover from.]], cost = 200, material_level=3, @@ -3388,10 +3388,10 @@ newEntity{ base = "BASE_LONGSWORD", define_as="CORPUS", power_source = {unknown=true, technique=true}, unique = true, name = "Corpathus", image = "object/artifact/corpus.png", - unided_name = "bound sword", + unided_name = _t"bound sword", moddable_tile = "special/%s_corpus", moddable_tile_big = true, - desc = [[Thick straps encircle this blade. Jagged edges like teeth travel down the blade, bisecting it. It fights to overcome the straps, but lacks the strength.]], + desc = _t[[Thick straps encircle this blade. Jagged edges like teeth travel down the blade, bisecting it. It fights to overcome the straps, but lacks the strength.]], level_range = {20, 30}, rarity = 250, require = { stat = { str=40, }, }, @@ -3403,7 +3403,7 @@ newEntity{ base = "BASE_LONGSWORD", define_as="CORPUS", physcrit = 4, dammod = {str=1,}, melee_project={[DamageType.DRAINLIFE] = 18}, - special_on_kill = {desc="grows dramatically in power", fct=function(combat, who, target) + special_on_kill = {desc=_t"grows dramatically in power", fct=function(combat, who, target) local o, item, inven_id = who:findInAllInventoriesBy("define_as", "CORPUS") if not o or not who:getInven(inven_id).worn then return end who:onTakeoff(o, inven_id, true) @@ -3413,7 +3413,7 @@ newEntity{ base = "BASE_LONGSWORD", define_as="CORPUS", if not rng.percent(o.combat.physcrit*0.8) or o.combat.physcrit < 30 then return end o.summon(o, who) end}, - special_on_crit = {desc="grows in power", on_kill=1, fct=function(combat, who, target) + special_on_crit = {desc=_t"grows in power", on_kill=1, fct=function(combat, who, target) local o, item, inven_id = who:findInAllInventoriesBy("define_as", "CORPUS") if not o or not who:getInven(inven_id).worn then return end who:onTakeoff(o, inven_id, true) @@ -3434,9 +3434,9 @@ newEntity{ base = "BASE_LONGSWORD", define_as="CORPUS", local m = NPC.new{ type = "horror", subtype = "eldritch", display = "h", - name = "Vilespawn", color=colors.GREEN, + name = _t"Vilespawn", color=colors.GREEN, image="npc/horror_eldritch_oozing_horror.png", - desc = "This mass of putrid slime burst from Corpathus, and seems quite hungry.", + desc = _t"This mass of putrid slime burst from Corpathus, and seems quite hungry.", body = { INVEN = 10, MAINHAND=1, OFFHAND=1, }, rank = 2, life_rating = 8, exp_worth = 0, @@ -3478,7 +3478,7 @@ newEntity{ base = "BASE_LONGSWORD", define_as="CORPUS", control="no", temporary_level = true, type="minion", - title="Vilespawn", + title=_t"Vilespawn", }) end end, @@ -3495,10 +3495,10 @@ newEntity{ base = "BASE_LONGSWORD", power_source = {unknown=true, psionic=true}, unique = true, name = "Anmalice", image = "object/artifact/anima.png", define_as = "ANIMA", - unided_name = "twisted blade", + unided_name = _t"twisted blade", moddable_tile = "special/%s_anmalice", moddable_tile_big = true, - desc = [[The eye on the hilt of this blade seems to glare at you, piercing your soul and mind. Tentacles surround the hilt, latching onto your hand.]], + desc = _t[[The eye on the hilt of this blade seems to glare at you, piercing your soul and mind. Tentacles surround the hilt, latching onto your hand.]], level_range = {30, 40}, rarity = 250, require = { stat = { str=32, wil=20, }, }, @@ -3510,7 +3510,7 @@ newEntity{ base = "BASE_LONGSWORD", physcrit = 7, dammod = {str=1,wil=0.1}, damage_convert = {[DamageType.MIND]=20,}, - special_on_hit = {desc="torments the target with many mental effects", fct=function(combat, who, target) + special_on_hit = {desc=_t"torments the target with many mental effects", fct=function(combat, who, target) if not who:checkHit(who:combatMindpower(), target:combatMentalResist()*0.9) then return end target:setEffect(target.EFF_WEAKENED_MIND, 2, {power=0, save=20}) if not rng.percent(40) then return end @@ -3524,7 +3524,7 @@ newEntity{ base = "BASE_LONGSWORD", elseif eff == "silence" then target:setEffect(target.EFF_SILENCED, 3, {}) end end}, - special_on_kill = {desc="reduces mental save penalty", fct=function(combat, who, target) + special_on_kill = {desc=_t"reduces mental save penalty", fct=function(combat, who, target) local o, item, inven_id = who:findInAllInventoriesBy("define_as", "ANIMA") if not o or not who:getInven(inven_id).worn then return end if o.wielder.combat_mentalresist >= 0 then return end @@ -3587,8 +3587,8 @@ newEntity{ base = "BASE_LONGSWORD", define_as="MORRIGOR", name = "Morrigor", image = "object/artifact/morrigor.png", moddable_tile = "special/%s_morrigor", moddable_tile_big = true, - unided_name = "jagged, segmented, sword", - desc = [[This heavy, ridged blade emanates magical power, yet as you grasp the handle an icy chill runs its course through your spine. You feel the disembodied presence of all those slain by it. In unison, they demand company.]], + unided_name = _t"jagged, segmented, sword", + desc = _t[[This heavy, ridged blade emanates magical power, yet as you grasp the handle an icy chill runs its course through your spine. You feel the disembodied presence of all those slain by it. In unison, they demand company.]], level_range = {20, 30}, rarity = 250, require = { stat = { mag=40, }, }, @@ -3601,7 +3601,7 @@ newEntity{ base = "BASE_LONGSWORD", define_as="MORRIGOR", dammod = {str=0.6, mag=0.6}, special_on_hit = {desc=function(self, who, special) local dam = special.damage(self, who) - return ("deal %0.2f arcane and %0.2f darkness damage (based on Magic) in a radius 1 around the target"):format(who:damDesc(engine.DamageType.ARCANE, dam), who:damDesc(engine.DamageType.DARKNESS, dam)) + return ("deal %0.2f arcane and %0.2f darkness damage (based on Magic) in a radius 1 around the target"):tformat(who:damDesc(engine.DamageType.ARCANE, dam), who:damDesc(engine.DamageType.DARKNESS, dam)) end, damage = function(self, who) return who:getMag()*0.5 end, fct=function(combat, who, target, dam, special) @@ -3610,7 +3610,7 @@ newEntity{ base = "BASE_LONGSWORD", define_as="MORRIGOR", who:project(tg, target.x, target.y, engine.DamageType.ARCANE, damage) who:project(tg, target.x, target.y, engine.DamageType.DARKNESS, damage) end}, - special_on_kill = {desc="swallows the victim's soul, gaining a new power", fct=function(combat, who, target) + special_on_kill = {desc=_t"swallows the victim's soul, gaining a new power", fct=function(combat, who, target) local o, item, inven_id = who:findInAllInventoriesBy("define_as", "MORRIGOR") if o.use_talent then return end local got_talent = false @@ -3633,11 +3633,11 @@ newEntity{ base = "BASE_LONGSWORD", define_as="MORRIGOR", o.use_talent.power = (target:getTalentCooldown(t, true) or 5) target.talents[t.id] = get_talent o.use_talent.name = ((t.display_entity and t.display_entity:getDisplayString() or "")..t.name):toString() - o.use_talent.message = "@Source@ taps the #SALMON#trapped soul#LAST# of "..target.name..", xmanifesting "..o.use_talent.name.."!" + o.use_talent.message = ("@Source@ taps the #SALMON#trapped soul#LAST# of %s, xmanifesting %s!"):tformat(target:getName(), o.use_talent.name) o.power = 1 o.max_power = o.use_talent.power o.power_regen = 1 - game.logSeen(who, "%s's %s #SALMON#CONSUMES THE SOUL#LAST# of %s, gaining the power of %s!", who.name:capitalize(), o:getName({no_add_name = true, do_color = true}), target.name, o.use_talent.name) + game.logSeen(who, "%s's %s #SALMON#CONSUMES THE SOUL#LAST# of %s, gaining the power of %s!", who:getName():capitalize(), o:getName({no_add_name = true, do_color = true}), target:getName(), o.use_talent.name) who:check("useObjectEnable", o, inven_id, item) end end}, @@ -3657,8 +3657,8 @@ newEntity{ base = "BASE_WHIP", define_as = "HYDRA_BITE", power_source = {technique=true, nature=true}, unique = true, name = "Hydra's Bite", color = colors.LIGHT_RED, image = "object/artifact/hydras_bite.png", - unided_name = "triple headed flail", - desc = [[This three-headed stralite flail strikes with the power of a hydra. With each attack it lashes out, hitting everyone around you.]], + unided_name = _t"triple headed flail", + desc = _t[[This three-headed stralite flail strikes with the power of a hydra. With each attack it lashes out, hitting everyone around you.]], level_range = {32, 40}, rarity = 250, require = { stat = { str=40 }, }, @@ -3672,7 +3672,7 @@ newEntity{ base = "BASE_WHIP", define_as = "HYDRA_BITE", dammod = {str=0.9, dex=0.4}, talent_on_hit = { [Talents.T_LIGHTNING_BREATH_HYDRA] = {level=3, chance=10}, [Talents.T_ACID_BREATH] = {level=3, chance=10}, [Talents.T_POISON_BREATH] = {level=3, chance=10} }, --convert_damage = {[DamageType.NATURE]=25,[DamageType.ACID]=25,[DamageType.LIGHTNING]=25}, - special_on_hit = {desc="hit up to two adjacent enemies",on_kill=1, fct=function(combat, who, target) + special_on_hit = {desc=_t"hit up to two adjacent enemies",on_kill=1, fct=function(combat, who, target) local o, item, inven_id = who:findInAllInventoriesBy("define_as", "HYDRA_BITE") if not o or not who:getInven(inven_id).worn then return end local tgts = {} @@ -3693,7 +3693,7 @@ newEntity{ base = "BASE_WHIP", define_as = "HYDRA_BITE", o.running = 1 if tries >= 100 or #tgts==1 then twohits=nil end if twohits then - who:logCombat(target1, "#Source#'s three headed flail lashes at #Target#%s!",who:canSee(target2) and (" and %s"):format(target2.name:capitalize()) or "") + who:logCombat(target1, "#Source#'s three headed flail lashes at #Target#%s!",who:canSee(target2) and (" and %s"):tformat(target2.name:capitalize()) or "") else who:logCombat(target1, "#Source#'s three headed flail lashes at #Target#!") end @@ -3713,9 +3713,9 @@ newEntity{ base = "BASE_GAUNTLETS", define_as = "GAUNTLETS_SPELLHUNT", unique = true, name = "Spellhunt Remnants", color = colors.GREY, image = "object/artifact/spellhunt_remnants.png", - unided_name = "heavily corroded voratun gauntlets", - desc = [[These once brilliant voratun gauntlets have fallen into a deep decay. Originally used in the spellhunt, they were often used to destroy arcane artifacts, curing the world of their influence.]], - special_desc = function(self) return "Can't be worn by those with arcane powers." end, + unided_name = _t"heavily corroded voratun gauntlets", + desc = _t[[These once brilliant voratun gauntlets have fallen into a deep decay. Originally used in the spellhunt, they were often used to destroy arcane artifacts, curing the world of their influence.]], + special_desc = function(self) return _t"Can't be worn by those with arcane powers." end, -- material_level = 1, --Special: this artifact can appear anywhere and adjusts its material level to the zone level_range = {1, nil}, rarity = 550, -- Extra rare to make it not ALWAYS appear. @@ -3768,8 +3768,8 @@ newEntity{ base = "BASE_GAUNTLETS", self.wielded=nil self.material_level = level if level == 2 then -- LEVEL 2 - self.unided_name = "corroded voratun gauntlets" - self.desc = [[These once brilliant voratun gauntlets appear heavily decayed. Originally used in the spellhunt, they were often used to destroy arcane artifacts, ridding the world of their influence.]] + self.unided_name = _t"corroded voratun gauntlets" + self.desc = _t[[These once brilliant voratun gauntlets appear heavily decayed. Originally used in the spellhunt, they were often used to destroy arcane artifacts, ridding the world of their influence.]] self.wielder={ combat_mindpower=6, combat_mindcrit=6, @@ -3792,8 +3792,8 @@ newEntity{ base = "BASE_GAUNTLETS", }, } elseif level == 3 then -- LEVEL 3 - self.unided_name = "tarnished voratun gauntlets" - self.desc = [[These voratun gauntlets appear to have suffered considerable damage. Originally used in the spellhunt, they were often used to destroy arcane artifacts, ridding the world of their influence.]] + self.unided_name = _t"tarnished voratun gauntlets" + self.desc = _t[[These voratun gauntlets appear to have suffered considerable damage. Originally used in the spellhunt, they were often used to destroy arcane artifacts, ridding the world of their influence.]] self.wielder={ combat_mindpower=8, combat_mindcrit=9, @@ -3816,8 +3816,8 @@ newEntity{ base = "BASE_GAUNTLETS", }, } elseif level == 4 then -- LEVEL 4 - self.unided_name = "slightly tarnished voratun gauntlets" - self.desc = [[These voratun gauntlets shine brightly beneath a thin layer of wear. Originally used in the spellhunt, they were often used to destroy arcane artifacts, ridding the world of their influence.]] + self.unided_name = _t"slightly tarnished voratun gauntlets" + self.desc = _t[[These voratun gauntlets shine brightly beneath a thin layer of wear. Originally used in the spellhunt, they were often used to destroy arcane artifacts, ridding the world of their influence.]] self.wielder={ combat_mindpower=10, combat_mindcrit=12, @@ -3840,8 +3840,8 @@ newEntity{ base = "BASE_GAUNTLETS", }, } elseif level >= 5 then -- LEVEL 5 - self.unided_name = "gleaming voratun gauntlets" - self.desc = [[These brilliant voratun gauntlets shine with an almost otherworldly glow. Originally used in the spellhunt, they were often used to destroy arcane artifacts, ridding the world of their influence. Pride in the fulfillment of this ancient duty practically radiates from them.]] + self.unided_name = _t"gleaming voratun gauntlets" + self.desc = _t[[These brilliant voratun gauntlets shine with an almost otherworldly glow. Originally used in the spellhunt, they were often used to destroy arcane artifacts, ridding the world of their influence. Pride in the fulfillment of this ancient duty practically radiates from them.]] self.wielder={ combat_mindpower=12, combat_mindcrit=15, @@ -3867,7 +3867,7 @@ newEntity{ base = "BASE_GAUNTLETS", self.use_power = { name = function(self, who) dam = who:damDesc(engine.DamageType.ARCANE, self.use_power.unnaturaldam(self, who)) - return ("attempt to destroy all magic effects and sustains on creatures in a radius %d cone (unnatural creatures are additionally dealt %0.2f arcane damage and stunned)"):format(self.use_power.radius, dam) + return ("attempt to destroy all magic effects and sustains on creatures in a radius %d cone (unnatural creatures are additionally dealt %0.2f arcane damage and stunned)"):tformat(self.use_power.radius, dam) end, power = 100, unnaturaldam = function(self, who) return 100+who:combatMindpower() end, @@ -3904,7 +3904,7 @@ newEntity{ base = "BASE_GAUNTLETS", local tg = self.use_power.target(self, who) local x, y = who:getTarget(tg) if not x or not y then return nil end - game.logSeen(who, "%s unleashes antimagic forces from %s %s!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) + game.logSeen(who, "%s unleashes antimagic forces from %s %s!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) who:project(tg, x, y, function(px, py) local target = game.level.map(px, py, engine.Map.ACTOR) if not target then return end @@ -3935,7 +3935,7 @@ newEntity{ base = "BASE_GAUNTLETS", end end if target.undead or target.construct then - game.logSeen(target, "%s's animating magic is disrupted by the burst of power!", target.name:capitalize()) + game.logSeen(target, "%s's animating magic is disrupted by the burst of power!", target:getName():capitalize()) who:project({type="hit"}, target.x, target.y, engine.DamageType.ARCANE, self.use_power.unnaturaldam(self, who)) if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 10, {apply_power=who:combatMindpower()}) end end @@ -3951,7 +3951,7 @@ newEntity{ base = "BASE_GAUNTLETS", end, max_power = 150, power_regen = 1, use_power = { - name = "destroy an arcane item (of a higher tier than the gauntlets)", power = 1, + name = _t"destroy an arcane item (of a higher tier than the gauntlets)", power = 1, no_npc_use = true, use = function(self, who, obj_inven, obj_item) if self.tinker then @@ -3959,7 +3959,7 @@ newEntity{ base = "BASE_GAUNTLETS", return end - local d = who:showInventory("Destroy which item?", who:getInven("INVEN"), function(o) return o.unique and o.power_source and o.power_source.arcane and o.power_source.arcane and o.power_source.arcane == true and o.material_level and o.material_level > self.material_level end, function(o, item, inven) + local d = who:showInventory(_t"Destroy which item?", who:getInven("INVEN"), function(o) return o.unique and o.power_source and o.power_source.arcane and o.power_source.arcane and o.power_source.arcane == true and o.material_level and o.material_level > self.material_level end, function(o, item, inven) if o.material_level <= self.material_level then return end self.material_level=self.material_level + 1 game.logPlayer(who, "You crush the %s, and the gloves take on an illustrious shine!", o:getName{do_color=true}) @@ -3977,8 +3977,8 @@ newEntity{ base = "BASE_GAUNTLETS", newEntity{ base = "BASE_LONGBOW", power_source = {arcane=true}, - name = "Merkul's Second Eye", unided_name = "sleek stringed bow", unique=true, image = "object/artifact/merkuls_second_eye.png", - desc = [[This bow is said to have been the tool of an infamous dwarven spy. Rumours say it allowed him to "steal" the eyes of his enemies. Adversaries struck were left alive, only to unknowingly divulge their secrets to his unwavering sight.]], + name = "Merkul's Second Eye", unided_name = _t"sleek stringed bow", unique=true, image = "object/artifact/merkuls_second_eye.png", + desc = _t[[This bow is said to have been the tool of an infamous dwarven spy. Rumours say it allowed him to "steal" the eyes of his enemies. Adversaries struck were left alive, only to unknowingly divulge their secrets to his unwavering sight.]], level_range = {20, 38}, rarity = 250, require = { stat = { dex=24 }, }, @@ -3999,12 +3999,12 @@ newEntity{ base = "BASE_SHIELD", power_source = {nature=true}, unique = true, name = "Summertide", - unided_name = "shining gold shield", image = "object/artifact/summertide.png", + unided_name = _t"shining gold shield", image = "object/artifact/summertide.png", moddable_tile = "special/%s_hand_summertide", moddable_tile_big = true, level_range = {38, 50}, color=colors.GOLD, rarity = 350, - desc = [[A bright light shines from the center of this shield. Holding it clears your mind.]], + desc = _t[[A bright light shines from the center of this shield. Holding it clears your mind.]], cost = 280, require = { stat = { wil=28, str=20, }, }, material_level = 5, @@ -4014,7 +4014,7 @@ newEntity{ base = "BASE_SHIELD", physcrit = 4.5, dammod = {str=1}, damtype = DamageType.LIGHT, - special_on_hit = {desc="releases a burst of light", on_kill=1, fct=function(combat, who, target) + special_on_hit = {desc=_t"releases a burst of light", on_kill=1, fct=function(combat, who, target) local tg = {type="ball", range=0, radius=1, selffire=false} local grids = who:project(tg, target.x, target.y, engine.DamageType.LITE_LIGHT, 30 + who:getWil()*0.5) game.level.map:particleEmitter(target.x, target.y, tg.radius, "ball_light", {radius=tg.radius}) @@ -4055,7 +4055,7 @@ newEntity{ base = "BASE_SHIELD", use_power = { name = function(self, who) local dam = who:damDesc(engine.DamageType.LIGHT, self.use_power.damage(self, who)) - return ("send out a range %d beam, lighting its path and dealing %0.2f to %0.2f light damage (based on Willpower and Cunning)"):format(self.use_power.range, 0.8*dam, dam) + return ("send out a range %d beam, lighting its path and dealing %0.2f to %0.2f light damage (based on Willpower and Cunning)"):tformat(self.use_power.range, 0.8*dam, dam) end, power = 12, damage = function(self, who) return 20 + who:getWil()/3 + who:getCun()/3 end, @@ -4068,7 +4068,7 @@ newEntity{ base = "BASE_SHIELD", local tg = self.use_power.target(self, who) local x, y = who:getTarget(tg) if not x or not y then return nil end - game.logSeen(who, "%s's %s flashes!", who.name:capitalize(), self:getName({do_color = true, no_add_name = true})) + game.logSeen(who, "%s's %s flashes!", who:getName():capitalize(), self:getName({do_color = true, no_add_name = true})) game.level.map:particleEmitter(who.x, who.y, tg.radius, "light_beam", {tx=x-who.x, ty=y-who.y}) who:project(tg, x, y, engine.DamageType.LITE_LIGHT, who:mindCrit(rng.avg(0.8*dam, dam))) return {id=true, used=true} @@ -4080,8 +4080,8 @@ newEntity{ base = "BASE_LEATHER_BOOT", power_source = {psionic=true}, unique = true, name = "Wanderer's Rest", image = "object/artifact/wanderers_rest.png",--Thanks Grayswandir! (just for the name this time!) - unided_name = "weightless boots", - desc = [[These boots feel nearly completely weightless. Touching them, you feel an enormous burden lifted from you.]], + unided_name = _t"weightless boots", + desc = _t[[These boots feel nearly completely weightless. Touching them, you feel an enormous burden lifted from you.]], encumber=0, color = colors.YELLOW, level_range = {17, 28}, @@ -4110,8 +4110,8 @@ newEntity{ base = "BASE_CLOTH_ARMOR", --Thanks Grayswandir! power_source = {arcane=true}, unique = true, name = "Silk Current", color = colors.BLUE, image = "object/artifact/silk_current.png", - unided_name = "flowing robe", - desc = [[This deep blue robe flows and ripples as if pushed by an invisible tide.]], + unided_name = _t"flowing robe", + desc = _t[[This deep blue robe flows and ripples as if pushed by an invisible tide.]], level_range = {1, 15}, rarity = 220, cost = resolvers.rngrange(50,80), @@ -4139,9 +4139,9 @@ newEntity{ base = "BASE_CLOTH_ARMOR", --Thanks Grayswandir! newEntity{ base = "BASE_WHIP", --Thanks Grayswandir! power_source = {arcane=true}, - unided_name = "bone-link chain", + unided_name = _t"bone-link chain", name = "Skeletal Claw", color=colors.GREEN, unique = true, image = "object/artifact/skeletal_claw.png", - desc = [[This whip appears to have been made from a human spine. A handle sits on one end, a sharply honed claw on the other.]], + desc = _t[[This whip appears to have been made from a human spine. A handle sits on one end, a sharply honed claw on the other.]], require = { stat = { dex=14 }, }, cost = 150, rarity = 325, @@ -4175,11 +4175,11 @@ newEntity{ base = "BASE_MINDSTAR", power_source = {psionic=true}, unique = true, name = "Core of the Forge", image = "object/artifact/core_of_the_forge.png", - unided_name = "fiery mindstar", + unided_name = _t"fiery mindstar", level_range = {38, 50}, color=colors.RED, rarity = 350, - desc = [[This blazing hot mindstar beats rhythmically, releasing a burst of heat with each strike.]], + desc = _t[[This blazing hot mindstar beats rhythmically, releasing a burst of heat with each strike.]], cost = 280, require = { stat = { wil=40 }, }, material_level = 5, @@ -4225,8 +4225,8 @@ newEntity{ base = "BASE_LEATHER_BOOT", --Thanks Grayswandir! unique = true, define_as = "AETHERWALK", name = "Aetherwalk", image = "object/artifact/aether_walk.png", moddable_tile = "special/aether_walk", - unided_name = "ethereal boots", - desc = [[A wispy purple aura surrounds these translucent black boots.]], + unided_name = _t"ethereal boots", + desc = _t[[A wispy purple aura surrounds these translucent black boots.]], color = colors.PURPLE, level_range = {30, 40}, rarity = 200, @@ -4236,7 +4236,7 @@ newEntity{ base = "BASE_LEATHER_BOOT", --Thanks Grayswandir! local damage = who:combatStatScale("mag", 50, 250) -- Generous because scaling Arcane is hard and its not exactly easy to proc this .. I think who:project({type="ball", range=0, radius=3, friendlyfire=false}, who.x, who.y, engine.DamageType.ARCANE, who:spellCrit(damage)) end, - special_desc = function(self, who) return ("Creates an arcane explosion dealing %d arcane damage based on magic in a radius of 3 around the user after any teleport."):format(who:combatStatScale("mag", 50, 250)) end, + special_desc = function(self, who) return ("Creates an arcane explosion dealing %d arcane damage based on magic in a radius of 3 around the user after any teleport."):tformat(who:combatStatScale("mag", 50, 250)) end, wielder = { combat_def = 6, fatigue = 1, @@ -4253,7 +4253,7 @@ newEntity{ base = "BASE_LEATHER_BOOT", --Thanks Grayswandir! }, }, max_power = 24, power_regen = 1, - use_power = { name = "phase door up to range 6, within radius 2 of the target location", power = 24, + use_power = { name = _t"phase door up to range 6, within radius 2 of the target location", power = 24, tactical = {ESCAPE = 2, CLOSEIN = 1.5}, on_pre_use = function(self, who, silent, fake) return not who:attr("encased_in_ice") and not who:attr("cant_teleport") end, use = function(self, who) @@ -4267,7 +4267,7 @@ newEntity{ base = "BASE_LEATHER_BOOT", --Thanks Grayswandir! if not x or not y then return {id=true} end local rad = 2 - game.logSeen(who, "%s is #PURPLE#ENVELOPED#LAST# in a deep purple aura from %s %s!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) + game.logSeen(who, "%s is #PURPLE#ENVELOPED#LAST# in a deep purple aura from %s %s!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) game.level.map:particleEmitter(who.x, who.y, 1, "teleport") who:teleportRandom(x, y, rad) game.level.map:particleEmitter(who.x, who.y, 1, "teleport") @@ -4281,16 +4281,16 @@ newEntity{ base = "BASE_GREATSWORD", -- Thanks Alex! power_source = {arcane=true}, unique = true, name = "Colaryem", - unided_name = "floating sword", image = "object/artifact/colaryem.png", + unided_name = _t"floating sword", image = "object/artifact/colaryem.png", level_range = {16, 36}, color=colors.BLUE, rarity = 300, - desc = [[This intricate blade is impractically long and almost as wide as your body, yet contrary to its size and apparent girth it is not only light, but threatens to escape your grasp and fly away. You will need to be really strong to keep it grounded. Or really big.]], + desc = _t[[This intricate blade is impractically long and almost as wide as your body, yet contrary to its size and apparent girth it is not only light, but threatens to escape your grasp and fly away. You will need to be really strong to keep it grounded. Or really big.]], cost = 400, require = { stat = { str=10 }, }, sentient=true, material_level = 3, - special_desc = function(self) return "Attack speed improves with your strength and size category." end, + special_desc = function(self) return _t"Attack speed improves with your strength and size category." end, combat = { dam = 48, apr = 12, @@ -4334,8 +4334,8 @@ newEntity{ base = "BASE_ARROW", --Thanks Grayswandir! power_source = {arcane=true}, unique = true, name = "Void Quiver", - unided_name = "ethereal quiver", - desc = [[An endless supply of arrows lay within this deep black quiver. Tiny white lights dot its surface.]], + unided_name = _t"ethereal quiver", + desc = _t[[An endless supply of arrows lay within this deep black quiver. Tiny white lights dot its surface.]], color = colors.BLUE, image = "object/artifact/void_quiver.png", proj_image = "object/artifact/arrow_s_void_quiver.png", level_range = {35, 50}, @@ -4361,8 +4361,8 @@ newEntity{ base = "BASE_ARROW", --Thanks Grayswandir! unique = true, name = "Hornet Stingers", image = "object/artifact/hornet_stingers.png", proj_image = "object/artifact/arrow_s_hornet_stingers.png", - unided_name = "sting tipped arrows", - desc = [[A vile poison drips from the tips of these arrows.]], + unided_name = _t"sting tipped arrows", + desc = _t[[A vile poison drips from the tips of these arrows.]], color = colors.BLUE, level_range = {15, 25}, rarity = 240, @@ -4376,7 +4376,7 @@ newEntity{ base = "BASE_ARROW", --Thanks Grayswandir! physcrit = 5, dammod = {dex=0.7, str=0.5}, -- Items can't pass parameters to DamageTypes, so we use special_on_hit instead. Thanks Shibari! - special_on_hit = {desc="afflicts the target with a poison dealing 20 damage per turn and causing actions to fail 20% of the time for 6 turns", fct=function(combat, who, target) + special_on_hit = {desc=_t"afflicts the target with a poison dealing 20 damage per turn and causing actions to fail 20% of the time for 6 turns", fct=function(combat, who, target) if target and target:canBe("poison") then target:setEffect(target.EFF_CRIPPLING_POISON, 6, {src=who, power=20, fail=20, no_ct_effect=true}) end @@ -4388,16 +4388,16 @@ newEntity{ base = "BASE_LITE", --Thanks Frumple! power_source = {psionic=true}, unique = true, name = "Umbraphage", image="object/artifact/umbraphage.png", - unided_name = "deep black lantern", + unided_name = _t"deep black lantern", level_range = {20, 30}, color=colors.BLACK, rarity = 240, - desc = [[This lantern of pale white crystal holds a sphere of darkness, that yet emanates light. Everywhere it shines, darkness vanishes entirely.]], + desc = _t[[This lantern of pale white crystal holds a sphere of darkness, that yet emanates light. Everywhere it shines, darkness vanishes entirely.]], cost = 320, material_level=3, sentient=true, charge = 0, - special_desc = function(self) return ("Absorbs all darkness (power %d, based on Willpower and Cunning) within its light radius, increasing its own brightness. (current charge %d)."):format(self.worn_by and self.use_power.litepower(self, self.worn_by) or 100, self.charge) end, + special_desc = function(self) return ("Absorbs all darkness (power %d, based on Willpower and Cunning) within its light radius, increasing its own brightness. (current charge %d)."):tformat(self.worn_by and self.use_power.litepower(self, self.worn_by) or 100, self.charge) end, on_wear = function(self, who) self.worn_by = who end, @@ -4454,7 +4454,7 @@ newEntity{ base = "BASE_LITE", --Thanks Frumple! use_power = { name = function(self, who) local dam = who:damDesc(engine.DamageType.DARKNESS, self.use_power.damage(self, who)) - return ("release absorbed darkness in a %d radius cone with a %d%% chance to blind (based on lite radius), dealing %0.2f darkness damage (based on Mindpower and charge)"):format(self.use_power.radius(self, who), self.use_power.blindchance(self, who), dam) + return ("release absorbed darkness in a %d radius cone with a %d%% chance to blind (based on lite radius), dealing %0.2f darkness damage (based on Mindpower and charge)"):tformat(self.use_power.radius(self, who), self.use_power.blindchance(self, who), dam) end, power = 10, damage = function(self, who) return 15 + 3*who:combatMindpower() + math.floor(self.charge/4) end, -- Damage is based on charge @@ -4471,7 +4471,7 @@ newEntity{ base = "BASE_LITE", --Thanks Frumple! local tg = self.use_power.target(self, who) local x, y = who:getTarget(tg) if not x or not y then return nil end - game.logSeen(who, "%s unshutters %s %s, unleashing a torrent of shadows!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s unshutters %s %s, unleashing a torrent of shadows!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) who:project(tg, x, y, engine.DamageType.DARKNESS, who:mindCrit(dam)) -- FIRE! who:project(tg, x, y, engine.DamageType.RANDOM_BLIND, self.use_power.blindchance(self, who)) -- blind game.level.map:particleEmitter(who.x, who.y, tg.radius, "breath_dark", {radius=tg.radius, tx=x-who.x, ty=y-who.y}) @@ -4492,11 +4492,11 @@ newEntity{ base = "BASE_LITE", --Thanks Grayswandir! power_source = {arcane=true}, unique = true, name = "Spectral Cage", image="object/artifact/spectral_cage.png", - unided_name = "ethereal blue lantern", + unided_name = _t"ethereal blue lantern", level_range = {20, 30}, color=colors.BLUE, rarity = 240, - desc = [[This ancient, weathered lantern glows with a pale blue light emanating from several ghostly forms trapped within. The metal is icy cold to the touch.]], + desc = _t[[This ancient, weathered lantern glows with a pale blue light emanating from several ghostly forms trapped within. The metal is icy cold to the touch.]], cost = 320, material_level=3, wielder = { @@ -4515,7 +4515,7 @@ newEntity{ base = "BASE_LITE", --Thanks Grayswandir! use_power = { name = function(self, who) local dam = who:damDesc(engine.DamageType.COLD, self.use_power.damage(self, who)) - return ("release a will o' the wisp that will explode against your foes for %d cold damage (based on your Magic)"):format(dam) + return ("release a will o' the wisp that will explode against your foes for %d cold damage (based on your Magic)"):tformat(dam) end, power = 20, damage = function(self, who) return 110 + who:getMag() * 2.5 end, @@ -4530,8 +4530,8 @@ newEntity{ base = "BASE_LITE", --Thanks Grayswandir! local NPC = require "mod.class.NPC" local Talents = require "engine.interface.ActorTalents" local m = NPC.new{ - name = "will o' the wisp", - desc = "A chilling, ghostly form that floats in the air.", + name = _t"will o' the wisp", + desc = _t"A chilling, ghostly form that floats in the air.", type = "undead", subtype = "ghost", blood_color = colors.GREY, display = "G", color=colors.WHITE, @@ -4575,7 +4575,7 @@ newEntity{ base = "BASE_LITE", --Thanks Grayswandir! game.party:addMember(m, { control=false, type="summon", - title="Summon", + title=_t"Summon", orders = {target=true, leash=true, anchor=true, talents=true}, }) return {id=true, used=true} @@ -4588,10 +4588,10 @@ newEntity{ base = "BASE_TOOL_MISC", unique=true, rarity=240, type = "charm", subtype="totem", name = "The Guardian's Totem", image = "object/artifact/the_guardians_totem.png", - unided_name = "a cracked stone totem", + unided_name = _t"a cracked stone totem", color = colors.GREEN, level_range = {40, 50}, - desc = [[This totem of ancient stone oozes a thick slime from myriad cracks. Nonetheless, you sense great power within it.]], + desc = _t[[This totem of ancient stone oozes a thick slime from myriad cracks. Nonetheless, you sense great power within it.]], cost = 320, material_level = 5, wielder = { @@ -4608,7 +4608,7 @@ newEntity{ base = "BASE_TOOL_MISC", end, max_power = 50, power_regen = 1, use_power = { - name = "call forth an immobile antimagic pillar for 10 turns. (It spits slime, pulls in, stuns, and burns the arcane resources of your foes, while emitting an aura of silence against them within range 5, and will silence you for 5 turns when first summoned.)", + name = _t"call forth an immobile antimagic pillar for 10 turns. (It spits slime, pulls in, stuns, and burns the arcane resources of your foes, while emitting an aura of silence against them within range 5, and will silence you for 5 turns when first summoned.)", power = 50, tactical = {ATTACK = {NATURE = 2}, CLOSEIN = 1.5, @@ -4629,9 +4629,9 @@ newEntity{ base = "BASE_TOOL_MISC", local NPC = require "mod.class.NPC" local m = NPC.new{ resolvers.nice_tile{image="invis.png", add_mos = {{image="terrain/darkgreen_moonstone_01.png", display_h=2, display_y=-1}}}, - name = "Stone Guardian", + name = _t"Stone Guardian", type = "totem", subtype = "antimagic", - desc = "This massive stone pillar drips with a viscous slime. Nature's power flows through it, obliterating magic all around it...", + desc = _t"This massive stone pillar drips with a viscous slime. Nature's power flows through it, obliterating magic all around it...", rank = 3, blood_color = colors.GREEN, display = "T", color=colors.GREEN, @@ -4694,7 +4694,7 @@ newEntity{ base = "BASE_TOOL_MISC", game.party:addMember(m, { control=false, type="summon", - title="Summon", + title=_t"Summon", temporary_level = true, orders = {target=true, leash=true, anchor=true, talents=true}, }) @@ -4709,8 +4709,8 @@ newEntity{ base = "BASE_CLOAK", power_source = {psionic=true}, unique = true, name = "Cloth of Dreams", image = "object/artifact/cloth_of_dreams.png", - unided_name = "tattered cloak", - desc = [[Touching this cloak of otherworldly fabric makes you feel both drowsy yet completely aware.]], + unided_name = _t"tattered cloak", + desc = _t[[Touching this cloak of otherworldly fabric makes you feel both drowsy yet completely aware.]], level_range = {30, 40}, rarity = 240, cost = 200, @@ -4736,10 +4736,10 @@ newEntity{ base = "BASE_TOOL_MISC", unique=true, rarity=240, type = "charm", subtype="wand", name = "Void Shard", image = "object/artifact/void_shard.png", - unided_name = "strange jagged shape", + unided_name = _t"strange jagged shape", color = colors.GREY, level_range = {40, 50}, - desc = [[This jagged shape looks like a hole in space, yet it is solid, though light in weight.]], + desc = _t[[This jagged shape looks like a hole in space, yet it is solid, though light in weight.]], cost = 320, material_level = 5, wielder = { @@ -4753,7 +4753,7 @@ newEntity{ base = "BASE_TOOL_MISC", use_power = { name = function(self, who) local dam = self.use_power.damage(self, who)/2 - return ("release a radius %d burst of void energy at up to range %d, dealing %0.2f temporal and %0.2f darkness damage (based on Magic)"):format(self.use_power.radius, self.use_power.range, who:damDesc(engine.DamageType.TEMPORAL, dam), who:damDesc(engine.DamageType.DARKNESS, dam)) + return ("release a radius %d burst of void energy at up to range %d, dealing %0.2f temporal and %0.2f darkness damage (based on Magic)"):tformat(self.use_power.radius, self.use_power.range, who:damDesc(engine.DamageType.TEMPORAL, dam), who:damDesc(engine.DamageType.DARKNESS, dam)) end, power = 20, damage = function(self, who) return 200 + who:getMag() * 2 end, @@ -4766,7 +4766,7 @@ newEntity{ base = "BASE_TOOL_MISC", local tg = self.use_power.target(self, who) local x, y = who:getTarget(tg) if not x or not y then return nil end - game.logSeen(who, "%s siphons space and time into %s %s!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) + game.logSeen(who, "%s siphons space and time into %s %s!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) who:project(tg, x, y, engine.DamageType.VOID, self.use_power.damage(self, who)) game.level.map:particleEmitter(x, y, tg.radius, "shadow_flash", {radius=tg.radius, tx=x, ty=y}) return {id=true, used=true} @@ -4776,9 +4776,9 @@ newEntity{ base = "BASE_TOOL_MISC", newEntity{ base = "BASE_SHIELD", --Thanks SageAcrin! power_source = {nature=true}, - unided_name = "thick coral plate", + unided_name = _t"thick coral plate", name = "Coral Spray", unique=true, image = "object/artifact/coral_spray.png", - desc = [[A chunk of jagged coral, dredged from the ocean.]], + desc = _t[[A chunk of jagged coral, dredged from the ocean.]], require = { stat = { str=16 }, }, level_range = {1, 15}, rarity = 200, @@ -4806,7 +4806,7 @@ newEntity{ base = "BASE_SHIELD", --Thanks SageAcrin! learn_talent = { [Talents.T_BLOCK] = 1, }, max_air = 20, }, - on_block = {desc = "30% chance to spray freezing water (radius 4 cone) at the target.", fct = function(self, who, target, type, dam, eff) + on_block = {desc = _t"30% chance to spray freezing water (radius 4 cone) at the target.", fct = function(self, who, target, type, dam, eff) if rng.percent(30) then if not target or target:attr("dead") or not target.x or not target.y then return end @@ -4823,8 +4823,8 @@ newEntity{ base = "BASE_AMULET", --Thanks Grayswandir! power_source = {psionic=true}, unique = true, name = "Shard of Insanity", color = colors.DARK_GREY, image = "object/artifact/shard_of_insanity.png", - unided_name = "cracked black amulet", - desc = [[A deep red light glows from within this damaged amulet of black stone. When you touch it, you can hear voices whispering within your mind.]], + unided_name = _t"cracked black amulet", + desc = _t[[A deep red light glows from within this damaged amulet of black stone. When you touch it, you can hear voices whispering within your mind.]], level_range = {20, 32}, rarity = 290, cost = 500, @@ -4854,8 +4854,8 @@ newEntity{ base = "BASE_SHOT", --Thanks Grayswandir! unique = true, name = "Pouch of the Subconscious", image = "object/artifact/pouch_of_the_subconscious.png", proj_image = "object/artifact/shot_s_pouch_of_the_subconscious.png", - unided_name = "familiar pouch", - desc = [[You find yourself constantly fighting an urge to handle this strange pouch of shot.]], + unided_name = _t"familiar pouch", + desc = _t[[You find yourself constantly fighting an urge to handle this strange pouch of shot.]], color = colors.RED, level_range = {25, 40}, rarity = 300, @@ -4872,7 +4872,7 @@ newEntity{ base = "BASE_SHOT", --Thanks Grayswandir! [DamageType.MIND] = 25, [DamageType.MINDSLOW] = 30, }, - special_on_hit = {desc="50% chance to reload 1 ammo", on_kill=1, fct=function(combat, who, target) + special_on_hit = {desc=_t"50% chance to reload 1 ammo", on_kill=1, fct=function(combat, who, target) if not rng.percent(50) then return end local ammo = who:hasAmmo() if not ammo then return end @@ -4886,8 +4886,8 @@ newEntity{ base = "BASE_SHOT", --Thanks Grayswandir! unique = true, name = "Wind Worn Shot", image = "object/artifact/wind_worn_shot.png", proj_image = "object/artifact/shot_s_wind_worn_shot.png", - unided_name = "perfectly smooth shot", - desc = [[These perfectly white spheres appear to have been worn down by years of exposure to strong winds.]], + unided_name = _t"perfectly smooth shot", + desc = _t[[These perfectly white spheres appear to have been worn down by years of exposure to strong winds.]], color = colors.RED, level_range = {25, 40}, rarity = 300, @@ -4902,7 +4902,7 @@ newEntity{ base = "BASE_SHOT", --Thanks Grayswandir! travel_speed = 1, dammod = {dex=0.7, cun=0.5}, talent_on_hit = { [Talents.T_TORNADO] = {level=2, chance=10} }, - special_on_hit = {desc="35% chance for lightning to arc to a second target", on_kill=1, fct=function(combat, who, target) + special_on_hit = {desc=_t"35% chance for lightning to arc to a second target", on_kill=1, fct=function(combat, who, target) if not rng.percent(35) then return end local tgts = {} local x, y = target.x, target.y @@ -4931,8 +4931,8 @@ newEntity{ base = "BASE_SHOT", --Thanks Grayswandir! newEntity{ base = "BASE_GREATMAUL", power_source = {nature=true, antimagic=true}, name = "Spellcrusher", color = colors.GREEN, image = "object/artifact/spellcrusher.png", - unided_name = "vine coated hammer", unique = true, - desc = [[This large steel greatmaul has thick vines wrapped around the handle.]], + unided_name = _t"vine coated hammer", unique = true, + desc = _t[[This large steel greatmaul has thick vines wrapped around the handle.]], level_range = {10, 20}, rarity = 300, require = { stat = { str=20 }, }, @@ -4944,7 +4944,7 @@ newEntity{ base = "BASE_GREATMAUL", physcrit = 4, dammod = {str=1.2}, melee_project={[DamageType.NATURE] = 20}, - special_on_hit = {desc="50% chance to shatter magical shields", fct=function(combat, who, target) + special_on_hit = {desc=_t"50% chance to shatter magical shields", fct=function(combat, who, target) if not rng.percent(50) then return end if not target then return end @@ -4968,7 +4968,7 @@ newEntity{ base = "BASE_GREATMAUL", is_shield = true end if is_shield == true then - game.logSeen(target, "%s's magical shields are shattered!", target.name:capitalize()) + game.logSeen(target, "%s's magical shields are shattered!", target:getName():capitalize()) end end}, }, @@ -4994,10 +4994,10 @@ newEntity{ base = "BASE_TOOL_MISC", unique=true, rarity=240, type = "charm", subtype="torque", name = "Telekinetic Core", image = "object/artifact/telekinetic_core.png", - unided_name = "heavy torque", + unided_name = _t"heavy torque", color = colors.BLUE, level_range = {5, 20}, - desc = [[This heavy torque appears to draw nearby matter towards it.]], + desc = _t[[This heavy torque appears to draw nearby matter towards it.]], cost = 320, material_level = 2, wielder = { @@ -5016,12 +5016,12 @@ newEntity{ base = "BASE_GREATSWORD", --Thanks Grayswandir! power_source = {arcane=true, technique=true}, unique = true, name = "Spectral Blade", image = "object/artifact/spectral_blade.png", - unided_name = "immaterial sword", + unided_name = _t"immaterial sword", level_range = {10, 20}, color=colors.GRAY, rarity = 300, encumber = 0.1, - desc = [[This sword appears weightless, and nearly invisible.]], + desc = _t[[This sword appears weightless, and nearly invisible.]], cost = 400, require = { stat = { mag=18, }, }, metallic = false, @@ -5049,8 +5049,8 @@ newEntity{ base = "BASE_GLOVES", --Thanks SageAcrin /AND/ Edge2054! power_source = {technique=true, arcane=true}, unique = true, name = "Crystle's Astral Bindings", --Yes, CRYSTLE. It's a name. - unided_name = "crystalline gloves", image = "object/artifact/crystles_astral_bindings.png", - desc = [[Said to have belonged to a lost Anorithil, stars are reflected in the myriad surfaces of these otherworldly bindings.]], + unided_name = _t"crystalline gloves", image = "object/artifact/crystles_astral_bindings.png", + desc = _t[[Said to have belonged to a lost Anorithil, stars are reflected in the myriad surfaces of these otherworldly bindings.]], level_range = {8, 20}, rarity = 225, cost = 340, @@ -5081,11 +5081,11 @@ newEntity{ base = "BASE_GLOVES", --Thanks SageAcrin /AND/ Edge2054! newEntity{ base = "BASE_GEM", --Thanks SageAcrin and Graziel! power_source = {arcane=true}, unique = true, - unided_name = "cracked golem eye", + unided_name = _t"cracked golem eye", name = "Prothotipe's Prismatic Eye", subtype = "multi-hued", color = colors.WHITE, image = "object/artifact/prothotipes_prismatic_eye.png", level_range = {18, 30}, - desc = [[This cracked gemstone looks faded with age. It appears to have once been the eye of a golem.]], + desc = _t[[This cracked gemstone looks faded with age. It appears to have once been the eye of a golem.]], rarity = 240, cost = 200, identified = false, @@ -5113,7 +5113,7 @@ newEntity{ base = "BASE_GEM", --Thanks SageAcrin and Graziel! talent_on_spell = { {chance=10, talent=Talents.T_GOLEM_BEAM, level=2} }, }, talent_on_spell = { {chance=10, talent=Talents.T_GOLEM_BEAM, level=2} }, - special_desc = function(self) return "Casts lasers on spellcast when worn or imbued." end, + special_desc = function(self) return _t"Casts lasers on spellcast when worn or imbued." end, } @@ -5121,8 +5121,8 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", --Thanks SageAcrin! power_source = {psionic=true}, unique = true, name = "Plate of the Blackened Mind", image = "object/artifact/plate_of_the_blackened_mind.png", - unided_name = "solid black breastplate", - desc = [[This deep black armor absorbs all light that touches it. A dark power sleeps within, primal, yet aware. When you touch the plate, you feel dark thoughts creeping into your mind.]], + unided_name = _t"solid black breastplate", + desc = _t[[This deep black armor absorbs all light that touches it. A dark power sleeps within, primal, yet aware. When you touch the plate, you feel dark thoughts creeping into your mind.]], color = colors.BLACK, level_range = {40, 50}, rarity = 390, @@ -5162,13 +5162,13 @@ newEntity{ base = "BASE_TOOL_MISC", --Sorta Thanks Donkatsu! unique=true, rarity=220, type = "charm", subtype="totem", name = "Tree of Life", image = "object/artifact/tree_of_life.png", - unided_name = "tree shaped totem", + unided_name = _t"tree shaped totem", color = colors.GREEN, level_range = {40, 50}, - desc = [[This small tree-shaped totem is imbued with powerful healing energies.]], + desc = _t[[This small tree-shaped totem is imbued with powerful healing energies.]], cost = 320, material_level = 4, - special_desc = function(self) return "Heals all nearby living creatures by 5 points each turn." end, + special_desc = function(self) return _t"Heals all nearby living creatures by 5 points each turn." end, sentient=true, use_no_energy = true, wielder = { @@ -5204,7 +5204,7 @@ newEntity{ base = "BASE_TOOL_MISC", --Sorta Thanks Donkatsu! end, max_power = 15, power_regen = 1, use_power = { - name = "take root increasing health by 300, armor by 20, and armor hardiness by 20%% but rooting you in place for 4 turns", + name = _t"take root increasing health by 300, armor by 20, and armor hardiness by 20%% but rooting you in place for 4 turns", power = 10, tactical = {DEFEND = 2}, on_pre_use_ai = function(self, who, silent, fake) @@ -5216,7 +5216,7 @@ newEntity{ base = "BASE_TOOL_MISC", --Sorta Thanks Donkatsu! end, no_npc_use = function(self, who) return who:attr("undead") or self:restrictAIUseObject(who) end, use = function(self, who) - game.logSeen(who, "%s merges with %s %s!", who.name:capitalize(), who:his_her(), self:getName({do_color=true, no_add_name = true})) + game.logSeen(who, "%s merges with %s %s!", who:getName():capitalize(), who:his_her(), self:getName({do_color=true, no_add_name = true})) who:setEffect(who.EFF_TREE_OF_LIFE, 4, {}) return {id=true, used=true} end @@ -5226,8 +5226,8 @@ newEntity{ base = "BASE_TOOL_MISC", --Sorta Thanks Donkatsu! newEntity{ base = "BASE_RING", power_source = {technique=true, nature=true}, name = "Ring of Growth", unique=true, image = "object/artifact/ring_of_growth.png", - desc = [[This small wooden ring has a single green stem wrapped around it. Thin leaves still seem to be growing from it.]], - unided_name = "vine encircled ring", + desc = _t[[This small wooden ring has a single green stem wrapped around it. Thin leaves still seem to be growing from it.]], + unided_name = _t"vine encircled ring", level_range = {6, 20}, rarity = 250, cost = 500, @@ -5246,8 +5246,8 @@ newEntity{ base = "BASE_CLOAK", power_source = {arcane=true}, unique = true, name = "Wrap of Stone", image = "object/artifact/wrap_of_stone.png", - unided_name = "solid stone cloak", - desc = [[This thick cloak is incredibly tough, yet bends and flows with ease.]], + unided_name = _t"solid stone cloak", + desc = _t[[This thick cloak is incredibly tough, yet bends and flows with ease.]], level_range = {8, 20}, rarity = 400, cost = 250, @@ -5269,9 +5269,9 @@ newEntity{ base = "BASE_CLOAK", newEntity{ base = "BASE_LIGHT_ARMOR", --Thanks SageAcrin! power_source = {arcane=true}, - unided_name = "black leather armor", + unided_name = _t"black leather armor", name = "Death's Embrace", unique=true, image = "object/artifact/deaths_embrace.png", - desc = [[This deep black leather armor, wrapped with thick silk, is icy cold to the touch.]], + desc = _t[[This deep black leather armor, wrapped with thick silk, is icy cold to the touch.]], level_range = {40, 50}, rarity = 250, cost = 300, @@ -5306,7 +5306,7 @@ newEntity{ base = "BASE_LIGHT_ARMOR", --Thanks SageAcrin! }, max_power = 50, power_regen = 1, use_power = { - name = function(self, who) return ("turn yourself invisible (power %d, based on Cunning and Magic) for 10 turns"):format(self.use_power.invispower(self, who)) end, + name = function(self, who) return ("turn yourself invisible (power %d, based on Cunning and Magic) for 10 turns"):tformat(self.use_power.invispower(self, who)) end, power = 50, tactical = {DEFEND = 2, ESCAPE = 2}, on_pre_use_ai = function(self, who, silent, fake) @@ -5314,7 +5314,7 @@ newEntity{ base = "BASE_LIGHT_ARMOR", --Thanks SageAcrin! end, invispower = function(self, who) return 10+who:getCun()/6+who:getMag()/6 end, use = function(self, who) - game.logSeen(who, "%s pulls %s %s around %s like a dark shroud!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true}), who:his_her_self()) + game.logSeen(who, "%s pulls %s %s around %s like a dark shroud!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true}), who:his_her_self()) who:setEffect(who.EFF_INVISIBILITY, 10, {power=self.use_power.invispower(self, who), penalty=0.5, regen=true}) return {id=true, used=true} end @@ -5323,9 +5323,9 @@ newEntity{ base = "BASE_LIGHT_ARMOR", --Thanks SageAcrin! newEntity{ base = "BASE_LIGHT_ARMOR", --Thanks SageAcrin! power_source = {nature=true, antimagic=true}, - unided_name = "gauzy green armor", + unided_name = _t"gauzy green armor", name = "Breath of Eyal", unique=true, image = "object/artifact/breath_of_eyal.png", - desc = [[This lightweight armor appears to have been woven of countless sprouts, still curling and growing. When you put it on, you feel the weight of the world on your shoulders, in spite of how light it feels in your hands.]], + desc = _t[[This lightweight armor appears to have been woven of countless sprouts, still curling and growing. When you put it on, you feel the weight of the world on your shoulders, in spite of how light it feels in your hands.]], level_range = {40, 50}, rarity = 250, cost = 300, @@ -5364,8 +5364,8 @@ newEntity{ base = "BASE_TOOL_MISC", --Thanks Alex! power_source = {arcane=true}, unique = true, name = "Eternity's Counter", color = colors.WHITE, - unided_name = "crystalline hourglass", image="object/artifact/eternities_counter.png", - desc = [[This hourglass of otherworldly crystal appears to be filled with countless tiny gemstones in place of sand. As they fall, you feel the flow of time change around you.]], + unided_name = _t"crystalline hourglass", image="object/artifact/eternities_counter.png", + desc = _t[[This hourglass of otherworldly crystal appears to be filled with countless tiny gemstones in place of sand. As they fall, you feel the flow of time change around you.]], level_range = {30, 40}, rarity = 300, cost = 200, @@ -5375,7 +5375,7 @@ newEntity{ base = "BASE_TOOL_MISC", --Thanks Alex! finished=false, sentient=true, metallic = false, - special_desc = function(self) return "Offers either offensive or defensive benefits, depending on the position of the sands. Switching the direction of flow takes no time." end, + special_desc = function(self) return _t"Offers either offensive or defensive benefits, depending on the position of the sands. Switching the direction of flow takes no time." end, wielder = { inc_damage = { [DamageType.TEMPORAL]= 15}, resists = { [DamageType.TEMPORAL] = 15, all = 0, }, @@ -5387,7 +5387,7 @@ newEntity{ base = "BASE_TOOL_MISC", --Thanks Alex! }, max_power = 20, power_regen = 1, use_power = { - name = function(self, who) return ("flip the hourglass (sands currently flowing towards %s)"):format(self.direction > 0 and "stability" or "entropy") end, + name = function(self, who) return ("flip the hourglass (sands currently flowing towards %s)"):tformat(self.direction > 0 and _t"stability" or _t"entropy") end, power = 20, tactical = function(self, who, aitarget) if not aitarget then return end @@ -5406,7 +5406,7 @@ newEntity{ base = "BASE_TOOL_MISC", --Thanks Alex! end, no_npc_use = function(self, who) return self:restrictAIUseObject(who) end, use = function(self, who) ---game.log("%s: ai_tactic: %s", who.name, who.ai_state.tactic) +--game.log("%s: ai_tactic: %s", who:getName(), who.ai_state.tactic) local power = self.power self.use_power.last_used = game.turn self.direction = self.direction * -1 @@ -5415,8 +5415,8 @@ newEntity{ base = "BASE_TOOL_MISC", --Thanks Alex! self.wielder.inc_damage.all = 0 self.wielder.flat_damage_armor.all = 0 who:onWear(self, who.INVEN_TOOL, true) - game.logSeen(who, "%s flips %s %s over...", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) - game.logPlayer(who, "#GOLD#The sands slowly begin falling towards %s.", self.direction > 0 and "stability" or "entropy") + game.logSeen(who, "%s flips %s %s over...", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) + game.logPlayer(who, "#GOLD#The sands slowly begin falling towards %s.", self.direction > 0 and _t"stability" or _t"entropy") self.power = power return {id=true, used=true, no_energy = true} -- effectively instant use without the AI priority boost end @@ -5469,8 +5469,8 @@ newEntity{ base = "BASE_WIZARD_HAT", --Thanks SageAcrin! power_source = {psionic=true}, unique = true, name = "Malslek the Accursed's Hat", - unided_name = "black charred hat", - desc = [[This black hat once belonged to a powerful mage named Malslek, in the Age of Dusk, who was known to deal with beings from other planes. In particular, he dealt with many powerful demons, until one of them, tired of his affairs, betrayed him and stole his power. In his rage, Malslek set fire to his own tower in an attempt to kill the demon. This charred hat is all that remained in the ruins.]], + unided_name = _t"black charred hat", + desc = _t[[This black hat once belonged to a powerful mage named Malslek, in the Age of Dusk, who was known to deal with beings from other planes. In particular, he dealt with many powerful demons, until one of them, tired of his affairs, betrayed him and stole his power. In his rage, Malslek set fire to his own tower in an attempt to kill the demon. This charred hat is all that remained in the ruins.]], color = colors.BLUE, image = "object/artifact/malslek_the_accursed_hat.png", level_range = {30, 40}, rarity = 300, @@ -5511,10 +5511,10 @@ newEntity{ base = "BASE_TOOL_MISC", --And finally, Thank you, Darkgod, for makin power_source = {technique=true}, unique=true, rarity=240, name = "Fortune's Eye", image = "object/artifact/fortunes_eye.png", - unided_name = "golden telescope", + unided_name = _t"golden telescope", color = colors.GOLD, level_range = {28, 40}, - desc = [[This finely crafted telescope once belonged to the explorer and adventurer Kestin Highfin. With this tool in hand he traveled in search of treasures all across Maj'Eyal, and before his death it was said his collection was incredibly vast. He often credited this telescope with his luck, saying that as long as he had it, he could escape any situation, no matter how dangerous. It is said he died confronting a demon seeking revenge for a stolen sword. + desc = _t[[This finely crafted telescope once belonged to the explorer and adventurer Kestin Highfin. With this tool in hand he traveled in search of treasures all across Maj'Eyal, and before his death it was said his collection was incredibly vast. He often credited this telescope with his luck, saying that as long as he had it, he could escape any situation, no matter how dangerous. It is said he died confronting a demon seeking revenge for a stolen sword. His last known words were "Somehow this feels like an ending, yet I know there is so much more to find."]], cost = 350, @@ -5538,12 +5538,12 @@ newEntity{ base = "BASE_LEATHER_CAP", power_source = {nature=true}, unique = true, name = "Eye of the Forest", - unided_name = "overgrown leather cap", image = "object/artifact/eye_of_the_forest.png", + unided_name = _t"overgrown leather cap", image = "object/artifact/eye_of_the_forest.png", level_range = {24, 32}, color=colors.GREEN, encumber = 2, rarity = 200, - desc = [[This leather cap is overgrown with a thick moss, except for around the very front, where an eye, carved of wood, rests. A thick green slime slowly pours from the corners of the eye, like tears.]], + desc = _t[[This leather cap is overgrown with a thick moss, except for around the very front, where an eye, carved of wood, rests. A thick green slime slowly pours from the corners of the eye, like tears.]], cost = 200, material_level=3, wielder = { @@ -5570,11 +5570,11 @@ newEntity{ base = "BASE_MINDSTAR", power_source = {antimagic=true}, unique = true, name = "Eyal's Will", - unided_name = "pale green mindstar", + unided_name = _t"pale green mindstar", level_range = {38, 50}, color=colors.AQUAMARINE, image = "object/artifact/eyals_will.png", rarity = 380, - desc = [[This smooth green crystal flows with a light green slime in its core. Droplets occasionally form on its surface, tufts of grass growing quickly on the ground where they fall.]], + desc = _t[[This smooth green crystal flows with a light green slime in its core. Droplets occasionally form on its surface, tufts of grass growing quickly on the ground where they fall.]], cost = 280, require = { stat = { wil=48 }, }, material_level = 5, @@ -5609,8 +5609,8 @@ newEntity{ base = "BASE_CLOTH_ARMOR", power_source = {nature=true}, unique = true, name = "Evermoss Robe", color = colors.DARK_GREEN, image = "object/artifact/evermoss_robe.png", - unided_name = "fuzzy green robe", - desc = [[This thick robe is woven from a dark green moss, firmly bound and cool to the touch. It is said to have rejuvenating properties.]], + unided_name = _t"fuzzy green robe", + desc = _t[[This thick robe is woven from a dark green moss, firmly bound and cool to the touch. It is said to have rejuvenating properties.]], level_range = {30, 42}, rarity = 200, cost = 350, @@ -5635,8 +5635,8 @@ newEntity{ base = "BASE_SLING", power_source = {technique=true}, unique = true, name = "Nithan's Force", image = "object/artifact/nithans_force.png", - unided_name = "massive sling", - desc = [[This powerful sling is said to have belonged to a warrior so strong his shots could knock down a brick wall...]], + unided_name = _t"massive sling", + desc = _t[[This powerful sling is said to have belonged to a warrior so strong his shots could knock down a brick wall...]], level_range = {35, 50}, rarity = 220, require = { stat = { dex=32 }, }, @@ -5663,8 +5663,8 @@ newEntity{ base = "BASE_ARROW", unique = true, name = "The Titan's Quiver", image = "object/artifact/the_titans_quiver.png", proj_image = "object/artifact/arrow_s_the_titans_quiver.png", - unided_name = "gigantic ceramic arrows", - desc = [[These massive arrows are honed to a vicious sharpness, and appear to be nearly unbreakable. They seem more like spikes than any arrow you've ever seen.]], + unided_name = _t"gigantic ceramic arrows", + desc = _t[[These massive arrows are honed to a vicious sharpness, and appear to be nearly unbreakable. They seem more like spikes than any arrow you've ever seen.]], color = colors.GREY, level_range = {35, 50}, rarity = 300, @@ -5677,10 +5677,10 @@ newEntity{ base = "BASE_ARROW", apr = 20, physcrit = 8, dammod = {dex=0.5, str=0.7}, - special_on_crit = {desc="pin the target to the nearest wall", fct=function(combat, who, target) + special_on_crit = {desc=_t"pin the target to the nearest wall", fct=function(combat, who, target) if not target or target == self then return end if target:checkHit(who:combatPhysicalpower()*1.25, target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then - game.logSeen(target, "%s is knocked back and pinned!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back and pinned!", target:getName():capitalize()) target:knockback(who.x, who.y, 10) target:setEffect(target.EFF_PINNED, 5, {}) --ignores pinning resistance, too strong! end @@ -5691,8 +5691,8 @@ newEntity{ base = "BASE_ARROW", newEntity{ base = "BASE_RING", power_source = {technique=true, psionic=true}, name = "Inertial Twine", unique=true, image = "object/artifact/inertial_twine.png", - desc = [[This double-helical ring seems resistant to attempts to move it. Wearing it seems to extend this property to your entire body.]], - unided_name = "entwined iron ring", + desc = _t[[This double-helical ring seems resistant to attempts to move it. Wearing it seems to extend this property to your entire body.]], + unided_name = _t"entwined iron ring", level_range = {17, 28}, rarity = 250, cost = 300, @@ -5711,14 +5711,14 @@ newEntity{ base = "BASE_LONGSWORD", power_source = {nature=true, technique=true}, unique = true, name = "Everpyre Blade", - unided_name = "flaming wooden blade", image = "object/artifact/everpyre_blade.png", + unided_name = _t"flaming wooden blade", image = "object/artifact/everpyre_blade.png", moddable_tile = "special/%s_everpyre_blade", moddable_tile_big = true, level_range = {28, 38}, color=colors.RED, rarity = 300, metallic = false, - desc = [[This ornate blade is carved from the wood of a tree said to burn eternally. Its hilt is encrusted with gems, suggesting it once belonged to a figure of considerable status. The flames seem to bend to the will of the sword's holder.]], + desc = _t[[This ornate blade is carved from the wood of a tree said to burn eternally. Its hilt is encrusted with gems, suggesting it once belonged to a figure of considerable status. The flames seem to bend to the will of the sword's holder.]], cost = 400, require = { stat = { str=40 }, }, material_level = 4, @@ -5750,11 +5750,11 @@ newEntity{ base = "BASE_LONGSWORD", newEntity{ base = "BASE_STAFF", power_source = {arcane=true}, image = "object/artifact/eclipse.png", - unided_name = "dark, radiant staff", + unided_name = _t"dark, radiant staff", flavor_name = "starstaff", flavors = {starstaff=true}, name = "Eclipse", unique=true, - desc = [[This tall staff is tipped with a pitch black sphere that yet seems to give off a strong light.]], + desc = _t[[This tall staff is tipped with a pitch black sphere that yet seems to give off a strong light.]], require = { stat = { mag=32 }, }, level_range = {10, 20}, rarity = 200, @@ -5792,12 +5792,12 @@ newEntity{ base = "BASE_STAFF", newEntity{ base = "BASE_BATTLEAXE", power_source = {technique=true}, unique = true, - unided_name = "gore stained battleaxe", + unided_name = _t"gore stained battleaxe", name = "Eksatin's Ultimatum", color = colors.GREY, image = "object/artifact/eskatins_ultimatum.png", moddable_tile = "special/%s_eskatins_ultimatum", moddable_tile_big = true, cost = 500, - desc = [[This gore-stained battleaxe was once used by an infamously sadistic king, who took the time to personally perform each and every execution he ordered. He kept a vault of every head he ever removed, each and every one of them carefully preserved. When he was overthrown, his own head was added as the centrepiece of the vault, which was maintained as a testament to his cruelty.]], + desc = _t[[This gore-stained battleaxe was once used by an infamously sadistic king, who took the time to personally perform each and every execution he ordered. He kept a vault of every head he ever removed, each and every one of them carefully preserved. When he was overthrown, his own head was added as the centrepiece of the vault, which was maintained as a testament to his cruelty.]], require = { stat = { str=50 }, }, level_range = {39, 46}, rarity = 300, @@ -5807,11 +5807,11 @@ newEntity{ base = "BASE_BATTLEAXE", apr = 25, physcrit = 25, dammod = {str=1.3}, - special_on_crit = {desc="decapitate a weakened target", fct=function(combat, who, target) + special_on_crit = {desc=_t"decapitate a weakened target", fct=function(combat, who, target) if not target or target == self then return end if target:checkHit(who:combatPhysicalpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("instakill") and target.life > 0 and ((target.life < target.max_life * 0.25 and target.rank < 3.5) or target.life < target.max_life * 0.10) then target:die(who) - game.logSeen(target, "#RED#%s#GOLD# has been decapitated!#LAST#", target.name:capitalize()) + game.logSeen(target, "#RED#%s#GOLD# has been decapitated!#LAST#", target:getName():capitalize()) end end}, }, @@ -5824,8 +5824,8 @@ newEntity{ base = "BASE_CLOAK", power_source = {arcane=true}, unique = true, name = "Radiance", image = "object/artifact/radiance.png", - unided_name = "a sparkling, golden cloak", - desc = [[This pristine golden cloak flows with a wind that seems to be conjured from nowhere. Its inner surface is a completely plain white, but the outside shines with intense light.]], + unided_name = _t"a sparkling, golden cloak", + desc = _t[[This pristine golden cloak flows with a wind that seems to be conjured from nowhere. Its inner surface is a completely plain white, but the outside shines with intense light.]], level_range = {45, 50}, color = colors.GOLD, rarity = 500, @@ -5852,8 +5852,8 @@ newEntity{ base = "BASE_HEAVY_BOOTS", power_source = {technique=true}, unique = true, name = "Unbreakable Greaves", image = "object/artifact/unbreakable_greaves.png", - unided_name = "huge stony boots", - desc = [[These titanic boots appear to have been carved from stone. They appear weathered and cracked, but easily deflect all blows.]], + unided_name = _t"huge stony boots", + desc = _t[[These titanic boots appear to have been carved from stone. They appear weathered and cracked, but easily deflect all blows.]], color = colors.DARK_GRAY, level_range = {40, 50}, rarity = 250, @@ -5880,8 +5880,8 @@ newEntity{ base = "BASE_LIGHT_ARMOR", power_source = {arcane=true}, unique = true, sentient=true, name = "The Untouchable", color = colors.BLUE, image = "object/artifact/the_untouchable.png", - unided_name = "tough leather coat", - desc = [[This rugged jacket is the subject of many a rural legend. + unided_name = _t"tough leather coat", + desc = _t[[This rugged jacket is the subject of many a rural legend. Some say it was fashioned by an adventurous mage turned rogue, in times before the Spellblaze, but was since lost. All manner of shady gamblers have since claimed to have worn it at one point or another. To fail, but live, is what it means to be untouchable, they said.]], level_range = {20, 30}, @@ -5903,7 +5903,7 @@ All manner of shady gamblers have since claimed to have worn it at one point or on_takeoff = function(self) self.worn_by = nil end, - special_desc = function(self) return "When you take a hit of more than 20% of your max life a shield is created equal to 130% the damage taken." end, + special_desc = function(self) return _t"When you take a hit of more than 20% of your max life a shield is created equal to 130% the damage taken." end, act = function(self) self:useEnergy() if not self.worn_by then return end @@ -5925,10 +5925,10 @@ newEntity{ base = "BASE_TOOL_MISC", unique=true, rarity=240, image = "object/artifact/honeywood_chalice.png", type = "charm", subtype="totem", name = "Honeywood Chalice", - unided_name = "sap filled cup", + unided_name = _t"sap filled cup", color = colors.BROWN, level_range = {30, 40}, - desc = [[This wooden cup seems perpetually filled with a thick sap-like substance. Tasting it is exhilarating, and you feel intensely aware when you do so.]], + desc = _t[[This wooden cup seems perpetually filled with a thick sap-like substance. Tasting it is exhilarating, and you feel intensely aware when you do so.]], cost = 320, material_level = 4, wielder = { @@ -5947,13 +5947,13 @@ newEntity{ base = "BASE_CLOTH_ARMOR", power_source = {arcane=true}, unique = true, name = "The Calm", color = colors.GREEN, image = "object/artifact/the_calm.png", - unided_name = "ornate green robe", - desc = [[This green robe is engraved with icons showing clouds and swirling winds. Its original owner, a powerful mage named Proccala, was often revered for both his great benevolence and his intense power when it proved necessary.]], + unided_name = _t"ornate green robe", + desc = _t[[This green robe is engraved with icons showing clouds and swirling winds. Its original owner, a powerful mage named Proccala, was often revered for both his great benevolence and his intense power when it proved necessary.]], level_range = {30, 40}, rarity = 250, cost = 500, material_level = 4, - special_desc = function(self) return "Your Lightning and Chain Lightning spells gain a 24% chance to daze, and your Thunderstorm spell gains a 12% chance to daze." end, + special_desc = function(self) return _t"Your Lightning and Chain Lightning spells gain a 24% chance to daze, and your Thunderstorm spell gains a 12% chance to daze." end, wielder = { combat_spellpower = 20, inc_damage = {[DamageType.LIGHTNING]=25}, @@ -5971,12 +5971,12 @@ newEntity{ base = "BASE_LEATHER_CAP", power_source = {psionic=true}, unique = true, name = "Omniscience", image = "object/artifact/omniscience.png", - unided_name = "very plain leather cap", + unided_name = _t"very plain leather cap", level_range = {40, 50}, color=colors.WHITE, encumber = 1, rarity = 300, - desc = [[This white cap is plain and dull, but as the light reflects off of its surface, you see images of faraway corners of the world in the sheen."]], + desc = _t[[This white cap is plain and dull, but as the light reflects off of its surface, you see images of faraway corners of the world in the sheen."]], cost = 200, material_level=5, wielder = { @@ -5993,10 +5993,10 @@ newEntity{ base = "BASE_LEATHER_CAP", psi_on_crit=6, }, max_power = 30, power_regen = 1, - use_power = { name = "reveal the surrounding area (range 20)", power = 30, + use_power = { name = _t"reveal the surrounding area (range 20)", power = 30, no_npc_use = function(self, who) return not game.party:hasMember(who) end, use = function(self, who) - game.logSeen(who, "%s grasps %s %s and has a sudden vision!", who.name:capitalize(), who:his_her(), self:getName({do_color=true, no_add_name=true})) + game.logSeen(who, "%s grasps %s %s and has a sudden vision!", who:getName():capitalize(), who:his_her(), self:getName({do_color=true, no_add_name=true})) who:magicMap(20) return {id=true, used=true} end @@ -6007,14 +6007,14 @@ newEntity{ base = "BASE_AMULET", power_source = {nature=true}, unique = true, name = "Earthen Beads", color = colors.BROWN, image = "object/artifact/earthen_beads.png", - unided_name = "strung clay beads", - desc = [[This is a string of ancient, hardened clay beads, cracked and faded with age. It was used by Wilders in ancient times, in an attempt to enhance their connection with Nature.]], + unided_name = _t"strung clay beads", + desc = _t[[This is a string of ancient, hardened clay beads, cracked and faded with age. It was used by Wilders in ancient times, in an attempt to enhance their connection with Nature.]], level_range = {10, 20}, rarity = 200, cost = 100, material_level = 2, metallic = false, - special_desc = function(self) return "Enhances the effectiveness of Meditation by 20%" end, + special_desc = function(self) return _t"Enhances the effectiveness of Meditation by 20%" end, wielder = { combat_mindpower = 5, enhance_meditate=0.2, @@ -6032,8 +6032,8 @@ newEntity{ base = "BASE_GAUNTLETS", power_source = {arcane=true, nature=true}, --Perhaps it is of Dwarven make :) unique = true, name = "Hand of the World-Shaper", color = colors.BROWN, image = "object/artifact/hand_of_the_worldshaper.png", - unided_name = "otherworldly stone gauntlets", - desc = [[These heavy stone gauntlets make the very ground beneath you bend and warp as they move.]], + unided_name = _t"otherworldly stone gauntlets", + desc = _t[[These heavy stone gauntlets make the very ground beneath you bend and warp as they move.]], level_range = {40, 50}, rarity = 300, cost = 800, @@ -6075,8 +6075,8 @@ newEntity{ base = "BASE_CLOAK", power_source = {psionic=true}, unique = true, name = "Guise of the Hated", image = "object/artifact/guise_of_the_hated.png", - unided_name = "gloomy black cloak", - desc = [[Forget the moons, the starry sky, + unided_name = _t"gloomy black cloak", + desc = _t[[Forget the moons, the starry sky, The warm and greeting sheen of sun, The rays of light will never reach inside, The heart which wishes that it be unseen.]], @@ -6116,10 +6116,10 @@ newEntity{ base = "BASE_KNIFE", --Thanks FearCatalyst/FlarePusher! power_source = {arcane=true}, unique = true, name = "Spelldrinker", image = "object/artifact/spelldrinker.png", - unided_name = "eerie black dagger", + unided_name = _t"eerie black dagger", moddable_tile = "special/%s_spelldrinker", moddable_tile_big = true, - desc = [[Countless mages have fallen victim to the sharp sting of this blade, betrayed by those among them with greed for ever greater power. + desc = _t[[Countless mages have fallen victim to the sharp sting of this blade, betrayed by those among them with greed for ever greater power. Passed on and on, this blade has developed a thirst of its own.]], level_range = {20, 30}, rarity = 250, @@ -6132,7 +6132,7 @@ Passed on and on, this blade has developed a thirst of its own.]], physcrit = 9, dammod = {str=0.45, dex=0.55, mag=0.05}, talent_on_hit = { T_DISPERSE_MAGIC = {level=1, chance=15},}, - special_on_hit = {desc="steals up to 50 mana from the target", fct=function(combat, who, target) + special_on_hit = {desc=_t"steals up to 50 mana from the target", fct=function(combat, who, target) local manadrain = util.bound(target:getMana(), 0, 50) target:incMana(-manadrain) who:incMana(manadrain) @@ -6153,14 +6153,14 @@ newEntity{ base = "BASE_AMULET", power_source = {arcane=true}, unique = true, name = "Frost Lord's Chain", - unided_name = "ice coated chain", image = "object/artifact/frost_lords_chain.png", - desc = [[This impossibly cold chain of frost-coated metal radiates a strange and imposing aura.]], + unided_name = _t"ice coated chain", image = "object/artifact/frost_lords_chain.png", + desc = _t[[This impossibly cold chain of frost-coated metal radiates a strange and imposing aura.]], color = colors.LIGHT_RED, level_range = {40, 50}, rarity = 220, cost = 350, material_level = 5, - special_desc = function(self) return "Gives all your cold damage a 20% chance to freeze the target." end, + special_desc = function(self) return _t"Gives all your cold damage a 20% chance to freeze the target." end, wielder = { combat_spellpower=12, inc_damage={ @@ -6181,13 +6181,13 @@ newEntity{ base = "BASE_LONGSWORD", --Thanks BadBadger? power_source = {arcane=true}, unique = true, name = "Twilight's Edge", image = "object/artifact/twilights_edge.png", - unided_name = "shining long sword", + unided_name = _t"shining long sword", moddable_tile = "special/%s_twilights_edge", moddable_tile_big = true, level_range = {32, 42}, color=colors.GREY, rarity = 250, - desc = [[The blade of this sword seems to have been forged of a mixture of voratun and stralite, resulting in a blend of swirling light and darkness.]], + desc = _t[[The blade of this sword seems to have been forged of a mixture of voratun and stralite, resulting in a blend of swirling light and darkness.]], cost = 800, require = { stat = { str=35,}, }, material_level = 4, @@ -6196,7 +6196,7 @@ newEntity{ base = "BASE_LONGSWORD", --Thanks BadBadger? apr = 7, physcrit = 12, dammod = {str=1}, - special_on_crit = {desc="release a burst of light and dark damage (scales with Magic)", on_kill=1, fct=function(combat, who, target) + special_on_crit = {desc=_t"release a burst of light and dark damage (scales with Magic)", on_kill=1, fct=function(combat, who, target) local tg = {type="ball", range=10, radius=2, selffire=false} who:project(tg, target.x, target.y, engine.DamageType.LIGHT, 40 + who:getMag()*0.6) who:project(tg, target.x, target.y, engine.DamageType.DARKNESS, 40 + who:getMag()*0.6) @@ -6218,13 +6218,13 @@ newEntity{ base = "BASE_LONGSWORD", --Thanks BadBadger? newEntity{ base = "BASE_RING", power_source = {psionic=true}, name = "Mnemonic", unique=true, image = "object/artifact/mnemonic.png", - desc = [[As long as you wear this ring, you will never forget who you are.]], - unided_name = "familiar ring", + desc = _t[[As long as you wear this ring, you will never forget who you are.]], + unided_name = _t"familiar ring", level_range = {40, 50}, rarity = 250, cost = 300, material_level = 5, - special_desc = function(self) return "When using a mental talent, gives a 10% chance to lower the current cooldowns of up to three of your wild gift, psionic, or cursed talents by three turns." end, + special_desc = function(self) return _t"When using a mental talent, gives a 10% chance to lower the current cooldowns of up to three of your wild gift, psionic, or cursed talents by three turns." end, wielder = { combat_mentalresist = 20, combat_mindpower = 12, @@ -6245,13 +6245,13 @@ newEntity{ base = "BASE_LONGSWORD", power_source = {arcane=true, technique=true}, unique = true, name = "Acera", - unided_name = "corroded sword", image = "object/artifact/acera.png", + unided_name = _t"corroded sword", image = "object/artifact/acera.png", moddable_tile = "special/%s_acera", moddable_tile_big = true, level_range = {25, 35}, color=colors.GREEN, rarity = 300, - desc = [[This warped, blackened sword drips acid from its countless pores.]], + desc = _t[[This warped, blackened sword drips acid from its countless pores.]], cost = 400, require = { stat = { str=40 }, }, material_level = 3, @@ -6281,8 +6281,8 @@ newEntity{ base = "BASE_GREATSWORD", define_as = "DOUBLESWORD", name = "Borosk's Hate", unique=true, image="object/artifact/borosks_hate.png", moddable_tile = "special/%s_borosks_hate", - unided_name = "double-bladed sword", color=colors.GREY, - desc = [[This impressive looking sword features two massive blades aligned in parallel. They seem weighted remarkably well.]], + unided_name = _t"double-bladed sword", color=colors.GREY, + desc = _t[[This impressive looking sword features two massive blades aligned in parallel. They seem weighted remarkably well.]], require = { stat = { str=35 }, }, level_range = {40, 50}, rarity = 240, @@ -6294,7 +6294,7 @@ newEntity{ base = "BASE_GREATSWORD", apr = 22, physcrit = 10, dammod = {str=1.2}, - special_on_hit = {desc="25% chance to strike the target again.", fct=function(combat, who, target) + special_on_hit = {desc=_t"25% chance to strike the target again.", fct=function(combat, who, target) local o, item, inven_id = who:findInAllInventoriesBy("define_as", "DOUBLESWORD") if not o or not who:getInven(inven_id).worn then return end if o.running == true then return end @@ -6315,10 +6315,10 @@ newEntity{ base = "BASE_GREATSWORD", newEntity{ base = "BASE_LONGSWORD", power_source = {technique=true, psionic=true}, define_as = "BUTCHER", name = "Butcher", unique=true, image="object/artifact/butcher.png", - unided_name = "blood drenched shortsword", color=colors.CRIMSON, + unided_name = _t"blood drenched shortsword", color=colors.CRIMSON, moddable_tile = "special/%s_butcher", moddable_tile_big = true, - desc = [[Be it corruption, madness or eccentric boredom, the halfling butcher by the name of Caleb once took to eating his kin instead of cattle. His spree was never ended and nobody knows where he disappeared to. Only the blade remained, stuck fast in a bloodied block. Beneath, a carving said "This was fun, let's do it again some time."]], + desc = _t[[Be it corruption, madness or eccentric boredom, the halfling butcher by the name of Caleb once took to eating his kin instead of cattle. His spree was never ended and nobody knows where he disappeared to. Only the blade remained, stuck fast in a bloodied block. Beneath, a carving said "This was fun, let's do it again some time."]], require = { stat = { str=40 }, }, level_range = {36, 48}, rarity = 250, @@ -6327,14 +6327,14 @@ newEntity{ base = "BASE_LONGSWORD", running=false, special_desc = function(self) local maxp = self:min_power_to_trigger() - return ("Enter Rampage if health falls below 20%%%s"):format(self.power < maxp and (" (cooling down: %d turns)"):format(maxp - self.power) or "") + return ("Enter Rampage if health falls below 20%%%s"):tformat(self.power < maxp and (" (cooling down: %d turns)"):tformat(maxp - self.power) or "") end, combat = { dam = 48, apr = 12, physcrit = 10, dammod = {str=1}, - special_on_hit = {desc="Attempt to devour a low HP enemy, striking again and possibly killing it instantly.", fct=function(combat, who, target) + special_on_hit = {desc=_t"Attempt to devour a low HP enemy, striking again and possibly killing it instantly.", fct=function(combat, who, target) local Talents = require "engine.interface.ActorTalents" local o, item, inven_id = who:findInAllInventoriesBy("define_as", "BUTCHER") if not o or not who:getInven(inven_id).worn then return end @@ -6346,7 +6346,7 @@ newEntity{ base = "BASE_LONGSWORD", end o.running=false end}, - special_on_kill = {desc="Enter a Rampage (Shared cooldown).", fct=function(combat, who, target) + special_on_kill = {desc=_t"Enter a Rampage (Shared cooldown).", fct=function(combat, who, target) if who:hasEffect(who.EFF_RAMPAGE) then return end local Talents = require "engine.interface.ActorTalents" local o, item, inven_id = who:findInAllInventoriesBy("define_as", "BUTCHER") @@ -6390,13 +6390,13 @@ newEntity{ base = "BASE_CLOAK", power_source = {arcane=true}, unique = true, name = "Ethereal Embrace", image = "object/artifact/ethereal_embrace.png", - unided_name = "wispy purple cloak", - desc = [[This cloak waves and bends with shimmering light, reflecting the depths of space and the heart of the Aether.]], + unided_name = _t"wispy purple cloak", + desc = _t[[This cloak waves and bends with shimmering light, reflecting the depths of space and the heart of the Aether.]], level_range = {30, 40}, rarity = 400, cost = 250, material_level = 4, - special_desc = function(self) return ("Damage shields have +1 duration and +15% power") end, + special_desc = function(self) return (_t"Damage shields have +1 duration and +15% power") end, wielder = { combat_spellcrit = 6, combat_def = 10, @@ -6422,8 +6422,8 @@ newEntity{ base = "BASE_HEAVY_BOOTS", power_source = {psionic=true}, unique = true, name = "Boots of the Hunter", image = "object/artifact/boots_of_the_hunter.png", - unided_name = "well-worn boots", - desc = [[These cracked boots are caked with a thick layer of mud. It isn't clear who they previously belonged to, but they've clearly seen extensive use.]], + unided_name = _t"well-worn boots", + desc = _t[[These cracked boots are caked with a thick layer of mud. It isn't clear who they previously belonged to, but they've clearly seen extensive use.]], color = colors.BLACK, level_range = {30, 40}, rarity = 240, @@ -6461,10 +6461,10 @@ newEntity{ base = "BASE_HEAVY_BOOTS", if math.abs(UP.t_bias) ~= 0 then UP.t_bias = util.bound(UP.t_bias + (UP.t_bias > 1 and -1 or 1), -10, 10) end ---print(("%s acting: worn by %s with tactic %s, bias: %s"):format(self.name, who.name, who.ai_state.tactic, UP.t_bias)) +--print(("%s acting: worn by %s with tactic %s, bias: %s"):tformat(self.name, who:getName(), who.ai_state.tactic, UP.t_bias)) end, - use_power = { name = "boost movement speed by 300% for up to 5 turns (or until you perform a non-movement action)", power = 32, + use_power = { name = _t"boost movement speed by 300% for up to 5 turns (or until you perform a non-movement action)", power = 32, t_bias = 0, -- keeps track of tactical use on_pre_use_ai = function(self, who) return not who:attr("never_move") and not who:attr("cant_be_moved") and not who:hasEffect(who.EFF_HUNTER_SPEED) end, tactical = function(self, who, aitarget) @@ -6475,7 +6475,7 @@ newEntity{ base = "BASE_HEAVY_BOOTS", return tac end, use = function(self, who) - game.logSeen(who, "%s digs in %s %s.", who.name:capitalize(), who:his_her(), self:getName({do_color=true, no_add_name = true})) + game.logSeen(who, "%s digs in %s %s.", who:getName():capitalize(), who:his_her(), self:getName({do_color=true, no_add_name = true})) if not who.player then -- NPCs keep track of tactics to prevent overuse local UP = self.use_power if who.ai_state.tactic == "closein" then @@ -6494,8 +6494,8 @@ newEntity{ base = "BASE_GLOVES", power_source = {nature=true}, unique = true, name = "Sludgegrip", color = colors.GREEN, image = "object/artifact/sludgegrip.png", - unided_name = "slimy gloves", - desc = [[These gloves are coated with a thick, green liquid.]], + unided_name = _t"slimy gloves", + desc = _t[[These gloves are coated with a thick, green liquid.]], level_range = {1, 10}, rarity = 190, cost = 70, @@ -6523,8 +6523,8 @@ newEntity{ base = "BASE_RING", define_as = "SET_LICH_RING", power_source = {arcane=true}, unique = true, name = "Ring of the Archlich", image = "object/artifact/ring_of_the_archlich.png", - unided_name = "dusty, cracked ring", - desc = [[This ring is filled with an overwhelming, yet restrained, power. It lashes, grasps from its metal prison, searching for life to snuff out. You alone are unharmed. + unided_name = _t"dusty, cracked ring", + desc = _t[[This ring is filled with an overwhelming, yet restrained, power. It lashes, grasps from its metal prison, searching for life to snuff out. You alone are unharmed. Perhaps it feels all the death you will bring to others in the near future.]], color = colors.DARK_GREY, level_range = {30, 40}, @@ -6543,7 +6543,7 @@ Perhaps it feels all the death you will bring to others in the near future.]], max_power = 40, power_regen = 1, set_list = { {"define_as", "SET_SCEPTRE_LICH"} }, set_desc = { - archlich = "It desires to be surrounded by undeath.", + archlich = _t"It desires to be surrounded by undeath.", }, on_set_complete = function(self, who) game.logPlayer(who, "#DARK_GREY#Your ring releases a burst of necromantic energy!") @@ -6563,10 +6563,10 @@ newEntity{ base = "BASE_TOOL_MISC", unique=true, rarity=240, type = "charm", subtype="wand", name = "Lightbringer's Wand", image = "object/artifact/lightbringers_rod.png", - unided_name = "bright wand", + unided_name = _t"bright wand", color = colors.GOLD, level_range = {20, 30}, - desc = [[This gold-tipped wand shines with an unnatural sheen.]], + desc = _t[[This gold-tipped wand shines with an unnatural sheen.]], cost = 320, material_level = 3, wielder = { @@ -6579,7 +6579,7 @@ newEntity{ base = "BASE_TOOL_MISC", max_power = 35, power_regen = 1, use_power = { name = function(self, who) local dam = who:damDesc(engine.DamageType.LIGHT, self.use_power.damage(self, who)) - return ("summon a stationary shining orb within range %d for 15 turns that will illuminate its area and deal %d light damage (based on your Magic and Strength) to your foes within radius %d each turn"):format(self.use_power.range, dam, self.use_power.radius) + return ("summon a stationary shining orb within range %d for 15 turns that will illuminate its area and deal %d light damage (based on your Magic and Strength) to your foes within radius %d each turn"):tformat(self.use_power.range, dam, self.use_power.radius) end, power = 35, range = 5, @@ -6606,9 +6606,9 @@ newEntity{ base = "BASE_TOOL_MISC", local NPC = require "mod.class.NPC" local m = NPC.new{ resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_ghost_will_o__the_wisp.png", display_h=1, display_y=0}}}, - name = "Lightbringer", + name = _t"Lightbringer", type = "orb", subtype = "light", - desc = "A shining orb.", + desc = _t"A shining orb.", rank = 1, blood_color = colors.YELLOW, display = "T", color=colors.YELLOW, @@ -6660,7 +6660,7 @@ newEntity{ base = "BASE_TOOL_MISC", } m:resolve() - who:logCombat(target or {name = "a spot nearby"}, "#Source# points %s %s at #target#, releasing a brilliant orb of light!", who:his_her(), self:getName({do_color = true, no_add_name = true})) + who:logCombat(target or {name = _t"a spot nearby"}, "#Source# points %s %s at #target#, releasing a brilliant orb of light!", who:his_her(), self:getName({do_color = true, no_add_name = true})) game.zone:addEntity(game.level, m, "actor", x, y) m.remove_from_party_on_death = true if game.party:hasMember(who) then @@ -6668,7 +6668,7 @@ newEntity{ base = "BASE_TOOL_MISC", control=false, temporary_level = true, type="summon", - title="Summon", + title=_t"Summon", orders = {target=true, leash=true, anchor=true, talents=true}, }) end @@ -6680,11 +6680,11 @@ newEntity{ base = "BASE_TOOL_MISC", newEntity{ base = "BASE_SHIELD", power_source = {arcane=true}, unique = true, - unided_name = "handled hole in space", + unided_name = _t"handled hole in space", name = "Temporal Rift", image = "object/artifact/temporal_rift.png", moddable_tile = "special/%s_temporal_rift", moddable_tile_big = true, - desc = [[Some mad Chronomancer appears to have affixed a handle to this hole in spacetime. It looks highly effective, in its own strange way.]], + desc = _t[[Some mad Chronomancer appears to have affixed a handle to this hole in spacetime. It looks highly effective, in its own strange way.]], color = colors.LIGHT_GREY, rarity = 300, metallic = false, @@ -6720,15 +6720,15 @@ newEntity{ base = "BASE_ARROW", name = "Arkul's Siege Arrows", image = "object/artifact/arkuls_seige_arrows.png", moddable_tile = "special/arkuls_seige_arrows", proj_image = "object/artifact/arrow_s_arkuls_seige_arrows.png", - unided_name = "gigantic spiral arrows", - desc = [[These titanic double-helical arrows seem to have been designed more for knocking down towers than for use in regular combat. They'll no doubt make short work of most foes.]], + unided_name = _t"gigantic spiral arrows", + desc = _t[[These titanic double-helical arrows seem to have been designed more for knocking down towers than for use in regular combat. They'll no doubt make short work of most foes.]], color = colors.GREY, level_range = {42, 50}, rarity = 400, cost = 400, material_level = 5, require = { stat = { dex=20, str=30 }, }, - special_desc = function(self) return "25% of all damage splashes in a radius of 1 around the target." end, + special_desc = function(self) return _t"25% of all damage splashes in a radius of 1 around the target." end, combat = { capacity = 14, dam = 68, @@ -6743,13 +6743,13 @@ newEntity{ base = "BASE_LONGSWORD", --For whatever artists draws this: it's a ra power_source = {technique=true}, unique = true, name = "Punae's Blade", - unided_name = "thin blade", image = "object/artifact/punaes_blade.png", + unided_name = _t"thin blade", image = "object/artifact/punaes_blade.png", moddable_tile = "special/%s_punaes_blade", moddable_tile_big = true, level_range = {28, 38}, color=colors.GREY, rarity = 300, - desc = [[This very thin sword cuts through the air with ease, allowing remarkably quick movement.]], + desc = _t[[This very thin sword cuts through the air with ease, allowing remarkably quick movement.]], cost = 400, require = { stat = { str=30 }, }, material_level = 4, @@ -6771,13 +6771,13 @@ newEntity{ base = "BASE_CLOTH_ARMOR", --Thanks SageAcrin! power_source = {psionic=true}, unique = true, name = "Crimson Robe", color = colors.RED, image = "object/artifact/crimson_robe.png", - unided_name = "blood-stained robe", - desc = [[This robe was formerly owned by Callister the Psion, a powerful Psionic that pioneered many Psionic abilities. After his wife was murdered, Callister became obsessed with finding her killer, using his own hatred as a fuel for new and disturbing arts. After forcing the killer to torture himself to death, Callister walked the land, forcing any he found to kill themselves - his way of releasing them from the world's horrors. One day, he simply disappeared. This robe, soaked in blood, was the only thing he left behind.]], + unided_name = _t"blood-stained robe", + desc = _t[[This robe was formerly owned by Callister the Psion, a powerful Psionic that pioneered many Psionic abilities. After his wife was murdered, Callister became obsessed with finding her killer, using his own hatred as a fuel for new and disturbing arts. After forcing the killer to torture himself to death, Callister walked the land, forcing any he found to kill themselves - his way of releasing them from the world's horrors. One day, he simply disappeared. This robe, soaked in blood, was the only thing he left behind.]], level_range = {40, 50}, rarity = 230, cost = 350, material_level = 5, - special_desc = function(self) return "Increases your solipsism threshold by 20% (if you have one). If you do, also grants 15% global speed when worn." end, + special_desc = function(self) return _t"Increases your solipsism threshold by 20% (if you have one). If you do, also grants 15% global speed when worn." end, wielder = { combat_def=12, inc_stats = { [Stats.STAT_WIL] = 10, [Stats.STAT_CUN] = 10, }, @@ -6813,9 +6813,9 @@ newEntity{ base = "BASE_CLOTH_ARMOR", --Thanks SageAcrin! newEntity{ base = "BASE_RING", --Thanks Alex! power_source = {arcane=true}, name = "Exiler", unique=true, image = "object/artifact/exiler.png", - desc = [[The chronomancer known as Solith was renowned across all of Eyal. He always seemed to catch his enemies alone. + desc = _t[[The chronomancer known as Solith was renowned across all of Eyal. He always seemed to catch his enemies alone. In the case of opponents who weren't alone, he had to improvise.]], - unided_name = "insignia ring", + unided_name = _t"insignia ring", level_range = {40, 50}, rarity = 250, cost = 300, @@ -6844,7 +6844,7 @@ In the case of opponents who weren't alone, he had to improvise.]], local dam = who:damDesc(engine.DamageType.TEMPORAL, who:callTalent(Talents.T_TIME_SKIP, "getDamage", who, tal)) local dur = who:callTalent(Talents.T_TIME_SKIP, "getDuration", who, tal) who.talents[Talents.T_TIME_SKIP] = oldlevel - return ("attempt to inflict %0.2f temporal damage (based on Spellpower and Paradox, if any) on foes in a radius %d ball out to range %d (chance depends on rank, summons are always affected), removing any that survive from time for up to %d turn(s)"):format(dam, self.use_power.radius, self.use_power.range, dur) + return ("attempt to inflict %0.2f temporal damage (based on Spellpower and Paradox, if any) on foes in a radius %d ball out to range %d (chance depends on rank, summons are always affected), removing any that survive from time for up to %d turn(s)"):tformat(dam, self.use_power.radius, self.use_power.range, dur) end, power = 32, range =5, @@ -6876,7 +6876,7 @@ In the case of opponents who weren't alone, he had to improvise.]], local tg = self.use_power.target(self, who) local x, y = who:getTarget(tg) if not x or not y then return nil end - game.logSeen(who, "%s focuses time flows through %s %s!", who.name:capitalize(), who:his_her(), self:getName({do_color=true, no_add_name=true})) + game.logSeen(who, "%s focuses time flows through %s %s!", who:getName():capitalize(), who:his_her(), self:getName({do_color=true, no_add_name=true})) who:project(tg, x, y, function(px, py) local target = game.level.map(px, py, engine.Map.ACTOR) if not target then return end @@ -6895,8 +6895,8 @@ newEntity{ base = "BASE_SHIELD", name = "Piercing Gaze", image = "object/artifact/piercing_gaze.png", moddable_tile = "special/%s_piercing_gaze", moddable_tile_big = true, - unided_name = "stone-eyed shield", - desc = [[This gigantic shield has a stone eye embedded in it.]], + unided_name = _t"stone-eyed shield", + desc = _t[[This gigantic shield has a stone eye embedded in it.]], color = colors.BROWN, level_range = {30, 40}, rarity = 270, @@ -6918,10 +6918,10 @@ newEntity{ base = "BASE_SHIELD", learn_talent = { [Talents.T_BLOCK] = 1, }, resists = { [DamageType.PHYSICAL] = 10, [DamageType.ACID] = 10, [DamageType.LIGHTNING] = 10, [DamageType.FIRE] = 10,}, }, - on_block = {desc = "30% chance of petrifying the attacker.", fct = function(self, who, src, type, dam, eff) + on_block = {desc = _t"30% chance of petrifying the attacker.", fct = function(self, who, src, type, dam, eff) if rng.percent(30) then if not src then return end - game.logSeen(src, "The eye locks onto %s, freezing it in place!", src.name:capitalize()) + game.logSeen(src, "The eye locks onto %s, freezing it in place!", src:getName():capitalize()) if src.canBe and src:canBe("stun") and src:canBe("stone") and src:canBe("instakill") then src:setEffect(who.EFF_STONED, 5, {}) end @@ -6933,13 +6933,13 @@ newEntity{ base = "BASE_KNIFE", --Shibari's #1 power_source = {nature=true}, unique = true, name = "Shantiz the Stormblade", - unided_name = "thin stormy blade", image = "object/artifact/shantiz_the_stromblade.png", + unided_name = _t"thin stormy blade", image = "object/artifact/shantiz_the_stromblade.png", moddable_tile = "special/%s_shantiz_the_stromblade", moddable_tile_big = true, level_range = {18, 33}, material_level = 3, rarity = 300, - desc = [[This surreal dagger crackles with the intensity of a vicious storm.]], + desc = _t[[This surreal dagger crackles with the intensity of a vicious storm.]], cost = 400, color=colors.BLUE, require = { stat = { dex=30}}, @@ -6948,7 +6948,7 @@ newEntity{ base = "BASE_KNIFE", --Shibari's #1 apr = 20, physcrit = 10, dammod = {dex=1}, - special_on_hit = {desc="Causes lightning to strike and destroy any projectiles in a radius of 10, dealing damage and dazing enemies in a radius of 5 around them.", on_kill=1, fct=function(combat, who, target) + special_on_hit = {desc=_t"Causes lightning to strike and destroy any projectiles in a radius of 10, dealing damage and dazing enemies in a radius of 5 around them.", on_kill=1, fct=function(combat, who, target) local grids = core.fov.circle_grids(who.x, who.y, 10, true) for x, yy in pairs(grids) do for y, _ in pairs(grids[x]) do local i = 0 @@ -6996,23 +6996,23 @@ newEntity{ base = "BASE_KNIFE", power_source = {technique=true}, unique = true, name = "Swordbreaker", image = "object/artifact/swordbreaker.png", - unided_name = "hooked blade", + unided_name = _t"hooked blade", moddable_tile = "special/%s_swordbreaker", moddable_tile_big = true, - desc = [[This ordinary blade is made of fine, sturdy voratun and outfitted with jagged hooks along the edge. This simple appearance belies a great power - the hooked maw of this dagger broke many a blade and the stride of many would-be warriors.]], + desc = _t[[This ordinary blade is made of fine, sturdy voratun and outfitted with jagged hooks along the edge. This simple appearance belies a great power - the hooked maw of this dagger broke many a blade and the stride of many would-be warriors.]], level_range = {20, 30}, rarity = 250, require = { stat = { dex=10, cun=10 }, }, cost = 300, material_level = 3, - special_desc = function(self) return "Can block like a shield, potentially disarming the enemy." end, + special_desc = function(self) return _t"Can block like a shield, potentially disarming the enemy." end, combat = { dam = 25, apr = 20, physcrit = 15, physspeed = 0.9, dammod = {dex=0.5,cun=0.5}, - special_on_crit = {desc="Breaks enemy weapon.", fct=function(combat, who, target) + special_on_crit = {desc=_t"Breaks enemy weapon.", fct=function(combat, who, target) target:setEffect(target.EFF_SUNDER_ARMS, 5, {power=5+(who:combatPhysicalpower()*0.33), apply_power=who:combatPhysicalpower()}) end}, }, @@ -7033,10 +7033,10 @@ newEntity{ base = "BASE_SHIELD", power_source = {arcane=true}, unique = true, name = "Shieldsmaiden", image = "object/artifact/shieldmaiden.png", - unided_name = "icy shield", + unided_name = _t"icy shield", moddable_tile = "special/%s_shieldmaiden", moddable_tile_big = true, - desc = [[Myths tell of shieldsmaidens, a tribe of warrior women from the northern wastes of Maj'Eyal. Their martial prowess and beauty drew the fascination of swaths of admirers, yet all unrequited. So began the saying, that a shieldsmaiden's heart is as cold and unbreakable as her shield.]], + desc = _t[[Myths tell of shieldsmaidens, a tribe of warrior women from the northern wastes of Maj'Eyal. Their martial prowess and beauty drew the fascination of swaths of admirers, yet all unrequited. So began the saying, that a shieldsmaiden's heart is as cold and unbreakable as her shield.]], color = colors.BLUE, level_range = {36, 48}, rarity = 270, @@ -7044,7 +7044,7 @@ newEntity{ base = "BASE_SHIELD", cost = 400, material_level = 5, metallic = false, - special_desc = function(self) return "Granted talent can block up to 1 instance of damage each 10 turns." end, + special_desc = function(self) return _t"Granted talent can block up to 1 instance of damage each 10 turns." end, special_combat = { dam = 48, block = 150, @@ -7069,13 +7069,13 @@ newEntity{ base = "BASE_GREATMAUL", unique = true, color = colors.BLUE, name = "Tirakai's Maul", image = "object/artifact/tirakais_maul.png", - desc = [[This massive hammer is formed from a thick mass of strange crystalline growths. In the side of the hammer itself you see an empty slot; it looks like a gem of your own could easily fit inside it.]], + desc = _t[[This massive hammer is formed from a thick mass of strange crystalline growths. In the side of the hammer itself you see an empty slot; it looks like a gem of your own could easily fit inside it.]], moddable_tile = "special/%s_tirakais_maul", moddable_tile_big = true, - gemDesc = "None", -- Defined by the elemental properties and used by special_desc + gemdesc = _t"None", -- Defined by the elemental properties and used by special_desc special_desc = function(self) -- You'll want to color this and such - if not self.Gem then return ("No gem") end - return ("%s: %s"):format(self.Gem.name:capitalize(), self.gemDesc or ("Write a description for this gem's properties!")) + if not self.Gem then return (_t"No gem") end + return ("%s: %s"):tformat(self.Gem:getName():capitalize(), self.gemDesc or (_t"Write a description for this gem's properties!")) end, cost = 1000, material_level = 2, -- Changes to gem material level on socket @@ -7097,16 +7097,16 @@ newEntity{ base = "BASE_GREATMAUL", inc_damage = {FIRE = 3 * gem.material_level, DARKNESS = 3 * gem.material_level,}, resists_pen = {all = 2 * gem.material_level},}, true) - maul.gemDesc = "Demonic" + maul.gemDesc = _t"Demonic" end,}, max_power = 10, power_regen = 1, - use_power = { name = "imbue the hammer with a gem of your choice", power = 10, + use_power = { name = _t"imbue the hammer with a gem of your choice", power = 10, no_npc_use = true, use = function(self, who) local DamageType = require "engine.DamageType" local Stats = require "engine.interface.ActorStats" local d - d = who:showInventory("Use which gem?", who:getInven("INVEN"), function(gem) return gem.type == "gem" and gem.imbue_powers and gem.material_level end, function(gem, gem_item) + d = who:showInventory(_t"Use which gem?", who:getInven("INVEN"), function(gem) return gem.type == "gem" and gem.imbue_powers and gem.material_level end, function(gem, gem_item) local name_old=self.name local old_hotkey for i, v in pairs(who.hotkey) do @@ -7129,7 +7129,7 @@ newEntity{ base = "BASE_GREATMAUL", who:onTakeoff(self, inven_id) self.Gem = gem - self.gemDesc = "something has gone wrong" + self.gemdesc = _t"something has gone wrong" self.sentient = false self.act = mod.class.Object.act @@ -7167,14 +7167,14 @@ newEntity{ base = "BASE_GREATMAUL", {inc_damage = {[gem.color_attributes.damage_type] = 4 * scalingFactor},}, true) self.combat.burst_on_crit = {[gem.color_attributes.alt_damage_type] = 12 * scalingFactor,} - self.gemDesc = gem.color_attributes.desc or gem.color_attributes.damage_type:lower():capitalize() + self.gemDesc = gem.color_attributes.desc or _t(gem.color_attributes.damage_type:lower()):capitalize() else -- Backup for weird artifacts. table.mergeAdd(self.combat, {convert_damage = {[DamageType.COLD] = 25, [DamageType.FIRE] = 25, [DamageType.LIGHTNING] = 25, [DamageType.ARCANE] = 25,} }, true) table.mergeAdd(self.wielder, { inc_damage = { all = 2 * scalingFactor}, resists_pen = { all = 2 * scalingFactor}, }, true) - self.gemDesc = 'Unique' + self.gemDesc = _t'Unique' end game.logPlayer(who, "You imbue your %s with %s.", self:getName{do_colour=true, no_count=true}, gem:getName{do_colour=true, no_count=true}) @@ -7218,8 +7218,8 @@ newEntity{ base = "BASE_GLOVES", define_as = "SET_GLOVE_DESTROYER", power_source = {arcane=true, technique=true}, unique = true, name = "Fist of the Destroyer", color = colors.RED, image = "object/artifact/fist_of_the_destroyer.png", - unided_name = "vile gauntlets", - desc = [[These fell looking gloves glow with untold power.]], + unided_name = _t"vile gauntlets", + desc = _t[[These fell looking gloves glow with untold power.]], level_range = {40, 50}, rarity = 300, cost = 800, @@ -7229,7 +7229,7 @@ newEntity{ base = "BASE_GLOVES", define_as = "SET_GLOVE_DESTROYER", if self.set_complete then num=6 end - return ("Increases all damage by %d%% of current vim \nCurrent Bonus: %d%%"):format(num, num*0.01*(game.player:getVim() or 0)) + return ("Increases all damage by %d%% of current vim \nCurrent Bonus: %d%%"):tformat(num, num*0.01*(game.player:getVim() or 0)) end, wielder = { inc_stats = { [Stats.STAT_STR] = 9, [Stats.STAT_MAG] = 9, [Stats.STAT_CUN] = 3, }, @@ -7252,7 +7252,7 @@ newEntity{ base = "BASE_GLOVES", define_as = "SET_GLOVE_DESTROYER", use_talent = { id = Talents.T_DARKFIRE, level = 5, power = 12 }, set_list = { {"define_as", "SET_ARMOR_MASOCHISM"} }, set_desc = { - destroyer = "Only the masochistic can unlock its full power.", + destroyer = _t"Only the masochistic can unlock its full power.", }, on_set_complete = function(self, who) game.logPlayer(who, "#STEEL_BLUE#The fist and the mangled clothing glow ominously!") @@ -7268,8 +7268,8 @@ newEntity{ base = "BASE_LIGHT_ARMOR", define_as = "SET_ARMOR_MASOCHISM", power_source = {arcane=true, technique=true}, unique = true, name = "Masochism", color = colors.RED, image = "object/artifact/masochism.png", - unided_name = "mangled clothing", - desc = [[Stolen flesh, + unided_name = _t"mangled clothing", + desc = _t[[Stolen flesh, Stolen pain, To give it up, Is to live again.]], @@ -7282,7 +7282,7 @@ newEntity{ base = "BASE_LIGHT_ARMOR", define_as = "SET_ARMOR_MASOCHISM", if self.set_complete then num=10 end - return ("Reduces all damage by %d%% of current vim or 50%% of the damage, whichever is lower; but at the cost of vim equal to 5%% of the damage blocked. \nCurrent Bonus: %d"):format(num, num*0.01*(game.player:getVim() or 0)) + return ("Reduces all damage by %d%% of current vim or 50%% of the damage, whichever is lower; but at the cost of vim equal to 5%% of the damage blocked. \nCurrent Bonus: %d"):tformat(num, num*0.01*(game.player:getVim() or 0)) end, wielder = { inc_stats = {[Stats.STAT_MAG] = 9, [Stats.STAT_CUN] = 3, }, @@ -7301,7 +7301,7 @@ newEntity{ base = "BASE_LIGHT_ARMOR", define_as = "SET_ARMOR_MASOCHISM", use_talent = { id = Talents.T_BLOOD_GRASP, level = 5, power = 12 }, set_list = { {"define_as", "SET_GLOVE_DESTROYER"} }, set_desc = { - masochism = "With a better grip it would be the destroyer of your enemies.", + masochism = _t"With a better grip it would be the destroyer of your enemies.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","demonblood_def"}, 0.03) @@ -7315,8 +7315,8 @@ newEntity{ base = "BASE_GREATMAUL", power_source = {technique=true}, unique = true, name = "Obliterator", color = colors.UMBER, image = "object/artifact/obliterator.png", - unided_name = "titanic maul", - desc = [[This massive hammer strikes with deadly force. Bones crunch, splinter and grind to dust under its impact.]], + unided_name = _t"titanic maul", + desc = _t[[This massive hammer strikes with deadly force. Bones crunch, splinter and grind to dust under its impact.]], level_range = {23, 30}, rarity = 270, require = { stat = { str=40 }, }, @@ -7331,7 +7331,7 @@ newEntity{ base = "BASE_GREATMAUL", special_on_hit = { --thanks nsrr!-- desc=function(self, who, special) local damage = special.damage(self, who) - local s = ("Sends a tremor through the ground which causes jagged rocks to erupt in a beam of length 5, dealing %d Physical damage (equal to your Strength, up to 150) and causing targets hit to bleed for an additional 50 damage over 5 turns. Bleeding can stack."):format(damage) + local s = ("Sends a tremor through the ground which causes jagged rocks to erupt in a beam of length 5, dealing %d Physical damage (equal to your Strength, up to 150) and causing targets hit to bleed for an additional 50 damage over 5 turns. Bleeding can stack."):tformat(damage) return s end, damage = function(self, who) @@ -7376,8 +7376,8 @@ newEntity{ base = "BASE_HELM", power_source = {technique=true}, unique = true, name = "Yaldan Baoth", image = "object/artifact/yaldan_baoth.png", - unided_name = "obscuring helm", - desc = [[The golden bascinet crown, affiliated with Veluca of Yaldan. King of the mythical city of Yaldan, that was struck from the face of Eyal by the arrogance of its people. Lone survivor of his kin, he spent his last years wandering the early world, teaching man to stand against the darkness. With his dying words, "Fear no evil", the crown was passed onto his successor.]], + unided_name = _t"obscuring helm", + desc = _t[[The golden bascinet crown, affiliated with Veluca of Yaldan. King of the mythical city of Yaldan, that was struck from the face of Eyal by the arrogance of its people. Lone survivor of his kin, he spent his last years wandering the early world, teaching man to stand against the darkness. With his dying words, "Fear no evil", the crown was passed onto his successor.]], level_range = {28, 39,}, rarity = 240, cost = 700, @@ -7403,11 +7403,11 @@ newEntity{ base = "BASE_HELM", }, max_power = 40, power_regen = 1, use_power = { - name = function(self, who) return ("lower the helmet's visor, blinding yourself (and protecting from other blinds) for 6 turns. If the helmet is taken off, the effect will end early."):format(self.use_power.range) end, + name = function(self, who) return ("lower the helmet's visor, blinding yourself (and protecting from other blinds) for 6 turns. If the helmet is taken off, the effect will end early."):tformat(self.use_power.range) end, power = 40, use = function(self, who) who:setEffect(who.EFF_FORGONE_VISION, 6, {power = 2}) - game.logSeen(who, "%s forgoes their vision!", who.name:capitalize()) + game.logSeen(who, "%s forgoes their vision!", who:getName():capitalize()) return {id=true, used=true} end }, @@ -7417,14 +7417,14 @@ newEntity{ base = "BASE_GREATSWORD", power_source = {technique=true, arcane=true}, name = "Champion's Will", unique=true, image = "object/artifact/champions_will.png", moddable_tile = "special/%s_champions_will", - unided_name = "blindingly bright sword", color=colors.YELLOW, - desc = [[This impressive looking sword features a golden engraving of a sun in its hilt. Etched into its blade are a series of runes claiming that only one who has mastered both their body and mind may wield this sword effectively.]], + unided_name = _t"blindingly bright sword", color=colors.YELLOW, + desc = _t[[This impressive looking sword features a golden engraving of a sun in its hilt. Etched into its blade are a series of runes claiming that only one who has mastered both their body and mind may wield this sword effectively.]], require = { stat = { str=35 }, }, level_range = {40, 50}, rarity = 240, cost = 280, material_level = 5, - special_desc = function(self) return "Increases the damage of Sun Beam by 15%." end, + special_desc = function(self) return _t"Increases the damage of Sun Beam by 15%." end, combat = { dam = 67, apr = 22, @@ -7432,7 +7432,7 @@ newEntity{ base = "BASE_GREATSWORD", dammod = {str=1.15, con = 0.2}, special_on_hit = { desc=function(self, who, special) - return ("releases a burst of light, dealing %d light damage (based on Spellpower) in a radius 3 cone."):format(who:damDesc(engine.DamageType.LIGHT, who:combatSpellpower())) + return ("releases a burst of light, dealing %d light damage (based on Spellpower) in a radius 3 cone."):tformat(who:damDesc(engine.DamageType.LIGHT, who:combatSpellpower())) end, on_kill=1, fct=function(combat, who, target) who.turn_procs.champion_will = (who.turn_procs.champion_will or 0) + 1 @@ -7458,7 +7458,7 @@ newEntity{ base = "BASE_GREATSWORD", }, max_power = 30, power_regen = 1, use_power = { - name = function(self, who) return ("attack everything in a line out to range %d, dealing 100%% weapon damage (as light), and healing for 50%% of the damage dealt"):format(self.use_power.range) end, + name = function(self, who) return ("attack everything in a line out to range %d, dealing 100%% weapon damage (as light), and healing for 50%% of the damage dealt"):tformat(self.use_power.range) end, power = 30, range = 4, target = function(self, who) return {type="beam", range=self.use_power.range} end, @@ -7469,7 +7469,7 @@ newEntity{ base = "BASE_GREATSWORD", local x, y, target = who:getTarget(tg) if not x or not y then return nil end local _ _, x, y = who:canProject(tg, x, y) - who:logCombat(target or who.ai_target.actor or {name = "something"}, "#Source# strikes out at #target# with %s %s!", who:his_her(), self:getName({do_color = true, no_add_name = true})) + who:logCombat(target or who.ai_target.actor or {name = _t"something"}, "#Source# strikes out at #target# with %s %s!", who:his_her(), self:getName({do_color = true, no_add_name = true})) game.level.map:particleEmitter(who.x, who.y, tg.radius, "light_beam", {tx=x-who.x, ty=y-who.y}) game:playSoundNear(self, "talents/lightning") who:attr("lifesteal", 50) @@ -7492,8 +7492,8 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", power_source = {technique=true}, unique = true, name = "Tarrasca", image = "object/artifact/terrasca.png", - unided_name = "absurdly large armor", - desc = [[This massive suit of plate boasts an enormous bulk and overbearing weight. Said to belong to a nameless soldier who safeguarded a passage across the bridge to his village, in defiance to the cohorts of invading orcs. After days of assault failed to fell him, the orcs turned back. The man however, fell dead on the spot - from exhaustion. The armor had finally claimed his life.]], + unided_name = _t"absurdly large armor", + desc = _t[[This massive suit of plate boasts an enormous bulk and overbearing weight. Said to belong to a nameless soldier who safeguarded a passage across the bridge to his village, in defiance to the cohorts of invading orcs. After days of assault failed to fell him, the orcs turned back. The man however, fell dead on the spot - from exhaustion. The armor had finally claimed his life.]], color = colors.RED, level_range = {30, 40}, rarity = 320, @@ -7502,7 +7502,7 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", material_level = 4, special_desc = function(self, who) local resist = who and self.worn_by == who and self:set_resist(who) or 0 - return ("When your effective movement speed (global speed times movement speed) is less than 100%%, reduces all incoming damage by a percent equal to the speed detriment (up to 70%%).\nCurrent reduction bonus: %d%%"):format(resist) end, + return ("When your effective movement speed (global speed times movement speed) is less than 100%%, reduces all incoming damage by a percent equal to the speed detriment (up to 70%%).\nCurrent reduction bonus: %d%%"):tformat(resist) end, wielder = { inc_stats = { [Stats.STAT_CON] = 15, }, combat_armor = 50, @@ -7546,7 +7546,7 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", self:set_resist(who) end, max_power = 25, power_regen = 1, - use_power = { name = "slow the movement speed of all creatures (including yourself) within range 5 by 40% for 3 turns", + use_power = { name = _t"slow the movement speed of all creatures (including yourself) within range 5 by 40% for 3 turns", power = 25, range = 0, radius = 5, @@ -7568,7 +7568,7 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", use = function(self, who) local tg = self.use_power.target(self, who) tg.selffire = true -- set here so that the ai will use it - game.logSeen(who, "%s rebalances the bulky plates of %s %s, and things slow down a bit.", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) + game.logSeen(who, "%s rebalances the bulky plates of %s %s, and things slow down a bit.", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) who:project(tg, who.x, who.y, function(px, py) local target = game.level.map(px, py, engine.Map.ACTOR) if not target then return end @@ -7583,14 +7583,14 @@ newEntity{ base = "BASE_LEATHER_CAP", power_source = {unknown=true}, unique = true, name = "The Face of Fear", - unided_name = "bone mask", image = "object/artifact/the_face_of_fear.png", + unided_name = _t"bone mask", image = "object/artifact/the_face_of_fear.png", level_range = {24, 32}, color=colors.GREEN, moddable_tile = "special/the_face_of_fear", moddable_tile_big = true, encumber = 2, rarity = 200, - desc = [[This mask appears to be carved out of the skull of a creature that never should have existed, malformed and distorted. You shiver as you look upon it, and its hollow eye sockets seem to stare back into you.]], + desc = _t[[This mask appears to be carved out of the skull of a creature that never should have existed, malformed and distorted. You shiver as you look upon it, and its hollow eye sockets seem to stare back into you.]], cost = 200, material_level=3, wielder = { @@ -7606,9 +7606,9 @@ newEntity{ base = "BASE_LEATHER_CAP", newEntity{ base = "BASE_LEATHER_BOOT", power_source = {arcane=true}, - unided_name = "flame coated sandals", + unided_name = _t"flame coated sandals", name = "Cinderfeet", unique=true, image = "object/artifact/cinderfeet.png", - desc = [[A cautionary tale tells of the ancient warlock by the name of Caim, who fancied himself daily walks through Goedalath, both to test himself and the harsh demonic wastes. He was careful to never bring anything back with him, lest it provide a beacon for the demons to find him. Unfortunately, over time, his sandals drenched in the soot and ashes of the fearscape and the fire followed his footsteps outside, drawing in the conclusion of his grim fate.]], + desc = _t[[A cautionary tale tells of the ancient warlock by the name of Caim, who fancied himself daily walks through Goedalath, both to test himself and the harsh demonic wastes. He was careful to never bring anything back with him, lest it provide a beacon for the demons to find him. Unfortunately, over time, his sandals drenched in the soot and ashes of the fearscape and the fire followed his footsteps outside, drawing in the conclusion of his grim fate.]], require = { stat = { dex=10 }, }, level_range = {28, 38}, material_level = 4, @@ -7632,7 +7632,7 @@ newEntity{ base = "BASE_LEATHER_BOOT", }, special_desc = function(self, who) local dam = who and who:damDesc(engine.DamageType.FIRE, self:trail_damage(who)) or 0 - return ("Each step you take leaves a burning trail behind you lasting 5 turns that deals %d fire damage (based on Spellpower) to foes who enter it."):format(dam) + return ("Each step you take leaves a burning trail behind you lasting 5 turns that deals %d fire damage (based on Spellpower) to foes who enter it."):tformat(dam) end, on_wear = function(self, who) self.worn_by = who @@ -7667,7 +7667,7 @@ newEntity{ base = "BASE_LEATHER_BOOT", false, false ) - ef.name = "fire trail" + ef.name = _t"fire trail" end self.oldx=who.x self.oldy=who.y @@ -7679,10 +7679,10 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", power_source = {arcane=true}, unique = true, name = "Cuirass of the Dark Lord", image = "object/artifact/dg_casual_outfit.png", - unided_name = "black, spiked armor", + unided_name = _t"black, spiked armor", moddable_tile = "special/dgs_clothes", moddable_tile_big = true, - desc = [[Worn by a villain long forgotten, this armor was powered by the blood of thousands of innocents. Decrepit and old, the dark lord died in solitude, his dominion crumbled, his subjects gone. Only this cuirass remained, dying to finally taste fresh blood again.]], + desc = _t[[Worn by a villain long forgotten, this armor was powered by the blood of thousands of innocents. Decrepit and old, the dark lord died in solitude, his dominion crumbled, his subjects gone. Only this cuirass remained, dying to finally taste fresh blood again.]], color = colors.RED, level_range = {40, 50}, rarity = 320, @@ -7706,7 +7706,7 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", use_power = { name = function(self, who) local dam = who:damDesc(engine.DamageType.PHYSICAL, self.use_power.bleed(self, who)) - return ("drain blood from all creatures within range 5, causing them to bleed for %0.2f physical damage over 4 turns (based on your Physicalpower). For each creature drained (up to 10), the armor gains strength, which fades over 10 turns if it is not fed"):format(dam) + return ("drain blood from all creatures within range 5, causing them to bleed for %0.2f physical damage over 4 turns (based on your Physicalpower). For each creature drained (up to 10), the armor gains strength, which fades over 10 turns if it is not fed"):tformat(dam) end, power = 25, bleed = function(self, who) return who:combatPhysicalpower()*3 end, @@ -7740,7 +7740,7 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", radius = 5, no_npc_use = function(self, who) return self:restrictAIUseObject(who) end, use = function(self, who) - game.logSeen(who, "%s revels in the bloodlust of %s %s!", who.name:capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) + game.logSeen(who, "%s revels in the bloodlust of %s %s!", who:getName():capitalize(), who:his_her(), self:getName({do_color = true, no_add_name = true})) local damage = self.use_power.bleed(self, who)/4 who:project(self.use_power.target(self, who), who.x, who.y, function(px, py) local target = game.level.map(px, py, engine.Map.ACTOR) @@ -7760,7 +7760,7 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", self.worn_by = nil end, special_desc = function(self) - return ("Blood Charges: " .. (self.blood_charge or 0)) + return (("Blood Charges: %d"):tformat(self.blood_charge or 0)) end, act = function(self) self:useEnergy() @@ -7806,9 +7806,9 @@ newEntity{ base = "BASE_MASSIVE_ARMOR", newEntity{ unique = true, type = "jewelry", subtype="ankh", - unided_name = "glowing ankh", + unided_name = _t"glowing ankh", name = "Anchoring Ankh", - desc = [[As you lift the ankh you feel stable. The world around you feels stable.]], + desc = _t[[As you lift the ankh you feel stable. The world around you feels stable.]], level_range = {15, 50}, rarity = 400, display = "*", color=colors.YELLOW, image = "object/fireopal.png", @@ -7825,11 +7825,11 @@ newEntity{ base = "BASE_LEATHER_CAP", define_as = "DECAYED_VISAGE", power_source = {arcane=true}, unique = true, name = "Decayed Visage", - unided_name = "mask of mummified skin", image = "object/artifact/decayed_visage.png", + unided_name = _t"mask of mummified skin", image = "object/artifact/decayed_visage.png", level_range = {24, 32}, color=colors.GRAY, rarity = 200, - desc = [[A desiccated mask of human skin, all that remains of a necromancer from the Age of Pyre who failed to achieve lichdom. The transformative process partially succeeded, leaving him unable to die as his body slowly rotted from the inside out over several years. Now his spirit resides within this last bit of mummified flesh, still hungering for eternal life.]], + desc = _t[[A desiccated mask of human skin, all that remains of a necromancer from the Age of Pyre who failed to achieve lichdom. The transformative process partially succeeded, leaving him unable to die as his body slowly rotted from the inside out over several years. Now his spirit resides within this last bit of mummified flesh, still hungering for eternal life.]], cost = 200, material_level=3, encumber = 1, @@ -7853,8 +7853,8 @@ newEntity{ base = "BASE_GREATMAUL", define_as = "DREAM_MALLEUS", power_source = {technique=true, psionic=true}, unique = true, name = "Dream Malleus", color = colors.UMBER, image = "object/artifact/dream_malleus.png", - unided_name = "keening hammer", - desc = [[A large shimmering maul that seems to produce a ringing in your ears. It is both as malleable as thought and as hard as the strongest steel.]], + unided_name = _t"keening hammer", + desc = _t[[A large shimmering maul that seems to produce a ringing in your ears. It is both as malleable as thought and as hard as the strongest steel.]], level_range = {25, 40}, rarity = 300, require = { stat = { str=25, wil=25 }, }, @@ -7894,15 +7894,15 @@ newEntity{ base = "BASE_WIZARD_HAT", power_source = {nature=true}, unique = true, name = "Cloud Caller", - unided_name = "broad brimmed hat", - desc = [[This hat's broad brim protects you from biting colds and sudden storms.]], + unided_name = _t"broad brimmed hat", + desc = _t[[This hat's broad brim protects you from biting colds and sudden storms.]], color = colors.BLUE, image = "object/artifact/cloud_caller.png", moddable_tile = "special/cloud_caller", level_range = {1, 10}, rarity = 300, cost = 30, material_level = 1, - special_desc = function(self) return "A small storm cloud follows you, dealing 15 lightning damage to all enemies in a radius of 3 each turn." end, + special_desc = function(self) return _t"A small storm cloud follows you, dealing 15 lightning damage to all enemies in a radius of 3 each turn." end, wielder = { resists = { [DamageType.COLD] = 10, @@ -7938,11 +7938,11 @@ newEntity{ base = "BASE_TOOL_MISC", unique=true, rarity=300, type = "charm", subtype="torque", name = "The Jolt", image = "object/artifact/the_jolt.png", - unided_name = "tingling torque", + unided_name = _t"tingling torque", color = colors.BLUE, level_range = {10, 20}, - desc = [[This torque feels tingly to the touch, but seems to enhance your thinking.]], - special_desc = function(self) return [[Your mind is attuned to electricity. + desc = _t[[This torque feels tingly to the touch, but seems to enhance your thinking.]], + special_desc = function(self) return _t[[Your mind is attuned to electricity. Any lightning damage you do that is more than 10% of the victim's maximum life will attempt to brainlock the target. Upon taking lightning damage >10% of your max life, your mind fires back, dealing 30% of the original damage as mind and trying to brainlock the target. Upon taking mind damage >10% of your max life, you reflexively trigger the jolt, sending an arc of dazing lightning toward the target (damage based on mindpower). @@ -8000,10 +8000,10 @@ This item can have up to 2 charges, with each charge having 4 turn cooldown.]] e newEntity{ base = "BASE_BATTLEAXE", power_source = {nature=true}, unique = true, - unided_name = "damp steel battle axe", + unided_name = _t"damp steel battle axe", name = "Stormfront", color = colors.BLUE, image = "object/artifact/stormfront.png", moddable_tile = "special/%s_stormfront", - desc = [[The blade glows faintly blue, and reflects a sky full of stormy clouds.]], + desc = _t[[The blade glows faintly blue, and reflects a sky full of stormy clouds.]], require = { stat = { str=16 }, }, level_range = {10, 20}, rarity = 300, @@ -8018,7 +8018,7 @@ newEntity{ base = "BASE_BATTLEAXE", [DamageType.LIGHTNING]=15, [DamageType.COLD]=15, }, - special_on_crit = {desc="inflicts either shocked or wet, chosen at random", fct=function(combat, who, target) + special_on_crit = {desc=_t"inflicts either shocked or wet, chosen at random", fct=function(combat, who, target) if not target or target == self then return end if rng.percent(50) then target:setEffect(target.EFF_SHOCKED, 3, {src=who}) @@ -8039,12 +8039,12 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "EYE_OF_SUMMER", power_source = {nature=true}, unique = true, name = "Eye of Summer", - unided_name = "warm mindstar", + unided_name = _t"warm mindstar", level_range = {10, 20}, color=colors.RED, image = "object/artifact/eye_of_summer.png", moddable_tile = "special/%s_eye_of_summer", rarity = 300, - desc = [[This mindstar glows with a bright warm light, but seems somehow incomplete.]], + desc = _t[[This mindstar glows with a bright warm light, but seems somehow incomplete.]], cost = 40, require = { stat = { wil=18 }, }, material_level = 2, @@ -8071,7 +8071,7 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "EYE_OF_SUMMER", harmonious = {{"ms_set_harmonious", true},}, }, set_desc = { - eyesummer = "Nature requires balance in these matters.", + eyesummer = _t"Nature requires balance in these matters.", }, on_set_complete = { multiple = true, @@ -8095,12 +8095,12 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "EYE_OF_WINTER", power_source = {nature=true}, unique = true, name = "Eye of Winter", - unided_name = "cold mindstar", + unided_name = _t"cold mindstar", level_range = {10, 20}, color=colors.BLUE, image = "object/artifact/eye_of_winter.png", moddable_tile = "special/%s_eye_of_winter", rarity = 300, - desc = [[This mindstar glows with a dim cool light, but seems somehow incomplete.]], + desc = _t[[This mindstar glows with a dim cool light, but seems somehow incomplete.]], cost = 40, require = { stat = { wil=18 }, }, material_level = 2, @@ -8127,7 +8127,7 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "EYE_OF_WINTER", harmonious = {{"ms_set_harmonious", true},}, }, set_desc = { - eyewinter = "Nature requires balance in these matters.", + eyewinter = _t"Nature requires balance in these matters.", }, on_set_complete = { multiple = true, @@ -8149,8 +8149,8 @@ newEntity{ base = "BASE_GAUNTLETS", unique = true, name = "Ruthless Grip", color = colors.DARK_BLUE, image = "object/artifact/grip_of_death.png", moddable_tile = "special/grip_of_death", - unided_name = "sinister gauntlets", - desc = [[Crafted for a warlord who wanted to keep his subjects under a stralite grip. Dark thoughts went into the making of these gauntlets, literally.]], + unided_name = _t"sinister gauntlets", + desc = _t[[Crafted for a warlord who wanted to keep his subjects under a stralite grip. Dark thoughts went into the making of these gauntlets, literally.]], level_range = {30, 40}, rarity = 300, cost = resolvers.rngrange(400,650), @@ -8187,8 +8187,8 @@ newEntity{ base = "BASE_KNIFE", unique = true, name = "Icy Kill", image = "object/artifact/icy_kill.png", moddable_tile = "special/%s_icy_kill", - unided_name = "sharpened icicle", - desc = [[As any scryer knows, the link between the murderer and the murdered is the murder weapon, and a scryer can follow that link from the murdered to the weapon to the murderer. + unided_name = _t"sharpened icicle", + desc = _t[[As any scryer knows, the link between the murderer and the murdered is the murder weapon, and a scryer can follow that link from the murdered to the weapon to the murderer. One rather cold blooded killer thought of a way around this. By carving blades out of ice, they could kill as they wished and the link would just melt away. Their killing spree ended when one of the victims got lucky and managed to stab the murderer in the heart with the icey blade. After being united with the cold heart that created it, the final ice blade has never melted.]], level_range = {30, 40}, @@ -8203,14 +8203,14 @@ Their killing spree ended when one of the victims got lucky and managed to stab physcrit = 15, dammod = {str=0.45, dex=0.45}, melee_project = { [DamageType.COLD]=30 }, - special_on_crit = {desc="freezes the target", fct=function(combat, who, target) + special_on_crit = {desc=_t"freezes the target", fct=function(combat, who, target) if not target or target == self then return end if target:canBe("stun") then local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack()) target:setEffect(target.EFF_FROZEN, 4, {src=who, apply_power=check}) end end}, - special_on_kill = {desc="explodes a frozen creature (damage scales with willpower)", fct=function(combat, who, target) + special_on_kill = {desc=_t"explodes a frozen creature (damage scales with willpower)", fct=function(combat, who, target) if not target or target == self then return end if target:hasEffect(target.EFF_FROZEN) then local tg = {type="ball", range=0, radius=1, selffire=false} @@ -8230,9 +8230,9 @@ Their killing spree ended when one of the victims got lucky and managed to stab newEntity{ base = "BASE_MACE", power_source = {psionic=true}, name = "Thunderfall", define_as = "THUNDERFALL", image="object/artifact/thunderfall.png", - unided_name = "large echoing mace", unique = true, + unided_name = _t"large echoing mace", unique = true, moddable_tile = "special/%s_thunderfall", - desc = [[Tremendous power is concentrated in this heavy mace. Just dropping it can knock down nearby walls.]], + desc = _t[[Tremendous power is concentrated in this heavy mace. Just dropping it can knock down nearby walls.]], level_range = {40, 50}, require = { stat = { str=50, wil=30 }, }, rarity = 400, @@ -8254,7 +8254,7 @@ newEntity{ base = "BASE_MACE", }, max_power = 60, power_regen = 1, use_power = { - name = function(self, who) return ("perform a melee strike against a target at up to range %d for an automatic critical hit as lightning damage"):format(self.use_power.range) end, + name = function(self, who) return ("perform a melee strike against a target at up to range %d for an automatic critical hit as lightning damage"):tformat(self.use_power.range) end, power = 60, range = 10, target = function(self, who) return {type="ball", range=self.use_power.range, radius = 2, friendlyfire = false} end, -- treated as an AOE for AI purposes @@ -8275,7 +8275,7 @@ newEntity{ base = "BASE_MACE", if not x or not y then return nil end local _ _, x, y = who:canProject(tg, x, y) local target = game.level.map(x, y, engine.Map.ACTOR) - who:logCombat(target or {name = "something"}, "#Source# hurls %s %s at #target#!", who:his_her(), self:getName({do_color=true, no_add_name=true})) + who:logCombat(target or {name = _t"something"}, "#Source# hurls %s %s at #target#!", who:his_her(), self:getName({do_color=true, no_add_name=true})) if target then local x2, y2 = x + rng.range(-4, 4), y - rng.range(5, 10) game.level.map:particleEmitter(x, y, math.max(math.abs(x2-x), math.abs(y2-y)), "lightning", {tx=x2-x, ty=y2-y}) @@ -8288,7 +8288,7 @@ newEntity{ base = "BASE_MACE", if core.shader.active() then game.level.map:particleEmitter(x, y, 2, "ball_lightning_beam", {radius=2, tx=x, ty=y}, {type="lightning"}) else game.level.map:particleEmitter(x, y, 2, "ball_lightning_beam", {radius=2, tx=x, ty=y}) end end - game.logSeen(who, "%s's weapon returns to %s!", who.name:capitalize(), who:him_her()) + game.logSeen(who, "%s's weapon returns to %s!", who:getName():capitalize(), who:him_her()) return {id=true, used=true} end }, @@ -8298,12 +8298,12 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "KINETIC_FOCUS", power_source = {psionic=true}, unique = true, name = "Kinetic Focus", - unided_name = "humming mindstar", + unided_name = _t"humming mindstar", level_range = {10, 30}, color=colors.YELLOW, image = "object/artifact/kinetic_focus.png", moddable_tile = "special/%s_kinetic_focus", rarity = 300, - desc = [[Kinetic energies are focussed in the core of this mindstar.]], + desc = _t[[Kinetic energies are focussed in the core of this mindstar.]], cost = 50, require = { stat = { wil=18 }, }, material_level = 2, @@ -8333,7 +8333,7 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "KINETIC_FOCUS", resonating = {{"ms_set_resonating", true},}, }, set_desc = { - trifocus = "You feel two unconnected psionic channels on this item.", + trifocus = _t"You feel two unconnected psionic channels on this item.", }, on_set_complete = { multiple = true, @@ -8379,12 +8379,12 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "CHARGED_FOCUS", power_source = {psionic=true}, unique = true, name = "Charged Focus", - unided_name = "sparking mindstar", + unided_name = _t"sparking mindstar", level_range = {20, 40}, color=colors.BLUE, image = "object/artifact/charged_focus.png", moddable_tile = "special/%s_charged_focus", rarity = 300, - desc = [[Electrical energies are focussed in the core of this mindstar.]], + desc = _t[[Electrical energies are focussed in the core of this mindstar.]], cost = 100, require = { stat = { wil=24 }, }, material_level = 3, @@ -8414,7 +8414,7 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "CHARGED_FOCUS", resonating = {{"ms_set_resonating", true,},}, }, set_desc = { - trifocus = "You feel two unconnected psionic channels on this item.", + trifocus = _t"You feel two unconnected psionic channels on this item.", }, on_set_complete = { multiple = true, @@ -8457,12 +8457,12 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "THERMAL_FOCUS", power_source = {psionic=true}, unique = true, name = "Thermal Focus", - unided_name = "blazing mindstar", + unided_name = _t"blazing mindstar", level_range = {30, 50}, color=colors.RED, image = "object/artifact/thermal_focus.png", moddable_tile = "special/%s_thermal_focus", rarity = 300, - desc = [[Thermal energies are focussed in the core of this mindstar.]], + desc = _t[[Thermal energies are focussed in the core of this mindstar.]], cost = 200, require = { stat = { wil=35 }, }, material_level = 4, @@ -8495,7 +8495,7 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "THERMAL_FOCUS", resonating = {{"ms_set_resonating", true,},}, }, set_desc = { - trifocus = "You feel two unconnected psionic channels on this item.", + trifocus = _t"You feel two unconnected psionic channels on this item.", }, on_set_complete = { multiple = true, @@ -8538,9 +8538,9 @@ newEntity{ base = "BASE_LEATHER_BELT", power_source = {psionic=true}, unique = true, name = "Lightning Catcher", image = "object/artifact/lightning_collector.png", - unided_name = "coiled metal belt", - desc = [[A fine mesh of metal threads held together by a sturdy chain. Sparks dance across it.]], - special_desc = function(self) return [[Taking lightning damage or making critical hits builds 2 energy charges, which give you +5% lightning damage and +1 to all stats. + unided_name = _t"coiled metal belt", + desc = _t[[A fine mesh of metal threads held together by a sturdy chain. Sparks dance across it.]], + special_desc = function(self) return _t[[Taking lightning damage or making critical hits builds 2 energy charges, which give you +5% lightning damage and +1 to all stats. The charges decay at a rate of 1 per turn. Max 10 charges.]] end, color = colors.WHITE, level_range = {40, 50}, diff --git a/game/modules/tome/data/general/traps/alarm.lua b/game/modules/tome/data/general/traps/alarm.lua index 2f6521868242ee39d64ab6e60a396fa700aa04bf..9cbd3db549c38ddeb502e8dfc7543799bb3fb20e 100644 --- a/game/modules/tome/data/general/traps/alarm.lua +++ b/game/modules/tome/data/general/traps/alarm.lua @@ -20,7 +20,7 @@ local Talents = require"engine.interface.ActorTalents" newEntity{ define_as = "TRAP_ALARM", - type = "annoy", subtype="alarm", id_by_type=true, unided_name = "trap", + type = "annoy", subtype="alarm", id_by_type=true, unided_name = _t"trap", display = '^', triggered = function() end, } @@ -31,9 +31,9 @@ newEntity{ base = "TRAP_ALARM", disarm_power = resolvers.clscale(30,25,8,0.5), rarity = 3, level_range = {1, 50}, color=colors.UMBER, - message = "@Target@ triggers an alarm!", - unided_name = "pressure plate", - desc = function(self) return ("Makes noise, alerting others.") end, + message = _t"@Target@ triggers an alarm!", + unided_name = _t"pressure plate", + desc = function(self) return (_t"Makes noise, alerting others.") end, pressure_trap = true, triggered = function(self, x, y, who) for i = x - 20, x + 20 do for j = y - 20, y + 20 do if game.level.map:isBound(i, j) then @@ -60,9 +60,9 @@ newEntity{ base = "TRAP_ALARM", rarity = 3, level_range = {10, 50}, color=colors.DARK_UMBER, nb_summon = resolvers.mbonus(3, 2), - message = "An alarm rings!", - unided_name = "ring of faded sigils", - desc = function(self) return ("Summons creatures.") end, + message = _t"An alarm rings!", + unided_name = _t"ring of faded sigils", + desc = function(self) return (_t"Summons creatures.") end, unlock_talent_on_disarm = {tid=Talents.T_AMBUSH_TRAP, chance=8}, triggered = function(self, sx, sy, who) for i = 1, self.nb_summon do diff --git a/game/modules/tome/data/general/traps/annoy.lua b/game/modules/tome/data/general/traps/annoy.lua index 8f510908ae874c34fccd2b2ad555d9c470e30fe7..dcdefce36b40e667e5ed2f483dcf66f37512b060 100644 --- a/game/modules/tome/data/general/traps/annoy.lua +++ b/game/modules/tome/data/general/traps/annoy.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org newEntity{ define_as = "TRAP_ANNOY", - type = "annoy", subtype="annoy", id_by_type=true, unided_name = "trap", + type = "annoy", subtype="annoy", id_by_type=true, unided_name = _t"trap", display = '^', triggered = function() end, } @@ -29,9 +29,9 @@ newEntity{ base = "TRAP_ANNOY", disarm_power = resolvers.clscale(36,25,10,0.5), rarity = 3, level_range = {5, nil}, color=colors.BLUE, - message = "@Target@ seems less active.", - unided_name = "pattern of glyphs", - desc = function(self) return "Disrupts activated talents." end, + message = _t"@Target@ seems less active.", + unided_name = _t"pattern of glyphs", + desc = function(self) return _t"Disrupts activated talents." end, triggered = function(self, x, y, who) local tids = {} for tid, lev in pairs(who.talents) do @@ -54,9 +54,9 @@ newEntity{ base = "TRAP_ANNOY", disarm_power = resolvers.clscale(40,30,15,0.5), rarity = 3, level_range = {30, nil}, color=colors.ORCHID, - message = "@Target@ triggers a burning curse!", - unided_name = "dark pentagram", - desc = function(self) return ("Afflicts the target with a curse: talents inflict %d fire damage and have increased cooldowns."):format(self.dam) end, + message = _t"@Target@ triggers a burning curse!", + unided_name = _t"dark pentagram", + desc = function(self) return (_t"Afflicts the target with a curse: talents inflict %d fire damage and have increased cooldowns."):tformat(self.dam) end, dam = resolvers.clscale(60, 50, 15, 0.75, 25), pressure_trap = true, triggered = function(self, x, y, who) diff --git a/game/modules/tome/data/general/traps/complex.lua b/game/modules/tome/data/general/traps/complex.lua index 2efc1b87ceac6286bffb879d6c5a78fadf33c410..9cd68104b846aa3254e55c3ec4a27d8160ee965e 100644 --- a/game/modules/tome/data/general/traps/complex.lua +++ b/game/modules/tome/data/general/traps/complex.lua @@ -21,7 +21,7 @@ local DamageType = require "engine.DamageType" local Talents = require"engine.interface.ActorTalents" newEntity{ define_as = "TRAP_COMPLEX", - type = "complex", id_by_type=true, unided_name = "trap", + type = "complex", id_by_type=true, unided_name = _t"trap", display = '^', triggered = function(self, x, y, who) return true @@ -35,12 +35,12 @@ newEntity{ base = "TRAP_COMPLEX", disarm_power = resolvers.clscale(35, 25, 8, 0.5), rarity = 3, level_range = {1, nil}, color = colors.UMBER, - message = "@Target@ walks on a trap, and there is a loud noise.", - unided_name = "large pressure plate", + message = _t"@Target@ walks on a trap, and there is a loud noise.", + unided_name = _t"large pressure plate", desc = function(self) local dir = game.level.map:compassDirection(self.spawn_x - self.x, self.spawn_y - self.y) - dir = dir and (" (from %s)"):format(dir) or "" - return ("Releases a large boulder%s that smashes into the target for %d physical damage and knocks it back."):format(dir,self.dam) + dir = dir and (" (from %s)"):tformat(dir) or "" + return ("Releases a large boulder%s that smashes into the target for %d physical damage and knocks it back."):tformat(dir,self.dam) end, pressure_trap = true, on_added = function(self, level, x, y) @@ -71,7 +71,7 @@ newEntity{ base = "TRAP_COMPLEX", unlock_talent_on_disarm = {tid = Talents.T_CATAPULT_TRAP, chance = 10}, triggered = function(self, x, y, who) if not self.spawn_x then return end - local tg = {name="huge boulder", type="bolt", range=core.fov.distance(x, y, self.spawn_x, self.spawn_y), x=self.spawn_x, y=self.spawn_y, speed=2, display={image="trap/trap_big_boulder_01.png"}, blur_move=4} + local tg = {name=_t"huge boulder", type="bolt", range=core.fov.distance(x, y, self.spawn_x, self.spawn_y), x=self.spawn_x, y=self.spawn_y, speed=2, display={image="trap/trap_big_boulder_01.png"}, blur_move=4} self:projectile(tg, x, y, engine.DamageType.PHYSKNOCKBACK, {dam=self.dam, dist=3, x=self.spawn_x, y=self.spawn_y}) return true end, @@ -85,11 +85,11 @@ newEntity{ base = "TRAP_COMPLEX", disarm_power = resolvers.clscale(40, 35, 8, 0.5), rarity = 3, level_range = {1, nil}, color=colors.PURPLE, - message = "@Target@ activates a trap, and its magical energies change.", - unided_name = "magical emitter", + message = _t"@Target@ activates a trap, and its magical energies change.", + unided_name = _t"magical emitter", desc = function(self) local dtype = engine.DamageType[self.dammode] and engine.DamageType:get(self.dammode) - return dtype and ("Projects a rapidly spinning beam of magical energies (range %d), dealing %d damage (%s%s#WHITE#) to those struck."):format(self.rad, self.dam, dtype.text_color or "#WHITE#", dtype.name) + return dtype and ("Projects a rapidly spinning beam of magical energies (range %d), dealing %d damage (%s%s#WHITE#) to those struck."):tformat(self.rad, self.dam, dtype.text_color or "#WHITE#", dtype.name) end, on_added = function(self, level, x, y) self.x, self.y = x, y @@ -157,10 +157,10 @@ newEntity{ base = "TRAP_COMPLEX", disarm_power = resolvers.clscale(35, 25, 8, 0.5), rarity = 3, level_range = {1, nil}, color=colors.GREEN, - message = "@Target@ walks on a poison spore.", - unided_name = "spore colony", + message = _t"@Target@ walks on a poison spore.", + unided_name = _t"spore colony", desc = function(self) - return ("Releases a cloud of poison spores (radius %d), poisoning for #LIGHT_GREEN#%d#LAST# damage over 5 turns."):format(self.rad, self.dam) + return ("Releases a cloud of poison spores (radius %d), poisoning for #LIGHT_GREEN#%d#LAST# damage over 5 turns."):tformat(self.rad, self.dam) end, on_added = function(self, level, x, y) self.x, self.y = x, y @@ -221,10 +221,10 @@ newEntity{ base = "TRAP_COMPLEX", rarity = 3, level_range = {1, nil}, color=colors.RED, pressure_trap = true, - message = "Flames start to appear around @target@.", - unided_name = "hot spot", + message = _t"Flames start to appear around @target@.", + unided_name = _t"hot spot", desc = function(self) - return ("Releases up to 4 delayed fuse fireballs within range %d that each explode for #LIGHT_RED#%d#LAST# fire damage after %d turns."):format(self.rad, self.dam, 5) + return ("Releases up to 4 delayed fuse fireballs within range %d that each explode for #LIGHT_RED#%d#LAST# fire damage after %d turns."):tformat(self.rad, self.dam, 5) end, rad = 3, dam = resolvers.clscale(200, 50, 50, 0.75, 0), @@ -273,8 +273,8 @@ newEntity{ base = "TRAP_COMPLEX", rarity = 3, level_range = {1, nil}, color=colors.BLUE, pressure_trap = true, - message = "Cold flames start to appear around @target@.", - unided_name = "cold spot", + message = _t"Cold flames start to appear around @target@.", + unided_name = _t"cold spot", desc = function(self) local actor = self.actor if actor then @@ -282,7 +282,7 @@ newEntity{ base = "TRAP_COMPLEX", local pts = t.getDarkCount(actor, t) local rad = actor:getTalentRadius(t) local dam = t.getDamage(actor, t) - return ("Cold flames slowly spread from %d spots within radius %d, The flames deal %d cold damage with a chance to freeze."):format(pts, rad, dam) + return ("Cold flames slowly spread from %d spots within radius %d, The flames deal %d cold damage with a chance to freeze."):tformat(pts, rad, dam) end end, mag = resolvers.mbonus(200, 30), diff --git a/game/modules/tome/data/general/traps/elemental.lua b/game/modules/tome/data/general/traps/elemental.lua index 9b5214d623457ae9ae0d92d296f5c2f4e59dbac5..96666d51de6cc4c801e27d142e025b4f3b0d9d83 100644 --- a/game/modules/tome/data/general/traps/elemental.lua +++ b/game/modules/tome/data/general/traps/elemental.lua @@ -19,7 +19,7 @@ local Talents = require"engine.interface.ActorTalents" newEntity{ define_as = "TRAP_ELEMENTAL", - type = "elemental", id_by_type=true, unided_name = "trap", + type = "elemental", id_by_type=true, unided_name = _t"trap", display = '^', pressure_trap = true, triggered = function(self, x, y, who) @@ -28,11 +28,11 @@ newEntity{ define_as = "TRAP_ELEMENTAL", end, desc = function(self) local dtype = engine.DamageType[self.damtype] and engine.DamageType:get(self.damtype) - return dtype and ("Deals %s%d#LAST# %s damage"):format(dtype.text_color or "#WHITE#", self.dam, dtype.name) + return dtype and ("Deals %s%d#LAST# %s damage"):tformat(dtype.text_color or "#WHITE#", self.dam, dtype.name) end, } newEntity{ define_as = "TRAP_ELEMENTAL_BLAST", - type = "elemental", id_by_type=true, unided_name = "trap", + type = "elemental", id_by_type=true, unided_name = _t"trap", display = '^', triggered = function(self, x, y, who) self:project({type="ball",x=x,y=y, radius=self.radius or 2}, x, y, self.damtype, self.dam, self.particles and {type=self.particles}) @@ -40,7 +40,7 @@ newEntity{ define_as = "TRAP_ELEMENTAL_BLAST", end, desc = function(self) local dtype = engine.DamageType[self.damtype] and engine.DamageType:get(self.damtype) - return dtype and ("Deals %s%d#LAST# %s damage (radius %d)"):format(dtype.text_color or "#WHITE#", self.dam, dtype.name, self.radius or 2) + return dtype and ("Deals %s%d#LAST# %s damage (radius %d)"):tformat(dtype.text_color or "#WHITE#", self.dam, dtype.name, self.radius or 2) end, } @@ -54,8 +54,8 @@ newEntity{ base = "TRAP_ELEMENTAL", disarm_power = resolvers.clscale(6,10,4,0.5), rarity = 3, level_range = {1, 30}, color_r=40, color_g=220, color_b=0, - message = "A stream of acid gushes onto @target@!", - unided_name = "corroded spot", + message = _t"A stream of acid gushes onto @target@!", + unided_name = _t"corroded spot", dam = resolvers.clscale(70, 30, 15, 0.75, 0), damtype = DamageType.ACID, } @@ -66,8 +66,8 @@ newEntity{ base = "TRAP_ELEMENTAL", disarm_power = resolvers.clscale(6,10,4,0.5), rarity = 3, level_range = {1, 30}, color_r=220, color_g=0, color_b=0, - message = "A bolt of fire blasts onto @target@!", - unided_name = "burnt spot", + message = _t"A bolt of fire blasts onto @target@!", + unided_name = _t"burnt spot", dam = resolvers.clscale(90, 30, 25, 0.75, 0), damtype = DamageType.FIREBURN, } @@ -78,8 +78,8 @@ newEntity{ base = "TRAP_ELEMENTAL", disarm_power = resolvers.clscale(6,10,4,0.5), rarity = 3, level_range = {1, 30}, color_r=150, color_g=150, color_b=220, - message = "A bolt of ice blasts onto @target@!", - unided_name = "frozen spot", + message = _t"A bolt of ice blasts onto @target@!", + unided_name = _t"frozen spot", dam = resolvers.clscale(70, 30, 15, 0.75, 0), damtype = DamageType.ICE, combatSpellpower = function(self) return self.disarm_power * 2 end, @@ -91,8 +91,8 @@ newEntity{ base = "TRAP_ELEMENTAL", disarm_power = resolvers.clscale(6,10,4,0.5), rarity = 3, level_range = {1, 30}, color_r=0, color_g=0, color_b=220, - message = "A bolt of lightning fires onto @target@!", - unided_name = "crackling spot", + message = _t"A bolt of lightning fires onto @target@!", + unided_name = _t"crackling spot", dam = resolvers.clscale(70, 30, 15, 0.75, 0), damtype = DamageType.LIGHTNING, } @@ -104,7 +104,7 @@ newEntity{ base = "TRAP_ELEMENTAL", disarm_power = resolvers.clscale(6,10,4,0.5), rarity = 3, level_range = {1, 30}, color_r=0, color_g=220, color_b=0, - message = "A stream of poison gushes onto @target@!", + message = _t"A stream of poison gushes onto @target@!", dam = resolvers.clscale(70, 30, 15, 0.75, 0), damtype = DamageType.POISON, combatAttack = function(self) return self.dam end @@ -121,8 +121,8 @@ newEntity{ base = "TRAP_ELEMENTAL_BLAST", disarm_power = resolvers.clscale(35,25,8,0.5), rarity = 3, level_range = {20, nil}, color_r=40, color_g=220, color_b=0, - message = "A stream of acid gushes onto @target@!", - unided_name = "corroded spot", + message = _t"A stream of acid gushes onto @target@!", + unided_name = _t"corroded spot", dam = resolvers.clscale(160, 50, 40, 0.75, 60), damtype = DamageType.ACID, radius = 2, } @@ -133,8 +133,8 @@ newEntity{ base = "TRAP_ELEMENTAL_BLAST", disarm_power = resolvers.clscale(35,25,8,0.5), rarity = 3, level_range = {20, nil}, color_r=220, color_g=0, color_b=0, - message = "A bolt of fire fires onto @target@!", - unided_name = "burnt spot", + message = _t"A bolt of fire fires onto @target@!", + unided_name = _t"burnt spot", dam = resolvers.clscale(200, 50, 50, 0.75, 80), damtype = DamageType.FIREBURN, radius = 2, unlock_talent_on_disarm = {tid = Talents.T_EXPLOSION_TRAP, chance = 25}, @@ -146,8 +146,8 @@ newEntity{ base = "TRAP_ELEMENTAL_BLAST", disarm_power = resolvers.clscale(35,25,8,0.5), rarity = 3, level_range = {20, nil}, color_r=150, color_g=150, color_b=220, - message = "A bolt of ice blasts onto @target@!", - unided_name = "frozen spot", + message = _t"A bolt of ice blasts onto @target@!", + unided_name = _t"frozen spot", dam = resolvers.clscale(160, 50, 40, 0.75, 60), damtype = DamageType.ICE, radius = 2, combatSpellpower = function(self) return self.disarm_power * 2 end, @@ -159,8 +159,8 @@ newEntity{ base = "TRAP_ELEMENTAL_BLAST", disarm_power = resolvers.clscale(35,25,8,0.5), rarity = 3, level_range = {20, nil}, color_r=0, color_g=0, color_b=220, - message = "A bolt of lightning fires onto @target@!", - unided_name = "arcing spot", + message = _t"A bolt of lightning fires onto @target@!", + unided_name = _t"arcing spot", dam = resolvers.clscale(160, 50, 40, 0.75, 60), damtype = DamageType.LIGHTNING, radius = 2, } @@ -171,7 +171,7 @@ newEntity{ base = "TRAP_ELEMENTAL_BLAST", image = "trap/trap_poison_blast_01.png disarm_power = resolvers.clscale(35,25,8,0.5), rarity = 3, level_range = {20, nil}, color_r=0, color_g=220, color_b=0, - message = "A stream of poison gushes onto @target@!", + message = _t"A stream of poison gushes onto @target@!", dam = resolvers.clscale(160, 50, 40, 0.75, 60), damtype = DamageType.POISON, radius = 2, unlock_talent_on_disarm = {tid = Talents.T_POISON_GAS_TRAP, chance = 25}, @@ -184,12 +184,12 @@ newEntity{ base = "TRAP_ELEMENTAL_BLAST", image = "trap/trap_purging.png", disarm_power = resolvers.clscale(35,25,15,0.5), rarity = 8, level_range = {25, nil}, color_r=40, color_g=220, color_b=0, - message = "@Target@ is blasted with anti-magic forces!", + message = _t"@Target@ is blasted with anti-magic forces!", dam = resolvers.clscale(160, 50, 40, 0.75, 60), damtype = DamageType.MANABURN, radius = 2, - unided_name = "dull area", + unided_name = _t"dull area", desc = function(self) - return ("Deals up to %d manaburn damage, draining mana, vim, and positive and negative energies within radius %d."):format(self.dam, self.radius) + return ("Deals up to %d manaburn damage, draining mana, vim, and positive and negative energies within radius %d."):tformat(self.dam, self.radius) end, unlock_talent_on_disarm = {tid = Talents.T_PURGING_TRAP, chance = 15}, } @@ -200,13 +200,13 @@ newEntity{ base = "TRAP_ELEMENTAL_BLAST", disarm_power = resolvers.clscale(40,25,12,0.5), rarity = 8, level_range = {25, nil}, color_r=220, color_g=0, color_b=0, - message = "A powerful blast of fire impacts @target@!", - unided_name = "burned area", + message = _t"A powerful blast of fire impacts @target@!", + unided_name = _t"burned area", dam = resolvers.clscale(200, 50, 50, 0.75, 80), pressure_trap = true, damtype = DamageType.FIRE_STUN, radius = 2, desc = function(self) - return ("All within radius %d are dealt %d fire damage, set on fire for %d more fire damage over 3 turns, and may be stunned."):format(self.radius, self.dam/2, self.dam/2) + return ("All within radius %d are dealt %d fire damage, set on fire for %d more fire damage over 3 turns, and may be stunned."):tformat(self.radius, self.dam/2, self.dam/2) end, unlock_talent_on_disarm = {tid = Talents.T_DRAGONSFIRE_TRAP, chance = 25}, } \ No newline at end of file diff --git a/game/modules/tome/data/general/traps/natural_forest.lua b/game/modules/tome/data/general/traps/natural_forest.lua index facd3943e02691ebdc9d6e63f73584641bb4dcae..d35336493f362ca93b9eb20ca4795d2225b0c756 100644 --- a/game/modules/tome/data/general/traps/natural_forest.lua +++ b/game/modules/tome/data/general/traps/natural_forest.lua @@ -20,7 +20,7 @@ local Talents = require"engine.interface.ActorTalents" newEntity{ define_as = "TRAP_NATURAL_FOREST", - type = "natural", subtype="forest", id_by_type=true, unided_name = "trap", + type = "natural", subtype="forest", id_by_type=true, unided_name = _t"trap", display = '^', triggered = function(self, x, y, who) self:project({type="hit",x=x,y=y}, x, y, self.damtype, self.dam or 10, self.particles and {type=self.particles}) @@ -35,14 +35,14 @@ newEntity{ base = "TRAP_NATURAL_FOREST", rarity = 3, level_range = {1, 50}, color=colors.UMBER, pressure_trap = true, - message = "@Target@ slides on a rock!", - unided_name = "slippery rock", - desc = "Stuns for 4 turns.", + message = _t"@Target@ slides on a rock!", + unided_name = _t"slippery rock", + desc = _t"Stuns for 4 turns.", triggered = function(self, x, y, who) if who:canBe("stun") then who:setEffect(who.EFF_STUNNED, 4, {apply_power=self.disarm_power + 5}) else - game.logSeen(who, "%s resists!", who.name:capitalize()) + game.logSeen(who, "%s resists!", who:getName():capitalize()) end return true end @@ -54,11 +54,11 @@ newEntity{ base = "TRAP_NATURAL_FOREST", disarm_power = resolvers.clscale(12,10,8,0.5), rarity = 3, level_range = {1, 50}, color=colors.GREEN, - message = "A poisonous vine strikes at @Target@!", - unided_name = "venomous vine", + message = _t"A poisonous vine strikes at @Target@!", + unided_name = _t"venomous vine", desc = function(self) local dtype = engine.DamageType[self.damtype] and engine.DamageType:get(self.damtype) - return dtype and ("A motile vine that strikes out for %s%d#LAST# %s damage."):format(dtype.text_color or "#WHITE#", self.dam, dtype.name) + return dtype and ("A motile vine that strikes out for %s%d#LAST# %s damage."):tformat(dtype.text_color or "#WHITE#", self.dam, dtype.name) end, dam = resolvers.clscale(100, 15, 25, 0.75, 0), damtype = DamageType.POISON, diff --git a/game/modules/tome/data/general/traps/teleport.lua b/game/modules/tome/data/general/traps/teleport.lua index 288ff81841576d05bf87afb43b9d939b19a83b6d..0da2b3c2e30fc0dc37bbaea60574884adab4a747 100644 --- a/game/modules/tome/data/general/traps/teleport.lua +++ b/game/modules/tome/data/general/traps/teleport.lua @@ -18,29 +18,29 @@ -- darkgod@te4.org newEntity{ define_as = "TRAP_TELEPORT", - type = "annoy", subtype="teleport", id_by_type=true, unided_name = "trap", + type = "annoy", subtype="teleport", id_by_type=true, unided_name = _t"trap", display = '^', triggered = function() end, } newEntity{ base = "TRAP_TELEPORT", name = "teleport trap", auto_id = true, image = "trap/trap_teleport_01.png", - desc = [[Teleports the victim away. How does anyone get close enough to disarm this trap...?]], + desc=_t[[Teleports the victim away. How does anyone get close enough to disarm this trap...?]], detect_power = resolvers.mbonus(5, 40), disarm_power = resolvers.mbonus(10, 50), rarity = 5, level_range = {5, nil}, color=colors.UMBER, pressure_trap = true, - message = "@Target@ shimmers briefly.", - unided_name = "shimmering floor switch", + message = _t"@Target@ shimmers briefly.", + unided_name = _t"shimmering floor switch", triggered = function(self, x, y, who) if who:canBe("teleport") then game:onTickEnd(function() - game.logSeen(who, "%s is teleported away!", who.name:capitalize()) + game.logSeen(who, "%s is teleported away!", who:getName():capitalize()) who:teleportRandom(x, y, 100) end) return true else - game.logSeen(who, "%s resists being teleported!", who.name:capitalize()) + game.logSeen(who, "%s resists being teleported!", who:getName():capitalize()) end end } diff --git a/game/modules/tome/data/general/traps/temporal.lua b/game/modules/tome/data/general/traps/temporal.lua index 225e8a79d0cbb25a43e72a20dbe10c24ca907cc7..c8ea48648b0181d474f38a8daf642a85b3f79cf3 100644 --- a/game/modules/tome/data/general/traps/temporal.lua +++ b/game/modules/tome/data/general/traps/temporal.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org newEntity{ define_as = "TRAP_TEMPORAL", - type = "temporal", subtype="water", id_by_type=true, unided_name = "trap", + type = "temporal", subtype="water", id_by_type=true, unided_name = _t"trap", display = '^', triggered = function(self, x, y, who) return true, self.auto_disarm @@ -31,9 +31,9 @@ newEntity{ base = "TRAP_TEMPORAL", disarm_power = resolvers.clscale(25,25,8,0.5), rarity = 3, level_range = {1, 50}, color=colors.VIOLET, - message = "@Target@ is caught in a distorted pocket of time!", - unided_name = "faint distortion", - desc = [[Creates a temporal anomaly when triggered.]], + message = _t"@Target@ is caught in a distorted pocket of time!", + unided_name = _t"faint distortion", + desc=_t[[Creates a temporal anomaly when triggered.]], triggered = function(self, x, y, who) who:paradoxDoAnomaly(100, 0, {anomaly_type="no-major"}) return true @@ -46,9 +46,9 @@ newEntity{ base = "TRAP_TEMPORAL", disarm_power = resolvers.clscale(32,25,8,0.5), rarity = 6, level_range = {10, nil}, color=colors.PURPLE, - message = "@Target@ is caught in an extremely distorted pocket of time!", - unided_name = "distortion", - desc = [[Creates a major temporal anomaly when triggered.]], + message = _t"@Target@ is caught in an extremely distorted pocket of time!", + unided_name = _t"distortion", + desc=_t[[Creates a major temporal anomaly when triggered.]], triggered = function(self, x, y, who) who:paradoxDoAnomaly(100, 0, {anomaly_type="major"}) return true diff --git a/game/modules/tome/data/general/traps/water.lua b/game/modules/tome/data/general/traps/water.lua index 80a5963b456de4e6ac5e46c4c2d638dee69428c0..ab6350265ffca82a32cfe10a5580b9249c15df06 100644 --- a/game/modules/tome/data/general/traps/water.lua +++ b/game/modules/tome/data/general/traps/water.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org newEntity{ define_as = "TRAP_WATER", - type = "natural", subtype="water", id_by_type=true, unided_name = "trap", + type = "natural", subtype="water", id_by_type=true, unided_name = _t"trap", display = '^', triggered = function(self, x, y, who) self:project({type="hit",x=x,y=y}, x, y, self.damtype, self.dam, self.particles and {type=self.particles}) @@ -32,11 +32,11 @@ newEntity{ base = "TRAP_WATER", disarm_power = resolvers.clscale(16,10,8,0.5), rarity = 3, level_range = {1, 50}, color=colors.LIGHT_BLUE, - message = "@Target@ triggers a water jet!", - unided_name = "a nozzle", + message = _t"@Target@ triggers a water jet!", + unided_name = _t"a nozzle", desc = function(self) local dtype = engine.DamageType[self.damtype] and engine.DamageType:get(self.damtype) - return dtype and ("Deals %s%d#LAST# %s damage."):format(dtype.text_color or "#WHITE#", self.dam, dtype.name) + return dtype and ("Deals %s%d#LAST# %s damage."):tformat(dtype.text_color or "#WHITE#", self.dam, dtype.name) end, dam = resolvers.clscale(100, 50, 25, 0.75, 0), damtype = DamageType.PHYSICAL, @@ -49,11 +49,11 @@ newEntity{ base = "TRAP_WATER", disarm_power = resolvers.clscale(4,10,3,0.5), rarity = 3, level_range = {1, 50}, color=colors.BLUE, - message = "@Target@ is caught by a water siphon!", - unided_name = "a drain", + message = _t"@Target@ is caught by a water siphon!", + unided_name = _t"a drain", desc = function(self) local dtype = engine.DamageType[self.damtype] and engine.DamageType:get(self.damtype) - return dtype and ("Deals %s%d#LAST# %s damage (radius %d)."):format(dtype.text_color or "#WHITE#", self.dam, dtype.name, self.radius or 2) + return dtype and ("Deals %s%d#LAST# %s damage (radius %d)."):tformat(dtype.text_color or "#WHITE#", self.dam, dtype.name, self.radius or 2) end, redius = 2, dam = resolvers.clscale(60, 50, 15, 0.75, 0), diff --git a/game/modules/tome/data/ingredients.lua b/game/modules/tome/data/ingredients.lua index 5ea363744c121d0a942dc231570408a159658b18..768cedbb16d2b008d4b4b7a85eb56c516b72505c 100644 --- a/game/modules/tome/data/ingredients.lua +++ b/game/modules/tome/data/ingredients.lua @@ -25,322 +25,322 @@ newIngredient{ id = "TROLL_INTESTINE", type = "organic", icon = "object/troll_intestine.png", name = "length of troll intestine", - desc = [[A length of troll intestines. Fortunately, the troll appears to have eaten nothing in some time.]], + desc = _t[[A length of troll intestines. Fortunately, the troll appears to have eaten nothing in some time.]], min = 0, max = INFINITY, - alchemy_text = "Kindly empty it before returning.", + alchemy_text = _t"Kindly empty it before returning.", } newIngredient{ id = "SKELETON_MAGE_SKULL", type = "organic", icon = "object/skeleton_mage_skull.png", name = "skeleton mage skull", - desc = [[The skull of a skeleton mage. The eyes have stopped glowing... for now.]], + desc = _t[[The skull of a skeleton mage. The eyes have stopped glowing... for now.]], min = 0, max = INFINITY, - alchemy_text = "If the eyes are still glowing, please bash it around a bit until they fade. I'll not have another one of those coming alive and wreaking havoc in my lab.", + alchemy_text = _t"If the eyes are still glowing, please bash it around a bit until they fade. I'll not have another one of those coming alive and wreaking havoc in my lab.", } newIngredient{ id = "RITCH_STINGER", type = "organic", icon = "object/ritch_stinger.png", name = "ritch stinger", - desc = [[A ritch stinger, still glistening with venom.]], + desc = _t[[A ritch stinger, still glistening with venom.]], min = 0, max = INFINITY, - alchemy_text = "Keep as much venom in it as possible.", + alchemy_text = _t"Keep as much venom in it as possible.", } newIngredient{ id = "ORC_HEART", type = "organic", icon = "object/orc_heart.png", name = "orc heart", - desc = [[The heart of an orc. Perhaps surprisingly, it isn't green.]], + desc = _t[[The heart of an orc. Perhaps surprisingly, it isn't green.]], min = 0, max = INFINITY, - alchemy_text = "If you can fetch me a still-beating orc heart, that would be even better. But you don't look like a master necromancer to me.", + alchemy_text = _t"If you can fetch me a still-beating orc heart, that would be even better. But you don't look like a master necromancer to me.", } newIngredient{ id = "NAGA_TONGUE", type = "organic", icon = "object/naga_tongue.png", name = "naga tongue", - desc = [[A severed naga tongue. It reeks of brine.]], + desc = _t[[A severed naga tongue. It reeks of brine.]], min = 0, max = INFINITY, - alchemy_text = "Best results occur with tongues never tainted by profanity, so if you happen to know any saintly nagas...", + alchemy_text = _t"Best results occur with tongues never tainted by profanity, so if you happen to know any saintly nagas...", } newIngredient{ id = "GREATER_DEMON_BILE", type = "organic", icon = "object/phial_demon_blood.png", name = "vial of greater demon bile", - desc = [[A vial of greater demon bile. It hurts your sinuses even with the vial's stopper firmly in place.]], + desc = _t[[A vial of greater demon bile. It hurts your sinuses even with the vial's stopper firmly in place.]], min = 0, max = INFINITY, - alchemy_text = "Don't drink it, even if it tells you to.", + alchemy_text = _t"Don't drink it, even if it tells you to.", } newIngredient{ id = "BONE_GOLEM_DUST", type = "organic", icon = "object/pouch_bone_giant_dust.png", name = "pouch of bone giant dust", - desc = [[Once the magics animating the bone giant fled, its remains crumbled to dust. It might be your imagination, but it looks like the dust occasionally stirs on its own.]], + desc = _t[[Once the magics animating the bone giant fled, its remains crumbled to dust. It might be your imagination, but it looks like the dust occasionally stirs on its own.]], min = 0, max = INFINITY, - alchemy_text = "Never, ever to be confused with garlic powder. Trust me.", + alchemy_text = _t"Never, ever to be confused with garlic powder. Trust me.", } newIngredient{ id = "FROST_ANT_STINGER", type = "organic", icon = "object/ice_ant_stinger.png", name = "ice ant stinger", - desc = [[Wickedly sharp and still freezing cold.]], + desc = _t[[Wickedly sharp and still freezing cold.]], min = 0, max = INFINITY, - alchemy_text = "If you've the means to eliminate the little venom problem, these make miraculous instant drink-chilling straws.", + alchemy_text = _t"If you've the means to eliminate the little venom problem, these make miraculous instant drink-chilling straws.", } newIngredient{ id = "MINOTAUR_NOSE", type = "organic", icon = "object/minotaur_nose.png", name = "minotaur nose", - desc = [[The severed front half of a minotaur snout, ring and all.]], + desc = _t[[The severed front half of a minotaur snout, ring and all.]], min = 0, max = INFINITY, - alchemy_text = "You'll need to find one with a ring, preferably an expensive one.", + alchemy_text = _t"You'll need to find one with a ring, preferably an expensive one.", } newIngredient{ id = "ELDER_VAMPIRE_BLOOD", type = "organic", icon = "object/vial_elder_vampire_blood.png", name = "vial of elder vampire blood", - desc = [[Thick, clotted, and foul. The vial is cold to the touch.]], + desc = _t[[Thick, clotted, and foul. The vial is cold to the touch.]], min = 0, max = INFINITY, - alchemy_text = "Once you've gotten it, cross some moving water on your way back.", + alchemy_text = _t"Once you've gotten it, cross some moving water on your way back.", } newIngredient{ id = "MULTIHUED_WYRM_SCALE", type = "organic", icon = "object/dragon_scale_multihued.png", name = "multi-hued wyrm scale", - desc = [[Beautiful and nearly impregnable. Separating it from the dragon must have been hard work.]], + desc = _t[[Beautiful and nearly impregnable. Separating it from the dragon must have been hard work.]], min = 0, max = INFINITY, - alchemy_text = "If you think collecting one of these is hard, try liquefying one.", + alchemy_text = _t"If you think collecting one of these is hard, try liquefying one.", } newIngredient{ id = "SPIDER_SPINNERET", type = "organic", icon = "object/spider_spinnarets.png", name = "giant spider spinneret", - desc = [[An ugly, ripped-out chunk of giant spider. Bits of silk protrude from an orifice.]], + desc = _t[[An ugly, ripped-out chunk of giant spider. Bits of silk protrude from an orifice.]], min = 0, max = INFINITY, - alchemy_text = "The spiders in your barn won't do. You'll know a giant spider when you see one, though they're rare in Maj'Eyal.", + alchemy_text = _t"The spiders in your barn won't do. You'll know a giant spider when you see one, though they're rare in Maj'Eyal.", } newIngredient{ id = "HONEY_TREE_ROOT", type = "organic", icon = "object/honey_tree_root.png", name = "honey tree root", - desc = [[The severed end of one of a honey tree's roots. It wriggles around occasionally, seemingly unwilling to admit that it's dead... and a *plant*.]], + desc = _t[[The severed end of one of a honey tree's roots. It wriggles around occasionally, seemingly unwilling to admit that it's dead... and a *plant*.]], min = 0, max = INFINITY, - alchemy_text = "Keep a firm grip on it. These things will dig themselves right back into the ground if you drop them.", + alchemy_text = _t"Keep a firm grip on it. These things will dig themselves right back into the ground if you drop them.", } newIngredient{ id = "BLOATED_HORROR_HEART", type = "organic", icon = "object/bloated_horror_heart.png", name = "bloated horror heart", - desc = [[Diseased-looking and reeking. It seems to be decaying as you watch.]], + desc = _t[[Diseased-looking and reeking. It seems to be decaying as you watch.]], min = 0, max = INFINITY, - alchemy_text = "Don't worry if it dissolves. Just don't get any on you.", + alchemy_text = _t"Don't worry if it dissolves. Just don't get any on you.", } newIngredient{ id = "ELECTRIC_EEL_TAIL", type = "organic", icon = "object/electric_eel_tail.png", name = "electric eel tail", - desc = [[Slimy, wriggling, and crackling with electricity.]], + desc = _t[[Slimy, wriggling, and crackling with electricity.]], min = 0, max = INFINITY, - alchemy_text = "I know, I know. Where does the eel stop and the tail start? It doesn't much matter. The last ten inches or so should do nicely.", + alchemy_text = _t"I know, I know. Where does the eel stop and the tail start? It doesn't much matter. The last ten inches or so should do nicely.", } newIngredient{ id = "SQUID_INK", type = "organic", icon = "object/vial_squid_ink.png", name = "vial of squid ink", - desc = [[Thick, black and opaque.]], + desc = _t[[Thick, black and opaque.]], min = 0, max = INFINITY, - alchemy_text = "However annoying this will be for you to gather, I promise that the reek it produces in my lab will prove even more annoying.", + alchemy_text = _t"However annoying this will be for you to gather, I promise that the reek it produces in my lab will prove even more annoying.", } newIngredient{ id = "BEAR_PAW", type = "organic", icon = "object/bear_paw.png", name = "bear paw", - desc = [[Large and hairy with flesh-rending claws. It smells slightly of fish.]], + desc = _t[[Large and hairy with flesh-rending claws. It smells slightly of fish.]], min = 0, max = INFINITY, - alchemy_text = "You'd think I could get one of these from a local hunter, but they've had no luck. Don't get eaten.", + alchemy_text = _t"You'd think I could get one of these from a local hunter, but they've had no luck. Don't get eaten.", } newIngredient{ id = "ICE_WYRM_TOOTH", type = "organic", icon = "object/frost_wyrm_tooth.png", name = "ice wyrm tooth", - desc = [[This tooth has been blunted with age, but still looks more than capable of doing its job.]], + desc = _t[[This tooth has been blunted with age, but still looks more than capable of doing its job.]], min = 0, max = INFINITY, - alchemy_text = "Ice Wyrms lose teeth fairly often, so you might get lucky and not have to do battle with one. But dress warm just in case.", + alchemy_text = _t"Ice Wyrms lose teeth fairly often, so you might get lucky and not have to do battle with one. But dress warm just in case.", } newIngredient{ id = "RED_CRYSTAL_SHARD", type = "organic", icon = "object/red_crystal_shard.png", name = "red crystal shard", - desc = [[Tiny flames still dance ethereally inside this transparent crystal, though its heat seems to have faded... you hope.]], + desc = _t[[Tiny flames still dance ethereally inside this transparent crystal, though its heat seems to have faded... you hope.]], min = 0, max = INFINITY, - alchemy_text = "I hear these can be found in a cave near Elvala. I also hear that they can cause you to spontaneously combust, so no need to explain if you come back hideously scarred.", + alchemy_text = _t"I hear these can be found in a cave near Elvala. I also hear that they can cause you to spontaneously combust, so no need to explain if you come back hideously scarred.", } newIngredient{ id = "FIRE_WYRM_SALIVA", type = "organic", icon = "object/vial_fire_wyrm_saliva.png", name = "vial of fire wyrm saliva", - desc = [[Clear and slightly thicker than water. It froths when shaken.]], + desc = _t[[Clear and slightly thicker than water. It froths when shaken.]], min = 0, max = INFINITY, - alchemy_text = "Keep this stuff well away from your campfire unless you want me to have to find a new, more alive adventurer.", + alchemy_text = _t"Keep this stuff well away from your campfire unless you want me to have to find a new, more alive adventurer.", } newIngredient{ id = "GHOUL_FLESH", type = "organic", icon = "object/ghoul_flesh.png", name = "chunk of ghoul flesh", - desc = [[Rotten and reeking. It still twitches occasionally.]], + desc = _t[[Rotten and reeking. It still twitches occasionally.]], min = 0, max = INFINITY, - alchemy_text = "Unfortunately for you, the chunks that regularly fall off ghouls won't do. I need one freshly carved off.", + alchemy_text = _t"Unfortunately for you, the chunks that regularly fall off ghouls won't do. I need one freshly carved off.", } newIngredient{ id = "MUMMY_BONE", type = "organic", icon = "object/mummified_bone.png", name = "mummified bone", - desc = [[Bits of dry flesh still cling to this ancient bone.]], + desc = _t[[Bits of dry flesh still cling to this ancient bone.]], min = 0, max = INFINITY, - alchemy_text = "That is, a bone from a corpse that's undergone mummification. Actually, any bit of the body would do, but the bones are the only parts you're certain to find when you kick a mummy apart. I recommend finding one that doesn't apply curses.", + alchemy_text = _t"That is, a bone from a corpse that's undergone mummification. Actually, any bit of the body would do, but the bones are the only parts you're certain to find when you kick a mummy apart. I recommend finding one that doesn't apply curses.", } newIngredient{ id = "SANDWORM_TOOTH", type = "organic", icon = "object/sandworm_tooth.png", name = "sandworm tooth", - desc = [[Tiny, dark grey, and wickedly sharp. It looks more like rock than bone.]], + desc = _t[[Tiny, dark grey, and wickedly sharp. It looks more like rock than bone.]], min = 0, max = INFINITY, - alchemy_text = "Yes, sandworms have teeth. They're just very small and well back from where you're ever likely to see them and live.", + alchemy_text = _t"Yes, sandworms have teeth. They're just very small and well back from where you're ever likely to see them and live.", } newIngredient{ id = "BLACK_MAMBA_HEAD", type = "organic", icon = "object/black_mamba_head.png", name = "black mamba head", - desc = [[Unlike the rest of the black mamba, the severed head isn't moving.]], + desc = _t[[Unlike the rest of the black mamba, the severed head isn't moving.]], min = 0, max = INFINITY, - alchemy_text = "If you get bitten, I can save your life if you still manage to bring back the head... and if it happens within about a minute from my door. Good luck.", + alchemy_text = _t"If you get bitten, I can save your life if you still manage to bring back the head... and if it happens within about a minute from my door. Good luck.", } newIngredient{ id = "SNOW_GIANT_KIDNEY", type = "organic", icon = "object/snow_giant_kidney.png", name = "snow giant kidney", - desc = [[As unpleasant-looking as any exposed organ.]], + desc = _t[[As unpleasant-looking as any exposed organ.]], min = 0, max = INFINITY, - alchemy_text = "I suggest not killing the snow giant by impaling it through the kidneys. You'll just have to find another.", + alchemy_text = _t"I suggest not killing the snow giant by impaling it through the kidneys. You'll just have to find another.", } newIngredient{ id = "STORM_WYRM_CLAW", type = "organic", icon = "object/storm_wyrm_claw.png", name = "storm wyrm claw", - desc = [[Bluish and wickedly sharp. It makes your arm hair stand on end.]], + desc = _t[[Bluish and wickedly sharp. It makes your arm hair stand on end.]], min = 0, max = INFINITY, - alchemy_text = "I recommend severing one of dewclaws. They're smaller and easier to remove, but they've never been blunted by use, so be careful you don't poke yourself. Oh yes, and don't get eaten.", + alchemy_text = _t"I recommend severing one of dewclaws. They're smaller and easier to remove, but they've never been blunted by use, so be careful you don't poke yourself. Oh yes, and don't get eaten.", } newIngredient{ id = "GREEN_WORM", type = "organic", icon = "object/green_worm.png", name = "green worm", - desc = [[A dead green worm, painstakingly separated from its tangle of companions.]], + desc = _t[[A dead green worm, painstakingly separated from its tangle of companions.]], min = 0, max = INFINITY, - alchemy_text = "Try to get any knots out before returning. Wear gloves.", + alchemy_text = _t"Try to get any knots out before returning. Wear gloves.", } newIngredient{ id = "WIGHT_ECTOPLASM", type = "organic", icon = "object/vial_wight_ectoplasm.png", name = "vial of wight ectoplasm", - desc = [[Cloudy and thick. Only by bottling it can you prevent it from evaporating within minutes.]], + desc = _t[[Cloudy and thick. Only by bottling it can you prevent it from evaporating within minutes.]], min = 0, max = INFINITY, - alchemy_text = "If you ingest any of this, never mind coming back here. Please.", + alchemy_text = _t"If you ingest any of this, never mind coming back here. Please.", } newIngredient{ id = "XORN_FRAGMENT", type = "organic", icon = "object/xorn_fragment.png", name = "xorn fragment", - desc = [[Looks much like any other rock, though this one was recently sentient and trying to murder you.]], + desc = _t[[Looks much like any other rock, though this one was recently sentient and trying to murder you.]], min = 0, max = INFINITY, - alchemy_text = "Avoid fragments that contained the xorn's eyes. You've no idea how unpleasant it is being watched by your ingredients.", + alchemy_text = _t"Avoid fragments that contained the xorn's eyes. You've no idea how unpleasant it is being watched by your ingredients.", } newIngredient{ id = "WARG_CLAW", type = "organic", icon = "object/warg_claw.png", name = "warg claw", - desc = [[Unpleasantly large and sharp for a canine's claw.]], + desc = _t[[Unpleasantly large and sharp for a canine's claw.]], min = 0, max = INFINITY, - alchemy_text = "My usual ingredient gatherers draw the line at hunting wargs. Feel free to mock them on your way back.", + alchemy_text = _t"My usual ingredient gatherers draw the line at hunting wargs. Feel free to mock them on your way back.", } newIngredient{ id = "FAEROS_ASH", type = "organic", icon = "object/pharao_ash.png", name = "pouch of faeros ash", - desc = [[Unremarkable grey ash.]], + desc = _t[[Unremarkable grey ash.]], min = 0, max = INFINITY, - alchemy_text = "They're creatures of pure flame, and likely of extraplanar origin, but the ash of objects consumed by their fire has remarkable properties.", + alchemy_text = _t"They're creatures of pure flame, and likely of extraplanar origin, but the ash of objects consumed by their fire has remarkable properties.", } newIngredient{ id = "WRETCHLING_EYE", type = "organic", icon = "object/wretchling_eyeball.png", name = "wretchling eyeball", - desc = [[Small and bloodshot. Its dead gaze still burns your skin.]], + desc = _t[[Small and bloodshot. Its dead gaze still burns your skin.]], min = 0, max = INFINITY, - alchemy_text = "Evil little things, wretchlings. Feel free to kill as many as you can, though I just need the one intact eyeball.", + alchemy_text = _t"Evil little things, wretchlings. Feel free to kill as many as you can, though I just need the one intact eyeball.", } newIngredient{ id = "FAERLHING_FANG", type = "organic", icon = "object/faerlhing_fang.png", name = "faerlhing fang", - desc = [[It still drips venom and crackles with magical energy.]], + desc = _t[[It still drips venom and crackles with magical energy.]], min = 0, max = INFINITY, - alchemy_text = "I've lost a number of adventurers to this one, but I'm sure you'll be fine.", + alchemy_text = _t"I've lost a number of adventurers to this one, but I'm sure you'll be fine.", } newIngredient{ id = "VAMPIRE_LORD_FANG", type = "organic", icon = "object/vampire_lord_fang.png", name = "vampire lord fang", - desc = [[Brilliantly white, but surrounded by blackest magic.]], + desc = _t[[Brilliantly white, but surrounded by blackest magic.]], min = 0, max = INFINITY, - alchemy_text = "You should definitely consider not pricking yourself with it.", + alchemy_text = _t"You should definitely consider not pricking yourself with it.", } newIngredient{ id = "HUMMERHORN_WING", type = "organic", icon = "object/hummerhorn_wing.png", name = "hummerhorn wing", - desc = [[Translucent and delicate-looking, but surprisingly durable.]], + desc = _t[[Translucent and delicate-looking, but surprisingly durable.]], min = 0, max = INFINITY, - alchemy_text = "If you've not encountered hummerhorns before, they're like wasps, only gigantic and lethal.", + alchemy_text = _t"If you've not encountered hummerhorns before, they're like wasps, only gigantic and lethal.", } newIngredient{ id = "LUMINOUS_HORROR_DUST", type = "organic", icon = "object/pouch_luminous_horror_dust.png", name = "pouch of luminous horror dust", - desc = [[Weightless and glowing; not your usual dust.]], + desc = _t[[Weightless and glowing; not your usual dust.]], min = 0, max = INFINITY, - alchemy_text = "Not to be confused with radiant horrors. If you encounter the latter, then I suppose there are always more adventurers.", + alchemy_text = _t"Not to be confused with radiant horrors. If you encounter the latter, then I suppose there are always more adventurers.", } diff --git a/game/modules/tome/data/keybinds/tome.lua b/game/modules/tome/data/keybinds/tome.lua index a62a441e0acbdc64d69b9f7544562e08cbbc3e26..240bb07edb677799e7ec1efe7d6c08a9b4d709a6 100644 --- a/game/modules/tome/data/keybinds/tome.lua +++ b/game/modules/tome/data/keybinds/tome.lua @@ -21,229 +21,229 @@ defineAction{ default = { "sym:=c:false:false:false:false"}, type = "SHOW_CHARACTER_SHEET", group = "actions", - name = "Show character sheet (player)", + name = _t"Show character sheet (player)", } defineAction{ default = { "sym:=c:false:true:false:false" }, type = "SHOW_CHARACTER_SHEET_CURSOR", group = "actions", - name = "Show character sheet (actor @ cursor)", + name = _t"Show character sheet (actor @ cursor)", } defineAction{ default = { "sym:_TAB:true:false:false:false" }, type = "SWITCH_PARTY", group = "party", - name = "Select controlled character", + name = _t"Select controlled character", } defineAction{ default = { "sym:_F1:false:false:false:false" }, type = "SWITCH_PARTY_1", group = "party", - name = "Switch control to character 1", + name = _t"Switch control to character 1", } defineAction{ default = { "sym:_F2:false:false:false:false" }, type = "SWITCH_PARTY_2", group = "party", - name = "Switch control to character 2", + name = _t"Switch control to character 2", } defineAction{ default = { "sym:_F3:false:false:false:false" }, type = "SWITCH_PARTY_3", group = "party", - name = "Switch control to character 3", + name = _t"Switch control to character 3", } defineAction{ default = { "sym:_F4:false:false:false:false" }, type = "SWITCH_PARTY_4", group = "party", - name = "Switch control to character 4", + name = _t"Switch control to character 4", } defineAction{ default = { "sym:_F5:false:false:false:false" }, type = "SWITCH_PARTY_5", group = "party", - name = "Switch control to character 5", + name = _t"Switch control to character 5", } defineAction{ default = { "sym:_F6:false:false:false:false" }, type = "SWITCH_PARTY_6", group = "party", - name = "Switch control to character 6", + name = _t"Switch control to character 6", } defineAction{ default = { "sym:_F7:false:false:false:false" }, type = "SWITCH_PARTY_7", group = "party", - name = "Switch control to character 7", + name = _t"Switch control to character 7", } defineAction{ default = { "sym:_F8:false:false:false:false" }, type = "SWITCH_PARTY_8", group = "party", - name = "Switch control to character 8", + name = _t"Switch control to character 8", } defineAction{ default = { "sym:_F1:true:false:false:false" }, type = "ORDER_PARTY_1", group = "party", - name = "Give order to character 1", + name = _t"Give order to character 1", } defineAction{ default = { "sym:_F2:true:false:false:false" }, type = "ORDER_PARTY_2", group = "party", - name = "Give order to character 2", + name = _t"Give order to character 2", } defineAction{ default = { "sym:_F3:true:false:false:false" }, type = "ORDER_PARTY_3", group = "party", - name = "Give order to character 3", + name = _t"Give order to character 3", } defineAction{ default = { "sym:_F4:true:false:false:false" }, type = "ORDER_PARTY_4", group = "party", - name = "Give order to character 4", + name = _t"Give order to character 4", } defineAction{ default = { "sym:_F5:true:false:false:false" }, type = "ORDER_PARTY_5", group = "party", - name = "Give order to character 5", + name = _t"Give order to character 5", } defineAction{ default = { "sym:_F6:true:false:false:false" }, type = "ORDER_PARTY_6", group = "party", - name = "Give order to character 6", + name = _t"Give order to character 6", } defineAction{ default = { "sym:_F7:true:false:false:false" }, type = "ORDER_PARTY_7", group = "party", - name = "Give order to character 7", + name = _t"Give order to character 7", } defineAction{ default = { "sym:_F8:true:false:false:false" }, type = "ORDER_PARTY_8", group = "party", - name = "Give order to character 8", + name = _t"Give order to character 8", } defineAction{ default = { "sym:_b:false:true:false:false" }, type = "TOGGLE_BUMP_ATTACK", group = "movement", - name = "Toggle movement mode", + name = _t"Toggle movement mode", } defineAction{ default = { "sym:_LEFT:true:false:false:false", "sym:_KP_4:true:false:false:false" }, type = "ATTACK_OR_MOVE_LEFT", group = "movement", - name = "Attack left", + name = _t"Attack left", } defineAction{ default = { "sym:_RIGHT:true:false:false:false", "sym:_KP_6:true:false:false:false" }, type = "ATTACK_OR_MOVE_RIGHT", group = "movement", - name = "Attack right", + name = _t"Attack right", } defineAction{ default = { "sym:_UP:true:false:false:false", "sym:_KP_8:true:false:false:false" }, type = "ATTACK_OR_MOVE_UP", group = "movement", - name = "Attack up", + name = _t"Attack up", } defineAction{ default = { "sym:_DOWN:true:false:false:false", "sym:_KP_2:true:false:false:false" }, type = "ATTACK_OR_MOVE_DOWN", group = "movement", - name = "Attack down", + name = _t"Attack down", } defineAction{ default = { "sym:_KP_7:true:false:false:false" }, type = "ATTACK_OR_MOVE_LEFT_UP", group = "movement", - name = "Attack diagonally left and up", + name = _t"Attack diagonally left and up", } defineAction{ default = { "sym:_KP_9:true:false:false:false" }, type = "ATTACK_OR_MOVE_RIGHT_UP", group = "movement", - name = "Attack diagonally right and up", + name = _t"Attack diagonally right and up", } defineAction{ default = { "sym:_KP_1:true:false:false:false" }, type = "ATTACK_OR_MOVE_LEFT_DOWN", group = "movement", - name = "Attack diagonally left and down", + name = _t"Attack diagonally left and down", } defineAction{ default = { "sym:_KP_3:true:false:false:false" }, type = "ATTACK_OR_MOVE_RIGHT_DOWN", group = "movement", - name = "Attack diagonally right and down", + name = _t"Attack diagonally right and down", } defineAction{ default = { "sym:_w:false:false:true:false" }, type = "TOGGLE_UI", group = "interface", - name = "Toggle UI display", + name = _t"Toggle UI display", } defineAction{ default = { "sym:_l:false:true:false:false" }, type = "LOCK_TOOLTIP", group = "interface", - name = "Locks tooltip in place", + name = _t"Locks tooltip in place", } defineAction{ default = { "sym:_l:true:true:false:false" }, type = "LOCK_TOOLTIP_COMPARE", group = "interface", - name = "Locks tooltip in place while comparing items", + name = _t"Locks tooltip in place while comparing items", } defineAction{ default = { "sym:_p:true:false:false:false" }, type = "TOGGLE_AUTOTALENT", group = "action", - name = "Toggle automatic talent usage", + name = _t"Toggle automatic talent usage", } defineAction{ default = { }, type = "TOGGLE_AUTOACCEPT_TARGET", group = "action", - name = "Toggle automatic accept target option", + name = _t"Toggle automatic accept target option", } diff --git a/game/modules/tome/data/lore/age-allure.lua b/game/modules/tome/data/lore/age-allure.lua index 5ab4730cfb0666f9a5a0bc08a1b23384e18ee133..a0571b2890b1c94e93fc21bb253844db0c738041 100644 --- a/game/modules/tome/data/lore/age-allure.lua +++ b/game/modules/tome/data/lore/age-allure.lua @@ -24,8 +24,8 @@ newLore{ id = "halfling-research-note-1", category = "age of allure", - name = "research log of halfling mage Hompalan", - lore = [[ + name = _t"research log of halfling mage Hompalan", + lore = _t[[ #{bold}#Hompalan's Log Entry1#{normal}# #{italic}#Age of Allure Year 4537#{normal}# @@ -49,8 +49,8 @@ Third test confirms it - the orb allows transition between portal gates. This is newLore{ id = "halfling-research-note-2", category = "age of allure", - name = "research log of halfling mage Hompalan", - lore = [[ + name = _t"research log of halfling mage Hompalan", + lore = _t[[ #{bold}#Hompalan's Log Entry 4#{normal}# #{italic}#Age of Allure 4544#{normal}# @@ -84,8 +84,8 @@ We're really getting somewhere here... Just a shame humans are such messy creatu newLore{ id = "halfling-research-note-3", category = "age of allure", - name = "research log of halfling mage Hompalan", - lore = [[ + name = _t"research log of halfling mage Hompalan", + lore = _t[[ #{bold}#Hompalan's Log Entry 7#{normal}# #{italic}#Age of Allure 4547#{normal}# @@ -115,9 +115,9 @@ Subject Z currently raving, but I believe this is due to stressful conditions, n newLore{ id = "halfling-research-note-4", category = "age of allure", - name = "research log of halfling mage Hompalan", + name = _t"research log of halfling mage Hompalan", bloodstains = 7, - lore = [[ + lore = _t[[ #{bold}#Hompalan's Log Entry 9#{normal}# #{italic}#Age of Allure 4549#{normal}# @@ -142,8 +142,8 @@ The military are annoying me to no end. I told them to find me more test subject newLore{ id = "conclave-vault-start", category = "age of allure", - name = "order for director Hompalan", - lore = [[#{italic}#To: Research Director Hompalan - #{bold}#TOP PRIORITY#{normal}# + name = _t"order for director Hompalan", + lore = _t[[#{italic}#To: Research Director Hompalan - #{bold}#TOP PRIORITY#{normal}# Thanks to one of our scouting parties catching a Conclave lieutenant's squad off-guard, we have found directions to a noteworthy laboratory hidden underground, in what's newly Nargol territory. Unfortunately, the long-legs scuttled the entrances before we could arrive, and it'd take us years to dig ourselves in, even if we could afford recalling our geomancers from the front lines to work on it - which we can't. @@ -164,7 +164,7 @@ I know you think yourself "above" such "petty politics" like how vital this faci if not spot then return end local g = game.level.map(spot.x, spot.y, engine.Map.TERRAIN):cloneFull() - g.name = "Door to an old Conclave vault" + g.name = _t"Door to an old Conclave vault" g.display='>' g.color_r=100 g.color_g=0 g.color_b=255 g.notice = true g.change_level=1 g.change_zone="conclave-vault" g.glow=true g.add_displays = g.add_displays or {} @@ -174,7 +174,7 @@ I know you think yourself "above" such "petty politics" like how vital this faci g.on_move = function(self, x, y, who) if not who or not who.player then return end self.on_move = nil - require("engine.ui.Dialog"):simpleLongPopup("Conclave Vault", [[Arriving at the location given by the coordinates, you see an enormous crack in the ground; peering down, the gleam of exposed metal catches your eye, and you recognize it as a massive door. It would seem that the Cataclysm's tectonic upheaval has carved a path right to one of its entrances, bypassing the ruined tunnels entirely. You climb down, just outside the door.]], 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Conclave Vault", _t[[Arriving at the location given by the coordinates, you see an enormous crack in the ground; peering down, the gleam of exposed metal catches your eye, and you recognize it as a massive door. It would seem that the Cataclysm's tectonic upheaval has carved a path right to one of its entrances, bypassing the ruined tunnels entirely. You climb down, just outside the door.]], 400) end game.zone:addEntity(game.level, g, "terrain", spot.x, spot.y) print("[WORLDMAP] conclave vault at", spot.x, spot.y) @@ -185,8 +185,8 @@ I know you think yourself "above" such "petty politics" like how vital this faci newLore{ id = "conclave-vault-1", category = "age of allure", - name = "healer Astelrid log 1", - lore = [[Work in a hospital like this is more draining than I thought it'd be. I thought I'd have no trouble with motivation, helping our wounded get back to health again, but seeing so many of them, and knowing there are some I cannot help... it weighs heavily on my mind. It would be difficult to go on, if I did not keep a few things in mind: + name = _t"healer Astelrid log 1", + lore = _t[[Work in a hospital like this is more draining than I thought it'd be. I thought I'd have no trouble with motivation, helping our wounded get back to health again, but seeing so many of them, and knowing there are some I cannot help... it weighs heavily on my mind. It would be difficult to go on, if I did not keep a few things in mind: One, that I am truly doing the best I can to minimize the world's suffering, both directly by healing, and indirectly by ensuring that the world will be united under the wise, thoughtful rule of the Conclave. Ready access to regeneration infusions ensures that even the most dire of wounds can be healed in a matter of days, and the soldiers can return to the battlefield; furthermore, the Overseers have granted us access to their amnesia-inducing spells, allowing us to properly treat those who have been traumatized by the horrors of battle. May the eyes of the Higher watch over this world for thousands of years to come. @@ -202,8 +202,8 @@ After waging a war of trickery and deceit, those halflings think they can bluff newLore{ id = "conclave-vault-2", category = "age of allure", - name = "healer Astelrid log 2", - lore = [[The Nargol were not bluffing, and what they did was worse than anything we could've imagined. The details coming from the survivors - of which there are both far too many and far too few - are conflicting at times, but from what I can tell... + name = _t"healer Astelrid log 2", + lore = _t[[The Nargol were not bluffing, and what they did was worse than anything we could've imagined. The details coming from the survivors - of which there are both far too many and far too few - are conflicting at times, but from what I can tell... As our forces began their final push, the ground began to rumble and give way behind them, and the bones of the war's fallen (halflings and Conclave alike) began to rise up, then draw their once-discarded weapons and rush at our soldiers in a frenzy. There were so many... those who were on higher ground when it happened said it was like a sea of bones and rotting flesh. Outnumbered, our forces broke ranks and tried to retreat, but with the halflings in front of them and the abominations behind them, we took tremendous losses... and our humble medical center is overflowing with the gravely wounded. Many come to us with a terrible sickness passed on by the Nargol's ghouls; there is no cure for this, and I have already had to "mercifully" end the lives of over a dozen men and women to save them from a long, drawn-out death, ending in their transfiguration into one of those horrid creatures... including-- @@ -217,8 +217,8 @@ May the Conclave prevail, and may the Empire's fate serve as a warning to all wh newLore{ id = "conclave-vault-3", category = "age of allure", - name = "healer Astelrid log 3", - lore = [[The Overseers were ecstatic about my ideas! Our staff have been relocated to a more secure location, deep underground with several extensive tunnels leading in from different locations. Although this means we can no longer leave to harvest herbs for our infusions, the increased budget the Overseers have given us does more than enough to compensate. Many wounded are still brought to me through the tunnels, but now our goal is not simply to make them as strong and healthy as they were before, but far stronger and far healthier than they could've dreamed. They are brought to us unconscious, with amnesia spells already applied to ensure they do not resist our experiments; although they are not told they will be test subjects before being brought here, we are sure they would consent to these experiments, if they knew how valuable they were to help the Conclave. As such, although this process violates several oaths we have taken as healers, I ultimately do not see any moral problem with this, and nobody else at this facility has expressed any concerns to me. After all, those who join the Conclave as soldiers have already volunteered to give their lives in service to the Overseers' enlightened rule, and this is surely a much more productive way to do so than dying to a Nargol sling-bullet. + name = _t"healer Astelrid log 3", + lore = _t[[The Overseers were ecstatic about my ideas! Our staff have been relocated to a more secure location, deep underground with several extensive tunnels leading in from different locations. Although this means we can no longer leave to harvest herbs for our infusions, the increased budget the Overseers have given us does more than enough to compensate. Many wounded are still brought to me through the tunnels, but now our goal is not simply to make them as strong and healthy as they were before, but far stronger and far healthier than they could've dreamed. They are brought to us unconscious, with amnesia spells already applied to ensure they do not resist our experiments; although they are not told they will be test subjects before being brought here, we are sure they would consent to these experiments, if they knew how valuable they were to help the Conclave. As such, although this process violates several oaths we have taken as healers, I ultimately do not see any moral problem with this, and nobody else at this facility has expressed any concerns to me. After all, those who join the Conclave as soldiers have already volunteered to give their lives in service to the Overseers' enlightened rule, and this is surely a much more productive way to do so than dying to a Nargol sling-bullet. With access to better components, we can make the same basic improvements to their strength as we could before, but the changes do not stop there! With so many subjects to work with, and the Overseers' encouragement to take risks, we've made them much larger (with associated multiplying effects on their effectiveness in combat), and reinforced their constitution to be capable of bearing more inscriptions without collapsing under the stress. A fellow researcher had the brilliant idea to use this runic affinity to both enhance their connection to magic's weave, and make them biologically and structurally dependent on it; now, our front-line soldiers can conjure devastating fireballs with little training, and should those hairy-footed vermin attempt to raise one of these soldiers from the dead, they will collapse, having lost the magic that kept them intact when they still lived. @@ -233,8 +233,8 @@ For the most part, though, our research work is done. All that's left to do is newLore{ id = "conclave-vault-4", category = "age of allure", - name = "healer Astelrid log 4", - lore = [[Announcement to All Staff: + name = _t"healer Astelrid log 4", + lore = _t[[Announcement to All Staff: I'm sure you've all heard the rumors about what our scryers saw, and why we've been on lockdown the past few days; it is with a heavy heart that I must confirm that they are true. The Nargol have taken the land above our facility, and are combing the area with golems to find the entrances. We've already lost one entrance to the failsafe explosive-rune traps set in place to collapse it, and now they'll be looking to defuse those as well. In short, we have no means of escape, and if allowed the time, they will find the way in, kill us, and steal our precious work for themselves. The Empire has been enough of a problem without Ogres; we CANNOT take the risk of them finding us and tipping the balance in their favor. @@ -257,8 +257,8 @@ Healer Astelrid]], newLore{ id = "conclave-vault-song", category = "age of allure", - name = "investigator Churrack note", - lore = [[FROM: Investigator Churrack + name = _t"investigator Churrack note", + lore = _t[[FROM: Investigator Churrack TO: Whoever holds the position of High Overseer of Loyalty when we're let out Though I'm trapped in here with these healers, I haven't stopped prying to determine if their loyalties lie with us or with themselves. This case has more layers than a damn onion; while Astelrid did disobey a direct order (and several more by revealing the existence of that order), her alternative seems to fit our goals nonetheless. Response from staff has been mixed. While most are reluctantly going along with her plan for lack of other options, some seem to follow her lead enthusiastically, and have been singing this song as they wait in line for their treatment: diff --git a/game/modules/tome/data/lore/age-pyre.lua b/game/modules/tome/data/lore/age-pyre.lua index fa1f3232f86843bc0ff25cd21d2773407a9fa904..3effd2a10399ff553fcad82c92dea4d384fd8fe6 100644 --- a/game/modules/tome/data/lore/age-pyre.lua +++ b/game/modules/tome/data/lore/age-pyre.lua @@ -24,8 +24,8 @@ newLore{ id = "broken-atamathon", category = "age of pyre", - name = "Atamathon, the giant golem", - lore = [[This giant golem was constructed by the Halflings during the Pyre Wars to fight the orcs, but was felled by Garkul the Devourer. + name = _t"Atamathon, the giant golem", + lore = _t[[This giant golem was constructed by the Halflings during the Pyre Wars to fight the orcs, but was felled by Garkul the Devourer. Its body is made of marble, its joints of solid voratun, and its eyes of purest ruby. One of its eyes seems to be missing. At over 40 feet high it towers above you. Someone foolish has tried to reconstruct it, but it seems like it misses an eye to be completed.]] } diff --git a/game/modules/tome/data/lore/angolwen.lua b/game/modules/tome/data/lore/angolwen.lua index 3f5bb64411ca01a5975c289a85ab9991bbd539a1..64133c5898f2c2defbdf8cd2ffab60914f770601 100644 --- a/game/modules/tome/data/lore/angolwen.lua +++ b/game/modules/tome/data/lore/angolwen.lua @@ -23,8 +23,8 @@ newLore{ id = "angolwen-linaniil-lecture", category = "angolwen", - name = "Lecture on Humility by Archmage Linaniil", - lore = [[It were some years now since twain of our brightest students left Angolwen, sullied by our veil of secrecy and our silent duty. It still lies heavy on mine heart to think of what they could accomplish within our private circle. I but hope that one day they whilst return, and they whilst understand the reasons behind our solemn mission. + name = _t"Lecture on Humility by Archmage Linaniil", + lore = _t[[It were some years now since twain of our brightest students left Angolwen, sullied by our veil of secrecy and our silent duty. It still lies heavy on mine heart to think of what they could accomplish within our private circle. I but hope that one day they whilst return, and they whilst understand the reasons behind our solemn mission. But I must think of the future, for too many are the regrets of mine long past, and to hold their burdens overlong is to be crushed. I must think of ye, young acolytes, who start now in the learning of our lores. I must explain to ye our mission, our purpose, our justification, so that ye understand all what we do and why. In secrecy we operate, trying to heal the harms of our past, trying to build a better future. For our penance is great, and never should it be forgotten in all Eyal the terrors of the Spellblaze. @@ -46,8 +46,8 @@ Our mission is to help the world. Our penance is to act in secret. Old wounds re newLore{ id = "angolwen-tarelion-magic", category = "angolwen", - name = "Lecture on the nature of magic by Archmage Tarelion", - lore = [[#{bold}#"What is Magic?" + name = _t"Lecture on the nature of magic by Archmage Tarelion", + lore = _t[[#{bold}#"What is Magic?" #{italic}#A study by Archmage Tazimar Tarelion#{normal}# How uncouth and common a question it must seem, and yet it is the one I am asked most often, even by some of our most learned students. Too often we teach The Art by practice and imitation and concentration on the end effects, without teaching in greater detail of the underlying principles. Just as a musician may merrily play on his harp without knowing how the sound arises from the vibration of the strings, so a mage may make use of magic without realising the true forces at work. In this document I hope to give learning on the nature of magic, and how the underlying effects give rise to all the wondrous fruits we can produce. @@ -69,8 +69,8 @@ Some believe that magic is inherently wrong, that the so-called twisting of the newLore{ id = "spellblade", category = "angolwen", - name = "The spellblade", - lore = [[From the desk of Archmage Varil, + name = _t"The spellblade", + lore = _t[[From the desk of Archmage Varil, Another day dawns on Angolwen. I hesitate to write this, but it almost feels as if peace is once again returning to Eyal. Saying this, I almost expect war and destruction to erupt immediately - fate is anything if not spiteful. Regardless, my sleep grows less disturbed by my memories of the Spellhunt day by day, and I can now devote myself wholly to the betterment of our cloistered community here in the mountains. This is not to say that life has been without conflict at all. An agent of the Ziguranth infiltrated Angolwen under the guise of a travelling alchemist a few days ago; an unhappy first, I'm afraid. Having used choking powder to incapacitate the guards and rob the surrounding mages of their voices, things may have turned ugly if Linaniil hadn't been passing by on one of her walks. Little was left of that man... or the tree he hid behind... or many of the surrounding buildings, to be honest. @@ -81,9 +81,9 @@ In a way, the incident lit a fire under me to pursue my studies and develop my p newLore{ id = "angolwen-fountain", category = "angolwen", - name = "Angolwen Fountain", + name = _t"Angolwen Fountain", always_pop = true, - lore = [[#{italic}#(You see here a large, elaborate fountain. A statue of Linaniil stands in the center, her arms outstretched to welcome all; around the outside of the fountain stand statues of a dwarf manipulating earthen runes, a human with a simple healer's crosier, an elf with a tall, elaborate staff, and a halfling with a scepter in one hand and a fireball hovering over the other. The runes and the fireball are not connected to anything, and float in a fixed position in the air. You see a carving repeating along the border of the fountain, in small print.)#{normal}# + lore = _t[[#{italic}#(You see here a large, elaborate fountain. A statue of Linaniil stands in the center, her arms outstretched to welcome all; around the outside of the fountain stand statues of a dwarf manipulating earthen runes, a human with a simple healer's crosier, an elf with a tall, elaborate staff, and a halfling with a scepter in one hand and a fireball hovering over the other. The runes and the fireball are not connected to anything, and float in a fixed position in the air. You see a carving repeating along the border of the fountain, in small print.)#{normal}# ALL ARE WELCOME WHO LEARN FROM THE MISTAKES OF THE PAST diff --git a/game/modules/tome/data/lore/ardhungol.lua b/game/modules/tome/data/lore/ardhungol.lua index e49a372e35ccb91d240dafb6c972a8af6d7c1e4b..6ad58d2d80774a0d4ff5a56d8bc0c1c7e1888763 100644 --- a/game/modules/tome/data/lore/ardhungol.lua +++ b/game/modules/tome/data/lore/ardhungol.lua @@ -24,8 +24,8 @@ newLore{ id = "ardhungol-1", category = "ardhungol", - name = "Rashim Journal (1)", - lore = [[#{bold}#Journal Entry I#{normal}# + name = _t"Rashim Journal (1)", + lore = _t[[#{bold}#Journal Entry I#{normal}# It's been some time since High Sun Paladin Aeryn sent me out on an assignment. According to recent intelligence, it would seem that a cavern has mysteriously emerged near our outpost, the Gates of Morning. They have bestowed the name "Ardhungol" on the newly discovered cavern. The elder warriors seem anxious in regards to the origin of this new subterranean area; they're likely concerned that the orcs are using Ardhungol as a staging point for further aggression against the Gates of Morning. I'll have to make sure I'm well equipped for this journey; the fate of us all could hang in the balance. @@ -38,8 +38,8 @@ I spoke with the border patrols tonight. There seem to have been several sightin newLore{ id = "ardhungol-2", category = "ardhungol", - name = "Rashim Journal (2)", - lore = [[#{bold}#Journal Entry III#{normal}# + name = _t"Rashim Journal (2)", + lore = _t[[#{bold}#Journal Entry III#{normal}# It was a half days journey from the Gates of Morning to Ardhungol, but I've finally arrived. I've decided to rest beneath the shade of a great oak tree and enjoy one of the sweet rolls my wife Melnela prepared for me. I'm unsure why, but the closer I've come to Ardhungol, the thicker the atmosphere has become, almost as if there is a foreign energy infecting the very air I breathe. I've been to many places in this vast world, but I've never felt an aura quite like this; I will have to uncover the source of this energy before I can bring a full report back to Aeryn. @@ -56,8 +56,8 @@ Impossible; how could spiders have grown to such an immense size? Not only that, newLore{ id = "ardhungol-3", category = "ardhungol", - name = "Rashim Journal (3)", - lore = [[#{bold}#Journal Entry VI#{normal}# + name = _t"Rashim Journal (3)", + lore = _t[[#{bold}#Journal Entry VI#{normal}# It took some time, but my muscles have started to adapt and react to the unique movements of these arachnid. The way they fight, it's almost as if they possess a higher level of thought, elevating them far beyond the base intelligence of lesser arachnid... is it possible that they could be sentient? Do they act individually, or are they perhaps manipulated by a greater arachnid? Let us pray that this species is not connected through a hive mind, for this threat could become even greater than I had imagined. @@ -73,10 +73,10 @@ Incredible, the size of that arachnid is unimaginable; there is no doubt about i newLore{ id = "ardhungol-4", category = "ardhungol", - name = "scrap of paper", - lore = function() return game and game.state and game.state.spydre_mantra and [[#{italic}#A few tattered scraps of paper lie on the ground, ruined from your fight with the creature carrying it. It's almost completely illegible, but you can piece some of it together to read:#{normal}# + name = _t"scrap of paper", + lore = function() return game and game.state and game.state.spydre_mantra and _t[[#{italic}#A few tattered scraps of paper lie on the ground, ruined from your fight with the creature carrying it. It's almost completely illegible, but you can piece some of it together to read:#{normal}# "...pheromone signals effective on much Eyalite wildlife ineffective on species 'sun paladin.' at current planetary core cooling rates, passive study would lead to great loss - next step of emigration program should be cleaning of local 'sun paladin' nest and establishment of..."]] or - [[#{italic}#This pile of tattered paper could theoretically be assembled into something legible, but without more text to draw back on, it'd still be in a language you could never interpret. If only you had more Spydric text to help translate this...#{normal}#]] + _t[[#{italic}#This pile of tattered paper could theoretically be assembled into something legible, but without more text to draw back on, it'd still be in a language you could never interpret. If only you had more Spydric text to help translate this...#{normal}#]] end, } diff --git a/game/modules/tome/data/lore/arena.lua b/game/modules/tome/data/lore/arena.lua index c81c62c432ea828fe60aa6df52b73f3f6346b90e..c5f665338752a9f63daee6419aaae83d3244d455 100644 --- a/game/modules/tome/data/lore/arena.lua +++ b/game/modules/tome/data/lore/arena.lua @@ -1,8 +1,8 @@ newLore{ id = "arena-scoring", category = "arena", - name = "Arena for dummies", - lore = [[#{italic}#You find a note with some highlighted words... + name = _t"Arena for dummies", + lore = _t[[#{italic}#You find a note with some highlighted words... #{bold}#SCORING IN THE ARENA #{normal}#The rules of the arena are simple. diff --git a/game/modules/tome/data/lore/blighted-ruins.lua b/game/modules/tome/data/lore/blighted-ruins.lua index a82b3bb6b1210660ca92339aa01323e90eae023e..cecae04c4d71acb51432107f31095cf819d63be4 100644 --- a/game/modules/tome/data/lore/blighted-ruins.lua +++ b/game/modules/tome/data/lore/blighted-ruins.lua @@ -23,27 +23,27 @@ newLore{ id = "blighted-ruins-note-1", category = "blighted ruins", - name = "note from the Necromancer", - lore = [[Work on my glorious project has been delayed. This displeases me. The fools from the nearby village are starting to suspect my presence, and have begun guarding their graveyards and cemeteries closely. Whatever meagre remains I can steal away are often too rotted or insubstantial to use for my project, so I have no choice but to use them as sub-par minions instead. Perhaps they will sow enough conflict and discord so that new, fresher remains will become available...]], + name = _t"note from the Necromancer", + lore = _t[[Work on my glorious project has been delayed. This displeases me. The fools from the nearby village are starting to suspect my presence, and have begun guarding their graveyards and cemeteries closely. Whatever meagre remains I can steal away are often too rotted or insubstantial to use for my project, so I have no choice but to use them as sub-par minions instead. Perhaps they will sow enough conflict and discord so that new, fresher remains will become available...]], } newLore{ id = "blighted-ruins-note-2", category = "blighted ruins", - name = "note from the Necromancer", - lore = [[The cloak of deception is complete! Truly my finest work, not counting my project of course, it allows my minions to walk amongst the living without arousing their suspicions at all. Already I have taken a stroll to a nearby town alongside a ghoulish thrall, wrapped in the cloak... hah! The fools didn't even bat an eyelid! With this item, acquisition of components for my project shall be all the more simple.]], + name = _t"note from the Necromancer", + lore = _t[[The cloak of deception is complete! Truly my finest work, not counting my project of course, it allows my minions to walk amongst the living without arousing their suspicions at all. Already I have taken a stroll to a nearby town alongside a ghoulish thrall, wrapped in the cloak... hah! The fools didn't even bat an eyelid! With this item, acquisition of components for my project shall be all the more simple.]], } newLore{ id = "blighted-ruins-note-3", category = "blighted ruins", - name = "note from the Necromancer", - lore = function() return [[Fate smiles upon me. What did I come across today but the body of an unfortunate ]]..game:getPlayer(true).descriptor.subclass..[[? Unfortunate indeed, but rather fortunate for me. The body displays next to no decomposition... it shall be perfect! With this new minion and the cloak of deception, the completion of my project is all but assured. I must prepare for the ritual... my dark menagerie shall soon have a new member.]] end, + name = _t"note from the Necromancer", + lore = function() return ([[Fate smiles upon me. What did I come across today but the body of an unfortunate %s? Unfortunate indeed, but rather fortunate for me. The body displays next to no decomposition... it shall be perfect! With this new minion and the cloak of deception, the completion of my project is all but assured. I must prepare for the ritual... my dark menagerie shall soon have a new member.]]):tformat(_t(game:getPlayer(true).descriptor.subclass)) end, } newLore{ id = "blighted-ruins-note-4", category = "blighted ruins", - name = "note from the Necromancer", - lore = [[My masterpiece walks! It is glorious, beautiful. While it remains unfinished, it is finished enough to serve in its purpose of protecting my lair. No would-be hero will be able to defeat it, and once it is complete it will be nigh invulnerable! Now all that remains is to animate my newest minion and bend it to my will... then they'll see. They'll ALL see. What can possibly stop me now, I ask? What?!]], + name = _t"note from the Necromancer", + lore = _t[[My masterpiece walks! It is glorious, beautiful. While it remains unfinished, it is finished enough to serve in its purpose of protecting my lair. No would-be hero will be able to defeat it, and once it is complete it will be nigh invulnerable! Now all that remains is to animate my newest minion and bend it to my will... then they'll see. They'll ALL see. What can possibly stop me now, I ask? What?!]], } diff --git a/game/modules/tome/data/lore/daikara.lua b/game/modules/tome/data/lore/daikara.lua index 4763ec088eef9977e1e2682126067e0df7961062..4b9a0bb4b6124586bfef743c2ce2bc2c9c9a9856 100644 --- a/game/modules/tome/data/lore/daikara.lua +++ b/game/modules/tome/data/lore/daikara.lua @@ -24,40 +24,40 @@ newLore{ id = "daikara-note-1", category = "daikara", - name = "expedition journal entry (daikara)", - lore = [[#{bold}#Relle, Cornac Fighter & Expedition Captain#{normal}# + name = _t"expedition journal entry (daikara)", + lore = _t[[#{bold}#Relle, Cornac Fighter & Expedition Captain#{normal}# Nothing but hatchlings so far. Honestly, if this keeps up we won't have enough dragonhide to cover a dragon, let alone cover our losses. I've really spared no expense this time as well: Gorran is one of the finest rangers I know, and Sodelost... his prices are exorbitant, but then what else would you expect from those money-grubbing dwarven Thronesmen? I must admit I don't know much about Xann. The locals say there's no finer wyrmic in the area, and I admit she is something special in combat. Now, if only she could turn her draconic talents to FINDING some dragons!]], } newLore{ id = "daikara-note-2", category = "daikara", - name = "expedition journal entry (daikara)", - lore = [[#{bold}#Sodelost, Dwarf Rogue#{normal}# + name = _t"expedition journal entry (daikara)", + lore = _t[[#{bold}#Sodelost, Dwarf Rogue#{normal}# Can't believe I agreed to this expedition. I suppose it's because I've known Relle for a while. We've crossed paths many times at Derth's trading post. I even gave her a special rate for my services. Sentimental fool! All it's got me is boots filled with snow and a light coinpurse. I still don't understand why these Kingdom types are so enamoured with drakeskin... makes superior armour they say. Pah! If you can't handle metal armour, what business do you have even wearing armour? Leather has about as much use as a halfling tied to a... noises up ahead, must stop writing.]], } newLore{ id = "daikara-note-3", category = "daikara", - name = "expedition journal entry (daikara)", - lore = [[#{bold}#Gorran, Cornac Archer#{normal}# + name = _t"expedition journal entry (daikara)", + lore = _t[[#{bold}#Gorran, Cornac Archer#{normal}# That snake. That addlepated beardling. That coin-hounding, blackhearted, stump-kneed dwarf! A scout he calls himself! The finest eyes of the Iron Throne, able to read the sign of the tavern in Last Hope from the tavern in Derth! Surely someone with such grandiose praise for his own eyesight would have spotted that cold drake waiting in ambush for us! Damnable thing, I'll be lucky if I can ever use my left arm again. I can't use my bow now ... I'm effectively dead wood to the team. I'm beginning to think that Sodelost has ulterior motives... I wouldn't put it past a dwarf to lead us up this forsaken mountain to die just so he could rifle through our pockets! I keep telling Relle, but she won't listen. The fool...]], } newLore{ id = "daikara-note-4", category = "daikara", - name = "expedition journal entry (daikara)", - lore = [[#{bold}#Relle, Cornac Fighter & Expedition Captain#{normal}# + name = _t"expedition journal entry (daikara)", + lore = _t[[#{bold}#Relle, Cornac Fighter & Expedition Captain#{normal}# Sodelost is dead, and so is Gorran. The former by Gorran's hand, the latter by my hand. Even in these wastes I cannot abide such an act of mutiny. I was aware of Gorran's anger ever since the drake attack, but I never dreamed he would turn on Sodelost like he did. He had taken my longsword as I slept the previous night, strode up to Sodelost, unheeding of I and Xann watching him, ran him through and laughed. Simply laughed. There was nothing for it; I wrenched my sword from his hand and brought it down on his neck. The commotion seems to have stirred up a nearby drake's nest, and now I fear we don't have the strength to repel a concentrated attack. We may have to abandon this expedition.]], } newLore{ id = "daikara-note-5", category = "daikara", - name = "expedition journal entry (daikara)", - lore = [[#{bold}#Xann, Shaloren Wyrmic#{normal}# (This entry was scrawled by an unsteady hand) + name = _t"expedition journal entry (daikara)", + lore = _t[[#{bold}#Xann, Shaloren Wyrmic#{normal}# (This entry was scrawled by an unsteady hand) #{italic}#impudent fools treading upon dragon's ground. slaying my dear kin just for their skin they will pay they will pay. i called the drake, told it to be cunning, avoid the dwarf's gaze. i laughed as it bit into that ranger's arm ahaahaa. they're killing each other now, simple creatures, simple soft skinned creatures. not like dragons, so perfect, symbols of power, perfection... their captain still lives, but not for long. i will bring her to you to feast. rantha i will see you soon#{normal}#]], @@ -66,8 +66,8 @@ rantha i will see you soon#{normal}#]], newLore{ id = "daikara-dragonsfire-trap", category = "daikara", - name = "Dragonsfire Trap", - lore = [[#{bold}#Relle, Cornac Fighter and Expedition Leader#{normal}# + name = _t"Dragonsfire Trap", + lore = _t[[#{bold}#Relle, Cornac Fighter and Expedition Leader#{normal}# It knows we're here. Xann's gone, and I have to assume the worst. Too late to run. One option left, a contraption Sodelost ensured us he'd be able to use to get the kill... shame he didn't leave instructions behind with it, it's unclear how to arm it, and I don't want to add "being charred to a crisp" to my list of troubles today. I might not know a great deal about artifice, but I know how wild animals work, and for all the praise they get, dragons are no better. I don't need to know how to rig this device so it goes off when the beast steps on it - I just need to put it inside something it'll eat whole... #{italic}#Judging from this note's intact state and delicate placement next to a sack covered in assorted animal viscera, the dragon not only avoided setting off the trap, but has kept it as a trophy. Inside the sack is a disarmed trap featuring a few recognizable alchemical flasks, and a means of mixing them in the right proportion when a pressure plate is triggered to produce a blast of dragonsfire. Figuring out how to arm it is almost as easy as figuring out how to make more traps like it.#{normal}#]], @@ -82,8 +82,8 @@ I might not know a great deal about artifice, but I know how wild animals work, newLore{ id = "daikara-freezing-trap", category = "daikara", - name = "Freezing Trap", - lore = [[#{bold}#Relle, Cornac Fighter and Expedition Leader#{normal}# + name = _t"Freezing Trap", + lore = _t[[#{bold}#Relle, Cornac Fighter and Expedition Leader#{normal}# It knows we're here. Xann's gone, and I have to assume the worst. Too late to run. One option left, a contraption Sodelost ensured us he'd be able to use to get the kill... shame he didn't leave instructions behind with it, it's unclear how to arm it, and I don't want to add "being frozen solid" to my list of troubles today. I might not know a great deal about artifice, but I know how wild animals work, and for all the praise they get, dragons are no better. I don't need to know how to rig this device so it goes off when the beast steps on it - I just need to put it inside something it'll eat whole... #{italic}#Judging from this note's intact state and delicate placement next to a sack covered in assorted animal viscera, the dragon not only avoided setting off the trap, but has kept it as a trophy. Inside the sack is a disarmed trap featuring a few recognizable alchemical flasks, and a means of mixing them in the right proportion when a pressure plate is triggered to produce a blast of ice. Figuring out how to arm it is almost as easy as figuring out how to make more traps like it.#{normal}#]], diff --git a/game/modules/tome/data/lore/derth.lua b/game/modules/tome/data/lore/derth.lua index 61a8c0e0ea35507b3e2aac61a2c0b329a41fe588..3d777e7f08d2e48e38eee935b29dee6a0f3b1bd0 100644 --- a/game/modules/tome/data/lore/derth.lua +++ b/game/modules/tome/data/lore/derth.lua @@ -24,8 +24,8 @@ newLore{ id = "derth-beam-trap", category = "derth", - name = "Beam Trap", - lore = [[#{italic}#A villager runs up to you, carrying a hefty looking sack.#{normal}# + name = _t"Beam Trap", + lore = _t[[#{italic}#A villager runs up to you, carrying a hefty looking sack.#{normal}# You've saved us from the storms! We can't ever repay you enough, but, well... Shortly after you stopped them, a witch approached us and offered us some... magical #{italic}#things#{normal}# and said they would protect our town if anything like that happened again. It's not that I don't trust her, not after you and they - mostly you! - saved us, but... I just don't feel comfortable having all this arcane stuff around us all the time. None of us do. If you've got a use for these, you're more than welcome to them. #{italic}#He hands you a sack, containing a few dozen of the same strange magical object; included is a guide to using them and producing more, written for users completely inexperienced with magic. Apparently, they're designed to be mounted on walls and rooftops, and will try to non-lethally incapacitate outside invaders while sending a message of distress to Angolwen. With a few tweaks, you can make them deadly instead (and avoid harassing Angolwen while you're at it).#{normal}#]], diff --git a/game/modules/tome/data/lore/dreadfell.lua b/game/modules/tome/data/lore/dreadfell.lua index 86933a73f7b27b4dd5685176c7df0f5c916743c0..352a4ec676c23c650dc3980a2d41a800020cfb7e 100644 --- a/game/modules/tome/data/lore/dreadfell.lua +++ b/game/modules/tome/data/lore/dreadfell.lua @@ -23,8 +23,8 @@ newLore{ id = "dreadfell-note-1", category = "dreadfell", - name = "note from the Master", - lore = [[MINIONS: Perhaps you feel your Master has been lax or absent? Well, I shall amend that. I have been studying an object of great import. It is of much greater interest than your foolish unlives. But do not think that I will let you get away with things because of this. + name = _t"note from the Master", + lore = _t[[MINIONS: Perhaps you feel your Master has been lax or absent? Well, I shall amend that. I have been studying an object of great import. It is of much greater interest than your foolish unlives. But do not think that I will let you get away with things because of this. Skeletons, you have been getting noticeably behind in your adventurer slaughtering quotas. The next skeleton archer I see drinking coffee and chatting with the wights shall be rent limb from limb and fed to the orcs. Also, as a punishment for your general laxness, 1,000 skeletons shall be remanded down to Kor'Pul as punishment. A further 250 shall be slaughtered. These orders to be carried out by myself tomorrow at 3am.]], } @@ -32,8 +32,8 @@ Skeletons, you have been getting noticeably behind in your adventurer slaughteri newLore{ id = "dreadfell-note-2", category = "dreadfell", - name = "note from the Master", - lore = [[MINIONS: Be aware, I your great Master have found an item. It is of extreme power, but not yet complete, at least for my purposes. + name = _t"note from the Master", + lore = _t[[MINIONS: Be aware, I your great Master have found an item. It is of extreme power, but not yet complete, at least for my purposes. All hail your brilliant Master. Would you like to walk in the sun? Would you like to be free to roam green meadows and crush innocent children? Such are my wishes also. The reward to anyone who brings me any item that will help me bend this sta... item to my will shall be stupendous. @@ -43,8 +43,8 @@ Also, any new minions who have magical research skills are wanted. Recruit them newLore{ id = "dreadfell-note-3", category = "dreadfell", - name = "note from the Master", - lore = [[MINIONS: Perhaps you are minor dens of foulness because you have nothing to aspire to? Perhaps you could be greater if you had a worse example before you? Consider Me! I began my long unlife as a foolish pipsqueak such as yourself. Why, there was a time before I had conquered even a pit let alone a level or a dungeon. Now, behold all that is Mine. + name = _t"note from the Master", + lore = _t[[MINIONS: Perhaps you are minor dens of foulness because you have nothing to aspire to? Perhaps you could be greater if you had a worse example before you? Consider Me! I began my long unlife as a foolish pipsqueak such as yourself. Why, there was a time before I had conquered even a pit let alone a level or a dungeon. Now, behold all that is Mine. You must have aspirations. I am not content with just the rule of Dreadfell. No, soon I shall have more. Much more. My boots shall tread the surface of the earth! I shall explore and destroy the most beautiful mountains. All shall be mine once I can walk in the sun once more. Where will you be? Do you wish to be more than the wight I stepped on yesterday? I shall need great leaders to guide my armies across the land.]], } @@ -52,8 +52,8 @@ You must have aspirations. I am not content with just the rule of Dreadfell. No, newLore{ id = "dreadfell-note-4", category = "dreadfell", - name = "note from the Master", - lore = [[MINIONS: You are foolish sods. Have you heard of the great Kor'Pul? Perhaps not, because you know very little and he died long before you were so stupid as to be born. However, he was great and had the chance to be greater still. He let himself be cooped into a small hellhole and was destroyed when the right hero invaded it and destroyed his plaything. Now he is but a mere shade of his former glory. + name = _t"note from the Master", + lore = _t[[MINIONS: You are foolish sods. Have you heard of the great Kor'Pul? Perhaps not, because you know very little and he died long before you were so stupid as to be born. However, he was great and had the chance to be greater still. He let himself be cooped into a small hellhole and was destroyed when the right hero invaded it and destroyed his plaything. Now he is but a mere shade of his former glory. I shall not make this mistake. Be ready, for soon we shall march out upon the lands. Soon we shall conquer as even he could not. Pity the fool who thinks he can keep me stuck in even the grandest of pits, Dreadfell.]], } @@ -61,8 +61,8 @@ I shall not make this mistake. Be ready, for soon we shall march out upon the la newLore{ id = "dreadfell-note-5", category = "dreadfell", - name = "note from the Master", - lore = [[MINIONS: To my newest vampire: burn, foolish adventurer, burn! I bet you are sorry for that flame spell now, aren't you? Suffer as I revisit it upon you. + name = _t"note from the Master", + lore = _t[[MINIONS: To my newest vampire: burn, foolish adventurer, burn! I bet you are sorry for that flame spell now, aren't you? Suffer as I revisit it upon you. To the rest of you, there will be punishment. An adventurer got down to my bedroom and surprised me. I, Myself, was hurt and almost had to use My special power. All is well now and I am as dangerous as ever, but you shall suffer for letting him get so low. The next minion I see shall be toasted with my marshmallows. Where then were the special pits of doom I organized? Where were the poisons of my wights or the diseases of my ghouls? Indeed, I should slaughter all of you, and I would, but those who were most foully remiss were already slaughtered by the adventurer. The rest of you? Beware My wrath.]], } @@ -70,8 +70,8 @@ To the rest of you, there will be punishment. An adventurer got down to my bedro newLore{ id = "dreadfell-poem-level-2", category = "dreadfell", - name = "A smudged poem chalked on a dark piece of slate", - lore = [[Master of life, Master of death, + name = _t"A smudged poem chalked on a dark piece of slate", + lore = _t[[Master of life, Master of death, All fall to a word From his dreaded breath! @@ -94,8 +94,8 @@ Against undying death all are as naught.]], newLore{ id = "dreadfell-poem-level-5", category = "dreadfell", - name = "A poem written in scribbled, child-like writing", - lore = [[Me like Master, + name = _t"A poem written in scribbled, child-like writing", + lore = _t[[Me like Master, He's a real laster, He is faster than a caster, @@ -109,8 +109,8 @@ Alabaster... raster... pastor? Grr, need more brains...]], newLore{ id = "dreadfell-poem-level-7", category = "dreadfell", - name = "A poem written in an elegant Gothic script", - lore = [[No staff will save thee + name = _t"A poem written in an elegant Gothic script", + lore = _t[[No staff will save thee Against the blindness of pride Death will catch thee up]], } @@ -118,23 +118,23 @@ Death will catch thee up]], newLore{ id = "dreadfell-poem-master", category = "dreadfell", - name = "a note about undead poetry from the Master", - lore = [[As an aside, I notice one of my skeletons has amused himself by writing a poem about me. Whilst my first reaction was to have his bones crunched into dust and what remained of his undead soul sent to the darkest depths of the abyss, I do now realise that there is some merit to this. Every great leader needs tales penned of his brilliant conquest. Therefore I now command you all to write more poetry in my honour, praising my amazing powers, unrivalled leadership, unconquerable strength, etc etc. Any that fail to produce works of sufficient standard shall be annihilated.]], + name = _t"a note about undead poetry from the Master", + lore = _t[[As an aside, I notice one of my skeletons has amused himself by writing a poem about me. Whilst my first reaction was to have his bones crunched into dust and what remained of his undead soul sent to the darkest depths of the abyss, I do now realise that there is some merit to this. Every great leader needs tales penned of his brilliant conquest. Therefore I now command you all to write more poetry in my honour, praising my amazing powers, unrivalled leadership, unconquerable strength, etc etc. Any that fail to produce works of sufficient standard shall be annihilated.]], } newLore{ id = "master-slain", category = "dreadfell", - name = "slain master", always_pop = true, + name = _t"slain master", always_pop = true, image = "the_master_slain.png", - lore = [[A powerful staff is grabbed from the Master's dead hands.]], + lore = _t[[A powerful staff is grabbed from the Master's dead hands.]], } newLore{ id = "dreadfell-borfast-letter", category = "dreadfell", - name = "a letter to Borfast from the Master", - lore = [[Ah, my dear Borfast, welcome to your glorious undeath! Your armour a cage, your hopes despair, your axe enslaved to my will, your soul mine to feast upon. How does it feel? Rather lovely I like to imagine! You were a valiant opponent, and though you were little threat to me I do like to honour you with this special treatment. And you do like honour, don't you? I know you wished to honour your people by defeating me and destroying my tower, but I'm sure you realise now that it was a rather vain endeavour. + name = _t"a letter to Borfast from the Master", + lore = _t[[Ah, my dear Borfast, welcome to your glorious undeath! Your armour a cage, your hopes despair, your axe enslaved to my will, your soul mine to feast upon. How does it feel? Rather lovely I like to imagine! You were a valiant opponent, and though you were little threat to me I do like to honour you with this special treatment. And you do like honour, don't you? I know you wished to honour your people by defeating me and destroying my tower, but I'm sure you realise now that it was a rather vain endeavour. I apologise for what happened to that lovely suit of plate. I know it got a little... worn... during the treatment. But I'm afraid I really did need to find out the locations of your companion, and certain pressures had to be applied. You weren't very talkative, now were you? But I soon made you sing, oh yes. Of course, I could have just used a little divination magic to find out what I wanted, but I do so enjoy a good torture... And my, how joyous your screams were whenever the acid splashed against your beard! Hoh, we did chortle, did we not? But no matter, I've had my best skeletal smiths work on fixing your armour, fit to be worn by my new champion. @@ -148,8 +148,8 @@ Until then, do enjoy the work, try to keep the place clean, and remember - I own newLore{ id = "dreadfell-aletta-letter", category = "dreadfell", - name = "a letter to Aletta from the Master", - lore = [[Ah, sweet Aletta! How rich your blood tasted on my lips! I know it's not quite what you were expecting from the next step in our relationship, but aren't surprises the true joy of any romance? + name = _t"a letter to Aletta from the Master", + lore = _t[[Ah, sweet Aletta! How rich your blood tasted on my lips! I know it's not quite what you were expecting from the next step in our relationship, but aren't surprises the true joy of any romance? I don't blame you for falling for me, you know, even to the point of betraying all your companions just for me. Women have always had a weakness for my brooding personality and sparkling wit. Even in life I was quite the charmer, and death only improves things, I assure you. I really do have the reputation as a heartbreaker, in more ways than one... Your heart shall now sit in a special place, next to the rest of the offal in my pits. @@ -163,8 +163,8 @@ You must feel a little betrayed of course. I promised you power beyond your imag newLore{ id = "dreadfell-filio-letter", category = "dreadfell", - name = "a letter to Filio from the Master", - lore = [[Oh Filio, what a fun game we have had of cat and mouse! Well, perhaps to you it was a life and death struggle, but for me this past three weeks of patiently hunting you through my halls has been the most entertaining of past-times. I have enjoyed extending the game so, letting you escape my clutches when I felt it most prudent, watching as you got ever more desperate. Alas, you have now degraded too much, and it was simply too embarrassing watching you eat your own faeces to survive. I had to put an end to it - I'm sure you understand. + name = _t"a letter to Filio from the Master", + lore = _t[[Oh Filio, what a fun game we have had of cat and mouse! Well, perhaps to you it was a life and death struggle, but for me this past three weeks of patiently hunting you through my halls has been the most entertaining of past-times. I have enjoyed extending the game so, letting you escape my clutches when I felt it most prudent, watching as you got ever more desperate. Alas, you have now degraded too much, and it was simply too embarrassing watching you eat your own faeces to survive. I had to put an end to it - I'm sure you understand. But ah, it's not truly an end, for you get to experience the wonder of undead enslavement! Is it not most exciting? Do your bones not quiver with delight? It is just your bones now, since I have a certain fondness for skeletal servants, but I have been nice enough to pad your heels with leather so you can still sneak about quietly. How you did love to sneak! Now you may spend an eternity doing so, ensuring any future trespassers get quite the surprise wandering through my great keep. diff --git a/game/modules/tome/data/lore/elvala.lua b/game/modules/tome/data/lore/elvala.lua index 4972b7bd5d89dc00b01dfc8b3ca74d74f2bc6419..2abd655fe92a8dcb044eb397a95c73923143508b 100644 --- a/game/modules/tome/data/lore/elvala.lua +++ b/game/modules/tome/data/lore/elvala.lua @@ -24,8 +24,8 @@ newLore{ id = "spellblaze-chronicles-1", category = "spellblaze", - name = "The Spellblaze Chronicles(1): A Fateful Meeting", - lore = [[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# + name = _t"The Spellblaze Chronicles(1): A Fateful Meeting", + lore = _t[[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# #{bold}#Chapter One: A Fateful Meeting#{normal}# @@ -76,8 +76,8 @@ Turthel paused reflectively before nodding his head slowly, and it was clear tha newLore{ id = "spellblaze-chronicles-2", category = "spellblaze", - name = "The Spellblaze Chronicles(2): A Night to Remember", - lore = [[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# + name = _t"The Spellblaze Chronicles(2): A Night to Remember", + lore = _t[[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# #{bold}#Chapter Two: A Night to Remember#{normal}# @@ -130,8 +130,8 @@ She strode forward then, and grabbing me roughly by my hauberk she pulled my lip newLore{ id = "spellblaze-chronicles-3", category = "spellblaze", - name = "The Spellblaze Chronicles(3): The Farportal", - lore = [[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# + name = _t"The Spellblaze Chronicles(3): The Farportal", + lore = _t[[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# #{bold}#Chapter Three: The Farportal#{normal}# @@ -226,8 +226,8 @@ Yet my hand strayed across the hilt of Mooncutter, and my heart still murmured w newLore{ id = "spellblaze-chronicles-4", category = "spellblaze", - name = "The Spellblaze Chronicles(4): Before the Dawn", - lore = [[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# + name = _t"The Spellblaze Chronicles(4): Before the Dawn", + lore = _t[[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# #{bold}#Chapter Four: Before the Dawn#{normal}# @@ -288,8 +288,8 @@ Was it a dream? Some strange foretelling? Or could it have been a true apparit newLore{ id = "spellblaze-chronicles-5", category = "spellblaze", - name = "The Spellblaze Chronicles(5): The Day of the Spellblaze", - lore = [[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# + name = _t"The Spellblaze Chronicles(5): The Day of the Spellblaze", + lore = _t[[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# #{bold}#Chapter Five: The Day of the Spellblaze#{normal}# @@ -334,8 +334,8 @@ But mine was just one voice, one torment, a single note in the great cacophony t newLore{ id = "spellblaze-chronicles-6", category = "spellblaze", - name = "The Spellblaze Chronicles(6): A Changed Eyal", - lore = [[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# + name = _t"The Spellblaze Chronicles(6): A Changed Eyal", + lore = _t[[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# #{bold}#Chapter Six: A Changed Eyal#{normal}# @@ -409,8 +409,8 @@ The Shroud of Elvala was begun, as our whole city was wreathed in cloud and smok newLore{ id = "spellblaze-chronicles-7", category = "spellblaze", - name = "The Spellblaze Chronicles(7): Into Darkness", - lore = [[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# + name = _t"The Spellblaze Chronicles(7): Into Darkness", + lore = _t[[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# #{bold}#Chapter Seven: Into Darkness#{normal}# @@ -451,8 +451,8 @@ I took a deep breath and stepped forwards.]], newLore{ id = "spellblaze-chronicles-8", category = "spellblaze", - name = "The Spellblaze Chronicles(8): Forbidden", - lore = [[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# + name = _t"The Spellblaze Chronicles(8): Forbidden", + lore = _t[[#{italic}#From the memoirs of Aranion Gawaeil, leader of the Grand Council of Elvala#{normal}# #{bold}#Chapter Eight: Forbidden#{normal}# diff --git a/game/modules/tome/data/lore/fearscape.lua b/game/modules/tome/data/lore/fearscape.lua index b63aad5474a776c0ee274c65b67562a84eff3782..3af93c120bc8afd2b9eb5187fb38be30a9bce0b3 100644 --- a/game/modules/tome/data/lore/fearscape.lua +++ b/game/modules/tome/data/lore/fearscape.lua @@ -24,8 +24,8 @@ newLore{ id = "fearscape-entry", category = "fearscape", - name = "a fearsome sight", - lore = [[You stand in a field of fire, the flames dancing back and forth like blaze-spawned corn waving in the wind. It licks your feet, your skin, your face, and writhes around in tiny shapes which tear across your flesh and crawl down your throat. It burns and blazes through your body, and crazed thoughts fill your mind. This is Goedalath they tell you, the Fearscape, and you have no rightful place here. + name = _t"a fearsome sight", + lore = _t[[You stand in a field of fire, the flames dancing back and forth like blaze-spawned corn waving in the wind. It licks your feet, your skin, your face, and writhes around in tiny shapes which tear across your flesh and crawl down your throat. It burns and blazes through your body, and crazed thoughts fill your mind. This is Goedalath they tell you, the Fearscape, and you have no rightful place here. In the distance you see looming, demonic shapes of absolute darkness, towering above the blazing land like wardens of doom. The sky is black, but above your head hangs a round world that you recognise as Eyal. Across the burning plains gather armies of fiendish figures, and glowing eyes turn up with hateful glowers to your home world. Suddenly both you and it and seem small and frail. As the flames fill your body with pain your only thought is of escape.]], } @@ -33,9 +33,9 @@ In the distance you see looming, demonic shapes of absolute darkness, towering a newLore{ id = "kryl-feijan-altar", category = "fearscape", - name = "sacrificial altar", always_pop = true, + name = _t"sacrificial altar", always_pop = true, image = "kryl_feijan_sacrificial_altar.png", - lore = [[You see a female human lying unconscious on a black altar, twisted sigils scored into her naked flesh. + lore = _t[[You see a female human lying unconscious on a black altar, twisted sigils scored into her naked flesh. Around her are several figures in dark robes. As they notice you one calls out 'Intruder! Protect the seed of Kryl-Feijan!']], diff --git a/game/modules/tome/data/lore/fun.lua b/game/modules/tome/data/lore/fun.lua index 43390fb1312e90ef5fbf3a8c39b200782c8add6d..f355e3ab77aba79c7c394f0618253d5ed31a1813 100644 --- a/game/modules/tome/data/lore/fun.lua +++ b/game/modules/tome/data/lore/fun.lua @@ -20,8 +20,8 @@ newLore{ id = "troll-poem", category = "misc", - name = "trollish poem", - lore = [[#{bold}#"Me Likes to Club" + name = _t"trollish poem", + lore = _t[[#{bold}#"Me Likes to Club" #{italic}#Club club club, Grab some grub! @@ -57,8 +57,8 @@ Me likes to club!#{normal}#]], newLore{ id = "necromancer-poem", category = "misc", - name = "necromancer poem", - lore = [[#{bold}#"The Necromancer's Canticle" + name = _t"necromancer poem", + lore = _t[[#{bold}#"The Necromancer's Canticle" #{italic}#Saved from coffin, casket, urn Darkness falls, but life returns! @@ -90,8 +90,8 @@ We rule death, we wield the power newLore{ id = "necromancer-primer-1", category = "misc", - name = "how to be a necromancer, part 1", - lore = [[#{bold}#THE GLORIOUS ART#{normal}# + name = _t"how to be a necromancer, part 1", + lore = _t[[#{bold}#THE GLORIOUS ART#{normal}# Have you cast away the feeble pretensions of your society? Does your soul thirst for the taste of real power? Do you wish to have the strength to deny that most prevalent force, death itself? The glorious art of necromancy shall fulfil your wishes in ways you couldn't possibly imagine. @@ -107,10 +107,10 @@ Still not sure what to do? Then suffer and perish. Necromancy does not abide the newLore{ id = "necromancer-primer-2", category = "misc", - name = "how to be a necromancer, part 2", - lore = [[#{italic}#2. Domination Of The Deceased#{normal}# + name = _t"how to be a necromancer, part 2", + lore = _t[[#{italic}#2. Domination Of The Deceased#{normal}# -A contentious issue arises when it comes time to breathe life into your gathered specimens - do you raise them as lifeless drones, or do you bind the souls of the deceased within their vessels once more? There is much disagreement on this between the various movements of necromancers. The Beinagrind method of necromancy extols the torturous imprisonment of the soul as fundamental; the anguish generated by the captive spirit makes for a much more effective undead thrall, they claim. The recently founded Trenë method however disagrees, claiming that allowing souls freedom not only results in more obedient slaves less prone to rising up and slaughtering their masters, but also causes your work to become marginally more acceptable to the unwashed masses. Sure, they'll still thrash you, drag you through town and burn you at the stake if they get the chance, but they'll feel ambivalent about it, by thunder! +A contentious issue arises when it comes time to breathe life into your gathered specimens - do you raise them as lifeless drones, or do you bind the souls of the deceased within their vessels once more? There is much disagreement on this between the various movements of necromancers. The Beinagrind method of necromancy extols the torturous imprisonment of the soul as fundamental; the anguish generated by the captive spirit makes for a much more effective undead thrall, they claim. The recently founded Tren? method however disagrees, claiming that allowing souls freedom not only results in more obedient slaves less prone to rising up and slaughtering their masters, but also causes your work to become marginally more acceptable to the unwashed masses. Sure, they'll still thrash you, drag you through town and burn you at the stake if they get the chance, but they'll feel ambivalent about it, by thunder! Remember, when utilising a runic circle to bend your new minions to your will, make sure beforehand that every rune in the circle is enchanted properly and in no danger of fizzling out. If the unthinkable happens and one of your thralls is freed from your control, offer them goods or equipment in exchange for your life. Few undead will kill their creators after receiving such an act of generosity.]] } @@ -118,12 +118,12 @@ Remember, when utilising a runic circle to bend your new minions to your will, m newLore{ id = "necromancer-primer-3", category = "misc", - name = "how to be a necromancer, part 3", - lore = [[#{italic}#3. Unwanted Attention#{normal}# + name = _t"how to be a necromancer, part 3", + lore = _t[[#{italic}#3. Unwanted Attention#{normal}# Sadly, it is not only the peasantry and our "virtuous" archmage cousins that disapprove of our work. Though not entirely understood, necromancy is known to create "ripples" of a sort across the many dimensions, ripples that attract extra-planar attention. As a necromancer's power grows, so do said ripples, until eventually said necromancer finds all manner of demonic force and entity beating down their door, both mentally and physically. -Once again, opinions differ on this demonic interference. Necromancy is such a beautiful, divergent art, is it not? The Trené method sees the necromancer's corruption by outside forces as a negative thing, and practitioners of said method often take measures to divert supernatural attention from themselves, creating talismans to act as spiritual "conductors" or living close to the communities that despise them, the life essences of the masses masking the necromancer's dark emanations. On the other hand, the Beinagrind method welcomes the cursed whisperings that come from the demonic realms, believing it to be the completion of their psyches. Only once their spirits have been "corrupted" (a term Beinagrind practitioners scoff at) do people realize their true ambitions, they claim. Why these "true ambitions" always seem to be the utter and complete destruction of all life in this world and the summoning of unthinkable atrocities from the outer dimensions is unexplored. +Once again, opinions differ on this demonic interference. Necromancy is such a beautiful, divergent art, is it not? The Tren? method sees the necromancer's corruption by outside forces as a negative thing, and practitioners of said method often take measures to divert supernatural attention from themselves, creating talismans to act as spiritual "conductors" or living close to the communities that despise them, the life essences of the masses masking the necromancer's dark emanations. On the other hand, the Beinagrind method welcomes the cursed whisperings that come from the demonic realms, believing it to be the completion of their psyches. Only once their spirits have been "corrupted" (a term Beinagrind practitioners scoff at) do people realize their true ambitions, they claim. Why these "true ambitions" always seem to be the utter and complete destruction of all life in this world and the summoning of unthinkable atrocities from the outer dimensions is unexplored. You may have noticed that no instruction has been given on how to deal with the attention of common folk. That is because a true necromancer requires none. They are vermin, fit only to be crushed.]] } @@ -131,8 +131,8 @@ You may have noticed that no instruction has been given on how to deal with the newLore{ id = "necromancer-primer-4", category = "misc", - name = "how to be a necromancer, part 4", - lore = [[#{italic}#4. Necromancers Of Maj'Eyal#{normal}# + name = _t"how to be a necromancer, part 4", + lore = _t[[#{italic}#4. Necromancers Of Maj'Eyal#{normal}# The greatest enemy of the necromancer is other necromancers. Well, apart from the Ziguranth, the Allied Kingdoms, the Shaloren, the Thaloren, the Iron Throne, common townsfolk, undead hunters, adventurers, rogue undead and Linaniil. But apart from them, the greatest enemy of the necromancer is other necromancers. Below is listed the location of many notable necromancers, areas possessing above-average undead activity, and other regions considered unfitting for our designs. Budding practitioners of our art are encouraged to perform their work away from these areas, lest they be recognized as threats or nuisances and are subsequently eradicated. @@ -142,7 +142,7 @@ The greatest enemy of the necromancer is other necromancers. Well, apart from th #{italic}#Dreadfell#{normal}#: Undead have been massing at this abandoned tower in unprecedented numbers. Obviously, a powerful figure has recently made it his home. Regardless, no clue has been given to the identity of this tower's supposed master. -#{italic}#Derth#{normal}#: While there is no formal necromancer presence in this sleepy countryside village, no practitioner of our art has been able to work within its vicinity. Rumours on why this is so are wild and varied, ranging from stories of almost all of its inhabitants being undead minions wearing cloaks of deception, to it being the secret base of the founder of the Trené method of necromancy. Whatever reason there is, beware. +#{italic}#Derth#{normal}#: While there is no formal necromancer presence in this sleepy countryside village, no practitioner of our art has been able to work within its vicinity. Rumours on why this is so are wild and varied, ranging from stories of almost all of its inhabitants being undead minions wearing cloaks of deception, to it being the secret base of the founder of the Tren? method of necromancy. Whatever reason there is, beware. #{italic}#Zigur#{normal}#: The enemy of our enemy is not our friend in this case. What passes for "normal" magic is enough to send the cult residing here into a frothing, psychotic frenzy - the presence of a necromancer would be enough to instigate a second Age of Pyre! @@ -152,8 +152,8 @@ No further aid awaits you, for we do not tolerate the dependent. All that remain newLore{ id = "halfling-feet", category = "misc", - name = "of halfling feet", - lore = [[Some men have said that the feet of halflings can nay be harmed, not by fire, blade nor magic. And they do say that this is a truly astounding thing. And some men consider the foot of a halfling to be an item of great luck and protection, and many have one hung above their door or mantle. Though these days 'tis frowned upon to go hunt for one, so 'tis considered a prized heirloom to be passed from father to son. + name = _t"of halfling feet", + lore = _t[[Some men have said that the feet of halflings can nay be harmed, not by fire, blade nor magic. And they do say that this is a truly astounding thing. And some men consider the foot of a halfling to be an item of great luck and protection, and many have one hung above their door or mantle. Though these days 'tis frowned upon to go hunt for one, so 'tis considered a prized heirloom to be passed from father to son. But women do look upon men and declare them fools. "For how," say they, "Can the foot of a halfling be a lucky thing, when with their large uncomely feet they are not able to wear shoes and footwear of elegant crafts and beauteous materials? And especially 'tis a great misfortune unto them, as with their short stature they could really do with a decent pair of heels..." @@ -163,8 +163,8 @@ And lo, 'tis little mystery why halflings do look upon humans and say "The Big F newLore{ id = "rogue-poem", category = "misc", - name = "Rogues do it from behind", - lore = [[An archer from the northern lands + name = _t"Rogues do it from behind", + lore = _t[[An archer from the northern lands Claimed of his great renown With peerless skill and countless trials His name known town to town @@ -213,8 +213,8 @@ But by the names they kill]] newLore{ id = "dust-to-dust", category = "misc", - name = "Dust to Dust", - lore = [[#{italic}#An undead hunter's guide, by Aslabor Borys#{normal}# + name = _t"Dust to Dust", + lore = _t[[#{italic}#An undead hunter's guide, by Aslabor Borys#{normal}# So, apparently I'm a legend now. Hah, knock a vampire's head off with a greatmaul and suddenly you're up there with Toknor and Mirvenia apparently. More and more often these days I get novice adventurers coming up to me, asking me for advice when it comes to battling the undead. My first instinct was to tell them to get back home and become bakers or gardeners or something. If they need crib notes for combat they obviously aren't cut out for it. diff --git a/game/modules/tome/data/lore/high-peak.lua b/game/modules/tome/data/lore/high-peak.lua index 60c0f90f8c905ca17f63e4f8ce6971063102cd50..8e99103ca9411e129ed9742d114d0ffcd57dbf4a 100644 --- a/game/modules/tome/data/lore/high-peak.lua +++ b/game/modules/tome/data/lore/high-peak.lua @@ -20,16 +20,16 @@ newLore{ id = "closing-farportal", category = "high peak", - name = "closing the void farportal", always_pop = true, + name = _t"closing the void farportal", always_pop = true, image = "closing_farportal.png", - lore = [[The void farportal is closed, preventing untold horrors from assaulting Eyal.]], + lore = _t[[The void farportal is closed, preventing untold horrors from assaulting Eyal.]], } newLore{ id = "argoniel-1", category = "high peak", - name = "a blood-soaked resonating diamond", - lore = [[#{italic}#On touching the still-wet diamond, you find yourself experiencing memories that are not your own, memories that slowly seep into your mind with increasing detail. You cannot tell if the initial haze covering them is a side-effect of the absorption process, or if it's from being dazed and waking from unconsciousness in these memories...#{normal}# + name = _t"a blood-soaked resonating diamond", + lore = _t[[#{italic}#On touching the still-wet diamond, you find yourself experiencing memories that are not your own, memories that slowly seep into your mind with increasing detail. You cannot tell if the initial haze covering them is a side-effect of the absorption process, or if it's from being dazed and waking from unconsciousness in these memories...#{normal}# #FIREBRICK#Pain#LAST#. Everywhere, but where is worst... @@ -49,8 +49,8 @@ I have my theories, unsettling as they are, as to what's coming over me - what I newLore{ id = "elandar-1", category = "high peak", - name = "Elandar's journal (1)", - lore = [[I am increasingly certain that what I gave my love was not the Blood of Life. + name = _t"Elandar's journal (1)", + lore = _t[[I am increasingly certain that what I gave my love was not the Blood of Life. Her demeanor has... changed, but not in the way one would expect. If I had given her the essence of some god the Sher'Tul wounded and exsanguinated for a trophy, or a blight-ridden demon, or something else that would affect her mental state, I would expect her to start acting oddly - with more cruelty, more arrogance, less #{italic}#humanity.#{normal}# Instead... she acts like she knows the world is about to end and can't tell anyone. She mutters about needing to use the contents of that ruin, one that we still can't even tell Angolwen #{italic}#exists#{normal}#, to bring about a new order of magocracy like the one Tannen wants "before it's too late." Something is gnawing at her, and she dreads that I may find out what, but otherwise... she's almost #{italic}#too#{normal}# rational. @@ -60,8 +60,8 @@ She is terrified of losing me, losing this world, losing #{italic}#herself#{norm newLore{ id = "argoniel-2", category = "high peak", - name = "Argoniel's blood-runed athame", - lore = [[#{italic}#On touching the blood-dripping knife, memories flood your mind - this time, with incredible intensity. You drop the knife immediately, thankful you only touched the plain handle, and not the rune-lit blade or the red pool under it. Moments later, your mind starts parsing and interpreting what it just absorbed:#{normal}# + name = _t"Argoniel's blood-runed athame", + lore = _t[[#{italic}#On touching the blood-dripping knife, memories flood your mind - this time, with incredible intensity. You drop the knife immediately, thankful you only touched the plain handle, and not the rune-lit blade or the red pool under it. Moments later, your mind starts parsing and interpreting what it just absorbed:#{normal}# pain. pain loneliness and cold, so much cold and it keeps growing. in my dreams i can't move a muscle thanks to this #{italic}##FIREBRICK#[untranslatably foul profanity]#LAST##{normal}# cage. he never had his chance. could've made the world in his image. could've made a peaceful world, one of meadows and soft rolling hills, if the other gods hadn't fought with him over it. might've made humans - in any case he watched over us, protected us from those #{italic}##FIREBRICK#[untranslatably ancient profanity]#LAST##{normal}# squid until they drove him into the void @@ -81,8 +81,8 @@ it will be newLore{ id = "elandar-2", category = "high peak", - name = "Elandar's journal (2)", - lore = [[I awoke early this morning to see the love of my life altering the unique farportal we've been building together. Our plans are all on track so far, the Staff of Absorption has been integrated into the portal so it'll drain Gerlyk the moment it summons him, the orcs are too busy suspecting each other to bother investigating us... and then I discover that she's sabotaged it. This portal will #{italic}#em#{normal}#power Gerlyk when it summons him - and he surely must be insane from the loneliness of tumbling in the void of space all this time. In any case, even a sane god would be devastating to life as we know it. + name = _t"Elandar's journal (2)", + lore = _t[[I awoke early this morning to see the love of my life altering the unique farportal we've been building together. Our plans are all on track so far, the Staff of Absorption has been integrated into the portal so it'll drain Gerlyk the moment it summons him, the orcs are too busy suspecting each other to bother investigating us... and then I discover that she's sabotaged it. This portal will #{italic}#em#{normal}#power Gerlyk when it summons him - and he surely must be insane from the loneliness of tumbling in the void of space all this time. In any case, even a sane god would be devastating to life as we know it. ...I can't bring myself to stop her. diff --git a/game/modules/tome/data/lore/infinite-dungeon.lua b/game/modules/tome/data/lore/infinite-dungeon.lua index dd892b72ba948113403c14006d6d004b6e90fa86..d8372415091cd67da63d6243bf3c1adb8cab751d 100644 --- a/game/modules/tome/data/lore/infinite-dungeon.lua +++ b/game/modules/tome/data/lore/infinite-dungeon.lua @@ -24,16 +24,16 @@ newLore{ id = "infinite-dungeon-1", category = "ruined dungeon", - name = "clue (ruined dungeon)", always_pop = true, - lore = [[There is an inscription here: + name = _t"clue (ruined dungeon)", always_pop = true, + lore = _t[[There is an inscription here: #{italic}#The river flows in its bed of stone...#{normal}#]], } newLore{ id = "infinite-dungeon-2", category = "ruined dungeon", - name = "clue (ruined dungeon)", always_pop = true, - lore = [[There is an inscription here: + name = _t"clue (ruined dungeon)", always_pop = true, + lore = _t[[There is an inscription here: #{italic}#...The feather flies gently in the wind. The tree's roots run deep...#{normal}#]], } @@ -41,16 +41,16 @@ The tree's roots run deep...#{normal}#]], newLore{ id = "infinite-dungeon-3", category = "ruined dungeon", - name = "clue (ruined dungeon)", always_pop = true, - lore = [[There is an inscription here: + name = _t"clue (ruined dungeon)", always_pop = true, + lore = _t[[There is an inscription here: #{italic}#...The eldritch force burns all that lives.#{normal}#]], } newLore{ id = "alt1-infinite-dungeon-1", category = "ruined dungeon", - name = "clue (ruined dungeon)", always_pop = true, - lore = [[There is an inscription here: + name = _t"clue (ruined dungeon)", always_pop = true, + lore = _t[[There is an inscription here: #{italic}#Darkness beyond twilight. Crimson from the blood that flows...#{normal}#]], } @@ -58,8 +58,8 @@ Crimson from the blood that flows...#{normal}#]], newLore{ id = "alt1-infinite-dungeon-2", category = "ruined dungeon", - name = "clue (ruined dungeon)", always_pop = true, - lore = [[There is an inscription here: + name = _t"clue (ruined dungeon)", always_pop = true, + lore = _t[[There is an inscription here: #{italic}#...Buried in the flow of time. Colder than the coldest ice...#{normal}#]], } @@ -67,8 +67,8 @@ Colder than the coldest ice...#{normal}#]], newLore{ id = "alt1-infinite-dungeon-3", category = "ruined dungeon", - name = "clue (ruined dungeon)", always_pop = true, - lore = [[There is an inscription here: + name = _t"clue (ruined dungeon)", always_pop = true, + lore = _t[[There is an inscription here: #{italic}#...Unleash dark thoughts. Upon this blighted land!#{normal}#]], } @@ -77,8 +77,8 @@ Upon this blighted land!#{normal}#]], newLore{ id = "infinite-dungeon-4", category = "ruined dungeon", - name = "infinite dungeon (ruined dungeon)", always_pop = true, - lore = [[There is an inscription here: + name = _t"infinite dungeon (ruined dungeon)", always_pop = true, + lore = _t[[There is an inscription here: The deceptive god Ralkur fled before the wrath of the godslayer Branzir and his dark blade Madrath. But though he fled to the depths of the dungeon he came to an end. Seeing himself cornered he used his power to delve deeper into the ground, laying traps and summoning enemies to confound his enemy. But Branzir would not be lost. He pursued his prey ever on, hunting him ever deeper. And Ralkur fled further, and faster, delving to fathoms beyond knowledge, with the godslayer always behind him, hunting relentlessly. And so the chase continues. Over centuries beyond count Branzir has never stopped to rest or sleep as he pursues his prey through the ravages of infinity. And though death would be a welcome reprieve he thinks only of the hunt and of vanquishing the cowardly god. Ralkur continues to run, and he does not take a breath that it is not a gasp, and he does not take a step that it is not in flight, and every beat of his traitorous heart is a pounding of terror as he flees deeper and deeper till the ends of time. @@ -94,8 +94,8 @@ You should not enter it.]], newLore{ id = "infinite-dungeon-history-1", category = "infinite dungeon", - name = "The Hunter and the Hunted chapter 1", - lore = [[Branzir was the mightiest of the Sher'Tul hunters, and his fame was known at every Farportal. He could run for days without rest, cross terrain no others would dare to pass, and had senses more keen than all the wildest animals of Eyal. It was for this reason that Caldizar came to him at his forest keep and beseeched him to join in the Godhunt. At first Branzir refused, for he said he was not one to meddle in such mighty affairs, and he wanted but peace to hunt and fend for his family. But Caldizar convinced him that this life of peace was not possible whilst the schemes and machinations of the gods continued. And so reluctantly Branzir accepted, and took in his hands the great sword Madrath, and upon his shoulders was laid the title "Godslayer". + name = _t"The Hunter and the Hunted chapter 1", + lore = _t[[Branzir was the mightiest of the Sher'Tul hunters, and his fame was known at every Farportal. He could run for days without rest, cross terrain no others would dare to pass, and had senses more keen than all the wildest animals of Eyal. It was for this reason that Caldizar came to him at his forest keep and beseeched him to join in the Godhunt. At first Branzir refused, for he said he was not one to meddle in such mighty affairs, and he wanted but peace to hunt and fend for his family. But Caldizar convinced him that this life of peace was not possible whilst the schemes and machinations of the gods continued. And so reluctantly Branzir accepted, and took in his hands the great sword Madrath, and upon his shoulders was laid the title "Godslayer". In the great Godhunt that followed Branzir became the most fervent of the Godslayers, and would not sleep nor rest whilst a hunt was on. He it was that chased the troll-spawner Ugg'matho through the snow-capped mountains of Pertolias and broke his body on the highest peak. He it was that tracked the blight-weaver Xadoch through the howling vales of Anvion and trapped him and throttled him and cut him into seven pieces to be cast into the Glonglum lake. And he it was that was tasked with finding and killing Ralkur the Deceptor, god of charms and illusions, who had taken hiding amongst the lesser races.]], } @@ -103,8 +103,8 @@ In the great Godhunt that followed Branzir became the most fervent of the Godsla newLore{ id = "infinite-dungeon-history-2", category = "infinite dungeon", - name = "The Hunter and the Hunted chapter 2", - lore = [[Thus began the greatest hunt there ever was. Branzir used forceful coercion and the spilling of blood to uncover the secret of his enemy's hiding place. He tracked Ralkur down to the primitive settlement where he had taken the form of one of the lesser races. Branzir rooted him out, and came upon him with Madrath in hand. But Ralkur seeing the wrath of the hunter and the terrible sword became frightful, and he took on the form of an antelope and fled across the Harloe Plains. But Branzir ran after and ran swifter and nigh caught him before they reached the Woods of Darmin. There Ralkur assumed the form of a monkey and took to the trees. But Branzir tracked him and followed close, overcoming the traps his foe left behind. Then the forest fell away and they came to the Azure Sea, and Ralkur took the form of a gull and flew over the waters cawing with prideful glee. But Branzir was unfazed and leapt into the water, swimming after the cowardly god with all his strength. Twenty days and nights he followed through the ocean, feeding off fish he could catch near the surface, whilst Ralkur beat his wings on the winds above. Not once did Branzir lose sight of his target, and with each passing day Ralkur became more and more filled with fright. + name = _t"The Hunter and the Hunted chapter 2", + lore = _t[[Thus began the greatest hunt there ever was. Branzir used forceful coercion and the spilling of blood to uncover the secret of his enemy's hiding place. He tracked Ralkur down to the primitive settlement where he had taken the form of one of the lesser races. Branzir rooted him out, and came upon him with Madrath in hand. But Ralkur seeing the wrath of the hunter and the terrible sword became frightful, and he took on the form of an antelope and fled across the Harloe Plains. But Branzir ran after and ran swifter and nigh caught him before they reached the Woods of Darmin. There Ralkur assumed the form of a monkey and took to the trees. But Branzir tracked him and followed close, overcoming the traps his foe left behind. Then the forest fell away and they came to the Azure Sea, and Ralkur took the form of a gull and flew over the waters cawing with prideful glee. But Branzir was unfazed and leapt into the water, swimming after the cowardly god with all his strength. Twenty days and nights he followed through the ocean, feeding off fish he could catch near the surface, whilst Ralkur beat his wings on the winds above. Not once did Branzir lose sight of his target, and with each passing day Ralkur became more and more filled with fright. Finally they came to the far shore of Tar'Eyal, and Ralkur fell onto the sandy beach bereft of strength. Depleted of all energy he reverted to his natural form, short and squat, and stumbled across the sand before falling down exhausted. Branzir arose from the water behind, and in spite of his trials he stood tall and fierce, and marched with purpose towards the cowering god. He drew out the fell blade Madrath from its sheath and held it to the throat of his prey. @@ -114,8 +114,8 @@ But Ralkur, in a last desperate effort, took on a pathetic and piteous form, and newLore{ id = "infinite-dungeon-history-3", category = "infinite dungeon", - name = "The Hunter and the Hunted chapter 3", - lore = [[Branzir returned to his people, and continued the hunt for the other gods, till but one god remained: Amakthel. Then the last great Godhunt began, as the Sher'Tul fought to overcome their maker and master. And this was no easy feat, for Amakthel was by far the strongest of all the gods, and many Sher'Tul were still loyal to their creator. Much blood was spilled before ever the assault on his throne could begin, and much blood would spill still after. + name = _t"The Hunter and the Hunted chapter 3", + lore = _t[[Branzir returned to his people, and continued the hunt for the other gods, till but one god remained: Amakthel. Then the last great Godhunt began, as the Sher'Tul fought to overcome their maker and master. And this was no easy feat, for Amakthel was by far the strongest of all the gods, and many Sher'Tul were still loyal to their creator. Much blood was spilled before ever the assault on his throne could begin, and much blood would spill still after. Now Ralkur had fled into the heavens with the full intent of passing beyond all reach of mortals forever more, such was the fear laid on him by the solemn words of Branzir. But as he soared higher and the fear faded, he came to change his mind, for he was a prideful god and moreso a vengeful one. Thoughts and schemes began to build in his mind for how he could gain retribution on the Sher'Tul that had brought him to shame. So he took on the form of an eagle and flew above the highest volcano in Eyal, and there he stretched his wings and glided high on the rising heat, watching all that happened in the lands below and biding his time for vengeance. @@ -126,8 +126,8 @@ He watched with joy as he saw the Sher'Tul armies fall before the forces of Amak newLore{ id = "infinite-dungeon-history-4", category = "infinite dungeon", - name = "The Hunter and the Hunted chapter 4", - lore = [[Seeing the full powers of the Sher'Tul Ralkur felt paralysed with fear, and thought his quest for vengeance hopeless. But he bided his time still, and his patience was rewarded as he saw dissention begin to arise in the great race. When Caldizar disappeared and the Godslayers separated he felt his time was ripe, and he came upon the forest keep of Branzir under a storm of wrath. He flew down screeching, and spreading his wings he let loose spikes of steel that rained down on the keep, cutting through wood and stone and flesh. All who were in the keep were killed, and the air was filled with Ralkur's cackling laughter as he flew away. + name = _t"The Hunter and the Hunted chapter 4", + lore = _t[[Seeing the full powers of the Sher'Tul Ralkur felt paralysed with fear, and thought his quest for vengeance hopeless. But he bided his time still, and his patience was rewarded as he saw dissention begin to arise in the great race. When Caldizar disappeared and the Godslayers separated he felt his time was ripe, and he came upon the forest keep of Branzir under a storm of wrath. He flew down screeching, and spreading his wings he let loose spikes of steel that rained down on the keep, cutting through wood and stone and flesh. All who were in the keep were killed, and the air was filled with Ralkur's cackling laughter as he flew away. But the vengeful god had been hasty at the last, for Branzir was out hunting at the time. Coming back the next day he saw his home in ruins, and all his family and servants butchered, and sorrow and torment filled every corner of his being. On hearing reports of what happened he knew well the perpetrator and his fury was incandescent. He sought the aid of the other Godhunters in scouring out the stray god, but they were all divided, and each engaged in the politics that would lay the seeds for war. Perhaps if they had aided him then the popular Branzir could have helped unify the people and stop the madness that was to come. But Caldizar was gone, reportedly aggrieved and repentant at their acts, and the remaining Godslayers thought only of their own powers and making gods of themselves.]], } @@ -135,8 +135,8 @@ But the vengeful god had been hasty at the last, for Branzir was out hunting at newLore{ id = "infinite-dungeon-history-5", category = "infinite dungeon", - name = "The Hunter and the Hunted chapter 5", - lore = [[So Branzir set out alone, with Madrath in his sheath. It did not take long to find his prey, who had now stopped all attempts at hiding. He came upon the god in a settlement of lesser creatures who worshipped him, and he ruthlessly cut down the pathetic wretches that tried to protect their new deity. Ralkur fled at the sight of Branzir and his dark blade, filled with all-encompassing fright. But Branzir was not to be lost, and chased him into some nearby ruins. There Ralkur laid traps and summoned enemies and fled deeper into the darkness. But Branzir overcame them all and came on faster, till they reached the depths of the dungeons. And being out of space the god created new space and fled further, and kept on fleeing. And Branzir carried on chasing, not letting up for a second as the pursued god continued to delve deeper into the ground. + name = _t"The Hunter and the Hunted chapter 5", + lore = _t[[So Branzir set out alone, with Madrath in his sheath. It did not take long to find his prey, who had now stopped all attempts at hiding. He came upon the god in a settlement of lesser creatures who worshipped him, and he ruthlessly cut down the pathetic wretches that tried to protect their new deity. Ralkur fled at the sight of Branzir and his dark blade, filled with all-encompassing fright. But Branzir was not to be lost, and chased him into some nearby ruins. There Ralkur laid traps and summoned enemies and fled deeper into the darkness. But Branzir overcame them all and came on faster, till they reached the depths of the dungeons. And being out of space the god created new space and fled further, and kept on fleeing. And Branzir carried on chasing, not letting up for a second as the pursued god continued to delve deeper into the ground. And so the chase continues. Over centuries beyond count Branzir has never stopped to rest or sleep as he pursues his prey through the ravages of infinity. And though death would be a welcome reprieve he thinks only of the hunt and of vanquishing the cowardly god. Ralkur continues to run, and he does not take a breath that it is not a gasp, and he does not take a step that it is not in flight, and every beat of his traitorous heart is a pounding of terror as he flees deeper and deeper till the ends of time.]], } diff --git a/game/modules/tome/data/lore/iron-throne.lua b/game/modules/tome/data/lore/iron-throne.lua index aad45e7ed1a3d554fbb0be87666988c18918fbff..f46f2a1c6cb3813686c359df69dbe4057d4fdf8d 100644 --- a/game/modules/tome/data/lore/iron-throne.lua +++ b/game/modules/tome/data/lore/iron-throne.lua @@ -24,8 +24,8 @@ newLore{ id = "iron-throne-profits-1", category = "iron throne", - name = "Iron Throne Profits History: Age of Allure", - lore = [[#{bold}#3800: #{normal}#Gold accepted as standard unit of currency amongst all races after heavy lobbying. This is greatly to our favour, as our vein resources are high and the material otherwise has no practical usage. Must continue to stockpile more. + name = _t"Iron Throne Profits History: Age of Allure", + lore = _t[[#{bold}#3800: #{normal}#Gold accepted as standard unit of currency amongst all races after heavy lobbying. This is greatly to our favour, as our vein resources are high and the material otherwise has no practical usage. Must continue to stockpile more. #{bold}#4200: #{normal}#New smelting techniques developed allow more stralite to be recovered from existing veins. Techniques must be kept hidden from other races. #{bold}#4362: #{normal}#Grand Smith Dakhtun has discovered new methods of infusing magical effects in weapons and armour. Potential for profit growth in this area very high. #{bold}#4550: #{normal}#First special meeting of Iron Throne Profits Committee. War with humans and halflings worrying, as it is reducing potential market size. Threat of complete market elimination forces us to drastic action - all weapons trade must cease. Increase stockpiles of construction materials in hope of eventual reconciliation. @@ -40,8 +40,8 @@ newLore{ newLore{ id = "iron-throne-profits-2", category = "iron throne", - name = "Iron Throne Profits History: Age of Dusk", - lore = [[#{bold}#412: #{normal}#Diseases and food shortages force increased trade with other races. For the first time in our great history we are in the red. Morale amongst the people is at an all-time low, and is badly affecting productivity. + name = _t"Iron Throne Profits History: Age of Dusk", + lore = _t[[#{bold}#412: #{normal}#Diseases and food shortages force increased trade with other races. For the first time in our great history we are in the red. Morale amongst the people is at an all-time low, and is badly affecting productivity. #{bold}#1430: #{normal}#Several mages visited and used their arts to cure many of the plagues we have suffered for centuries. When offered payment they refused. How very odd... #{bold}#1490: #{normal}#Production now nearing pre-Spellblaze levels. Profits high, and commerce with other races increasing. #{bold}#1567: #{normal}#Gigantic earthquakes have completely destroyed many of our major production facilities. Loss of personnel resources is also very tragic, especially key production experts. This is having a very negative effect on our forecasts.]], @@ -50,8 +50,8 @@ newLore{ newLore{ id = "iron-throne-profits-3", category = "iron throne", - name = "Iron Throne Profits History: Age of Pyre", - lore = [[#{bold}#240: #{normal}#Market forecasts recovering better than expected. Increasing expansion in external trade areas. + name = _t"Iron Throne Profits History: Age of Pyre", + lore = _t[[#{bold}#240: #{normal}#Market forecasts recovering better than expected. Increasing expansion in external trade areas. #{bold}#490: #{normal}#Orcish attacks have become much worse - seem to be using higher magic and some demonic forces. Potential threat to resources. #{bold}#581: #{normal}#Several key cities overwhelmed from underground by attacks from orcs and strange horrors. Have collapsed lower caverns to prevent further penetration. Working on continued resource protection measures. #{bold}#711: #{normal}#Developed key strategic agreements with outside races to help contain orcish threat to resources and infrastructure. Relations with Toknor of the humans are seen to be especially important - have sent him some of our best armour and weapons to ensure a good return on our investments. In hindsight we should have charged more for these. @@ -62,8 +62,8 @@ newLore{ newLore{ id = "iron-throne-profits-4", category = "iron throne", - name = "Iron Throne Profits History: Age of Ascendancy", - lore = [[#{bold}#28: #{normal}#Mutual defence treaty signed with newly formed Allied Kingdom, and further trade routes opened. Highest ever recorded profit in final quarter of this year. + name = _t"Iron Throne Profits History: Age of Ascendancy", + lore = _t[[#{bold}#28: #{normal}#Mutual defence treaty signed with newly formed Allied Kingdom, and further trade routes opened. Highest ever recorded profit in final quarter of this year. #{bold}#115: #{normal}#Noted a return of an orcish presence in the collapsed caverns beneath the Iron Throne. Also increased reports of horrors and demons affecting mining operations. Key strategic decision taken: these must be kept hidden from the other races. Uncertainty will only destabilise the markets. Increase stockpiles of weapons and armour, especially voratun and stralite materials, in case of new war trade. #{bold}#120: #{normal}#Orcish raid has stolen many of our stockpiled weapons. Pressures on mining operations have increased, cutting off key stralite veins. Resource protection measures need increasing, whilst threat must be contained beneath us. Profits are stable, but under heavy threat.]], } @@ -71,8 +71,8 @@ newLore{ newLore{ id = "iron-throne-reknor-edict", category = "iron throne", - name = "Iron Throne Edict", - lore = [[#{bold}#AN EDICT TO ALL CITIZENS OF THE IRON THRONE. LONG MAY OUR EMPIRE ENDURE.#{normal}# + name = _t"Iron Throne Edict", + lore = _t[[#{bold}#AN EDICT TO ALL CITIZENS OF THE IRON THRONE. LONG MAY OUR EMPIRE ENDURE.#{normal}# The rumours you have heard are true. It is with a heavy heart that I confirm one of our mines, Reknor, has been overtaken and inhabited by a large and organised orcish force. How there could be such a decisive and total failure on our part to stop this threat remains a mystery - the source of the orcish invasion remains unknown. A battalion of soldiers will form a defensive perimeter around Reknor until a force to retake the mine and exterminate the orcs can be mustered. All civilians residing within the surrounding halls are to be evacuated. @@ -82,8 +82,8 @@ This is a grave and unprecedented issue, so I decree an oath of silence to be la newLore{ id = "iron-throne-trade-ledger", category = "iron throne", - name = "Iron Throne trade ledger", - lore = [[#{bold}#IRON THRONE TRADE LEDGER - Allied Kingdom#{normal}# + name = _t"Iron Throne trade ledger", + lore = _t[[#{bold}#IRON THRONE TRADE LEDGER - Allied Kingdom#{normal}# #{italic}#Age of Ascendancy, 121#{normal}# #{bold}#Last Hope - Exports#{normal}# @@ -116,8 +116,8 @@ yes to diamonds. arm our merchants in the caravan, no extra guards. profits are newLore{ id = "iron-throne-last-words", category = "iron throne", - name = "Iron Throne Reknor expedition, last words", - lore = [[...We are lost. The orcish forces are too great. No matter how many our squad slays, yet more surge from the depths. Where are the cursed creatures coming from?! We have spied their leader, but have had no hope in killing him; he is a beast, a destroyer, burning with fire infernal and ice cruel and chilling. The power these orcs wield now fills me with dread... perhaps they have found new, mighty allies? This news must reach our ruler. My comrades... I am sorry. I will flee once the opportunity arises, but know that your sacrifices will not be in vain. Long may our empire endure.]] + name = _t"Iron Throne Reknor expedition, last words", + lore = _t[[...We are lost. The orcish forces are too great. No matter how many our squad slays, yet more surge from the depths. Where are the cursed creatures coming from?! We have spied their leader, but have had no hope in killing him; he is a beast, a destroyer, burning with fire infernal and ice cruel and chilling. The power these orcs wield now fills me with dread... perhaps they have found new, mighty allies? This news must reach our ruler. My comrades... I am sorry. I will flee once the opportunity arises, but know that your sacrifices will not be in vain. Long may our empire endure.]] } -------------------------------------------------------------------------- @@ -127,8 +127,8 @@ newLore{ newLore{ id = "deep-bellow-1", category = "iron throne", - name = "Deep Bellow excavation report 1", - lore = [[10 days into initial site survey, hmm! Recent tremors have opened deep new chasms, but we must work cautiously to ensure they're stable before conducting major operations, oh yes! Proceeding well at start, with supports being put in place and no flammable gases detected, hmm hmm. + name = _t"Deep Bellow excavation report 1", + lore = _t[[10 days into initial site survey, hmm! Recent tremors have opened deep new chasms, but we must work cautiously to ensure they're stable before conducting major operations, oh yes! Proceeding well at start, with supports being put in place and no flammable gases detected, hmm hmm. Some Sher'Tul relics have been found. Perhaps great profit to be had here! High margins on Shaloren market, yes yes. @@ -140,9 +140,9 @@ Some miners saying they feel ill, hrm hrm. The drem fools have likely been gorgi newLore{ id = "deep-bellow-2", category = "iron throne", - name = "Deep Bellow excavation report 2", + name = _t"Deep Bellow excavation report 2", bloodstains = 3, - lore = [[Chasms go deep, yes yes. More relics found, oh yes. Will be mighty profitable! But ah, my secret treasure is even better, indeed! Gold! Beautiful lovely gold, buried deep, so deep... Have kept it hidden, sealed, yes. Looks like the remains of a giant throne. I touched it, yes, I even put my lips to it - ahhh, the taste! + lore = _t[[Chasms go deep, yes yes. More relics found, oh yes. Will be mighty profitable! But ah, my secret treasure is even better, indeed! Gold! Beautiful lovely gold, buried deep, so deep... Have kept it hidden, sealed, yes. Looks like the remains of a giant throne. I touched it, yes, I even put my lips to it - ahhh, the taste! But must stay focussed, much work to be done. Miners are rowdy, hrm! One of the drem fools went mad and killed himself with a pickaxe - messy business. Must restore order, yes yes! More Sher'Tul artifacts found, possibly even remains of weapons. Imagine the profit! Will keep them hidden yes, the dreams say yes, in the darkness, secret, waiting waiting, for the right time... @@ -154,9 +154,9 @@ Hmm, that fellow's blood was so red, spilling on the cavernous floor. I wonder w newLore{ id = "deep-bellow-3", category = "iron throne", - name = "Deep Bellow excavation report 3", + name = _t"Deep Bellow excavation report 3", bloodstains = 12, - lore = [[Hah, my mouth, it tastes, it feels, hmm hmm. It grows, yes yes! The others are changing, flying, screaming, squelching, warping. Bad for profit, hmm hmm. My teeth, they grow, they hunger, yes. They want to escape! + lore = _t[[Hah, my mouth, it tastes, it feels, hmm hmm. It grows, yes yes! The others are changing, flying, screaming, squelching, warping. Bad for profit, hmm hmm. My teeth, they grow, they hunger, yes. They want to escape! I can feel in my dreams, the dark depths. Bound, buried, forgotten. My mouth wants to open, to scream, to destroy! Hmm hmm, deep below, yes... Want to get out! diff --git a/game/modules/tome/data/lore/keepsake.lua b/game/modules/tome/data/lore/keepsake.lua index 019494c58e8749f19306f76f1fd838a0e8420a3f..a9052f085980b4b998aed73e35659f71e2972f7b 100644 --- a/game/modules/tome/data/lore/keepsake.lua +++ b/game/modules/tome/data/lore/keepsake.lua @@ -20,8 +20,8 @@ newLore{ id = "keepsake-meadow", category = "keepsake", - name = "A Tranquil Meadow", - lore = [[You've entered a tranquil meadow. Something about this place seems familiar but you're not quite sure. + name = _t"A Tranquil Meadow", + lore = _t[[You've entered a tranquil meadow. Something about this place seems familiar but you're not quite sure. The only thing that you are sure of is that it has offered you a moment of rest from the long suffering of your cursed life. You feel the hate inside you melt away. You feel as if the curse has subsided for a moment. @@ -34,8 +34,8 @@ Either way, you feel the time has come to do something more about this curse. newLore{ id = "keepsake-dream", category = "keepsake", - name = "A Haunting Dream", - lore = [[As you wander the meadow you grow more relaxed. You lie down for a moment and close your eyes... + name = _t"A Haunting Dream", + lore = _t[[As you wander the meadow you grow more relaxed. You lie down for a moment and close your eyes... You wake up (if you can call it that) in a vivid dream. A small trail winds through the dense forest. The branches of the trees seem to close in around you. The tranquil feeling of the meadow is gone. @@ -46,8 +46,8 @@ Instead you feel the rising fear and hatred that rule your waking life. Further newLore{ id = "keepsake-banders-notes", category = "keepsake", - name = "Bander's Notes", - lore = [[#{italic}#You find a folded up piece of paper with some notes on it...#{normal}# + name = _t"Bander's Notes", + lore = _t[[#{italic}#You find a folded up piece of paper with some notes on it...#{normal}# * Mom apparently died like the others but they refuse to say much more about it. I think all of the bodies were burned. @@ -66,8 +66,8 @@ newLore{ newLore{ id = "keepsake-acorn", category = "keepsake", - name = "The Acorn", - lore = [[Along the trail you see something at your feet. It's a small acorn, made of iron. You stare at the acorn for a while and pick it up. + name = _t"The Acorn", + lore = _t[[Along the trail you see something at your feet. It's a small acorn, made of iron. You stare at the acorn for a while and pick it up. It belonged to Bander's mom, and before that, his dad. You remember she never went anywhere without it. Bander was just a kid then. You wonder how he's turned out. Not well you imagine. Thanks to Berethh, Kyless and you. You keep turning the acorn in your hand and squeezing it until the cold iron bites into your skin. @@ -78,8 +78,8 @@ That gives you comfort somehow. Unable to part with it, you put it in your pack. newLore{ id = "keepsake-caravan", category = "keepsake", - name = "The Merchant Caravan", - lore = [[The trail leads out to a clearing where a group of people sit around talking. + name = _t"The Merchant Caravan", + lore = _t[[The trail leads out to a clearing where a group of people sit around talking. This is the merchant caravan you once belonged to. You haven't thought of them for a long time, but now they haunt your dreams. You suddenly realize how much you despise them now. Is it this hate that fuels your curse? @@ -91,8 +91,8 @@ And they can feel it now. Each in turn grabs a weapon and begins to head your wa newLore{ id = "keepsake-dreams-end", category = "keepsake", - name = "The Dream's End", - lore = [[You wake up in the tranquil meadow, feeling refreshed. The dream seemed to release you from a burden you've been carrying. + name = _t"The Dream's End", + lore = _t[[You wake up in the tranquil meadow, feeling refreshed. The dream seemed to release you from a burden you've been carrying. As you lie there you notice yourself turning something around in your hand. It is the small acorn from the dream. You open your hand and see that it has been stained with someone else's blood. You grip the acorn tighter until you can feel the pain of the biting iron. @@ -107,9 +107,9 @@ Kyless had taken you this way once. On the north side of the meadow was a secret newLore{ id = "keepsake-cave-marker", category = "keepsake", - name = "The Stone Marker", + name = _t"The Stone Marker", always_pop = true, - lore = [[#{italic}#You find a stone marker at the entrance to a sealed off cave...#{normal}# + lore = _t[[#{italic}#You find a stone marker at the entrance to a sealed off cave...#{normal}# #{bold}#Do Not Enter#{normal}# This cave holds a danger that should never be released upon this world again. Break the seal and you will suffer. @@ -121,9 +121,9 @@ This cave holds a danger that should never be released upon this world again. Br newLore{ id = "keepsake-cave-entrance", category = "keepsake", - name = "The Sealed Cave", + name = _t"The Sealed Cave", always_pop = true, - lore = [[The entrance to the cave appears to be sealed. There are many strange markings and glyphs carved into the rock. + lore = _t[[The entrance to the cave appears to be sealed. There are many strange markings and glyphs carved into the rock. You suspect the cave is protected by some kind of natural magic. It looks as if the protections were meant to keep someone in. You don't think it would be difficult to force the door from the outside. @@ -133,9 +133,9 @@ It looks as if the protections were meant to keep someone in. You don't think it newLore{ id = "keepsake-cave-description", category = "keepsake", - name = "The Battle of the Cave", + name = _t"The Battle of the Cave", always_pop = true, - lore = [[You step into the cave and give your eyes a moment to adjust to the darkness. + lore = _t[[You step into the cave and give your eyes a moment to adjust to the darkness. There are signs of an old battle here. Two skeletons lie on the floor dressed in hand-crafted armor, their simple but well-made weapons still in hand. The bodies don't look old enough to have decomposed but seem rather gnawed on. The remains of several large dogs also lie nearby. Suddenly you catch movement in the corner. One of the dogs appears to be alive. It's lean and dirty and has an unnatural way of moving. @@ -147,9 +147,9 @@ Together the dog and the shadows rise up to face you. newLore{ id = "keepsake-kyless-journal-1", category = "keepsake", - name = "Kyless' Journal: First Entry", + name = _t"Kyless' Journal: First Entry", always_pop = true, - lore = [[#{italic}#This is a page from what you assume is Kyless' journal.#{normal}# + lore = _t[[#{italic}#This is a page from what you assume is Kyless' journal.#{normal}# I finally made it out. I don't think I could stay another year on that farm. Dad had no ambition. Every time I went with him to sell our crop he took whatever the merchants offered him. @@ -164,9 +164,9 @@ I'll have to learn to defend myself or let others do it for me. Still, this is b newLore{ id = "keepsake-kyless-journal-2", category = "keepsake", - name = "Kyless' Journal: Second Entry", + name = _t"Kyless' Journal: Second Entry", always_pop = true, - lore = [[#{italic}#This is a page from what you assume is Kyless' journal.#{normal}# + lore = _t[[#{italic}#This is a page from what you assume is Kyless' journal.#{normal}# Berethh found something in the woods...a dead man and a few dead trolls. At first we thought they killed each other but there weren't any wounds we could see. It was something awful though; you could see it in their faces. @@ -183,9 +183,9 @@ Once I've mastered this I may be able to use it to advance in the caravan. I'm t newLore{ id = "keepsake-kyless-journal-3", category = "keepsake", - name = "Kyless' Journal: Third Entry", + name = _t"Kyless' Journal: Third Entry", always_pop = true, - lore = [[#{italic}#This is a page from what you assume is Kyless' journal.#{normal}# + lore = _t[[#{italic}#This is a page from what you assume is Kyless' journal.#{normal}# I've come so far in the last year. The other merchants listen to me now. They think I have a real gift for trade. The weak-minded peasants we trade with are so easy to control though. They practically give me their money. @@ -200,9 +200,9 @@ I guess I threaten his authority. Not sure what I'll have to do about that... newLore{ id = "keepsake-kyless-journal-4", category = "keepsake", - name = "Kyless' Journal: Fourth Entry", + name = _t"Kyless' Journal: Fourth Entry", always_pop = true, - lore = [[#{italic}#This is a page from what you assume is Kyless' journal.#{normal}# + lore = _t[[#{italic}#This is a page from what you assume is Kyless' journal.#{normal}# Berethh! He must have followed me back to the cave. How could he know I was behind the attacks? And now he's betrayed me. We were friends once! It seems he's made some new friends in these parts. @@ -217,9 +217,9 @@ I'm sure I can overcome his wards though. I just need some time to grow my power newLore{ id = "keepsake-vault-entrance", category = "keepsake", - name = "The Vault", + name = _t"The Vault", always_pop = true, - lore = [[You find yourself at the entrance to a small room. + lore = _t[[You find yourself at the entrance to a small room. It's one of the vaults that Kyless used to store the valuable things he recovered on his excursions. For a cut you had helped him carry stuff down here. You made some pretty good money off him. Funny how it seemed like such a fortune then. The loot of petty bandits. @@ -234,9 +234,9 @@ And those things of his almost killed you too. But maybe you were cursed long be newLore{ id = "keepsake-kyless-encounter", category = "keepsake", - name = "Kyless", + name = _t"Kyless", always_pop = true, - lore = [[A figure squats in the darkness with his face turned your way. At first you're not sure if Kyless recognizes you. + lore = _t[[A figure squats in the darkness with his face turned your way. At first you're not sure if Kyless recognizes you. His face seems twisted by hunger and madness. But soon it softens and he begins to look more like the Kyless of old. He speaks your name in recognition but doesn't move. Slowly, almost imperceptibly, the air in the room begins to change. A charge seems to fill the space around you. Small gusts of wind pick up and scatter dust across the floor. @@ -247,9 +247,9 @@ You feel as if the room itself is coming to bear upon you. Kyless smiles and the newLore{ id = "keepsake-berethh-death-good", category = "keepsake", - name = "Keepsake", + name = _t"Keepsake", always_pop = true, - lore = [[Berethh lies dead. Kyless has been destroyed. The merchant caravan wiped out. Nothing of your past remains. + lore = _t[[Berethh lies dead. Kyless has been destroyed. The merchant caravan wiped out. Nothing of your past remains. You thought you might find answers in this place but you have been left with only one certainty. You are cursed. As you try to push these thoughts out of your mind, you find yourself turning the iron acorn in your hand. The cold iron hardens your resolve. Whether the curse consumes you or not, you will press on. @@ -262,9 +262,9 @@ You rise and prepare to kill again. newLore{ id = "keepsake-berethh-death-evil", category = "keepsake", - name = "Keepsake", + name = _t"Keepsake", always_pop = true, - lore = [[Berethh lies dead. Kyless has been destroyed. The merchant caravan wiped out. Nothing of your past remains. + lore = _t[[Berethh lies dead. Kyless has been destroyed. The merchant caravan wiped out. Nothing of your past remains. You thought you might find answers in this place but you have been left with only one certainty. You are cursed. As you try to push these thoughts out of your mind, you find yourself turning the iron acorn in your hand. The acorn now serves as a focus for your anger. Though the curse may consume you, there are many who deserve your wrath. And they will feel it. diff --git a/game/modules/tome/data/lore/kor-pul.lua b/game/modules/tome/data/lore/kor-pul.lua index 00877d111bfdf37c7f71ae47910f8fb7bf05dd4f..f30c87a31ea9a38afa7e30cf2317c0a402a59469 100644 --- a/game/modules/tome/data/lore/kor-pul.lua +++ b/game/modules/tome/data/lore/kor-pul.lua @@ -24,8 +24,8 @@ newLore{ id = "kor-pul-note-1", category = "kor'pul", - name = "journal page (kor'pul)", - lore = [[Damn that Zemekkys! Damn his insane experiments!! Why in the blackest night did I ever agree to take part in them?! + name = _t"journal page (kor'pul)", + lore = _t[[Damn that Zemekkys! Damn his insane experiments!! Why in the blackest night did I ever agree to take part in them?! Oh yeah, because I was broke. Bah... @@ -37,8 +37,8 @@ But all I've found so far is rats. I hate rats...]], newLore{ id = "kor-pul-note-2", category = "kor'pul", - name = "journal page (kor'pul)", - lore = [[Aha, I have found the accursed undead that plague this nefarious dungeon! The skeletal fool was thankfully no match for me! I suppose it helped that he had no arms... + name = _t"journal page (kor'pul)", + lore = _t[[Aha, I have found the accursed undead that plague this nefarious dungeon! The skeletal fool was thankfully no match for me! I suppose it helped that he had no arms... I've found myself an old shield that in spite of a few dents seems serviceable enough. Some of these rats are BIG, and giving them a strong bash with the shield helps to stop their poisonous bites before I get my sword to their necks. I also found a few gems - I may have to hunt round for more. Not out of any personal greed of course, but my noble quest requires that I gather resources to defeat the great evils in this land and back home! @@ -48,8 +48,8 @@ Diamonds are my favourite, so sparkly.]], newLore{ id = "kor-pul-note-3", category = "kor'pul", - name = "journal page (kor'pul)", - lore = [[This place is infested! I've found a lot of skeletons now, and unfortunately most of them have borne a full set of limbs. However, my holy quest cannot be denied! Plus I got a really great sword off one of the blighters, I can chop anything up easily now! + name = _t"journal page (kor'pul)", + lore = _t[[This place is infested! I've found a lot of skeletons now, and unfortunately most of them have borne a full set of limbs. However, my holy quest cannot be denied! Plus I got a really great sword off one of the blighters, I can chop anything up easily now! The skeletal mages have been a night-born nuisance, but I've found a new weapon to use against them - a phase door rune! As soon as I catch sight of one of the robed wretches I activate my rune and foom, I'm away! @@ -60,8 +60,8 @@ It's not fleeing, it's just tactical repositioning... newLore{ id = "kor-pul-note-4", category = "kor'pul", - name = "journal page (kor'pul)", - lore = [[Kor'Pul, Kor'Pul... When the farmer told me what this place was called it reminded me of something, and I think it's coming back to me now. My mother used to tell me a story about our ancestors, how they fled by ship to escape the grasp of an evil sorcerer who dominated the lands. The sorcerer was a vile necromancer who took advantage of the destruction from the Spellblaze and the Cataclysm to create huge armies of undead. The people fought against him time and time again, but though he would be defeated he would still come back, sometimes after hundreds of years. And that sorcerer's name was.... Kor'Pul. + name = _t"journal page (kor'pul)", + lore = _t[[Kor'Pul, Kor'Pul... When the farmer told me what this place was called it reminded me of something, and I think it's coming back to me now. My mother used to tell me a story about our ancestors, how they fled by ship to escape the grasp of an evil sorcerer who dominated the lands. The sorcerer was a vile necromancer who took advantage of the destruction from the Spellblaze and the Cataclysm to create huge armies of undead. The people fought against him time and time again, but though he would be defeated he would still come back, sometimes after hundreds of years. And that sorcerer's name was.... Kor'Pul. Probably just a coincidence.]], } @@ -69,8 +69,8 @@ Probably just a coincidence.]], newLore{ id = "kor-pul-note-5", category = "kor'pul", - name = "journal page (kor'pul)", - lore = [[It's quiet down here. And dark... very dark. I suppose I should have brought a lantern. Our motto is to bring light into dark places, but I guess I should have thought about that in practical terms. I've cleared out pretty much all of this area, and there's not much left to explore beyond this last room. + name = _t"journal page (kor'pul)", + lore = _t[[It's quiet down here. And dark... very dark. I suppose I should have brought a lantern. Our motto is to bring light into dark places, but I guess I should have thought about that in practical terms. I've cleared out pretty much all of this area, and there's not much left to explore beyond this last room. This adventuring stuff is quite lonely, I must say. I guess keeping this journal helps a bit. I miss home a lot now. I miss... I miss Falia. Maybe I should have said something to her about how I feel... but I guess running away on an adventure seemed easier. Pah, how brave of me... diff --git a/game/modules/tome/data/lore/last-hope.lua b/game/modules/tome/data/lore/last-hope.lua index 7c4228495edb978bad2faa5f8d94c22438812f0d..fe6ae0ac3bb0feff04d15f2e1d76f9c7338d5781 100644 --- a/game/modules/tome/data/lore/last-hope.lua +++ b/game/modules/tome/data/lore/last-hope.lua @@ -23,8 +23,8 @@ newLore{ id = "last-hope-foundation-note-1", category = "last hope", - name = "The Diaries of King Toknor the Brave", - lore = [[#{italic}#68th of Dusk, Year of Pyre 710#{normal}# + name = _t"The Diaries of King Toknor the Brave", + lore = _t[[#{italic}#68th of Dusk, Year of Pyre 710#{normal}# The orcish tribe have routed us. We have retreated to some Mardrop ruins and secured ourselves amongst the fortifications. I have just shy of 2,000 men under my banner, some of the best warriors I have ever served with, but we are simply no match for the numbers we face. Counting them is difficult, but I would put a minimum estimate at 10,000. The tribe has camped a league away - they seem to be waiting for reinforcements. This does not bode well... I have sent messenger crows to all the kingdoms. I can but hope they send aid in time.]], @@ -33,8 +33,8 @@ I have sent messenger crows to all the kingdoms. I can but hope they send aid in newLore{ id = "last-hope-foundation-note-2", category = "last hope", - name = "The Diaries of King Toknor the Brave", - lore = [[#{italic}#25th of Haze, Year of Pyre 710#{normal}# + name = _t"The Diaries of King Toknor the Brave", + lore = _t[[#{italic}#25th of Haze, Year of Pyre 710#{normal}# Five men tried deserting last night. Today I had them flogged in front of all the others. I have given warning that any future deserters shall be hanged. These are measures I do not like to take, but harsh times call for harsher discipline. Our supplies are holding steady for now, but I fear they may not last. I've received word that it will take at least fifty days to muster a force that can save us. Alas, food may well be the least of our worries, for the orcs have begun to attack our strongholds. Thankfully we have had time to reinforce the existing structures. Indeed, little work was needed, for the foundations of this place are strong. My loremaster tells me it was abandoned following the Crimson Pox, but was once the capital of Mardrop. The men have taken a fondness to the place, and have named it "Last Hope". Though I normally discourage such romantic notions I cannot help but feel the same. These stone walls give strength to my heart - I feel we can fight through this. @@ -45,8 +45,8 @@ Their attack has begun again. They seem to have mages now. Ah, it will be a long newLore{ id = "last-hope-foundation-note-3", category = "last hope", - name = "The Diaries of King Toknor the Brave", - lore = [[#{italic}#47th of Haze, Year of Pyre 710#{normal}# + name = _t"The Diaries of King Toknor the Brave", + lore = _t[[#{italic}#47th of Haze, Year of Pyre 710#{normal}# Rations low. Men demoralised. Winterhaze wind is making conditions unbearable. The fortress is holding, but each night they pick off some of our troops. It is but a matter of time before we no longer have the strength to resist. I can hear their blasted trumpets again. Accursed swine! We have no rest or sleep, not the slightest sojourn without their braying, howling, jeering, taunting, insufferable cantations! It is driving me from my wits! But I must remain strong... I must put on a brave face for the men. They are relying on me, and though the burden feels close to crushing me I must bear it with the dignity of a king. @@ -57,8 +57,8 @@ It is getting dark again. Who will die this night? I am so very afraid... but I newLore{ id = "last-hope-foundation-note-4", category = "last hope", - name = "The Diaries of King Toknor the Brave", - lore = [[#{italic}#51st of Haze, Year of Pyre 710#{normal}# + name = _t"The Diaries of King Toknor the Brave", + lore = _t[[#{italic}#51st of Haze, Year of Pyre 710#{normal}# Oh, happy days! Joyous retribution! From the jaws of defeat we have been saved, and never before have I felt such elation! Last night as dusk approached, the orcish armies began to prepare a major attack. My men were ready, for I was determined that if they were to have our lives they would pay for them thrice over. But as the sun waned in the western sky I saw what looked like a rain of gold falling amongst the orcish troops and suddenly they were in disarray. Another flurry came and I saw that it were not gold, but bolts of steel reflected in the setting sun. "The halflings!" my scout shouted, and lo I saw then it was indeed a large army of halflings come upon the orcs' flank. @@ -71,8 +71,8 @@ Our victory sealed, I immediately met with the halfling leader, and found it to newLore{ id = "last-hope-foundation-note-5", category = "last hope", - name = "The Diaries of King Toknor the Brave", - lore = [[#{italic}#2nd of Allure, Year of Pyre 711#{normal}# + name = _t"The Diaries of King Toknor the Brave", + lore = _t[[#{italic}#2nd of Allure, Year of Pyre 711#{normal}# We have solidified the defences at Last Hope and received more troops from all of the kingdoms. Our tactical position near the sea is proving an excellent base for further attacks on the orcs. I hope to expand our facilities here much further. I am drawing up an alliance now with the other leaders, for only together can we hope to beat this terrible threat to all our kingdoms. Mirvenia has been key to the discussions and the plans. She is a tactical genius, and I am constantly amazed by her wealth of knowledge and skills. There is an odd woman that accompanies her though, with long fiery hair and a silken robe - Linaniil is her name. One of my men swears he saw her riding into battle in a blaze of flames, burning all the orcs before her. The idea of a spellweaver in our midst is unsettling, but Mirvenia says I should trust her. And if Mirvenia says so then I must believe her. @@ -85,8 +85,8 @@ Ah, the beating of my heart cannot be silenced. I must speak to Mirvenia, and te newLore{ id = "last-hope-foundation-note-6", category = "last hope", - name = "The Diaries of King Toknor the Brave", - lore = [[#{italic}#6th of Flare, Year of Pyre 713#{normal}# + name = _t"The Diaries of King Toknor the Brave", + lore = _t[[#{italic}#6th of Flare, Year of Pyre 713#{normal}# Why is it only in times of darkness I turn to my journal? Today has been the darkest day in over two years, but it could have been darker still. Mirvenia's convoy was attacked by a rogue band of orcs. Though the brutes were repelled she was hurt in the conflict, and her labour brought on early. She lay before the halls of death for many hours. It is only thanks to the skill of her people's healers that she and the baby survived. @@ -99,9 +99,9 @@ Too long have we been content with repelling orcish raids and pushing back small newLore{ id = "last-hope-tolak-statue", category = "last hope", - name = "All Hail King Tolak the Fair!", + name = _t"All Hail King Tolak the Fair!", always_pop = true, - lore = [[Twice blessed is he of the union of King Toknor of the humans and Queen Mirvenia of the halflings! Praise his glory! + lore = _t[[Twice blessed is he of the union of King Toknor of the humans and Queen Mirvenia of the halflings! Praise his glory! By royal decree it is under absolute conditions forbidden to show racial prejudice against humans or halflings. There shall be no preference of price or service, and no discrimination of trade or business or employment. No halfling shall be named fur-toes, midget or shortbum, and no human shall be named lanklegs, cloudhead or stumpfoot. The penalty for disobedience shall be flogging. Intolerance will not be tolerated!]], } @@ -109,9 +109,9 @@ The penalty for disobedience shall be flogging. Intolerance will not be tolerate newLore{ id = "last-hope-toknor-statue", category = "last hope", - name = "All Hail King Toknor the Brave!", + name = _t"All Hail King Toknor the Brave!", always_pop = true, - lore = [[Born the 23th Allure, Year of Pyre 682 + lore = _t[[Born the 23th Allure, Year of Pyre 682 Died the 2th Summertide, Year of Ascendancy 108 King of Kings, Founder of Last Hope, Purger of Orcs, Father of the Age of Ascendancy. Great is the memory of the warrior who fought for peace, and won. @@ -121,9 +121,9 @@ Quoth King Toknor: "I have lived for the future, a future of peace and prosperit newLore{ id = "last-hope-mirvenia-statue", category = "last hope", - name = "All Hail Queen Mirvenia the Inspirer!", + name = _t"All Hail Queen Mirvenia the Inspirer!", always_pop = true, - lore = [[Born the 5th Flare, Year of Pyre 688 + lore = _t[[Born the 5th Flare, Year of Pyre 688 Died the 2th Summertide, Year of Ascendancy 113 Saviour of the Battle of Last Hope, Bringer of Unity, Soother of Hearts and Minds. Greatly is missed the alchemist that could change sorrow to joy, despair to hope, defeat to victory. @@ -133,8 +133,8 @@ Quoth Queen Mirvenia: "Nothing moves me more than seeing the sun set over Last H newLore{ id = "southspar-note-1", category = "southspar", - name = "The Pale King, part one", - lore = [[#{italic}#A study into Southspar's most unusual ruler.#{normal}# + name = _t"The Pale King, part one", + lore = _t[[#{italic}#A study into Southspar's most unusual ruler.#{normal}# Chances are you haven't heard of Southspar. @@ -169,8 +169,8 @@ By the time Drake left the Iron Council, the Dwarves had agreed to pay thirty ti newLore{ id = "southspar-note-2", category = "southspar", - name = "The Pale King, part two", - lore = [[#{bold}#3. Drake and the Conclave Mages.#{normal}# + name = _t"The Pale King, part two", + lore = _t[[#{bold}#3. Drake and the Conclave Mages.#{normal}# With its borders unassailed, ands its coffers rapidly filling with Dwarven gold, many believed that the fortune of Southspar could not increase any further. Drake, however, had one last task to accomplish, and it regarded the Conclave. @@ -206,9 +206,9 @@ I leave you with a copy of one of the last pieces of Southspar's history, a part newLore{ id = "last-hope-allied-kingdoms-foundation", category = "last hope", - name = "Declaration of the Unification of the Allied Kingdoms", + name = _t"Declaration of the Unification of the Allied Kingdoms", always_pop = true, - lore = [[Herewith is set the constitutional declaration of the Allied Kingdoms under the rule of King Toknor and Queen Mirvenia. Any who defy or seek to undermine the laws here set shall suffer torment and death. + lore = _t[[Herewith is set the constitutional declaration of the Allied Kingdoms under the rule of King Toknor and Queen Mirvenia. Any who defy or seek to undermine the laws here set shall suffer torment and death. As of the 1st of Allure, Age of Pyre year 714, henceforth to be known as the Age of Ascendancy year 1, all human and halfling kingdoms shall be united under the banner of the Allied Kingdoms. This shall include all towns, villages, serfdoms and farmsteads with over 50% human or halfling populace in the whole expanse of Maj'Eyal. @@ -224,8 +224,8 @@ All hail the reign of King Toknor and Queen Mirvenia! All hail the Allied Kingdo newLore{ id = "oceans-of-yeal", category = "last hope", - name = "The Oceans of Eyal", - lore = [[The Oceans of Eyal represent a frontier which we have been powerless to break. In spite of advanced craft and skill, and even the more forbidden areas of magic, there are natural barriers that we simply cannot overcome. Long range seafaring has become seen as unprofitable and a fruitless endeavour. The last great ship to be built was the Vanguard, over a thousand years ago, which disappeared over the eastern horizon and was never seen again. + name = _t"The Oceans of Eyal", + lore = _t[[The Oceans of Eyal represent a frontier which we have been powerless to break. In spite of advanced craft and skill, and even the more forbidden areas of magic, there are natural barriers that we simply cannot overcome. Long range seafaring has become seen as unprofitable and a fruitless endeavour. The last great ship to be built was the Vanguard, over a thousand years ago, which disappeared over the eastern horizon and was never seen again. Yet we know that the Sher’Tul once travelled the whole globe, that records exist from our younger days of other continents, of sailing routes that go right round the whole of Eyal. How it stirs my heart to think of the unexplored lands that lie beyond our stormy coasts! @@ -248,9 +248,9 @@ It’s a remarkable report, and one I’m minded to believe, in spite of the not newLore{ id = "celia-letter", category = "last hope", - name = "A creased letter", + name = _t"A creased letter", always_pop = true, - lore = [[Oh Cecil, what must you think of me? But I remember your words to me, before the fever took you - you told me to live. And live I must... And yet that fever has now spread to me and I feel my days are numbered. + lore = _t[[Oh Cecil, what must you think of me? But I remember your words to me, before the fever took you - you told me to live. And live I must... And yet that fever has now spread to me and I feel my days are numbered. I have a confession to make, my love. Those tinctures I brewed for you towards the end of your disease, those that helped you stay in my arms a few weeks longer, they were not my regular alchemy. In desperation I turned to darker arts in my obsession to save you. But though they kept your eyes open for a little longer, they could not keep you here with me. @@ -269,14 +269,14 @@ I must live. For you, my love, I will live.]], } local i = 0 -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Jake, son of Borlin and Clarise #{normal}#112 - 118#{italic}# Rest well, our child This world was too dark for thee #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Alenda and Pariel #{normal}#92 - 115, 94 - 115#{italic}# In sin you lived @@ -284,28 +284,28 @@ In sin you died Rot here together #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Marcus the Immortal #{normal}#23 - 107#{italic}# Ambitious in life Humbled in death #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Lord Gracion Bestelle #{normal}#41 - 112#{italic}# The memory of the greatest Shall never dim #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Inilasac Salocin #{normal}#32 - 120#{italic}# All tomes shall remember thee And thine dark blessings #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, red_rose=true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, red_rose=true, lore = _t[[#{bold}# RIP Cecil Farion #{normal}#98 - 122#{italic}# Noble in mind @@ -314,14 +314,14 @@ Rest now from the burdens of the flesh #{normal}#A fresh rose lies here]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Golan of Derth #{normal}#65 - 113#{italic}# May your memories Always bring joy and love #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Mara #{normal}#70 - 109#{italic}# You knew your doom @@ -329,32 +329,32 @@ And faced it Rest in peace #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Bodun the Follower #{normal}#86 - 117#{italic}# Killed by a friend's untimely death dance #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Tania Pure-Hearted #{normal}#78 - 115#{italic}# Our tears are for ourselves To have lost one so bright as you #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Unknown #{normal}#?? - 107#{italic}# Your bravery will not be forgotten #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Captain Lepant #{normal}#56 - 102#{italic}# A hero to all elements of society #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Ghormot the Black #{normal}#0 - 97#{italic}# In this bright age @@ -362,35 +362,35 @@ Of new adventures You are not forgotten #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Gygax the Great #{normal}#38 - 108#{italic}# Most blessed are we To have shared this world with thee #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Opius the Wastrel #{normal}#89 - 117#{italic}# Death was too good for you May you quickly be forgotten #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Wichman Toy #{normal}#80 - 121#{italic}# Your rogueish charms Inspire us forever #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Annei Caffrey #{normal}#26 - 102#{italic}# On the wings of dragons You forever soar #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Eden of Derth #{normal}#97 - 121#{italic}# Untamed in spirit @@ -398,19 +398,19 @@ Unhesitant in flight Unlifed in grimmest darkness #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Calici the Brave #{normal}#86 - 113#{italic}# Alas that bravery was not enough #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Barbrim the Cursed #{normal}#92 - 119#{italic}# Betrayed by those he trusted #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Falsira Mageslayer #{normal}#78 - 104#{italic}# Slain by the dark magics she fought @@ -418,50 +418,50 @@ We shall never forget Death to the spellweavers! #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Amalla #{normal}#86 - 105#{italic}# Burned for witchcraft #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Gamrik Dellhorn #{normal}#47 - 93#{italic}# Fell to the Wintertide blizzard #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Peterin #{normal}#32 - 89#{italic}# Died alone #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Ben Harrison #{normal}#68 - 104#{italic}# Praise the name Of he who helped us band together #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here rests Raymond Gaustadnes #{normal}#84 - 120#{italic}# The Pixels finally got him... #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Crokar #{normal}#86 - 113#{italic}# His love of trolls proved too dangerous a hobby #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Lyrissa the Wyrmfriend #{normal}#93 - 116#{italic}# Eaten by dragons #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here rests Weldeth the Deserter #{normal}#86 - 103#{italic}# Fled from battle @@ -470,94 +470,94 @@ On a comrade's sword He quickly died #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{italic}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{italic}# This gravestone has been desecrated #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Seria Swanfoot #{normal}#56 - 109#{italic}# May your feet now walk amongst the stars #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Eric and Erik #{normal}#66 - 114#{italic}# Met their death investigating dark light Alas, the pit was darker still #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Hoblo Sureshot #{normal}#94 - 120#{italic}# Death by ricochet #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Grave of the Unknown Mason #{normal}#??? - ???#{italic}# In dedication to all those lost building the dungeons of Maj'Eyal #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Albert Deathproof #{normal}#75 - ???#{italic}# Buried alive #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# RIP Legless Jack #{normal}#26 - 98#{italic}# His life's dream was to dance But even dreams must die #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# The Blightbringer #{normal}#14 - 46#{italic}# Do not disturb #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Matthew the Brawler #{normal}#101 - 122#{italic}# Killed in a ring of blood #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Sarusan the Timeraper #{normal}#102 - 87#{italic}# He who wields Time Dies by Time #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Palia the Poacher #{normal}#94 - 118#{italic}# Shown no mercy in the cursed woods #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies the merchant Dalio #{normal}#83 - 121#{italic}# Slain by an assassin's deadly poison #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Here lies Jazak #{normal}#92 - 113#{italic}# He played with the wildest fires And got burnt #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# RIP Gedis the Paladin #{normal}#?? - 118#{italic}# Bright star from foreign lands We weep your fallen light #{normal}#]]} -i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = "gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = [[#{bold}# +i=i+1 newLore{ id = "last-hope-graveyard-"..i, category = "last hope graveyard", name = _t"gravestone", text_color = {r=255,g=255,b=255}, special_ui = "tombstone", always_pop = true, lore = _t[[#{bold}# Foursaw the Clown #{normal}#82 - 114#{italic}# We laughed diff --git a/game/modules/tome/data/lore/maze.lua b/game/modules/tome/data/lore/maze.lua index ddf886f3f5949bf60eb575a2f5d8686cb3042064..1fe6eb346a146be8bea2d0f8ba71a5890228f3eb 100644 --- a/game/modules/tome/data/lore/maze.lua +++ b/game/modules/tome/data/lore/maze.lua @@ -24,8 +24,8 @@ newLore{ id = "maze-note-1", category = "maze", - name = "diary (the maze)", - lore = [[Dear diary, + name = _t"diary (the maze)", + lore = _t[[Dear diary, Lessons are off this week as my tutor has fallen ill, so I've decided to sneak out and have a wander round the old mazed ruins nearby. I know I'll get in trouble if I'm caught, but as long as I'm back in a couple of days no one will notice... Besides, I get so bored cooped up in those mountains! I want some fun! @@ -38,9 +38,9 @@ I remember hearing that this labyrinth used to be a prison used by the halfling newLore{ id = "maze-note-2", category = "maze", - name = "diary (the maze)", + name = _t"diary (the maze)", bloodstains = 7, - lore = [[I'm having so much fun! Probability Travel is making this little trip a breeze. And you should have seen the look on that bandit's face when I came out one wall, disappeared through another, and came around behind him! Hee hee hee... + lore = _t[[I'm having so much fun! Probability Travel is making this little trip a breeze. And you should have seen the look on that bandit's face when I came out one wall, disappeared through another, and came around behind him! Hee hee hee... I still remember Archmage Tarelion's lecture about the spell - "Probability effects can be employed for ease of use, but beware thee of relying on them. With ease of use comes ease of mind and a weakening of one's will and concentration. Soon one will find oneself in a situation of risk, bereft of normal judgement of danger, and low on the mental resources to save onself. Heed thee well." Bah, what tosh!!! How dumb does he really think I am?! @@ -52,8 +52,8 @@ I saw something! I don't know what it was... but it was big and shadowy! But whe newLore{ id = "maze-note-trap", category = "maze", - name = "the perfect killing device", - lore = [[I have now devised the perfect trap for the horned beast that walks these halls! Truly he cannot avoid this amazing contraption - the perfect blend of technical mastery and nature's lethal gifts. Ah, how I look forward to having that monster's head mounted on my walls - it shall be the pride of my collection! + name = _t"the perfect killing device", + lore = _t[[I have now devised the perfect trap for the horned beast that walks these halls! Truly he cannot avoid this amazing contraption - the perfect blend of technical mastery and nature's lethal gifts. Ah, how I look forward to having that monster's head mounted on my walls - it shall be the pride of my collection! The contraption is elegant and simple, though many months I have spent getting the formula perfect. There are two vials attached together - one containing finely ground hemlock, the other containing a carefully prepared zinc compound. When the vials are broken the materials react with the air and pump out an amazing cloud of poisonous vapour! The poison is supremely effective, killing within minutes. All I have to do is carefully hide the vials beneath a thin piece of slate and wait for my prey to step upon the trap - then POOF, it's dead! diff --git a/game/modules/tome/data/lore/misc.lua b/game/modules/tome/data/lore/misc.lua index e1df6967b3f957bbbfd6d46022ed06ac28825632..8e6d90771c2478172f43e96f61e6a6d6180702fe 100644 --- a/game/modules/tome/data/lore/misc.lua +++ b/game/modules/tome/data/lore/misc.lua @@ -24,8 +24,8 @@ newLore{ id = "temple-creation-note-1", category = "temple of creation", - name = "tract of destruction", - lore = [[#{bold}#Tract of Destruction#{normal}# + name = _t"tract of destruction", + lore = _t[[#{bold}#Tract of Destruction#{normal}# Though armies would fall before the Spellblaze's might, though forests were razed and the skies bled red with fire, they always felt that the earth would endure. It seemed eternal, unmoving. Not even the fury of the Spellblaze could hope to destroy it. @@ -37,8 +37,8 @@ The lands of the Nalorën had sunk beneath the waves.]], newLore{ id = "temple-creation-note-2", category = "temple of creation", - name = "tract of anarchy", - lore = [[#{bold}#Tract of Anarchy#{normal}# + name = _t"tract of anarchy", + lore = _t[[#{bold}#Tract of Anarchy#{normal}# For the years following the cataclysm, chaos reigned. Their culture, their way of life, it was as broken and fractured as the land itself. Nalorë civilisation was reduced to a few isolated and feeble settlements, scratching out meagre existences as land, mind and body was warped in both shape and spirit. @@ -50,8 +50,8 @@ The Nalorën received no answer.]], newLore{ id = "temple-creation-note-3", category = "temple of creation", - name = "tract of acceptance", - lore = [[#{bold}#Tract of Acceptance#{normal}# + name = _t"tract of acceptance", + lore = _t[[#{bold}#Tract of Acceptance#{normal}# Betrayed by the Shalorën, wilful and destructive, and the Thalorën, aloof and suspicious, a long, seething silence fell over the remaining Nalorën people. It was during this period of grim introspection that salvation was suddenly and unexpectedly granted. The ancient Sher'Tul magicks, long pondered over by the land's mystics, would bear fruit at last. @@ -61,8 +61,8 @@ The same force that destroyed the Nalorën would save them. Through the Sher'Tul newLore{ id = "temple-creation-note-4", category = "temple of creation", - name = "personal note (Slasul)", - lore = [[At long last, the temple finally reveals its secrets to me, and my plans can be set in motion. Lithe in form, faultless in combat, unmatched in speed both above the waves and beneath... nature couldn't have hoped to create such a race as nagas. With the Temple of Creation now open to me however, we may become so much more. With my guidance, my careful shaping of the Sher'Tul's magicks, under my expert hand our great race shall soon reach its zenith. A new tract shall soon be written: The Tract of the Devourer. + name = _t"personal note (Slasul)", + lore = _t[[At long last, the temple finally reveals its secrets to me, and my plans can be set in motion. Lithe in form, faultless in combat, unmatched in speed both above the waves and beneath... nature couldn't have hoped to create such a race as nagas. With the Temple of Creation now open to me however, we may become so much more. With my guidance, my careful shaping of the Sher'Tul's magicks, under my expert hand our great race shall soon reach its zenith. A new tract shall soon be written: The Tract of the Devourer. ]], } @@ -72,8 +72,8 @@ newLore{ newLore{ id = "adventurer-letter-1", category = "adventures", - name = "letter to Rolf (1)", - lore = [[Dear Rolf, + name = _t"letter to Rolf (1)", + lore = _t[[Dear Rolf, I hope this letter finds you well. I must apologise for this recent dry spell in our communication; my adventures across Maj'Eyal have taken many exciting and perilous turns as of late. What turns do I speak of, you ask? I know how you delight in reading the accounts of my exploits, so I shall waste no further time on this pre-amble. @@ -86,8 +86,8 @@ Weisman]]} newLore{ id = "adventurer-letter-2", category = "adventures", - name = "letter to Weisman (1)", - lore = [[Dear Weisman, + name = _t"letter to Weisman (1)", + lore = _t[[Dear Weisman, Ah! What feelings your last letters inspired within me... primarily mirth, with a good amount of scorn! Must you continuously assail me with tale after tale of your waving of wooden swords and pestering of toothless mongrels? Allow me to recount your "legends" in a much more succinct manner: One day, I failed to kill a dog. Such bravery! Such pluck and derring-do! @@ -99,8 +99,8 @@ Rolf]]} newLore{ id = "adventurer-letter-3", category = "adventures", - name = "letter to Rolf (2)", - lore = [[Dear Rolf the Antslayer, + name = _t"letter to Rolf (2)", + lore = _t[[Dear Rolf the Antslayer, Ha! Such trials you have overcome! Forget dragons and demons, here we have a hero who has survived against ants! I shall deliver this joyous news to Last Hope with all haste - perhaps there shall be a parade in your honour! @@ -113,8 +113,8 @@ Weisman]]} newLore{ id = "adventurer-letter-4", category = "adventures", - name = "letter to Weisman (2)", - lore = [[Dearest Weisman, + name = _t"letter to Weisman (2)", + lore = _t[[Dearest Weisman, Sorry to cut your birdwatching session short, but I must bring this badinage to an end. I have tolerated your ridiculous pomposity and false heroics long enough. At first, I took your over-inflated tales of bothering local wildlife with good humour but now I realise, with dread, that you are sincere; you believe your pathetic wanderings to be the stuff of legend. @@ -125,8 +125,8 @@ Rolf]]} newLore{ id = "adventurer-letter-5", category = "adventures", - name = "letter to Weisman (3)", - lore = [[Weisman, + name = _t"letter to Weisman (3)", + lore = _t[[Weisman, The tentacles. I still remember them. They have lashed into my mind as they lashed into my flesh. How can nature abide such a... a... being in her realm? What dark plane of existence could it have been born from? How can creation itself tolerate such an aberration?! @@ -139,8 +139,8 @@ Rolf]]} newLore{ id = "adventurer-letter-6", category = "adventures", - name = "letter to Rolf (3)", - lore = [[Rolf, + name = _t"letter to Rolf (3)", + lore = _t[[Rolf, I can't remember anything from the fight save the sheer terror at being near something so horrid and powerful. There is no shame in running from a foe you cannot possibly hope to defeat, is there? Maybe ale from the tavern is a good idea, but maybe it is better to conquer your fear once and for all... I hope you can forgive me, but I must defeat this monster, if it takes me the rest of my life. @@ -150,8 +150,8 @@ Weisman.]]} newLore{ id = "adventurer-letter-7", category = "adventures", - name = "letter to Weisman (4)", - lore = [[Weisman, + name = _t"letter to Weisman (4)", + lore = _t[[Weisman, By my ancestors' profits I hope you receive this message in good health and spirits. Please, old friend - there is no need to impress upon me your valour, I know full well how courageous you are. Please, do not go after that... that thing! If I must drag you away physically, that is what I shall do, but I beg of you, please, consider another foe to fight! @@ -161,9 +161,9 @@ Rolf.]]} newLore{ id = "adventurer-letter-8", category = "adventures", - name = "Last Will of Rolf", + name = _t"Last Will of Rolf", bloodstains = 6, - lore = [[Last Will and Testament of Rolf Two-Axes + lore = _t[[Last Will and Testament of Rolf Two-Axes I have failed. Oh by the great wyrm's maw, I have failed! The beast Weisman set out to slay was dead already by another's hand, but its corruption remained still. When I arrived in its chamber, Weisman was already half-gone; he was hacking away at foes only he could see. When I tried to stop him, he turned his axe on me... I am beaten and broken, hiding in some crevasse away from... from my own friend, who through the corruption in this place has been perverted into a monstrosity my axes were unable to fell. I hold no doubt that this is the last time I shall put quill to parchment, as even now I can hear my old friend's perverted voice.. calling to me. I bequeathe my belongings to any who slay ... #{italic}#(the ink blotch seems to indicate Weisman had caught up to his old friend, one-half of that abomination)#{normal}#]]} @@ -175,8 +175,8 @@ I have failed. Oh by the great wyrm's maw, I have failed! The beast Weisman set newLore{ id = "creation-elf", category = "myths of creation", - name = "memories of Artelia Firstborn", - lore = [[#{italic}#This scroll looks ancient, possibly going back millennia, but has been incredibly well-preserved.#{normal}# + name = _t"memories of Artelia Firstborn", + lore = _t[[#{italic}#This scroll looks ancient, possibly going back millennia, but has been incredibly well-preserved.#{normal}# I remember when I first woke, and I drew my first breath, and the fresh young air of the world filled me with vitality. I opened my eyes, and above me stood a figure of outstanding radiance. She was tall and slim, crowned in silver hair that fell to the ground in silken tresses. Her skin was pale to the point of luminance, and her eyes were brighter than the stars. @@ -194,8 +194,8 @@ In all those centuries I still searched for the woman and found no trace. I know newLore{ id = "creation-human", category = "myths of creation", - name = "human myth of creation", - lore = [[At the start of time Sun was born, and Moons, and Eyal raised from the Darkness. + name = _t"human myth of creation", + lore = _t[[At the start of time Sun was born, and Moons, and Eyal raised from the Darkness. And Gerlyk walked Eyal with his three brothers. But one day Gerlyk walked alone and realised he was alone, and he desired company. So Gerlyk took a burning coal, and put stones around it, and wrapped it in earth, and bathed it in water and breathed his breath into it, and it became alive. And Gerlyk named it Human. @@ -214,8 +214,8 @@ But Human did not cry, for the coal in his heart burned hot, and he knew he was newLore{ id = "creation-halfling", category = "myths of creation", - name = "a logical analysis of creation, by philosopher Smythen", - lore = [[Many are the tales of how our world was made, from the absurd to the romantic to the horrific. But they are all mere myths, with no more than seeds of truth to even the most reliable. The history of our race goes back far, but it is tantalisingly scant in details from before we met the other races. Indeed, it is only through our battles with the others that we halflings have any ancient records at all. + name = _t"a logical analysis of creation, by philosopher Smythen", + lore = _t[[Many are the tales of how our world was made, from the absurd to the romantic to the horrific. But they are all mere myths, with no more than seeds of truth to even the most reliable. The history of our race goes back far, but it is tantalisingly scant in details from before we met the other races. Indeed, it is only through our battles with the others that we halflings have any ancient records at all. The elves one would suspect of having the greatest knowledge of elder times, but they are aloof and silent. One must judge from this that either they do not know, or that the truth ashames them. The latter would certainly not surprise me. @@ -237,8 +237,8 @@ So what happened to these gods after they had made the races which we see today? newLore{ id = "moons-human", category = "eyal", - name = "Tale of the Moonsisters", - lore = [[Eyal was raised from Darkness, + name = _t"Tale of the Moonsisters", + lore = _t[[Eyal was raised from Darkness, And One came who made a blinding light called Sun, But Eyal flinched and said, "It is too bright!" So Gerlyk spun Eyal around; thus his face was half-time in light and half-time in shadow, @@ -275,23 +275,23 @@ Aye, and Gerlyk did walk abroad that night, into Darkness beyond, and has ne'er newLore{ id = "ancient-elven-ruins-note-1", category = "ancient elven ruins", - name = "ancient papyrus scroll", - lore = [[Death is nearing. I can feel her chilling breath down the back of my neck. So many of us firstborn have passed on already. I cannot allow it... I will not let myself rot into dirt like the others. I am the mightiest of the Shaloren - I have a right to life! + name = _t"ancient papyrus scroll", + lore = _t[[Death is nearing. I can feel her chilling breath down the back of my neck. So many of us firstborn have passed on already. I cannot allow it... I will not let myself rot into dirt like the others. I am the mightiest of the Shaloren - I have a right to life! ]], } newLore{ id = "ancient-elven-ruins-note-2", category = "ancient elven ruins", - name = "ancient papyrus scroll", - lore = [[Death mocks my experiments. I can preserve the flesh of my servants, tightly wrapped and salted, treated with the correct chemicals. I can animate them, make them shuffle about the empty halls of my mausoleum. But they are but empty shells, devoid of any soul. Is this how my majesty is to end? I demand a greater fate... + name = _t"ancient papyrus scroll", + lore = _t[[Death mocks my experiments. I can preserve the flesh of my servants, tightly wrapped and salted, treated with the correct chemicals. I can animate them, make them shuffle about the empty halls of my mausoleum. But they are but empty shells, devoid of any soul. Is this how my majesty is to end? I demand a greater fate... My days are numbered. Each night that passes saps strength from me. I must find the way to preserve my soul within my flesh. My greatness cannot be allowed to fade.]], } newLore{ id = "ancient-elven-ruins-note-3", category = "ancient elven ruins", - name = "ancient papyrus scroll", - lore = [[Death has met her match. My results are complete, and I am ready to step to the Beyond. I have my sword by my side, and its icy edge will freeze even the dark one in her tracks. My powers cannot be denied... + name = _t"ancient papyrus scroll", + lore = _t[[Death has met her match. My results are complete, and I am ready to step to the Beyond. I have my sword by my side, and its icy edge will freeze even the dark one in her tracks. My powers cannot be denied... Come, Death, try to lay your bony fingers on me! I will vanish before your very eyes and slice you apart! You and your agents are no threat to me. I am immortal!]], } @@ -303,8 +303,8 @@ Come, Death, try to lay your bony fingers on me! I will vanish before your very newLore{ id = "valley-moon-1", category = "valley of the moon", - name = "Rassir's journal part 1", - lore = [[I have come to see the moonstone again. My younger brother Limmir understands a little of my obsession with it, yet the others do not care. I have tried to explain how it is of importance to Aeryn, but she simply asked if she could make a sword from it. Bah! Such stupidity from that grunt fighter. + name = _t"Rassir's journal part 1", + lore = _t[[I have come to see the moonstone again. My younger brother Limmir understands a little of my obsession with it, yet the others do not care. I have tried to explain how it is of importance to Aeryn, but she simply asked if she could make a sword from it. Bah! Such stupidity from that grunt fighter. Our ancestors found their powers from the intense study of the stars, yet the people these days seem only to care about their applications in battle. I know our position with the orcs is grim, but we must not forget our roots in the celestial sphere! Only by sun, moons and stars do we find knowledge and power in life. @@ -315,8 +315,8 @@ Last night I spotted a red star in the early dawn. How very peculiar... Could th newLore{ id = "valley-moon-2", category = "valley of the moon", - name = "Rassir's journal part 2", - lore = [[Oh, what terrible horrors! Demons, clawed creatures, dark smog, clouds of acid, skins of lava! Where did they all come from?! + name = _t"Rassir's journal part 2", + lore = _t[[Oh, what terrible horrors! Demons, clawed creatures, dark smog, clouds of acid, skins of lava! Where did they all come from?! It was when I was studying the moonstone, and as the red star was rising again before the dawn. The stone glowed blood-red and suddenly portals awakened in the rock of the valley. From them poured forth all manner of demonic creatures! I put my ring of invisibility on and fled into the caves. But now the creatures are everywhere! The caves are infested with them, prowling about like hungry animals. @@ -325,8 +325,8 @@ And there is something... something terrible. In the shadows, in the darkness, I newLore{ id = "valley-moon-3", category = "valley of the moon", - name = "Rassir's journal part 3", - lore = [[I fell asleep in a dark hollow, but my sleep was troubled by terrible dreams. The dreams are so vivid in my mind! + name = _t"Rassir's journal part 3", + lore = _t[[I fell asleep in a dark hollow, but my sleep was troubled by terrible dreams. The dreams are so vivid in my mind! I saw the red star, and it became a land of fire floating in the night sky, full of black creatures with yellow eyes and hungry red mouths. And beyond the red star, far beyond was a dim world, but fractured and split all about its surface. As the world spun the split continents crushed against each other, and lava spilled up, and lands sunk into the ground. Demonic mouths screamed up as they disappeared into fiery death. It was if the world was tearing itself apart, but some force of will was desperately trying to keep it held together. @@ -346,8 +346,8 @@ Yes, yes, this is all clearly an illusion! A strange nightmare that I shall wake newLore{ id = "races-0", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Introduction", - lore = [[I set out here to give a full and complete analysis of all the intelligent races in Maj'Eyal. This is an ambitious project to say the least, but it is put together from a great many years labour, including travels across all the kingdoms and direct meetings with many of the highest rulers and most learned sages. I have drawn my findings from common knowledge, exclusive interviews, and studies of many thousands of pages of texts and histories, some going back dozens of centuries. + name = _t"Loremaster Greynot's Analysis of the Races - Introduction", + lore = _t[[I set out here to give a full and complete analysis of all the intelligent races in Maj'Eyal. This is an ambitious project to say the least, but it is put together from a great many years labour, including travels across all the kingdoms and direct meetings with many of the highest rulers and most learned sages. I have drawn my findings from common knowledge, exclusive interviews, and studies of many thousands of pages of texts and histories, some going back dozens of centuries. I myself am a Higher human, in the employ of the court of King Tolak the Fair, but I have done my best to write all accounts from a purely neutral standpoint. I leave it to my peers to judge my success. @@ -368,8 +368,8 @@ Chapter 11 - Dragons newLore{ id = "races-1", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 1 - Humans", - lore = [[I begin my writings with a study of the humans, currently the most populous of the races in Maj'Eyal. The greatest kingdom in number are by far the Cornacs, but mention should also be made of the Sholtar and Mardrop kingdoms, and the Higher bloodline. The biggest human population centre is around the citadel of Last Hope, though many other settlements exist across all corners of Maj'Eyal. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 1 - Humans", + lore = _t[[I begin my writings with a study of the humans, currently the most populous of the races in Maj'Eyal. The greatest kingdom in number are by far the Cornacs, but mention should also be made of the Sholtar and Mardrop kingdoms, and the Higher bloodline. The biggest human population centre is around the citadel of Last Hope, though many other settlements exist across all corners of Maj'Eyal. Cornacs are normally around 5'9", with generally dark hair, brown eyes and ruddy features. Most Cornacs take up roles as tradesmen, farmers, or other manual labour jobs. It is a sad fact that the majority of bandit groups tend to be dominated by Cornacs. Cornac families tend to be large, and since the Age of Dusk their population has expanded rapidly, especially in the farming lands in the west and around Last Hope in the south. @@ -384,8 +384,8 @@ All human kingdoms were united by King Toknor the Brave in the Age of Pyre, and newLore{ id = "races-2", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 2 - Halflings", - lore = [[There are two main kingdoms of halflings, the Eldoral and the Nargol, though both mix often. All halflings are just under 4' tall, and are generally noted for their large feet and curly hair. Eldoral are usually fair-haired and blue-eyed. Nargol tend to be darker in hair and complexion, with hazel eyes, and oft slightly shorter than their cousins. Halflings are known for their intelligence and quick wit, but also their arrogance in dealing with other races - something they do not deny, for they say it is well-deserved. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 2 - Halflings", + lore = _t[[There are two main kingdoms of halflings, the Eldoral and the Nargol, though both mix often. All halflings are just under 4' tall, and are generally noted for their large feet and curly hair. Eldoral are usually fair-haired and blue-eyed. Nargol tend to be darker in hair and complexion, with hazel eyes, and oft slightly shorter than their cousins. Halflings are known for their intelligence and quick wit, but also their arrogance in dealing with other races - something they do not deny, for they say it is well-deserved. Halflings used to be the most dominant race in Maj'Eyal, with control of many strategic Sher'Tul ruins and rule over great swathes of land. The recorded wars between humans and halflings are numerous, and the halflings were the most often victors. However the Age of Pyre brought them great ruin, for the orcs seemed to target them more fiercely than any other race, and many of their communities were wiped out. This has forced them to rely more on trade with other races in modern times, especially with the humans. @@ -399,8 +399,8 @@ The most famous of all halflings is Queen Mirvenia, most famed for her saving of newLore{ id = "races-3", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 3 - Dwarves", - lore = [[The dwarves are an exceptionally secretive and quiet race, reluctant to talk about themselves to outsiders unless hefty bribes are paid. Many times in their history they have cut off all contact with the other races for no known reason, shutting tight the great iron doors that cover the trade passages to their mines and their cavernous cities. However of late they have become more open with the outside world, and I have even had the pleasure of receiving the unique distinction of being allowed to enter their main city, the Iron Throne, and speaking with several of their guild leaders. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 3 - Dwarves", + lore = _t[[The dwarves are an exceptionally secretive and quiet race, reluctant to talk about themselves to outsiders unless hefty bribes are paid. Many times in their history they have cut off all contact with the other races for no known reason, shutting tight the great iron doors that cover the trade passages to their mines and their cavernous cities. However of late they have become more open with the outside world, and I have even had the pleasure of receiving the unique distinction of being allowed to enter their main city, the Iron Throne, and speaking with several of their guild leaders. Dwarves are around 5' tall, with generally brown or grey hair. They are usually stocky and muscular, and known to be very resistant to any physical suffering. Their females can be hard to distinguish from their males, but can usually be identified by the beads braided into their beards. All dwarves are highly proud of their beards, and take immaculate care of them. The greatest insult to a dwarf is to belittle his beard, and the greatest sign of suffering in a dwarf is for him to tear at his beard. @@ -413,8 +413,8 @@ As well as the many merchant dwarves one may meet there are also a great deal of newLore{ id = "races-4", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 4 - Shaloren", - lore = [[Though the elven races look very similar in appearance, they are extremely distinct in history, culture, mindset and many subtle physical traits, so I shall write of each of them separately. All elves are marked by their long, pointed ears and high cheek-bones, but other features can vary greatly. It should be noted that they call themselves as a whole "Elore", which means "siblings", yet the interactions between these brothers and sisters are oft strained. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 4 - Shaloren", + lore = _t[[Though the elven races look very similar in appearance, they are extremely distinct in history, culture, mindset and many subtle physical traits, so I shall write of each of them separately. All elves are marked by their long, pointed ears and high cheek-bones, but other features can vary greatly. It should be noted that they call themselves as a whole "Elore", which means "siblings", yet the interactions between these brothers and sisters are oft strained. Shaloren (or Shalore - lit "siblings of grace") are on average 6'2", with bright hair and blue or purple eyes. They are usually slim and lightly built, more marked for their mental prowess than their physical strengths. They are however known to be extremely swift of movement and light of foot. But of particular note is their magical affinity, which is far stronger than any other race, and their intense powers of will. @@ -427,8 +427,8 @@ They deal with other races seldom, preferring to keep a low profile, and most of newLore{ id = "races-5", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 5 - Thaloren", - lore = [[The Thaloren (or Thalore - lit "siblings of wrath") are on average 6'4", with dark brown hair and hazel or green eyes. They are generally of muscular build, and known for their physical prowess. They are renowned to be of a fey mindset - as quick to furious violence as they are to joyous song. Their relations with the Shaloren are particularly strained, as they strongly oppose their brethren's use of magic. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 5 - Thaloren", + lore = _t[[The Thaloren (or Thalore - lit "siblings of wrath") are on average 6'4", with dark brown hair and hazel or green eyes. They are generally of muscular build, and known for their physical prowess. They are renowned to be of a fey mindset - as quick to furious violence as they are to joyous song. Their relations with the Shaloren are particularly strained, as they strongly oppose their brethren's use of magic. Their capital city is Shatur, hidden deep within the northern woods, and they are loathe to let any outsiders even approach the surrounding forest. Archers and fighters carefully patrol their borders, ready to rain down death from the trees on any who encroach. Their leader is Queen Nessilla Tantaelen, and they are said to live in extensive dwellings carved into giant trees, but little else is known about their society. @@ -439,8 +439,8 @@ The Thaloren do business very rarely with the outside world, but when they do it newLore{ id = "races-6", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 6 - Naloren (extinct)", - lore = [[The Naloren (or Nalore - lit "siblings of spirit") are now an extinct race, as their homeland was swept into the sea by the Cataclysm. However as a separate elf race they are worth studying, scant though the records be. Much of what is now said about the Naloren is traced with myth, but one can deduce certain facts. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 6 - Naloren (extinct)", + lore = _t[[The Naloren (or Nalore - lit "siblings of spirit") are now an extinct race, as their homeland was swept into the sea by the Cataclysm. However as a separate elf race they are worth studying, scant though the records be. Much of what is now said about the Naloren is traced with myth, but one can deduce certain facts. Naloren elves were around 5'10", with blonde hair and green eyes. They were incredibly thin, but known for their swift and dextrous capabilities. Their kingdom was located on the eastern side of Maj'Eyal, and all of their towns were on the sea or straddling major rivers. They employed themselves as fishermen, sponge-divers, sailors and musicians. They were renowned for being able to stay underwater for hours at a time, and those with arcane abilities were said to be able to stay submerged indefinitely. @@ -451,8 +451,8 @@ Alas their love of the sea was to be their undoing. When the Cataclysm came the newLore{ id = "races-ogre", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 7 - Ogres", - lore = [[Ogres have never been a thriving race, starting from their abrupt appearance as soldiers and laborers for the Conclave during the Allure Wars (unexplained aside from a highly implausible story from the Conclave's Overseers about a lost mountain tribe). Left without homes or proper runic training after the war's end, they were forced to found their own tribes and rediscover the fields of rune and infusion creation for themselves, and though their numbers dropped rapidly, they enjoyed a brief period of relative success as nomadic rune-traders, virtually unaffected by the Spellblaze. The Spellhunt nearly proved to be their undoing, as their monstrous size and rune-covered skin made them popular targets; they were thought to be extinct, and only in recent years has the city of Elvala revealed that some Ogres took refuge there during this time. Their descendants still live today, fearful of persecution but gradually beginning to explore outside Elvala for the first time in ages. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 7 - Ogres", + lore = _t[[Ogres have never been a thriving race, starting from their abrupt appearance as soldiers and laborers for the Conclave during the Allure Wars (unexplained aside from a highly implausible story from the Conclave's Overseers about a lost mountain tribe). Left without homes or proper runic training after the war's end, they were forced to found their own tribes and rediscover the fields of rune and infusion creation for themselves, and though their numbers dropped rapidly, they enjoyed a brief period of relative success as nomadic rune-traders, virtually unaffected by the Spellblaze. The Spellhunt nearly proved to be their undoing, as their monstrous size and rune-covered skin made them popular targets; they were thought to be extinct, and only in recent years has the city of Elvala revealed that some Ogres took refuge there during this time. Their descendants still live today, fearful of persecution but gradually beginning to explore outside Elvala for the first time in ages. Ogres' most striking feature is their size, by far the largest of any intelligent race; they average at roughly 8'4" tall, and most are nearly half as wide with muscle. They have a similar range of skin tones to humans, although slightly grayer on the whole; their hair tends to be dark brown or black, and their eyes run the gamut from black to bright blue to purple, presumably a side-effect of runic mis-transcription. Their angular facial features invite some impolite comparisons to Orcs, with strong jawlines, disproportionately large mouths and teeth, and squarish heads, but otherwise resemble those of humans. It would be remiss of me to describe Ogres' appearance without mentioning the intricate, glowing pattern of runes covering their skin from head to toe, although the exact patterns and colors vary. @@ -465,8 +465,8 @@ Due to the safety and comfort of Elvala, and their mistrust of much of the outsi newLore{ id = "races-7", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 8 - Orcs (extinct)", - lore = [[The orcs are, joyfully, extinct from Maj'Eyal, following the purge instigated by King Toknor the Brave at the start of the Age of Ascendancy. But an academic study of their previous culture and civilisation is still of interest, primitive though it may have been. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 8 - Orcs (extinct)", + lore = _t[[The orcs are, joyfully, extinct from Maj'Eyal, following the purge instigated by King Toknor the Brave at the start of the Age of Ascendancy. But an academic study of their previous culture and civilisation is still of interest, primitive though it may have been. Orcs were generally around 6'1", with green or black skin. They varied greatly in physical appearance and build, most likely due to their exceptionally fast breeding rates. The majority of orcs were thick-built and heavily muscled, well remembered as the stock grunts of their terrible armies. However in the Age of Pyre a greater number of thinner, stringier orcs appeared, oft versed in destructive magics. @@ -479,8 +479,8 @@ There have been no substantiated reports of orcs for over 100 years. What report newLore{ id = "races-8", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 9 - Sher'Tul (extinct)", - lore = [[Ah, the legendary Sher'Tul! How any scholar does love to write about them. Indeed, the texts are many, but the facts are few, as so little is known about this crucible race. The most learned and factual academic on the subject is the renowned explorer and archaeologist Darwood Oakton, but he has alas been missing for several months at the time of writing. I will attempt to summarise here some of his key discoveries. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 9 - Sher'Tul (extinct)", + lore = _t[[Ah, the legendary Sher'Tul! How any scholar does love to write about them. Indeed, the texts are many, but the facts are few, as so little is known about this crucible race. The most learned and factual academic on the subject is the renowned explorer and archaeologist Darwood Oakton, but he has alas been missing for several months at the time of writing. I will attempt to summarise here some of his key discoveries. The Sher'Tul lived over ten thousand years ago, during what is referred to as the Age of Haze. The name of the race we know from the elves, who speak of the ancient beings with awe and reverence, yet know little else about them. Ruins of fantastical Sher'Tul structures have been found all across Maj'Eyal, and some have been observed in sunken lands off the coasts, implying that in their time the Sher'Tul must have ruled unopposed all across the world. @@ -493,8 +493,8 @@ What caused them to become extinct is unknown, though many theories abound. The newLore{ id = "races-9", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 10 - Monstrous Races", - lore = [[No text would be complete without at least a brief note of some of the more brutish races which infest our world. These do not hold any civilised society of note, nor in general do they seem capable of any form of higher thought or culture, but they are still of interest to study for any who take delight in analysing beings of more primitive intellect. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 10 - Monstrous Races", + lore = _t[[No text would be complete without at least a brief note of some of the more brutish races which infest our world. These do not hold any civilised society of note, nor in general do they seem capable of any form of higher thought or culture, but they are still of interest to study for any who take delight in analysing beings of more primitive intellect. Trolls come in two main types - Kezrak and Moltep, or stone and forest trolls as they are colloquially known. Stone trolls infest many mountain chains to the north-east, and some have been known to wander further afield in search of food or to spread violence. They are generally over 8' high, with extremely pronounced muscular strength and a thick, solid hide which bears the appearance of coal or granite. Forest trolls are generally found in dense woods or swamps, with the Trollmire east of Derth being especially infamous. They have a more advanced form of speech than their mountain-dwelling cousins, and are known to move faster and wield more elaborate weapons, though their greenish hide is not as thick and their musculature less developed. All trolls have intensely fast metabolisms, capable of healing from grievous wounds within a matter of hours. At birth they measure just eight inches long, but within two years grow to full maturity, and rarely live beyond ten years old. They used to be considered little more than beasts, but towards the end of the Age of Pyre many were trained as fighters by the orcs, and were even taught the basics of language and certain battle tactics, making them much more dangerous. Though the orcs are gone their servants remain, and their remote breeding areas and intense birth rates have so far scampered attempts to eradicate them completely. @@ -507,8 +507,8 @@ The origin of Demons is not wholly known, but it is clear that they are capable newLore{ id = "races-10", category = "races", - name = "Loremaster Greynot's Analysis of the Races - Chapter 11 - Dragons", - lore = [[The common man may scoff at the idea of classifying dragons as an intelligent race, but experienced wyrmics know otherwise. Dragons are incredibly long-lived creatures, with some known to survive for thousands of years. Though in their early life they are of a bestial nature, as they advance through the centuries they gain an ever keener and more developed intellect. The eldest of wyrms are sometimes considered the most subtle and intelligent of creatures in Maj'Eyal, capable of telepathic communication and advanced mental abilities, and wyrmics speak of them with the highest reverence. + name = _t"Loremaster Greynot's Analysis of the Races - Chapter 11 - Dragons", + lore = _t[[The common man may scoff at the idea of classifying dragons as an intelligent race, but experienced wyrmics know otherwise. Dragons are incredibly long-lived creatures, with some known to survive for thousands of years. Though in their early life they are of a bestial nature, as they advance through the centuries they gain an ever keener and more developed intellect. The eldest of wyrms are sometimes considered the most subtle and intelligent of creatures in Maj'Eyal, capable of telepathic communication and advanced mental abilities, and wyrmics speak of them with the highest reverence. Dragons come in many shapes and sizes, normally growing from 5' long hatchlings to 20' long mature drakes, with some of the greatest wyrms growing to over 40' in length. They are generally winged, with large lizard-like maws and sharp talons on both their fore and hind legs. They are often noted for the lustrous colour of their scales, normally representing an attunement to one of the key Elements of Eyal. This attunement is unseen in any other race, and some philosophers believe that dragons predate all other races, being formed as raw representations of the elements of nature at the beginning of the world. However this theory may be borne purely from the fanatical delusions of certain wyrmics who have studied the creatures for too long. @@ -526,8 +526,8 @@ Dragons are regularly hunted for their thick scales and their elementally imbued newLore{ id = "thaloren-lament", category = "shatur", - name = "Lament for Lands now Lost", always_pop = true, - lore = [[You see a moss covered statue of a Thalore reciting a poem, over and over. + name = _t"Lament for Lands now Lost", always_pop = true, + lore = _t[[You see a moss covered statue of a Thalore reciting a poem, over and over. #{italic}#"Where bright and berried yews did stand, Where the eldest oaks grew so grand, Where singing birds once flew to land, @@ -547,8 +547,8 @@ Gone is trust, wrath is red.#{normal}# newLore{ id = "eden-guile", category = "artifacts", - name = "Running man", - lore = [[Running man, running man + name = _t"Running man", + lore = _t[[Running man, running man Your time is ending soon Running man, running man Will not save sun nor moons @@ -566,8 +566,8 @@ Your honour or your shoes!]] } newLore{ id = "channelers-set", category = "artifacts", - name = "Gifts of Nature", - lore = [[In Age of Allure rose an archmage high + name = _t"Gifts of Nature", + lore = _t[[In Age of Allure rose an archmage high With power beyond compare And the people poor would not come nigh His dark and terrible lair @@ -620,8 +620,8 @@ Now to Nature you are dust"]] } newLore{ id = "dreamscape-entry", category = "dreamscape", - name = "If I Should Die Before I Wake", - lore = [[You wake suddenly from your unexpected slumber and attempt to quickly regain your bearings. However, you are not prepared for the bizarre vision that greets you: instead of land and sky you see only amorphous shapes and varying degrees of light. A strange psychedelic haze permeates the air and otherworldly colors and shadows flicker in and out of your peripheral vision. + name = _t"If I Should Die Before I Wake", + lore = _t[[You wake suddenly from your unexpected slumber and attempt to quickly regain your bearings. However, you are not prepared for the bizarre vision that greets you: instead of land and sky you see only amorphous shapes and varying degrees of light. A strange psychedelic haze permeates the air and otherworldly colors and shadows flicker in and out of your peripheral vision. As you begin to come to grips with this strange environment, you realize with horror that you cannot move! Your body feels as if it is completely without weight and try as you may you cannot budge an inch. You experience a sense of Déjà Vu as you recall past nightmares of being paralyzed. That's when it strikes you: you never woke up at all, you're still asleep! This epiphany is only reinforced when you notice a strange phenomenon: mirror copies of yourself are being slowly projected from where you stand and are moving about of their own volition. They all seem to be focused on something in particular, but what? Just as soon as you set your mind to discerning what your dreamselves are focusing on, you feel it. With horror, you realize that you are not alone here. Somehow, your foe has invaded your very subconcious and is attacking you in your dreams. Still unable to move, your lucid mind races on how to handle such an insane and horrible situation. On a whim you concentrate on one of your projections and you find that you can control it. @@ -632,8 +632,8 @@ Free now to face this nightmare, you turn to find your foe. While you have a sen newLore{ id = "loot-vault-empty", always_pop = true, category = "vault", - name = "Mocking Note", - lore = [[Dear graverobber, + name = _t"Mocking Note", + lore = _t[[Dear graverobber, Try to be a little faster next time. @@ -643,9 +643,9 @@ Love, #{italic}#Eden#{normal}#]] newLore{ id = "nature-vs-magic", category = "magic", - name = "Nature vs Magic", + name = _t"Nature vs Magic", always_pop = true, - lore = [[Your arcane abilities have been interfered with! + lore = _t[[Your arcane abilities have been interfered with! Eyal is a torn world, and the forces of nature can react strongly to the arcane energies that seek to manipulate them. Some items and areas are imbued with anti-magic, a natural energy that disrupts magical abilities and effects. There are even those who have learned to harness anti-magic into their own wild abilities, and who use them to hunt down and destroy those who practise magic. So beware, caster! It is a hostile world ye wander in.]], } @@ -653,8 +653,8 @@ Eyal is a torn world, and the forces of nature can react strongly to the arcane newLore{ id = "kestin-highfin-adventuring-notes", category = "highfin", - name = "On Adventuring", - lore = [[I must say, as time grows, I feel so do I grow more and more inclined to distance myself from the calling of an 'adventurer', like so many you can find roaming the countryside. I feel like the myth of a wandering hero has blinded too many with promise of easy fame and riches, with no eye for the other kind of fortune. + name = _t"On Adventuring", + lore = _t[[I must say, as time grows, I feel so do I grow more and more inclined to distance myself from the calling of an 'adventurer', like so many you can find roaming the countryside. I feel like the myth of a wandering hero has blinded too many with promise of easy fame and riches, with no eye for the other kind of fortune. Hear me out on this. @@ -672,8 +672,8 @@ It is important to remember, that every artifact has a meaning, beings of great newLore{ id = "galsame-orientation-notes", category = "point zero", - name = "Warden-Master Galsamae's Orientation Notes", - lore = [[Congratulations, sir and/or madam. Whether by invitation, discovering it on your own, or simply being enough of a thorn in our side to recruit rather than dispose of, you have gained the secrets of chronomancy. The ultimate power of time - the ability to reset and try again if you fail, the ability to save time by seeing the results of investigations before they happen. Though our powers are bound to post-Spellblaze Eyal, they are those of nigh-omnipotence with enough patience. + name = _t"Warden-Master Galsamae's Orientation Notes", + lore = _t[[Congratulations, sir and/or madam. Whether by invitation, discovering it on your own, or simply being enough of a thorn in our side to recruit rather than dispose of, you have gained the secrets of chronomancy. The ultimate power of time - the ability to reset and try again if you fail, the ability to save time by seeing the results of investigations before they happen. Though our powers are bound to post-Spellblaze Eyal, they are those of nigh-omnipotence with enough patience. But trust me - "enough patience" is one nasty limiting reagent. You're going to be running out of that fast when you've spent the last week trying to dismantle an Age of Dusk-era house-of-cards system of causally interdependent tyrannies without causing dwarven extinction, and a plague just broke out right when you had things almost perfect, for the sixth time-- @@ -693,8 +693,8 @@ PS: You might encounter a... benefactor of sorts in your travels. You'll know it newLore{ id = "shiiak-mantra", category = "spydrë", - name = "Mantra of a Shiiak", - lore = [[Each morning I wake, happy I'm alive; + name = _t"Mantra of a Shiiak", + lore = _t[[Each morning I wake, happy I'm alive; the traps of this tomb won't claim me today. Though its curse of hunger eats at my insides, I curse it one better by having outstayed. @@ -720,8 +720,8 @@ they've done what they could but Spydrë is [b]ours.[/b] ]] newLore{ id = "zquikzshl", category = "boss", - name = "Z'quikzshl", - lore = [[#{italic}#(The handwriting of this diary entry is poor at best. Whoever wrote this was in poor health.) + name = _t"Z'quikzshl", + lore = _t[[#{italic}#(The handwriting of this diary entry is poor at best. Whoever wrote this was in poor health.) #{bold}#53rd Allure, Year 603 of the Age of Pyre#{normal}# @@ -736,8 +736,8 @@ Oh, look. He is trying to harm me with spells, but all he can manage is a corrup newLore{ id = "walrog", category = "boss", - name = "Walrog", - lore = [[Dirge of the Naloren + name = _t"Walrog", + lore = _t[[Dirge of the Naloren There once was a village the Nalore held dear, diff --git a/game/modules/tome/data/lore/noxious-caldera.lua b/game/modules/tome/data/lore/noxious-caldera.lua index 40f2cba3749a33f11112457bee89e8461b32ebaf..c0f1e7da001b57cb09eec247cc6f79a895d264da 100644 --- a/game/modules/tome/data/lore/noxious-caldera.lua +++ b/game/modules/tome/data/lore/noxious-caldera.lua @@ -24,8 +24,8 @@ newLore{ id = "noxious-caldera-note-1", category = "dogroth caldera", - name = "tattered paper scrap", - lore = [[What wending path brought me to this place? I know not. The mists have obscured all passage, all trail. I see but the enclosing dominance of the caldera ahead. The ashen cauldron of steam lures me, yet repels me. I feel there is a force here trying to sway my thoughts. + name = _t"tattered paper scrap", + lore = _t[[What wending path brought me to this place? I know not. The mists have obscured all passage, all trail. I see but the enclosing dominance of the caldera ahead. The ashen cauldron of steam lures me, yet repels me. I feel there is a force here trying to sway my thoughts. Where are the rest of my party? Have my friends abandoned me?]], } @@ -33,8 +33,8 @@ Where are the rest of my party? Have my friends abandoned me?]], newLore{ id = "noxious-caldera-note-2", category = "dogroth caldera", - name = "tattered paper scrap", - lore = [[I fell into a trance, I know not how. Were it the rich blossoms or the oppressive heat? I swooned into the grass and the mists swirled over my face, playing out fantastic shapes before my eyes. Dancing ladies strode across the skies, and a row of dwarves stood laughing as their beards flew into the wind. Then I felt a Shadow near, and the ladies scattered and the dwarves in terror screamed, their mouths yowling and spilling black petals. I tried to move, but I couldn't, and frozen in fear I saw the Shadow above me, looking down upon my countenance. It grunted and lurched away. I passed out then, and have just recovered. + name = _t"tattered paper scrap", + lore = _t[[I fell into a trance, I know not how. Were it the rich blossoms or the oppressive heat? I swooned into the grass and the mists swirled over my face, playing out fantastic shapes before my eyes. Dancing ladies strode across the skies, and a row of dwarves stood laughing as their beards flew into the wind. Then I felt a Shadow near, and the ladies scattered and the dwarves in terror screamed, their mouths yowling and spilling black petals. I tried to move, but I couldn't, and frozen in fear I saw the Shadow above me, looking down upon my countenance. It grunted and lurched away. I passed out then, and have just recovered. I am not sure what to make of this. I wish to leave, but I do not know the way. Only by escaping this mist shall I have a clear view of the land. Yet each path seems to wind unexpected, each step takes me closer to the centre, not further. I must make haste from this place. ]], @@ -43,8 +43,8 @@ I am not sure what to make of this. I wish to leave, but I do not know the way. newLore{ id = "noxious-caldera-note-3", category = "dogroth caldera", - name = "tattered paper scrap", - lore = [[I have found a body, a fellow Thaloren by the looks of things. Her face was contorted in horror, her limbs twisted into painful shapes. Yet there was no blood, and I see not how she were felled. Was it the Shadow? I have buried her as best I could. + name = _t"tattered paper scrap", + lore = _t[[I have found a body, a fellow Thaloren by the looks of things. Her face was contorted in horror, her limbs twisted into painful shapes. Yet there was no blood, and I see not how she were felled. Was it the Shadow? I have buried her as best I could. There are strange things in this land, and I am afeared. I saw a large ant earlier, and when I tried to stomp it underfoot it screamed at me, and called me names. I crushed it, and its eyes went red and burst, and it let out a shrill death cry that still echoes round my skull, scattering my thoughts. @@ -54,8 +54,8 @@ My head aches, and with each pounding the earth visibly shakes beneath my feet. newLore{ id = "noxious-caldera-note-4", category = "dogroth caldera", - name = "tattered paper scrap", - lore = [[Another body, if one could call it that. Mangled remains strewn about a rocky outcrop, of whom I know not. Only the armour and weapon give tell that it were once an intelligent race. The breastplate still polished and undented, the axe still clean and un-notched, yet the flesh ripped apart like shredded paper. What could do this?! + name = _t"tattered paper scrap", + lore = _t[[Another body, if one could call it that. Mangled remains strewn about a rocky outcrop, of whom I know not. Only the armour and weapon give tell that it were once an intelligent race. The breastplate still polished and undented, the axe still clean and un-notched, yet the flesh ripped apart like shredded paper. What could do this?! I did not even attempt to bury the remains. I ran, and as frightful thoughts filled my head the sky turned red and the earth turned black, and spiders appeared with morphing faces. They laughed at me and spun their webs. I tore through them, the strands sticking to my fingers, mucousy remnants dripping over my skin. A surge of revulsion pulsed through me and suddenly the webs evaporated and the spiders coalesced into a giant face, its mouth a red flower. I reached into the midst of the crimson petals and it exploded in a wet mess, blinding all sight and thought. @@ -65,8 +65,8 @@ I woke up with my flesh drenched in blood. Or is it blood? Is it my flesh? The g newLore{ id = "noxious-caldera-note-5", category = "dogroth caldera", - name = "tattered paper scrap", - lore = [[Broken land and broken thoughts. If I think clearly the land runs smooth. But my thoughts are not clear. I think. + name = _t"tattered paper scrap", + lore = _t[[Broken land and broken thoughts. If I think clearly the land runs smooth. But my thoughts are not clear. I think. I am here and here is me, a reflection of my will. Is it my will any more? Perhaps I am the reflection, my actions inspired by the mists about me. diff --git a/game/modules/tome/data/lore/old-forest.lua b/game/modules/tome/data/lore/old-forest.lua index 47b1b32feb614019b2bb3510bbb2aa769101d0b5..cb2196643ae50168fbf3246ed24d6e74011e5a34 100644 --- a/game/modules/tome/data/lore/old-forest.lua +++ b/game/modules/tome/data/lore/old-forest.lua @@ -24,8 +24,8 @@ newLore{ id = "old-forest-note-1", category = "old forest", - name = "journal entry (old forest)", - lore = [[#{italic}#From the notes of Darwood Oakton, explorer: + name = _t"journal entry (old forest)", + lore = _t[[#{italic}#From the notes of Darwood Oakton, explorer: #{bold}#CHAPTER ONE: THE SHER'TUL #{normal}#The Sher'Tul. Who were they? Where did they come from? Where did they go? The mysteries surrounding this ancient race are almost infinite. What little scraps of information we have regarding them allude to a mighty and world-spanning civilisation, wielding power and magic unthinkable. Now, however, all that remains of them are forgotten, wind-swept ruins, the tiniest minutiae of their technology sealed away in the studies of reclusive sages. Does their mystery not call to your curious nature as it does mine, gentle reader? @@ -38,8 +38,8 @@ Rumours are growing of trees roaming in its depths, moving as you or I would. So newLore{ id = "old-forest-note-2", category = "old forest", - name = "journal entry (old forest)", - lore = [[#{italic}#From the notes of Darwood Oakton, explorer: + name = _t"journal entry (old forest)", + lore = _t[[#{italic}#From the notes of Darwood Oakton, explorer: #{bold}#CHAPTER TWO: ANCIENT RUINS #{normal}#My inquiries have paid off! It took much searching, and even more arm-twisting and cajoling once I had found my man, but a local lumberjack who plies his trade in the old forest has divulged to me an amazing secret! He speaks of ruins within the forest, a location where the living trees seem to congregate in larger numbers. He would not speak much of the place, and seemed to believe it cursed, but I did manage to squeeze out of him the appearance of the ruins, submerged in the middle of the great lake. There is no longer any doubt in my mind now: They belonged to the Sher'Tul!]], @@ -48,8 +48,8 @@ newLore{ newLore{ id = "old-forest-note-3", category = "old forest", - name = "journal entry (old forest)", - lore = [[#{italic}#From the notes of Darwood Oakton, explorer: + name = _t"journal entry (old forest)", + lore = _t[[#{italic}#From the notes of Darwood Oakton, explorer: #{bold}#CHAPTER THREE: DISASTER! #{normal}#Does my title not tell you enough? Disaster, and again disaster! True enough, these Sher'Tul ruins exist... several hundred feet at the bottom of a mighty lake! The lake of Nur, one of the largest in the old forest, has swallowed up the ruins in its murky depths. I am hardly a strong swimmer, gentle reader, but even if I could swim like a naga-spawned beast I could not hope to explore the ruin's sunken expanses before drowning. I fear I must abandon my present expedition... the trees are paying closer attention to me, and I do not believe it is of the pleasant sort...]], @@ -58,8 +58,8 @@ newLore{ newLore{ id = "old-forest-note-4", category = "old forest", - name = "journal entry (old forest)", - lore = [[#{italic}#From the notes of Darwood Oakton, explorer: + name = _t"journal entry (old forest)", + lore = _t[[#{italic}#From the notes of Darwood Oakton, explorer: #{bold}#CHAPTER FOUR: NEEDS MUST... #{normal}#Before I continue, I must make one thing clear: I am no great friend to the mages. Some powers simply were not meant for mortal hands or minds. As history has taught us time and again, from the sudden disappearance of the Sher'Tul to the Spellblaze and the plagues it brought in its wake, magic is wont to cause more harm than good. But I fear it is a necessity for my current task. During my stay in Derth a fellow traveller and I have become fast friends, often drinking together in the local tavern. I can't put my finger on it, but I believe him to be a mage; he has an unexplainable feeling of power surrounding him, not to mention a rather ostentatious hat. I wonder what his thoughts would be on the art of water-breathing...?]], @@ -68,9 +68,9 @@ newLore{ newLore{ id = "old-forest-note-5", category = "old forest", - name = "journal entry (old forest)", + name = _t"journal entry (old forest)", bloodstains = 12, - lore = [[#{italic}#From the notes of Darwood Oakton, explorer: + lore = _t[[#{italic}#From the notes of Darwood Oakton, explorer: #{bold}#CHAPTER FIVE: HORR... #{italic}#This note seems hastily written and stained with water and blood. @@ -99,7 +99,7 @@ If any come after, I bid you turn ... horrors ... too much. If you are foolish e newLore{ id = "lake-nur-not-flooded", category = "lake of nur", - name = "magical barrier", always_pop = true, + name = _t"magical barrier", always_pop = true, image = "nur-barrier.png", - lore = [[As you descend to the next level you traverse a kind of magical barrier keeping the water away. You hear terrible screams.]], + lore = _t[[As you descend to the next level you traverse a kind of magical barrier keeping the water away. You hear terrible screams.]], } diff --git a/game/modules/tome/data/lore/orc-prides.lua b/game/modules/tome/data/lore/orc-prides.lua index b7bd59ac24c6fb15f2cf6e4d9fac3ca433f02add..3e6d3ab4b43e27255967d2907ed703d4e0107c56 100644 --- a/game/modules/tome/data/lore/orc-prides.lua +++ b/game/modules/tome/data/lore/orc-prides.lua @@ -23,8 +23,8 @@ newLore{ id = "grushnak-pride-note", category = "orc prides", - name = "Grushnak's Note", - lore = [[Treachery! During a patrol around the outskirts of the High Peak I witnessed two orcs - the envoys from our supposed "master" - talking in secret. Remaining to watch them, I beheld as their orcish features sloughed from their bodies, revealing a pair of human wizards! Humans! To think that our great pride has been deceived in such a manner! I should have crushed their skulls there and then. However, mages can be crafty, so I left them to their scheming. + name = _t"Grushnak's Note", + lore = _t[[Treachery! During a patrol around the outskirts of the High Peak I witnessed two orcs - the envoys from our supposed "master" - talking in secret. Remaining to watch them, I beheld as their orcish features sloughed from their bodies, revealing a pair of human wizards! Humans! To think that our great pride has been deceived in such a manner! I should have crushed their skulls there and then. However, mages can be crafty, so I left them to their scheming. Even now the blood runs hot! What would Garkul, our mighty berserker king, think if he saw our great race bending before humans?! Many times I have entertained the idea of taking a group of my finest warriors and ending this folly, but... loathsome as it is, I must use tact. A rebellion would leave my pride weakened, easy prey. That bone-picker Rak'Shor and his unnatural creations have dreamed of my death (and subsequent dominion) for years, I know this to be true. This conundrum frustrates and confuses! ... At least we are agreed on one matter - the total destruction of those sun-worshipping dogs of the Gates of Morning...]], } @@ -32,8 +32,8 @@ Even now the blood runs hot! What would Garkul, our mighty berserker king, think newLore{ id = "rak-shor-pride-note", category = "orc prides", - name = "Rak'Shor's Note", - lore = [[The eyes of the dead bring interesting news to me. Our masters are not what they appear; they are human, simply masquerading as orcs in our presence. I might have suspected this... it is difficult to disguise the basic weakness and frailty of a human soul, even with complex spells. Their goals elude me, yet I sense strange energies in the vicinity of the High Peak - the voices of spirits long departed from this world... some not from this world at all. + name = _t"Rak'Shor's Note", + lore = _t[[The eyes of the dead bring interesting news to me. Our masters are not what they appear; they are human, simply masquerading as orcs in our presence. I might have suspected this... it is difficult to disguise the basic weakness and frailty of a human soul, even with complex spells. Their goals elude me, yet I sense strange energies in the vicinity of the High Peak - the voices of spirits long departed from this world... some not from this world at all. But this is foolishness compared to my current trials. Gorbat remains as obstinate as ever, the dragon-loving, scale-shining buffoon. He thinks that dragons are special, different, not suitable for my craft. I care not for his prattling, I desire the corpses of dragons! Mountains of them! How can his heart not beat a little faster at the prospect of a dracozombie?! The mere thought of it is enough to send delightful shivers down my spine...]], } @@ -41,8 +41,8 @@ But this is foolishness compared to my current trials. Gorbat remains as obstina newLore{ id = "gorbat-pride-note", category = "orc prides", - name = "Gorbat's Note", - lore = [[My dragons bring news. They witnessed humans upon the High Peak, speaking of their mastery over our prides. They did not heed my dragons, unwitting of their ability to communicate with me. Now I possess this information, I must think deeply on how to proceed regarding our "masters". Many of my finest wyrmics wish to rise up against our deceivers, see them consumed in wyrmfire. Even some of my dragons have divulged this wish to me. Sadly, this must wait. + name = _t"Gorbat's Note", + lore = _t[[My dragons bring news. They witnessed humans upon the High Peak, speaking of their mastery over our prides. They did not heed my dragons, unwitting of their ability to communicate with me. Now I possess this information, I must think deeply on how to proceed regarding our "masters". Many of my finest wyrmics wish to rise up against our deceivers, see them consumed in wyrmfire. Even some of my dragons have divulged this wish to me. Sadly, this must wait. Vor's insolence will be tolerated no longer! His claims that his pride's mastery over the elements surpasses that of the dragons is insult enough, but this...! Some of my finest dragons, my glorious multi-hued wyrms, have been captured and held within their armouries in the hopes that they can further their twisted mockeries of fire and ice! This will not stand! I must ignore the plots of our human deceivers for the moment, for Vor requires my full attention.]], } @@ -50,8 +50,8 @@ Vor's insolence will be tolerated no longer! His claims that his pride's mastery newLore{ id = "vor-pride-note", category = "orc prides", - name = "Vor's Note", - lore = [[Strange lights play atop the High Peak. Torches? Nay. The fire of dragons? Not so. A volcanic eruption, perchance? Alas, no. It is unmistakably the fire of the arcane, the fire of mages, and seeing as every pyromancer within our pride is under my dominion, I can only assume that these lights come from one not affiliated with us. The lights are fascinating, I wish to study them; they put me in mind of the fires of the Spellblaze, burning so very long ago... + name = _t"Vor's Note", + lore = _t[[Strange lights play atop the High Peak. Torches? Nay. The fire of dragons? Not so. A volcanic eruption, perchance? Alas, no. It is unmistakably the fire of the arcane, the fire of mages, and seeing as every pyromancer within our pride is under my dominion, I can only assume that these lights come from one not affiliated with us. The lights are fascinating, I wish to study them; they put me in mind of the fires of the Spellblaze, burning so very long ago... Sadly, such desires are denied to me at this moment. Plans are in motion, and we are scant weeks away from finally crushing the accursed sun paladins and their tin-plated harlot ruler. Even once the Sunwall lies in ruins I must be careful - the horde of sub-orc savages Grushnak calls a pride are ever at my door, claiming we do not follow Garkul's "true path". He is a fool, but dangerous, and I must be vigilant.]], } @@ -63,8 +63,8 @@ Sadly, such desires are denied to me at this moment. Plans are in motion, and we newLore{ id = "orc-history-1", category = "orc prides", - name = "Records of Lorekeeper Hadak part one", - lore = [[Our history is a history of battles, a history of wars. We orcs have always been under attack from the other races, always having to defend ourselves against their ruthless advances. The other races paint us as evil, they think of us as purely beasts. Not so! If we are cruel, it is because they made us cruel. If we are heartless, it is because they ripped our beating hearts from our chests and stamped them beneath their feet! + name = _t"Records of Lorekeeper Hadak part one", + lore = _t[[Our history is a history of battles, a history of wars. We orcs have always been under attack from the other races, always having to defend ourselves against their ruthless advances. The other races paint us as evil, they think of us as purely beasts. Not so! If we are cruel, it is because they made us cruel. If we are heartless, it is because they ripped our beating hearts from our chests and stamped them beneath their feet! It was the halflings we first did war with, in the Age of Allure. We were weak then, and disorganised, and in their arrogance they sought to enslave us. But we fought back! And we have been fighting back ever since. They used magic on us, though we had never come in touch with the arts before. They used whips and chains and tried to beat us down. They used us for labour, butchering any young that were not strong enough for them, burning any constructions we tried to make for ourselves. @@ -75,8 +75,8 @@ At first we escaped and fled, and hid in dark caves. Our numbers grew, though we newLore{ id = "orc-history-2", category = "orc prides", - name = "Records of Lorekeeper Hadak part two", - lore = [[After fighting back the other races we began to build and prosper. Finally we had our own towns and cities, and we began to advance our own abilities. Though battles were still ongoing at our borders we were free to thrive and prosper. + name = _t"Records of Lorekeeper Hadak part two", + lore = _t[[After fighting back the other races we began to build and prosper. Finally we had our own towns and cities, and we began to advance our own abilities. Though battles were still ongoing at our borders we were free to thrive and prosper. But then the accursed Shaloren mages began experimenting with Sher'Tul ruins. Oh what a dark and terrible a day it was for our race! The Spellblaze massacred our people. Earthquakes tore up our new-built towns, fires raged over old and young alike, and the whole world was turned to turmoil. Afterwards disease and blight ravaged our people, utterly ruining all the progress we had made. @@ -87,8 +87,8 @@ Only the strongest of us lived through the dark times that followed. We fled eas newLore{ id = "orc-history-3", category = "orc prides", - name = "Records of Lorekeeper Hadak part three", - lore = [[During the Age of Dusk we lay hidden, nursing our wounds and plotting our revenge. But this turned against us, as centuries after the Spellblaze had torn our race apart, the Cataclysm would bring ruin upon us again. We were finally recovering our numbers when earthquakes tore through all of our settlements. Falling rocks crushed and smothered us, thousands of us were left trapped to die beneath the ground. What few of us were left came out to a changed world. + name = _t"Records of Lorekeeper Hadak part three", + lore = _t[[During the Age of Dusk we lay hidden, nursing our wounds and plotting our revenge. But this turned against us, as centuries after the Spellblaze had torn our race apart, the Cataclysm would bring ruin upon us again. We were finally recovering our numbers when earthquakes tore through all of our settlements. Falling rocks crushed and smothered us, thousands of us were left trapped to die beneath the ground. What few of us were left came out to a changed world. The effects of magic left a grave impression on us then, and we knew we must learn its secrets in order to compete. For centuries we studied the effects of the Spellblaze, and captured enemy mages to experiment on them. Finally we were able to master the arts of magic and use them for ourselves. We built up our capabilities in secret, waiting for the right moment to strike a decisive vengeance. Garkul the Devourer, the greatest of our race, brought the plans to fruition. Under his awe-inspiring leadership we marched out upon the halfling kingdoms and burnt all before us. What glorious retribution we had! Whole cities were felled beneath our wrath. Everywhere we went we piled the bodies of our victims high and lit them in blazing pyres, as a symbol of our indomitable strength. @@ -99,8 +99,8 @@ The Age of Pyre was our age, the time when we showed ourselves the strongest of newLore{ id = "orc-history-4", category = "orc prides", - name = "Records of Lorekeeper Hadak part four", - lore = [[How greatly our race advanced during the Age of Pyre! Truly none of the weaker races can compare. For it was vengeance that drove us, and so fervently we pursued our goals at the thought of our just retribution on the races that had punished us and beaten us for so long before. + name = _t"Records of Lorekeeper Hadak part four", + lore = _t[[How greatly our race advanced during the Age of Pyre! Truly none of the weaker races can compare. For it was vengeance that drove us, and so fervently we pursued our goals at the thought of our just retribution on the races that had punished us and beaten us for so long before. During the Age of Pyre we discovered the farportal, deep beneath the dwarven cities. We were more cautious than the foolish elves before us, and managed to harness the portal's power to open a gateway to the lost east. We sent military forces over, and easily beat back the puny elves and humans that were hoveling there already. We established the Prides there - training camps for our soldiers where they could hone their battle skills before returning to fight the wars in the west. @@ -111,8 +111,8 @@ But all in the west did not go well. We conquered many lands, and came close to newLore{ id = "orc-history-5", category = "orc prides", - name = "Records of Lorekeeper Hadak part five", - lore = [[The humans and the halflings made an alliance to defend their kingdoms, and soon the elves and the dwarves joined too, and we were pushed back. Our tactics became increasingly defensive as they made greater advances into our territory. + name = _t"Records of Lorekeeper Hadak part five", + lore = _t[[The humans and the halflings made an alliance to defend their kingdoms, and soon the elves and the dwarves joined too, and we were pushed back. Our tactics became increasingly defensive as they made greater advances into our territory. We fought well and hard, but we were not prepared for the terrible tactics they would use. Instead of attacking our military bases they went for our towns and cities, killing all of our civilians. Babes were slaughtered in their mother's arms, and every last woman and child was hunted down and murdered. It was genocide of the highest order. @@ -131,8 +131,8 @@ We still have a secret presence in the west, in our rightful lands across which newLore{ id = "garkul-history-1", category = "orc prides", - name = "The Legend of Garkul", - lore = [[#{bold}#Chapter One: A Young Warrior#{normal}# + name = _t"The Legend of Garkul", + lore = _t[[#{bold}#Chapter One: A Young Warrior#{normal}# #{italic}#"Without hardship you cannot have strength. Only through pain do we truly learn. Our race has lived through war and fire and pestilence, and each one has made us stronger. Each trial we overcome brings us to greater strength." - Sayings of Garkul the Devourer#{normal}# @@ -158,8 +158,8 @@ Verikor kept Garkul as his guest for many months, and though Garkul had no inkli newLore{ id = "garkul-history-2", category = "orc prides", - name = "The Legend of Garkul", - lore = [[#{bold}#Chapter Two: Rise of the Devourer#{normal}# + name = _t"The Legend of Garkul", + lore = _t[[#{bold}#Chapter Two: Rise of the Devourer#{normal}# #{italic}#"There are no such things as obstacles, no such things as impossibilities. When a problem presents itself you use your head and your fists, and you remove the problem. If you cannot punch you kick, and if you cannot kick you bite, and you do not unclench your jaws until the thing that was a problem is a problem no more." - Sayings of Garkul the Devourer#{normal}# @@ -193,8 +193,8 @@ So ended the name Garkul One-Eye, for a new name was born: Garkul the Devourer. newLore{ id = "garkul-history-3", category = "orc prides", - name = "The Legend of Garkul", - lore = [[#{bold}#Chapter Three: Bringer of Pyre#{normal}# + name = _t"The Legend of Garkul", + lore = _t[[#{bold}#Chapter Three: Bringer of Pyre#{normal}# #{italic}#"Fire is a symbol all races understand. To burn is to destroy utterly. When I conquer I leave behind fire - every house, every field, every corpse, burnt to a cinder. This is a sign of our dominance, and the word of it spreads amongst our enemies. To them I become a living, unquenchable flame, and the sight of my army fills them with the dread of incineration." - Sayings of Garkul the Devourer#{normal}# @@ -218,8 +218,8 @@ Within three months the Eldoral kingdom was broken, and refugees flooded south t newLore{ id = "garkul-history-4", category = "orc prides", - name = "The Legend of Garkul", - lore = [[#{bold}#Chapter Four: Conqueror of West and East#{normal}# + name = _t"The Legend of Garkul", + lore = _t[[#{bold}#Chapter Four: Conqueror of West and East#{normal}# #{italic}#"Our strength must come through our pride, and our pride must rise from our strength. Many are our powers and abilities, and we are unified in our pride of them. Be proud in our great race and revel in the glories we can achieve together." - Sayings of Garkul the Devourer#{normal}# @@ -241,8 +241,8 @@ When Garkul next returned from the east he heard from his spies of great operati newLore{ id = "garkul-history-5", category = "orc prides", - name = "The Legend of Garkul", - lore = [[#{bold}#Chapter Five: Fall of the Mighty#{normal}# + name = _t"The Legend of Garkul", + lore = _t[[#{bold}#Chapter Five: Fall of the Mighty#{normal}# #{italic}#"A true warrior never dies. His fall may come on the battlefield, but it is a fall to inspire all others who follow him. He lives on in their every thrust, every parry, every swipe. Whilst blood still spills in his name a warrior is immortal." - Sayings of Garkul the Devourer#{normal}# @@ -280,8 +280,8 @@ Our forces never full recovered from the loss of our great leader. The wars cont newLore{ id = "orc-breeding-1", category = "orc prides", - name = "Clinician Korbek's experimental notes part one", - lore = [[#{bold}#Clinician Korbek's experimental notes part one#{normal}# + name = _t"Clinician Korbek's experimental notes part one", + lore = _t[[#{bold}#Clinician Korbek's experimental notes part one#{normal}# What a dread and woeful task I have been given - the revival of our race. The swine humans and halflings have destroyed our whole society, and only the brutes of the military remain to rule our people. We are left with just a handful of women left, and without drastic measures we shall soon be extinct. @@ -293,8 +293,8 @@ I have taken this cavern up as a secret base, far away from the main encampment. newLore{ id = "orc-breeding-2", category = "orc prides", - name = "Clinician Korbek's experimental notes part two", - lore = [[#{bold}#Clinician Korbek's experimental notes part two#{normal}# + name = _t"Clinician Korbek's experimental notes part two", + lore = _t[[#{bold}#Clinician Korbek's experimental notes part two#{normal}# I have begun work on several of the females. They are being kept in a coma for the duration of the experiments - it's far better that way. Initially I have subjected them to very high levels of wild infusion and arcane regeneration fields, whilst also keeping a direct feed into their stomachs high in protein. Corrupted blood is being pumped into their ovaries with a temporal acceleration field surrounding them. The leaders of each Pride have donated their seed for use in the experiments. @@ -306,8 +306,8 @@ Some females have died during the procedures. I can only presume these were the newLore{ id = "orc-breeding-3", category = "orc prides", - name = "Clinician Korbek's experimental notes part three", - lore = [[#{bold}#Clinician Korbek's experimental notes part three#{normal}# + name = _t"Clinician Korbek's experimental notes part three", + lore = _t[[#{bold}#Clinician Korbek's experimental notes part three#{normal}# My work is continuing with tremendous success. All subjects now have multiple operational wombs, thanks to the corrupted blood infusions coupled with arcane regeneration fields to quickly repair the corrupted tissues. With greater advances in accelerating the foetal growth stage we are now seeing new orcs every few days! I believe this can be pushed even further. @@ -319,8 +319,8 @@ Pumping nutrients directly into their stomach is proving a difficulty with the i newLore{ id = "orc-breeding-4", category = "orc prides", - name = "Clinician Korbek's experimental notes part four", - lore = [[#{bold}#Clinician Korbek's experimental notes part four#{normal}# + name = _t"Clinician Korbek's experimental notes part four", + lore = _t[[#{bold}#Clinician Korbek's experimental notes part four#{normal}# Oh horrors... Oh black bilious terrors! What have I done? What vile and black sin have I done?! @@ -334,8 +334,8 @@ My mind is in torment. I cannot live like this any longer... I cannot live...]] newLore{ id = "orc-breeding-5", category = "orc prides", - name = "Captain Gumlarat's report", - lore = [[#{bold}#Captain Gumlarat's report#{normal}# + name = _t"Captain Gumlarat's report", + lore = _t[[#{bold}#Captain Gumlarat's report#{normal}# I have found clinician Korbek's body in his study. It seems he slit his own throat. This would explain the lack of reports in the last few days. @@ -353,8 +353,8 @@ I see his notes also suggest the mothers may be in pain. I will allow a doping i newLore{ id = "ukruk-log", category = "orc prides", - name = "Ukruk's log", - lore = [[Sher'Tul ruin matches description from high command. Investigation begun, but slow. Looks like it crashed into the ground long ago - hard to access many areas. Target item has been described by command as a staff. Do not know why a staff so important. Surely the ultimate weapon should be a sword or axe, like that wielded by the great Garkul? + name = _t"Ukruk's log", + lore = _t[[Sher'Tul ruin matches description from high command. Investigation begun, but slow. Looks like it crashed into the ground long ago - hard to access many areas. Target item has been described by command as a staff. Do not know why a staff so important. Surely the ultimate weapon should be a sword or axe, like that wielded by the great Garkul? Have heard many rumours against high command lately - strange rumours, indeed. Perhaps by completing this mission I shall get closer to them so that I might seek the truth... diff --git a/game/modules/tome/data/lore/rhaloren.lua b/game/modules/tome/data/lore/rhaloren.lua index a05fe0284f4d5d87776718e7e0f3f43090c41354..18d212e193615aec02059a54dfa726fc21fa7096 100644 --- a/game/modules/tome/data/lore/rhaloren.lua +++ b/game/modules/tome/data/lore/rhaloren.lua @@ -24,8 +24,8 @@ newLore{ id = "rhaloren-note-1", category = "rhaloren", - name = "letter (rhaloren camp)", - lore = [[We must be on guard. The Council of Elders is desperate to find us, to hunt us down and suppress us. But we will not be suppressed. We have our rights! Their scouts try to track us down, and their spies try to infiltrate our numbers. They cannot accept any others having power, or any voice but their own being heard. + name = _t"letter (rhaloren camp)", + lore = _t[[We must be on guard. The Council of Elders is desperate to find us, to hunt us down and suppress us. But we will not be suppressed. We have our rights! Their scouts try to track us down, and their spies try to infiltrate our numbers. They cannot accept any others having power, or any voice but their own being heard. We have split away from our people, and we follow our own path now. We are outcasts. They call us renegades, anarchists; they think of us as nothing but vermin to be crushed underfoot. But we will not endure their cruel suppression. Our voice will be heard across the world and they shall recognise a new race of power - the mighty Rhaloren! @@ -36,8 +36,8 @@ We have split away from our people, and we follow our own path now. We are outca newLore{ id = "rhaloren-note-2", category = "rhaloren", - name = "letter (rhaloren camp)", - lore = [[The Scintillating Caverns must be protected. Our great leader has ordered it so, and his word is more binding than any law. Our numbers are few, and we must move in secrecy, but a quiet watch will be made on the caverns. Any who are seen to interfere in them must be lured here to our place of strength, and brought before me for inquisition. + name = _t"letter (rhaloren camp)", + lore = _t[[The Scintillating Caverns must be protected. Our great leader has ordered it so, and his word is more binding than any law. Our numbers are few, and we must move in secrecy, but a quiet watch will be made on the caverns. Any who are seen to interfere in them must be lured here to our place of strength, and brought before me for inquisition. More have joined our cause. Their eyes have been opened to the injustice our people have suffered, blamed by the other races for the Spellblaze and its effects. They are sick of the cowardice of the Council, who sit in silence as we are scorned and hated across the world. But most of all they are inspired by our great leader, and the powers he has gained from studying the Spellblaze. He alone realizes our full potential, he alone can see in our hearts what we are truly capable of. He has blessed me, rescued me from a tortured life and touched me with his power. Only he can lead our people! With his mastery the world will see our strength and recognise us as a true force to be reckoned with. @@ -49,8 +49,8 @@ Trust in his power, for he shall bring us all to glory. newLore{ id = "rhaloren-note-3", category = "rhaloren", - name = "letter (rhaloren camp)", - lore = [[For too long we have been taught that the Spellblaze was a tragedy, that we are responsible for the deaths of millions and for suffering across the world. These are lies! Lies spread to defame us, to prevent our people from using magic to its rightful degree. The lesser races are jealous of our powers, of our amazing potential, and so they think to keep us underfoot, to stop us from ascending to our rightful place in the world. They fear us. + name = _t"letter (rhaloren camp)", + lore = _t[[For too long we have been taught that the Spellblaze was a tragedy, that we are responsible for the deaths of millions and for suffering across the world. These are lies! Lies spread to defame us, to prevent our people from using magic to its rightful degree. The lesser races are jealous of our powers, of our amazing potential, and so they think to keep us underfoot, to stop us from ascending to our rightful place in the world. They fear us. The truth is that the Spellblaze was an experiment that went wrong. Many of our greatest mages died from the resulting energies, and some lands nearby were set ablaze. But there was no loss of life amongst the other races - it is their own wars that caused that, and their own squalid societies that brought about the plagues that followed. Many centuries later a great natural earthquake occurred that tore the lands apart, and the other races had the audacity to blame that on us. @@ -65,8 +65,8 @@ But no more! The time will come when the truth shall be known, and retribution w newLore{ id = "rhaloren-note-4", category = "rhaloren", - name = "letter (rhaloren camp)", - lore = [[I have great news! Our glorious leader has written to me, telling me of his travels. He is on a great pilgrimage, a holy quest to discover more about the Spellblaze and its powers, so that we may show the truth about it to the world. It is a quest fraught with peril, for we have many enemies in the world. But by his powers he cannot fail. He cannot! He cannot... + name = _t"letter (rhaloren camp)", + lore = _t[[I have great news! Our glorious leader has written to me, telling me of his travels. He is on a great pilgrimage, a holy quest to discover more about the Spellblaze and its powers, so that we may show the truth about it to the world. It is a quest fraught with peril, for we have many enemies in the world. But by his powers he cannot fail. He cannot! He cannot... One day soon he will return to us, and bring us to our proper glory. Look forward to that great time, when he is amongst us once more. Be ready for that moment when he stands tall before us and looks at us with his deep eyes... Work hard now and be attentive in your duties, so that we may make him proud. We fight for him, we struggle for him, and if needs be we will die for him. He is our hope and our glory, and the only joy we have in this dispassionate world. @@ -77,8 +77,8 @@ One day soon he will return to us, and bring us to our proper glory. Look forwar newLore{ id = "rhaloren-note-5", category = "rhaloren", - name = "carefully preserved letter (rhaloren camp)", - lore = [[My dearest, + name = _t"carefully preserved letter (rhaloren camp)", + lore = _t[[My dearest, I hope this letter finds you well. I worry for you, so close to the city, so vulnerable should they find our base... But I trust in your strength, and I know you will be safe. Yet should anything happen... diff --git a/game/modules/tome/data/lore/sandworm.lua b/game/modules/tome/data/lore/sandworm.lua index 2f8cf12b17701e609622c5fb7da6130769c85542..f433efb4982b0be24e8f3f5033d4b687c79e80af 100644 --- a/game/modules/tome/data/lore/sandworm.lua +++ b/game/modules/tome/data/lore/sandworm.lua @@ -24,8 +24,8 @@ newLore{ id = "sandworm-note-1", category = "sandworm lair", - name = "song of the sands", - lore = [[I have stared in the mouths of crimson wyrms + name = _t"song of the sands", + lore = _t[[I have stared in the mouths of crimson wyrms And felt the claws of drakes so sleek But through deserts dry and sandy storms There is something else I seek @@ -38,8 +38,8 @@ It's on the wyrmic path I go!]], newLore{ id = "sandworm-note-2", category = "sandworm lair", - name = "song of the sands", - lore = [[The dragon's breath corrodes my eyes + name = _t"song of the sands", + lore = _t[[The dragon's breath corrodes my eyes It tears flesh from my skin But onward I search to see what lies Amidst the sandy depths within @@ -52,8 +52,8 @@ For my quest I must survive!]], newLore{ id = "sandworm-note-3", category = "sandworm lair", - name = "song of the sands", - lore = [[The sandworms go from strength to strength + name = _t"song of the sands", + lore = _t[[The sandworms go from strength to strength Ever greater do they seem Of towering height and massive length It is all as if a dream... @@ -66,8 +66,8 @@ Of the legendary worm so great!]], newLore{ id = "sandworm-note-4", category = "sandworm lair", - name = "song of the sands", - lore = [[I have seen the Queen in glory true + name = _t"song of the sands", + lore = _t[[I have seen the Queen in glory true And she has moved me to my soul Oh Queen! Let me be a part of you! Please devour me! Swallow me whole!!]], diff --git a/game/modules/tome/data/lore/scintillating-caves.lua b/game/modules/tome/data/lore/scintillating-caves.lua index 0fead924015d3ae76499207617d942b8147be67c..686f005e39533c4b8c56ea2fb53e402836c430c9 100644 --- a/game/modules/tome/data/lore/scintillating-caves.lua +++ b/game/modules/tome/data/lore/scintillating-caves.lua @@ -24,8 +24,8 @@ newLore{ id = "scintillating-caves-note-1", category = "scintillating caves", - name = "research journal part 1", - lore = [[I have been given permission to explore the scintillating caves to the east. Normally they are sealed off, but having a father on the council has its uses, even if he is normally a dumb buffoon... + name = _t"research journal part 1", + lore = _t[[I have been given permission to explore the scintillating caves to the east. Normally they are sealed off, but having a father on the council has its uses, even if he is normally a dumb buffoon... These caves are the site of where the Spellblaze began. An ancient Sher'Tul farportal lay buried here, and our ancestors tapped into that power to their destruction. Many of the greatest Shaloren mages stood here, and when the energies beyond comprehension erupted they were all annihilated instantly. It was a terrible loss to our people - such knowledge and power lost forever! @@ -38,8 +38,8 @@ I must admit that stepping into the starting place of the Spellblaze fills me wi newLore{ id = "scintillating-caves-note-2", category = "scintillating caves", - name = "research journal part 2", - lore = [[I have definitely seen crystals move of their own volition here, and some even seem capable of producing magical effects in self-defence. They are no threat to me whatsoever - my arcane powers are far beyond whatever latent magic seems to possess these things. + name = _t"research journal part 2", + lore = _t[[I have definitely seen crystals move of their own volition here, and some even seem capable of producing magical effects in self-defence. They are no threat to me whatsoever - my arcane powers are far beyond whatever latent magic seems to possess these things. Possession... is what it almost seems like. These crystals are not natural. I have broken some down and studied them, and the very structure of the material seems vastly distinct from any other I have seen. I have even studied Sher'Tul relics in the Academy and this is most certainly something different. Truly fascinating! ]], @@ -48,8 +48,8 @@ Possession... is what it almost seems like. These crystals are not natural. I ha newLore{ id = "scintillating-caves-note-3", category = "scintillating caves", - name = "research journal part 3", - lore = [[Earth, water, fire, air - these are the elements we forge our magic with, and all of these I have seen manifested in the crystals here. But there is something else, something different... There are dark crystals here which seem to posses some new, destructive element - a very twisting of the nature of the other elements, warping them into malign designs. + name = _t"research journal part 3", + lore = _t[[Earth, water, fire, air - these are the elements we forge our magic with, and all of these I have seen manifested in the crystals here. But there is something else, something different... There are dark crystals here which seem to posses some new, destructive element - a very twisting of the nature of the other elements, warping them into malign designs. Why have I never seen this before?! I must study it, I must understand it - I must comprehend its very nature and hold its power in my own hands... The thirst for knowledge is all-consuming! @@ -59,8 +59,8 @@ I shall name this new element "blight".]], newLore{ id = "scintillating-caves-note-4", category = "scintillating caves", - name = "research journal part 4", - lore = [[I can see it now, I can see so clearly... The forces at work here are not of this world. They are a result of the Spellblaze, from the tearing of the fabric of our world. And from outside that fabric... something else, something truly powerful, trying to force its way in. I feel I can almost reach out and touch it! Such awesome power it is... could this even rival the renowned powers of the Sher'Tul? + name = _t"research journal part 4", + lore = _t[[I can see it now, I can see so clearly... The forces at work here are not of this world. They are a result of the Spellblaze, from the tearing of the fabric of our world. And from outside that fabric... something else, something truly powerful, trying to force its way in. I feel I can almost reach out and touch it! Such awesome power it is... could this even rival the renowned powers of the Sher'Tul? The crystals are a corruption of the elements of Maj'Eyal. These outside forces are changing the very make-up of the matter of our world. This cavern is truly a garden of delights, a font of growth and energy. Who knows how far this garden of wonders could spread if we encourage it more? Perhaps the whole of our world could be enveloped in this scintillating glory, a grand corruption for all Eyal! @@ -70,8 +70,8 @@ I have begun to train myself in controlling this "blight". It takes much energy, newLore{ id = "scintillating-caves-note-5", category = "scintillating caves", - name = "research journal part 5", - lore = [[I sought to reach out and touch the abyss, but I found it touched me first... I have been blessed, I have been fully awoken! + name = _t"research journal part 5", + lore = _t[[I sought to reach out and touch the abyss, but I found it touched me first... I have been blessed, I have been fully awoken! There is a wonder here, a wonder beyond all else I have ever seen. A crystal of amazing intricacy and beauty, with a halo of power that echoes of the original energies of the Spellblaze. All the power that our ancestors unlocked, mixed with the glorious corruption that it triggered. What beauty - what tremendous beauty! @@ -83,8 +83,8 @@ I see now the path that lies before me. The Spellblaze was not a curse, it was a newLore{ id = "scintillating-caves-note-6", category = "scintillating caves", - name = "exploration journal", - lore = [[#{italic}#10th Mirth, Year 122 of the Age of Ascendancy#{normal}# + name = _t"exploration journal", + lore = _t[[#{italic}#10th Mirth, Year 122 of the Age of Ascendancy#{normal}# The council has seen fit to allow me to investigate the scintillating caverns after that Rhaloren madman started raving on the streets about how someone had "befouled" them... I do not see any such befoulment, but neither do I see the moving crystals this place was rumoured to have. There are oddly misplaced crystal shards, which seem to have sheared off of something larger, but hardly anything spectacular. #{italic}#2nd Summertide, Year 122 of the Age of Ascendancy#{normal}# diff --git a/game/modules/tome/data/lore/shertul.lua b/game/modules/tome/data/lore/shertul.lua index 5389018e0db18dbf5014eab0ef276e65ba1abebe..d7ea4b33890adbc1da7d1fab9012357e7b0a22c3 100644 --- a/game/modules/tome/data/lore/shertul.lua +++ b/game/modules/tome/data/lore/shertul.lua @@ -24,111 +24,111 @@ newLore{ id = "shertul-fortress-1", category = "sher'tul", - name = "first mural painting", always_pop = true, + name = _t"first mural painting", always_pop = true, image = "shertul_fortress_lore1.png", - lore = function() return [[You see here a mural showing a dark and tortured world. Large, god-like figures with powerful auras fight each other, and the earth is torn beneath their feet. -There is some text underneath ]]..(not game.player:attr("speaks_shertul") and [[which you do not understand: #{italic}#'Sho ch'zun Eyal mor donuth, ik ranaheli donoth trun ze.'#{normal}#]] or [[#{italic}#'In the beginning the world was dark, and the petty gods fought over their broken lands.'#{normal}#]]) + lore = function() return _t[[You see here a mural showing a dark and tortured world. Large, god-like figures with powerful auras fight each other, and the earth is torn beneath their feet. +There is some text underneath ]]..(not game.player:attr("speaks_shertul") and _t[[which you do not understand: #{italic}#'Sho ch'zun Eyal mor donuth, ik ranaheli donoth trun ze.'#{normal}#]] or _t[[#{italic}#'In the beginning the world was dark, and the petty gods fought over their broken lands.'#{normal}#]]) end, } newLore{ id = "shertul-fortress-2", category = "sher'tul", - name = "second mural painting", always_pop = true, + name = _t"second mural painting", always_pop = true, image = "shertul_fortress_lore2.png", - lore = function() return [[In this picture a huge god with glowing eyes towers above the land, and in his right hand he holds high the sun. The other gods are running from him, wincing from the light. -There is some text underneath ]]..(not game.player:attr("speaks_shertul") and [[which you do not understand: #{italic}#'Fa AMAKTHEL tabak, ik koru bazan tro yu, ik ranaheli tobol don schek ruun. Ik blana dem Soli as banafel ik goriz uf Eyal ik blod, "Tro fasa goru domus asam, ik goru domit tro Eyal."'#{normal}#]] or [[#{italic}#'But AMAKTHEL came, and his might surpassed all else, and the petty gods fled before his glory. And he made the Sun from his breath and held it above the world and said, "All that this light touches shall be mine, and this light shall touch all the world.'#{normal}#]]) + lore = function() return _t[[In this picture a huge god with glowing eyes towers above the land, and in his right hand he holds high the sun. The other gods are running from him, wincing from the light. +There is some text underneath ]]..(not game.player:attr("speaks_shertul") and _t[[which you do not understand: #{italic}#'Fa AMAKTHEL tabak, ik koru bazan tro yu, ik ranaheli tobol don schek ruun. Ik blana dem Soli as banafel ik goriz uf Eyal ik blod, "Tro fasa goru domus asam, ik goru domit tro Eyal."'#{normal}#]] or _t[[#{italic}#'But AMAKTHEL came, and his might surpassed all else, and the petty gods fled before his glory. And he made the Sun from his breath and held it above the world and said, "All that this light touches shall be mine, and this light shall touch all the world.'#{normal}#]]) end, } newLore{ id = "shertul-fortress-3", category = "sher'tul", - name = "third mural painting", always_pop = true, + name = _t"third mural painting", always_pop = true, image = "shertul_fortress_lore3.png", - lore = function() return [[This picture shows the huge god holding some smaller figures in his hands and pointing out at the lands beyond. You imagine these figures must be the Sher'Tul. -There is some text beneath ]]..(not game.player:attr("speaks_shertul") and [[which you do not understand: #{italic}#'Ik AMAKTHEL cosio SHER'TUL, ik baladath peris furko masa bren doth benna zi, ik blod is "Fen makel ath goru domus ik denz tro ala fron."'#{normal}#]] or [[#{italic}#'And AMAKTHEL made the SHER'TUL, and gave unto us the powers to achieve all that we set our will to, and said to us "Go forth to where the light touches and take all for your own."'#{normal}#]]) + lore = function() return _t[[This picture shows the huge god holding some smaller figures in his hands and pointing out at the lands beyond. You imagine these figures must be the Sher'Tul. +There is some text beneath ]]..(not game.player:attr("speaks_shertul") and _t[[which you do not understand: #{italic}#'Ik AMAKTHEL cosio SHER'TUL, ik baladath peris furko masa bren doth benna zi, ik blod is "Fen makel ath goru domus ik denz tro ala fron."'#{normal}#]] or _t[[#{italic}#'And AMAKTHEL made the SHER'TUL, and gave unto us the powers to achieve all that we set our will to, and said to us "Go forth to where the light touches and take all for your own."'#{normal}#]]) end, } newLore{ id = "shertul-fortress-4", category = "sher'tul", - name = "fourth mural painting", always_pop = true, + name = _t"fourth mural painting", always_pop = true, image = "shertul_fortress_lore4.png", - lore = function() return [[You see a mural showing a huge metropolis made of crystal, with small islands of stone floating in the air behind it. In the foreground is sitting a Sher'Tul, with a hand stretched up to the sky. -There is some text beneath ]]..(not game.player:attr("speaks_shertul") and [[which you do not understand: #{italic}#'Batialatoth ro Eyal, ik rinsi akan fronseth sumit kurameth ik linnet pora gasios aeren. Ach nen beswar goreg.'#{normal}#]] or [[#{italic}#'We conquered the world, and built for ourselves towering cities of crystal and fortresses that travelled the skies. But some were not content...'#{normal}#]]) + lore = function() return _t[[You see a mural showing a huge metropolis made of crystal, with small islands of stone floating in the air behind it. In the foreground is sitting a Sher'Tul, with a hand stretched up to the sky. +There is some text beneath ]]..(not game.player:attr("speaks_shertul") and _t[[which you do not understand: #{italic}#'Batialatoth ro Eyal, ik rinsi akan fronseth sumit kurameth ik linnet pora gasios aeren. Ach nen beswar goreg.'#{normal}#]] or _t[[#{italic}#'We conquered the world, and built for ourselves towering cities of crystal and fortresses that travelled the skies. But some were not content...'#{normal}#]]) end, } newLore{ id = "shertul-fortress-5", category = "sher'tul", - name = "fifth mural painting", always_pop = true, + name = _t"fifth mural painting", always_pop = true, image = "shertul_fortress_lore5.png", - lore = function() return [[This mural shows nine Sher'Tul standing side by side, each holding aloft a dark weapon. Your eyes are drawn to a runed staff held by the red-robed figure in the centre. It seems familiar somehow... -There is some text beneath ]]..(not game.player:attr("speaks_shertul") and [[which you do not understand: #{italic}#'Zubadon koref noch hesen, ik dorudon koref noch pasor. Cosief maro dondreth karatu - Ranaduzil - ik jein belsan ovrienis.'#{normal}#]] or [[#{italic}#'Of pride we accepted no equals, and of greed we accepted no servitude. We made for ourselves terrible weapons - the Godslayers - and nine were chosen to wield them.'#{normal}#]]) + lore = function() return _t[[This mural shows nine Sher'Tul standing side by side, each holding aloft a dark weapon. Your eyes are drawn to a runed staff held by the red-robed figure in the centre. It seems familiar somehow... +There is some text beneath ]]..(not game.player:attr("speaks_shertul") and _t[[which you do not understand: #{italic}#'Zubadon koref noch hesen, ik dorudon koref noch pasor. Cosief maro dondreth karatu - Ranaduzil - ik jein belsan ovrienis.'#{normal}#]] or _t[[#{italic}#'Of pride we accepted no equals, and of greed we accepted no servitude. We made for ourselves terrible weapons - the Godslayers - and nine were chosen to wield them.'#{normal}#]]) end, } newLore{ id = "shertul-fortress-6", category = "sher'tul", - name = "sixth mural painting", always_pop = true, + name = _t"sixth mural painting", always_pop = true, image = "shertul_fortress_lore6.png", - lore = function() return [[You see images of epic battles, with Sher'Tul warriors fighting and slaying god-like figures over ten times their size. -There is some text underneath ]]..(not game.player:attr("speaks_shertul") and [[which you do not understand: #{italic}#'Ranaheli meth dondruil ik duzin, ik leisif konru as neremin. Eyal matath bre sun. Ach unu rana soriton...'#{normal}#]] or [[#{italic}#'The petty gods were hunted down and slain, and their spirits rent to nothing. The land became our own. But one god remained...'#{normal}#]]) + lore = function() return _t[[You see images of epic battles, with Sher'Tul warriors fighting and slaying god-like figures over ten times their size. +There is some text underneath ]]..(not game.player:attr("speaks_shertul") and _t[[which you do not understand: #{italic}#'Ranaheli meth dondruil ik duzin, ik leisif konru as neremin. Eyal matath bre sun. Ach unu rana soriton...'#{normal}#]] or _t[[#{italic}#'The petty gods were hunted down and slain, and their spirits rent to nothing. The land became our own. But one god remained...'#{normal}#]]) end, } newLore{ id = "shertul-fortress-7", category = "sher'tul", - name = "seventh mural painting", always_pop = true, + name = _t"seventh mural painting", always_pop = true, image = "shertul_fortress_lore7.png", - lore = function() return [[You see the red-robed Sher'Tul striking the huge god with the dark, runed staff. Bodies litter the floor around them, and the golden throne behind is bathed in blood. The light in the god's eyes seems faded. -There is some text underneath ]]..(not game.player:attr("speaks_shertul") and [[which you do not understand: #{italic}#'Trobazan AMAKTHEL konruata as va aurin leas, ik mab peli zort akan hun, penetar dondeberoth.'#{normal}#]] or [[#{italic}#'The almighty AMAKTHEL was assaulted on his golden throne, and though many died before his feet, he was finally felled.'#{normal}#]]) + lore = function() return _t[[You see the red-robed Sher'Tul striking the huge god with the dark, runed staff. Bodies litter the floor around them, and the golden throne behind is bathed in blood. The light in the god's eyes seems faded. +There is some text underneath ]]..(not game.player:attr("speaks_shertul") and _t[[which you do not understand: #{italic}#'Trobazan AMAKTHEL konruata as va aurin leas, ik mab peli zort akan hun, penetar dondeberoth.'#{normal}#]] or _t[[#{italic}#'The almighty AMAKTHEL was assaulted on his golden throne, and though many died before his feet, he was finally felled.'#{normal}#]]) end, } newLore{ id = "shertul-fortress-8", category = "sher'tul", - name = "eighth mural painting", always_pop = true, + name = _t"eighth mural painting", always_pop = true, image = "shertul_fortress_lore8.png", - lore = function() return [[The large mural shows the great god spread on the ground, with the dark staff held against his chest. Sher'Tul surround him, some hacking off his limbs, cutting out his tongue, and binding him with chains. A burst of light flares up from where a tall Sher'Tul warrior is gouging his eye with a black-bladed halberd. In the background a Sher'Tul mage beckons to a huge chasm in the ground. -The text beneath says simply ]]..(not game.player:attr("speaks_shertul") and [[#{italic}#'Meas Abar.'#{normal}#]] or [[#{italic}#'The Great Sin.'#{normal}#]]) + lore = function() return _t[[The large mural shows the great god spread on the ground, with the dark staff held against his chest. Sher'Tul surround him, some hacking off his limbs, cutting out his tongue, and binding him with chains. A burst of light flares up from where a tall Sher'Tul warrior is gouging his eye with a black-bladed halberd. In the background a Sher'Tul mage beckons to a huge chasm in the ground. +The text beneath says simply ]]..(not game.player:attr("speaks_shertul") and _t[[#{italic}#'Meas Abar.'#{normal}#]] or _t[[#{italic}#'The Great Sin.'#{normal}#]]) end, } newLore{ id = "shertul-fortress-9", category = "sher'tul", - name = "ninth mural painting", always_pop = true, + name = _t"ninth mural painting", always_pop = true, image = "shertul_fortress_lore9.png", - lore = function() return [[This final mural has been ruined, with deep scores and scratches etched across its surface. All you can see of the original appears to be flames.]] end, + lore = function() return _t[[This final mural has been ruined, with deep scores and scratches etched across its surface. All you can see of the original appears to be flames.]] end, } newLore{ id = "shertul-fortress-takeoff", category = "sher'tul", - name = "Yiilkgur raising toward the sky", always_pop = true, + name = _t"Yiilkgur raising toward the sky", always_pop = true, image = "fortress_takeoff.png", - lore = [[Yiilkgur, the Sher'Tul Fortress is re-activated and raises from the depths of Nur toward the sky.]], + lore = _t[[Yiilkgur, the Sher'Tul Fortress is re-activated and raises from the depths of Nur toward the sky.]], } newLore{ id = "shertul-fortress-caldizar", category = "sher'tul", - name = "a living Sher'Tul?!", always_pop = true, + name = _t"a living Sher'Tul?!", always_pop = true, image = "inside_caldizar_fortress.png", - lore = [[You somehow got teleported to an other Sher'Tul Fortress, in a very alien location. There you saw a living Sher'Tul.]], + lore = _t[[You somehow got teleported to an other Sher'Tul Fortress, in a very alien location. There you saw a living Sher'Tul.]], } newLore{ id = "first-farportal", category = "sher'tul", - name = "lost farportal", always_pop = true, + name = _t"lost farportal", always_pop = true, image = "farportal_entering.png", - lore = function() return game.player.name..[[ boldly entering a Sher'Tul farportal.]] end, + lore = function() return ([[%s boldly entering a Sher'Tul farportal.]]):tformat(game.player.name) end, } diff --git a/game/modules/tome/data/lore/slazish.lua b/game/modules/tome/data/lore/slazish.lua index cdf6982f49cc15331509fec23831efa33d636104..fa3d3a295915926af2b57660cf921c9e913de267 100644 --- a/game/modules/tome/data/lore/slazish.lua +++ b/game/modules/tome/data/lore/slazish.lua @@ -24,8 +24,8 @@ newLore{ id = "slazish-note-1", category = "slazish fens", - name = "conch (1)", - lore = [[#{italic}#Touching the conch makes it emit a sound. As you put it to your ear you hear a lyrical voice emanating from within:#{normal}# + name = _t"conch (1)", + lore = _t[[#{italic}#Touching the conch makes it emit a sound. As you put it to your ear you hear a lyrical voice emanating from within:#{normal}# "Report from Tidewarden Isimon to Tidebringer Zoisla. Alucia and I have, um, begun scouting the outer perimeter. The, uh, the terrain is proving difficult to navigate, but I'm sure we'll make, uh, quick progress. We shall, uh, we'll continue now... in the name of the Saviour! @@ -47,8 +47,8 @@ newLore{ newLore{ id = "slazish-note-2", category = "slazish fens", - name = "conch (2)", - lore = [[#{italic}#Touching the conch makes it emit a sound. As you put it to your ear you hear a deep voice emanating from within:#{normal}# + name = _t"conch (2)", + lore = _t[[#{italic}#Touching the conch makes it emit a sound. As you put it to your ear you hear a deep voice emanating from within:#{normal}# "Waverider Tiamel reporting. Immediate perimeter is secure, though I have sent some members to scout the surrounding areas. I will feel better when we have mapped the land and are ready to sustain a larger team. Still, we should be perfectly safe as long as the landdwellers do not know of our presence. And even if they dare come here the magics of Zoisla will put their puny star worship to shame. @@ -58,8 +58,8 @@ newLore{ newLore{ id = "slazish-note-3", category = "slazish fens", - name = "conch (3)", - lore = [[#{italic}#Touching the conch makes it emit a sound. As you put it to your ear you hear a charismatic and commanding voice emanating from within:#{normal}# + name = _t"conch (3)", + lore = _t[[#{italic}#Touching the conch makes it emit a sound. As you put it to your ear you hear a charismatic and commanding voice emanating from within:#{normal}# "My fellow nagas! I do not envy you on your journey so far from our great Temple. But you have been chosen for a glorious mission, to establish a new outpost for invasion against the landwalkers. These are the cousins and descendants of those who abandoned us and left our race for dead. Whilst we have hidden beneath the waves for centuries, they prance about worshipping the sun! Well, their nightfall comes soon, and the dawn will rise with us as rulers of land and sea. diff --git a/game/modules/tome/data/lore/spellblaze.lua b/game/modules/tome/data/lore/spellblaze.lua index bfb2120d9c76570672cf152c4d16447d53318c44..db99459069474fa091570925b5fa46bf78392276 100644 --- a/game/modules/tome/data/lore/spellblaze.lua +++ b/game/modules/tome/data/lore/spellblaze.lua @@ -24,8 +24,8 @@ newLore{ id = "grand-corruptor-draft", category = "spellblaze", - name = "draft letter (mark of the spellblaze)", - lore = [[Dear Father, + name = _t"draft letter (mark of the spellblaze)", + lore = _t[[Dear Father, How glad you must be to hear from your "renegade" son. Do not worry overmuch; I keep myself and my group well hidden from your petty Council. I know how you fret about your status amongst those fools. diff --git a/game/modules/tome/data/lore/spellhunt.lua b/game/modules/tome/data/lore/spellhunt.lua index 8f2dcef3f7aaf2112c6e86a3c925884544cc9620..ae93bbda7908030b9bd73db1ed0f743bed901544 100644 --- a/game/modules/tome/data/lore/spellhunt.lua +++ b/game/modules/tome/data/lore/spellhunt.lua @@ -20,8 +20,8 @@ newLore{ id = "spellhunt-note-1", category = "age of dusk", - name = "memories of archmage Varil", - lore = [[ + name = _t"memories of archmage Varil", + lore = _t[[ From an objective viewpoint, you would think the Spellhunt futile, but it was not so. You couldn't imagine the barbarism of the magehunting mobs; they would abuse and persecute any they saw as eccentric, many of whom had no connection to magic at all. ... True mages would sometimes speak up in an act of altruism, just to stop the suffering of the innocent, but this only fuelled the horde's anger... @@ -36,8 +36,8 @@ Angolwen, Linaniil calls it. I have known Linaniil for many years, and I know sh newLore{ id = "spellhunt-note-2", category = "age of dusk", - name = "Spellhunter's Guide part 1: How to Detect a Spellweaver", - lore = [[Those who partake in the profane sorcery can oft be marked by their appearance, their mannerisms, their personal keeping and their effect on the environment around them. Keep close watch on all you meet, for they are deceptive creatures that can take on many guises. Even women, children and cripples may be clever disguises of demon-communers and necromancers. + name = _t"Spellhunter's Guide part 1: How to Detect a Spellweaver", + lore = _t[[Those who partake in the profane sorcery can oft be marked by their appearance, their mannerisms, their personal keeping and their effect on the environment around them. Keep close watch on all you meet, for they are deceptive creatures that can take on many guises. Even women, children and cripples may be clever disguises of demon-communers and necromancers. In their appearance you should be wary of the following: * Particular grossness in complexion @@ -68,8 +68,8 @@ Note that a spellweaver will doubtless deny any accusation against them, and wil newLore{ id = "spellhunt-note-3", category = "age of dusk", - name = "Spellhunter's Guide part 2: How to Battle a Magic-User", - lore = [[Those who rape the forces of nature with their malign wills doubtless unlock great powers to their advantage. We of noble cause, with our abilities aligned to nature's threads, can struggle to equal the terrible might of these unholy mages. But we must persist, for our cause is just, and the threat to this world from the terrors of the arcane evils cannot be under-stated. Too long has Eyal suffered the torture of their presence, and so we must fight with all the powers that nature can give us. + name = _t"Spellhunter's Guide part 2: How to Battle a Magic-User", + lore = _t[[Those who rape the forces of nature with their malign wills doubtless unlock great powers to their advantage. We of noble cause, with our abilities aligned to nature's threads, can struggle to equal the terrible might of these unholy mages. But we must persist, for our cause is just, and the threat to this world from the terrors of the arcane evils cannot be under-stated. Too long has Eyal suffered the torture of their presence, and so we must fight with all the powers that nature can give us. Mobility is key against spell-slinging warlocks and witches. One must rush with full speed towards them and hack them down, not giving them time to utter a spell of attack or defence. Against multiple opponents this could be difficult, and retreat to less open space is often vital. Do not consider this cowardice, for you play the weaker hand and must take all advantage you can acquire. Get into a tighter environment, and keep behind a concealed corner until they are right upon you, before unleashing all of your strength against them without warning. @@ -83,8 +83,8 @@ Remember to show no mercy, for they will give you none.]], newLore{ id = "spellhunt-note-4", category = "age of dusk", - name = "Spellhunter's Guide part 3: How to Kill a Magic-User", - lore = [[When a magic-user is captured, they must be slain, and slain fast. Captivity is too great a risk. Preferably they should be killed in a way that utterly removes any means for the body to recover through arcane force. Remember that coming back from the dead is no alien feat to these abominations. + name = _t"Spellhunter's Guide part 3: How to Kill a Magic-User", + lore = _t[[When a magic-user is captured, they must be slain, and slain fast. Captivity is too great a risk. Preferably they should be killed in a way that utterly removes any means for the body to recover through arcane force. Remember that coming back from the dead is no alien feat to these abominations. Beheading is simple and effective, especially in a hurry, but ideally their other limbs should be removed too and sealed in separate metal cases wrapped in willow-bark. diff --git a/game/modules/tome/data/lore/sunwall.lua b/game/modules/tome/data/lore/sunwall.lua index eacbc2301f70870ef5437867a36c381560481261..b00cdd39c8af4d060ab4fcd9a8671a6fd1425e62 100644 --- a/game/modules/tome/data/lore/sunwall.lua +++ b/game/modules/tome/data/lore/sunwall.lua @@ -24,8 +24,8 @@ newLore{ id = "sunwall-note-1", category = "history of the Sunwall", - name = "Loremaster Verutir's note", - lore = [[Loremaster Verutir here. I have been assigned to write an official chronicle of the history of the Sunwall. This will be my notebook as I interview people and travel from place to place. If you are reading this, you are either my patron (thanks again, sir!), a sneak (get out of my journal!), or the finder of my corpse. If the last, please take this to Lord Forosyth of the town of the Sunwall for a reward, tell my wife how I died, and tell the kids that I love them. + name = _t"Loremaster Verutir's note", + lore = _t[[Loremaster Verutir here. I have been assigned to write an official chronicle of the history of the Sunwall. This will be my notebook as I interview people and travel from place to place. If you are reading this, you are either my patron (thanks again, sir!), a sneak (get out of my journal!), or the finder of my corpse. If the last, please take this to Lord Forosyth of the town of the Sunwall for a reward, tell my wife how I died, and tell the kids that I love them. With that said I shall be starting this project by investigating the Elves and their connection to the Sunwall. They should be one of the easier races to interview considering their life expectancy and their penchant for remembering their own history. Of course, there aren't as many of them around as there used to be. ... Unfortunately though, our local Elves are also unwilling to talk to me about their history, saying they do not have records of the earlier times. However, there is a fellow Thanchir who I hear would be happy to help. The only problem is that he lies on the other side of a huge encampment of orcs, so I will need an escort to help me. We will see how that goes. I have heard things about those adventurer escorts ...]], @@ -34,23 +34,23 @@ Unfortunately though, our local Elves are also unwilling to talk to me about the newLore{ id = "sunwall-note-2", category = "history of the Sunwall", - name = "Loremaster Verutir's note", - lore = [[And boy were all the rumors about unreliable adventurers true. I'd heard that many, many escorted people die when their adventurer flees and protects himself. It is TRUE. Once I got an escort, I headed off in the right direction immediately. However, for some reason, he did not immediately follow, let alone lead. Didn't he know the way to go? Foolish man. Why am I offering my special trainings to someone who doesn't even know where the local portals are! Fortunately I survived, but no thanks to him. I won't even mention his snoring... + name = _t"Loremaster Verutir's note", + lore = _t[[And boy were all the rumors about unreliable adventurers true. I'd heard that many, many escorted people die when their adventurer flees and protects himself. It is TRUE. Once I got an escort, I headed off in the right direction immediately. However, for some reason, he did not immediately follow, let alone lead. Didn't he know the way to go? Foolish man. Why am I offering my special trainings to someone who doesn't even know where the local portals are! Fortunately I survived, but no thanks to him. I won't even mention his snoring... This Thanchir guy really, really needs to find a more urban spot with accessible public transportation (no adventurers please!). However, once I could get him to talk, he did know quite a bit. Apparently, he claims some distant kinship to the first Elf in these parts. They arrived by boat from some legendary land called "Maj'Eyal". He says that it definitely exists, but could provide no real evidence. This should be investigated further]], } newLore{ id = "sunwall-note-3", category = "history of the Sunwall", - name = "Loremaster Verutir's note", - lore = [[However, I have been repeatedly told by the powers that be, that I need to get on with this and turn in another report on how a different race got here. So, I will temporarily pause my researches on whether or not Maj'Eyal is real or just an Elf legend. (Can't trust everything they say despite their long memories.) Instead, I am on to meet the keeper of the Eastern Historical Society who has the best collection of lore about how Humans got here. As such, I will be travelling to northern Vor to use their archives. + name = _t"Loremaster Verutir's note", + lore = _t[[However, I have been repeatedly told by the powers that be, that I need to get on with this and turn in another report on how a different race got here. So, I will temporarily pause my researches on whether or not Maj'Eyal is real or just an Elf legend. (Can't trust everything they say despite their long memories.) Instead, I am on to meet the keeper of the Eastern Historical Society who has the best collection of lore about how Humans got here. As such, I will be travelling to northern Vor to use their archives. And yes, unfortunately I will be travelling by adventurer again. By all the gods, why don't I get a better budget? This is absolutely terrible. It has been a particularly long walk. Longer than I thought it would be, truthfully, so I have run out of food. Foolish, I know, but I figured I could ask the escort for some of his. The snobby piece of troll-liver says he doesn't eat! Now talk about a terrible lie. Did he really think that would fool me? This Eastern Historical Society had better be good...]], } newLore{ id = "sunwall-note-4", category = "history of the Sunwall", - name = "Loremaster Verutir's note", - lore = [[Finally arrived in Vor safe and mostly sound. (Though I do have some burns on my stomach from mage fire and my coat is a complete wreck. I wonder if I can expense a new coat.) However, the Eastern Historical Society is everything I could have hoped. Who can doubt that Humans are the superior race! You'd never see an Elf or an orc keep neat paper records like this! + name = _t"Loremaster Verutir's note", + lore = _t[[Finally arrived in Vor safe and mostly sound. (Though I do have some burns on my stomach from mage fire and my coat is a complete wreck. I wonder if I can expense a new coat.) However, the Eastern Historical Society is everything I could have hoped. Who can doubt that Humans are the superior race! You'd never see an Elf or an orc keep neat paper records like this! In short: Aethidry was the first Human to map out these shores. EHS has his map preserved in good crackly yellow parchment. However, he travelled on and later died on distant shores, so he was neither the first Human to arrive here, nor the one who organized the first settlement. Some historians guess that the first Human to arrive in the east was one Vaeryn Gorthol. At the least, many of the first explorers mention him as a precursor, so he may well have been. A few of the important first settlers were Oweodry Arandur, Aethor (or perhaps Aethur) the Wronged, and Bloran the Black.]], } diff --git a/game/modules/tome/data/lore/tannen.lua b/game/modules/tome/data/lore/tannen.lua index 5a156f4d3d52eaa8a77797358f54b81d799e82cc..db0c02e1aa255d2d6a44e7f6eaf2ec9ab3a30992 100644 --- a/game/modules/tome/data/lore/tannen.lua +++ b/game/modules/tome/data/lore/tannen.lua @@ -24,8 +24,8 @@ newLore{ id = "tannen-level1", category = "tannen's tower", - name = "Welcome to your cell", - lore = [[A Note to the Adventurer: + name = _t"Welcome to your cell", + lore = _t[[A Note to the Adventurer: I am truly sorry about this; had circumstances been different, we could've been allies, my weapons and magic letting you fight the hordes of threats to Maj'Eyal. As it stands, however, your continued existence is highly inconvenient to me. @@ -43,8 +43,8 @@ Oh, and I can't risk this note getting into anyone else's hands, can I? It's go newLore{ id = "tannen-level2", category = "tannen's tower", - name = "Personal note (1)", - lore = [[Angolwen is too timid. Too paranoid about repeating the mistakes of the past. Too cautious and infuriatingly non-pragmatic. Too prone to avoiding the "little sins," ignoring the big picture. I've told them again and again that our ancestors' mistake wasn't trying to use the Sher'Tul portals, it was trying to weaponize them before we understood how they worked - couldn't we have plundered the Nargol facility for more data, or started kidnapping orc scouting parties as experimental subjects? Couldn't we have tried to learn more about the Sher'Tul _before_ desperation pushed us into blowing up half of the world? No, that was "forbidden" magic, "too powerful for mortals to tamper with," right up until we realized we needed all that power after all. Like a pacifist finally picking up a flail to defend himself, only to bash himself in the head with it, our lack of familiarity led to catastrophe. + name = _t"Personal note (1)", + lore = _t[[Angolwen is too timid. Too paranoid about repeating the mistakes of the past. Too cautious and infuriatingly non-pragmatic. Too prone to avoiding the "little sins," ignoring the big picture. I've told them again and again that our ancestors' mistake wasn't trying to use the Sher'Tul portals, it was trying to weaponize them before we understood how they worked - couldn't we have plundered the Nargol facility for more data, or started kidnapping orc scouting parties as experimental subjects? Couldn't we have tried to learn more about the Sher'Tul _before_ desperation pushed us into blowing up half of the world? No, that was "forbidden" magic, "too powerful for mortals to tamper with," right up until we realized we needed all that power after all. Like a pacifist finally picking up a flail to defend himself, only to bash himself in the head with it, our lack of familiarity led to catastrophe. My arguments have just gotten me blank stares and an increasing amount of whispering behind my back (aside from a young couple whose abrupt departure might've been inspired by a particularly passionate rant in response to a lecture on "ethics"). Some of them have even resorted to deflecting my arguments, blaming them on my lack of magical power and saying I've spent too much time working on my drolem! They think they can inspire the world and protect it from danger without getting their hands dirty; the orc invasions proved that, no, they can't, and I fear that if the demons ever start arriving in full force, we'll be even more woefully unprepared for it. We even cower from the Ziguranth, no matter how many people die from diseases our healers could cure if they could roam freely, and no matter how easily we could find a way around their defenses if we started capturing a few of their agents. @@ -55,8 +55,8 @@ Well, I won't have it. I've been selling potions and inscriptions on the side f newLore{ id = "tannen-level3", category = "tannen's tower", - name = "Personal note (2)", - lore = [[ + name = _t"Personal note (2)", + lore = _t[[ Well... that was interesting. Setting up a portal took surprisingly little effort - conjured replicas of a Blood-Runed Athame and a Resonating Diamond work perfectly for setting up a portal, as it turns out, even if it burns them out after making just one. This solution wouldn't work for the Orb of Many Ways, given that if it shorts out after one use, that means you're trapped on the other side of the portal, so I started working on a more tangible replica. I noticed that most of them were disrupted by some form of interference, maybe echoes from the Spellblaze; my latest attempt at a more permanent orb was more of a curiosity than anything, an attempt to use those waves as constructive interference to lock onto their source. I tossed a bandit through (my drolem's flight and relative silence have proven to be very convenient for securing test subjects!) with it tied to him, expecting him to pop into some magical maelstrom, quickly teleport back, and promptly die of terrible burn wounds (like the last four). @@ -73,8 +73,8 @@ Now, I just need to get a genuine orb before the demons catch on...]], newLore{ id = "tannen-level4", category = "tannen's tower", - name = "Demon Orders", - lore = [[Order to the Portal Excursion Team: + name = _t"Demon Orders", + lore = _t[[Order to the Portal Excursion Team: This egotistical human has proven to be very valuable. We gave him only a very limited amount of data, and yet he still thinks he has the upper hand, thinking he could trick us by giving us faulty information. No matter - the plans we gave him for a portal altar are feeding their measurements straight to us every time he uses them. Every time he runs an experiment, we get much closer to devising a way to penetrate Eyal's shield; even the data we already have is enough to take us through one at a time, with the prohibitive limitation of creating a new Orb of Many Ways for each prospective invader. diff --git a/game/modules/tome/data/lore/trollmire.lua b/game/modules/tome/data/lore/trollmire.lua index 56ec8fab74f1792233cc98a1bdbc47a502b02838..d3377338040ed9d1a2bad7056036e50b61cc6843 100644 --- a/game/modules/tome/data/lore/trollmire.lua +++ b/game/modules/tome/data/lore/trollmire.lua @@ -24,8 +24,8 @@ newLore{ id = "trollmire-note-1", category = "trollmire", - name = "tattered paper scrap (trollmire)", - lore = [[You find a tattered page scrap. Perhaps this is part of a diary entry. + name = _t"tattered paper scrap (trollmire)", + lore = _t[[You find a tattered page scrap. Perhaps this is part of a diary entry. "...is a gorgeous glade, but I could swear that looked like a part of a human femur. ... @@ -36,8 +36,8 @@ Saw an absolutely gigantic troll, but fortunately I threw him off my scent."]], newLore{ id = "trollmire-note-2", category = "trollmire", - name = "tattered paper scrap (trollmire)", - lore = [[You find a tattered page scrap. Perhaps this is part of a diary entry. + name = _t"tattered paper scrap (trollmire)", + lore = _t[[You find a tattered page scrap. Perhaps this is part of a diary entry. "...ack again, but he's just a stupid old troll. It'll be easy to not let him get wind of me. ... @@ -48,8 +48,8 @@ newLore{ newLore{ id = "trollmire-note-3", category = "trollmire", - name = "tattered paper scrap (trollmire)", - lore = [[You find a tattered page scrap. Perhaps this is part of a diary entry. + name = _t"tattered paper scrap (trollmire)", + lore = _t[[You find a tattered page scrap. Perhaps this is part of a diary entry. "...writing this in a tree and he's at the bottom of it. Waiting. His club is the size of a tall dwarf. Don't think I'm going to make it..." Alongside the note is a part of a plan of the region.]], diff --git a/game/modules/tome/data/lore/zigur.lua b/game/modules/tome/data/lore/zigur.lua index 0f9374646d7a1215489ff8970014debc906c7f48..e64888adc644116423ddae2ee24b52a7d81372a8 100644 --- a/game/modules/tome/data/lore/zigur.lua +++ b/game/modules/tome/data/lore/zigur.lua @@ -24,8 +24,8 @@ newLore{ id = "zigur-post", category = "zigur", - name = "Rules of the Ziguranth", - lore = [[1. You will not talk about Zigur to the wider world, lest evil ears be listening. + name = _t"Rules of the Ziguranth", + lore = _t[[1. You will not talk about Zigur to the wider world, lest evil ears be listening. 2. You will shun the use of all spells and witchcraft. 3. You will shun the use of magic-cursed items. 4. You will shun the baneful influence of arcane runes and burn any skin that comes in contact with them. @@ -43,8 +43,8 @@ These are the rules we live by, these are the rules by which we will save our wo newLore{ id = "zigur-history", category = "zigur", - name = "The Great Evil", - lore = [[We live in a world of wonders. All around us are natural energies and wild powers that are a marvel to see and experience. Soaring birds, mighty bears and ice-breathing dragons all abound in towering mountains, deep oceans and luscious forests. And we are part of this glorious environment, with our thoughts and strengths and all our wondrous capabilities. Truly we live in a fantastic world, and we should be glad to have a place amongst the wonders of Maj'Eyal. + name = _t"The Great Evil", + lore = _t[[We live in a world of wonders. All around us are natural energies and wild powers that are a marvel to see and experience. Soaring birds, mighty bears and ice-breathing dragons all abound in towering mountains, deep oceans and luscious forests. And we are part of this glorious environment, with our thoughts and strengths and all our wondrous capabilities. Truly we live in a fantastic world, and we should be glad to have a place amongst the wonders of Maj'Eyal. But some are not content. Some seek to pervert the wonders of the world with unnatural powers. With arcane forces they rip the threads of nature apart and sew it back however they see fit, uncaring of the damage they cause. Sometimes it is out of curiosity or a misplaced desire to do good, but normally it is out of greed and malice and a perverse obsession with power. Even those who enter into the banes of magic with good intentions inevitably end up doing harm and becoming themselves corrupted by the gross forces they tamper in. @@ -68,8 +68,8 @@ We must never forget the terrors of the Great Evil, and the suffering brought up newLore{ id = "zigur-potion", category = "zigur", - name = "The story of my salvation", - lore = [[I used to be a potion merchant in Derth. I brewed alchemical tonics and elixirs for locals and travellers. My trade was good, and I lived very happily from the gold I earned. For a young woman to have such a business I was very proud. + name = _t"The story of my salvation", + lore = _t[[I used to be a potion merchant in Derth. I brewed alchemical tonics and elixirs for locals and travellers. My trade was good, and I lived very happily from the gold I earned. For a young woman to have such a business I was very proud. One day however several people in the town fell ill from a mystery disease. Rumours spread that my potions were to blame, and people stopped coming to my shop. My business was in ruins, and I soon ran the risk of becoming destitute. Then one of the elders died, and though he had been ill for some time, I was blamed for his death. People said I had laid a hex on him, and murmurs arose of witchcraft. @@ -90,8 +90,8 @@ I have no voice now to tell my story to others, and so I write it down instead, newLore{ id = "zigur-purging-trap", category = "zigur", - name = "Purging Trap", - lore = [[[As you begin to leave, Protector Myssil stops you.] + name = _t"Purging Trap", + lore = _t[[[As you begin to leave, Protector Myssil stops you.] Actually... You fight in a more subtle way than most, do you not? It is a point of pride for many of us that we stand tall in the face of arcane aggression and give warlocks one chance to repent before purging them, and much of our training reflects that, but I won't deny that less... #{italic}#traditionally glorious#{normal}# methods can be extremely effective. Decorum's no reason to let a necromancer get away alive when you could've planted a trap in their escape route. diff --git a/game/modules/tome/data/maps/towns/gates-of-morning.lua b/game/modules/tome/data/maps/towns/gates-of-morning.lua index 143596fac72849d84195d6403576129a060a2fa1..ff1ef146471cf8568749f9e618ef660c520bc9bd 100644 --- a/game/modules/tome/data/maps/towns/gates-of-morning.lua +++ b/game/modules/tome/data/maps/towns/gates-of-morning.lua @@ -49,7 +49,8 @@ defineTile('@', "GRASS", nil, "HIGH_SUN_PALADIN_AERYN") defineTile('j', "GRASS", nil, mod.class.NPC.new{ type = "humanoid", subtype = "elf", display = "p", color=colors.RED, - name = "Limmir the Jeweler", + name = _t"Limmir the Jeweler", + image = "npc/humanoid_elf_limmir_the_jeweler.png", size_category = 3, rank = 3, ai = "simple", faction = "sunwall", @@ -60,7 +61,8 @@ defineTile('j', "GRASS", nil, mod.class.NPC.new{ defineTile('s', "FLOOR", nil, mod.class.NPC.new{ type = "humanoid", subtype = "human", display = "p", color=colors.BLUE, - name = "Melnela", + name = _t"Melnela", + image = "npc/humanoid_human_melnela.png", female = true, size_category = 3, rank = 2, ai = "simple", diff --git a/game/modules/tome/data/maps/towns/last-hope.lua b/game/modules/tome/data/maps/towns/last-hope.lua index f9a68e84c30208d08bd7874577085ff872101c44..32bf53961864cbeb5b47f822b2dd253971836c2c 100644 --- a/game/modules/tome/data/maps/towns/last-hope.lua +++ b/game/modules/tome/data/maps/towns/last-hope.lua @@ -17,10 +17,10 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -quickEntity('@', {show_tooltip=true, name="Statue of King Tolak the Fair", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statues/statue_tolak.png", z=18, display_y=-1, display_h=2}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then game.party:learnLore("last-hope-tolak-statue") end return true end}) -quickEntity('Z', {show_tooltip=true, name="Statue of King Toknor the Brave", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statues/statue_toknor.png", z=18, display_y=-1, display_h=2}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then game.party:learnLore("last-hope-toknor-statue") end return true end}) -quickEntity('Y', {show_tooltip=true, name="Statue of Queen Mirvenia the Inspirer", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statues/statue_mirvenia.png", z=18, display_y=-1, display_h=2}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then game.party:learnLore("last-hope-mirvenia-statue") end return true end}) -quickEntity('X', {show_tooltip=true, name="Declaration of the Unification of the Allied Kingdoms", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statues/monument_allied_kingdoms.png", z=18, display_y=-1, display_h=2}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then game.party:learnLore("last-hope-allied-kingdoms-foundation") end return true end}) +quickEntity('@', {show_tooltip=true, name=_t"Statue of King Tolak the Fair", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statues/statue_tolak.png", z=18, display_y=-1, display_h=2}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then game.party:learnLore("last-hope-tolak-statue") end return true end}) +quickEntity('Z', {show_tooltip=true, name=_t"Statue of King Toknor the Brave", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statues/statue_toknor.png", z=18, display_y=-1, display_h=2}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then game.party:learnLore("last-hope-toknor-statue") end return true end}) +quickEntity('Y', {show_tooltip=true, name=_t"Statue of Queen Mirvenia the Inspirer", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statues/statue_mirvenia.png", z=18, display_y=-1, display_h=2}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then game.party:learnLore("last-hope-mirvenia-statue") end return true end}) +quickEntity('X', {show_tooltip=true, name=_t"Declaration of the Unification of the Allied Kingdoms", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statues/monument_allied_kingdoms.png", z=18, display_y=-1, display_h=2}}, color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then game.party:learnLore("last-hope-allied-kingdoms-foundation") end return true end}) -- defineTile section defineTile("<", "GRASS_UP_WILDERNESS") diff --git a/game/modules/tome/data/maps/towns/shatur.lua b/game/modules/tome/data/maps/towns/shatur.lua index 0a66a8a33acb954c295c2f351b1bdcb221ab48c1..40a76647b689e7d63fd7706bb408a99f2a2654f7 100644 --- a/game/modules/tome/data/maps/towns/shatur.lua +++ b/game/modules/tome/data/maps/towns/shatur.lua @@ -25,7 +25,7 @@ defineTile('~', "DEEP_WATER") defineTile('.', "GRASS") defineTile('_', "COBBLESTONE") -quickEntity('@', {show_tooltip=true, name="Moss covered statue", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statue3.png"}}, color=colors.GREEN, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then game.party:learnLore("thaloren-lament") end return true end}) +quickEntity('@', {show_tooltip=true, name=_t"Moss covered statue", display='@', image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/statue3.png"}}, color=colors.GREEN, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then game.party:learnLore("thaloren-lament") end return true end}) defineTile('2', "ROCKY_GROUND", nil, nil, "SWORD_WEAPON_STORE") defineTile('3', "ROCKY_GROUND", nil, nil, "MAUL_WEAPON_STORE") diff --git a/game/modules/tome/data/maps/vaults/auto/greater/living-weapons.lua b/game/modules/tome/data/maps/vaults/auto/greater/living-weapons.lua index 6c3a8792647ac89b68466909870ebd9db612cf97..3aa0e2da0ba9175aaaa3452de0e867c276fad10d 100644 --- a/game/modules/tome/data/maps/vaults/auto/greater/living-weapons.lua +++ b/game/modules/tome/data/maps/vaults/auto/greater/living-weapons.lua @@ -199,7 +199,7 @@ local make_poltergeist = function(type) e[#e+1] = resolvers.auto_equip_filters(class) if type == "greater" then - e.name = "Poltergeist " .. o.name + e.name = ("Poltergeist %s"):tformat(_t(o.name)) e.rank = 3.5 e.max_life = resolvers.rngavg(100,120) e.life_rating = 20 @@ -209,7 +209,7 @@ local make_poltergeist = function(type) {class=(rng.percent(65) and "Cursed" or "Doomed"), start_level=20, level_rate=40} } elseif type == "normal" then - e.name = "Animated " .. o.name + e.name = ("Animated %s"):tformat(_t(o.name)) e.rank = 3 e.max_life = resolvers.rngavg(80,100) e.life_rating = 15 @@ -217,7 +217,7 @@ local make_poltergeist = function(type) {class=class, start_level=10, level_rate=50} } else - e.name = "Moving " .. o.name + e.name = ("Moving %s"):tformat(_t(o.name)) e.rank = 2 e.max_life = resolvers.rngavg(60,80) e.life_rating = 12 @@ -230,7 +230,7 @@ local make_poltergeist = function(type) local filter = {type="gem", ignore_material_restriction=true,special=function(ee) return ee.material_level == o.material_level end} gem = game.zone:makeEntity(game.level, "object", filter, nil, true) imbueEgo(gem, o) - o.name = "Poltergeist's " .. o.name + o.name = ("Poltergeist's %s"):tformat(_t(o.name)) end local qo = nil --if class == diff --git a/game/modules/tome/data/maps/vaults/auto/greater/paladin-vs-vampire.lua b/game/modules/tome/data/maps/vaults/auto/greater/paladin-vs-vampire.lua index 436e15e956564ee31f5261f178d1def6da725a16..59f2271b5fa0b3bd1b7f2f92f68f4a6ebb5868fd 100644 --- a/game/modules/tome/data/maps/vaults/auto/greater/paladin-vs-vampire.lua +++ b/game/modules/tome/data/maps/vaults/auto/greater/paladin-vs-vampire.lua @@ -31,7 +31,7 @@ specialList("actor", { }, true) defineTile('~', mod.class.Grid.new{ define_as = "NECRO", - name = "corrupted lava floor", image = "terrain/lava_floor.png", + name = _t"corrupted lava floor", image = "terrain/lava_floor.png", display = '.', color=colors.RED, back_color=colors.DARK_GREY, shader = "lava", mindam = resolvers.mbonus(5, 15), @@ -45,7 +45,7 @@ defineTile('~', mod.class.Grid.new{ --add undead local m = game.zone:makeEntityByName(game.level, "actor", "RISEN_CORPSE") game.zone:addEntity(game.level, m, "actor", x, y) - game.logSeen(m, "The corrupted lava reanimates %s's corpse!", who.name:capitalize()) + game.logSeen(m, "The corrupted lava reanimates %s's corpse!", who:getName():capitalize()) end end, }) @@ -53,10 +53,11 @@ defineTile('~', mod.class.Grid.new{ defineTile('S', "FLOOR", nil, mod.class.NPC.new{ type = "humanoid", subtype = "human", display = "p", color=colors.GOLD, - name = "human sun-paladin", + name = _t"human sun-paladin", + image = "npc/humanoid_human_human_sun_paladin.png", faction = "sunwall", hard_faction = "sunwall", body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, - desc = [[A Human in shining plate armour.]], + desc = _t[[A Human in shining plate armour.]], level_range = {10, nil}, exp_worth = 1, rank = 2, size_category = 3, diff --git a/game/modules/tome/data/maps/vaults/auto/greater/portal-vault.lua b/game/modules/tome/data/maps/vaults/auto/greater/portal-vault.lua index ae779d1f68ff812a73085827b4489dab6ba1003a..74b82fe817fa53d4e0aa76e7e98f34a0190476b7 100644 --- a/game/modules/tome/data/maps/vaults/auto/greater/portal-vault.lua +++ b/game/modules/tome/data/maps/vaults/auto/greater/portal-vault.lua @@ -97,11 +97,11 @@ local trigger = function(self, who) if not tx then game.logPlayer(who, "#YELLOW#The Portal repels you briefly before becoming quiescent. The other side seems to be blocked.") else - require("engine.ui.Dialog"):yesnoPopup("Malevolent Portal", "An ominous aura emanates from this portal. Are you sure you want to go through?", function(ret) if ret then + require("engine.ui.Dialog"):yesnoPopup(_t"Malevolent Portal", _t"An ominous aura emanates from this portal. Are you sure you want to go through?", function(ret) if ret then game.logPlayer(who, "#YELLOW#You overcome intense #LIGHT_BLUE#REPULSIVE FORCES#LAST# as you traverse the Portal.") game:playSoundNear(who, "talents/distortion") who:move(tx, ty, true) - end end, "Teleport", "Cancel") + end end, _t"Teleport", _t"Cancel") end end else @@ -129,8 +129,8 @@ TeleportIn = mod.class.Grid.new{ define_as = "VAULT_TELEPORTER_IN", __position_aware = true, type = "floor", subtype = "floor", - name = "Portal", image = "terrain/marble_floor.png", add_displays={mod.class.Grid.new{z=5, image = "terrain/demon_portal.png"}}, - desc = "A strange portal to some place else.", + name = _t"Portal", image = "terrain/marble_floor.png", add_displays={mod.class.Grid.new{z=5, image = "terrain/demon_portal.png"}}, + desc = _t"A strange portal to some place else.", show_tooltip = true, always_remember = true, notice = true, display='&', color_r=225, color_g=0, color_b=255, on_move = move_trigger, @@ -147,8 +147,8 @@ TeleportOut = mod.class.Grid.new{ define_as = "VAULT_TELEPORTER_OUT", __position_aware = true, type = "floor", subtype = "floor", - name = "Portal", image = "terrain/marble_floor.png", add_displays={mod.class.Grid.new{z=5, image = "terrain/demon_portal4.png"}}, - desc = "A portal out of this place.", + name = _t"Portal", image = "terrain/marble_floor.png", add_displays={mod.class.Grid.new{z=5, image = "terrain/demon_portal4.png"}}, + desc = _t"A portal out of this place.", show_tooltip = true, always_remember = true, notice = true, display='&', color_r=225, color_g=0, color_b=255, on_move = move_trigger, diff --git a/game/modules/tome/data/maps/vaults/auto/greater/sleeping-dragons.lua b/game/modules/tome/data/maps/vaults/auto/greater/sleeping-dragons.lua index a7caffd9d179c18aeb318eafd023298b2f3097aa..18307268d272b82068c12afef98f3fd1dd9dc0b9 100644 --- a/game/modules/tome/data/maps/vaults/auto/greater/sleeping-dragons.lua +++ b/game/modules/tome/data/maps/vaults/auto/greater/sleeping-dragons.lua @@ -120,7 +120,7 @@ defineTile('W', "FLOOR", nil, end, random_filter={special_rarity="wyrm_rarity", add_levels=10, - random_boss={name_scheme="Sleeping #rng#", force_classes={Wyrmic=true}, class_filter=function(d) return d.power_source and ((d.power_source.nature or d.power_source.technique) and not d.power_source.arcane) and d.name ~= "Wyrmic" end, loot_quality="store", loot_quantity=1, rank=3.5} + random_boss={name_scheme=_t"Sleeping #rng#", force_classes={Wyrmic=true}, class_filter=function(d) return d.power_source and ((d.power_source.nature or d.power_source.technique) and not d.power_source.arcane) and d.name ~= "Wyrmic" end, loot_quality="store", loot_quantity=1, rank=3.5} } } ) @@ -135,7 +135,7 @@ defineTile('D', "FLOOR", nil, return e end, random_filter={special_rarity="drake_rarity", - random_boss={name_scheme="Dozing #rng#", force_classes={Wyrmic=true}, class_filter=function(d) return d.power_source and ((d.power_source.nature or d.power_source.technique) and not d.power_source.arcane) and d.name ~= "Wyrmic" end, nb_classes=1, loot_quality="store", loot_quantity=1, rank=3.5} + random_boss={name_scheme=_t"Dozing #rng#", force_classes={Wyrmic=true}, class_filter=function(d) return d.power_source and ((d.power_source.nature or d.power_source.technique) and not d.power_source.arcane) and d.name ~= "Wyrmic" end, nb_classes=1, loot_quality="store", loot_quantity=1, rank=3.5} } } ) diff --git a/game/modules/tome/data/maps/vaults/auto/lesser/loot-vault.lua b/game/modules/tome/data/maps/vaults/auto/lesser/loot-vault.lua index af53b05be78f7aac5231550fd060d8fb741fb23e..2404d63d72431f6ff52e8ccfebe458d70e26f6f3 100644 --- a/game/modules/tome/data/maps/vaults/auto/lesser/loot-vault.lua +++ b/game/modules/tome/data/maps/vaults/auto/lesser/loot-vault.lua @@ -57,11 +57,11 @@ if rng.percent(66) then else local lore = mod.class.Object.new{ type = "lore", subtype="lore", - unided_name = "scroll", identified=true, + unided_name = _t"scroll", identified=true, display = "?", color=colors.ANTIQUE_WHITE, image="object/scroll.png", encumber = 0, - name = "Mocking Note", lore="loot-vault-empty", - desc = [[A small scrap of paper written in a mocking tone.]], + name = _t"Mocking Note", lore="loot-vault-empty", + desc = _t[[A small scrap of paper written in a mocking tone.]], level_range = {1, 20}, rarity = false, } diff --git a/game/modules/tome/data/maps/vaults/collapsed-tower.lua b/game/modules/tome/data/maps/vaults/collapsed-tower.lua index 46aec8265b072849e244fc011c20614de2b9e5a2..74dbd010c2074f438e34f460066567e05f609e02 100644 --- a/game/modules/tome/data/maps/vaults/collapsed-tower.lua +++ b/game/modules/tome/data/maps/vaults/collapsed-tower.lua @@ -47,7 +47,7 @@ local turret = function(version) level_range = {1, nil}, exp_worth = 1, stats = { mag=16, con=22 }, size_category = 2, - name = "elemental crystal", color=colors.BLUE, + name = _t"elemental crystal", color=colors.BLUE, combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, combat_armor = 10, combat_def = 0, talent_cd_reduction={[Talents.T_ELEMENTAL_BOLT]=3, }, @@ -63,7 +63,7 @@ end local stairs = function() local terrains = mod.class.Grid:loadList("/data/general/grids/basic.lua") return game.state:dynamicZoneEntry(terrains.UP, "collapsed-tower", { - name = "collapsed tower", + name = _t"collapsed tower", level_range = {game.zone.base_level, game.zone.base_level}, __applied_difficulty = true, -- Difficulty already applied to parent zone level_scheme = "player", @@ -92,7 +92,7 @@ local stairs = function() trap_list = {"/data/general/traps/natural_forest.lua"}, }, function(zone, goback) - goback("stairs back to %s", zone.grid_list.DOWN) + goback(_t"stairs back to %s", zone.grid_list.DOWN) end) end diff --git a/game/modules/tome/data/maps/vaults/greater-crypt.lua b/game/modules/tome/data/maps/vaults/greater-crypt.lua index 68d5f626ac6dbeeb4afb4106165c0de9cb666f73..b74b7fda0eb3a1ab5d9f25a9fd28381710d1e70f 100644 --- a/game/modules/tome/data/maps/vaults/greater-crypt.lua +++ b/game/modules/tome/data/maps/vaults/greater-crypt.lua @@ -84,7 +84,7 @@ defineTile('1', mod.class.Grid.new{ end actor:move(fx, fy, true) - game.logPlayer(actor, "Something in the floor clicks ominously%s", actor.lite > 0 and not actor:attr("blind") and ", and suddenly the world spins around you!" or ".") + game.logPlayer(actor, "Something in the floor clicks ominously%s", actor.lite > 0 and not actor:attr("blind") and _t", and suddenly the world spins around you!" or ".") local g = game.zone:makeEntityByName(game.level, "terrain", "FLOOR") if not g then return end game.zone:addEntity(game.level, g, "terrain", x, y) @@ -115,7 +115,7 @@ defineTile('2', mod.class.Grid.new{ game.zone:addEntity(game.level, f, "terrain", x, y) game.nicer_tiles:updateAround(game.level, x, y) - game.logPlayer(actor, "Something in the floor clicks ominously%s", actor.lite > 0 and not actor:attr("blind") and ", and the crypt rearranges itself around you!" or ".") + game.logPlayer(actor, "Something in the floor clicks ominously%s", actor.lite > 0 and not actor:attr("blind") and _t", and the crypt rearranges itself around you!" or ".") end, } @@ -167,7 +167,7 @@ defineTile('4', mod.class.Grid.new{ game.zone:addEntity(game.level, f, "terrain", x, y) game.nicer_tiles:updateAround(game.level, x, y) - game.logPlayer(actor, "Something in the floor clicks ominously%s", actor.lite > 0 and not actor:attr("blind") and ", and the crypt rearranges itself around you!" or ".") + game.logPlayer(actor, "Something in the floor clicks ominously%s", actor.lite > 0 and not actor:attr("blind") and _t", and the crypt rearranges itself around you!" or ".") end, } ) diff --git a/game/modules/tome/data/maps/vaults/grushnak-armory.lua b/game/modules/tome/data/maps/vaults/grushnak-armory.lua index 166d9b556aa257434d49c070f53005e13630c022..e6e5b5af5e58bb365e65e524d2138e73448917f5 100644 --- a/game/modules/tome/data/maps/vaults/grushnak-armory.lua +++ b/game/modules/tome/data/maps/vaults/grushnak-armory.lua @@ -36,12 +36,12 @@ defineTile('+', "DOOR") defineTile('!', "DOOR_VAULT") defineTile('#', "HARDWALL") -defineTile('G', "FLOOR", {random_filter={add_levels=5, tome_mod="uvault"}}, {random_filter={add_levels=15, name = "orc archer", random_boss={name_scheme="#rng# the Archer", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=3.5, force_classes={Archer=true}}}} ) -defineTile('B', "FLOOR", {random_filter={add_levels=5, tome_mod="uvault"}}, {random_filter={add_levels=12, name = "war bear", random_boss={name_scheme="Warbear #rng#", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, ai_move="move_complex", rank=3.5, force_classes={Brawler=true}}}} ) +defineTile('G', "FLOOR", {random_filter={add_levels=5, tome_mod="uvault"}}, {random_filter={add_levels=15, name = "orc archer", random_boss={name_scheme=_t"#rng# the Archer", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=3.5, force_classes={Archer=true}}}} ) +defineTile('B', "FLOOR", {random_filter={add_levels=5, tome_mod="uvault"}}, {random_filter={add_levels=12, name = "war bear", random_boss={name_scheme=_t"Warbear #rng#", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, ai_move="move_complex", rank=3.5, force_classes={Brawler=true}}}} ) defineTile('o', "FLOOR", nil, nil, {random_filter={name="sliding rock"}}) -defineTile('T', "FLOOR", {random_filter={add_levels=15, tome_mod="uvault"}}, {random_filter={add_levels=16, name = "orc elite fighter", random_boss={name_scheme="Elite Combat Trainer #rng#", force_classes={Bulwark=true}, nb_classes=2, class_filter=function(d) return d.power_source and d.power_source.technique and not d.power_source.arcane and d.name ~= "Bulwark" end, loot_quality="store", loot_quantity=1, loot_unique=true, no_loot_randart=true, rank=4}}}) +defineTile('T', "FLOOR", {random_filter={add_levels=15, tome_mod="uvault"}}, {random_filter={add_levels=16, name = "orc elite fighter", random_boss={name_scheme=_t"Elite Combat Trainer #rng#", force_classes={Bulwark=true}, nb_classes=2, class_filter=function(d) return d.power_source and d.power_source.technique and not d.power_source.arcane and d.name ~= "Bulwark" end, loot_quality="store", loot_quantity=1, loot_unique=true, no_loot_randart=true, rank=4}}}) defineTile('t', "FLOOR", {random_filter={add_levels=20, type="money"}}, {random_filter={add_levels=5, name = "orc elite fighter"}}) -defineTile('C', "FLOOR", {random_filter={add_levels=15, tome_mod="uvault"}}, {random_filter={add_levels=16, name = "orc elite berserker", random_boss={name_scheme="Elite Combat Trainer #rng#", force_classes={Berserker=true}, nb_classes=2, class_filter=function(d) return d.power_source and d.power_source.technique and not d.power_source.arcane and d.name ~= "Berserker" end, loot_quality="store", loot_quantity=1, loot_unique=true, no_loot_randart=true, rank=4}}}) +defineTile('C', "FLOOR", {random_filter={add_levels=15, tome_mod="uvault"}}, {random_filter={add_levels=16, name = "orc elite berserker", random_boss={name_scheme=_t"Elite Combat Trainer #rng#", force_classes={Berserker=true}, nb_classes=2, class_filter=function(d) return d.power_source and d.power_source.technique and not d.power_source.arcane and d.name ~= "Berserker" end, loot_quality="store", loot_quantity=1, loot_unique=true, no_loot_randart=true, rank=4}}}) defineTile('c', "FLOOR", {random_filter={add_levels=20, type="money"}}, {random_filter={add_levels=5, name = "orc elite berserker"}}) defineTile('D', "TRAINING_DUMMY") defineTile('w', "FLOOR", {random_filter={type='weapon', add_levels=16, tome_mod="gvault"}}) diff --git a/game/modules/tome/data/maps/vaults/lava_island.lua b/game/modules/tome/data/maps/vaults/lava_island.lua index 9bc44acd66179b1a054db858a90648e97a156e0e..b85ad428edcac2f7fcf8b5f19d014754233a88ab 100644 --- a/game/modules/tome/data/maps/vaults/lava_island.lua +++ b/game/modules/tome/data/maps/vaults/lava_island.lua @@ -34,7 +34,7 @@ defineTile('T', "PALMTREE") defineTile('1', "SAND", nil, {random_filter={name="fire imp", add_levels=4}}) defineTile('2', "SAND", nil, {random_filter={name="quasit", add_levels=4}}) -defineTile('U', "SAND", {random_filter={name="voratun ring", ignore_material_restriction=true, ego_chance=-1000}}, {random_filter={name="uruivellas", random_elite={name_scheme="#rng# the Witherer", class_filter=function(d) return d.name == "Corruptor" or d.name == "Reaver" end, post=function(b) b:forceUseTalent(b.T_SUSPENDED, {ignore_energy=true}) end}, add_levels=12}}) +defineTile('U', "SAND", {random_filter={name="voratun ring", ignore_material_restriction=true, ego_chance=-1000}}, {random_filter={name="uruivellas", random_elite={name_scheme=_t"#rng# the Witherer", class_filter=function(d) return d.name == "Corruptor" or d.name == "Reaver" end, post=function(b) b:forceUseTalent(b.T_SUSPENDED, {ignore_energy=true}) end}, add_levels=12}}) return { [[..T............T.TT.]], diff --git a/game/modules/tome/data/maps/vaults/renegade-pyromancers.lua b/game/modules/tome/data/maps/vaults/renegade-pyromancers.lua index cf0a1397ddd8b6179a36f275eb2663a16221412d..83a3d021f2598250c967df03351c8ba3ae3d7af2 100644 --- a/game/modules/tome/data/maps/vaults/renegade-pyromancers.lua +++ b/game/modules/tome/data/maps/vaults/renegade-pyromancers.lua @@ -46,9 +46,9 @@ defineTile('*', "BURNT_GROUND", {random_filter={add_levels=5, tome_mod="uvault"} defineTile('P', "LAVA_FLOOR", {random_filter={add_levels=25, tome_mod="uvault"}}, {random_filter={add_levels=22, name = "Phoenix"}}) --fierce guardian being summoned--triple class ultimate faeros -defineTile('F', "LAVA_FLOOR", {random_filter={add_levels=25, tome_mod="uvault"}}, {random_filter={add_levels=10, name = "ultimate faeros", random_boss={name_scheme="#rng# the Flamebringer", force_classes={Archmage=true}, nb_classes=2, class_filter=function(d) return d.power_source and (d.power_source.arcane and not d.power_source.technique) and d.name ~= "Archmage" end, ai_move="move_complex", rank=4}}}) +defineTile('F', "LAVA_FLOOR", {random_filter={add_levels=25, tome_mod="uvault"}}, {random_filter={add_levels=10, name = "ultimate faeros", random_boss={name_scheme=_t"#rng# the Flamebringer", force_classes={Archmage=true}, nb_classes=2, class_filter=function(d) return d.power_source and (d.power_source.arcane and not d.power_source.technique) and d.name ~= "Archmage" end, ai_move="move_complex", rank=4}}}) defineTile('f', "BURNT_GROUND", nil, {random_filter={add_levels=5, name = "greater faeros"}} ) -defineTile('M', "BURNT_GROUND", {random_filter={add_levels=12, tome_mod="uvault"}}, {random_filter={add_levels=7, name = "orc high pyromancer", random_boss={name_scheme="#rng# the Invoker", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=3.5, force_classes={Archmage=true}}}}) +defineTile('M', "BURNT_GROUND", {random_filter={add_levels=12, tome_mod="uvault"}}, {random_filter={add_levels=7, name = "orc high pyromancer", random_boss={name_scheme=_t"#rng# the Invoker", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=3.5, force_classes={Archmage=true}}}}) defineTile('m', "BURNT_GROUND", nil, {random_filter={add_levels=5, name = "orc pyromancer"}} ) if rng.percent(7) then --rare phoenix-7% to show in here plus 35% this vault shows gives 2.5% chance per game for a phoenix from one of these diff --git a/game/modules/tome/data/maps/vaults/renegade-undead.lua b/game/modules/tome/data/maps/vaults/renegade-undead.lua index 730c19d7cf15d4244d0de147bc71cd82a47944db..77c679ab90244786f8080d53b2c08b3b479878aa 100644 --- a/game/modules/tome/data/maps/vaults/renegade-undead.lua +++ b/game/modules/tome/data/maps/vaults/renegade-undead.lua @@ -45,10 +45,10 @@ defineTile('b', "BONEFLOOR", {random_filter={add_levels=20, type="money"}}, {ran defineTile('g', "BONEFLOOR", {random_filter={add_levels=20, type="money"}}, {random_filter={add_levels=12, name = "ghoulking"}}) defineTile('n', "BONEFLOOR", {random_filter={add_levels=20, type="money"}}, {random_filter={add_levels=12, name = "orc necromancer"}}) defineTile('l', "BONEFLOOR", {random_filter={add_levels=20, tome_mod="uvault"}}, {random_filter={add_levels=33, name = "lich"}}) -defineTile('N', "BONEFLOOR", {random_filter={add_levels=12, tome_mod="uvault"}}, {random_filter={add_levels=22, name = "orc necromancer", random_boss={name_scheme="Grand Necromancer #rng#", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=3.5, force_classes={Necromancer=true}}}} ) -defineTile('C', "BONEFLOOR", {random_filter={add_levels=12, tome_mod="uvault"}}, {random_filter={add_levels=16, name = "orc blood mage", random_boss={name_scheme="Inquisitor #rng#", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=3.5, force_classes={Corruptor=true}}}} ) -defineTile('M', "BONEFLOOR", {random_filter={add_levels=12, tome_mod="uvault"}}, {random_filter={add_levels=25, name = "sanguine horror", random_boss={name_scheme="#rng# the Tortured Mass", nb_classes=2, class_filter=function(d) return d.power_source and d.power_source.arcane and not d.power_source.technique and d.name ~= "Corruptor" end, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=4, force_classes={Corruptor=true}}}} ) -defineTile('T', "BONEFLOOR", {random_filter={add_levels=12, tome_mod="uvault"}}, {random_filter={add_levels=25, name = "bone horror", random_boss={name_scheme="Tortured Mass #rng#", nb_classes=2, class_filter=function(d) return d.power_source and d.power_source.arcane and d.power_source.technique and d.name ~= "Reaver" end, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=4, force_classes={Reaver=true}}}} ) +defineTile('N', "BONEFLOOR", {random_filter={add_levels=12, tome_mod="uvault"}}, {random_filter={add_levels=22, name = "orc necromancer", random_boss={name_scheme=_t"Grand Necromancer #rng#", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=3.5, force_classes={Necromancer=true}}}} ) +defineTile('C', "BONEFLOOR", {random_filter={add_levels=12, tome_mod="uvault"}}, {random_filter={add_levels=16, name = "orc blood mage", random_boss={name_scheme=_t"Inquisitor #rng#", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=3.5, force_classes={Corruptor=true}}}} ) +defineTile('M', "BONEFLOOR", {random_filter={add_levels=12, tome_mod="uvault"}}, {random_filter={add_levels=25, name = "sanguine horror", random_boss={name_scheme=_t"#rng# the Tortured Mass", nb_classes=2, class_filter=function(d) return d.power_source and d.power_source.arcane and not d.power_source.technique and d.name ~= "Corruptor" end, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=4, force_classes={Corruptor=true}}}} ) +defineTile('T', "BONEFLOOR", {random_filter={add_levels=12, tome_mod="uvault"}}, {random_filter={add_levels=25, name = "bone horror", random_boss={name_scheme=_t"Tortured Mass #rng#", nb_classes=2, class_filter=function(d) return d.power_source and d.power_source.arcane and d.power_source.technique and d.name ~= "Reaver" end, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=4, force_classes={Reaver=true}}}} ) return { [[.#####....#####]], diff --git a/game/modules/tome/data/maps/vaults/renegade-wyrmics.lua b/game/modules/tome/data/maps/vaults/renegade-wyrmics.lua index de50269f6f5f61f567f5078b6b3b99c7b816d5d0..ad33d126bfa3f11f5cfa60b2dcddc02b40680dd5 100644 --- a/game/modules/tome/data/maps/vaults/renegade-wyrmics.lua +++ b/game/modules/tome/data/maps/vaults/renegade-wyrmics.lua @@ -53,8 +53,8 @@ defineTile('|', "MOUNTAIN_WALL") defineTile('R', "ROCKY_GROUND") local Talents = require("engine.interface.ActorTalents") -defineTile('W', "FENCE_FLOOR", {random_filter={add_levels=15, tome_mod="uvault"}}, {random_filter={add_levels=15, name = "orc master wyrmic", random_boss={name_scheme="#rng# the Herald", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=3.5, force_classes={Wyrmic=true}}}} ) -defineTile('m', "FENCE_FLOOR", {random_filter={add_levels=30, type="money"}}, {random_filter={add_levels=12, name = "orc grand summoner", random_boss={name_scheme="Beastmaster #rng#", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, ai_move="move_complex", rank=3.2, force_classes={Summoner=true}}}} ) +defineTile('W', "FENCE_FLOOR", {random_filter={add_levels=15, tome_mod="uvault"}}, {random_filter={add_levels=15, name = "orc master wyrmic", random_boss={name_scheme=_t"#rng# the Herald", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=3.5, force_classes={Wyrmic=true}}}} ) +defineTile('m', "FENCE_FLOOR", {random_filter={add_levels=30, type="money"}}, {random_filter={add_levels=12, name = "orc grand summoner", random_boss={name_scheme=_t"Beastmaster #rng#", nb_classes=0, loot_quality="store", loot_quantity=1, no_loot_randart=true, ai_move="move_complex", rank=3.2, force_classes={Summoner=true}}}} ) defineTile('F', "LAVA_FLOOR", {random_filter={add_levels=25, tome_mod="uvault"}}, {entity_mod=function(e) e[#e+1] = resolvers.talents{ [Talents.T_BLASTWAVE]={base=4, every=12, max=10}, @@ -62,7 +62,7 @@ defineTile('F', "LAVA_FLOOR", {random_filter={add_levels=25, tome_mod="uvault"}} [Talents.T_CLEANSING_FLAMES]={base=3, every=15, max=8}, [Talents.T_WILDFIRE]={base=3, every=15, max=7},} e:resolve() - return e end, random_filter={add_levels=25, name = "fire wyrm", random_boss={name_scheme="#rng# the Flame Terror", nb_classes=2, class_filter=function(d) return d.power_source and (d.power_source.arcane) and d.name ~= "Sun Paladin" end, loot_quality="store", loot_quantity=1, ai_move="move_complex", rank=4, force_classes={['Sun Paladin']=true}}}} ) + return e end, random_filter={add_levels=25, name = "fire wyrm", random_boss={name_scheme=_t"#rng# the Flame Terror", nb_classes=2, class_filter=function(d) return d.power_source and (d.power_source.arcane) and d.name ~= "Sun Paladin" end, loot_quality="store", loot_quantity=1, ai_move="move_complex", rank=4, force_classes={['Sun Paladin']=true}}}} ) defineTile('f', "BURNT_GROUND", {random_filter={add_levels=20, type="money"}}, {random_filter={add_levels=12, name = "fire drake"}} ) defineTile('S', "CRYSTAL_FLOOR", {random_filter={add_levels=25, tome_mod="uvault"}}, {entity_mod=function(e) e[#e+1] = resolvers.talents{ @@ -72,7 +72,7 @@ defineTile('S', "CRYSTAL_FLOOR", {random_filter={add_levels=25, tome_mod="uvault [Talents.T_TEMPEST]={base=3, every=15, max=7}, [Talents.T_LIVING_LIGHTNING]={base=1, every=20, max=4},} e:resolve() - return e end, random_filter={add_levels=25, name = "storm wyrm", random_boss={name_scheme="#rng# the Storm Terror", nb_classes=2, class_filter=function(d) return d.power_source and (d.power_source.arcane) and d.name ~= "Archmage" end, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=4, force_classes={Archmage=true}}}} ) + return e end, random_filter={add_levels=25, name = "storm wyrm", random_boss={name_scheme=_t"#rng# the Storm Terror", nb_classes=2, class_filter=function(d) return d.power_source and (d.power_source.arcane) and d.name ~= "Archmage" end, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=4, force_classes={Archmage=true}}}} ) defineTile('s', "CRYSTAL_FLOOR", {random_filter={add_levels=20, type="money"}}, {random_filter={add_levels=12, name = "storm drake"}} ) defineTile('C', "ICY_FLOOR", {random_filter={add_levels=25, tome_mod="uvault"}}, {entity_mod=function(e) e[#e+1] = resolvers.talents{ @@ -81,7 +81,7 @@ defineTile('C', "ICY_FLOOR", {random_filter={add_levels=25, tome_mod="uvault"}}, [Talents.T_BODY_OF_ICE]={base=3, every=15, max=8}, [Talents.T_UTTERCOLD]={base=3, every=15, max=7},} e:resolve() - return e end, random_filter={add_levels=25, name = "ice wyrm", random_boss={name_scheme="#rng# the Fozen Terror", nb_classes=2, class_filter=function(d) return d.power_source and (d.power_source.nature or d.power_source.technique) and d.name ~= "Wyrmic" end, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=4, force_classes={Wyrmic=true}}}} ) + return e end, random_filter={add_levels=25, name = "ice wyrm", random_boss={name_scheme=_t"#rng# the Fozen Terror", nb_classes=2, class_filter=function(d) return d.power_source and (d.power_source.nature or d.power_source.technique) and d.name ~= "Wyrmic" end, loot_quality="store", loot_quantity=1, no_loot_randart=true, loot_unique=true, ai_move="move_complex", rank=4, force_classes={Wyrmic=true}}}} ) defineTile('c', "ICY_FLOOR", {random_filter={add_levels=20, type="money"}}, {random_filter={add_levels=12, name = "cold drake"}} ) defineTile('V', "SLIME_FLOOR", {random_filter={add_levels=25, tome_mod="uvault"}}, {entity_mod=function(e) e[#e+1] = resolvers.talents{ @@ -91,7 +91,7 @@ defineTile('V', "SLIME_FLOOR", {random_filter={add_levels=25, tome_mod="uvault"} [Talents.T_ACIDIC_SOIL]={base=3, every=15, max=7}, [Talents.T_UNSTOPPABLE_NATURE]={base=3, every=15, max=7},} e:resolve() - return e end, random_filter={add_levels=25, name = "venom wyrm", random_boss={name_scheme="#rng# the Caustic Terror", nb_classes=2, class_filter=function(d) return d.power_source and (d.power_source.nature) and d.name ~= "Oozemancer" end, loot_quality="store", loot_quantity=1, ai_move="move_complex", rank=4, force_classes={Oozemancer=true}}}} ) + return e end, random_filter={add_levels=25, name = "venom wyrm", random_boss={name_scheme=_t"#rng# the Caustic Terror", nb_classes=2, class_filter=function(d) return d.power_source and (d.power_source.nature) and d.name ~= "Oozemancer" end, loot_quality="store", loot_quantity=1, ai_move="move_complex", rank=4, force_classes={Oozemancer=true}}}} ) defineTile('v', "SLIME_FLOOR", {random_filter={add_levels=20, type="money"}}, {random_filter={add_levels=12, name = "venom drake"}} ) diff --git a/game/modules/tome/data/maps/wilderness/eyal.lua b/game/modules/tome/data/maps/wilderness/eyal.lua index 20c2e50a2124b810499a79e5549f9f3b0263de26..46faf113cd088cd7f13b159f8df27da85db0fe8d 100644 --- a/game/modules/tome/data/maps/wilderness/eyal.lua +++ b/game/modules/tome/data/maps/wilderness/eyal.lua @@ -442,16 +442,16 @@ addSpot({47, 34}, "world-encounter", "conclave-vault") addSpot({14, 25}, "world-encounter", "angolwen-quest") -- addZone section -addZone({1, 1, 78, 43}, "zonename", "Maj'Eyal") -addZone({6, 43, 19, 50}, "zonename", "Maj'Eyal") -addZone({26, 45, 38, 53}, "zonename", "Island of Rel") -addZone({52, 48, 61, 53}, "zonename", "Charred Scar") -addZone({120, 2, 169, 64}, "zonename", "Far East") -addZone({7, 54, 75, 86}, "zonename", "Tar'Eyal") -addZone({11, 51, 21, 54}, "zonename", "Tar'Eyal") -addZone({64, 52, 66, 53}, "zonename", "Tar'Eyal") -addZone({11, 87, 16, 94}, "zonename", "Tar'Eyal") -addZone({40, 43, 66, 47}, "zonename", "Maj'Eyal") +addZone({1, 1, 78, 43}, "zonename", _t"Maj'Eyal") +addZone({6, 43, 19, 50}, "zonename", _t"Maj'Eyal") +addZone({26, 45, 38, 53}, "zonename", _t"Island of Rel") +addZone({52, 48, 61, 53}, "zonename", _t"Charred Scar") +addZone({120, 2, 169, 64}, "zonename", _t"Far East") +addZone({7, 54, 75, 86}, "zonename", _t"Tar'Eyal") +addZone({11, 51, 21, 54}, "zonename", _t"Tar'Eyal") +addZone({64, 52, 66, 53}, "zonename", _t"Tar'Eyal") +addZone({11, 87, 16, 94}, "zonename", _t"Tar'Eyal") +addZone({40, 43, 66, 47}, "zonename", _t"Maj'Eyal") addZone({57, 23, 62, 40}, "world-encounter", "lumberjack-cursed") addZone({8, 14, 12, 22}, "world-encounter", "merchant-quest") addZone({2, 3, 14, 12}, "world-encounter", "merchant-quest") diff --git a/game/modules/tome/data/maps/zones/collapsed-tower.lua b/game/modules/tome/data/maps/zones/collapsed-tower.lua index 8458a8fdf0f31cf1249d9d64d3660c0c09f15f89..6b316af5dc42cda47bbb7d8309f287ee32c76ca8 100644 --- a/game/modules/tome/data/maps/zones/collapsed-tower.lua +++ b/game/modules/tome/data/maps/zones/collapsed-tower.lua @@ -47,7 +47,7 @@ local turret = function() level_range = {1, nil}, exp_worth = 1, stats = { mag=16, con=22 }, size_category = 2, - name = "arcane crystal", color=colors.BLUE, + name = _t"arcane crystal", color=colors.BLUE, combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, combat_armor = 10, combat_def = 0, talent_cd_reduction={[Talents.T_ELEMENTAL_BOLT]=3, }, diff --git a/game/modules/tome/data/maps/zones/halfling-ruins-last.lua b/game/modules/tome/data/maps/zones/halfling-ruins-last.lua index 8a4e9b2fad3377fed96f6303038ecaeda7e275ff..4f6dca85dfe9b1f1ed2036b3f88b5eafc7dc5e5b 100644 --- a/game/modules/tome/data/maps/zones/halfling-ruins-last.lua +++ b/game/modules/tome/data/maps/zones/halfling-ruins-last.lua @@ -24,7 +24,7 @@ defineTile('>', "DOOR") quickEntity('>', { always_remember = true, show_tooltip=true, - name="Long tunnel to the island of Rel", + name=_t"Long tunnel to the island of Rel", display='>', image = "terrain/marble_floor.png", add_displays = {mod.class.Grid.new{image="terrain/stair_down.png"}}, color=colors.VIOLET, @@ -40,7 +40,7 @@ quickEntity('>', { end) return end - require("engine.ui.Dialog"):simplePopup("Long tunnel", "As you enter the tunnel you feel a strange compulsion to go backward.") + require("engine.ui.Dialog"):simplePopup(_t"Long tunnel", _t"As you enter the tunnel you feel a strange compulsion to go backward.") return true end, notice = true, diff --git a/game/modules/tome/data/maps/zones/shertul-fortress-caldizar.lua b/game/modules/tome/data/maps/zones/shertul-fortress-caldizar.lua index 6f924a9e4acbe4622f22cde9499fe0ccf373799e..6d223e14d57b54eac77a8f84c7da5d0dbc7d6061 100644 --- a/game/modules/tome/data/maps/zones/shertul-fortress-caldizar.lua +++ b/game/modules/tome/data/maps/zones/shertul-fortress-caldizar.lua @@ -39,8 +39,8 @@ defineTile("*", "COMMAND_ORB") -- addSpot section -- addZone section -addZone({2, 2, 14, 14}, "zonename", "Control Room") -addZone({19, 5, 26, 11}, "zonename", "Exploratory Farportal") +addZone({2, 2, 14, 14}, "zonename", _t"Control Room") +addZone({19, 5, 26, 11}, "zonename", _t"Exploratory Farportal") addZone({8, 8, 9, 9}, "particle", "house_orbcontrol") -- ASCII map section diff --git a/game/modules/tome/data/maps/zones/tannen-tower-1.lua b/game/modules/tome/data/maps/zones/tannen-tower-1.lua index dea8c724a112f94a353d754a8b0deb6d3a059518..693ab08e2f82a3e1f75ac9d1e468fa7616f91522 100644 --- a/game/modules/tome/data/maps/zones/tannen-tower-1.lua +++ b/game/modules/tome/data/maps/zones/tannen-tower-1.lua @@ -20,7 +20,7 @@ -- defineTile section defineTile("g", "FLOOR", nil, "DROLEM") defineTile("X", "HARDWALL") -quickEntity('=', {name='open sky', display=' ', does_block_move=true}) +quickEntity('=', {name=_t'open sky', display=' ', does_block_move=true}) defineTile("p", "FLOOR", nil, "TANNEN") defineTile(".", "FLOOR") diff --git a/game/modules/tome/data/maps/zones/tempest-peak-top.lua b/game/modules/tome/data/maps/zones/tempest-peak-top.lua index 40922b2fb6283704f2b17cb5dba3590a2fd739fc..6c8ace018b702669689130be465903136501f56f 100644 --- a/game/modules/tome/data/maps/zones/tempest-peak-top.lua +++ b/game/modules/tome/data/maps/zones/tempest-peak-top.lua @@ -20,7 +20,7 @@ -- defineTile section defineTile("#", "MOUNTAIN_WALL") -quickEntity('-', {name='open sky', display=' ', does_block_move=true}) +quickEntity('-', {name=_t'open sky', display=' ', does_block_move=true}) defineTile(">", "DOWN") defineTile(".", "ROCKY_GROUND") diff --git a/game/modules/tome/data/maps/zones/valley-moon.lua b/game/modules/tome/data/maps/zones/valley-moon.lua index e7ceb96c3dadd3d91dd01b11a68e5912fbf36c2c..5fc14bd4209f372638b211683a39110a28d58618 100644 --- a/game/modules/tome/data/maps/zones/valley-moon.lua +++ b/game/modules/tome/data/maps/zones/valley-moon.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -quickEntity('>', {always_remember = true, type="floor", subtype="grass", show_tooltip=true, name="Passage to the caverns", desc="A dark hole in the mountain", display='>', color=colors.GREY, notice = true, change_level=2, change_zone="valley-moon-caverns", keep_old_lev=true, iamge="terrain/grass.png", add_mos={{image="terrain/stair_down.png"}}}) +quickEntity('>', {always_remember = true, type="floor", subtype="grass", show_tooltip=true, name=_t"Passage to the caverns", desc=_t"A dark hole in the mountain", display='>', color=colors.GREY, notice = true, change_level=2, change_zone="valley-moon-caverns", keep_old_lev=true, iamge="terrain/grass.png", add_mos={{image="terrain/stair_down.png"}}}) defineTile('.', "GRASS") defineTile('~', "POISON_DEEP_WATER") defineTile('"', "GRASS", nil, nil, nil, {summon_limmir=true}) diff --git a/game/modules/tome/data/mapscripts/lib/subvault.lua b/game/modules/tome/data/mapscripts/lib/subvault.lua index 31926f80d9451c681fe4f9e3125610b571fc3605..4f65fe28e32f8b191f295de574ea5b8f88510091 100644 --- a/game/modules/tome/data/mapscripts/lib/subvault.lua +++ b/game/modules/tome/data/mapscripts/lib/subvault.lua @@ -31,7 +31,7 @@ basemap.required_rooms = nil local terrains = mod.class.Grid:loadList("/data/general/grids/basic.lua") local g = game.state:dynamicZoneEntry(terrains.DOWN, "sub-vault", { - name = ("Hidden Vault - %s"):format(zone.name), + name = ("Hidden Vault - %s"):tformat(zone.name), level_range = {zone:level_adjust_level(level, zone, "actor"), zone:level_adjust_level(level, zone, "actor")}, level_scheme = "player", max_level = 1, @@ -74,12 +74,12 @@ local g = game.state:dynamicZoneEntry(terrains.DOWN, "sub-vault", { trap_list = args.trap_list or {"/data/general/traps/complex.lua", "/data/general/traps/annoy.lua", "/data/general/traps/alarm.lua"}, }, function(zone, goback) - goback("stairs back to %s", zone.grid_list.UP) + goback(_t"stairs back to %s", zone.grid_list.UP) end) -g.name = "hidden vault" +g.name = _t"hidden vault" g.always_remember = true -g.desc = [[Crumbling stairs lead down to something.]] +g.desc = _t[[Crumbling stairs lead down to something.]] g.show_tooltip = true g.color_r=0 g.color_g=0 g.color_b=255 g.notice = true g.special_minimap = colors.VIOLET @@ -88,15 +88,15 @@ g:altered() g:initGlow() g.change_level_check = function(self) -- limit stair scumming self._use_count = self._use_count - 1 - self.name = "collapsing hidden vault" + self.name = _t"collapsing hidden vault" if self._use_count < 1 then self.change_level_check = nil self.change_level = nil - self.name = "collapsed hidden vault" - self.desc = [[It is fully collapsed, no way down.]] + self.name = _t"collapsed hidden vault" + self.desc = _t[[It is fully collapsed, no way down.]] game.log("#VIOLET# The stairway is about to collapses completely, you may still go back but it will be the last time!") elseif self._use_count < 2 then - self.name = "nearly collapsed hidden vault" + self.name = _t"nearly collapsed hidden vault" game.log("#VIOLET# The decrepit stairs crumble some more as you climb them.") end game:changeLevel(1, self:real_change(), {temporary_zone_shift=true, direct_switch=true}) diff --git a/game/modules/tome/data/quests/anti-antimagic.lua b/game/modules/tome/data/quests/anti-antimagic.lua index e23cf6dd9b0295905e6374afd09ace0cb19c9bac..ad86a5f364a8fea9d9b78a751d30718df669be8b 100644 --- a/game/modules/tome/data/quests/anti-antimagic.lua +++ b/game/modules/tome/data/quests/anti-antimagic.lua @@ -17,17 +17,17 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "The fall of Zigur" +name = _t"The fall of Zigur" desc = function(self, who) local desc = {} - desc[#desc+1] = "You decided to side with the Grand Corruptor and joined forces to assault the Ziguranth main base of power." + desc[#desc+1] = _t"You decided to side with the Grand Corruptor and joined forces to assault the Ziguranth main base of power." if self:isStatus(self.FAILED) then - desc[#desc+1] = "The Grand Corruptor died during the attack before he had time to teach you his ways." + desc[#desc+1] = _t"The Grand Corruptor died during the attack before he had time to teach you his ways." elseif self:isStatus(self.DONE) then - desc[#desc+1] = "The defenders of Zigur were crushed, the Ziguranth scattered and weakened." + desc[#desc+1] = _t"The defenders of Zigur were crushed, the Ziguranth scattered and weakened." end if self:isStatus(self.COMPLETED, "grand-corruptor-treason") then - desc[#desc+1] = "In the aftermath you turned against the Grand Corruptor and dispatched him." + desc[#desc+1] = _t"In the aftermath you turned against the Grand Corruptor and dispatched him." end return table.concat(desc, "\n") @@ -91,7 +91,7 @@ on_status_change = function(self, who, status, sub) who:setQuestStatus(self.id, engine.Quest.DONE) world:gainAchievement("ANTI_ANTIMAGIC", game.player) - game.party:reward("Select the party member to receive the hexes generic talent tree:", function(player) + game.party:reward(_t"Select the party member to receive the hexes generic talent tree:", function(player) if who:knowTalentType("corruption/hexes") then who:setTalentTypeMastery("corruption/hexes", who:getTalentTypeMastery("corruption/hexes") + 0.2) elseif who:knowTalentType("corruption/hexes") == false then @@ -101,7 +101,7 @@ on_status_change = function(self, who, status, sub) end end) - require("engine.ui.Dialog"):simplePopup("Grand Corruptor", "#LIGHT_GREEN#The Grand Corruptor gazes upon you. You feel knowledge flowing in your mind. You can now train some corruption powers.") + require("engine.ui.Dialog"):simplePopup(_t"Grand Corruptor", _t"#LIGHT_GREEN#The Grand Corruptor gazes upon you. You feel knowledge flowing in your mind. You can now train some corruption powers.") game:setAllowedBuild("corrupter") game:setAllowedBuild("corrupter_corruptor", true) end @@ -125,7 +125,7 @@ myssil_dies = function(self) end if not corr then return end - corr:doEmote("Victory is mine!", 60) + corr:doEmote(_t"Victory is mine!", 60) corr.never_anger = nil game.player:setQuestStatus(self.id, self.COMPLETED) end @@ -134,8 +134,8 @@ function onWin(self, who) if not self:isStatus(self.DONE) then return end if self:isStatus(self.COMPLETED, "grand-corruptor-treason") then return end return 10, { - "While you were in the Far East, the Grand Corruptor was busy in Maj'Eyal.", - "With the fall of Zigur he was able to attack and take control of Elvala, the Shaloren capital city.", - "His plans however do not stop there.", + _t"While you were in the Far East, the Grand Corruptor was busy in Maj'Eyal.", + _t"With the fall of Zigur he was able to attack and take control of Elvala, the Shaloren capital city.", + _t"His plans however do not stop there.", } end diff --git a/game/modules/tome/data/quests/antimagic.lua b/game/modules/tome/data/quests/antimagic.lua index f091444879cc57277a2dd9caa6639fbed19de8c1..ba1531dfaa68098e82671eca7e13c8fccb6fc3d8 100644 --- a/game/modules/tome/data/quests/antimagic.lua +++ b/game/modules/tome/data/quests/antimagic.lua @@ -17,10 +17,10 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "The Curse of Magic" +name = _t"The Curse of Magic" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have been invited to join a group called the Ziguranth, dedicated to opposing magic." + desc[#desc+1] = _t"You have been invited to join a group called the Ziguranth, dedicated to opposing magic." return table.concat(desc, "\n") end @@ -74,7 +74,7 @@ next_combat = function(self) if not self:isEnded() then local Chat = require "engine.Chat" - local chat = Chat.new("antimagic-end", {name="Grim-looking fighter"}, game.player) + local chat = Chat.new("antimagic-end", {name=_t"Grim-looking fighter"}, game.player) chat:invoke() end end diff --git a/game/modules/tome/data/quests/arena-unlock.lua b/game/modules/tome/data/quests/arena-unlock.lua index fb40c491613a449f23b85af7b7a28d9ccb9baa17..40b8d228fe014ccd5a3e3b6de674d5f9d04d4cb6 100644 --- a/game/modules/tome/data/quests/arena-unlock.lua +++ b/game/modules/tome/data/quests/arena-unlock.lua @@ -17,12 +17,12 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "The agent of the arena" +name = _t"The agent of the arena" desc = function(self, who) local desc = {} - desc[#desc+1] = "You were asked to prove your worth as a fighter by a rogue, in order to participate in the arena" + desc[#desc+1] = _t"You were asked to prove your worth as a fighter by a rogue, in order to participate in the arena" if self:isCompleted() then - desc[#desc+1] = "You succesfully defeated your adversaries and gained access to the arena!" + desc[#desc+1] = _t"You succesfully defeated your adversaries and gained access to the arena!" end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/arena.lua b/game/modules/tome/data/quests/arena.lua index 34516be3676bcf36fbcdfb2a6133ec018896a143..f51a2c6b0cfe3c7a64fbad6267bbad14b7d7fff0 100644 --- a/game/modules/tome/data/quests/arena.lua +++ b/game/modules/tome/data/quests/arena.lua @@ -17,11 +17,11 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "The Arena" +name = _t"The Arena" desc = function(self, who) local desc = {} - desc[#desc+1] = "Seeking wealth, glory, and a great fight, you challenge the Arena!" - desc[#desc+1] = "Can you defeat your foes and become Master of Arena?" + desc[#desc+1] = _t"Seeking wealth, glory, and a great fight, you challenge the Arena!" + desc[#desc+1] = _t"Can you defeat your foes and become Master of Arena?" return table.concat(desc, "\n") end @@ -29,15 +29,15 @@ function win(self) game:playAndStopMusic("Lords of the Sky.ogg") game.player.winner = "arena" - game:registerDialog(require("engine.dialogs.ShowText").new("Winner", "win", {playername=game.player.name, how="arena"}, game.w * 0.6)) + game:registerDialog(require("engine.dialogs.ShowText").new(_t"Winner", "win", {playername=game.player.name, how="arena"}, game.w * 0.6)) end function onWin(self, who) local desc = {} - desc[#desc+1] = "#GOLD#Well done! You have won the Arena: Challenge of the Master#WHITE#" - desc[#desc+1] = "" - desc[#desc+1] = "You valiantly fought every creature the arena could throw at you and you emerged victorious!" - desc[#desc+1] = "Glory to you, you are now the new master and your future characters will challenge you." + desc[#desc+1] = _t"#GOLD#Well done! You have won the Arena: Challenge of the Master#WHITE#" + desc[#desc+1] = _t"" + desc[#desc+1] = _t"You valiantly fought every creature the arena could throw at you and you emerged victorious!" + desc[#desc+1] = _t"Glory to you, you are now the new master and your future characters will challenge you." return 0, desc end diff --git a/game/modules/tome/data/quests/brotherhood-of-alchemists.lua b/game/modules/tome/data/quests/brotherhood-of-alchemists.lua index ee1381a8b041ed172556e1998febd412d9dda46b..b056ab8809b27a9e15be2509b90b5b584d78728d 100644 --- a/game/modules/tome/data/quests/brotherhood-of-alchemists.lua +++ b/game/modules/tome/data/quests/brotherhood-of-alchemists.lua @@ -16,43 +16,43 @@ -- -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "The Brotherhood of Alchemists" +name = _t"The Brotherhood of Alchemists" desc = function(self, player, who) local desc = {} if self:isStatus(self.DONE) and self.player_won == true then - desc[#desc+1] = "#LIGHT_GREEN#Thanks to your timely aid, "..self.winner.." is the newest member of the Brotherhood of Alchemists.#WHITE#" + desc[#desc+1] = ("#LIGHT_GREEN#Thanks to your timely aid, %s is the newest member of the Brotherhood of Alchemists.#WHITE#"):tformat(_t(self.winner)) elseif self:isStatus(self.DONE) and self.player_won == false then - desc[#desc+1] = "#RED#You aided various denizens of Maj'Eyal in their attempts to join the Brotherhood of Alchemists, though you did not prove the deciding factor for any. This year's new member is "..self.winner..".#WHITE#" + desc[#desc+1] = ("#RED#You aided various denizens of Maj'Eyal in their attempts to join the Brotherhood of Alchemists, though you did not prove the deciding factor for any. This year's new member is %s.#WHITE#"):tformat(_t(self.winner)) else - desc[#desc+1] = "#LIGHT_BLUE#Various alchemists around Maj'Eyal are competing to gain entry into the great Brotherhood of Alchemists, and one or more have enlisted your aid.#WHITE#" + desc[#desc+1] = _t"#LIGHT_BLUE#Various alchemists around Maj'Eyal are competing to gain entry into the great Brotherhood of Alchemists, and one or more have enlisted your aid.#WHITE#" end --e (for elixir) is the name of the table listing all the elixirs and their various strings and ingredients and such. self.e[2][3], for example, refers to the table containing all the information for the second alchemist's third elixir. self.e[2][3].ingredients[1] refers to the first ingredient of the third elixir of the second alchemist. This saves a ton of work in making the desc function, since it's messy and it would suck to copy/paste twelve of them (one for each elixir). for i = 1, 4 do --run through list of four alchemists for j = 1, 3 do --run through each alchemist's list of three elixirs if self:isCompleted(self.e[i][j].full) and not self:isCompleted(self.e[i][j].poached) then - desc[#desc+1] = "#GREEN#You have aided "..self.e[i][j].alchemist.." in creating an "..self.e[i][j].name..".#WHITE#" + desc[#desc+1] = ("#GREEN#You have aided %s in creating an %s.#WHITE#"):tformat(_t(self.e[i][j].alchemist), _t(self.e[i][j].name)) elseif self:isCompleted(self.e[i][j].full) and self:isCompleted(self.e[i][j].poached) then - desc[#desc+1] = "#RED#"..self.e[i][j].alchemist.." has completed an "..self.e[i][j].name.." without your aid.#WHITE#" + desc[#desc+1] = ("#RED#%s has completed an %s without your aid.#WHITE#"):tformat(_t(self.e[i][j].alchemist), _t(self.e[i][j].name)) elseif self:isCompleted(self.e[i][j].start) and not self:isCompleted(self.e[i][j].full) and self:isStatus(self.DONE) then - desc[#desc+1] = "#SLATE#Having failed to gain admittance to the Brotherhood of the Alchemists, "..self.e[i][j].alchemist.." no longer needs your help making the "..self.e[i][j].name.."." + desc[#desc+1] = ("#SLATE#Having failed to gain admittance to the Brotherhood of the Alchemists, %s no longer needs your help making the %s."):tformat(_t(self.e[i][j].alchemist), _t(self.e[i][j].name)) elseif self:isCompleted(self.e[i][j].start) and not self:isCompleted(self.e[i][j].full) then - desc[#desc+1] = ""..self.e[i][j].alchemist.." needs your help making an "..self.e[i][j].name..". He has given you some notes on the ingredients:" + desc[#desc+1] = ("%s needs your help making an %s. He has given you some notes on the ingredients:"):tformat(_t(self.e[i][j].alchemist), _t(self.e[i][j].name)) if not self:check_i(player, self.e[i][j].ingredients[1]) then - desc[#desc+1] = "#SLATE# * 'Needed: one "..self.e[i][j].ingredients[1].name..". "..game.party:getIngredient(self.e[i][j].ingredients[1].id).alchemy_text.."'#WHITE#" + desc[#desc+1] = ("#SLATE# * 'Needed: one %s. %s'#WHITE#"):tformat(_t(self.e[i][j].ingredients[1].name), game.party:getIngredient(self.e[i][j].ingredients[1].id).alchemy_text) else - desc[#desc+1] = "#LIGHT_GREEN# * You've found the needed "..self.e[i][j].ingredients[1].name..".#WHITE#" + desc[#desc+1] = ("#LIGHT_GREEN# * You've found the needed %s.#WHITE#"):tformat(_t(self.e[i][j].ingredients[1].name)) end if not self:check_i(player, self.e[i][j].ingredients[2]) then - desc[#desc+1] = "#SLATE# * 'Needed: one "..self.e[i][j].ingredients[2].name..". "..game.party:getIngredient(self.e[i][j].ingredients[2].id).alchemy_text.."'#WHITE#" + desc[#desc+1] = ("#SLATE# * 'Needed: one %s. %s'#WHITE#"):tformat(_t(self.e[i][j].ingredients[2].name), game.party:getIngredient(self.e[i][j].ingredients[2].id).alchemy_text) else - desc[#desc+1] = "#LIGHT_GREEN# * You've found the needed "..self.e[i][j].ingredients[2].name..".#WHITE#" + desc[#desc+1] = ("#LIGHT_GREEN# * You've found the needed %s.#WHITE#"):tformat(_t(self.e[i][j].ingredients[2].name)) end if not self:check_i(player, self.e[i][j].ingredients[3]) then - desc[#desc+1] = "#SLATE# * 'Needed: one "..self.e[i][j].ingredients[3].name..". "..game.party:getIngredient(self.e[i][j].ingredients[3].id).alchemy_text.."'#WHITE#" + desc[#desc+1] = ("#SLATE# * 'Needed: one %s. %s'#WHITE#"):tformat(_t(self.e[i][j].ingredients[3].name), game.party:getIngredient(self.e[i][j].ingredients[3].id).alchemy_text) else - desc[#desc+1] = "#LIGHT_GREEN# * You've found the needed "..self.e[i][j].ingredients[3].name..".#WHITE#" + desc[#desc+1] = ("#LIGHT_GREEN# * You've found the needed %s.#WHITE#"):tformat(_t(self.e[i][j].ingredients[3].name)) end end end @@ -207,7 +207,7 @@ recipes = function(self) { { short_name = "fox", - name = "elixir of the fox", + name = _t"elixir of the fox", id = "ELIXIR_FOX", start = "fox_start", almost = "fox_almost_done", @@ -224,7 +224,7 @@ recipes = function(self) }, { short_name = "avoidance", - name = "elixir of avoidance", + name = _t"elixir of avoidance", id = "ELIXIR_AVOIDANCE", start = "avoidance_start", almost = "avoidance_almost_done", @@ -241,7 +241,7 @@ recipes = function(self) }, { short_name = "precision", - name = "elixir of precision", + name = _t"elixir of precision", id = "ELIXIR_PRECISION", start = "precision_start", almost = "precision_almost_done", @@ -260,7 +260,7 @@ recipes = function(self) { { short_name = "mysticism", - name = "elixir of mysticism", + name = _t"elixir of mysticism", id = "ELIXIR_MYSTICISM", start = "mysticism_start", almost = "mysticism_almost_done", @@ -277,7 +277,7 @@ recipes = function(self) }, { short_name = "savior", - name = "elixir of the savior", + name = _t"elixir of the savior", id = "ELIXIR_SAVIOR", start = "savior_start", almost = "savior_almost_done", @@ -294,7 +294,7 @@ recipes = function(self) }, { short_name = "mastery", - name = "elixir of mastery", + name = _t"elixir of mastery", id = "ELIXIR_MASTERY", start = "mastery_start", almost = "mastery_almost_done", @@ -313,7 +313,7 @@ recipes = function(self) { { short_name = "force", - name = "elixir of explosive force", + name = _t"elixir of explosive force", id = "ELIXIR_FORCE", start = "force_start", almost = "force_almost_done", @@ -330,7 +330,7 @@ recipes = function(self) }, { short_name = "serendipity", - name = "elixir of serendipity", + name = _t"elixir of serendipity", id = "ELIXIR_SERENDIPITY", start = "serendipity_start", almost = "serendipity_almost_done", @@ -347,7 +347,7 @@ recipes = function(self) }, { short_name = "focus", - name = "elixir of focus", + name = _t"elixir of focus", id = "ELIXIR_FOCUS", start = "focus_start", almost = "focus_almost_done", @@ -366,7 +366,7 @@ recipes = function(self) { { short_name = "brawn", - name = "elixir of brawn", + name = _t"elixir of brawn", id = "ELIXIR_BRAWN", start = "brawn_start", almost = "brawn_almost_done", @@ -383,7 +383,7 @@ recipes = function(self) }, { short_name = "stoneskin", - name = "elixir of stoneskin", + name = _t"elixir of stoneskin", id = "ELIXIR_STONESKIN", start = "stoneskin_start", almost = "stoneskin_almost_done", @@ -400,7 +400,7 @@ recipes = function(self) }, { short_name = "foundations", - name = "elixir of foundations", + name = _t"elixir of foundations", id = "ELIXIR_FOUNDATIONS", start = "foundations_start", almost = "foundations_almost_done", diff --git a/game/modules/tome/data/quests/charred-scar.lua b/game/modules/tome/data/quests/charred-scar.lua index 5bae9d66e84331f94c6c021db605d269e9f6a0da..9c870bf62663f934f1f28d1ce048251254ec6f70 100644 --- a/game/modules/tome/data/quests/charred-scar.lua +++ b/game/modules/tome/data/quests/charred-scar.lua @@ -20,22 +20,22 @@ use_ui = "quest-main" -- Ruysh Charred scar -name = "The Doom of the World!" +name = _t"The Doom of the World!" desc = function(self, who) local desc = {} - desc[#desc+1] = "You were sent to the Charred Scar at the heart of which lies a huge volcano. In the Age of Pyre it destroyed the old Sher'Tul ruins that stood there, absorbing much of their latent magic." - desc[#desc+1] = "This place is still full of that power and the orcs intend to absorb this power using the Staff of Absorption!" - desc[#desc+1] = "Whatever their plan may be, they must be stopped at all cost." - desc[#desc+1] = "The volcano is attacked by orcs. A few Sun Paladins made it there with you. They will hold the line at the cost of their lives to buy you some time." - desc[#desc+1] = "Honor their sacrifice; do not let the orcs finish their work!" + desc[#desc+1] = _t"You were sent to the Charred Scar at the heart of which lies a huge volcano. In the Age of Pyre it destroyed the old Sher'Tul ruins that stood there, absorbing much of their latent magic." + desc[#desc+1] = _t"This place is still full of that power and the orcs intend to absorb this power using the Staff of Absorption!" + desc[#desc+1] = _t"Whatever their plan may be, they must be stopped at all cost." + desc[#desc+1] = _t"The volcano is attacked by orcs. A few Sun Paladins made it there with you. They will hold the line at the cost of their lives to buy you some time." + desc[#desc+1] = _t"Honor their sacrifice; do not let the orcs finish their work!" if self:isCompleted("not-stopped") then - desc[#desc+1] = "" - desc[#desc+1] = "You arrived too late. The place has been drained of its power and the sorcerers have left." - desc[#desc+1] = "Use the portal to go back to the Far East. You *MUST* stop them, no matter the cost." + desc[#desc+1] = _t"" + desc[#desc+1] = _t"You arrived too late. The place has been drained of its power and the sorcerers have left." + desc[#desc+1] = _t"Use the portal to go back to the Far East. You *MUST* stop them, no matter the cost." elseif self:isCompleted("stopped") then - desc[#desc+1] = "" - desc[#desc+1] = "You arrived in time and interrupted the ritual. The sorcerers have departed." - desc[#desc+1] = "Use the portal to go back to the Far East. You *MUST* stop them, no matter the cost." + desc[#desc+1] = _t"" + desc[#desc+1] = _t"You arrived in time and interrupted the ritual. The sorcerers have departed." + desc[#desc+1] = _t"Use the portal to go back to the Far East. You *MUST* stop them, no matter the cost." end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/deep-bellow.lua b/game/modules/tome/data/quests/deep-bellow.lua index afca14f489a20923a5a2dab7d0f8c286b201f7f7..ba5f52abb370b96e8c4d9634e19a08ef6f4ea811 100644 --- a/game/modules/tome/data/quests/deep-bellow.lua +++ b/game/modules/tome/data/quests/deep-bellow.lua @@ -17,13 +17,13 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "From bellow, it devours" +name = _t"From bellow, it devours" desc = function(self, who) local desc = {} - desc[#desc+1] = "Your escape from Reknor got your heart pounding and your desire for wealth and power increased tenfold." - desc[#desc+1] = "Maybe it is time for you to start an adventurer's career. Deep below the Iron Throne mountains lies the Deep Bellow." - desc[#desc+1] = "It has been long sealed away but still, from time to time adventurers go there looking for wealth." - desc[#desc+1] = "None that you know of has come back yet, but you did survive Reknor. You are great." + desc[#desc+1] = _t"Your escape from Reknor got your heart pounding and your desire for wealth and power increased tenfold." + desc[#desc+1] = _t"Maybe it is time for you to start an adventurer's career. Deep below the Iron Throne mountains lies the Deep Bellow." + desc[#desc+1] = _t"It has been long sealed away but still, from time to time adventurers go there looking for wealth." + desc[#desc+1] = _t"None that you know of has come back yet, but you did survive Reknor. You are great." return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/dreadfell.lua b/game/modules/tome/data/quests/dreadfell.lua index df666fdb10839dff387723281638c0ac2aa86d8f..34141e8a4be3a4e2632bf263619632c2fdbdd306 100644 --- a/game/modules/tome/data/quests/dreadfell.lua +++ b/game/modules/tome/data/quests/dreadfell.lua @@ -20,12 +20,12 @@ use_ui = "quest-main" -- Quest for the Dreadfell -name = "The Island of Dread" +name = _t"The Island of Dread" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have heard that near the Charred Scar, to the south, lies a ruined tower known as the Dreadfell." - desc[#desc+1] = "There are disturbing rumors of greater undead, and nobody who reached it ever returned." - desc[#desc+1] = "Perhaps you should explore it and find the truth, and the treasures, for yourself!" + desc[#desc+1] = _t"You have heard that near the Charred Scar, to the south, lies a ruined tower known as the Dreadfell." + desc[#desc+1] = _t"There are disturbing rumors of greater undead, and nobody who reached it ever returned." + desc[#desc+1] = _t"Perhaps you should explore it and find the truth, and the treasures, for yourself!" return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/east-portal.lua b/game/modules/tome/data/quests/east-portal.lua index cbe382a0e3d08c6358276c05a68f1fb861405715..c574137ab359ccc48734e2694df138b1958a9bac 100644 --- a/game/modules/tome/data/quests/east-portal.lua +++ b/game/modules/tome/data/quests/east-portal.lua @@ -17,40 +17,40 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Back and there again" +name = _t"Back and there again" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have created a portal back to Maj'Eyal. You should try to talk to someone in Last Hope about establishing a link back." + desc[#desc+1] = _t"You have created a portal back to Maj'Eyal. You should try to talk to someone in Last Hope about establishing a link back." if self:isCompleted("talked-elder") then - desc[#desc+1] = "You talked to the Elder in Last Hope who in turn told you to talk to Tannen, who lives in the north of the city." + desc[#desc+1] = _t"You talked to the Elder in Last Hope who in turn told you to talk to Tannen, who lives in the north of the city." end if self:isCompleted("gave-orb") then - desc[#desc+1] = "You gave the Orb of Many Ways to Tannen to study while you look for the athame and diamond in Reknor." + desc[#desc+1] = _t"You gave the Orb of Many Ways to Tannen to study while you look for the athame and diamond in Reknor." end if self:isCompleted("withheld-orb") then - desc[#desc+1] = "You kept the Orb of Many Ways despite Tannen's request to study it. You must now look for the athame and diamond in Reknor." + desc[#desc+1] = _t"You kept the Orb of Many Ways despite Tannen's request to study it. You must now look for the athame and diamond in Reknor." end if self:isCompleted("open-telmur") then - desc[#desc+1] = "You brought back the diamond and athame to Tannen who asked you to check the tower of Telmur, looking for a text of portals, although he is not sure it is even there. He told you to come back in a few days." + desc[#desc+1] = _t"You brought back the diamond and athame to Tannen who asked you to check the tower of Telmur, looking for a text of portals, although he is not sure it is even there. He told you to come back in a few days." end if self:isCompleted("ask-east") then - desc[#desc+1] = "You brought back the diamond and athame to Tannen who asked you to contact Zemekkys to ask some delicate questions." + desc[#desc+1] = _t"You brought back the diamond and athame to Tannen who asked you to contact Zemekkys to ask some delicate questions." end if self:isCompleted("just-wait") then - desc[#desc+1] = "You brought back the diamond and athame to Tannen who asked you to come back in a few days." + desc[#desc+1] = _t"You brought back the diamond and athame to Tannen who asked you to come back in a few days." end if self:isCompleted("tricked-demon") then - desc[#desc+1] = "Tannen has tricked you! He swapped the orb for a false one that brought you to a demonic plane. Find the exit, and get revenge!" + desc[#desc+1] = _t"Tannen has tricked you! He swapped the orb for a false one that brought you to a demonic plane. Find the exit, and get revenge!" end if self:isCompleted("trapped") then - desc[#desc+1] = "Tannen revealed himself as the vile scum he really is and trapped you in his tower." + desc[#desc+1] = _t"Tannen revealed himself as the vile scum he really is and trapped you in his tower." end if self:isCompleted() then - desc[#desc+1] = "" - desc[#desc+1] = "#LIGHT_GREEN#* The portal to the Far East is now functional and can be used to go back.#WHITE#" + desc[#desc+1] = _t"" + desc[#desc+1] = _t"#LIGHT_GREEN#* The portal to the Far East is now functional and can be used to go back.#WHITE#" end return table.concat(desc, "\n") @@ -92,7 +92,7 @@ end give_orb = function(self, player) player:setQuestStatus(self.id, engine.Quest.COMPLETED, "gave-orb") - local orb_o, orb_item, orb_inven_id = player:findInAllInventories("Orb of Many Ways") + local orb_o, orb_item, orb_inven_id = player:findInAllInventories("Orb of Many Ways", {raw_name=true}) player:removeObject(orb_inven_id, orb_item, true) orb_o:removed() end @@ -102,13 +102,13 @@ withheld_orb = function(self, player) end remove_materials = function(self, player) - local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond") + local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond", {raw_name=true}) if gem_o then player:removeObject(gem_inven_id, gem_item, false) gem_o:removed() end - local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame") + local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame", {raw_name=true}) if athame_o then player:removeObject(athame_inven_id, athame_item, false) athame_o:removed() @@ -136,7 +136,7 @@ ask_east = function(self, player) self:remove_materials(player) -- Swap the orbs! Tricky bastard! - local orb_o, orb_item, orb_inven_id = player:findInAllInventories("Orb of Many Ways") + local orb_o, orb_item, orb_inven_id = player:findInAllInventories("Orb of Many Ways", {raw_name=true}) player:removeObject(orb_inven_id, orb_item, true) orb_o:removed() @@ -153,7 +153,7 @@ tannen_tower = function(self, player) end tannen_exit = function(self, player) - require("engine.ui.Dialog"):simplePopup("Back and there again", "A portal appears in the center of the tower!") + require("engine.ui.Dialog"):simplePopup(_t"Back and there again", _t"A portal appears in the center of the tower!") local g = game.zone:makeEntityByName(game.level, "terrain", "PORTAL_BACK") game.zone:addEntity(game.level, g, "terrain", 12, 12) end @@ -170,7 +170,8 @@ back_to_last_hope = function(self) -- Add the mage local g = mod.class.NPC.new{ - name="Meranas, Herald of Angolwen", + name=_t"Meranas, Herald of Angolwen", + image="npc/humanoid_human_meranas__herald_of_angolwen.png", type="humanoid", subtype="human", faction="angolwen", display='p', color=colors.RED, } diff --git a/game/modules/tome/data/quests/escort-duty.lua b/game/modules/tome/data/quests/escort-duty.lua index 875f3170918c9c73e834ec528738a04df0bc2849..222e9b07a34c1d267d65780f1e1af2021377b1d4 100644 --- a/game/modules/tome/data/quests/escort-duty.lua +++ b/game/modules/tome/data/quests/escort-duty.lua @@ -47,12 +47,12 @@ local name_rules = { local possible_types = { { name="lost warrior", random="male", chance=70, - text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], + text = _t[[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], actor = { type = "humanoid", subtype = "human", image = "player/higher_male.png", display = "@", color=colors.UMBER, - name = "%s, the lost warrior", - desc = [[He looks tired and wounded.]], + name = _t"%s, the lost warrior", + desc = _t[[He looks tired and wounded.]], autolevel = "warrior", ai = "escort_quest", ai_state = { talent_in=4, }, stats = { str=18, dex=13, mag=5, con=15 }, @@ -74,12 +74,12 @@ local possible_types = { }, }, { name="injured seer", random="female", chance=70, - text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I will not be able to continue the road alone. Would you help me?]], + text = _t[[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I will not be able to continue the road alone. Would you help me?]], actor = { - name = "%s, the injured seer", + name = _t"%s, the injured seer", type = "humanoid", subtype = "elf", female=true, image = "player/halfling_female.png", display = "@", color=colors.LIGHT_BLUE, - desc = [[She looks tired and wounded.]], + desc = _t[[She looks tired and wounded.]], autolevel = "caster", ai = "escort_quest", ai_state = { talent_in=4, }, stats = { str=8, dex=7, mag=18, con=12 }, @@ -100,12 +100,12 @@ local possible_types = { }, }, { name="repented thief", random="male", chance=70, - text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], + text = _t[[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], actor = { - name = "%s, the repented thief", + name = _t"%s, the repented thief", type = "humanoid", subtype = "halfling", image = "player/cornac_male.png", display = "@", color=colors.BLUE, - desc = [[He looks tired and wounded.]], + desc = _t[[He looks tired and wounded.]], autolevel = "rogue", ai = "escort_quest", ai_state = { talent_in=4, }, stats = { str=8, dex=7, mag=18, con=12 }, @@ -127,12 +127,12 @@ local possible_types = { }, }, { name="lone alchemist", random="male", chance=70, - text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], + text = _t[[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], actor = { - name = "%s, the lone alchemist", + name = _t"%s, the lone alchemist", type = "humanoid", subtype = "human", image = "player/shalore_male.png", display = "@", color=colors.AQUAMARINE, - desc = [[He looks tired and wounded.]], + desc = _t[[He looks tired and wounded.]], autolevel = "rogue", ai = "escort_quest", ai_state = { talent_in=4, }, stats = { str=8, dex=7, mag=18, con=12 }, @@ -153,12 +153,12 @@ local possible_types = { }, }, { name="lost sun paladin", random="female", chance=70, - text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], + text = _t[[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], actor = { - name = "%s, the lost sun paladin", + name = _t"%s, the lost sun paladin", type = "humanoid", subtype = "human", female=true, image = "player/higher_female.png", display = "@", color=colors.GOLD, - desc = [[She looks tired and wounded.]], + desc = _t[[She looks tired and wounded.]], autolevel = "warriormage", ai = "escort_quest", ai_state = { talent_in=4, }, stats = { str=18, dex=7, mag=18, con=12 }, @@ -180,12 +180,12 @@ local possible_types = { }, }, { name="lost defiler", random="female", chance=70, - text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], + text = _t[[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], actor = { - name = "%s, the lost defiler", + name = _t"%s, the lost defiler", type = "humanoid", subtype = "human", female=true, image = "player/higher_female.png", display = "@", color=colors.YELLOW, - desc = [[She looks tired and wounded.]], + desc = _t[[She looks tired and wounded.]], autolevel = "caster", ai = "escort_quest", ai_state = { talent_in=4, }, stats = { str=8, dex=7, mag=18, con=12 }, @@ -205,15 +205,15 @@ local possible_types = { reward_type = "defiler", }, }, - { name="temporal explorer", random="player", portal="temporal portal", chance=30, - text = [[Oh but you are ... are you ?! ME?! + { name="temporal explorer", random="player", portal=_t"temporal portal", chance=30, + text = _t[[Oh but you are ... are you ?! ME?! So I was right, this is not my original time-thread! Please help me! I am afraid I lost myself in this place. I know there is a temporal portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me? Would you help .. yourself?]], actor = { - name = "%s, temporal explorer", + name = _t"%s, temporal explorer", type = "humanoid", subtype = "human", female=true, image = "player/higher_female.png", display = "@", color=colors.YELLOW, - desc = [[She looks tired and wounded. She is so similar to you and yet completely different. Weird.]], + desc = _t[[She looks tired and wounded. She is so similar to you and yet completely different. Weird.]], autolevel = "caster", ai = "escort_quest", ai_state = { talent_in=4, }, stats = { str=8, dex=7, mag=18, con=12 }, @@ -234,12 +234,12 @@ Please help me! I am afraid I lost myself in this place. I know there is a tempo }, }, { name="worried loremaster", random="female", chance=30, - text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], + text = _t[[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]], actor = { - name = "%s, the worried loremaster", + name = _t"%s, the worried loremaster", type = "humanoid", subtype = "human", female=true, image = "player/thalore_female.png", display = "@", color=colors.LIGHT_GREEN, - desc = [[She looks tired and wounded.]], + desc = _t[[She looks tired and wounded.]], autolevel = "wildcaster", ai = "escort_quest", ai_state = { talent_in=4, }, stats = { str=8, dex=7, mag=18, con=12 }, @@ -272,22 +272,22 @@ id = "escort-duty-"..game.zone.short_name.."-"..game.level.level kind = {} -name = "" +name = _t"" desc = function(self, who) local desc = {} if self:isStatus(engine.Quest.DONE) then - desc[#desc+1] = "You successfully escorted the "..self.kind.name.." to the recall portal on level "..self.level_name.."." + desc[#desc+1] = ("You successfully escorted the %s to the recall portal on level %s."):tformat(_t(self.kind.name), self.level_name) if self.reward_message then - desc[#desc+1] = ("As a reward you %s."):format(self.reward_message) + desc[#desc+1] = ("As a reward you %s."):tformat(self.reward_message) end elseif self:isStatus(engine.Quest.FAILED) then if self.abandoned then - desc[#desc+1] = "You abandoned "..self.kind.name.." to death." + desc[#desc+1] = ("You abandoned %s, to death."):tformat(_t(self.kind.name)) else - desc[#desc+1] = "You failed to protect the "..self.kind.name.." from death by "..(self.killing_npc or "???").."." + desc[#desc+1] = ("You failed to protect the %s from death by %s."):tformat(_t(self.kind.name), self.killing_npc or "???") end else - desc[#desc+1] = "Escort the "..self.kind.name.." to the recall portal on level "..self.level_name.."." + desc[#desc+1] = ("Escort the %s to the recall portal on level %s."):tformat(_t(self.kind.name), self.level_name) end return table.concat(desc, "\n") end @@ -373,9 +373,9 @@ on_grant = function(self, who) self.kind.actor.remove_from_party_on_death = true self.kind.actor.on_die = function(self, who) if self.sunwall_query then game.state.found_sunwall_west_died = true end - game.logPlayer(game.player, "#LIGHT_RED#%s is dead, quest failed!", self.name:capitalize()) + game.logPlayer(game.player, "#LIGHT_RED#%s is dead, quest failed!", self:getName():capitalize()) game.player:setQuestStatus(self.quest_id, engine.Quest.FAILED) - game.player:hasQuest(self.quest_id).killing_npc = who and who.name or "something" + game.player:hasQuest(self.quest_id).killing_npc = who and who.name or _t"something" if who.resolveSource and who:resolveSource().player then world:gainAchievement("ESCORT_KILL", game.player) game.player:registerEscorts("betrayed") @@ -398,7 +398,7 @@ on_grant = function(self, who) g = g:cloneFull() g.__nice_tile_base = nil g.show_tooltip = true - g.name = (self.kind.portal or "Recall Portal")..": "..npc.name + g.name = (self.kind.portal or _t"Recall Portal")..": "..npc.name g.display = '&' g.color_r = colors.VIOLET.r g.color_g = colors.VIOLET.g @@ -430,8 +430,8 @@ on_grant = function(self, who) game.zone:addEntity(game.level, npc, "actor", x, y) -- Setup quest - self.level_name = game.level.level.." of "..game.zone.name - self.name = "Escort: "..self.kind.name.." (level "..self.level_name..")" + self.level_name = ("%s of %s"):tformat(game.level.level, game.zone.name) + self.name = ("Escort: %s (level %s)"):tformat(_t(self.kind.name), self.level_name) local Chat = require "engine.Chat" Chat.new("escort-quest-start", npc, game.player, {text=self.kind.text, npc=npc}):invoke() diff --git a/game/modules/tome/data/quests/grave-necromancer.lua b/game/modules/tome/data/quests/grave-necromancer.lua index c6418afafba422fdf54f942c42e4eeef9741e725..fe5ba1b9b54c4f10e68acbb5e1e39606e5802584 100644 --- a/game/modules/tome/data/quests/grave-necromancer.lua +++ b/game/modules/tome/data/quests/grave-necromancer.lua @@ -17,20 +17,20 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "And now for a grave" +name = _t"And now for a grave" desc = function(self, who) local desc = {} - desc[#desc+1] = "Ungrol of Last Hope asked you to look for his wife's friend Celia, who has been reported missing. She frequently visits her late husband's mausoleum, in the graveyard near Last Hope." + desc[#desc+1] = _t"Ungrol of Last Hope asked you to look for his wife's friend Celia, who has been reported missing. She frequently visits her late husband's mausoleum, in the graveyard near Last Hope." if self:isCompleted("note") then - desc[#desc+1] = "You searched for Celia in the graveyard near Last Hope, and found a note. In it, Celia reveals that she has been conducting experiments in the dark arts, in an attempt to extend her life... also, she is pregnant." + desc[#desc+1] = _t"You searched for Celia in the graveyard near Last Hope, and found a note. In it, Celia reveals that she has been conducting experiments in the dark arts, in an attempt to extend her life... also, she is pregnant." end if self:isCompleted("coffins") then - desc[#desc+1] = "You have tracked Celia to her husband's mausoleum in the graveyard near Last Hope. It seems she has taken some liberties with the corpses there." + desc[#desc+1] = _t"You have tracked Celia to her husband's mausoleum in the graveyard near Last Hope. It seems she has taken some liberties with the corpses there." end if self:isCompleted("kill") then - desc[#desc+1] = "You have laid Celia to rest, putting an end to her gruesome experiments." + desc[#desc+1] = _t"You have laid Celia to rest, putting an end to her gruesome experiments." elseif self:isCompleted("kill-necromancer") then - desc[#desc+1] = "You have laid Celia to rest, putting an end to her failed experiments. You have taken her heart, for your own experiments. You do not plan to fail as she did." + desc[#desc+1] = _t"You have laid Celia to rest, putting an end to her failed experiments. You have taken her heart, for your own experiments. You do not plan to fail as she did." end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/high-peak.lua b/game/modules/tome/data/quests/high-peak.lua index 4438c6ff69231ff8a9d50c64baa5ba2e29b70121..15a797570f6e368050fd5527b86dadb703e8a9b6 100644 --- a/game/modules/tome/data/quests/high-peak.lua +++ b/game/modules/tome/data/quests/high-peak.lua @@ -19,26 +19,26 @@ use_ui = "quest-main" -name = "Falling Toward Apotheosis" +name = _t"Falling Toward Apotheosis" desc = function(self, who) local desc = {} if not self:isCompleted() then - desc[#desc+1] = "You have vanquished the masters of the Orc Pride. Now you must venture inside the most dangerous place of this world: the High Peak." - desc[#desc+1] = "Seek the Sorcerers and stop them before they bend the world to their will." - desc[#desc+1] = "To enter, you will need the four orbs of command to remove the shield over the peak." - desc[#desc+1] = "The entrance to the peak passes through a place called 'the slime tunnels', probably located inside or near Grushnak Pride." + desc[#desc+1] = _t"You have vanquished the masters of the Orc Pride. Now you must venture inside the most dangerous place of this world: the High Peak." + desc[#desc+1] = _t"Seek the Sorcerers and stop them before they bend the world to their will." + desc[#desc+1] = _t"To enter, you will need the four orbs of command to remove the shield over the peak." + desc[#desc+1] = _t"The entrance to the peak passes through a place called 'the slime tunnels', probably located inside or near Grushnak Pride." else - desc[#desc+1] = "You have reached the summit of the High Peak, entered the sanctum of the Sorcerers and destroyed them, freeing the world from the threat of evil." - desc[#desc+1] = "You have won the game!" + desc[#desc+1] = _t"You have reached the summit of the High Peak, entered the sanctum of the Sorcerers and destroyed them, freeing the world from the threat of evil." + desc[#desc+1] = _t"You have won the game!" end - if self:isCompleted("killed-aeryn") then desc[#desc+1] = "#LIGHT_GREEN#* You encountered Sun Paladin Aeryn who blamed you for the loss of the Sunwall. You were forced to kill her.#LAST#" end - if self:isCompleted("spared-aeryn") then desc[#desc+1] = "#LIGHT_GREEN#* You encountered Sun Paladin Aeryn who blamed you for the loss of the Sunwall, but you spared her.#LAST#" end + if self:isCompleted("killed-aeryn") then desc[#desc+1] = _t"#LIGHT_GREEN#* You encountered Sun Paladin Aeryn who blamed you for the loss of the Sunwall. You were forced to kill her.#LAST#" end + if self:isCompleted("spared-aeryn") then desc[#desc+1] = _t"#LIGHT_GREEN#* You encountered Sun Paladin Aeryn who blamed you for the loss of the Sunwall, but you spared her.#LAST#" end - if game.winner and game.winner == "full" then desc[#desc+1] = "#LIGHT_GREEN#* You defeated the Sorcerers before the Void portal could open.#LAST#" end - if game.winner and game.winner == "aeryn-sacrifice" then desc[#desc+1] = "#LIGHT_GREEN#* You defeated the Sorcerers and Aeryn sacrificed herself to close the Void portal.#LAST#" end - if game.winner and game.winner == "self-sacrifice" then desc[#desc+1] = "#LIGHT_GREEN#* You defeated the Sorcerers and sacrificed yourself to close the Void portal.#LAST#" end + if game.winner and game.winner == "full" then desc[#desc+1] = _t"#LIGHT_GREEN#* You defeated the Sorcerers before the Void portal could open.#LAST#" end + if game.winner and game.winner == "aeryn-sacrifice" then desc[#desc+1] = _t"#LIGHT_GREEN#* You defeated the Sorcerers and Aeryn sacrificed herself to close the Void portal.#LAST#" end + if game.winner and game.winner == "self-sacrifice" then desc[#desc+1] = _t"#LIGHT_GREEN#* You defeated the Sorcerers and sacrificed yourself to close the Void portal.#LAST#" end return table.concat(desc, "\n") end @@ -59,7 +59,7 @@ on_status_change = function(self, who, status, sub) end local Chat = require"engine.Chat" - local chat = Chat.new("sorcerer-end", {name="Endgame"}, game:getPlayer(true)) + local chat = Chat.new("sorcerer-end", {name=_t"Endgame"}, game:getPlayer(true)) chat:invoke() self:end_end_combat() @@ -106,8 +106,8 @@ function failed_charred_scar(self, level) game:onLevelLoad("wilderness-1", function(zone, level) local spot = level:pickSpot{type="zone-pop", subtype="ruined-gates-of-morning"} local wild = level.map(spot.x, spot.y, engine.Map.TERRAIN) - wild.name = "Ruins of the Gates of Morning" - wild.desc = "The Sunwall was destroyed while you were trapped in the High Peak." + wild.name = _t"Ruins of the Gates of Morning" + wild.desc = _t"The Sunwall was destroyed while you were trapped in the High Peak." wild.change_level = nil wild.change_zone = nil end) @@ -140,7 +140,7 @@ function win(self, how) local p = game:getPlayer(true) p.winner = how - game:registerDialog(require("engine.dialogs.ShowText").new("Winner", "win", {playername=p.name, how=how}, game.w * 0.6)) + game:registerDialog(require("engine.dialogs.ShowText").new(_t"Winner", "win", {playername=p.name, how=how}, game.w * 0.6)) -- Save the winner, if alive if not p.dead then @@ -172,46 +172,46 @@ end function onWin(self, who) local desc = {} - desc[#desc+1] = "#GOLD#Well done! You have won the Tales of Maj'Eyal: The Age of Ascendancy#WHITE#" - desc[#desc+1] = "" - desc[#desc+1] = "The Sorcerers are dead, and the Orc Pride lies in ruins, thanks to your efforts." - desc[#desc+1] = "" + desc[#desc+1] = _t"#GOLD#Well done! You have won the Tales of Maj'Eyal: The Age of Ascendancy#WHITE#" + desc[#desc+1] = _t"" + desc[#desc+1] = _t"The Sorcerers are dead, and the Orc Pride lies in ruins, thanks to your efforts." + desc[#desc+1] = _t"" -- Yeeks are special if who:isQuestStatus("high-peak", engine.Quest.COMPLETED, "yeek") then - desc[#desc+1] = "Your sacrifice worked. Your mental energies were imbued with farportal energies. The Way radiated from the High Peak toward the rest of Eyal like a mental tidal wave." - desc[#desc+1] = "Every sentient being in Eyal is now part of the Way. Peace and happiness are enforced for all." - desc[#desc+1] = "Only the mages of Angolwen were able to withstand the mental shock and thus are the only unsafe people left. But what can they do against the might of the Way?" + desc[#desc+1] = _t"Your sacrifice worked. Your mental energies were imbued with farportal energies. The Way radiated from the High Peak toward the rest of Eyal like a mental tidal wave." + desc[#desc+1] = _t"Every sentient being in Eyal is now part of the Way. Peace and happiness are enforced for all." + desc[#desc+1] = _t"Only the mages of Angolwen were able to withstand the mental shock and thus are the only unsafe people left. But what can they do against the might of the Way?" return 0, desc elseif who:isQuestStatus("high-peak", engine.Quest.COMPLETED, "yeek-stab") then - desc[#desc+1] = "In the aftermath of the battle the Way tried to force you to act as a vessel to bring the Way to every sentient being." - desc[#desc+1] = "Through an incredible display of willpower you resisted long enough to ask Aeryn to kill you." - desc[#desc+1] = "She sadly agreed and ran her sword through you, enabling you to do the last sacrifice you could for the world." + desc[#desc+1] = _t"In the aftermath of the battle the Way tried to force you to act as a vessel to bring the Way to every sentient being." + desc[#desc+1] = _t"Through an incredible display of willpower you resisted long enough to ask Aeryn to kill you." + desc[#desc+1] = _t"She sadly agreed and ran her sword through you, enabling you to do the last sacrifice you could for the world." return 0, desc end if who.winner == "full" then - desc[#desc+1] = "You have prevented the portal to the Void from opening and thus stopped the Creator from bringing about the end of the world." + desc[#desc+1] = _t"You have prevented the portal to the Void from opening and thus stopped the Creator from bringing about the end of the world." elseif who.winner == "aeryn-sacrifice" then - desc[#desc+1] = "In a selfless act, High Sun Paladin Aeryn sacrificed herself to close the portal to the Void and thus stopped the Creator from bringing about the end of the world." + desc[#desc+1] = _t"In a selfless act, High Sun Paladin Aeryn sacrificed herself to close the portal to the Void and thus stopped the Creator from bringing about the end of the world." elseif who.winner == "self-sacrifice" then - desc[#desc+1] = "In a selfless act, you sacrificed yourself to close the portal to the Void and thus stopped the Creator from bringing about the end of the world." + desc[#desc+1] = _t"In a selfless act, you sacrificed yourself to close the portal to the Void and thus stopped the Creator from bringing about the end of the world." end if who:isQuestStatus("high-peak", engine.Quest.COMPLETED, "gates-of-morning-destroyed") then - desc[#desc+1] = "" - desc[#desc+1] = "The Gates of Morning have been destroyed and the Sunwall has fallen. The last remnants of the free people in the Far East will surely diminish, and soon only orcs will inhabit this land." + desc[#desc+1] = _t"" + desc[#desc+1] = _t"The Gates of Morning have been destroyed and the Sunwall has fallen. The last remnants of the free people in the Far East will surely diminish, and soon only orcs will inhabit this land." else - desc[#desc+1] = "" - desc[#desc+1] = "The orc presence in the Far East has greatly been diminished by the loss of their leaders and the destruction of the Sorcerers. The free people of the Sunwall will be able to prosper and thrive on this land." + desc[#desc+1] = _t"" + desc[#desc+1] = _t"The orc presence in the Far East has greatly been diminished by the loss of their leaders and the destruction of the Sorcerers. The free people of the Sunwall will be able to prosper and thrive on this land." end - desc[#desc+1] = "" - desc[#desc+1] = "Maj'Eyal will once more know peace. Most of its inhabitants will never know they even were on the verge of destruction, but then this is what being a true hero means: to do the right thing even though nobody will know about it." + desc[#desc+1] = _t"" + desc[#desc+1] = _t"Maj'Eyal will once more know peace. Most of its inhabitants will never know they even were on the verge of destruction, but then this is what being a true hero means: to do the right thing even though nobody will know about it." if who.winner ~= "self-sacrifice" then - desc[#desc+1] = "" - desc[#desc+1] = "You may continue playing and enjoy the rest of the world." + desc[#desc+1] = _t"" + desc[#desc+1] = _t"You may continue playing and enjoy the rest of the world." end return 0, desc end diff --git a/game/modules/tome/data/quests/infinite-dungeon.lua b/game/modules/tome/data/quests/infinite-dungeon.lua index d4af33b6cc3e03b3a47c6d6e72277683f971717b..84e01ac0c74a8b96c738de7e472ea860f9dbd59d 100644 --- a/game/modules/tome/data/quests/infinite-dungeon.lua +++ b/game/modules/tome/data/quests/infinite-dungeon.lua @@ -19,10 +19,10 @@ use_ui = "quest-main" -name = "The Infinite Dungeon" +name = _t"The Infinite Dungeon" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have entered the Infinite Dungeon. There is no going back now." - desc[#desc+1] = "Go deep, fight, win or die in a blaze of glory!" + desc[#desc+1] = _t"You have entered the Infinite Dungeon. There is no going back now." + desc[#desc+1] = _t"Go deep, fight, win or die in a blaze of glory!" return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/keepsake.lua b/game/modules/tome/data/quests/keepsake.lua index 99cba55263b237945cd872a5394fc2ec417ee1b2..647bbf48fcc8ce00f6421b773d09d2caf9a2e3f5 100644 --- a/game/modules/tome/data/quests/keepsake.lua +++ b/game/modules/tome/data/quests/keepsake.lua @@ -19,38 +19,38 @@ -- Keepsake -name = "Keepsake" +name = _t"Keepsake" id = "keepsake" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have begun to look for a way to overcome the curse that afflicts you." + desc[#desc+1] = _t"You have begun to look for a way to overcome the curse that afflicts you." if self:isCompleted("berethh-killed-good") then - desc[#desc+1] = "You have found a small iron acorn which you keep as a reminder of your past." - desc[#desc+1] = "You have destroyed the merchant caravan that you once considered family." - desc[#desc+1] = "Kyless, the one who brought the curse, is dead by your hand." - desc[#desc+1] = "Berethh is dead, may he rest in peace." - desc[#desc+1] = "Your curse has changed the iron acorn which now serves as a cruel reminder of your past and present." + desc[#desc+1] = _t"You have found a small iron acorn which you keep as a reminder of your past." + desc[#desc+1] = _t"You have destroyed the merchant caravan that you once considered family." + desc[#desc+1] = _t"Kyless, the one who brought the curse, is dead by your hand." + desc[#desc+1] = _t"Berethh is dead, may he rest in peace." + desc[#desc+1] = _t"Your curse has changed the iron acorn which now serves as a cruel reminder of your past and present." elseif self:isCompleted("berethh-killed-evil") then - desc[#desc+1] = "You have found a small iron acorn which you keep as a reminder of your past" - desc[#desc+1] = "You have destroyed the merchant caravan that you once considered family." - desc[#desc+1] = "Kyless, the one who brought the curse, is dead by your hand." - desc[#desc+1] = "Berethh is dead, may he rest in peace." - desc[#desc+1] = "Your curse has defiled the iron acorn which now serves as a reminder of your vile nature." + desc[#desc+1] = _t"You have found a small iron acorn which you keep as a reminder of your past" + desc[#desc+1] = _t"You have destroyed the merchant caravan that you once considered family." + desc[#desc+1] = _t"Kyless, the one who brought the curse, is dead by your hand." + desc[#desc+1] = _t"Berethh is dead, may he rest in peace." + desc[#desc+1] = _t"Your curse has defiled the iron acorn which now serves as a reminder of your vile nature." elseif self:isCompleted("kyless-killed") then - desc[#desc+1] = "You have found a small iron acorn which you keep as a reminder of your past." - desc[#desc+1] = "You have destroyed the merchant caravan that you once considered family." - desc[#desc+1] = "Kyless, the one who brought the curse, is dead by your hand." - desc[#desc+1] = "#LIGHT_GREEN#You need to find Berethh, the last person who may be able to help you." + desc[#desc+1] = _t"You have found a small iron acorn which you keep as a reminder of your past." + desc[#desc+1] = _t"You have destroyed the merchant caravan that you once considered family." + desc[#desc+1] = _t"Kyless, the one who brought the curse, is dead by your hand." + desc[#desc+1] = _t"#LIGHT_GREEN#You need to find Berethh, the last person who may be able to help you." elseif self:isCompleted("caravan-destroyed") then - desc[#desc+1] = "You have found a small iron acorn which you keep as a reminder of your past." - desc[#desc+1] = "You have destroyed the merchant caravan that you once considered family." - desc[#desc+1] = "#LIGHT_GREEN#Seek out Kyless' cave in the northern part of the meadow and end him. Perhaps the curse will end with him." + desc[#desc+1] = _t"You have found a small iron acorn which you keep as a reminder of your past." + desc[#desc+1] = _t"You have destroyed the merchant caravan that you once considered family." + desc[#desc+1] = _t"#LIGHT_GREEN#Seek out Kyless' cave in the northern part of the meadow and end him. Perhaps the curse will end with him." elseif self:isCompleted("acorn-found") then - desc[#desc+1] = "You have found a small iron acorn which you keep as a reminder of your past." - desc[#desc+1] = "#LIGHT_GREEN#Discover the meaning of the acorn and the dream." + desc[#desc+1] = _t"You have found a small iron acorn which you keep as a reminder of your past." + desc[#desc+1] = _t"#LIGHT_GREEN#Discover the meaning of the acorn and the dream." else - desc[#desc+1] = "#LIGHT_GREEN#You may have to revist your past to unlock some secret buried there." + desc[#desc+1] = _t"#LIGHT_GREEN#You may have to revist your past to unlock some secret buried there." end return table.concat(desc, "\n") end @@ -124,7 +124,7 @@ end on_caravan_destroyed = function(self, who) local Chat = require "engine.Chat" - local chat = Chat.new("keepsake-caravan-destroyed", {name="Last of the Caravan"}, game.player) + local chat = Chat.new("keepsake-caravan-destroyed", {name=_t"Last of the Caravan"}, game.player) chat:invoke() end @@ -136,7 +136,7 @@ on_caravan_destroyed_chat_over = function(self, who) local g = mod.class.Grid.new{ show_tooltip=true, always_remember = true, type="floor", subtype="grass", - name="secret path to the cave", + name=_t"secret path to the cave", image = "terrain/grass.png", add_mos = {{image="terrain/way_next_8.png"}}, display = '>', color_r=255, color_g=255, color_b=0, notice = true, always_remember = true, @@ -203,7 +203,7 @@ on_vault_trigger = function(self, who) end on_dog_vault = function(self, who) - require("engine.ui.Dialog"):simplePopup("A Second Vault", "You recoginize this door as the entrance to a second vault. There are some scuffling noises and heavy breathing coming from the other side of the door.") + require("engine.ui.Dialog"):simplePopup(_t"A Second Vault", _t"You recoginize this door as the entrance to a second vault. There are some scuffling noises and heavy breathing coming from the other side of the door.") end on_kyless_encounter = function(self, who) @@ -213,7 +213,7 @@ end on_kyless_death = function(self, who, kyless) local Chat = require "engine.Chat" - local chat = Chat.new("keepsake-kyless-death", {name="Death of Kyless"}, game.player) + local chat = Chat.new("keepsake-kyless-death", {name=_t"Death of Kyless"}, game.player) chat:invoke() who:setQuestStatus("keepsake", engine.Quest.COMPLETED, "kyless-killed") @@ -244,7 +244,7 @@ end on_berethh_encounter = function(self, who, berethh) local Chat = require "engine.Chat" - local chat = Chat.new("keepsake-berethh-encounter", {name="Berethh"}, game.player) + local chat = Chat.new("keepsake-berethh-encounter", {name=_t"Berethh"}, game.player) chat:invoke() end diff --git a/game/modules/tome/data/quests/kryl-feijan-escape.lua b/game/modules/tome/data/quests/kryl-feijan-escape.lua index 32510caa21b8ea450d8d9bdecd56aefd02b777b1..5cb9a4a67408295b2849b7714ca26390a53e9390 100644 --- a/game/modules/tome/data/quests/kryl-feijan-escape.lua +++ b/game/modules/tome/data/quests/kryl-feijan-escape.lua @@ -17,18 +17,18 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "The Sect of Kryl-Feijan" +name = _t"The Sect of Kryl-Feijan" desc = function(self, who) local desc = {} - desc[#desc+1] = "You discovered a sect worshipping a demon named Kryl-Feijan in a crypt." - desc[#desc+1] = "They were trying to bring it back into the world using a human sacrifice." + desc[#desc+1] = _t"You discovered a sect worshipping a demon named Kryl-Feijan in a crypt." + desc[#desc+1] = _t"They were trying to bring it back into the world using a human sacrifice." if self:isStatus(self.DONE) then - desc[#desc+1] = "You defeated the acolytes and saved the woman. She told you she is the daughter of a rich merchant of Last Hope." + desc[#desc+1] = _t"You defeated the acolytes and saved the woman. She told you she is the daughter of a rich merchant of Last Hope." elseif self:isStatus(self.FAILED) then if self.not_saved then - desc[#desc+1] = "You failed to protect her when escorting her out of the crypt." + desc[#desc+1] = _t"You failed to protect her when escorting her out of the crypt." else - desc[#desc+1] = "You failed to defeat the acolytes in time - the woman got torn apart by the demon growing inside her." + desc[#desc+1] = _t"You failed to defeat the acolytes in time - the woman got torn apart by the demon growing inside her." end end return table.concat(desc, "\n") diff --git a/game/modules/tome/data/quests/lichform.lua b/game/modules/tome/data/quests/lichform.lua index 880d5a092cc22f7043fee2b0ab066697c1f496d4..05989b3d971f58fe462123ea1878b96956ed5105 100644 --- a/game/modules/tome/data/quests/lichform.lua +++ b/game/modules/tome/data/quests/lichform.lua @@ -17,31 +17,31 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "From Death, Life" +name = _t"From Death, Life" stables = 0 desc = function(self, who) local desc = {} - desc[#desc+1] = "The affairs of this mortal world are trifling compared to your true goal: To conquer death." - desc[#desc+1] = "Your studies have uncovered much surrounding this subject, but now you must prepare for your glorious rebirth." - desc[#desc+1] = "You will need:" + desc[#desc+1] = _t"The affairs of this mortal world are trifling compared to your true goal: To conquer death." + desc[#desc+1] = _t"Your studies have uncovered much surrounding this subject, but now you must prepare for your glorious rebirth." + desc[#desc+1] = _t"You will need:" - if who.level >= 20 then desc[#desc+1] = "#LIGHT_GREEN#* You are experienced enough.#WHITE#" - else desc[#desc+1] = "#SLATE#* The ceremony will require that you are worthy, experienced, and possessed of a certain amount of power#WHITE#" end + if who.level >= 20 then desc[#desc+1] = _t"#LIGHT_GREEN#* You are experienced enough.#WHITE#" + else desc[#desc+1] = _t"#SLATE#* The ceremony will require that you are worthy, experienced, and possessed of a certain amount of power#WHITE#" end - if self:isCompleted("heart") then desc[#desc+1] = "#LIGHT_GREEN#* You have 'extracted' the heart of one of your fellow necromancers.#WHITE#" - else desc[#desc+1] = "#SLATE#* The beating heart of a powerful necromancer.#WHITE#" end + if self:isCompleted("heart") then desc[#desc+1] = _t"#LIGHT_GREEN#* You have 'extracted' the heart of one of your fellow necromancers.#WHITE#" + else desc[#desc+1] = _t"#SLATE#* The beating heart of a powerful necromancer.#WHITE#" end if who:isQuestStatus("shertul-fortress", self.COMPLETED, "butler") then - desc[#desc+1] = "#LIGHT_GREEN#* Yiilkgur the Sher'tul Fortress is a suitable location.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* Yiilkgur the Sher'tul Fortress is a suitable location.#WHITE#" if who:hasQuest("shertul-fortress").shertul_energy >= 40 then - desc[#desc+1] = "#LIGHT_GREEN#* Yiilkgur has enough energy.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* Yiilkgur has enough energy.#WHITE#" - if who:knowTalent(who.T_LICHFORM) then desc[#desc+1] = "#LIGHT_GREEN#* You are now on the path of lichdom.#WHITE#" - else desc[#desc+1] = "#SLATE#* Use the control orb of Yiilkgur to begin the ceremony.#WHITE#" end - else desc[#desc+1] = "#SLATE#* Your lair must amass enough energy to use in your rebirth (40 energy).#WHITE#" end + if who:knowTalent(who.T_LICHFORM) then desc[#desc+1] = _t"#LIGHT_GREEN#* You are now on the path of lichdom.#WHITE#" + else desc[#desc+1] = _t"#SLATE#* Use the control orb of Yiilkgur to begin the ceremony.#WHITE#" end + else desc[#desc+1] = _t"#SLATE#* Your lair must amass enough energy to use in your rebirth (40 energy).#WHITE#" end else - desc[#desc+1] = "#SLATE#* The ceremony will require a suitable location, secluded and given to the channelling of energy#WHITE#" + desc[#desc+1] = _t"#SLATE#* The ceremony will require a suitable location, secluded and given to the channelling of energy#WHITE#" end return table.concat(desc, "\n") @@ -51,7 +51,7 @@ on_status_change = function(self, who, status, sub) if self:isCompleted() then who:setQuestStatus(self.id, engine.Quest.DONE) who:learnTalent(who.T_LICHFORM, true, 1, {no_unlearn=true}) - require("engine.ui.Dialog"):simplePopup("Lichform", "The secrets of death lay open to you! The skill 'Lichform' has been unlocked!") + require("engine.ui.Dialog"):simplePopup(_t"Lichform", _t"The secrets of death lay open to you! The skill 'Lichform' has been unlocked!") end end diff --git a/game/modules/tome/data/quests/lightning-overload.lua b/game/modules/tome/data/quests/lightning-overload.lua index 80361cf85795ea99b986b662ea5165434050ff5f..d2d45bf2a6b2a9ea808692b9197ca06cadcd93fb 100644 --- a/game/modules/tome/data/quests/lightning-overload.lua +++ b/game/modules/tome/data/quests/lightning-overload.lua @@ -17,25 +17,25 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Storming the city" +name = _t"Storming the city" desc = function(self, who) local desc = {} - desc[#desc+1] = "As you approached Derth you saw a huge dark cloud over the small town." - desc[#desc+1] = "When you entered you were greeted by an army of air elementals slaughtering the population." + desc[#desc+1] = _t"As you approached Derth you saw a huge dark cloud over the small town." + desc[#desc+1] = _t"When you entered you were greeted by an army of air elementals slaughtering the population." if self:isCompleted("saved-derth") then - desc[#desc+1] = " * You have dispatched the elementals but the cloud lingers still. You must find a powerful ally to remove it. There are rumours of a secret town in the mountains, to the southwest. You could also check out the Ziguranth group that is supposed to fight magic." + desc[#desc+1] = _t" * You have dispatched the elementals but the cloud lingers still. You must find a powerful ally to remove it. There are rumours of a secret town in the mountains, to the southwest. You could also check out the Ziguranth group that is supposed to fight magic." end if self:isCompleted("tempest-located") then - desc[#desc+1] = " * You have learned the real threat comes from a rogue Archmage, a Tempest named Urkis. The mages of Angolwen are ready to teleport you there." + desc[#desc+1] = _t" * You have learned the real threat comes from a rogue Archmage, a Tempest named Urkis. The mages of Angolwen are ready to teleport you there." end if self:isCompleted("tempest-entrance") then - desc[#desc+1] = " * You have learned the real threat comes from a rogue Archmage, a Tempest. You have been shown a secret entrance to his stronghold." + desc[#desc+1] = _t" * You have learned the real threat comes from a rogue Archmage, a Tempest. You have been shown a secret entrance to his stronghold." end if self:isCompleted("tempest-urkis-slain") then - desc[#desc+1] = " * You have slain Urkis. Return to Angolwen or Zigur for a reward." + desc[#desc+1] = _t" * You have slain Urkis. Return to Angolwen or Zigur for a reward." end if self:isCompleted() then - desc[#desc+1] = " * Urkis has been dealt with. Permanently." + desc[#desc+1] = _t" * Urkis has been dealt with. Permanently." end return table.concat(desc, "\n") @@ -78,7 +78,7 @@ kill_one = function(self) if self.kill_count >= self.max_count then local Chat = require "engine.Chat" - local chat = Chat.new("derth-attack-over", {name="Scared Halfling"}, game.player) + local chat = Chat.new("derth-attack-over", {name=_t"Scared Halfling"}, game.player) chat:invoke() if not game.zone.unclean_derth_savior then @@ -93,7 +93,7 @@ end teleport_urkis = function(self) game:changeLevel(1, "tempest-peak") - require("engine.ui.Dialog"):simpleLongPopup("Danger...", [[You step out on unfamiliar grounds. You are nearly on top of one of the highest peaks you can see. + require("engine.ui.Dialog"):simpleLongPopup(_t"Danger...", _t[[You step out on unfamiliar grounds. You are nearly on top of one of the highest peaks you can see. The storm is raging above your head.]], 400) end @@ -146,7 +146,7 @@ enter_derth = function(self) end self.kill_count = 0 - require("engine.ui.Dialog"):simpleLongPopup("Danger...", "As you arrive in Derth you notice a huge dark cloud hovering over the town.\nYou hear screams coming from the town square.", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Danger...", _t"As you arrive in Derth you notice a huge dark cloud hovering over the town.\nYou hear screams coming from the town square.", 400) end reenter_derth = function(self) @@ -157,9 +157,9 @@ reenter_derth = function(self) game.player:setQuestStatus(self.id, engine.Quest.COMPLETED, "restored-derth") if self:isCompleted("tempest-entrance") then - require("engine.ui.Dialog"):simpleLongPopup("Clear sky", "It seems the Ziguranth have kept their word.\nDerth is free of the storm cloud.", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Clear sky", _t"It seems the Ziguranth have kept their word.\nDerth is free of the storm cloud.", 400) else - require("engine.ui.Dialog"):simpleLongPopup("Clear sky", "It seems the mages have kept their word.\nDerth is free of the storm cloud.", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Clear sky", _t"It seems the mages have kept their word.\nDerth is free of the storm cloud.", 400) local p = game.party:findMember{main=true} if p:knowTalentType("cunning/trapping") then game.party:learnLore("derth-beam-trap") diff --git a/game/modules/tome/data/quests/lost-merchant.lua b/game/modules/tome/data/quests/lost-merchant.lua index 0601f6cf17ce9896a732b5b7bc2c266f0e778821..ee20be4f44df9114e123137d1c1e1c18948d8ceb 100644 --- a/game/modules/tome/data/quests/lost-merchant.lua +++ b/game/modules/tome/data/quests/lost-merchant.lua @@ -17,11 +17,11 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Trapped!" +name = _t"Trapped!" desc = function(self, who) local desc = {} - desc[#desc+1] = "You heard a plea for help and decided to investigate..." - desc[#desc+1] = "Only to find yourself trapped inside an unknown tunnel complex." + desc[#desc+1] = _t"You heard a plea for help and decided to investigate..." + desc[#desc+1] = _t"Only to find yourself trapped inside an unknown tunnel complex." return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/love-melinda.lua b/game/modules/tome/data/quests/love-melinda.lua index e28d67599869fe7a467caf751995dc45775a1996..02ef7d6f802323d28dfbbf05c40e074c2f0a6c8e 100644 --- a/game/modules/tome/data/quests/love-melinda.lua +++ b/game/modules/tome/data/quests/love-melinda.lua @@ -17,24 +17,24 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Melinda, lucky girl" +name = _t"Melinda, lucky girl" desc = function(self, who) local desc = {} - desc[#desc+1] = "After rescuing Melinda from Kryl-Feijan and the cultists you met her again in Last Hope." + desc[#desc+1] = _t"After rescuing Melinda from Kryl-Feijan and the cultists you met her again in Last Hope." if self:isCompleted("saved-beach") then - desc[#desc+1] = "Melinda was saved from the brink of death at the beach, by a strange wave of blight." + desc[#desc+1] = _t"Melinda was saved from the brink of death at the beach, by a strange wave of blight." end if self:isCompleted("death-beach") then - desc[#desc+1] = "Melinda died to a Yaech raiding party at the beach." + desc[#desc+1] = _t"Melinda died to a Yaech raiding party at the beach." end if self:isCompleted("can_come_fortress") then - desc[#desc+1] = "The Fortress Shadow said she could be cured." + desc[#desc+1] = _t"The Fortress Shadow said she could be cured." end if self:isCompleted("moved-in") then - desc[#desc+1] = "Melinda decided to come live with you in your Fortress." + desc[#desc+1] = _t"Melinda decided to come live with you in your Fortress." end if self:isCompleted("portal-done") then - desc[#desc+1] = "The Fortress Shadow has established a portal for her so she can come and go freely." + desc[#desc+1] = _t"The Fortress Shadow has established a portal for her so she can come and go freely." end return table.concat(desc, "\n") end @@ -50,14 +50,14 @@ end function spawnFortress(self, who) game:onTickEnd(function() local melinda = require("mod.class.NPC").new{ - name = "Melinda", define_as = "MELINDA_NPC", + name = _t"Melinda", define_as = "MELINDA_NPC", type = "humanoid", subtype = "human", female=true, display = "@", color=colors.LIGHT_BLUE, image = "player/cornac_female_redhair.png", moddable_tile = "human_female", moddable_tile_base = "base_redhead_01.png", moddable_tile_ornament = {female="braid_redhead_01"}, - desc = [[You saved her from the depth of a cultists' lair and fell in love with her. She has moved into the Fortress to see you more often.]], + desc = _t[[You saved her from the depth of a cultists' lair and fell in love with her. She has moved into the Fortress to see you more often.]], autolevel = "tank", ai = "none", stats = { str=8, dex=7, mag=8, con=12 }, @@ -91,7 +91,7 @@ end) end function melindaCompanion(self, who, c, sc) for uid, e in pairs(game.level.entities) do if e.define_as == "MELINDA_NPC" then e:disappear() end end - local melinda = require("mod.class.Player").new{name="Melinda"} + local melinda = require("mod.class.Player").new{name=_t"Melinda"} local birth = require("mod.dialogs.Birther").new("", melinda, {}, function() end) birth:setDescriptor("sex", "Female") birth:setDescriptor("world", "Maj'Eyal") @@ -114,7 +114,7 @@ function melindaCompanion(self, who, c, sc) melinda:forceLevelup(who.level) game.party:addMember(melinda, { - control="full", type="companion", title="Melinda", + control="full", type="companion", title=_t"Melinda", orders = {target=true, leash=true, anchor=true, talents=true, behavior=true}, }) end diff --git a/game/modules/tome/data/quests/lumberjack-cursed.lua b/game/modules/tome/data/quests/lumberjack-cursed.lua index 4591c794f5ea0493eb61eb40b7f3e5992d3adc33..0ce1c509a3d949b8f48ee376712112be83f48024 100644 --- a/game/modules/tome/data/quests/lumberjack-cursed.lua +++ b/game/modules/tome/data/quests/lumberjack-cursed.lua @@ -17,12 +17,12 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "The beast within" +name = _t"The beast within" desc = function(self, who) local desc = {} - desc[#desc+1] = "You met a half-mad lumberjack fleeing a small village, rambling about an untold horror lurking there, slaughtering people." + desc[#desc+1] = _t"You met a half-mad lumberjack fleeing a small village, rambling about an untold horror lurking there, slaughtering people." if self.lumberjacks_died > 0 then - desc[#desc+1] = self.lumberjacks_died.." lumberjacks have died." + desc[#desc+1] = ("%d lumberjacks have died."):tformat(self.lumberjacks_died) end return table.concat(desc, "\n") @@ -32,7 +32,7 @@ on_grant = function(self, who) -- Reveal entrances local g = mod.class.Grid.new{ show_tooltip=true, always_remember = true, - name="Small lumberjack village", + name=_t"Small lumberjack village", display='*', color=colors.WHITE, notice = true, image="terrain/grass.png", add_mos={{image="terrain/town1.png"}}, change_level=1, glow=true, change_zone="town-lumberjack-village", @@ -52,7 +52,7 @@ on_status_change = function(self, who, status, sub) local money = math.max(0, (20 - self.lumberjacks_died) * 1.2) if money > 0 then who:incMoney(money) - require("engine.ui.Dialog"):simplePopup("Thanks", ("The remaining lumberjacks collect some gold to thank you (%0.2f)."):format(money)) + require("engine.ui.Dialog"):simplePopup(_t"Thanks", ("The remaining lumberjacks collect some gold to thank you (%0.2f)."):tformat(money)) end if self.lumberjacks_died < 7 then local o = game.zone:makeEntity(game.level, "object", {type="tool", subtype="digger", tome_drops="boss"}, nil, true) @@ -60,7 +60,7 @@ on_status_change = function(self, who, status, sub) game:addEntity(game.level, o, "object") o:identify(true) who:addObject(who.INVEN_INVEN, o) - require("engine.ui.Dialog"):simplePopup("Thanks", ("You saved %s of us, please take this as a reward. (They give you %s)"):format(self.lumberjacks_died == 0 and "all" or "most", o:getName{do_color=true})) + require("engine.ui.Dialog"):simplePopup(_t"Thanks", ("You saved %s of us, please take this as a reward. (They give you %s)"):tformat(self.lumberjacks_died == 0 and _t"all" or _t"most", o:getName{do_color=true})) end end who:setQuestStatus(self.id, engine.Quest.DONE) diff --git a/game/modules/tome/data/quests/mage-apprentice.lua b/game/modules/tome/data/quests/mage-apprentice.lua index adbc7b4d0325e751454b1bd2f721f1a6212b69b3..e4c1ff00c5e2fdc3d8434c410ed69f017c057456 100644 --- a/game/modules/tome/data/quests/mage-apprentice.lua +++ b/game/modules/tome/data/quests/mage-apprentice.lua @@ -17,14 +17,14 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "An apprentice task" +name = _t"An apprentice task" desc = function(self, who) local desc = {} - desc[#desc+1] = "You met a novice mage who was tasked to collect an arcane powered artifact." - desc[#desc+1] = "He asked for your help, should you collect some that you do not need." + desc[#desc+1] = _t"You met a novice mage who was tasked to collect an arcane powered artifact." + desc[#desc+1] = _t"He asked for your help, should you collect some that you do not need." if self:isCompleted() then else - desc[#desc+1] = "#SLATE#* Collect an artifact arcane powered item.#WHITE#" + desc[#desc+1] = _t"#SLATE#* Collect an artifact arcane powered item.#WHITE#" end return table.concat(desc, "\n") end @@ -42,7 +42,7 @@ on_status_change = function(self, who, status, sub) end collect_staff_unique = function(self, npc, who, dialog) - who:showInventory("Offer which item?", who:getInven("INVEN"), + who:showInventory(_t"Offer which item?", who:getInven("INVEN"), function(o) return (o.power_source and o.power_source.arcane and o.unique) or (o.define_as == "STAFF_ABSORPTION") end, function(o, item) diff --git a/game/modules/tome/data/quests/master-jeweler.lua b/game/modules/tome/data/quests/master-jeweler.lua index 64a42701b21206840edea0a0892f5101a4187d71..59e1bebf23e6264cba1de823784b044b7b6eabc3 100644 --- a/game/modules/tome/data/quests/master-jeweler.lua +++ b/game/modules/tome/data/quests/master-jeweler.lua @@ -17,13 +17,13 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Lost Knowledge" +name = _t"Lost Knowledge" desc = function(self, who) local desc = {} - desc[#desc+1] = "You found an ancient tome about gems." - desc[#desc+1] = "You should bring it to the jeweler in the Gates of Morning." + desc[#desc+1] = _t"You found an ancient tome about gems." + desc[#desc+1] = _t"You should bring it to the jeweler in the Gates of Morning." if self:isCompleted("search-valley") then - desc[#desc+1] = "Limmir told you to look for the Valley of the Moon in the southern mountains." + desc[#desc+1] = _t"Limmir told you to look for the Valley of the Moon in the southern mountains." end return table.concat(desc, "\n") end @@ -88,7 +88,7 @@ summon_limmir = function(self, who) limmir.no_party_ai = true game.zone:addEntity(game.level, limmir, "actor", 45, 1) - game.party:addMember(limmir, {type="quest", title="Limmir (Quest)", temporary_level = true}) + game.party:addMember(limmir, {type="quest", title=_t"Limmir (Quest)", temporary_level = true}) end ritual_end = function(self) @@ -111,7 +111,7 @@ ritual_end = function(self) local e = game.level.e_array[i] if not e.unique and e.type == "demon" then e:die() end end - limmir.name = "Limmir the Master Jeweler" + limmir.name = _t"Limmir the Master Jeweler" limmir.can_talk = "jewelry-store" game.party:removeMember(limmir) diff --git a/game/modules/tome/data/quests/orb-command.lua b/game/modules/tome/data/quests/orb-command.lua index 69cc37290ac4e13906d6ec0073aeb3127b802d75..d4c2a7582347864e4e33904ac7933b57965c33c7 100644 --- a/game/modules/tome/data/quests/orb-command.lua +++ b/game/modules/tome/data/quests/orb-command.lua @@ -19,11 +19,11 @@ use_ui = "quest-main" -name = "The Orbs of Command" +name = _t"The Orbs of Command" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have found an orb of command that seems to be used to open the shield protecting the High Peak." - desc[#desc+1] = "There seems to be a total of four of them. The more you have the weaker the shield will be." + desc[#desc+1] = _t"You have found an orb of command that seems to be used to open the shield protecting the High Peak." + desc[#desc+1] = _t"There seems to be a total of four of them. The more you have the weaker the shield will be." return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/orc-breeding-pits.lua b/game/modules/tome/data/quests/orc-breeding-pits.lua index 538f0b9264924554e84dd697f35021165c60a50b..e4c1740368bf0066279aa67842d43d9119acc68c 100644 --- a/game/modules/tome/data/quests/orc-breeding-pits.lua +++ b/game/modules/tome/data/quests/orc-breeding-pits.lua @@ -18,19 +18,19 @@ -- darkgod@te4.org -- Quest for the the breeding pits -name = "Desperate Measures" +name = _t"Desperate Measures" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have encountered a dying sun paladin that told you about the orcs breeding pit, a true abomination." + desc[#desc+1] = _t"You have encountered a dying sun paladin that told you about the orcs breeding pit, a true abomination." if self:isStatus(engine.Quest.COMPLETED, "wuss-out") then - desc[#desc+1] = "You have decided to report the information to Aeryn so she can deal with it." + desc[#desc+1] = _t"You have decided to report the information to Aeryn so she can deal with it." if self:isStatus(engine.Quest.COMPLETED, "wuss-out-done") then - desc[#desc+1] = "Aeryn said she would send troops to deal with it." + desc[#desc+1] = _t"Aeryn said she would send troops to deal with it." end else - desc[#desc+1] = "You have taken upon yourself to cleanse it and deal a crippling blow to the orcs." + desc[#desc+1] = _t"You have taken upon yourself to cleanse it and deal a crippling blow to the orcs." if self:isStatus(engine.Quest.COMPLETED, "genocide") then - desc[#desc+1] = "The abominable task is done." + desc[#desc+1] = _t"The abominable task is done." end end return table.concat(desc, "\n") @@ -47,7 +47,7 @@ reveal = function(self) if not spot then return end local g = game.level.map(spot.x, spot.y, engine.Map.TERRAIN):cloneFull() - g.name = "Entrance to the orc breeding pit" + g.name = _t"Entrance to the orc breeding pit" g.display='>' g.color_r=colors.GREEN.r g.color_g=colors.GREEN.g g.color_b=colors.GREEN.b g.notice = true g.change_level=1 g.change_zone="orc-breeding-pit" g.glow=true g.add_displays = g.add_displays or {} diff --git a/game/modules/tome/data/quests/orc-hunt.lua b/game/modules/tome/data/quests/orc-hunt.lua index 6c259e738937ffe889a1406677b998efa532a906..ef78219eb830bf0caeafd47532894906e67726b5 100644 --- a/game/modules/tome/data/quests/orc-hunt.lua +++ b/game/modules/tome/data/quests/orc-hunt.lua @@ -20,12 +20,12 @@ use_ui = "quest-main" -- Orc Hunting -name = "Let's hunt some Orc" +name = _t"Let's hunt some Orc" desc = function(self, who) local desc = {} - desc[#desc+1] = "The elder in Last Hope sent you to the old Dwarven kingdom of Reknor, deep under the Iron Throne, to investigate the orc presence." - desc[#desc+1] = "Find out if they are in any way linked to the lost staff." - desc[#desc+1] = "But be careful -- even the Dwarves have not ventured in these old halls for many years." + desc[#desc+1] = _t"The elder in Last Hope sent you to the old Dwarven kingdom of Reknor, deep under the Iron Throne, to investigate the orc presence." + desc[#desc+1] = _t"Find out if they are in any way linked to the lost staff." + desc[#desc+1] = _t"But be careful -- even the Dwarves have not ventured in these old halls for many years." return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/orc-pride.lua b/game/modules/tome/data/quests/orc-pride.lua index 19eed5478fac285eded076a8a9c255b2a95d819f..0aa9c671dfc00a6b0c180abab70d3071eb6846f9 100644 --- a/game/modules/tome/data/quests/orc-pride.lua +++ b/game/modules/tome/data/quests/orc-pride.lua @@ -19,42 +19,42 @@ use_ui = "quest-main" -name = "The many Prides of the Orcs" +name = _t"The many Prides of the Orcs" desc = function(self, who) local desc = {} - desc[#desc+1] = "Investigate the bastions of the Pride." + desc[#desc+1] = _t"Investigate the bastions of the Pride." if self:isCompleted("rak-shor") then - desc[#desc+1] = "#LIGHT_GREEN#* You have destroyed Rak'shor.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have destroyed Rak'shor.#WHITE#" else - desc[#desc+1] = "#SLATE#* Rak'shor Pride, in the west of the southern desert.#WHITE#" + desc[#desc+1] = _t"#SLATE#* Rak'shor Pride, in the west of the southern desert.#WHITE#" end --[[ if self:isCompleted("eastport") then - desc[#desc+1] = "#LIGHT_GREEN#* You have killed the master of Eastport.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have killed the master of Eastport.#WHITE#" else - desc[#desc+1] = "#SLATE#* A group of corrupted Humans live in Eastport on the southern coastline. They have contact with the Pride.#WHITE#" + desc[#desc+1] = _t"#SLATE#* A group of corrupted Humans live in Eastport on the southern coastline. They have contact with the Pride.#WHITE#" end ]] if self:isCompleted("vor") then - desc[#desc+1] = "#LIGHT_GREEN#* You have destroyed Vor.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have destroyed Vor.#WHITE#" else - desc[#desc+1] = "#SLATE#* Vor Pride, in the north east.#WHITE#" + desc[#desc+1] = _t"#SLATE#* Vor Pride, in the north east.#WHITE#" end if self:isCompleted("grushnak") then - desc[#desc+1] = "#LIGHT_GREEN#* You have destroyed Grushnak.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have destroyed Grushnak.#WHITE#" else - desc[#desc+1] = "#SLATE#* Grushnak Pride, near a small mountain range in the north west.#WHITE#" + desc[#desc+1] = _t"#SLATE#* Grushnak Pride, near a small mountain range in the north west.#WHITE#" end if self:isCompleted("gorbat") then - desc[#desc+1] = "#LIGHT_GREEN#* You have destroyed Gorbat.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have destroyed Gorbat.#WHITE#" else - desc[#desc+1] = "#SLATE#* Gorbat Pride, in a mountain range in the southern desert.#WHITE#" + desc[#desc+1] = _t"#SLATE#* Gorbat Pride, in a mountain range in the southern desert.#WHITE#" end if self:isCompleted() then - desc[#desc+1] = "" - desc[#desc+1] = "#LIGHT_GREEN#* All the bastions of the Pride lie in ruins, their masters destroyed. High Sun Paladin Aeryn would surely be glad of the news!#WHITE#" + desc[#desc+1] = _t"" + desc[#desc+1] = _t"#LIGHT_GREEN#* All the bastions of the Pride lie in ruins, their masters destroyed. High Sun Paladin Aeryn would surely be glad of the news!#WHITE#" end return table.concat(desc, "\n") diff --git a/game/modules/tome/data/quests/paradoxology.lua b/game/modules/tome/data/quests/paradoxology.lua index 5543657fd057aa79063cf8a2ccd019334180454c..bc1cd7b0dfd99a02176e349a2a73d32476169a8a 100644 --- a/game/modules/tome/data/quests/paradoxology.lua +++ b/game/modules/tome/data/quests/paradoxology.lua @@ -17,13 +17,13 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "The Way We Weren't" +name = _t"The Way We Weren't" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have met what seems to be a future version of yourself.\n" - if self:isCompleted("combat") then desc[#desc+1] = "You tried to kill yourself to prevent you from doing something, or going somewhere... you were not very clear.\n" end - if self:isCompleted("now-died") then desc[#desc+1] = "You were killed by your future self, and thus this event never occured.\n" end - if self:isCompleted("future-died") then desc[#desc+1] = "You killed your future self. In the future, you might wish to avoid time-traveling back to this moment...\n" end + desc[#desc+1] = _t"You have met what seems to be a future version of yourself.\n" + if self:isCompleted("combat") then desc[#desc+1] = _t"You tried to kill yourself to prevent you from doing something, or going somewhere... you were not very clear.\n" end + if self:isCompleted("now-died") then desc[#desc+1] = _t"You were killed by your future self, and thus this event never occured.\n" end + if self:isCompleted("future-died") then desc[#desc+1] = _t"You killed your future self. In the future, you might wish to avoid time-traveling back to this moment...\n" end return table.concat(desc, "\n") end @@ -43,9 +43,9 @@ generate = function(self, player, x, y) level_range=self.level_range, faction = "enemies", life=plr.max_life*2, max_life=plr.max_life*2, max_level=table.NIL_MERGE, - name = plr.name.." the Paradox Mage", - desc = ([[A later (less fortunate?) version of %s, possibly going mad.]]):format(plr.name), - killer_message = "but nobody knew why #sex# suddenly became evil", + name = ("%s the Paradox Mage"):tformat(plr:getName()), + desc = ([[A later (less fortunate?) version of %s, possibly going mad.]]):tformat(plr.name), + killer_message = _t"but nobody knew why #sex# suddenly became evil", color_r=250, color_g=50, color_b=250, ai = "tactical", ai_state = {talent_in=1}, })) @@ -93,7 +93,7 @@ generate = function(self, player, x, y) end a.on_takehit = function(self, val) if not self.half_life_check and (self.life - val < self.max_life / 2) then - self:doEmote("Meet the guardian!") + self:doEmote(_t"Meet the guardian!") game:onTickEnd(function() game:changeLevel(1, "paradox-plane") end) diff --git a/game/modules/tome/data/quests/pre-charred-scar.lua b/game/modules/tome/data/quests/pre-charred-scar.lua index 5c462197c53d1f0545de429a88fb4d187e2ce6f4..b6a8040ef234246fee0dd18c99ed5dec2c10756e 100644 --- a/game/modules/tome/data/quests/pre-charred-scar.lua +++ b/game/modules/tome/data/quests/pre-charred-scar.lua @@ -19,16 +19,16 @@ use_ui = "quest-main" -name = "Important news" +name = _t"Important news" desc = function(self, who) local desc = {} - desc[#desc+1] = "Orcs were spotted with the staff you seek in an arid waste in the southern desert." - desc[#desc+1] = "You should go investigate what is happening there." + desc[#desc+1] = _t"Orcs were spotted with the staff you seek in an arid waste in the southern desert." + desc[#desc+1] = _t"You should go investigate what is happening there." return table.concat(desc, "\n") end on_grant = function(self, who) - local aeryn = {name="High Sun Paladin Aeryn"} + local aeryn = {name=_t"High Sun Paladin Aeryn"} local chat = engine.Chat.new("pre-charred-scar", aeryn, who) chat:invoke() diff --git a/game/modules/tome/data/quests/rel-tunnel.lua b/game/modules/tome/data/quests/rel-tunnel.lua index 87060b07a6a78f51b9eda67f1d43c6521a6fe9f9..389edde37acc40bca104d12d538ad07b395f007c 100644 --- a/game/modules/tome/data/quests/rel-tunnel.lua +++ b/game/modules/tome/data/quests/rel-tunnel.lua @@ -17,9 +17,9 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Light at the end of the tunnel" +name = _t"Light at the end of the tunnel" desc = function(self, who) local desc = {} - desc[#desc+1] = "You must find a way to Maj'Eyal through the tunnel to the north of the island.\n" + desc[#desc+1] = _t"You must find a way to Maj'Eyal through the tunnel to the north of the island.\n" return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/ring-of-blood.lua b/game/modules/tome/data/quests/ring-of-blood.lua index b37c4df9eec308e2608dc46db2fceceb1eea88ad..21e2edbe0050d556d968dc83ed4e2597fffeb701 100644 --- a/game/modules/tome/data/quests/ring-of-blood.lua +++ b/game/modules/tome/data/quests/ring-of-blood.lua @@ -17,17 +17,17 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Till the Blood Runs Clear" +name = _t"Till the Blood Runs Clear" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have found a slavers' compound and entered it." + desc[#desc+1] = _t"You have found a slavers' compound and entered it." if self:isCompleted("won-fight") then - desc[#desc+1] = "" - desc[#desc+1] = "You decided to join the slavers and take part in their game. You won the ring of blood!" + desc[#desc+1] = _t"" + desc[#desc+1] = _t"You decided to join the slavers and take part in their game. You won the ring of blood!" end if self:isCompleted("killall") then - desc[#desc+1] = "" - desc[#desc+1] = "You decided you cannot let slavers continue their dirty work and destroyed them!" + desc[#desc+1] = _t"" + desc[#desc+1] = _t"You decided you cannot let slavers continue their dirty work and destroyed them!" end return table.concat(desc, "\n") end @@ -63,7 +63,7 @@ start_game = function(self) game.zone:addEntity(game.level, slave, "actor", spot.x, spot.y) game.party:addMember(slave, { - control="full", type="slave", title=p.name.."'s slave", + control="full", type="slave", title=("%s's slave"):tformat(p:getName()), orders = {target=true, leash=true, anchor=true, talents=true, behavior=true}, }) game.party:setPlayer(slave) diff --git a/game/modules/tome/data/quests/shertul-fortress.lua b/game/modules/tome/data/quests/shertul-fortress.lua index 4a4d7ccfedbe7b9a8ee0e8f2edbc27cd1dc1a9f4..9205e3e7784f059db948cb7b2ad359b9fc58221f 100644 --- a/game/modules/tome/data/quests/shertul-fortress.lua +++ b/game/modules/tome/data/quests/shertul-fortress.lua @@ -17,57 +17,57 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Sher'Tul Fortress" +name = _t"Sher'Tul Fortress" desc = function(self, who) local desc = {} - desc[#desc+1] = "You found notes from an explorer inside the Old Forest. He spoke about Sher'Tul ruins sunken below the surface of the lake of Nur, at the forest's center." - desc[#desc+1] = "With one of the notes there was a small gem that looks like a key." + desc[#desc+1] = _t"You found notes from an explorer inside the Old Forest. He spoke about Sher'Tul ruins sunken below the surface of the lake of Nur, at the forest's center." + desc[#desc+1] = _t"With one of the notes there was a small gem that looks like a key." if self:isCompleted("entered") then - desc[#desc+1] = "#LIGHT_GREEN#* You used the key inside the ruins of Nur and found a way into the fortress of old.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You used the key inside the ruins of Nur and found a way into the fortress of old.#WHITE#" end if self:isCompleted("weirdling") then - desc[#desc+1] = "#LIGHT_GREEN#* The Weirdling Beast is dead, freeing the way into the fortress itself.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* The Weirdling Beast is dead, freeing the way into the fortress itself.#WHITE#" end if self:isCompleted("butler") then - desc[#desc+1] = "#LIGHT_GREEN#* You have activated what seems to be a ... butler? with your rod of recall.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have activated what seems to be a ... butler? with your rod of recall.#WHITE#" end if self:isCompleted("transmo-chest") then - desc[#desc+1] = "#LIGHT_GREEN#* You have bound the transmogrification chest to the Fortress power system.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have bound the transmogrification chest to the Fortress power system.#WHITE#" end if self:isCompleted("transmo-chest-extract-gems") then - desc[#desc+1] = "#LIGHT_GREEN#* You have upgraded the transmogrification chest to automatically transmute metallic items into gems before transmogrifying them.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have upgraded the transmogrification chest to automatically transmute metallic items into gems before transmogrifying them.#WHITE#" end if self:isCompleted("training") then - desc[#desc+1] = "#LIGHT_GREEN#* You have unlocked the training room.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have unlocked the training room.#WHITE#" end if self:isCompleted("shimmer") then - desc[#desc+1] = "#LIGHT_GREEN#* You have unlocked the hall of reflections.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have unlocked the hall of reflections.#WHITE#" end if self:isCompleted("recall") then if self:isCompleted("recall-done") then - desc[#desc+1] = "#LIGHT_GREEN#* You have upgraded your rod of recall to transport you to the fortress.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have upgraded your rod of recall to transport you to the fortress.#WHITE#" else - desc[#desc+1] = "#SLATE#* The fortress shadow has asked that you come back as soon as possible.#WHITE#" + desc[#desc+1] = _t"#SLATE#* The fortress shadow has asked that you come back as soon as possible.#WHITE#" end end if self:isCompleted("farportal") then if self:isCompleted("farportal-broken") then - desc[#desc+1] = "#RED#* You have forced a recall while in an exploratory farportal zone. The farportal was rendered unusable in the process.#WHITE#" + desc[#desc+1] = _t"#RED#* You have forced a recall while in an exploratory farportal zone. The farportal was rendered unusable in the process.#WHITE#" elseif self:isCompleted("farportal-done") then - desc[#desc+1] = "#LIGHT_GREEN#* You have entered the exploratory farportal room and defeated the horror lurking there. You can now use the farportal.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have entered the exploratory farportal room and defeated the horror lurking there. You can now use the farportal.#WHITE#" else - desc[#desc+1] = "#SLATE#* The fortress shadow has asked that you come back as soon as possible.#WHITE#" + desc[#desc+1] = _t"#SLATE#* The fortress shadow has asked that you come back as soon as possible.#WHITE#" end end if self:isCompleted("flight") then if self:isCompleted("flight-done") then - desc[#desc+1] = "#LIGHT_GREEN#* You have re-enabled the fortress flight systems. You can now fly around in your fortress!#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have re-enabled the fortress flight systems. You can now fly around in your fortress!#WHITE#" else - desc[#desc+1] = "#SLATE#* The fortress shadow has asked that you find an Ancient Storm Sapphire, along with at least 250 energy, to re-enable the fortress flight systems.#WHITE#" + desc[#desc+1] = _t"#SLATE#* The fortress shadow has asked that you find an Ancient Storm Sapphire, along with at least 250 energy, to re-enable the fortress flight systems.#WHITE#" end end if self.shertul_energy > 0 then - desc[#desc+1] = ("\nThe fortress's current energy level is: #LIGHT_GREEN#%d#WHITE#."):format(self.shertul_energy) + desc[#desc+1] = ("\nThe fortress's current energy level is: #LIGHT_GREEN#%d#WHITE#."):tformat(self.shertul_energy) end return table.concat(desc, "\n") end @@ -111,19 +111,19 @@ gain_energy = function(self, energy) if self.shertul_energy >= 15 and not self:isCompleted("recall") then game.player:setQuestStatus(self.id, self.COMPLETED, "recall") local Dialog = require "engine.ui.Dialog" - Dialog:simpleLongPopup("Fortress Shadow", "Master, you have sent enough energy to improve your rod of recall. Please return to the fortress.", 400) + Dialog:simpleLongPopup(_t"Fortress Shadow", _t"Master, you have sent enough energy to improve your rod of recall. Please return to the fortress.", 400) end if self.shertul_energy >= 45 and not self:isCompleted("farportal") then game.player:setQuestStatus(self.id, self.COMPLETED, "farportal") local Dialog = require "engine.ui.Dialog" - Dialog:simpleLongPopup("Fortress Shadow", "Master, you have sent enough energy to activate the exploratory farportal.\nHowever, there seems to be a disturbance in that room. Please return as soon as possible.", 400) + Dialog:simpleLongPopup(_t"Fortress Shadow", _t"Master, you have sent enough energy to activate the exploratory farportal.\nHowever, there seems to be a disturbance in that room. Please return as soon as possible.", 400) end -- if self.shertul_energy >= 250 and not self:isCompleted("flight") then -- game.player:setQuestStatus(self.id, self.COMPLETED, "flight") -- local Dialog = require "engine.ui.Dialog" - -- Dialog:simpleLongPopup("Fortress Shadow", "Master, you have sent enough energy to activate the flight systems.\nHowever, one control crystal is broken. You need to find an #GOLD#Ancient Storm Sapphire#WHITE#.", 400) + -- Dialog:simpleLongPopup(_t"Fortress Shadow", _t"Master, you have sent enough energy to activate the flight systems.\nHowever, one control crystal is broken. You need to find an #GOLD#Ancient Storm Sapphire#WHITE#.", 400) -- end end @@ -180,7 +180,7 @@ end upgrade_rod = function(self) if self.shertul_energy < 15 then local Dialog = require "engine.ui.Dialog" - Dialog:simplePopup("Fortress Shadow", "The energy is too low. It needs to be at least 15.") + Dialog:simplePopup(_t"Fortress Shadow", _t"The energy is too low. It needs to be at least 15.") return end self.shertul_energy = self.shertul_energy - 15 @@ -196,7 +196,7 @@ end upgrade_transmo_gems = function(self) if self.shertul_energy < 25 then local Dialog = require "engine.ui.Dialog" - Dialog:simplePopup("Fortress Shadow", "The energy is too low. It needs to be at least 25.") + Dialog:simplePopup(_t"Fortress Shadow", _t"The energy is too low. It needs to be at least 25.") return end self.shertul_energy = self.shertul_energy - 25 diff --git a/game/modules/tome/data/quests/spydric-infestation.lua b/game/modules/tome/data/quests/spydric-infestation.lua index df348a99badcfeadd5036685a97f1568e1d41ad0..a31ed9ba77f28af77f9c82647be3ce57afed184c 100644 --- a/game/modules/tome/data/quests/spydric-infestation.lua +++ b/game/modules/tome/data/quests/spydric-infestation.lua @@ -17,14 +17,14 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Eight legs of wonder" +name = _t"Eight legs of wonder" desc = function(self, who) local desc = {} if not self:isCompleted() and not self:isEnded() then - desc[#desc+1] = "Enter the caverns of Ardhungol and look for Sun Paladin Rashim." - desc[#desc+1] = "But be careful; those are not small spiders..." + desc[#desc+1] = _t"Enter the caverns of Ardhungol and look for Sun Paladin Rashim." + desc[#desc+1] = _t"But be careful; those are not small spiders..." else - desc[#desc+1] = "#LIGHT_GREEN#You have killed Ungolë in Ardhungol and saved the Sun Paladin." + desc[#desc+1] = _t"#LIGHT_GREEN#You have killed Ungolë in Ardhungol and saved the Sun Paladin." end return table.concat(desc, "\n") end @@ -48,7 +48,7 @@ portal_back = function(self, who) -- Reveal entrance local g = mod.class.Grid.new{ show_tooltip=true, always_remember = true, - name="Portal back to the Gates of Morning", + name=_t"Portal back to the Gates of Morning", display='>', color=colors.GOLD, notice = true, change_level=1, change_zone="town-gates-of-morning", diff --git a/game/modules/tome/data/quests/staff-absorption.lua b/game/modules/tome/data/quests/staff-absorption.lua index 1a05d7e7b9d6e6833579e6bd351f2e30a4badd39..d897d78cf0da274abc8f118cc40a2b3178d806fe 100644 --- a/game/modules/tome/data/quests/staff-absorption.lua +++ b/game/modules/tome/data/quests/staff-absorption.lua @@ -20,25 +20,25 @@ use_ui = "quest-main" -- Main quest: the Staff of Absorption -name = "A mysterious staff" +name = _t"A mysterious staff" desc = function(self, who) local desc = {} - desc[#desc+1] = "Deep in the Dreadfell you fought and destroyed the Master, a powerful vampire." + desc[#desc+1] = _t"Deep in the Dreadfell you fought and destroyed the Master, a powerful vampire." if self:isCompleted("ambush") and not self:isCompleted("ambush-died") then - desc[#desc+1] = "On your way out of the Dreadfell you were ambushed by a band of orcs." - desc[#desc+1] = "They asked about the staff." + desc[#desc+1] = _t"On your way out of the Dreadfell you were ambushed by a band of orcs." + desc[#desc+1] = _t"They asked about the staff." elseif self:isCompleted("ambush-died") and not self:isCompleted("survived-ukruk") then - desc[#desc+1] = "On your way out of the Dreadfell you were ambushed by a band of orcs and left for dead." - desc[#desc+1] = "They asked about the staff and stole it from you." - desc[#desc+1] = "#LIGHT_GREEN#Go at once to Last Hope to report those events!" + desc[#desc+1] = _t"On your way out of the Dreadfell you were ambushed by a band of orcs and left for dead." + desc[#desc+1] = _t"They asked about the staff and stole it from you." + desc[#desc+1] = _t"#LIGHT_GREEN#Go at once to Last Hope to report those events!" elseif not self:isCompleted("ambush-died") and self:isCompleted("survived-ukruk") then - desc[#desc+1] = "On your way out of the Dreadfell you were ambushed by a band of orcs." - desc[#desc+1] = "They asked about the staff and stole it from you." - desc[#desc+1] = "You told them nothing and vanquished them." - desc[#desc+1] = "#LIGHT_GREEN#Go at once to Last Hope to report those events!" + desc[#desc+1] = _t"On your way out of the Dreadfell you were ambushed by a band of orcs." + desc[#desc+1] = _t"They asked about the staff and stole it from you." + desc[#desc+1] = _t"You told them nothing and vanquished them." + desc[#desc+1] = _t"#LIGHT_GREEN#Go at once to Last Hope to report those events!" else - desc[#desc+1] = "In its remains, you found a strange staff. It radiates power and danger and you dare not use it yourself." - desc[#desc+1] = "You should bring it to the elders of Last Hope in the southeast." + desc[#desc+1] = _t"In its remains, you found a strange staff. It radiates power and danger and you dare not use it yourself." + desc[#desc+1] = _t"You should bring it to the elders of Last Hope in the southeast." end return table.concat(desc, "\n") end @@ -86,7 +86,7 @@ start_ambush = function(self, who) o:removed() end - require("engine.ui.Dialog"):simpleLongPopup("Ambush", [[You wake up after a few hours, surprised to be alive, but the staff is gone! + require("engine.ui.Dialog"):simpleLongPopup(_t"Ambush", _t[[You wake up after a few hours, surprised to be alive, but the staff is gone! #VIOLET#Go at once to Last Hope to report those events!]], 600) local oe = game.level.map(self.x, self.y, engine.Map.TERRAIN) @@ -100,14 +100,14 @@ start_ambush = function(self, who) end local Chat = require("engine.Chat") - local chat = Chat.new("dreadfell-ambush", {name="Ukruk the Fierce"}, who) + local chat = Chat.new("dreadfell-ambush", {name=_t"Ukruk the Fierce"}, who) chat:invoke() end killed_ukruk = function(self, who) game.player.die = nil - require("engine.ui.Dialog"):simpleLongPopup("Ambush", [[You are surprised to still be alive. + require("engine.ui.Dialog"):simpleLongPopup(_t"Ambush", _t[[You are surprised to still be alive. #VIOLET#Go at once to Last Hope to report those events!]], 600) local oe = game.level.map(who.x, who.y, engine.Map.TERRAIN) diff --git a/game/modules/tome/data/quests/start-allied.lua b/game/modules/tome/data/quests/start-allied.lua index e7ffd5cefc4e0e26716686d7723efd0f4d2d15d9..2c3a17e3e23263cd81a5dee5ace3bb1936412a9f 100644 --- a/game/modules/tome/data/quests/start-allied.lua +++ b/game/modules/tome/data/quests/start-allied.lua @@ -18,27 +18,27 @@ -- darkgod@te4.org -- Quest for Trollmire & Amon Sul -name = "Of trolls and damp caves" +name = _t"Of trolls and damp caves" desc = function(self, who) local desc = {} - desc[#desc+1] = "Explore the caves below the ruins of Kor'Pul and the Trollmire in search of treasure and glory!\n" + desc[#desc+1] = _t"Explore the caves below the ruins of Kor'Pul and the Trollmire in search of treasure and glory!\n" if self:isCompleted("trollmire") then if self:isCompleted("trollmire-flooded") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Trollmire and vanquished Shax the Troll.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Trollmire and vanquished Shax the Troll.#WHITE#" else - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Trollmire and vanquished Prox the Troll.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Trollmire and vanquished Prox the Troll.#WHITE#" end else - desc[#desc+1] = "#SLATE#* You must explore the Trollmire and find out what lurks there and what treasures are to be gained!#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the Trollmire and find out what lurks there and what treasures are to be gained!#WHITE#" end if self:isCompleted("kor-pul") then if self:isCompleted("kor-pul-invaded") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the ruins of Kor'Pul and vanquished the Possessed.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the ruins of Kor'Pul and vanquished the Possessed.#WHITE#" else - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the ruins of Kor'Pul and vanquished the Shade.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the ruins of Kor'Pul and vanquished the Shade.#WHITE#" end else - desc[#desc+1] = "#SLATE#* You must explore the ruins of Kor'Pul and find out what lurks there and what treasures are to be gained!#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the ruins of Kor'Pul and find out what lurks there and what treasures are to be gained!#WHITE#" end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/start-archmage.lua b/game/modules/tome/data/quests/start-archmage.lua index ed226afb9f99011afe8a404a116a2eb6096364e0..c59f13a68d8e5f5b00345d35dd28f7e07f61f53d 100644 --- a/game/modules/tome/data/quests/start-archmage.lua +++ b/game/modules/tome/data/quests/start-archmage.lua @@ -17,18 +17,18 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Spellblaze Fallouts" +name = _t"Spellblaze Fallouts" stables = 0 desc = function(self, who) local desc = {} - desc[#desc+1] = "The Abashed Expanse is a part of Eyal torn apart by the Spellblaze and thrown into the void between the stars.\n" - desc[#desc+1] = "It has recently begun to destabilize, threatening to crash onto Eyal, destroying everything in its path.\n" - desc[#desc+1] = "You have entered it and must now stabilize three wormholes by firing any spell at them.\n" - desc[#desc+1] = "Remember, the floating islands are not stable and might teleport randomly. However, the disturbances also help you: your Phase Door spell is fully controllable even if not of high level yet.\n" + desc[#desc+1] = _t"The Abashed Expanse is a part of Eyal torn apart by the Spellblaze and thrown into the void between the stars.\n" + desc[#desc+1] = _t"It has recently begun to destabilize, threatening to crash onto Eyal, destroying everything in its path.\n" + desc[#desc+1] = _t"You have entered it and must now stabilize three wormholes by firing any spell at them.\n" + desc[#desc+1] = _t"Remember, the floating islands are not stable and might teleport randomly. However, the disturbances also help you: your Phase Door spell is fully controllable even if not of high level yet.\n" if self:isCompleted("abashed") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the expanse and closed all three wormholes.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the expanse and closed all three wormholes.#WHITE#" else - desc[#desc+1] = "#SLATE#* You have closed "..self.stables.." wormhole(s).#WHITE#" + desc[#desc+1] = ("#SLATE#* You have closed %s wormhole(s).#WHITE#"):tformat(self.stables) end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/start-dwarf.lua b/game/modules/tome/data/quests/start-dwarf.lua index c97c6c9ce70aa11a29b4f801b6dcbae4a52eff29..533043b48c30aa11c877b1ad402eaa7a99098935 100644 --- a/game/modules/tome/data/quests/start-dwarf.lua +++ b/game/modules/tome/data/quests/start-dwarf.lua @@ -17,15 +17,15 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Reknor is lost!" +name = _t"Reknor is lost!" desc = function(self, who) local desc = {} - desc[#desc+1] = "You were part of a group of dwarves sent to investigate the situation of the kingdom of Reknor." - desc[#desc+1] = "When you arrived there you found nothing but orcs, well organized and very powerful." - desc[#desc+1] = "Most of your team was killed there and now you and Norgan (the sole survivor besides you) must hurry back to the Iron Council to bring the news." - desc[#desc+1] = "Let nothing stop you." + desc[#desc+1] = _t"You were part of a group of dwarves sent to investigate the situation of the kingdom of Reknor." + desc[#desc+1] = _t"When you arrived there you found nothing but orcs, well organized and very powerful." + desc[#desc+1] = _t"Most of your team was killed there and now you and Norgan (the sole survivor besides you) must hurry back to the Iron Council to bring the news." + desc[#desc+1] = _t"Let nothing stop you." if self:isCompleted("norgan-survived") then - desc[#desc+1] = "Both Norgan and you made it home." + desc[#desc+1] = _t"Both Norgan and you made it home." end return table.concat(desc, "\n") end @@ -44,7 +44,7 @@ on_grant = function(self, who) game.zone:addEntity(game.level, norgan, "actor", x, y) game.party:addMember(norgan, { - control="order", type="squadmate", title="Norgan", + control="order", type="squadmate", title=_t"Norgan", orders = {leash=true, anchor=true}, -- behavior=true}, }) end diff --git a/game/modules/tome/data/quests/start-point-zero.lua b/game/modules/tome/data/quests/start-point-zero.lua index c4a2feb9bb32b308c47dbb5f98a1ea51497e3fc6..cad248b244c4096eb0c48152feb0d7bd61b1174d 100644 --- a/game/modules/tome/data/quests/start-point-zero.lua +++ b/game/modules/tome/data/quests/start-point-zero.lua @@ -17,19 +17,19 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Future Echoes" +name = _t"Future Echoes" stables = 0 desc = function(self, who) local desc = {} - desc[#desc+1] = "The unhallowed morass is the name of the 'zone' surrounding Point Zero." - desc[#desc+1] = "The temporal spiders that inhabit it are growing restless and started attacking at random. You need to investigate what is going on." + desc[#desc+1] = _t"The unhallowed morass is the name of the 'zone' surrounding Point Zero." + desc[#desc+1] = _t"The temporal spiders that inhabit it are growing restless and started attacking at random. You need to investigate what is going on." if self:isCompleted("morass") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the morass and destroyed the weaver queen, finding strange traces on it.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the morass and destroyed the weaver queen, finding strange traces on it.#WHITE#" else - desc[#desc+1] = "#SLATE#* You must explore the morass.#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the morass.#WHITE#" end if self:isCompleted("saved") then - desc[#desc+1] = "#LIGHT_GREEN#* You have helped defend Point Zero.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have helped defend Point Zero.#WHITE#" end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/start-shaloren.lua b/game/modules/tome/data/quests/start-shaloren.lua index 6f323617ccc4d0a93d3a148fa1b7a643638704a6..f69695a25170bb40b3c9df06afcd1c1f8d2f4353 100644 --- a/game/modules/tome/data/quests/start-shaloren.lua +++ b/game/modules/tome/data/quests/start-shaloren.lua @@ -17,20 +17,20 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Echoes of the Spellblaze" +name = _t"Echoes of the Spellblaze" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have heard that within the scintillating caves lie strange crystals imbued with Spellblaze energies.\n" - desc[#desc+1] = "There are also rumours of a renegade Shaloren camp to the west.\n" + desc[#desc+1] = _t"You have heard that within the scintillating caves lie strange crystals imbued with Spellblaze energies.\n" + desc[#desc+1] = _t"There are also rumours of a renegade Shaloren camp to the west.\n" if self:isCompleted("spellblaze") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the scintillating caves and destroyed the Spellblaze Crystal.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the scintillating caves and destroyed the Spellblaze Crystal.#WHITE#" else - desc[#desc+1] = "#SLATE#* You must explore the scintillating caves.#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the scintillating caves.#WHITE#" end if self:isCompleted("rhaloren") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Rhaloren camp and killed the Inquisitor.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Rhaloren camp and killed the Inquisitor.#WHITE#" else - desc[#desc+1] = "#SLATE#* You must explore the renegade Shaloren camp.#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the renegade Shaloren camp.#WHITE#" end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/start-sunwall.lua b/game/modules/tome/data/quests/start-sunwall.lua index 23d93c3d711f6a55ccbf922cc0586601d60bbe48..0e50c6acc822c896d7f7fb8f6255d4a9b7ad11a6 100644 --- a/game/modules/tome/data/quests/start-sunwall.lua +++ b/game/modules/tome/data/quests/start-sunwall.lua @@ -17,20 +17,20 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Serpentine Invaders" +name = _t"Serpentine Invaders" desc = function(self, who) local desc = {} - desc[#desc+1] = "Nagas are invading the slazish fens. The Sunwall cannot fight on two fronts; you need to stop the invaders before it is too late.\n Locate and destroy the invaders' portal." + desc[#desc+1] = _t"Nagas are invading the slazish fens. The Sunwall cannot fight on two fronts; you need to stop the invaders before it is too late.\n Locate and destroy the invaders' portal." if self:isCompleted("slazish") then - desc[#desc+1] = "#LIGHT_GREEN#* You have destroyed the naga portal. The invasion is stopped.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have destroyed the naga portal. The invasion is stopped.#WHITE#" if self:isCompleted("return") then - desc[#desc+1] = "#LIGHT_GREEN#* You are back in Var'Eyal, the Far East as the people from the west call it.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You are back in Var'Eyal, the Far East as the people from the west call it.#WHITE#" else - desc[#desc+1] = "#SLATE#* However, you were teleported to a distant land. You must find a way back to the Gates of Morning.#WHITE#" + desc[#desc+1] = _t"#SLATE#* However, you were teleported to a distant land. You must find a way back to the Gates of Morning.#WHITE#" end else - desc[#desc+1] = "#SLATE#* You must stop the nagas.#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must stop the nagas.#WHITE#" end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/start-thaloren.lua b/game/modules/tome/data/quests/start-thaloren.lua index 600a5fdd30cf69ded62f20014fa976d843611687..dceefd66c6e212535ccab19255312a1b330f82f8 100644 --- a/game/modules/tome/data/quests/start-thaloren.lua +++ b/game/modules/tome/data/quests/start-thaloren.lua @@ -17,28 +17,28 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Madness of the Ages" +name = _t"Madness of the Ages" desc = function(self, who) local desc = {} - desc[#desc+1] = "The Thaloren forest is disrupted. Corruption is spreading. Norgos the guardian bear is said to have gone mad.\n" - desc[#desc+1] = "On the western border of the forest a gloomy aura has been set up. Things inside are... twisted.\n" + desc[#desc+1] = _t"The Thaloren forest is disrupted. Corruption is spreading. Norgos the guardian bear is said to have gone mad.\n" + desc[#desc+1] = _t"On the western border of the forest a gloomy aura has been set up. Things inside are... twisted.\n" if self:isCompleted("norgos") then if self:isCompleted("norgos-invaded") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored Norgos' Lair and stopped the shivgoroth invasion.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored Norgos' Lair and stopped the shivgoroth invasion.#WHITE#" else - desc[#desc+1] = "#LIGHT_GREEN#* You have explored Norgos' Lair and put it to rest.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored Norgos' Lair and put it to rest.#WHITE#" end else - desc[#desc+1] = "#SLATE#* You must explore Norgos' Lair.#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore Norgos' Lair.#WHITE#" end if self:isCompleted("heart-gloom") then if self:isCompleted("heart-gloom-purified") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Heart of the Gloom and slain the Dreaming One.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Heart of the Gloom and slain the Dreaming One.#WHITE#" else - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Heart of the Gloom and slain the Withering Thing.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Heart of the Gloom and slain the Withering Thing.#WHITE#" end else - desc[#desc+1] = "#SLATE#* You must explore the Heart of the Gloom.#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the Heart of the Gloom.#WHITE#" end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/start-undead.lua b/game/modules/tome/data/quests/start-undead.lua index 6a11fae5727c7a6c290da5675091c50097b06b10..ead28eae387dc3632bc3b7c08bf5500f307a5207 100644 --- a/game/modules/tome/data/quests/start-undead.lua +++ b/game/modules/tome/data/quests/start-undead.lua @@ -17,13 +17,13 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "The rotting stench of the dead" +name = _t"The rotting stench of the dead" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have been resurrected as an undead by some dark powers." - desc[#desc+1] = "However, the ritual failed in some way and you retain your own mind. You need to get out of this dark place and try to carve a place for yourself in the world." + desc[#desc+1] = _t"You have been resurrected as an undead by some dark powers." + desc[#desc+1] = _t"However, the ritual failed in some way and you retain your own mind. You need to get out of this dark place and try to carve a place for yourself in the world." if self:isCompleted("black-cloak") then - desc[#desc+1] = "You have found a very special cloak that will help you walk among the living without trouble." + desc[#desc+1] = _t"You have found a very special cloak that will help you walk among the living without trouble." end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/start-yeek.lua b/game/modules/tome/data/quests/start-yeek.lua index 466b5808f691fb388abfa717033a9fe93b73b7b1..891ea0d7b1e1ff9aef869b254045abb58c42f46f 100644 --- a/game/modules/tome/data/quests/start-yeek.lua +++ b/game/modules/tome/data/quests/start-yeek.lua @@ -17,24 +17,24 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Following The Way" +name = _t"Following The Way" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have been tasked to remove at leastg one of the threats to the yeeks.\n" - desc[#desc+1] = "Protect the Way, and vanquish your foes.\n" + desc[#desc+1] = _t"You have been tasked to remove at leastg one of the threats to the yeeks.\n" + desc[#desc+1] = _t"Protect the Way, and vanquish your foes.\n" if self:isCompleted("murgol") then if self:isCompleted("murgol-invaded") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the underwater zone and vanquished the naga invader, Lady Nashva.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the underwater zone and vanquished the naga invader, Lady Nashva.#WHITE#" else - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the underwater zone and vanquished Murgol.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the underwater zone and vanquished Murgol.#WHITE#" end else - desc[#desc+1] = "#SLATE#* You must explore the underwater lair of Murgol.#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the underwater lair of Murgol.#WHITE#" end if self:isCompleted("ritch") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the ritch tunnels and vanquished their queen.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the ritch tunnels and vanquished their queen.#WHITE#" else - desc[#desc+1] = "#SLATE#* You must explore the ritch tunnels.#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the ritch tunnels.#WHITE#" end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/starter-zones.lua b/game/modules/tome/data/quests/starter-zones.lua index 2650ba44a7ade9b1307ba85735c867fac934324f..aaacd15e2ac9edba84650798f5b7156c0657826b 100644 --- a/game/modules/tome/data/quests/starter-zones.lua +++ b/game/modules/tome/data/quests/starter-zones.lua @@ -20,45 +20,45 @@ use_ui = "quest-main" -- Quest for Maze, Sandworm & Old Forest -name = "Into the darkness" +name = _t"Into the darkness" desc = function(self, who) local desc = {} - desc[#desc+1] = "It is time to explore some new places -- dark, forgotten and dangerous ones." - desc[#desc+1] = "The Old Forest is just south-east of the town of Derth." - desc[#desc+1] = "The Maze is west of Derth." - desc[#desc+1] = "The Sandworm Lair is to the far west of Derth, near the sea." - desc[#desc+1] = "The Daikara is on the eastern borders of the Thaloren forest." + desc[#desc+1] = _t"It is time to explore some new places -- dark, forgotten and dangerous ones." + desc[#desc+1] = _t"The Old Forest is just south-east of the town of Derth." + desc[#desc+1] = _t"The Maze is west of Derth." + desc[#desc+1] = _t"The Sandworm Lair is to the far west of Derth, near the sea." + desc[#desc+1] = _t"The Daikara is on the eastern borders of the Thaloren forest." if self:isCompleted("old-forest") then if self:isCompleted("old-forest-crystal") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Old Forest and vanquished Shardskin.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Old Forest and vanquished Shardskin.#WHITE#" else - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Old Forest and vanquished Wrathroot.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Old Forest and vanquished Wrathroot.#WHITE#" end else - desc[#desc+1] = "#SLATE#* You must explore the Old Forest and find out what lurks there and what treasures are to be gained!#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the Old Forest and find out what lurks there and what treasures are to be gained!#WHITE#" end if self:isCompleted("maze") then if self:isCompleted("maze-horror") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Maze and vanquished the Horned Horror.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Maze and vanquished the Horned Horror.#WHITE#" else - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Maze and vanquished the Minotaur.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Maze and vanquished the Minotaur.#WHITE#" end else - desc[#desc+1] = "#SLATE#* You must explore the Maze and find out what lurks there and what treasures are to be gained!#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the Maze and find out what lurks there and what treasures are to be gained!#WHITE#" end if self:isCompleted("sandworm-lair") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Sandworm Lair and vanquished their Queen.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Sandworm Lair and vanquished their Queen.#WHITE#" else - desc[#desc+1] = "#SLATE#* You must explore the Sandworm Lair and find out what lurks there and what treasures are to be gained!#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the Sandworm Lair and find out what lurks there and what treasures are to be gained!#WHITE#" end if self:isCompleted("daikara") then if self:isCompleted("daikara-volcano") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Daikara and vanquished the huge fire dragon that dwelled there.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Daikara and vanquished the huge fire dragon that dwelled there.#WHITE#" else - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Daikara and vanquished the huge ice dragon that dwelled there.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have explored the Daikara and vanquished the huge ice dragon that dwelled there.#WHITE#" end else - desc[#desc+1] = "#SLATE#* You must explore the Daikara and find out what lurks there and what treasures are to be gained!#WHITE#" + desc[#desc+1] = _t"#SLATE#* You must explore the Daikara and find out what lurks there and what treasures are to be gained!#WHITE#" end return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/strange-new-world.lua b/game/modules/tome/data/quests/strange-new-world.lua index 54ea2f2830132eacd5c16ac70ebb2b4c77135688..576a91652605e1a339d40c6a5bc006ce3f4a760a 100644 --- a/game/modules/tome/data/quests/strange-new-world.lua +++ b/game/modules/tome/data/quests/strange-new-world.lua @@ -19,22 +19,22 @@ use_ui = "quest-main" -name = "Strange new world" +name = _t"Strange new world" desc = function(self, who) local desc = {} - desc[#desc+1] = "You arrived through the farportal in a cave, probably in the Far East." - desc[#desc+1] = "Upon arrival you met an Elf and an orc fighting." + desc[#desc+1] = _t"You arrived through the farportal in a cave, probably in the Far East." + desc[#desc+1] = _t"Upon arrival you met an Elf and an orc fighting." if self:isCompleted("sided-fillarel") then - desc[#desc+1] = "You decided to side with the Elven lady." + desc[#desc+1] = _t"You decided to side with the Elven lady." elseif self:isCompleted("sided-krogar") then - desc[#desc+1] = "You decided to side with the orc." + desc[#desc+1] = _t"You decided to side with the orc." end if self:isCompleted("helped-fillarel") then - desc[#desc+1] = "Fillarel told you to go to the southeast and meet with High Sun Paladin Aeryn." + desc[#desc+1] = _t"Fillarel told you to go to the southeast and meet with High Sun Paladin Aeryn." elseif self:isCompleted("helped-krogar") then - desc[#desc+1] = "Krogar told you to go to the west and look for the Kruk Pride." + desc[#desc+1] = _t"Krogar told you to go to the west and look for the Kruk Pride." end return table.concat(desc, "\n") end @@ -43,7 +43,7 @@ krogar_dies = function(self, npc) if self:isCompleted("sided-fillarel") then game.player:setQuestStatus(self.id, self.COMPLETED, "helped-fillarel") else game.player:setQuestStatus(self.id, self.COMPLETED, "helped-krogar") - npc:doEmote(game.player.descriptor.race.." go to the west, and find Kruk Pride!", 120) + npc:doEmote(("%s go to the west, and find Kruk Pride!"):tformat(game.player.descriptor.race), 120) end end @@ -51,6 +51,6 @@ fillarel_dies = function(self, npc) if self:isCompleted("sided-krogar") then game.player:setQuestStatus(self.id, self.COMPLETED, "helped-krogar") else game.player:setQuestStatus(self.id, self.COMPLETED, "helped-fillarel") - npc:doEmote(game.player.descriptor.race.." go to the southeast, and tell Aeryn what happened to me!", 120) + npc:doEmote(("%s go to the southeast, and tell Aeryn what happened to me!"):tformat(game.player.descriptor.race), 120) end end diff --git a/game/modules/tome/data/quests/temple-of-creation.lua b/game/modules/tome/data/quests/temple-of-creation.lua index 1169935685e342a7b3cf9a9806c197254b4c371a..002aadb0976effde2f0956b583f8579cad7b934e 100644 --- a/game/modules/tome/data/quests/temple-of-creation.lua +++ b/game/modules/tome/data/quests/temple-of-creation.lua @@ -17,23 +17,23 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "The Temple of Creation" +name = _t"The Temple of Creation" desc = function(self, who) local desc = {} - desc[#desc+1] = "Ukllmswwik asked you to take his portal to the Temple of Creation and kill Slasul who has turned mad." + desc[#desc+1] = _t"Ukllmswwik asked you to take his portal to the Temple of Creation and kill Slasul who has turned mad." if self:isCompleted("slasul-story") then - desc[#desc+1] = "Slasul told you his side of the story. Now you must decide: which of them is corrupt?" + desc[#desc+1] = _t"Slasul told you his side of the story. Now you must decide: which of them is corrupt?" end if self:isCompleted("legacy-naloren") then - desc[#desc+1] = "Slasul bound his lifeforce to yours and gave your a powerful trident in return." + desc[#desc+1] = _t"Slasul bound his lifeforce to yours and gave your a powerful trident in return." end if self:isCompleted("kill-slasul") and self:isCompleted("kill-drake") then - desc[#desc+1] = "#LIGHT_GREEN#* You have killed both Ukllmswwik and Slasul, betraying them both.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have killed both Ukllmswwik and Slasul, betraying them both.#WHITE#" elseif self:isCompleted("kill-slasul") and not self:isCompleted("kill-drake") then - desc[#desc+1] = "#LIGHT_GREEN#* You have sided with Ukllmswwik and killed Slasul.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have sided with Ukllmswwik and killed Slasul.#WHITE#" elseif not self:isCompleted("kill-slasul") and self:isCompleted("kill-drake") then - desc[#desc+1] = "#LIGHT_GREEN#* You have sided with Slasul and killed Ukllmswwik.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have sided with Slasul and killed Ukllmswwik.#WHITE#" end return table.concat(desc, "\n") end @@ -51,7 +51,7 @@ end on_grant = function(self, who) local g = mod.class.Grid.new{ show_tooltip=true, - name="Portal to the Temple of Creation", + name=_t"Portal to the Temple of Creation", display='>', color=colors.VIOLET, notice = true, change_level=1, change_zone="temple-of-creation", @@ -75,7 +75,7 @@ portal_back = function(self, who) local g = mod.class.Grid.new{ show_tooltip=true, - name="Portal to the Flooded Cave", + name=_t"Portal to the Flooded Cave", display='>', color=colors.VIOLET, notice = true, change_level=2, change_zone="flooded-cave", diff --git a/game/modules/tome/data/quests/temporal-rift.lua b/game/modules/tome/data/quests/temporal-rift.lua index f258006ce322b2e6f008b20b48e9ed4b7fd416b1..ef6ffc34a8a506a9c4cf5e092cd5c4620c27b793 100644 --- a/game/modules/tome/data/quests/temporal-rift.lua +++ b/game/modules/tome/data/quests/temporal-rift.lua @@ -17,10 +17,10 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Back and Back and Back to the Future" +name = _t"Back and Back and Back to the Future" desc = function(self, who) local desc = {} - desc[#desc+1] = "After passing through some kind of time anomaly you met a temporal warden who told you to destroy the abominations of this alternate timeline.\n" + desc[#desc+1] = _t"After passing through some kind of time anomaly you met a temporal warden who told you to destroy the abominations of this alternate timeline.\n" return table.concat(desc, "\n") end @@ -29,7 +29,7 @@ on_status_change = function(self, who, status, sub) if self:isCompleted("twin") and self:isCompleted("clone") then who:setQuestStatus(self.id, engine.Quest.DONE) local Chat = require "engine.Chat" - local chat = Chat.new("temporal-rift-end", {name="Temporal Warden"}, who) + local chat = Chat.new("temporal-rift-end", {name=_t"Temporal Warden"}, who) chat:invoke() end end diff --git a/game/modules/tome/data/quests/trollmire-treasure.lua b/game/modules/tome/data/quests/trollmire-treasure.lua index 94eeb88a17896de3ea69bf4e211000975a5e5ab8..886ec458b4e01d5fd56747fb8e740dc35f2dc162 100644 --- a/game/modules/tome/data/quests/trollmire-treasure.lua +++ b/game/modules/tome/data/quests/trollmire-treasure.lua @@ -17,13 +17,13 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Hidden treasure" +name = _t"Hidden treasure" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have found all the clues leading to the hidden treasure. There should be a way on the third level of the Trollmire." - desc[#desc+1] = "It looks extremely dangerous, however - beware." + desc[#desc+1] = _t"You have found all the clues leading to the hidden treasure. There should be a way on the third level of the Trollmire." + desc[#desc+1] = _t"It looks extremely dangerous, however - beware." if self:isEnded() then - desc[#desc+1] = "You have slain Bill. His treasure is yours for the taking." + desc[#desc+1] = _t"You have slain Bill. His treasure is yours for the taking." end return table.concat(desc, "\n") end @@ -43,10 +43,10 @@ enter_level3 = function(self) -- Reveal entrance to level 4 local g = game.zone:makeEntityByName(game.level, "terrain", "GRASS_DOWN6"):clone() - g.name = "way to the hidden trollmire treasure" - g.desc = "Beware!" + g.name = _t"way to the hidden trollmire treasure" + g.desc = _t"Beware!" g.change_level_check = function() - require("engine.ui.Dialog"):yesnoPopup("Danger...", "This way leads to the lair of a mighty troll. Traces of blood are everywhere. Are you sure?", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Danger...", _t"This way leads to the lair of a mighty troll. Traces of blood are everywhere. Are you sure?", function(ret) if ret then game:changeLevel(4) end end) return true @@ -56,5 +56,5 @@ enter_level3 = function(self) game.zone:addEntity(level, g, "terrain", spot.x, spot.y) level.hidden_way_to_bill = true - require("engine.ui.Dialog"):simplePopup("Hidden treasure", "The way to the treasure is to the east. But beware, death probably awaits there.") + require("engine.ui.Dialog"):simplePopup(_t"Hidden treasure", _t"The way to the treasure is to the east. But beware, death probably awaits there.") end diff --git a/game/modules/tome/data/quests/tutorial-combat-stats.lua b/game/modules/tome/data/quests/tutorial-combat-stats.lua index 13e26f98867437d9358e25490d09089ef735eacd..3fbd68c7d3c03de8cb005210af90e8c89e15e0d4 100644 --- a/game/modules/tome/data/quests/tutorial-combat-stats.lua +++ b/game/modules/tome/data/quests/tutorial-combat-stats.lua @@ -17,23 +17,23 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Tutorial: combat stats" +name = _t"Tutorial: combat stats" desc = function(self, who) local desc = {} --[=[ if self:isCompleted("started-basic-gameplay") and not self:isCompleted("finished-basic-gameplay") then - desc[#desc+1] = "You must venture in the heart of the forest and kill the Lone Wolf, who randomly attacks villagers." + desc[#desc+1] = _t"You must venture in the heart of the forest and kill the Lone Wolf, who randomly attacks villagers." end if self:isCompleted("finished-basic-gameplay") then - desc[#desc+1] = "#LIGHT_GREEN#You have defeated the Lone Wolf!#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#You have defeated the Lone Wolf!#WHITE#" end ]=] if not self:isCompleted("finished-combat-stats") then - desc[#desc+1] = "Explore the Dungeon of Adventurer Enlightenment to learn about ToME's combat mechanics." + desc[#desc+1] = _t"Explore the Dungeon of Adventurer Enlightenment to learn about ToME's combat mechanics." end if self:isCompleted("finished-combat-stats") then - desc[#desc+1] = "#LIGHT_GREEN#You have navigated the Dungeon of Adventurer Enlightenment!#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#You have navigated the Dungeon of Adventurer Enlightenment!#WHITE#" end return table.concat(desc, "\n") end @@ -48,7 +48,7 @@ end final_message = function(self) if self:isCompleted("finished-basic-gameplay") and self:isCompleted("finished-combat-stats") then game.player:resolveSource():setQuestStatus("tutorial", engine.Quest.COMPLETED) - local d = require("engine.dialogs.ShowText").new("Tutorial Finished", "tutorial/done") + local d = require("engine.dialogs.ShowText").new(_t"Tutorial Finished", "tutorial/done") game:registerDialog(d) end end diff --git a/game/modules/tome/data/quests/tutorial.lua b/game/modules/tome/data/quests/tutorial.lua index f146484a4ded68a0c2a89ee17204521ac1f2db14..33ad56586a2b3f377ffefdb197beeb7c1e391402 100644 --- a/game/modules/tome/data/quests/tutorial.lua +++ b/game/modules/tome/data/quests/tutorial.lua @@ -17,10 +17,10 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "Tutorial" +name = _t"Tutorial" desc = function(self, who) local desc = {} - desc[#desc+1] = "You must venture in the heart of the forest and kill the Lone Wolf, who randomly attacks villagers." + desc[#desc+1] = _t"You must venture in the heart of the forest and kill the Lone Wolf, who randomly attacks villagers." return table.concat(desc, "\n") end @@ -32,6 +32,6 @@ on_status_change = function(self, who, status, sub) end on_grant = function(self) - local d = require("engine.dialogs.ShowText").new("Tutorial: Movement", "tutorial/move") + local d = require("engine.dialogs.ShowText").new(_t"Tutorial: Movement", "tutorial/move") game:registerDialog(d) end diff --git a/game/modules/tome/data/quests/void-gerlyk.lua b/game/modules/tome/data/quests/void-gerlyk.lua index 3913f5eb2be6a709b165f45dd605a51d581d6256..ccf2ad6693f1b06c5226008ecf4856ce86e0f8a9 100644 --- a/game/modules/tome/data/quests/void-gerlyk.lua +++ b/game/modules/tome/data/quests/void-gerlyk.lua @@ -17,11 +17,11 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "In the void, no one can hear you scream" +name = _t"In the void, no one can hear you scream" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have destroyed the sorcerers. Sadly, the portal to the Void remains open; the Creator is coming." - desc[#desc+1] = "This cannot be allowed to happen. After thousands of years trapped in the Void between the stars, Gerlyk is mad with rage." - desc[#desc+1] = "You must now finish what the Sher'tuls started. Take the Staff of Absorption and become a Godslayer yourself." + desc[#desc+1] = _t"You have destroyed the sorcerers. Sadly, the portal to the Void remains open; the Creator is coming." + desc[#desc+1] = _t"This cannot be allowed to happen. After thousands of years trapped in the Void between the stars, Gerlyk is mad with rage." + desc[#desc+1] = _t"You must now finish what the Sher'tuls started. Take the Staff of Absorption and become a Godslayer yourself." return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/quests/west-portal.lua b/game/modules/tome/data/quests/west-portal.lua index 0804bea06fbdc2c1fa1903f4c89a57f17ecfca00..339b04d52f564544c667d7be47fcc18de63de5ba 100644 --- a/game/modules/tome/data/quests/west-portal.lua +++ b/game/modules/tome/data/quests/west-portal.lua @@ -17,25 +17,25 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -name = "There and back again" +name = _t"There and back again" desc = function(self, who) local desc = {} - desc[#desc+1] = "Zemekkys in the Gates of Morning can build a portal back to Maj'Eyal for you." + desc[#desc+1] = _t"Zemekkys in the Gates of Morning can build a portal back to Maj'Eyal for you." if self:isCompleted("athame") then - desc[#desc+1] = "#LIGHT_GREEN#* You have found a Blood-Runed Athame.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have found a Blood-Runed Athame.#WHITE#" else - desc[#desc+1] = "#SLATE#* Find a Blood-Runed Athame.#WHITE#" + desc[#desc+1] = _t"#SLATE#* Find a Blood-Runed Athame.#WHITE#" end if self:isCompleted("gem") then - desc[#desc+1] = "#LIGHT_GREEN#* You have found the Resonating Diamond.#WHITE#" + desc[#desc+1] = _t"#LIGHT_GREEN#* You have found the Resonating Diamond.#WHITE#" else - desc[#desc+1] = "#SLATE#* Find a Resonating Diamond.#WHITE#" + desc[#desc+1] = _t"#SLATE#* Find a Resonating Diamond.#WHITE#" end if self:isCompleted() then - desc[#desc+1] = "" - desc[#desc+1] = "#LIGHT_GREEN#* The portal to Maj'Eyal is now functional and can be used to go back, although, like all portals, it is one-way only.#WHITE#" + desc[#desc+1] = _t"" + desc[#desc+1] = _t"#LIGHT_GREEN#* The portal to Maj'Eyal is now functional and can be used to go back, although, like all portals, it is one-way only.#WHITE#" end return table.concat(desc, "\n") @@ -83,7 +83,8 @@ create_portal = function(self, npc, player) local zemekkys = mod.class.NPC.new{ type = "humanoid", subtype = "elf", display = "p", color=colors.AQUAMARINE, - name = "High Chronomancer Zemekkys", + name = _t"High Chronomancer Zemekkys", + image = "npc/humanoid_elf_high_chronomancer_zemekkys.png", size_category = 3, rank = 3, ai = "none", faction = "sunwall", diff --git a/game/modules/tome/data/quests/wild-wild-east.lua b/game/modules/tome/data/quests/wild-wild-east.lua index 5d7ebc0e47b6dcb0d56ed3dcb743fcd99552963a..5b4def839529bcee7c12ad2feaba225bea530825 100644 --- a/game/modules/tome/data/quests/wild-wild-east.lua +++ b/game/modules/tome/data/quests/wild-wild-east.lua @@ -20,9 +20,9 @@ use_ui = "quest-main" -- Explore the far east -name = "The wild wild east" +name = _t"The wild wild east" desc = function(self, who) local desc = {} - desc[#desc+1] = "There must be a way to go into the far east from the lair of Golbug. Find it and explore the unknown far east, looking for clues." + desc[#desc+1] = _t"There must be a way to go into the far east from the lair of Golbug. Find it and explore the unknown far east, looking for clues." return table.concat(desc, "\n") end diff --git a/game/modules/tome/data/resources.lua b/game/modules/tome/data/resources.lua index f7435c764fcf4405510baa005cc52f9fd8de821b..db12e2586fc0758b32cf9f695da3a593c522ef74 100644 --- a/game/modules/tome/data/resources.lua +++ b/game/modules/tome/data/resources.lua @@ -42,7 +42,7 @@ print("[Resources] Defining Actor Resources") -- Minimalist = table of parameters to be used with the Minimalist uiset (see uiset.Minimalist.lua) -- == Resource Definitions == -ActorResource:defineResource("Air", "air", nil, "air_regen", "Air capacity in your lungs. Entities that need not breathe are not affected.", nil, nil, { +ActorResource:defineResource(_t"Air", "air", nil, "air_regen", _t"Air capacity in your lungs. Entities that need not breathe are not affected.", nil, nil, { color = "#LIGHT_STEEL_BLUE#", ai = {-- if drowning/suffocating due to terrain, try to move to a safe tile (simple AIs) aiResourceAction = function(actor, res_def) @@ -63,25 +63,25 @@ ActorResource:defineResource("Air", "air", nil, "air_regen", "Air capacity in yo } }) -ActorResource:defineResource("Stamina", "stamina", ActorTalents.T_STAMINA_POOL, "stamina_regen", "Stamina represents your physical fatigue. Most physical abilities consume it.", nil, nil, { +ActorResource:defineResource(_t"Stamina", "stamina", ActorTalents.T_STAMINA_POOL, "stamina_regen", _t"Stamina represents your physical fatigue. Most physical abilities consume it.", nil, nil, { color = "#ffcc80#", cost_factor = function(self, t, check) return (check and self:hasEffect(self.EFF_ADRENALINE_SURGE)) and 0 or (100 + self:combatFatigue()) / 100 end, wait_on_rest = true, randomboss_enhanced = true, }) -ActorResource:defineResource("Mana", "mana", ActorTalents.T_MANA_POOL, "mana_regen", "Mana represents your reserve of magical energies. Most spells cast consume mana and each sustained spell reduces your maximum mana.", nil, nil, { +ActorResource:defineResource(_t"Mana", "mana", ActorTalents.T_MANA_POOL, "mana_regen", _t"Mana represents your reserve of magical energies. Most spells cast consume mana and each sustained spell reduces your maximum mana.", nil, nil, { color = "#7fffd4#", cost_factor = function(self, t) return (100 + 2 * self:combatFatigue()) / 100 end, wait_on_rest = true, randomboss_enhanced = true, }) -ActorResource:defineResource("Equilibrium", "equilibrium", ActorTalents.T_EQUILIBRIUM_POOL, "equilibrium_regen", "Equilibrium represents your standing in the grand balance of nature. The closer it is to 0 the more balanced you are. Being out of equilibrium will adversely affect your ability to use Wild Gifts.", 0, false, { +ActorResource:defineResource(_t"Equilibrium", "equilibrium", ActorTalents.T_EQUILIBRIUM_POOL, "equilibrium_regen", _t"Equilibrium represents your standing in the grand balance of nature. The closer it is to 0 the more balanced you are. Being out of equilibrium will adversely affect your ability to use Wild Gifts.", 0, false, { color = "#00ff74#", invert_values = true, wait_on_rest = true, randomboss_enhanced = true, status_text = function(act) local _, chance = act:equilibriumChance() - return ("%d (%d%%%% fail)"):format(act:getEquilibrium(), 100 - chance) + return ("%d (%d%%%% fail)"):tformat(act:getEquilibrium(), 100 - chance) end, ai = { -- special ai functions and data -- tactical AI @@ -109,7 +109,7 @@ ActorResource:defineResource("Equilibrium", "equilibrium", ActorTalents.T_EQUILI CharacterSheet = { -- special params for the character sheet status_text = function(act1, act2, compare_fields) local text = compare_fields(act1, act2, function(act) local _, chance = act:equilibriumChance() return 100-chance end, "%d%%", "%+d%%", 1, true) - return ("%d(fail: %s)"):format(act1:getEquilibrium(),text) + return ("%d(fail: %s)"):tformat(act1:getEquilibrium(),text) end, }, Minimalist = { --parameters for the Minimalist uiset @@ -141,37 +141,37 @@ ActorResource:defineResource("Equilibrium", "equilibrium", ActorTalents.T_EQUILI } }) -ActorResource:defineResource("Vim", "vim", ActorTalents.T_VIM_POOL, "vim_regen", "Vim represents the amount of life energy/souls you have stolen. Each corruption talent requires some.", nil, nil, { +ActorResource:defineResource(_t"Vim", "vim", ActorTalents.T_VIM_POOL, "vim_regen", _t"Vim represents the amount of life energy/souls you have stolen. Each corruption talent requires some.", nil, nil, { color = "#904010#", wait_on_rest = true, randomboss_enhanced = true, Minimalist = {shader_params = {color = {0x90/255, 0x40/255, 0x10/255}}} --parameters for the Minimalist uiset }) -ActorResource:defineResource("Positive energy", "positive", ActorTalents.T_POSITIVE_POOL, "positive_regen", "Positive energy represents your reserve of positive power. It slowly increases.", nil, nil, { +ActorResource:defineResource(_t"Positive energy", "positive", ActorTalents.T_POSITIVE_POOL, "positive_regen", _t"Positive energy represents your reserve of positive power. It slowly increases.", nil, nil, { color = "#ffd700#", wait_on_rest = true, randomboss_enhanced = true, cost_factor = function(self, t, check, value) if value < 0 then return 1 else return (100 + self:combatFatigue()) / 100 end end, Minimalist = {highlight = function(player, vc, vn, vm, vr) return vc >=0.7*vm end}, }) -ActorResource:defineResource("Negative energy", "negative", ActorTalents.T_NEGATIVE_POOL, "negative_regen", "Negative energy represents your reserve of negative power. It slowly increases.", nil, nil, { +ActorResource:defineResource(_t"Negative energy", "negative", ActorTalents.T_NEGATIVE_POOL, "negative_regen", _t"Negative energy represents your reserve of negative power. It slowly increases.", nil, nil, { color = "#7f7f7f#", randomboss_enhanced = true, wait_on_rest = true, cost_factor = function(self, t, check, value) if value < 0 then return 1 else return (100 + self:combatFatigue()) / 100 end end, Minimalist = {highlight = function(player, vc, vn, vm, vr) return vc >=0.7*vm end}, }) -ActorResource:defineResource("Hate", "hate", ActorTalents.T_HATE_POOL, "hate_regen", "Hate represents your soul's primal antipathy towards others. It generally decreases whenever you have no outlet for your rage, and increases when you are damaged or destroy others.", nil, nil, { +ActorResource:defineResource(_t"Hate", "hate", ActorTalents.T_HATE_POOL, "hate_regen", _t"Hate represents your soul's primal antipathy towards others. It generally decreases whenever you have no outlet for your rage, and increases when you are damaged or destroy others.", nil, nil, { color = "#ffa0ff#", cost_factor = function(self, t) return (100 + self:combatFatigue()) / 100 end, Minimalist = {highlight = function(player, vc, vn, vm, vr) return vc >=100 end}, }) -ActorResource:defineResource("Paradox", "paradox", ActorTalents.T_PARADOX_POOL, "paradox_regen", "Paradox represents how much damage you've done to the space-time continuum. A high Paradox score makes Chronomancy less reliable and more dangerous to use but also amplifies its effects.", 0, false, { +ActorResource:defineResource(_t"Paradox", "paradox", ActorTalents.T_PARADOX_POOL, "paradox_regen", _t"Paradox represents how much damage you've done to the space-time continuum. A high Paradox score makes Chronomancy less reliable and more dangerous to use but also amplifies its effects.", 0, false, { color = "#4198dc#", invert_values = true, -- randomboss_enhanced = true, status_text = function(act) local chance = act:paradoxFailChance() - return ("%d/%d (%d%%%%)"):format(act:getModifiedParadox(), act:getParadox(), chance), chance + return ("%d/%d (%d%%%%)"):tformat(act:getModifiedParadox(), act:getParadox(), chance), chance end, ai = { -- special ai functions and data tactical = { default_pool_size = 100, -- assumed pool size to account for gains/losses/regeneration @@ -196,7 +196,7 @@ ActorResource:defineResource("Paradox", "paradox", ActorTalents.T_PARADOX_POOL, CharacterSheet = { -- special params for the character sheet status_text = function(act1, act2, compare_fields) local text = compare_fields(act1, act2, function(act) return act:paradoxFailChance() end, "%d%%", "%+d%%", 1, true) - return ("%d/%d(anom: %s)"):format(act1:getModifiedParadox(), act1:getParadox(), text) + return ("%d/%d(anom: %s)"):tformat(act1:getModifiedParadox(), act1:getParadox(), text) end, }, Minimalist = { --parameters for the Minimalist uiset @@ -226,7 +226,7 @@ ActorResource:defineResource("Paradox", "paradox", ActorTalents.T_PARADOX_POOL, } }, }) -ActorResource:defineResource("Psi", "psi", ActorTalents.T_PSI_POOL, "psi_regen", "Psi represents your reserve of psychic energy.", nil, nil, { +ActorResource:defineResource(_t"Psi", "psi", ActorTalents.T_PSI_POOL, "psi_regen", _t"Psi represents your reserve of psychic energy.", nil, nil, { color = "#4080ff#", wait_on_rest = true, randomboss_enhanced = true, @@ -263,7 +263,7 @@ ActorResource:defineResource("Psi", "psi", ActorTalents.T_PSI_POOL, "psi_regen", end }, }) -ActorResource:defineResource("Souls", "soul", ActorTalents.T_SOUL_POOL, "soul_regen", "This is the number of soul fragments you have extracted from your foes for your own use.", 0, 10, { +ActorResource:defineResource(_t"Souls", "soul", ActorTalents.T_SOUL_POOL, "soul_regen", _t"This is the number of soul fragments you have extracted from your foes for your own use.", 0, 10, { color = "#bebebe#", randomboss_enhanced = true, Minimalist = {images = {front = "resources/front_souls.png", front_dark = "resources/front_souls_dark.png"}}, diff --git a/game/modules/tome/data/talents.lua b/game/modules/tome/data/talents.lua index f15d93c5cd9119031bd280421cdfd86c8ea22682..6193069422a8d54ccd400cf7e5329ac43fe896ed 100644 --- a/game/modules/tome/data/talents.lua +++ b/game/modules/tome/data/talents.lua @@ -64,11 +64,11 @@ Talents.newTalent = function(self, t) if t.is_class_evolution then t.short_name = (t.short_name or t.name):upper():gsub("[ ']", "_") - t.name = "#LIGHT_STEEL_BLUE#"..t.name.." (Class Evolution)" + t.name = ("#LIGHT_STEEL_BLUE#%s (Class Evolution)"):tformat(_t(t.name)) end if t.is_race_evolution then t.short_name = (t.short_name or t.name):upper():gsub("[ ']", "_") - t.name = "#SANDY_BROWN#"..t.name.." (Race Evolution)" + t.name = ("#SANDY_BROWN# (Race Evolution)"):tformat(_t(t.name)) end return oldNewTalent(self, t) @@ -100,13 +100,13 @@ damDesc = function(self, type, dam) end Talents.is_a_type = { - is_spell = "a spell", - is_mind = "a mind power", - is_nature = "a nature gift", - is_antimagic = "an antimagic ability", - is_summon = "a summon power", - is_necromancy = "necromancy", - use_only_arcane = "usable during Aether Avatar", + is_spell = _t"a spell", + is_mind = _t"a mind power", + is_nature = _t"a nature gift", + is_antimagic = _t"an antimagic ability", + is_summon = _t"a summon power", + is_necromancy = _t"necromancy", + use_only_arcane = _t"usable during Aether Avatar", } Talents.damDesc = damDesc diff --git a/game/modules/tome/data/talents/celestial/celestial.lua b/game/modules/tome/data/talents/celestial/celestial.lua index 11e2b76409b67225ba92f85c58a4ee3d1227f7e2..8d09ca434b27179d8493b2e5e0f65f5fadc15801 100644 --- a/game/modules/tome/data/talents/celestial/celestial.lua +++ b/game/modules/tome/data/talents/celestial/celestial.lua @@ -18,26 +18,26 @@ -- darkgod@te4.org -- Corruptions -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/guardian", name = "guardian", min_lev = 10, description = "Your devotion grants you additional protection." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/chants", name = "chants", generic = true, description = "Chant the glory of the Sun." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/chants-chants", name = "chants", generic = true, on_mastery_change = function(self, m, tt) if self:knowTalentType("celestial/chants") ~= nil then self.talents_types_mastery[tt] = self.talents_types_mastery["celestial/chants"] end end, description = "Chant the glory of the Sun." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/light", name = "light", generic = true, description = "Invoke the power of the light to heal and mend." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/combat", name = "combat", description = "Your devotion allows you to combat your foes with indomitable determination." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/radiance", name = "radiance", description = "You channel the light of the sun through your body." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/crusader", name = "crusader", description = "Forgo your shield for the chance to crush your foes with a mighty two handed weapon." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/sunlight", name = "sunlight", description = "Summon the power of the Sun to burn your foes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/sun", name = "sun", description = "Summon the power of the Sun to burn your foes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/glyphs", name = "glyphs", min_lev = 10, description = "Bind the brilliant powers into glyphs to trap your foes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/twilight", name = "twilight", description = "Stand between the darkness and the light, harnessing both." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/star-fury", name = "star fury", description = "Call the fury of the Stars and the Moon to destroy your foes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/hymns", name = "hymns", generic = true, on_mastery_change = function(self, m, tt) if self:knowTalentType("celestial/hymns") ~= nil then self.talents_types_mastery[tt] = self.talents_types_mastery["celestial/hymns"] end end, description = "Chant the glory of the Moon." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/hymns-hymns", name = "hymns", generic = true, description = "Chant the glory of the Moon." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/circles", name = "circles", min_lev = 10, description = "Bind the power of the Moon into circles at your feet." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/eclipse", name = "eclipse", description = "The moment of the Eclipse is the moment of Truth, when Sun and Moon are in tandem and the energies of the world hang in the balance. Intense focus allows the greatest Anorithils to harness these energies to unleash devastating forces..." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/other", name = "other", description = "Other celestial powers." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/guardian", name = _t"guardian", min_lev = 10, description = _t"Your devotion grants you additional protection." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/chants", name = _t"chants", generic = true, description = _t"Chant the glory of the Sun." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/chants-chants", name = _t"chants", generic = true, on_mastery_change = function(self, m, tt) if self:knowTalentType("celestial/chants") ~= nil then self.talents_types_mastery[tt] = self.talents_types_mastery["celestial/chants"] end end, description = _t"Chant the glory of the Sun." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/light", name = _t"light", generic = true, description = _t"Invoke the power of the light to heal and mend." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/combat", name = _t"combat", description = _t"Your devotion allows you to combat your foes with indomitable determination." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/radiance", name = _t"radiance", description = _t"You channel the light of the sun through your body." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/crusader", name = _t"crusader", description = _t"Forgo your shield for the chance to crush your foes with a mighty two handed weapon." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/sunlight", name = _t"sunlight", description = _t"Summon the power of the Sun to burn your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/sun", name = _t"sun", description = _t"Summon the power of the Sun to burn your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/glyphs", name = _t"glyphs", min_lev = 10, description = _t"Bind the brilliant powers into glyphs to trap your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/twilight", name = _t"twilight", description = _t"Stand between the darkness and the light, harnessing both." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/star-fury", name = _t"star fury", description = _t"Call the fury of the Stars and the Moon to destroy your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/hymns", name = _t"hymns", generic = true, on_mastery_change = function(self, m, tt) if self:knowTalentType("celestial/hymns") ~= nil then self.talents_types_mastery[tt] = self.talents_types_mastery["celestial/hymns"] end end, description = _t"Chant the glory of the Moon." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/hymns-hymns", name = _t"hymns", generic = true, description = _t"Chant the glory of the Moon." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/circles", name = _t"circles", min_lev = 10, description = _t"Bind the power of the Moon into circles at your feet." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/eclipse", name = _t"eclipse", description = _t"The moment of the Eclipse is the moment of Truth, when Sun and Moon are in tandem and the energies of the world hang in the balance. Intense focus allows the greatest Anorithils to harness these energies to unleash devastating forces..." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/other", name = _t"other", description = _t"Other celestial powers." } -newTalentType{ no_silence=true, is_spell=true, type="celestial/other", name = "other", description = "Various celestial talents." } +newTalentType{ no_silence=true, is_spell=true, type="celestial/other", name = _t"other", description = _t"Various celestial talents." } -- Generic requires for corruptions based on talent level divi_req1 = { diff --git a/game/modules/tome/data/talents/celestial/chants.lua b/game/modules/tome/data/talents/celestial/chants.lua index 94dcabcb60155f2a960aa22c8def2d927d9432d5..a5ed4e7ffcf10391dcb7b0a6e65ecead08d15002 100644 --- a/game/modules/tome/data/talents/celestial/chants.lua +++ b/game/modules/tome/data/talents/celestial/chants.lua @@ -76,7 +76,7 @@ newTalent{ return ([[You chant the glory of the Sun, granting you %d Mental Save and increasing your maximum life by %0.1f%% (Currently: %d). You may only have one Chant active at once. The effects will increase with your Spellpower.]]): - format(saves, life*100, life*self.max_life) + tformat(saves, life*100, life*self.max_life) end, } @@ -137,7 +137,7 @@ newTalent{ return ([[You chant the glory of the Sun, granting you %d%% physical damage resistance, %d physical save, %d armour and +15%% armour hardiness. You may only have one Chant active at once. The effects will increase with your Spellpower.]]): - format(physicalresistance, saves, physicalresistance) + tformat(physicalresistance, saves, physicalresistance) end, } @@ -217,7 +217,7 @@ newTalent{ return ([[You chant the glory of the Sun, granting you %d%% fire, lightning, acid and cold damage resistance, %d spell save and reduces the damage from enemies 3 or more spaces away by %d%%. You may only have one Chant active at once. The effects will increase with your Spellpower.]]): - format(resists, saves, range) + tformat(resists, saves, range) end, } @@ -264,7 +264,7 @@ newTalent{ Your lite radius is also increased by %d. You may only have one Chant active at once and this Chant costs less power to sustain. The effects will increase with your Spellpower.]]): - format(damageinc, damDesc(self, DamageType.LIGHT, damage), lite) + tformat(damageinc, damDesc(self, DamageType.LIGHT, damage), lite) end, } @@ -306,7 +306,7 @@ newTalent{ Chant of Fortress: Increases your physical save by %d, your physical resistance by %d%%, your armour by %d and your armour hardiness by 15%%. Chant of Resistance: Increases you spell save by %d, your fire/cold/lightning/acid resistances by %d%% and reduces all damage that comes from distant enemies (3 spaces or more) by %d%%. You may only have one Chant active at a time.]]): - format(t1.getResists(self, t1), t1.getLifePct(self, t1)*100, t2.getResists(self, t2), t2.getPhysicalResistance(self, t2), t2.getPhysicalResistance(self, t2), t3.getSpellResists(self, t3), t3.getResists(self, t3), t3.getDamageChange(self, t3)) + tformat(t1.getResists(self, t1), t1.getLifePct(self, t1)*100, t2.getResists(self, t2), t2.getPhysicalResistance(self, t2), t2.getPhysicalResistance(self, t2), t3.getSpellResists(self, t3), t3.getResists(self, t3), t3.getDamageChange(self, t3)) end) self.talents[self.T_CHANT_OF_FORTITUDE] = old1 self.talents[self.T_CHANT_OF_FORTRESS] = old2 @@ -327,7 +327,7 @@ newTalent{ getBonusRegen = function(self, t) return self:combatTalentSpellDamage(t, 10, 20) / 10 end, info = function(self, t) return ([[Your Chants now bathe you in a cloak of light, which increases your stamina and mana regenerations by %0.2f per turn and does %0.2f light damage to anyone who hits you in melee. - These values scale with your Spellpower.]]):format(t.getBonusRegen(self, t), damDesc(self, DamageType.LIGHT, t.getDamageOnMeleeHit(self, t))) + These values scale with your Spellpower.]]):tformat(t.getBonusRegen(self, t), damDesc(self, DamageType.LIGHT, t.getDamageOnMeleeHit(self, t))) end, } @@ -378,7 +378,7 @@ newTalent{ end end if known then - game.logSeen(self, "%s is cured!", self.name:capitalize()) + game.logSeen(self, "%s is cured!", self:getName():capitalize()) end end, info = function(self, t) @@ -386,7 +386,7 @@ newTalent{ Also, when you start a new Chant, you will be cured of all cross-tier effects and cured of up to %d debuffs. Chant of Fortitude cures mental effects. Chant of Fortress cures physical effects. - Chant of Resistance cures magical effects.]]):format(t.getBonusLight(self, t), t.getDebuffCures(self, t)) + Chant of Resistance cures magical effects.]]):tformat(t.getBonusLight(self, t), t.getDebuffCures(self, t)) end, } @@ -418,6 +418,6 @@ newTalent{ info = function(self, t) return ([[Your passion for singing the praises of the Sun reaches its zenith. Your Chanting now increases your light and fire damage by %d%% and up to %d times per turn, when you are hit by a weapon attack, you will gain %0.1f Positive. - These values scale with your Spellpower.]]):format(t.getLightDamageIncrease(self, t), t.getTurnLimit(self, t), t.getPos(self, t)) + These values scale with your Spellpower.]]):tformat(t.getLightDamageIncrease(self, t), t.getTurnLimit(self, t), t.getPos(self, t)) end, } diff --git a/game/modules/tome/data/talents/celestial/circles.lua b/game/modules/tome/data/talents/celestial/circles.lua index 906b275f7bd6144bb6b33e7d041dab4c7e50f000..d4ebc03059f0663ef04274fd212dbc5a17ebddba 100644 --- a/game/modules/tome/data/talents/celestial/circles.lua +++ b/game/modules/tome/data/talents/celestial/circles.lua @@ -54,7 +54,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Creates a circle of radius %d at your feet; the circle increases your defense and all saves by %d while dealing %0.2f darkness damage per turn to everyone else within its radius. The circle lasts %d turns. The damage will increase with your Spellpower.]]): - format(radius, damage, (damDesc (self, DamageType.DARKNESS, damage)), duration) + tformat(radius, damage, (damDesc (self, DamageType.DARKNESS, damage)), duration) end, } @@ -126,7 +126,7 @@ newTalent{ local radius = self:getTalentRadius(t) local damage = t.getDamage(self, t) return ([[Creates a circle of radius %d at your feet; the circle protects you from silence effects while you remain in its radius while silencing and dealing %d light damage to everyone else who enters. The circle lasts %d turns.]]): - format(radius, damDesc(self, DamageType.LIGHT, damage), duration) + tformat(radius, damDesc(self, DamageType.LIGHT, damage), duration) end, } @@ -167,7 +167,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Creates a circle of radius %d at your feet; the circle slows incoming projectiles by %d%% and attempts to push all creatures other than yourself out of its radius, inflicting %0.2f light damage and %0.2f darkness damage per turn as it does so. The circle lasts %d turns. The effects will increase with your Spellpower.]]): - format(radius, damage*5, (damDesc (self, DamageType.LIGHT, damage)), (damDesc (self, DamageType.DARKNESS, damage)), duration) + tformat(radius, damage*5, (damDesc (self, DamageType.LIGHT, damage)), (damDesc (self, DamageType.DARKNESS, damage)), duration) end, } @@ -212,6 +212,6 @@ newTalent{ Residual power from the surge will emanate from your circles for %d turns; each circle you stand in will increase your celestial resources. Shifting Shadows: +1 negative. Sanctity: +1 postive. - Warding: +0.5 postive and negative.]]):format(t.getSlow(self, t), t.getSlowDur(self, t), damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t)), t.getDuration(self, t)) + Warding: +0.5 postive and negative.]]):tformat(t.getSlow(self, t), t.getSlowDur(self, t), damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t)), t.getDuration(self, t)) end, } diff --git a/game/modules/tome/data/talents/celestial/combat.lua b/game/modules/tome/data/talents/celestial/combat.lua index d4c80658c6103a80e361dc1cffcf25674b4a0648..d7ca93a80236185dc0e84418b0259406891cf793 100644 --- a/game/modules/tome/data/talents/celestial/combat.lua +++ b/game/modules/tome/data/talents/celestial/combat.lua @@ -62,7 +62,7 @@ newTalent{ return ([[Infuse your weapon with the power of the Sun, adding %0.1f light damage on each melee hit. Additionally, if you have a temporary damage shield active, melee hits will increase its power by %d once per turn. The damage dealt and shield bonus will increase with your Spellpower.]]): - format(damDesc(self, DamageType.LIGHT, damage), shieldflat) + tformat(damDesc(self, DamageType.LIGHT, damage), shieldflat) end, } @@ -100,7 +100,7 @@ newTalent{ self:attackTarget(target, nil, t.getDamage(self, t), true) local range = core.fov.distance(self.x, self.y, target.x, target.y) if range > 1 and rng.percent(t.SecondStrikeChance(self, t, range)) then - game.logSeen(self, "#CRIMSON#"..self.name.."strikes twice with Wave of Power!#NORMAL#") + game.logSeen(self, "#CRIMSON#%sstrikes twice with Wave of Power!#NORMAL#", self:getName()) self:attackTarget(target, nil, t.getDamage(self, t, true), true) end else @@ -114,7 +114,7 @@ newTalent{ If the target is outside of melee range, you have a chance to project a second attack against it for %d%% weapon damage. The second strike chance (which increases with distance) is %0.1f%% at range 2 and %0.1f%% at the maximum range of %d. The range will increase with your Strength.]]): - format(t.getDamage(self, t)*100, t.getDamage(self, t, true)*100, t.SecondStrikeChance(self, t, 2), t.SecondStrikeChance(self, t, range), range) + tformat(t.getDamage(self, t)*100, t.getDamage(self, t, true)*100, t.SecondStrikeChance(self, t, 2), t.SecondStrikeChance(self, t, range), range) end, } @@ -167,7 +167,7 @@ newTalent{ return ([[Your weapon attacks burn with righteous fury, dealing %d%% of your lost HP as additional Fire damage (up to %d, Current: %d). Targets struck are also afflicted with a Martyrdom effect that causes them to take %d%% of all damage they deal for 4 turns. The bonus damage can only occur once per turn.]]): - format(damagepct*100, t.getMaxDamage(self, t, 10, 400), damage, martyr) + tformat(damagepct*100, t.getMaxDamage(self, t, 10, 400), damage, martyr) end, } @@ -199,6 +199,6 @@ newTalent{ end, info = function(self, t) return ([[Any attack that would drop you below 1 hit point instead triggers Second Life, deactivating the talent, setting your hit points to 1, then healing you for %d.]]): - format(t.getLife(self, t)) + tformat(t.getLife(self, t)) end, } diff --git a/game/modules/tome/data/talents/celestial/crusader.lua b/game/modules/tome/data/talents/celestial/crusader.lua index f764a96c9288b7244b0ee9cd2407f3255cdf1f55..376480169ec6be05cf55f49c9364675e61c9fd72 100644 --- a/game/modules/tome/data/talents/celestial/crusader.lua +++ b/game/modules/tome/data/talents/celestial/crusader.lua @@ -58,7 +58,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[You strike your foe with your two handed weapon, dealing %d%% weapon damage. If the attack hits, all foes in radius 2 will have their light resistance reduced by %d%% and their damage reduced by %d%% for 5 turns.]]): - format(100 * damage, t.getWeakness(self, t), t.getNumb(self, t)) + tformat(100 * damage, t.getWeakness(self, t), t.getNumb(self, t)) end, } @@ -87,7 +87,7 @@ newTalent{ end, info = function(self, t) return ([[You mark a target with light for 3 turns, causing all melee hits you deal to it to heal you for %d%% of the damage done.]]): - format(t.getPower(self, t)) + tformat(t.getPower(self, t)) end, } @@ -123,7 +123,7 @@ newTalent{ return ([[While wielding a two handed weapon, your critical strike chance is increased by %d%%, and your melee criticals instill you with righteous strength, increasing all physical and light damage you deal by %d%%, stacking up to 3 times. In addition, your melee critical strikes leave a lasting lightburn on the target, dealing %0.2f light damage over 5 turns and reducing opponents armour by %d. The damage increases with your Spellpower.]]): - format(t.getCrit(self, t), t.getPower(self, t), damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), t.getArmor(self, t)) + tformat(t.getCrit(self, t), t.getPower(self, t), damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), t.getArmor(self, t)) end, } @@ -177,6 +177,6 @@ newTalent{ All creatures in radius one take %d%% weapon damage. In addition while spinning your weapon shines so much it deals %d%% light weapon damage to all foes in radius 2. At level 4 your spinning blade creates a shield that blocks all damage for 1 turn.]]): - format(t.get1Damage(self, t) * 100, t.get2Damage(self, t) * 100) + tformat(t.get1Damage(self, t) * 100, t.get2Damage(self, t) * 100) end, } diff --git a/game/modules/tome/data/talents/celestial/eclipse.lua b/game/modules/tome/data/talents/celestial/eclipse.lua index 820392ec5b77e9600caf734e525513ea9c140835..babf06b517f34ccbb3e56bb0d95cb0ec9747e66c 100644 --- a/game/modules/tome/data/talents/celestial/eclipse.lua +++ b/game/modules/tome/data/talents/celestial/eclipse.lua @@ -29,7 +29,7 @@ newTalent{ end, info = function(self, t) return ([[Increases your spell critical chance by %d%%.]]): - format(t.getCrit(self, t)) + tformat(t.getCrit(self, t)) end, } @@ -62,7 +62,7 @@ newTalent{ local cooldownreduction = t.getCooldownReduction(self, t) return ([[Increases your light and darkness resistance penetration by %d%% for %d turns, and reduces the cooldown of all Celestial skills by %d. The resistance penetration will increase with your Cunning.]]): - format(penetration, duration, cooldownreduction) + tformat(penetration, duration, cooldownreduction) end, } @@ -130,7 +130,7 @@ newTalent{ This effect costs 2 positive or 2 negative energy each time it's triggered, and will not activate if either your positive or negative energy is below 2. The damage scales with your Spellpower. This spell cannot crit.]]): - format(targetcount, self:getTalentRange(t), damDesc(self, DamageType.LIGHT, lightdamage), damDesc(self, DamageType.DARKNESS, darknessdamage)) + tformat(targetcount, self:getTalentRange(t), damDesc(self, DamageType.LIGHT, lightdamage), damDesc(self, DamageType.DARKNESS, darknessdamage)) end, } @@ -169,6 +169,6 @@ newTalent{ local dotDam = t.getDotDamage(self, t) local conversion = t.getConversion(self, t) local duration = t.getDuration(self, t) - return ([[Shroud foes within radius %d in darkest light, dealing %0.2f light and %0.2f darkness damage per turn and converting %d%% of the damage they deal between light and darkness for %d turns.]]):format(radius, damDesc(self, DamageType.LIGHT, dotDam), damDesc(self, DamageType.DARKNESS, dotDam), conversion*100, duration) + return ([[Shroud foes within radius %d in darkest light, dealing %0.2f light and %0.2f darkness damage per turn and converting %d%% of the damage they deal between light and darkness for %d turns.]]):tformat(radius, damDesc(self, DamageType.LIGHT, dotDam), damDesc(self, DamageType.DARKNESS, dotDam), conversion*100, duration) end, } diff --git a/game/modules/tome/data/talents/celestial/glyphs.lua b/game/modules/tome/data/talents/celestial/glyphs.lua index 36dde6ed386d698f5d5e9abaec6be5edecb6ec9c..46e9ab5493534120d469af995c788962341e35d1 100644 --- a/game/modules/tome/data/talents/celestial/glyphs.lua +++ b/game/modules/tome/data/talents/celestial/glyphs.lua @@ -121,9 +121,9 @@ newTalent{ ---------------------------------------------------------------- local function makeSunGlyph() local sun_glyph = Trap.new{ - name = "glyph of sunlight", + name = _t"glyph of sunlight", is_glyph = "sunlight", - type = "elemental", id_by_type=true, unided_name = "trap", + type = "elemental", id_by_type=true, unided_name = _t"trap", display = '^', color=colors.GOLD, image = "trap/trap_glyph_explosion_02_64.png", disarmable = false, no_disarm_message = true, @@ -134,7 +134,7 @@ local function makeSunGlyph() dam = dam, heal = heal, desc = function(self) - return ([[Deals %d light damage and heals the summoner for %d]]):format(engine.interface.ActorTalents.damDesc(self, engine.DamageType.LIGHT, self.dam), self.heal) + return ([[Deals %d light damage and heals the summoner for %d]]):tformat(engine.interface.ActorTalents.damDesc(self, engine.DamageType.LIGHT, self.dam), self.heal) end, canTrigger = function(self, x, y, who) if who:reactionToward(self.summoner) < 0 then return mod.class.Trap.canTrigger(self, x, y, who) end @@ -181,9 +181,9 @@ end local function makeMoonGlyph() local star_glyph = Trap.new{ - name = "glyph of moonlight", + name = _t"glyph of moonlight", is_glyph = "moonlight", - type = "elemental", id_by_type=true, unided_name = "trap", + type = "elemental", id_by_type=true, unided_name = _t"trap", display = '^', color=colors.GOLD, image = "trap/trap_glyph_fatigue_01_64.png", disarmable = false, no_disarm_message = true, @@ -196,7 +196,7 @@ local function makeMoonGlyph() numbDur = numbDur, desc = function(self) return ([[Deals %d darkness damage and saps the foes energy, reducing all damage dealt by %d%% for %d turns.]]): - format(engine.interface.ActorTalents.damDesc(self, engine.DamageType.DARKNESS, self.dam), self.numb, self.numbDur) + tformat(engine.interface.ActorTalents.damDesc(self, engine.DamageType.DARKNESS, self.dam), self.numb, self.numbDur) end, canTrigger = function(self, x, y, who) if who:reactionToward(self.summoner) < 0 then return mod.class.Trap.canTrigger(self, x, y, who) end @@ -243,9 +243,9 @@ end local function makeTwilightGlyph() local twi_glyph = Trap.new{ - name = "glyph of twilight", + name = _t"glyph of twilight", is_glyph = "twilight", - type = "elemental", id_by_type=true, unided_name = "trap", + type = "elemental", id_by_type=true, unided_name = _t"trap", display = '^', color=colors.GOLD, image = "trap/trap_glyph_repulsion_01_64.png", disarmable = false, no_disarm_message = true, @@ -256,7 +256,7 @@ local function makeTwilightGlyph() dam = dam, dist=dist, desc = function(self) - return ([[Explodes knocking the enemy 1 space in a random direction and dealing %d light and %d darkness damage.]]):format(engine.interface.ActorTalents.damDesc(self, engine.DamageType.LIGHT, self.dam/2), engine.interface.ActorTalents.damDesc(self, engine.DamageType.DARKNESS, self.dam/2)) + return ([[Explodes knocking the enemy 1 space in a random direction and dealing %d light and %d darkness damage.]]):tformat(engine.interface.ActorTalents.damDesc(self, engine.DamageType.LIGHT, self.dam/2), engine.interface.ActorTalents.damDesc(self, engine.DamageType.DARKNESS, self.dam/2)) end, canTrigger = function(self, x, y, who) if who:reactionToward(self.summoner) < 0 then return mod.class.Trap.canTrigger(self, x, y, who) end @@ -355,7 +355,7 @@ end #ffd700#Glyph of Sunlight#LAST#: Bind sunlight into a glyph. When triggered it will release a brilliant light, dealing %0.2f light damage and healing you for %d. #7f7f7f#Glyph of Moonlight#LAST#: Bind moonlight into a glyph. When triggered it will release a fatiguing darkness, dealing %0.2f darkness damage and reducing the foes damage dealt by %d%% for %d turns. #9D9DC9#Glyph of Twilight#LAST#: Bind twilight into a glyph. When triggered it will release a burst of twilight, dealing %0.2f light and %0.2f darkness damage and knocking the foe back %d tiles. - ]]):format(self:getTalentRange(t), t.getDuration(self, t), t.getGlyphCD(self, t), + ]]):tformat(self:getTalentRange(t), t.getDuration(self, t), t.getGlyphCD(self, t), damDesc(self, DamageType.LIGHT, dam), heal, damDesc(self, DamageType.DARKNESS, dam), numb, numbDur, damDesc(self, DamageType.LIGHT, dam/2), damDesc(self, DamageType.DARKNESS, dam/2), dist) @@ -376,7 +376,7 @@ newTalent{ return ([[Your glyphs are imbued with celestial fury; they last %d turns longer and when triggered they will deal damage. #ffd700#Glyph of Sunlight#LAST#: Deals %0.2f light damage. #7f7f7f#Glyph of Moonlight#LAST#: Deals %0.2f darkness damage. - #9D9DC9#Glyph of Twilight#LAST#: Deals %0.2f light and %0.2f darkness damage.]]):format(t.getPersistentDuration(self, t), damDesc(self, DamageType.LIGHT, dam), damDesc(self, DamageType.DARKNESS, dam), damDesc(self, DamageType.LIGHT, dam/2), damDesc(self, DamageType.DARKNESS, dam/2)) + #9D9DC9#Glyph of Twilight#LAST#: Deals %0.2f light and %0.2f darkness damage.]]):tformat(t.getPersistentDuration(self, t), damDesc(self, DamageType.LIGHT, dam), damDesc(self, DamageType.DARKNESS, dam), damDesc(self, DamageType.LIGHT, dam/2), damDesc(self, DamageType.DARKNESS, dam/2)) end, } @@ -390,7 +390,7 @@ newTalent{ getMaxStacks = function(self, t) return self:combatTalentLimit(t, 6, 2, 5) end, getTurns = function(self, t) return self:combatTalentLimit(t, 10, 1, 7) end, info = function(self, t) - return ([[Up to 3 times per turn when one of your glyphs triggers you feel a surge of celestial power, increasing your darkness and light resistance and affinity by 5%% for %d turns, stacking up to %d times.]]):format(t.getTurns(self, t), t.getMaxStacks(self, t)) + return ([[Up to 3 times per turn when one of your glyphs triggers you feel a surge of celestial power, increasing your darkness and light resistance and affinity by 5%% for %d turns, stacking up to %d times.]]):tformat(t.getTurns(self, t), t.getMaxStacks(self, t)) end, } @@ -452,6 +452,6 @@ newTalent{ At talent level 2 glyphs triggered this way will leave a residue of themselves on the ground, dealing damage each turn for %d turns. #ffd700#Sunlight#LAST#: %0.2f light damage. #7f7f7f#Moonlight#LAST#: %0.2f darkness damage. - #9D9DC9#Twilight#LAST#: %0.2f light and %0.2f darkness damage]]):format(t.getDuration(self, t), damDesc(self, DamageType.LIGHT, dam), damDesc(self, DamageType.DARKNESS, dam), damDesc(self, DamageType.LIGHT, dam/2), damDesc(self, DamageType.DARKNESS, dam/2)) + #9D9DC9#Twilight#LAST#: %0.2f light and %0.2f darkness damage]]):tformat(t.getDuration(self, t), damDesc(self, DamageType.LIGHT, dam), damDesc(self, DamageType.DARKNESS, dam), damDesc(self, DamageType.LIGHT, dam/2), damDesc(self, DamageType.DARKNESS, dam/2)) end, } diff --git a/game/modules/tome/data/talents/celestial/guardian.lua b/game/modules/tome/data/talents/celestial/guardian.lua index b00fc2f7f6eee055fe5d457619a96eced95b4ca6..dc86ffa761fa6b67a1df8f78559488e125f49e96 100644 --- a/game/modules/tome/data/talents/celestial/guardian.lua +++ b/game/modules/tome/data/talents/celestial/guardian.lua @@ -56,7 +56,7 @@ newTalent{ If you do not have any positive energy, the effect will not trigger. Additionally, once per turn successful melee attacks will trigger a bonus attack with your shield dealing %d%% light damage. The healing done will increase with your Spellpower.]]): - format(heal, t.getShieldDamage(self, t)*100) + tformat(heal, t.getShieldDamage(self, t)*100) end, } @@ -113,7 +113,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Hits the target with your weapon doing %d%% damage, and with a shield strike doing %d%% damage. If the shield strike connects, your shield will explode in a burst of light that inflicts %0.2f light damage on all targets except yourself within radius %d of the target, and light up all tiles in that radius. The light damage will increase with your Spellpower.]]): - format(100 * weapondamage, 100 * shielddamage, damDesc(self, DamageType.LIGHT, lightdamage), radius) + tformat(100 * weapondamage, 100 * shielddamage, damDesc(self, DamageType.LIGHT, lightdamage), radius) end, } @@ -167,13 +167,13 @@ newTalent{ local damage = t.getDamage(self, t) local absorb_string = "" if self.retribution_absorb and self.retribution_strike then - absorb_string = ([[#RED#Absorb Remaining: %d]]):format(self.retribution_absorb) + absorb_string = ([[#RED#Absorb Remaining: %d]]):tformat(self.retribution_absorb) end return ([[Retribution negates half of all damage you take while it is active. Once Retribution has negated %0.2f damage, your shield will explode in a burst of light, inflicting damage equal to the amount negated in a radius of %d and deactivating the talent. The amount absorbed will increase with your Spellpower. %s]]): - format(damage, self:getTalentRange(t), absorb_string) + tformat(damage, self:getTalentRange(t), absorb_string) end, } @@ -224,6 +224,6 @@ newTalent{ return ([[You demonstrate your dedication to the light with a measured attack striking once with your weapon for %d%% Light damage and once with your shield for %d%% Light damage. If the first strike connects %d random talent cooldowns are reduced by 1. If the second strike connects you are cleansed of %d debuffs.]]): - format(weapon, shield, cooldown, cleanse) + tformat(weapon, shield, cooldown, cleanse) end, } diff --git a/game/modules/tome/data/talents/celestial/hymns.lua b/game/modules/tome/data/talents/celestial/hymns.lua index 1792125aa92f5e3937670741eb7a1bb81042e36e..8de6a841b32623e846384c5dc589811a40d690c0 100644 --- a/game/modules/tome/data/talents/celestial/hymns.lua +++ b/game/modules/tome/data/talents/celestial/hymns.lua @@ -105,7 +105,7 @@ newTalent{ This increases your movement speed by %d%% and your spell speed by %d%%. You may only have one Hymn active at once. The effects will increase with your Spellpower.]]): - format(t.moveSpeed(self, t), t.castSpeed(self, t)) + tformat(t.moveSpeed(self, t), t.castSpeed(self, t)) end, } @@ -210,7 +210,7 @@ newTalent{ You may also attack creatures you cannot see without penalty and your critical hits do %d%% more damage. You may only have one Hymn active at once. The stealth and invisibility detection will increase with your Spellpower.]]): - format(stealth, invis, t.critPower(self, t)) + tformat(stealth, invis, t.critPower(self, t)) end, } @@ -277,7 +277,7 @@ newTalent{ local immunities = t.getImmunities(self, t) return ([[Chant the glory of the Moons, granting you %d%% stun, blindness and confusion resistance. You may only have one Hymn active at once.]]): - format(100 * (immunities)) + tformat(100 * (immunities)) end, } @@ -336,12 +336,12 @@ newTalent{ sustain_slots = 'celestial_hymn', activate = function(self, t) game:playSoundNear(self, "talents/spell_generic") - game.logSeen(self, "#DARK_GREY#A shroud of shadow dances around %s!", self.name) - return { name=self.name:capitalize().."'s "..t.name + game.logSeen(self, "#DARK_GREY#A shroud of shadow dances around %s!", self:getName()) + return { name=("%s's %s"):tformat(self:getName():capitalize(), t.name) } end, deactivate = function(self, t, p) - game.logSeen(self, "#DARK_GREY#The shroud of shadows around %s disappears.", self.name) + game.logSeen(self, "#DARK_GREY#The shroud of shadows around %s disappears.", self:getName()) return true end, info = function(self, t) @@ -353,7 +353,7 @@ newTalent{ This powerful spell will drain %0.1f negative energy for each beam; no beam will fire if your negative energy is too low. You may only have one Hymn active at once. The damage will increase with your Spellpower.]]): - format(targetcount, damDesc(self, DamageType.DARKNESS, damage), drain) + tformat(targetcount, damDesc(self, DamageType.DARKNESS, damage), drain) end, } @@ -398,7 +398,7 @@ Hymn of Detection: Increases your ability to see stealthy creatures by %d and in Hymn of Perseverance: Increases your resistance to stun, confusion and blinding by %d%%. You may only have one Hymn active at a time.]]): - format(t1.moveSpeed(self, t1), t1.castSpeed(self, t1), t2.getSeeStealth(self, t2), t2.getSeeInvisible(self, t2), t2.critPower(self, t2), t3.getImmunities(self, t3)*100) + tformat(t1.moveSpeed(self, t1), t1.castSpeed(self, t1), t2.getSeeStealth(self, t2), t2.getSeeInvisible(self, t2), t2.critPower(self, t2), t3.getImmunities(self, t3)*100) end) self.talents[self.T_HYMN_OF_SHADOWS] = old1 self.talents[self.T_HYMN_OF_DETECTION] = old2 @@ -417,7 +417,7 @@ newTalent{ getDarkDamageIncrease = function(self, t) return self:combatTalentSpellDamage(t, 10, 30) end, info = function(self, t) return ([[Your Hymns now focus darkness near you, which increases your darkness damage by %d%% and does %0.2f darkness damage to anyone who hits you in melee. - These values scale with your Spellpower.]]):format(t.getDarkDamageIncrease(self, t), damDesc(self, DamageType.DARKNESS, t.getDamageOnMeleeHit(self, t))) + These values scale with your Spellpower.]]):tformat(t.getDarkDamageIncrease(self, t), damDesc(self, DamageType.DARKNESS, t.getDamageOnMeleeHit(self, t))) end, } @@ -439,7 +439,7 @@ newTalent{ Also, when you end a Hymn, you will gain a buff of a type based on which Hymn you ended. Hymn of Shadows increases your movement speed by %d%% for one turn. Hymn of Detection makes you invisible (power %d) for %d turns. - Hymn of Perseverance grants a damage shield (power %d) for %d turns.]]):format(t.getBonusInfravision(self, t), t.getSpeed(self, t), + Hymn of Perseverance grants a damage shield (power %d) for %d turns.]]):tformat(t.getBonusInfravision(self, t), t.getSpeed(self, t), t.invisPower(self, t), t.invisDur(self, t), t.shieldPower(self, t), t.shieldDur(self, t) * (100 + (self:attr("shield_factor") or 0)) / 100) end, } @@ -524,6 +524,6 @@ newTalent{ return ([[Your passion for singing the praises of the Moons reaches its zenith. Your Hymns now fire shadowy beams that will hit up to %d of your foes within radius 5 for 1 to %0.2f damage, with a 20%% chance of blinding. This powerful effect will drain %0.1f negative energy each time it fires at at least 1 target; no beam will fire if your negative energy is too low. - These values scale with your Spellpower.]]):format(t.getTargetCount(self, t), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t)), t.getNegativeDrain(self, t)) + These values scale with your Spellpower.]]):tformat(t.getTargetCount(self, t), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t)), t.getNegativeDrain(self, t)) end, } diff --git a/game/modules/tome/data/talents/celestial/light.lua b/game/modules/tome/data/talents/celestial/light.lua index 0d383adc433e02168dca766a25c893d69cebada4..a365f546f87633bf590fc0368c3f371b6488d17c 100644 --- a/game/modules/tome/data/talents/celestial/light.lua +++ b/game/modules/tome/data/talents/celestial/light.lua @@ -43,7 +43,7 @@ newTalent{ local heal = t.getHeal(self, t) return ([[An invigorating ray of Sunlight shines upon you, healing your body for %d life. The amount healed will increase with your Spellpower.]]): - format(heal) + tformat(heal) end, } @@ -88,7 +88,7 @@ newTalent{ If the same shield is refreshed 20 times it will become unstable and explode, removing it. It also lights up the affected area. The amount healed will increase with the Magic stat]]): - format(radius, heal, heal_fact*100, duration) + tformat(radius, heal, heal_fact*100, duration) end, } @@ -111,7 +111,7 @@ newTalent{ local absorb = t.getAbsorb(self, t) * (100 + (self:attr("shield_factor") or 0)) / 100 return ([[A protective shield forms around you that lasts for up to 10 turns and negates %d damage. The total damage the barrier can absorb will increase with your Spellpower and can crit.]]): - format(absorb) + tformat(absorb) end, } @@ -133,7 +133,7 @@ newTalent{ info = function(self, t) local duration = t.getDuration(self, t) return ([[Places you under the protection of a ray of sunlight. For %d turns, the light removes a single negative effect from you every turn.]]): - format(duration) + tformat(duration) end, } diff --git a/game/modules/tome/data/talents/celestial/other.lua b/game/modules/tome/data/talents/celestial/other.lua index 48f14cb86d29c60fb858d35d70ae223bf2e5599e..4d0f7175474f2fdc5251b19e39f1fe7eac7b12ad 100644 --- a/game/modules/tome/data/talents/celestial/other.lua +++ b/game/modules/tome/data/talents/celestial/other.lua @@ -55,13 +55,13 @@ newTalent{ local spot = i == 1 and {x=x, y=y} or rng.tableRemove(grids) if not spot then break end local trap = Trap.new{ - name = "glyph of explosion", - type = "elemental", id_by_type=true, unided_name = "trap", + name = _t"glyph of explosion", + type = "elemental", id_by_type=true, unided_name = _t"trap", display = '^', color=colors.GOLD, image = "trap/trap_glyph_explosion_02_64.png", faction = self.faction, dam = dam, desc = function(self) - return ([[Explodes (radius 1) for %d light damage.]]):format(engine.interface.ActorTalents.damDesc(self, engine.DamageType.LIGHT, self.dam)) + return ([[Explodes (radius 1) for %d light damage.]]):tformat(engine.interface.ActorTalents.damDesc(self, engine.DamageType.LIGHT, self.dam)) end, canTrigger = function(self, x, y, who) if who:reactionToward(self.summoner) < 0 then return mod.class.Trap.canTrigger(self, x, y, who) end @@ -103,7 +103,7 @@ newTalent{ end, info = function(self, t) return ([[test glyph]]): - format() + tformat() end, } @@ -131,12 +131,12 @@ newTalent{ local dam = self:spellCrit(t.getDazeDuration(self, t)) local trap = Trap.new{ - name = "glyph of paralysis", - type = "elemental", id_by_type=true, unided_name = "trap", + name = _t"glyph of paralysis", + type = "elemental", id_by_type=true, unided_name = _t"trap", display = '^', color=colors.GOLD, image = "trap/trap_glyph_paralysis_01_64.png", faction = self.faction, desc = function(self) - return ([[Dazes for %d turns.]]):format(self.dam) + return ([[Dazes for %d turns.]]):tformat(self.dam) end, dam = dam, canTrigger = function(self, x, y, who) @@ -177,7 +177,7 @@ newTalent{ local dazeduration = t.getDazeDuration(self, t) local duration = t.getDuration(self, t) return ([[You bind light in a glyph on the floor. All enemies walking over the glyph will be dazed for %d turns. - The glyph is a hidden trap (%d detection and %d disarm power based on your Magic) and lasts for %d turns.]]):format(dazeduration, t.trapPower(self,t)*0.8, t.trapPower(self,t), duration) + The glyph is a hidden trap (%d detection and %d disarm power based on your Magic) and lasts for %d turns.]]):tformat(dazeduration, t.trapPower(self,t)*0.8, t.trapPower(self,t), duration) end, } @@ -205,13 +205,13 @@ newTalent{ local dam = self:spellCrit(t.getDamage(self, t)) local sp = self:combatSpellpower() local trap = Trap.new{ - name = "glyph of repulsion", - type = "elemental", id_by_type=true, unided_name = "trap", + name = _t"glyph of repulsion", + type = "elemental", id_by_type=true, unided_name = _t"trap", display = '^', color=colors.GOLD, image = "trap/trap_glyph_repulsion_01_64.png", faction = self.faction, dam = dam, desc = function(self) - return ([[Deals %d physical damage, knocking the target back.]]):format(engine.interface.ActorTalents.damDesc(self, engine.DamageType.PHYSICAL, self.dam)) + return ([[Deals %d physical damage, knocking the target back.]]):tformat(engine.interface.ActorTalents.damDesc(self, engine.DamageType.PHYSICAL, self.dam)) end, canTrigger = function(self, x, y, who) if who:reactionToward(self.summoner) < 0 then return mod.class.Trap.canTrigger(self, x, y, who) end @@ -258,7 +258,7 @@ newTalent{ return ([[You bind light in a glyph on the floor. All enemies walking over the glyph will be hit by a blast that does %0.2f physical damage and knocks them back. The glyph is a hidden trap (%d detection and %d disarm power based on your Magic) and lasts for %d turns. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.PHYSICAL, damage), t.trapPower(self, t)*0.8, t.trapPower(self, t), duration) + tformat(damDesc(self, DamageType.PHYSICAL, damage), t.trapPower(self, t)*0.8, t.trapPower(self, t), duration) end, } --[=[ @@ -295,14 +295,14 @@ newTalent{ if not spot then break end local trap = Trap.new{ - name = "glyph of explosion", - type = "elemental", id_by_type=true, unided_name = "trap", + name = _t"glyph of explosion", + type = "elemental", id_by_type=true, unided_name = _t"trap", display = '^', color=colors.GOLD, image = "trap/trap_glyph_explosion_02_64.png", faction = self.faction, dam = dam, desc = function(self) return ([[Explodes (radius 1) for %d light damage.]] ---[[ ):format(engine.interface.ActorTalents.damDesc(self, engine.DamageType.LIGHT, self.dam)) +--[[ ):tformat(engine.interface.ActorTalents.damDesc(self, engine.DamageType.LIGHT, self.dam)) end, canTrigger = function(self, x, y, who) if who:reactionToward(self.summoner) < 0 then return mod.class.Trap.canTrigger(self, x, y, who) end @@ -346,7 +346,7 @@ newTalent{ The glyph is a hidden trap (%d detection and %d disarm power based on your Magic) and lasts for %d turns. The damage will increase with your Spellpower.]] --[[ ): - format(damDesc(self, DamageType.LIGHT, damage), t.trapPower(self, t)*0.8, t.trapPower(self, t)*0.8, duration) + tformat(damDesc(self, DamageType.LIGHT, damage), t.trapPower(self, t)*0.8, t.trapPower(self, t)*0.8, duration) end, } ]=] @@ -374,13 +374,13 @@ newTalent{ local dam = t.getSlow(self, t) local trap = Trap.new{ - name = "glyph of fatigue", - type = "elemental", id_by_type=true, unided_name = "trap", + name = _t"glyph of fatigue", + type = "elemental", id_by_type=true, unided_name = _t"trap", display = '^', color=colors.GOLD, image = "trap/trap_glyph_fatigue_01_64.png", faction = self.faction, dam = dam, desc = function(self) - return ([[Slows (%d%%) for 5 turns.]]):format(self.dam*100) + return ([[Slows (%d%%) for 5 turns.]]):tformat(self.dam*100) end, canTrigger = function(self, x, y, who) if who:reactionToward(self.summoner) < 0 then return mod.class.Trap.canTrigger(self, x, y, who) end @@ -419,7 +419,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[You bind light in a glyph on the floor. All enemies walking over the glyph will be slowed by %d%% for 5 turns. The glyph is a hidden trap (%d detection and %d disarm power based on your Magic) and lasts for %d turns.]]): - format(100 * slow, t.trapPower(self, t), t.trapPower(self, t), duration) + tformat(100 * slow, t.trapPower(self, t), t.trapPower(self, t), duration) end, } diff --git a/game/modules/tome/data/talents/celestial/radiance.lua b/game/modules/tome/data/talents/celestial/radiance.lua index 5a194bf00993e179b4c2f1c67776ac42a69826f7..7c10a8c7aaf63cfaeacf677becb2049c9864f946 100644 --- a/game/modules/tome/data/talents/celestial/radiance.lua +++ b/game/modules/tome/data/talents/celestial/radiance.lua @@ -38,7 +38,7 @@ newTalent{ Your vision adapts to this glow, giving you %d%% blindness resistance. The light radius overrides your normal light if it is bigger (it does not stack). ]]): - format(radianceRadius(self), t.getResist(self, t)) + tformat(radianceRadius(self), t.getResist(self, t)) end, } @@ -75,7 +75,7 @@ newTalent{ All enemies in your Radiance aura have their invisibility and stealth power reduced by %d. In addition, all actors affected by illumination are easier to see and therefore hit; their defense is reduced by %d and all evasion bonuses from being unseen are negated. The effects increase with your Spellpower.]]): - format(t.getPower(self, t), t.getDef(self, t)) + tformat(t.getPower(self, t), t.getDef(self, t)) end, } @@ -111,7 +111,7 @@ newTalent{ return ([[Your Radiance is so powerful it burns all foes caught in it, doing %0.1f light damage to all non-dazed foes caught inside. Each enemy effected has a %d%% chance of being dazed for 5 turns. The damage increases with your Spellpower.]]): - format(damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), t.getDaze(self, t)) + tformat(damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), t.getDaze(self, t)) end, } @@ -140,7 +140,7 @@ newTalent{ local proj = require("mod.class.Projectile"):makeHoming( self, {particle="bolt_light", trail="lighttrail"}, - {speed=1, name="Judgement", dam=dam, movedam=movedam}, + {speed=1, name=_t"Judgement", dam=dam, movedam=movedam}, target, self:getTalentRange(t), function(self, src) @@ -161,7 +161,7 @@ newTalent{ end, info = function(self, t) return ([[Fire a glowing orb of light at each enemy within your Radiance. Each orb will slowly follow its target until it connects dealing %d light damage to anything else it contacts along the way. When the target is reached the orb will explode dealing %d light damage in radius 1 and healing you for 50%% of the damage dealt.]]): - format(t.getMoveDamage(self, t), t.getExplosionDamage(self, t)) + tformat(t.getMoveDamage(self, t), t.getExplosionDamage(self, t)) end, } diff --git a/game/modules/tome/data/talents/celestial/star-fury.lua b/game/modules/tome/data/talents/celestial/star-fury.lua index 9e1e919e50b484d7366b419a38df9f68fa5faf61..bd5c8f3cda578127651b9a0e23f18afae464c940 100644 --- a/game/modules/tome/data/talents/celestial/star-fury.lua +++ b/game/modules/tome/data/talents/celestial/star-fury.lua @@ -48,7 +48,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Focuses the power of the Moon into a beam of shadows, doing %0.2f damage. The damage dealt will increase with your Spellpower.]]): - format(damDesc(self, DamageType.DARKNESS, damage)) + tformat(damDesc(self, DamageType.DARKNESS, damage)) end, } @@ -97,7 +97,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Invokes a blast of shadows that deals %0.2f darkness damage, and leaves a radius 3 field that does %0.2f darkness damage per turn for %d turns. The damage dealt will increase with your Spellpower.]]): - format(damDesc(self, DamageType.DARKNESS, damage),damDesc(self, DamageType.DARKNESS, damage/2),duration) + tformat(damDesc(self, DamageType.DARKNESS, damage),damDesc(self, DamageType.DARKNESS, damage/2),duration) end, } @@ -133,7 +133,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[A surge of twilight pulses from you, doing %0.2f light and %0.2f darkness damage to all others within radius %d. The damage dealt will increase with your Spellpower.]]): - format(damDesc(self, DamageType.LIGHT, dam),damDesc(self, DamageType.DARKNESS, dam), radius) + tformat(damDesc(self, DamageType.LIGHT, dam),damDesc(self, DamageType.DARKNESS, dam), radius) end, } @@ -175,6 +175,6 @@ newTalent{ local damage = t.getDamage(self, t) return ([[A star falls on a radius %d area, doing %0.2f darkness damage on impact and stunning all within the area for 4 turns. The damage dealt will increase with your Spellpower.]]): - format(radius, damDesc(self, DamageType.DARKNESS, damage)) + tformat(radius, damDesc(self, DamageType.DARKNESS, damage)) end, } diff --git a/game/modules/tome/data/talents/celestial/sun.lua b/game/modules/tome/data/talents/celestial/sun.lua index 799e40b5117df977ca33a2fe0a346551a0005763..c71ae9bf3efc431d9d924c6e5566a7335de67fa0 100644 --- a/game/modules/tome/data/talents/celestial/sun.lua +++ b/game/modules/tome/data/talents/celestial/sun.lua @@ -83,7 +83,7 @@ newTalent{ return ([[Calls forth a ray of light from the Sun, doing %0.1f Light damage to the target. At level 3 the ray will be so intense it will also blind the target and everyone in a radius 2 around it for %d turns. The damage dealt will increase with your Spellpower.]]): - format(damDesc(self, DamageType.LIGHT, damage), t.getDuration(self, t)) + tformat(damDesc(self, DamageType.LIGHT, damage), t.getDuration(self, t)) end, } @@ -124,7 +124,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[A path of sunlight appears in front of you for 5 turns. All foes standing inside take %0.1f Light damage per turn. While standing in the path, your movement takes no time and can not trigger traps. - The damage done will increase with your Spellpower.]]):format(damDesc(self, DamageType.LIGHT, damage / 5), radius) + The damage done will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.LIGHT, damage / 5), radius) end, } @@ -162,7 +162,7 @@ newTalent{ While affected by Sun's Vengeance, your Sun Ray will take no time to use and will deal 25%% more damage. If Sun Ray was on cooldown, the remaining turns are reduced by one instead. This effect can only happen once per turn.]]): - format(crit, chance) + tformat(crit, chance) end, } @@ -198,7 +198,7 @@ newTalent{ return ([[You wrap yourself in a cloak of sunlight that empowers your magic and protects you for 6 turns. While the cloak is active, your spell casting speed is increased by %d%%, your spell cooldowns are reduced by %d%%, and you cannot take more than %d%% of your maximum life from a single blow. The effects will increase with your Spellpower.]]): - format(t.getHaste(self, t)*100, t.getCD(self, t)*100, t.getCap(self, t)) + tformat(t.getHaste(self, t)*100, t.getCD(self, t)*100, t.getCap(self, t)) end, } diff --git a/game/modules/tome/data/talents/celestial/sunlight.lua b/game/modules/tome/data/talents/celestial/sunlight.lua index afbceb77112eb20ff42c6f133df3f377d36c2f10..e3952baa77fb2ac5daeb63d9fc03e3b1f40aed31 100644 --- a/game/modules/tome/data/talents/celestial/sunlight.lua +++ b/game/modules/tome/data/talents/celestial/sunlight.lua @@ -60,7 +60,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Calls the power of the Sun into a searing lance, doing %d damage to the target and leaving a radius 1 area of searing light on the ground for 4 turns that does %d light damage to all foes within it. The damage dealt will increase with your Spellpower.]]): - format(damDesc(self, DamageType.LIGHT, damage), damDesc(self, DamageType.LIGHT, damage/2)) + tformat(damDesc(self, DamageType.LIGHT, damage), damDesc(self, DamageType.LIGHT, damage/2)) end, } @@ -114,7 +114,7 @@ newTalent{ All enemies effected will take %0.2f light damage. At talent level 3 you gain %d%% light, darkness, and fire resistance for %d turns. The damage done and resistances will increase with your Spellpower.]]): - format(radius, duration, damDesc(self, DamageType.LIGHT, damage), res, resdur ) + tformat(radius, duration, damDesc(self, DamageType.LIGHT, damage), res, resdur ) end, } @@ -182,7 +182,7 @@ newTalent{ This spell will automatically cast again at the start of your next two turns. You will gain %0.2f positive energy each time firebeam or an instant damage proc caused by firebeam deals damage. The damage done will increase with your Spellpower.]]): - format(damDesc(self, DamageType.FIRE, damage), t.getPositive(self, t)) + tformat(damDesc(self, DamageType.FIRE, damage), t.getPositive(self, t)) end, } @@ -235,6 +235,6 @@ newTalent{ return true end, info = function(self, t) - return ([[Release a burst of sunlight beams at %d random foes in radius %d, dealing %d damage to all foes hit and increasing your bonus light damage by %d%% of your bonus darkness damage for %d turns.]]):format(t.getTargetCount(self, t), self:getTalentRadius(t), damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), t.getPower(self, t)*100, t.getDuration(self, t)) + return ([[Release a burst of sunlight beams at %d random foes in radius %d, dealing %d damage to all foes hit and increasing your bonus light damage by %d%% of your bonus darkness damage for %d turns.]]):tformat(t.getTargetCount(self, t), self:getTalentRadius(t), damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), t.getPower(self, t)*100, t.getDuration(self, t)) end, } diff --git a/game/modules/tome/data/talents/celestial/twilight.lua b/game/modules/tome/data/talents/celestial/twilight.lua index 0af3eed2eceddb9b12e1f06c1fdf650e5f36704b..143d377edc88d9585a007ba763f7152bd5905081 100644 --- a/game/modules/tome/data/talents/celestial/twilight.lua +++ b/game/modules/tome/data/talents/celestial/twilight.lua @@ -37,7 +37,7 @@ newTalent{ info = function(self, t) return ([[You stand between the darkness and the light, allowing you to convert 15 positive energy into %d negative energy. The negative energy gain will increase with your Cunning.]]): - format(t.getNegativeGain(self, t)) + tformat(t.getNegativeGain(self, t)) end, } @@ -71,7 +71,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Instantly travel to your jumpgate, as long as you are within %d tiles of it.]]):format(t.getRange(self, t)) + return ([[Instantly travel to your jumpgate, as long as you are within %d tiles of it.]]):tformat(t.getRange(self, t)) end, } @@ -122,7 +122,7 @@ newTalent{ if not oe or oe:attr("temporary") then return false end local e = mod.class.Object.new{ old_feat = oe, type = oe.type, subtype = oe.subtype, - name = "jumpgate", image = oe.image, add_mos = {{image = "terrain/wormhole.png"}}, + name = _t"jumpgate", image = oe.image, add_mos = {{image = "terrain/wormhole.png"}}, display = '&', color=colors.PURPLE, temporary = 1, -- This prevents overlapping of terrain changing effects; as this talent is a sustain it does nothing else } @@ -147,7 +147,7 @@ newTalent{ local range = jumpgate_teleport.getRange(self, jumpgate_teleport) return ([[Create a shadow jumpgate at your current location. As long as you sustain this spell, you can use 'Jumpgate: Teleport' to instantly travel to the jumpgate, as long as you are within %d tiles of it. Note that any stairs underneath the jumpgate will be unusable while the spell is sustained, and you may need to cancel this sustain in order to leave certain locations. - At talent level 4, you learn to create and sustain a second jumpgate.]]):format(range) + At talent level 4, you learn to create and sustain a second jumpgate.]]):tformat(range) end, } @@ -184,7 +184,7 @@ newTalent{ local duration = t.getConfuseDuration(self, t) return ([[Let out a mental cry that shatters the will of your targets within radius %d, dealing %0.2f darkness damage and confusing (%d%% to act randomly) them for %d turns. The damage will improve with your spellpower and the duration will improve with your Cunning.]]): - format(self:getTalentRadius(t), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t)), t.getConfuseEfficency(self,t), duration) + tformat(self:getTalentRadius(t), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t)), t.getConfuseEfficency(self,t), duration) end, } @@ -233,7 +233,7 @@ newTalent{ local m = target:cloneActor{ shader = "shadow_simulacrum", - name=target.name.."'s shadow simulacrum", + name=("%s's shadow simulacrum"):tformat(target:getName()), faction = self.faction, summoner = self, summoner_gain_exp=true, summon_time = t.getDuration(self, t), @@ -241,7 +241,7 @@ newTalent{ exp_worth=0, forceLevelup=function() end, ai_target = {actor=target}, ai = "summoned", ai_real = target.ai, - desc = [[A dark, shadowy shape whose form resembles the creature it was copied from. It is not a perfect replica, though, and it makes you feel uneasy to look at it.]], + desc = _t[[A dark, shadowy shape whose form resembles the creature it was copied from. It is not a perfect replica, though, and it makes you feel uneasy to look at it.]], } table.mergeAdd(m.resists, {[DamageType.DARKNESS]=50, [DamageType.LIGHT]=- 50}) table.mergeAdd(m.inc_damage, {all = -50}) @@ -262,7 +262,7 @@ newTalent{ return ([[Creates a shadowy copy of a hostile target. The copy will attack its progenitor immediately and lasts for %d turns. The duplicate has %d%% of the target's life, +50%% darkness resistance, -50%% light resistance, and deals 50%% less damage. The duration and life scale with your Cunning.]]): - format(duration, t.getPercent(self, t)) + tformat(duration, t.getPercent(self, t)) end, } @@ -307,7 +307,7 @@ newTalent{ if not oe or oe:attr("temporary") then return false end local e = mod.class.Object.new{ old_feat = oe, type = oe.type, subtype = oe.subtype, - name = "jumpgate", image = oe.image, add_mos = {{image = "terrain/wormhole.png"}}, + name = _t"jumpgate", image = oe.image, add_mos = {{image = "terrain/wormhole.png"}}, display = '&', color=colors.PURPLE, temporary = 1, -- This prevents overlapping of terrain changing effects; as this talent is a sustain it does nothing else } @@ -330,7 +330,7 @@ newTalent{ info = function(self, t) local jumpgate_teleport = self:getTalentFromId(self.T_JUMPGATE_TELEPORT_TWO) local range = jumpgate_teleport.getRange(self, jumpgate_teleport) - return ([[Create a second shadow jumpgate at your location. As long as you sustain this spell, you can use 'Jumpgate: Teleport' to instantly travel to the jumpgate, as long as you are within %d tiles of it.]]):format(range) + return ([[Create a second shadow jumpgate at your location. As long as you sustain this spell, you can use 'Jumpgate: Teleport' to instantly travel to the jumpgate, as long as you are within %d tiles of it.]]):tformat(range) end, } @@ -364,6 +364,6 @@ newTalent{ return true end, info = function(self, t) - return ([[Instantly travel to your second jumpgate, as long as you are within %d tiles of it.]]):format(t.getRange(self, t)) + return ([[Instantly travel to your second jumpgate, as long as you are within %d tiles of it.]]):tformat(t.getRange(self, t)) end, } diff --git a/game/modules/tome/data/talents/chronomancy/age-manipulation.lua b/game/modules/tome/data/talents/chronomancy/age-manipulation.lua index 9c44c3ec9bff7745a3c6d94149fc4a095b85c976..a160e2b6cf822cfd9c0120cf59c479bf0fde35a2 100644 --- a/game/modules/tome/data/talents/chronomancy/age-manipulation.lua +++ b/game/modules/tome/data/talents/chronomancy/age-manipulation.lua @@ -45,7 +45,7 @@ newTalent{ local damage = t.getDamage(self, t) local damagestat = t.getDamageStat(self, t) return ([[Projects a bolt of temporal energy that deals %0.2f temporal damage, and reduces the targets three highest stats by %d for 3 turns. - The damage dealt will scale with your Spellpower.]]):format(damDesc(self, DamageType.TEMPORAL, damage), damagestat) + The damage dealt will scale with your Spellpower.]]):tformat(damDesc(self, DamageType.TEMPORAL, damage), damagestat) end, } @@ -83,7 +83,7 @@ newTalent{ local duration = t.getConfuseDuration(self, t) local radius = self:getTalentRadius(t) return ([[Reverts the minds of all creatures in a radius %d cone to an infantile state, in effect confusing them (%d%% to act randomly) for %d turns.]]): - format(radius, t.getConfuseEfficency(self, t), duration) + tformat(radius, t.getConfuseEfficency(self, t), duration) end, } @@ -127,7 +127,7 @@ newTalent{ local duration = t.getDuration(self, t) local radius = self:getTalentRadius(t) return ([[You surround yourself with a radius %d distortion of time, which deals %0.2f stacking temporal damage over 3 turns to all other creatures. The effect lasts %d turns. - The damage dealt will scale with your Spellpower.]]):format(radius, damDesc(self, DamageType.TEMPORAL, damage), duration) + The damage dealt will scale with your Spellpower.]]):tformat(radius, damDesc(self, DamageType.TEMPORAL, damage), duration) end, } @@ -187,6 +187,6 @@ newTalent{ local count = t.getRemoveCount(self, t) return ([[You revert your body to a previous state, healing yourself for %0.2f life and removing %d physical status effects (both good and bad). The amount of life healed will scale with your Spellpower.]]): - format(heal, count) + tformat(heal, count) end, } diff --git a/game/modules/tome/data/talents/chronomancy/anomalies.lua b/game/modules/tome/data/talents/chronomancy/anomalies.lua index 82fbe92754919f55892256f8f2dc866195f87d86..95fa7880e23cafb68552b9e8ca371e70a3557ad1 100644 --- a/game/modules/tome/data/talents/chronomancy/anomalies.lua +++ b/game/modules/tome/data/talents/chronomancy/anomalies.lua @@ -121,7 +121,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ causes a spacetime hiccup.", + message = _t"@Source@ causes a spacetime hiccup.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -152,7 +152,7 @@ newTalent{ end, info = function(self, t) local radius = self:getTalentRadius(t) - return ([[Teleports up to five targets in a radius of %d up to ten tiles away.]]):format(radius) + return ([[Teleports up to five targets in a radius of %d up to ten tiles away.]]):tformat(radius) end, } @@ -172,7 +172,7 @@ newTalent{ target = function(self, t) return {type="ball", range=10, radius=self:getTalentRadius(t)} end, - message = "@Source@ shifts reality.", + message = _t"@Source@ shifts reality.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -203,7 +203,7 @@ newTalent{ info = function(self, t) local range = self:getTalentRange(t) local radius = self:getTalentRadius(t) - return ([[Teleports up to five targets in a radius of %d up to %d tiles away.]]):format(radius, range) + return ([[Teleports up to five targets in a radius of %d up to %d tiles away.]]):tformat(radius, range) end, } @@ -223,7 +223,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ swaps places with a nearby target.", + message = _t"@Source@ swaps places with a nearby target.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -264,7 +264,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[You swap locations with a random target.]]):format() + return ([[You swap locations with a random target.]]):tformat() end, } @@ -284,7 +284,7 @@ newTalent{ target = function(self, t) return {type="hit", range=self:getTalentRange(t), nowarning=true} end, - message = "@Source@ transfers damage to a nearby target.", + message = _t"@Source@ transfers damage to a nearby target.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -315,7 +315,7 @@ newTalent{ end, info = function(self, t) return ([[50%% chance that damage the caster takes will be warped to a set target. - Once the maximum damage (%d) is absorbed, the time runs out, or the target dies, the shield will crumble.]]):format(getAnomalyDamage(self, t)*2) + Once the maximum damage (%d) is absorbed, the time runs out, or the target dies, the shield will crumble.]]):tformat(getAnomalyDamage(self, t)*2) end, } @@ -334,7 +334,7 @@ newTalent{ target = function(self, t) return {type="bolt", nowarning=true, range=10, nolock=true, simple_dir_request=true, talent=t} end, - message = "@Source@ folds the space between two points.", + message = _t"@Source@ folds the space between two points.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -350,11 +350,11 @@ newTalent{ -- Adding the entrance wormhole local entrance = mod.class.Trap.new{ - name = "wormhole", - type = "annoy", subtype="teleport", id_by_type=true, unided_name = "trap", + name = _t"wormhole", + type = "annoy", subtype="teleport", id_by_type=true, unided_name = _t"trap", image = "terrain/wormhole.png", display = '&', color_r=255, color_g=255, color_b=255, back_color=colors.STEEL_BLUE, - message = "@Target@ moves onto the wormhole.", + message = _t"@Target@ moves onto the wormhole.", temporary = getAnomalyDuration(self, t), x = start_x, y = start_y, canAct = false, @@ -365,13 +365,13 @@ newTalent{ if who == self.summoned or who:canBe("teleport") then game.level.map:particleEmitter(who.x, who.y, 1, "temporal_teleport") if not who:teleportRandom(self.dest.x, self.dest.y, 3, 1) then - game.logSeen(who, "%s tries to enter the wormhole but a violent force pushes it back.", who.name:capitalize()) + game.logSeen(who, "%s tries to enter the wormhole but a violent force pushes it back.", who:getName():capitalize()) elseif who ~= self.summoned_by then who:setEffect(who.EFF_CONTINUUM_DESTABILIZATION, 100, {power=self.dest_power}) game.level.map:particleEmitter(who.x, who.y, 1, "temporal_teleport") end else - game.logSeen(who, "%s ignores the wormhole.", who.name:capitalize()) + game.logSeen(who, "%s ignores the wormhole.", who:getName():capitalize()) end return true end, @@ -413,7 +413,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Creates a wormhole nearby and a second wormhole up to ten tiles away.]]):format() + return ([[Creates a wormhole nearby and a second wormhole up to ten tiles away.]]):tformat() end, } @@ -433,7 +433,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), nowarning=true} end, - message = "@Source@ places several targets out of phase.", + message = _t"@Source@ places several targets out of phase.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -462,7 +462,7 @@ newTalent{ end, info = function(self, t) return ([[Allows up to five targets in a radius of %d to travel up to %d tiles through walls.]]): - format(getAnomalyDuration(self, t)*2, getAnomalyDuration(self, t)) + tformat(getAnomalyDuration(self, t)*2, getAnomalyDuration(self, t)) end, } @@ -482,7 +482,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ makes several targets blink uncontrollably.", + message = _t"@Source@ makes several targets blink uncontrollably.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -511,7 +511,7 @@ newTalent{ end, info = function(self, t) return ([[Up to five targets in a radius of %d are teleporting %d tiles every turn.]]): - format(self:getTalentRadius(t), getAnomalyDuration(self, t)) + tformat(self:getTalentRadius(t), getAnomalyDuration(self, t)) end, } @@ -532,7 +532,7 @@ newTalent{ return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, getSummonTime = function(self, t) return math.ceil(getAnomalyDuration(self, t)*2) end, - message = "Some innocent bystanders have been teleported into the fight.", + message = _t"Some innocent bystanders have been teleported into the fight.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -583,30 +583,30 @@ newTalent{ m.level = 1 if race == 1 then - m.name = "human farmer" + m.name = _t"human farmer" m.subtype = "human" m.image = "npc/humanoid_human_human_farmer.png" - m.desc = [[A weather-worn Human farmer, looking at a loss as to what's going on.]] + m.desc=_t[[A weather-worn Human farmer, looking at a loss as to what's going on.]] m.faction = "allied-kingdoms" m[#m+1] = resolvers.inscriptions(1, "infusion") elseif race == 2 then - m.name = "halfling gardener" + m.name = _t"halfling gardener" m.subtype = "halfling" - m.desc = [[A rugged Halfling gardener, looking quite confused as to what he's doing here.]] + m.desc=_t[[A rugged Halfling gardener, looking quite confused as to what he's doing here.]] m.faction = "allied-kingdoms" m.image = "npc/humanoid_halfling_halfling_gardener.png" m[#m+1] = resolvers.inscriptions(1, "infusion") elseif race == 3 then - m.name = "shalore scribe" + m.name = _t"shalore scribe" m.subtype = "shalore" - m.desc = [[A scrawny Elven scribe, looking bewildered at his surroundings.]] + m.desc=_t[[A scrawny Elven scribe, looking bewildered at his surroundings.]] m.faction = "shalore" m.image = "npc/humanoid_shalore_shalore_rune_master.png" m[#m+1] = resolvers.inscriptions(1, "rune") elseif race == 4 then - m.name = "dwarven lumberjack" + m.name = _t"dwarven lumberjack" m.subtype = "dwarf" - m.desc = [[A brawny Dwarven lumberjack, looking a bit upset at his current situation.]] + m.desc=_t[[A brawny Dwarven lumberjack, looking a bit upset at his current situation.]] m.faction = "iron-throne" m.image = "npc/humanoid_dwarf_lumberjack.png" m[#m+1] = resolvers.inscriptions(1, "rune") @@ -625,7 +625,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Pulls innocent people into the fight.]]) + return ([[Pulls innocent people into the fight.]]):tformat() end, } @@ -647,7 +647,7 @@ newTalent{ return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, getSlow = function(self, t) return 1 - 1 / (1 + (getAnomalyEffectPower(self, t)) / 100) end, - message = "@Source@ creates a bubble of slow time.", + message = _t"@Source@ creates a bubble of slow time.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -676,7 +676,7 @@ newTalent{ end, info = function(self, t) return ([[Slows up to five targets in a radius %d ball by %d%%.]]): - format(self:getTalentRadius(t), t.getSlow(self, t)*100) + tformat(self:getTalentRadius(t), t.getSlow(self, t)*100) end, } @@ -697,7 +697,7 @@ newTalent{ return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), nowarning=true} end, getHaste = function(self, t) return 1 - 1 / (1 + (getAnomalyEffectPower(self, t)) / 100) end, - message = "@Source@ creates a bubble of fast time.", + message = _t"@Source@ creates a bubble of fast time.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -725,7 +725,7 @@ newTalent{ end, info = function(self, t) return ([[Increases global speed of up to five targets in a radius %d ball by %d%%.]]): - format(self:getTalentRadius(t), t.getHaste(self, t)*100) + tformat(self:getTalentRadius(t), t.getHaste(self, t)*100) end, } @@ -745,7 +745,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ creates a bubble of nul time.", + message = _t"@Source@ creates a bubble of nul time.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -775,7 +775,7 @@ newTalent{ end, info = function(self, t) return ([[Stuns up to five targets in a radius %d ball.]]): - format(self:getTalentRadius(t)) + tformat(self:getTalentRadius(t)) end, } @@ -795,7 +795,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ removes several targets from time.", + message = _t"@Source@ removes several targets from time.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -825,7 +825,7 @@ newTalent{ end, info = function(self, t) return ([[Time Prisons up to five targets in a radius %d ball.]]): - format(self:getTalentRadius(t)) + tformat(self:getTalentRadius(t)) end, } @@ -845,7 +845,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), nowarning=true} end, - message = "@Source@ creates a temporal shield around several targets.", + message = _t"@Source@ creates a temporal shield around several targets.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -873,7 +873,7 @@ newTalent{ end, info = function(self, t) return ([[Time Shields up to five targets in a radius of %d.]]): - format(self:getTalentRadius(t)) + tformat(self:getTalentRadius(t)) end, } @@ -893,7 +893,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), nowarning=true} end, - message = "@Source@ energizes several targets.", + message = _t"@Source@ energizes several targets.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -921,7 +921,7 @@ newTalent{ end, info = function(self, t) return ([[Invigorates up to five targets in a radius of %d.]]): - format(self:getTalentRadius(t)) + tformat(self:getTalentRadius(t)) end, } @@ -941,7 +941,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), nowarning=true} end, - message = "@Source@ clones a nearby creature.", + message = _t"@Source@ clones a nearby creature.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -973,7 +973,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Clones a random creature within range.]]):format() + return ([[Clones a random creature within range.]]):tformat() end, } @@ -993,7 +993,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ creates a temporal storm.", + message = _t"@Source@ creates a temporal storm.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -1020,7 +1020,7 @@ newTalent{ local duration = self:combatScale(getParadoxSpellpower(self, t), 4, 10, 12, 100, 0.75)/2 local damage = self:combatScale(getParadoxSpellpower(self, t), 10, 10, 50, 100, 0.75) return ([[Creates a temporal storm for %d to %d turns that deals between %0.2f and %0.2f temporal damage each turn.]]) - :format(duration/2, duration, damDesc(self, DamageType.TEMPORAL, damage/3), damDesc(self, DamageType.TEMPORAL, damage)) + :tformat(duration/2, duration, damDesc(self, DamageType.TEMPORAL, damage/3), damDesc(self, DamageType.TEMPORAL, damage)) end, } @@ -1041,7 +1041,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ increases local gravity.", + message = _t"@Source@ increases local gravity.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -1058,7 +1058,7 @@ newTalent{ if tx and ty and target:canBe("knockback") and target:canBe("anomaly") then target:move(tx, ty, true) - game.logSeen(target, "%s is drawn in by gravity!", target.name:capitalize()) + game.logSeen(target, "%s is drawn in by gravity!", target:getName():capitalize()) end end) @@ -1071,7 +1071,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Increases localized gravity, pulling in targets in a radius of %d.]]):format(self:getTalentRadius(t)) + return ([[Increases localized gravity, pulling in targets in a radius of %d.]]):tformat(self:getTalentRadius(t)) end, } @@ -1091,7 +1091,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ turns matter to dust.", + message = _t"@Source@ turns matter to dust.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -1109,7 +1109,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Digs out all terrain in a radius %d ball.]]):format(self:getTalentRadius(t)) + return ([[Digs out all terrain in a radius %d ball.]]):tformat(self:getTalentRadius(t)) end, } @@ -1129,7 +1129,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), nowarning=true} end, - message = "@Source@ creates a stone wall.", + message = _t"@Source@ creates a stone wall.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -1147,9 +1147,9 @@ newTalent{ local e = Object.new{ old_feat = oe, - name = "stone wall", image = "terrain/granite_wall1.png", + name = _t"stone wall", image = "terrain/granite_wall1.png", display = '#', color_r=255, color_g=255, color_b=255, back_color=colors.GREY, - desc = "a summoned wall of stone", + desc = _t"a summoned wall of stone", type = "wall", --subtype = "floor", always_remember = true, can_pass = {pass_wall=1}, @@ -1191,7 +1191,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Entombs a single target in a wall of stone.]]):format() + return ([[Entombs a single target in a wall of stone.]]):tformat() end, } @@ -1211,7 +1211,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ increases local entropy.", + message = _t"@Source@ increases local entropy.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -1243,7 +1243,7 @@ newTalent{ local t = rng.tableRemove(tids) if not t then break end target.talents_cd[t.id] = rng.range(2, power) - game.logSeen(target, "%s's %s is disrupted!", target.name:capitalize(), t.name) + game.logSeen(target, "%s's %s is disrupted!", target:getName():capitalize(), t.name) end target.changed = true end, nil) @@ -1256,7 +1256,7 @@ newTalent{ end, info = function(self, t) return ([[Places between three and six talents of up to 5 targets in a radius %d ball on cooldown for up to %d turns.]]): - format(getAnomalyRadius(self, t), getAnomalyDuration(self, t)) + tformat(getAnomalyRadius(self, t), getAnomalyDuration(self, t)) end, } @@ -1276,7 +1276,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ increases local gravity.", + message = _t"@Source@ increases local gravity.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -1306,7 +1306,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Creates a gravity well in a radius %d ball, pinning up to five targets.]]):format(self:getTalentRadius(t)) + return ([[Creates a gravity well in a radius %d ball, pinning up to five targets.]]):tformat(self:getTalentRadius(t)) end, } @@ -1326,7 +1326,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ causes an earthquake.", + message = _t"@Source@ causes an earthquake.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -1348,7 +1348,7 @@ newTalent{ end, info = function(self, t) return ([[Causes an earthquake in a radius of %d.]]): - format(getAnomalyRadius(self, t)) + tformat(getAnomalyRadius(self, t)) end, } @@ -1368,7 +1368,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ crumbles the resistances of several targets.", + message = _t"@Source@ crumbles the resistances of several targets.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -1395,7 +1395,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Reduces the resistances of up to five targets in a ball of radius %d by %d%%.]]):format(self:getTalentRadius(t), getAnomalyEffectPower(self, t)) + return ([[Reduces the resistances of up to five targets in a ball of radius %d by %d%%.]]):tformat(self:getTalentRadius(t), getAnomalyEffectPower(self, t)) end, } @@ -1415,7 +1415,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ causes a dust storm.", + message = _t"@Source@ causes a dust storm.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -1438,7 +1438,7 @@ newTalent{ local proj = require("mod.class.Projectile"):makeHoming( self, {particle="bolt_earth", trail="lightningtrail"}, - {speed=2, name="Dust Storm", start_x=orig_x, start_y=orig_y, dam=dam, movedam=dam}, + {speed=2, name=_t"Dust Storm", start_x=orig_x, start_y=orig_y, dam=dam, movedam=dam}, target, self:getTalentRange(t), function(self, src) @@ -1462,7 +1462,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Summons three to six dust storms.]]):format() + return ([[Summons three to six dust storms.]]):tformat() end, } @@ -1484,7 +1484,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ causes a fire.", + message = _t"@Source@ causes a fire.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local tgts = getAnomalyTargets(self, t, self.x, self.y, "ACTOR", self:getTalentRange(t)) @@ -1502,7 +1502,7 @@ newTalent{ local proj = require("mod.class.Projectile"):makeHoming( self, {particle="inferno"}, - {speed=1, name="Blazing Fire", start_x=orig_x, start_y=orig_y, dam=movedam, movedam=movedam}, + {speed=1, name=_t"Blazing Fire", start_x=orig_x, start_y=orig_y, dam=movedam, movedam=movedam}, target, self:getTalentRange(t), function(self, src) @@ -1524,7 +1524,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Summons three to six blazing fires.]]):format() + return ([[Summons three to six blazing fires.]]):tformat() end, } @@ -1544,7 +1544,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ calcifies several targets.", + message = _t"@Source@ calcifies several targets.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) @@ -1569,7 +1569,7 @@ newTalent{ end, info = function(self, t) return ([[Turns up to 5 targets in a radius %d ball to stone for %d turns.]]): - format(getAnomalyRadius(self, t), getAnomalyDuration(self, t)) + tformat(getAnomalyRadius(self, t), getAnomalyDuration(self, t)) end, } @@ -1589,7 +1589,7 @@ newTalent{ target = function(self, t) return {type="hit", range=self:getTalentRange(t), talent=t} end, - message = "@Source@ teleports several targets to @Source@'s location.", + message = _t"@Source@ teleports several targets to @Source@'s location.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local tgts = getAnomalyTargets(self, t, self.x, self.y, "ACTOR", self:getTalentRange(t), true) @@ -1614,7 +1614,7 @@ newTalent{ end, info = function(self, t) return ([[Teleports between 3 and 6 targets to the caster.]]): - format() + tformat() end, } @@ -1635,7 +1635,7 @@ newTalent{ return {type="hit", range=self:getTalentRange(t), talent=t} end, getHaste = function(self, t) return 1 - 1 / (1 + (getAnomalyEffectPower(self, t)) / 100) end, - message = "The odds have tilted.", + message = _t"The odds have tilted.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local tgts = getAnomalyTargets(self, t, self.x, self.y, "ACTOR", self:getTalentRange(t)) @@ -1657,7 +1657,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Substantially toughens and hastes one target for %d turns.]]):format(getAnomalyDuration(self, t)) + return ([[Substantially toughens and hastes one target for %d turns.]]):tformat(getAnomalyDuration(self, t)) end, } @@ -1677,7 +1677,7 @@ newTalent{ target = function(self, t) return {type="hit", range=self:getTalentRange(t), talent=t} end, - message = "@Source@'s evil twin has come from another timeline.", + message = _t"@Source@'s evil twin has come from another timeline.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) @@ -1700,7 +1700,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Clones the caster.]]):format(getAnomalyDuration(self, t)) + return ([[Clones the caster.]]):tformat(getAnomalyDuration(self, t)) end, } @@ -1720,7 +1720,7 @@ newTalent{ target = function(self, t) return {type="hit", range=self:getTalentRange(t), talent=t} end, - message = "@Source@ has caused two threads to merge.", + message = _t"@Source@ has caused two threads to merge.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local tgts = getAnomalyTargets(self, t, self.x, self.y, "ACTOR", self:getTalentRange(t)) @@ -1749,7 +1749,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Clones all creatures in a radius of 10.]]):format(getAnomalyDuration(self, t)) + return ([[Clones all creatures in a radius of 10.]]):tformat(getAnomalyDuration(self, t)) end, } @@ -1769,7 +1769,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ digs out a huge area.", + message = _t"@Source@ digs out a huge area.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) for i = 1, rng.avg(3, 6, 3) do @@ -1785,7 +1785,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Digs out all terrain in between three and six radius %d balls.]]):format(self:getTalentRadius(t)) + return ([[Digs out all terrain in between three and six radius %d balls.]]):tformat(self:getTalentRadius(t)) end, } @@ -1805,7 +1805,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ creates a sphere of destruction.", + message = _t"@Source@ creates a sphere of destruction.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local tgts = getAnomalyTargets(self, t, self.x, self.y, "ACTOR", self:getTalentRange(t)) @@ -1822,7 +1822,7 @@ newTalent{ local proj = require("mod.class.Projectile"):makeHoming( self, {particle = "bolt_dark", trail = "darktrail"}, - {speed=1, name="Sphere of Destruction", start_x=orig_x, start_y=orig_y, dam=movedam, movedam=movedam}, + {speed=1, name=_t"Sphere of Destruction", start_x=orig_x, start_y=orig_y, dam=movedam, movedam=movedam}, target, self:getTalentRange(t), function(self, src) @@ -1845,7 +1845,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Summons a sphere of destruction.]]):format() + return ([[Summons a sphere of destruction.]]):tformat() end, } @@ -1865,7 +1865,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ causes a tornado storm.", + message = _t"@Source@ causes a tornado storm.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local tgts = getAnomalyTargets(self, t, self.x, self.y, "ACTOR", self:getTalentRange(t)) @@ -1885,7 +1885,7 @@ newTalent{ local proj = require("mod.class.Projectile"):makeHoming( self, {particle="bolt_lightning", trail="lightningtrail"}, - {speed=2, name="Tornado", dam=dam, movedam=movedam, start_x=orig_x, start_y=orig_y, apply=apply_power}, + {speed=2, name=_t"Tornado", dam=dam, movedam=movedam, start_x=orig_x, start_y=orig_y, apply=apply_power}, target, self:getTalentRange(t), function(self, src) @@ -1899,7 +1899,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 4, {apply_power=self.def.apply}) else - game.logSeen(target, "%s resists the tornado!", target.name:capitalize()) + game.logSeen(target, "%s resists the tornado!", target:getName():capitalize()) end -- Lightning ball gets a special treatment to make it look neat @@ -1924,7 +1924,7 @@ newTalent{ t.doAction(self, t, true) end, info = function(self, t) - return ([[Summons three to six tornados.]]):format() + return ([[Summons three to six tornados.]]):tformat() end, } @@ -1944,7 +1944,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ causes a meteor to fall from the sky.", + message = _t"@Source@ causes a meteor to fall from the sky.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local x, y = getAnomalyPosition(self, self:getTalentRange(t)) @@ -2002,7 +2002,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 3, {apply_power=getParadoxSpellpower(src, t)}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end end end) @@ -2021,7 +2021,7 @@ newTalent{ end, info = function(self, t) return ([[Causes a meteor to fall from the sky.]]): - format() + tformat() end, } @@ -2041,7 +2041,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "@Source@ tears a hole in the fabric of spacetime.", + message = _t"@Source@ tears a hole in the fabric of spacetime.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local tx, ty = getAnomalyPosition(self, self:getTalentRange(t)) @@ -2049,8 +2049,8 @@ newTalent{ -- Make a trap so the player can shut it local npcs = mod.class.NPC:loadList{"/data/general/npcs/horror_temporal.lua"} local trap = Trap.new{ - name = "Spacetime Tear", - type = "time", id_by_type=true, unided_name = "trap", + name = _t"Spacetime Tear", + type = "time", id_by_type=true, unided_name = _t"trap", display = '^', color=colors.GOLD, image = "object/temporal_instability.png", npc_type = npcs, canTrigger = function(self, x, y, who) @@ -2061,7 +2061,7 @@ newTalent{ if who == self.summoned_by then if game.level.map(self.x, self.y, engine.Map.TRAP) == self then game.level.map:remove(self.x, self.y, engine.Map.TRAP) end game.level:removeEntity(self) - game.logPlayer(who, "%s forces the tear shut!", who.name:capitalize()) + game.logPlayer(who, "%s forces the tear shut!", who:getName():capitalize()) end return true end, @@ -2105,7 +2105,7 @@ newTalent{ end, info = function(self, t) return ([[Tears a hole in the fabric of spacetime.]]): - format() + tformat() end, } @@ -2125,7 +2125,7 @@ newTalent{ target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t)} end, - message = "Some Time Elementals have been attracted by @Source@'s meddling.", + message = _t"Some Time Elementals have been attracted by @Source@'s meddling.", doAction = function(self, t, cancellable) local tg = self:getTalentTarget(t) local tgts = getAnomalyTargets(self, t, self.x, self.y, "ACTOR", self:getTalentRadius(t)) @@ -2157,7 +2157,7 @@ newTalent{ end, info = function(self, t) return ([[Time elementals have been attracted to the timeline.]]): - format() + tformat() end, } diff --git a/game/modules/tome/data/talents/chronomancy/blade-threading.lua b/game/modules/tome/data/talents/chronomancy/blade-threading.lua index 17e46b66f4425b59b02918741c171e65b7c548d9..c32706521fab86f00a177d52ee50f81add7b9c58 100644 --- a/game/modules/tome/data/talents/chronomancy/blade-threading.lua +++ b/game/modules/tome/data/talents/chronomancy/blade-threading.lua @@ -63,7 +63,7 @@ newTalent{ return ([[Attack with your melee weapons for %d%% weapon damage as physical and temporal (warp) damage. If either attack hits you may stun, blind, pin, or confuse the target for %d turns. Blade Threading talents will freely swap to your dual-weapons when activated if you have them in your secondary slots. Additionally you may use the Attack talent in a similar manner.]]) - :format(damage, duration) + :tformat(damage, duration) end } @@ -168,7 +168,7 @@ newTalent{ local damage = t.getDamage(self, t) * 100 return ([[Teleport to the target and attack with your melee weapons for %d%% damage. Then teleport next to a second random enemy, attacking for %d%% damage. Blink Blade can hit the same target multiple times.]]) - :format(damage, damage) + :tformat(damage, damage) end } @@ -238,10 +238,10 @@ newTalent{ if target and self:reactionToward(target) < 0 then if target:checkHit(getParadoxSpellpower(self, t), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("instakill") and target.life > 0 and target.life < target.max_life * 0.2 then -- KILL IT ! - game.logSeen(target, "%s has been cut from the timeline!", target.name:capitalize()) + game.logSeen(target, "%s has been cut from the timeline!", target:getName():capitalize()) target:die(self) elseif target.life > 0 and target.life < target.max_life * 0.2 then - game.logSeen(target, "%s resists the temporal shear!", target.name:capitalize()) + game.logSeen(target, "%s resists the temporal shear!", target:getName():capitalize()) end end end) @@ -258,7 +258,7 @@ newTalent{ return ([[Attack up to three adjacent targets for %d%% weapon damage. If any attack hits you'll create a temporal shear dealing %0.2f temporal damage in a radius %d cone. Each target you hit with your weapons beyond the first increases the damage of the shear by 25%%. Targets reduced below 20%% of maximum life by the shear may be instantly slain. The cone damage improves with your Spellpower.]]) - :format(damage, damDesc(self, DamageType.TEMPORAL, shear), radius) + :tformat(damage, damDesc(self, DamageType.TEMPORAL, shear), radius) end } @@ -272,7 +272,7 @@ newTalent{ info = function(self, t) local chance = t.getChance(self, t) return ([[While dual-wielding you have a %d%% chance of completely parrying melee attacks made against you.]]) - :format(chance) + :tformat(chance) end } @@ -341,6 +341,6 @@ newTalent{ If two or more targets are hit by the beam you'll braid their lifelines for %d turns. Braided targets take %d%% of all damage dealt to other braided targets. The damage transferred by the braid effect and beam damage scales with your Spellpower.]]) - :format(damage, duration, power) + :tformat(damage, duration, power) end }]=] diff --git a/game/modules/tome/data/talents/chronomancy/bow-threading.lua b/game/modules/tome/data/talents/chronomancy/bow-threading.lua index c6dd316b0cf0151a0d6f77cfae41ae3c5cc63eab..ccfe170b9572e35653764373b6e354e92f33fc61 100644 --- a/game/modules/tome/data/talents/chronomancy/bow-threading.lua +++ b/game/modules/tome/data/talents/chronomancy/bow-threading.lua @@ -121,7 +121,7 @@ newTalent{ The wardens are out of phase with normal reality and deal %d%% less damage but shoot through friendly targets. All your arrows, including arrows from Shoot and other talents, now phase through friendly targets without causing them harm. Bow Threading talents will freely swap to your bow when activated if you have one in your secondary slot. You may use the Shoot talent in a similar manner.]]) - :format(damage, penalty) + :tformat(damage, penalty) end } @@ -165,13 +165,13 @@ newTalent{ if target:checkHit(getParadoxSpellpower(self, t), target:combatPhysicalResist(), 0, 95) and target:canBe("knockback") then -- Deprecated Checkhit call return true else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end if can(target) then target:pull(x, y, tg.radius, can) tgts[#tgts+1] = target - game.logSeen(target, "%s is drawn in by the singularity!", target.name:capitalize()) + game.logSeen(target, "%s is drawn in by the singularity!", target:getName():capitalize()) target:crossTierEffect(target.EFF_OFFBALANCE, getParadoxSpellpower(self, t)) end end @@ -219,7 +219,7 @@ newTalent{ Each target moved beyond the first increases the damage %0.2f (up to %0.2f bonus damage). Targets take reduced damage the further they are from the epicenter (20%% less per tile). The additional damage scales with your Spellpower.]]) - :format(damage, radius, damDesc(self, DamageType.PHYSICAL, aoe), damDesc(self, DamageType.PHYSICAL, aoe/8), damDesc(self, DamageType.PHYSICAL, aoe/2)) + :tformat(damage, radius, damDesc(self, DamageType.PHYSICAL, aoe), damDesc(self, DamageType.PHYSICAL, aoe/8), damDesc(self, DamageType.PHYSICAL, aoe/2)) end } @@ -277,7 +277,7 @@ newTalent{ local damage = t.getDamage(self, t) * 100 return ([[Over the next %d turns you'll fire up to %d arrows at this target from this location, each dealing %d%% weapon damage to the target. These shots do not consume ammo.]]) - :format(duration, duration, damage) + :tformat(duration, duration, damage) end } @@ -296,7 +296,7 @@ newTalent{ info = function(self, t) local tune = t.getTuning(self, t) return ([[Your arrows now tune your Paradox %0.2f points towards your preferred Paradox on hit.]]) - :format(tune) + :tformat(tune) end } \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/chronomancer.lua b/game/modules/tome/data/talents/chronomancy/chronomancer.lua index 0a2b90e8d4b4a364bf1a038227c773a14a75ad0d..0253674638ac958171514c8d0c16780d00307a6d 100644 --- a/game/modules/tome/data/talents/chronomancy/chronomancer.lua +++ b/game/modules/tome/data/talents/chronomancy/chronomancer.lua @@ -18,39 +18,39 @@ -- darkgod@te4.org -- Class Trees -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/blade-threading", name = "Blade Threading", description = "A blend of chronomancy and dual-weapon combat." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/bow-threading", name = "Bow Threading", description = "A blend of chronomancy and ranged combat." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/temporal-combat", name = "Temporal Combat", description = "A blend of chronomancy and physical combat." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/guardian", name = "Temporal Guardian", description = "Warden combat training and techniques." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/threaded-combat", name = "Threaded Combat", min_lev = 10, description = "A blend of ranged and dual-weapon combat." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/temporal-hounds", name = "Temporal Hounds", min_lev = 10, description = "Call temporal hounds to aid you in combat." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/blade-threading", name = _t"Blade Threading", description = _t"A blend of chronomancy and dual-weapon combat." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/bow-threading", name = _t"Bow Threading", description = _t"A blend of chronomancy and ranged combat." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/temporal-combat", name = _t"Temporal Combat", description = _t"A blend of chronomancy and physical combat." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/guardian", name = _t"Temporal Guardian", description = _t"Warden combat training and techniques." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/threaded-combat", name = _t"Threaded Combat", min_lev = 10, description = _t"A blend of ranged and dual-weapon combat." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/temporal-hounds", name = _t"Temporal Hounds", min_lev = 10, description = _t"Call temporal hounds to aid you in combat." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/flux", name = "flux", description = "Fluctuate spacetime." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/gravity", name = "gravity", description = "Call upon the force of gravity to crush, push, and pull your foes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/matter", name = "matter", description = "Change and shape matter itself." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/spacetime-folding", name = "Spacetime Folding", description = "Mastery of folding points in space." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/speed-control", name = "Speed Control", description = "Control how fast objects and creatures move through spacetime." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/stasis", name = "stasis", description = "Stabilize spacetime." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/timeline-threading", name = "Timeline Threading", min_lev = 10, description = "Examine and alter the timelines that make up the spacetime continuum." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/timetravel", name = "timetravel", description = "Directly manipulate the flow of time" } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/spellbinding", name = "Spellbinding", min_lev = 10, description = "Manipulate chronomantic spells." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/flux", name = _t"flux", description = _t"Fluctuate spacetime." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/gravity", name = _t"gravity", description = _t"Call upon the force of gravity to crush, push, and pull your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/matter", name = _t"matter", description = _t"Change and shape matter itself." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/spacetime-folding", name = _t"Spacetime Folding", description = _t"Mastery of folding points in space." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/speed-control", name = _t"Speed Control", description = _t"Control how fast objects and creatures move through spacetime." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/stasis", name = _t"stasis", description = _t"Stabilize spacetime." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/timeline-threading", name = _t"Timeline Threading", min_lev = 10, description = _t"Examine and alter the timelines that make up the spacetime continuum." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/timetravel", name = _t"timetravel", description = _t"Directly manipulate the flow of time" } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/spellbinding", name = _t"Spellbinding", min_lev = 10, description = _t"Manipulate chronomantic spells." } -- Generic Chronomancy -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/chronomancy", name = "Chronomancy", generic = true, description = "Allows you to glimpse the future, or become more aware of the present." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/energy", name = "energy", generic = true, description = "Manipulate raw energy by addition or subtraction." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/fate-weaving", name = "Fate Weaving", generic = true, description = "Weave the threads of fate." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/spacetime-weaving", name = "Spacetime Weaving", generic = true, description = "Weave the threads of spacetime." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/chronomancy", name = _t"Chronomancy", generic = true, description = _t"Allows you to glimpse the future, or become more aware of the present." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/energy", name = _t"energy", generic = true, description = _t"Manipulate raw energy by addition or subtraction." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/fate-weaving", name = _t"Fate Weaving", generic = true, description = _t"Weave the threads of fate." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/spacetime-weaving", name = _t"Spacetime Weaving", generic = true, description = _t"Weave the threads of spacetime." } -- Misc and Outdated Trees -newTalentType{ no_silence=true, is_spell=true, type="chronomancy/manifold", name = "Manifold", generic = true, description = "Passive effects that Weapon Folding can trigger." } -newTalentType{ no_silence=true, is_spell=true, type="chronomancy/other", name = "Other", generic = true, description = "Miscellaneous Chronomancy effects." } +newTalentType{ no_silence=true, is_spell=true, type="chronomancy/manifold", name = _t"Manifold", generic = true, description = _t"Passive effects that Weapon Folding can trigger." } +newTalentType{ no_silence=true, is_spell=true, type="chronomancy/other", name = _t"Other", generic = true, description = _t"Miscellaneous Chronomancy effects." } -newTalentType{ no_silence=true, is_spell=true, type="chronomancy/age-manipulation", name = "Age Manipulation", description = "Manipulate the age of creatures you encounter." } -newTalentType{ no_silence=true, is_spell=true, type="chronomancy/temporal-archery", name = "Temporal Archery", description = "A blend of chronomancy and ranged combat." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/paradox", name = "paradox", description = "Break the laws of spacetime." } +newTalentType{ no_silence=true, is_spell=true, type="chronomancy/age-manipulation", name = _t"Age Manipulation", description = _t"Manipulate the age of creatures you encounter." } +newTalentType{ no_silence=true, is_spell=true, type="chronomancy/temporal-archery", name = _t"Temporal Archery", description = _t"A blend of chronomancy and ranged combat." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="chronomancy/paradox", name = _t"paradox", description = _t"Break the laws of spacetime." } -- Anomalies are not learnable but can occur instead of an intended spell when paradox gets to high. -newTalentType{ no_silence=true, is_spell=true, type="chronomancy/anomalies", name = "anomalies", description = "Spacetime anomalies that can randomly occur when paradox is to high." } +newTalentType{ no_silence=true, is_spell=true, type="chronomancy/anomalies", name = _t"anomalies", description = _t"Spacetime anomalies that can randomly occur when paradox is to high." } -- Generic requires for chronomancy spells based on talent level chrono_req1 = { @@ -254,8 +254,8 @@ makeParadoxClone = function(self, target, duration, alt_nodes) end -- force some values in the clone - local clone_copy = {name=""..target.name.."'s temporal clone", - desc = [[A creature from another timeline.]], + local clone_copy = {name=("%s's temporal clone"):tformat(target:getName()), + desc=_t[[A creature from another timeline.]], faction=target.faction, exp_worth=0, life=util.bound(target.life, target.die_at, target.max_life), summoner=target, summoner_gain_exp=true, summon_time=duration, diff --git a/game/modules/tome/data/talents/chronomancy/chronomancy.lua b/game/modules/tome/data/talents/chronomancy/chronomancy.lua index 4d76dc3f8a6e0c5cc00be1d2983afb2727a2bf2e..79f4fa789e65213f4b13d53404553ce40d6c87b7 100644 --- a/game/modules/tome/data/talents/chronomancy/chronomancy.lua +++ b/game/modules/tome/data/talents/chronomancy/chronomancy.lua @@ -46,7 +46,7 @@ newTalent{ local range = self:getTalentRange(t) local duration = t.getDuration(self, t) return ([[You peer into the future, sensing creatures and traps in a radius of %d for %d turns. - If you know Foresight you'll gain additional defense and chance to shrug off critical hits (equal to your Foresight bonuses) while Precognition is active.]]):format(range, duration) + If you know Foresight you'll gain additional defense and chance to shrug off critical hits (equal to your Foresight bonuses) while Precognition is active.]]):tformat(range, duration) end, } @@ -73,7 +73,7 @@ newTalent{ return ([[Gain %d defense and %d%% chance to shrug off critical hits. If you have Precognition or See the Threads active these bonuses will be added to those effects, granting additional defense and chance to shrug off critical hits. These bonuses scale with your Magic stat.]]): - format(defense, crits) + tformat(defense, crits) end, } @@ -151,13 +151,13 @@ newTalent{ info = function(self, t) local trigger = t.getTrigger(self, t) * 100 local cooldown = self:getTalentCooldown(t) - local talent = self:isTalentActive(t.id) and self:getTalentFromId(self:isTalentActive(t.id).talent).name or "None" + local talent = self:isTalentActive(t.id) and self:getTalentFromId(self:isTalentActive(t.id).talent).name or _t"None" return ([[Choose an activatable spell that affects only you, does not require a target, and does not have a fixed cooldown. When you take damage that reduces your life below %d%% the spell will automatically cast. This spell will cast even if it is currently on cooldown, will not consume a turn or resources, and uses the talent level of Contingency or its own, whichever is lower. This effect can only occur once every %d turns and takes place after the damage is resolved. Current Contingency Spell: %s]]): - format(trigger, cooldown, talent) + tformat(trigger, cooldown, talent) end, } @@ -208,6 +208,6 @@ newTalent{ This spell splits the timeline. Attempting to use another spell that also splits the timeline while this effect is active will be unsuccessful. If you die in any thread you'll revert the timeline to the point when you first cast the spell and the effect will end. This spell may only be used once per zone level.]]) - :format(duration) + :tformat(duration) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/energy.lua b/game/modules/tome/data/talents/chronomancy/energy.lua index 6c0fee717962963fbe985371f8580beeaacafe3e..8dbdc28756d8fa9799e73c3290508bc5304eb8d9 100644 --- a/game/modules/tome/data/talents/chronomancy/energy.lua +++ b/game/modules/tome/data/talents/chronomancy/energy.lua @@ -36,7 +36,7 @@ newTalent{ -- works like armor with 30% hardiness dam = math.max(dam * 0.3 - decomp, 0) + (dam * 0.7) print("[PROJECTOR] after static reduction dam", dam) - game:delayedLogDamage(src or self, self, 0, ("%s(%d dissipated)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam - dam), false) + game:delayedLogDamage(src or self, self, 0, ("%s(%d dissipated)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", lastdam - dam), false) return {dam=dam} end, activate = function(self, t) @@ -54,7 +54,7 @@ newTalent{ info = function(self, t) local decomp = t.getDecomposition(self, t) return ([[Partially dissipates all incoming damage, reducing it by 30%%, up to a maximum of %d. - The maximum damage reduction will scale with your Spellpower.]]):format(decomp) + The maximum damage reduction will scale with your Spellpower.]]):tformat(decomp) end, } @@ -86,7 +86,7 @@ newTalent{ if not target then return end if not self:checkHit(getParadoxSpellpower(self, t), target:combatSpellResist()) then - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) return true end @@ -103,7 +103,7 @@ newTalent{ local t = rng.tableRemove(tids) if not t then break end target.talents_cd[t.id] = cdr - game.logSeen(target, "%s's %s is disrupted by the Energy Absorption!", target.name:capitalize(), t.name) + game.logSeen(target, "%s's %s is disrupted by the Energy Absorption!", target:getName():capitalize(), t.name) count = count + 1 end @@ -134,7 +134,7 @@ newTalent{ local cooldown = t.getCooldown(self, t) return ([[You sap the target's energy and add it to your own, placing up to %d random talents on cooldown for %d turns. For each talent put on cooldown, you reduce the cooldown of one of your talents currently on cooldown by %d turns.]]): - format(talentcount, cooldown, cooldown) + tformat(talentcount, cooldown, cooldown) end, } @@ -160,7 +160,7 @@ newTalent{ local cooldown = t.getMaxCooldown(self, t) return ([[The next talent you cast with a cooldown of %d or less will not go on cooldown. Once a talent is effected by this spell or %d turns pass the effect is lost.]]): - format(cooldown, duration) + tformat(cooldown, duration) end, } @@ -194,6 +194,6 @@ newTalent{ end, info = function(self, t) local duration = t.getDuration(self, t) - return ([[Each turn, for the next %d turns, one of the target's sustained talents will be deactivated.]]):format(duration) + return ([[Each turn, for the next %d turns, one of the target's sustained talents will be deactivated.]]):tformat(duration) end, } diff --git a/game/modules/tome/data/talents/chronomancy/fate-weaving.lua b/game/modules/tome/data/talents/chronomancy/fate-weaving.lua index f448552295fc1dffab547f83d2085cc4454f234b..084fa788e2d2d48f45bd627d40f0b8d3adc3e4ef 100644 --- a/game/modules/tome/data/talents/chronomancy/fate-weaving.lua +++ b/game/modules/tome/data/talents/chronomancy/fate-weaving.lua @@ -49,7 +49,7 @@ newTalent{ local save = t.getSaveBonus(self, t) return ([[Each time you would take damage from someone else you gain one Spin, increasing your defense and saves by %d for three turns. This effect may occur once per turn and stacks up to three Spin (for a maximum bonus of %d).]]): - format(save, save * 3) + tformat(save, save * 3) end, } @@ -75,7 +75,7 @@ newTalent{ local chance = t.getChance(self, t) return ([[Activate to Seal Fate for %d turns. When you damage a target while Seal Fate is active you gain Spin and have a %d%% chance to increase the duration of one detrimental status effect on it by one turn. If you have Spin Fate active the chance will be increased by 33%% per Spin (for %d%% at three Spin.) - The duration increase can occur up to %d times per turn and the bonus Spin once per turn.]]):format(duration, chance, chance * 2, procs) + The duration increase can occur up to %d times per turn and the bonus Spin once per turn.]]):tformat(duration, chance, chance * 2, procs) end, } @@ -95,7 +95,7 @@ newTalent{ info = function(self, t) local power = t.getPowerBonus(self, t) return ([[You now gain %d combat accuracy, physical power, spellpower, and mindpower per Spin.]]): - format(power) + tformat(power) end, } @@ -121,6 +121,6 @@ newTalent{ local duration = t.getDuration(self, t) return ([[For the next %d turns you displace %d%% of any damage you receive onto a random enemy. While Webs of Fate is active you may gain one additional Spin per turn and your maximum Spin is doubled.]]) - :format(duration, power) + :tformat(duration, power) end, } diff --git a/game/modules/tome/data/talents/chronomancy/flux.lua b/game/modules/tome/data/talents/chronomancy/flux.lua index af5941f60d4a72b6bbe3469c65eebb9abd8d721a..57fe88f90144d02814af8b972731e684253e132c 100644 --- a/game/modules/tome/data/talents/chronomancy/flux.lua +++ b/game/modules/tome/data/talents/chronomancy/flux.lua @@ -39,7 +39,7 @@ newTalent{ local reduction = t.getReduction(self, t) return ([[Create an anomaly, reducing your Paradox by %d. This spell will never produce a major anomaly. Induced Anomalies may not be held by Twist Fate, nor do they cause held anomalies to trigger. However upon learning Twist Fate you may target Induced Anomalies. - The Paradox reduction will increase with your Spellpower.]]):format(reduction) + The Paradox reduction will increase with your Spellpower.]]):tformat(reduction) end, } @@ -74,7 +74,7 @@ newTalent{ self:setEffect(self.EFF_REALITY_SMEARING, t.getDuration(self, t), {paradox=paradox/t.getDuration(self, t)}) game:delayedLogMessage(self, nil, "reality smearing", "#LIGHT_BLUE##Source# converts damage to paradox!") - game:delayedLogDamage(src, self, 0, ("#LIGHT_BLUE#(%d converted)#LAST#"):format(absorb), false) + game:delayedLogDamage(src, self, 0, ("#LIGHT_BLUE#(%d converted)#LAST#"):tformat(absorb), false) cb.value = cb.value - absorb return cb.value @@ -93,7 +93,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[While active 30%% of all damage you take is converted into %0.2f Paradox per point. The Paradox is gained over three turns.]]): - format(ratio, duration) + tformat(ratio, duration) end, } @@ -142,7 +142,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Deals %0.2f temporal damage over %d turns to all targets in a radius of %d. Targets with Reality Smearing active will instead recover %d life over four turns. If a target is reduced below 20%% life while Attenuate is active it may be instantly slain. - The damage will scale with your Spellpower.]]):format(damDesc(self, DamageType.TEMPORAL, damage), duration, radius, damage *0.4) + The damage will scale with your Spellpower.]]):tformat(damDesc(self, DamageType.TEMPORAL, damage), duration, radius, damage *0.4) end, } @@ -205,6 +205,6 @@ newTalent{ Current Anomaly: %s %s]]): - format(duration, t_name, t_info) + tformat(duration, t_name, t_info) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/gravity.lua b/game/modules/tome/data/talents/chronomancy/gravity.lua index 5e3a68e37488d7752d41d3de56fb033ab101be0d..b49f079364d030870fdcc8c9ac80e6ea67fb618e 100644 --- a/game/modules/tome/data/talents/chronomancy/gravity.lua +++ b/game/modules/tome/data/talents/chronomancy/gravity.lua @@ -76,15 +76,15 @@ newTalent{ slam = true self:project({type="hit"}, target.x, target.y, DamageType.GRAVITY, bonus_dam) self:project({type="hit"}, x, y, DamageType.GRAVITY, bonus_dam) - game.logSeen(target, "%s slams into something solid!", target.name:capitalize()) + game.logSeen(target, "%s slams into something solid!", target:getName():capitalize()) end end) tgts[#tgts+1] = target - if not slam then game.logSeen(target, "%s is knocked back!", target.name:capitalize()) end + if not slam then game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) end target:crossTierEffect(target.EFF_OFFBALANCE, getParadoxSpellpower(self, t)) else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end @@ -100,7 +100,7 @@ newTalent{ return ([[Sends out a blast wave of gravity in a radius %d cone, dealing %0.2f base physical (gravity) damage and knocking back targets caught in the area. Targets knocked into walls or other targets take 25%% additional damage and deal 25%% damage to targets they're knocked into. Closer targets will be knocked back further and the damage will scale with your Spellpower.]]): - format(radius, damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) + tformat(radius, damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) end, } @@ -142,13 +142,13 @@ newTalent{ if target:checkHit(getParadoxSpellpower(self, t), target:combatPhysicalResist(), 0, 95) and target:canBe("knockback") then -- Deprecated Checkhit call return true else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end if can(target) then target:pull(x, y, tg.radius, can) tgts[#tgts+1] = target - game.logSeen(target, "%s is drawn in by the singularity!", target.name:capitalize()) + game.logSeen(target, "%s is drawn in by the singularity!", target:getName():capitalize()) target:crossTierEffect(target.EFF_OFFBALANCE, getParadoxSpellpower(self, t)) end end @@ -179,7 +179,7 @@ newTalent{ Each target moved beyond the first increases the damage by %0.2f (up to a maximum of %0.2f bonus damage). Targets take reduced damage the further they are from the epicenter (20%% less per tile). The damage dealt will scale with your Spellpower.]]) - :format(radius, damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.PHYSICAL, damage/8), damDesc(self, DamageType.PHYSICAL, damage/2)) + :tformat(radius, damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.PHYSICAL, damage/8), damDesc(self, DamageType.PHYSICAL, damage/2)) end, } @@ -217,7 +217,7 @@ newTalent{ local proj = t.getSlow(self, t) local anti = t.getAnti(self, t) return ([[Create a gravity field around you that converts %d%% all damage you deal into physical damage, slows incoming projectiles by %d%%, and protects you from all gravity damage and effects. - Additionally, damage dealt by Repulsion Blast has a %d%% chance to reduce the target's knockback resistance by half for two turns.]]):format(conv, proj, anti) + Additionally, damage dealt by Repulsion Blast has a %d%% chance to reduce the target's knockback resistance by half for two turns.]]):tformat(conv, proj, anti) end, } @@ -264,6 +264,6 @@ newTalent{ local radius = self:getTalentRadius(t) local slow = t.getSlow(self, t) return ([[Increases local gravity in a radius of %d for %d turns, dealing %0.2f physical (gravity) damage as well as decreasing the global speed of all affected targets by %d%%. - The damage done will scale with your Spellpower.]]):format(radius, duration, damDesc(self, DamageType.PHYSICAL, damage), slow*100) + The damage done will scale with your Spellpower.]]):tformat(radius, duration, damDesc(self, DamageType.PHYSICAL, damage), slow*100) end, } diff --git a/game/modules/tome/data/talents/chronomancy/guardian.lua b/game/modules/tome/data/talents/chronomancy/guardian.lua index 0515e06b87a5a6187525448c084c3fa09a78d3ab..850a8cc51aa6325291564170775695739847a4b2 100644 --- a/game/modules/tome/data/talents/chronomancy/guardian.lua +++ b/game/modules/tome/data/talents/chronomancy/guardian.lua @@ -33,7 +33,7 @@ newTalent{ return ([[Increases weapon damage by %d%% and physical power by 30 when using swords, axes, maces, knives, or bows. You now also use your Magic in place of Strength when equipping weapons and ammo as well as when calculating weapon damage. These bonuses override rather than stack with weapon mastery, dagger mastery, and bow mastery.]]): - format(100*inc) + tformat(100*inc) end, } @@ -54,7 +54,7 @@ newTalent{ -- If we already have a guardian, split the damage if self.unity_warden and game.level:hasEntity(self.unity_warden) then - game:delayedLogDamage(src, self.unity_warden, split, ("#STEEL_BLUE#(%d shared)#LAST#"):format(split), nil) + game:delayedLogDamage(src, self.unity_warden, split, ("#STEEL_BLUE#(%d shared)#LAST#"):tformat(split), nil) cb.value = cb.value - split self.unity_warden:takeHit(split, src) @@ -91,7 +91,7 @@ newTalent{ game.party:addMember(m, { control="order", type="temporal-clone", - title="Guardian", + title=_t"Guardian", orders = {target=true, leash=true, anchor=true, talents=true}, }) end @@ -102,7 +102,7 @@ newTalent{ m:takeHit(split, src) m:setTarget(src or nil) game:delayedLogMessage(self, nil, "guardian_damage", "#STEEL_BLUE##Source# shares damage with %s guardian!", string.his_her(self)) - game:delayedLogDamage(src or self, self, 0, ("#STEEL_BLUE#(%d shared)#LAST#"):format(split), nil) + game:delayedLogDamage(src or self, self, 0, ("#STEEL_BLUE#(%d shared)#LAST#"):tformat(split), nil) else game.logPlayer(self, "Not enough space to summon warden!") @@ -118,7 +118,7 @@ newTalent{ local cooldown = self:getTalentCooldown(t) return ([[When a single hit deals more than %d%% of your maximum life another you appears and takes %d%% of the damage as well as %d%% of all damage you take for the next %d turns. The clone is out of phase with this reality and deals 50%% less damage but its arrows will pass through friendly targets. - This talent has a cooldown.]]):format(trigger, split * 2, split, duration) + This talent has a cooldown.]]):tformat(trigger, split * 2, split, duration) end, } @@ -142,7 +142,7 @@ newTalent{ callbackOnActBase = function(self, t) if rng.percent(t.getPower(self, t)) then if self:removeEffectsFilter({status="detrimental", ignore_crosstier=true}, 1) > 0 then - game.logSeen(self, "#ORCHID#%s has recovered!#LAST#", self.name:capitalize()) + game.logSeen(self, "#ORCHID#%s has recovered!#LAST#", self:getName():capitalize()) end end end, @@ -151,7 +151,7 @@ newTalent{ local power = t.getPower(self, t) return ([[Improves your capacity to see invisible foes by +%d and to see through stealth by +%d. Additionally you have a %d%% chance to recover from a single negative status effect each turn. Sense abilities will scale with your Magic stat.]]): - format(sense, sense, power) + tformat(sense, sense, power) end, } @@ -206,6 +206,6 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Attack the target with either your ranged or melee weapons for %d%% weapon damage. For the next %d turns random targeting, such as from Blink Blade and Warden's Call, will focus on this target. Attacks against this target gain %d%% critical chance and critical strike power while you take %d%% less damage from all enemies whose rank is lower then that of your focus target.]]) - :format(damage, duration, power, power, power) + :tformat(damage, duration, power, power, power) end } \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/induced-phenomena.lua b/game/modules/tome/data/talents/chronomancy/induced-phenomena.lua index 24edd536340b84cd2c96ee8442fdb48c3363ac2c..0f436d2d81f6ab111b7974ff0479c85c2fcef566 100644 --- a/game/modules/tome/data/talents/chronomancy/induced-phenomena.lua +++ b/game/modules/tome/data/talents/chronomancy/induced-phenomena.lua @@ -143,7 +143,7 @@ newTalent{ local will = t.getWillMultiplier(self, t) * 100 return ([[Tune yourself into the ebb and flow of spacetime. When your Paradox crosses a 100 point threshold, your Cosmic Cycle gains or loses one radius. While Cosmic Cycle is expanding, your temporal resistance penetration will be increased by %d%%. While it's contracting, your Willpower for Paradox calculations will be increased by %d%%.]]): - format(paradox, will) + tformat(paradox, will) end, } @@ -179,7 +179,7 @@ newTalent{ local proj = require("mod.class.Projectile"):makeHoming( self, {particle="arrow", particle_args={tile=("particles_images/alt_temporal_bolt_0%d"):format(rng.range(1, 7)), proj_x=tx, proj_y=ty, src_x=self.x, src_y=self.y}, trail="trail_paradox"}, - {speed=1, name="Polarity Bolt", dam=dam, movedam=dam}, + {speed=1, name=_t"Polarity Bolt", dam=dam, movedam=dam}, target, self:getTalentRadius(t), function(self, src) @@ -224,7 +224,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Reverses the polarity of your Cosmic Cycle. If it's currently contracting, it will begin to expand, firing a homing missile at each target within the radius that deals %0.2f temporal damage. If it's currently expanding, it will begin to contract, braiding the lifelines of all targets within the radius for %d turns. Braided targets take %d%% of all damage dealt to other braided targets. - The damage will scale with your Spellpower.]]):format(damDesc(self, DamageType.TEMPORAL, damage), duration, braid) + The damage will scale with your Spellpower.]]):tformat(damDesc(self, DamageType.TEMPORAL, damage), duration, braid) end, } @@ -273,7 +273,7 @@ newTalent{ local reduction = t.getReduction(self, t) return ([[When a creature enters your expanding Cosmic Cycle, you heal %d life at the start of your next turn. When a creature leaves your contracting Cosmic Cycle, you reduce the duration of one detrimental effect on you by %d at the start of your next turn. - The healing will scale with your Spellpower.]]):format(heal, reduction) + The healing will scale with your Spellpower.]]):tformat(heal, reduction) end, } @@ -302,19 +302,19 @@ newTalent{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, 3, {apply_power=getParadoxSpellpower(self, t), no_ct_effect=true}) else - game.logSeen(target, "%s resists the blindness!", target.name:capitalize()) + game.logSeen(target, "%s resists the blindness!", target:getName():capitalize()) end elseif effect == 2 then if target:canBe("pin") then target:setEffect(target.EFF_PINNED, 3, {apply_power=getParadoxSpellpower(self, t), no_ct_effect=true}) else - game.logSeen(target, "%s resists the pin!", target.name:capitalize()) + game.logSeen(target, "%s resists the pin!", target:getName():capitalize()) end elseif effect == 3 then if target:canBe("confusion") then target:setEffect(target.EFF_CONFUSED, 3, {power=50, apply_power=getParadoxSpellpower(self, t), no_ct_effect=true}) else - game.logSeen(target, "%s resists the confusion!", target.name:capitalize()) + game.logSeen(target, "%s resists the confusion!", target:getName():capitalize()) end end end @@ -334,6 +334,6 @@ newTalent{ local aging = t.getAgingChance(self, t) return ([[While your cosmic cycle is expanding, creatures in its radius have a %d%% chance to suffer the effects of aging; pinning, blinding, or confusing them for 3 turns. While your cosmic cycle is contracting, creatures in its radius suffer from age regression; reducing their three highest stats by %d. - The chance and stat reduction will scale with your Spellpower.]]):format(aging, regress) + The chance and stat reduction will scale with your Spellpower.]]):tformat(aging, regress) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/matter.lua b/game/modules/tome/data/talents/chronomancy/matter.lua index 091972aebc67dc3f281d97541c69b7b7ba20e795..975bbda37e118cf9ac158eee21905b85f81eab67 100644 --- a/game/modules/tome/data/talents/chronomancy/matter.lua +++ b/game/modules/tome/data/talents/chronomancy/matter.lua @@ -107,7 +107,7 @@ newTalent{ return ([[Fires a beam that turns matter into dust, inflicting %0.2f temporal damage and %0.2f physical (warp) damage. Alternatively you may target yourself, creating a field of radius %d around you that will inflict the damage over three turns. The damage will scale with your Spellpower.]]): - format(damDesc(self, DamageType.TEMPORAL, damage / 2), damDesc(self, DamageType.PHYSICAL, damage / 2), radius) + tformat(damDesc(self, DamageType.TEMPORAL, damage / 2), damDesc(self, DamageType.PHYSICAL, damage / 2), radius) end, } @@ -150,7 +150,7 @@ newTalent{ local immune = t.getImmunity(self, t) * 100 return ([[Weave matter into your flesh, becoming incredibly resilient to damage. While active you gain %d armour, %d%% resistance to stunning, and %d%% resistance to cuts. The bonus to armour will scale with your Magic.]]): - format(armor, immune, immune) + tformat(armor, immune, immune) end, } @@ -189,11 +189,11 @@ newTalent{ if not oe or oe:attr("temporary") or game.level.map:checkAllEntities(px, py, "block_move") then return end local e = Object.new{ old_feat = oe, - name = "materialize barrier", image = "terrain/rocky_mountain.png", + name = _t"materialize barrier", image = "terrain/rocky_mountain.png", display = '#', color_r=255, color_g=255, color_b=255, back_color=colors.GREY, shader = "shadow_simulacrum", shader_args = { color = {0.6, 0.6, 0.2}, base = 0.9, time_factor = 1500 }, - desc = "a summoned wall of stone", + desc = _t"a summoned wall of stone", type = "wall", --subtype = "floor", always_remember = true, can_pass = {pass_wall=1}, @@ -255,7 +255,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Create a tightly bound matter wall of up to a length of %d that lasts %d turns. If any part of this wall is dug out it will explode, causing targets in a radius of %d to bleed for %0.2f physical damage over six turns.]]) - :format(length, duration, radius, damDesc(self, DamageType.PHYSICAL, damage)) + :tformat(length, duration, radius, damDesc(self, DamageType.PHYSICAL, damage)) end, } @@ -291,7 +291,7 @@ newTalent{ local eff = rng.tableRemove(effs) if eff[1] == "effect" then target:removeEffect(eff[2]) - game.logSeen(self, "#CRIMSON#%s's beneficial effect was stripped!#LAST#", target.name:capitalize()) + game.logSeen(self, "#CRIMSON#%s's beneficial effect was stripped!#LAST#", target:getName():capitalize()) if what == "physical" then p.physical[target] = true end if what == "magical" then p.magical[target] = true end @@ -333,6 +333,6 @@ newTalent{ return ([[While active your physical and temporal damage has a %d%% chance to remove one beneficial physical or magical temporary effect (respectively) from targets you hit. Only one physical and one magical effect may be removed per turn from each target. Additionally your Dust to Dust spell now digs up to %d tiles into walls.]]): - format(chance, digs) + tformat(chance, digs) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/other.lua b/game/modules/tome/data/talents/chronomancy/other.lua index bac28db29ac81b9c431ffc02b14eb71c79eb0782..b70d590807871de69dccb9999cbd12ae98c4e0c2 100644 --- a/game/modules/tome/data/talents/chronomancy/other.lua +++ b/game/modules/tome/data/talents/chronomancy/other.lua @@ -99,8 +99,8 @@ newTalent{ end local paradox = getQuantity( - "Spacetime Tuning", - "What's your preferred paradox level?", + _t"Spacetime Tuning", + _t"What's your preferred paradox level?", math.floor(self.paradox)) if not paradox then return end if paradox > 1000 then paradox = 1000 end @@ -127,7 +127,7 @@ newTalent{ Willpower Paradox Modifier : -%d Paradox Sustain Modifier : +%d Total Modifed Paradox : %d - Current Anomaly Chance : %d%%]]):format(tune, preference, sp_modifier, spellpower, will_modifier, sustain_modifier, after_will, anomaly) + Current Anomaly Chance : %d%%]]):tformat(tune, preference, sp_modifier, spellpower, will_modifier, sustain_modifier, after_will, anomaly) end, } @@ -174,7 +174,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Creates a time distortion in a radius of %d that lasts for %d turns, decreasing global speed by %d%% for 3 turns and inflicting %0.2f temporal damage each turn to all targets within the area. The slow effect and damage dealt will scale with your Spellpower.]]): - format(radius, duration, 100 * slow, damDesc(self, DamageType.TEMPORAL, damage)) + tformat(radius, duration, 100 * slow, damDesc(self, DamageType.TEMPORAL, damage)) end, } @@ -197,7 +197,7 @@ newTalent{ local cooldown = t.cdred(self, t, 10) local wormhole = t.cdred(self, t, 20) return ([[Your mastery of spacetime reduces the cooldown of Banish, Dimensional Step, Swap, and Temporal Wake by %d, and the cooldown of Wormhole by %d. Also improves your Spellpower for purposes of hitting targets with chronomancy effects that may cause continuum destabilization (Banish, Time Skip, etc.), as well as your chance of overcoming continuum destabilization, by %d%%.]]): - format(cooldown, wormhole, t.getPower(self, t)*100) + tformat(cooldown, wormhole, t.getPower(self, t)*100) end, } @@ -229,7 +229,7 @@ newTalent{ info = function(self, t) local power = t.getPower(self, t) return ([[You've learned to boost your magic through your control over the spacetime continuum. Increases your Magic and your Spell Save by %d. - The effect will scale with your Willpower.]]):format(power) + The effect will scale with your Willpower.]]):tformat(power) end } @@ -263,7 +263,7 @@ newTalent{ return ([[You pull your awareness fully into the moment, increasing your stealth detection, see invisibility, defense, and accuracy by %d for %d turns. If you have Spin Fate active when you cast this spell, you'll gain a bonus to these values equal to 50%% of your spin. This spell takes no time to cast.]]): - format(power, duration) + tformat(power, duration) end, } @@ -287,7 +287,7 @@ newTalent{ return ([[You begin to gather energy from other timelines. Your Spellpower will increase by %0.2f on the first turn and %0.2f more each additional turn. The effect ends either when you cast a spell, or after five turns. Eacn turn the effect is active, your Paradox will be reduced by %d. - This spell will not break Spacetime Tuning, nor will it be broken by activating Spacetime Tuning.]]):format(primary + (primary/5), primary/5, reduction) + This spell will not break Spacetime Tuning, nor will it be broken by activating Spacetime Tuning.]]):tformat(primary + (primary/5), primary/5, reduction) end, } @@ -317,7 +317,7 @@ newTalent{ info = function(self, t) local power = t.getPower(self, t) return ([[You encase yourself in a field that slows incoming projectiles by %d%%, and increases your physical resistance by %d%%. - The effect will scale with your Spellpower.]]):format(power, power / 2) + The effect will scale with your Spellpower.]]):tformat(power, power / 2) end, } @@ -343,7 +343,7 @@ newTalent{ This increases your resistance to all damage by %d%%, reduces the duration of all detrimental effects on you by %d%%, and reduces all damage you deal by 20%%. The resistance bonus, effect reduction, and damage penalty will gradually lose power over the duration of the spell. The effects scale with your Spellpower.]]): - format(resist, dur) + tformat(resist, dur) end, } @@ -378,8 +378,8 @@ newTalent{ local m = makeParadoxClone(self, self, t.getDuration(self, t)) -- Change some values - m.name = self.name.."'s Paradox Clone" - m.desc = ([[The real %s... or so %s says.]]):format(self.name, self:he_she()) + m.name = ("%s's Paradox Clone"):tformat(self:getName()) + m.desc = ([[The real %s... or so %s says.]]):tformat(self:getName(), self:he_she()) m.life = util.bound(m.life, m.die_at, m.max_life) m.forceLevelup = function() end m.summoner = self @@ -413,7 +413,7 @@ newTalent{ game.party:addMember(m, { control="no", type="minion", - title="Paradox Clone", + title=_t"Paradox Clone", orders = {target=true}, }) end @@ -424,7 +424,7 @@ newTalent{ info = function(self, t) local duration = t.getDuration(self, t) return ([[You summon your future self to fight alongside you for %d turns. At some point in the future, you'll be pulled into the past to fight alongside your past self after the initial effect ends. - This spell splits the timeline. Attempting to use another spell that also splits the timeline while this effect is active will be unsuccessful.]]):format(duration) + This spell splits the timeline. Attempting to use another spell that also splits the timeline while this effect is active will be unsuccessful.]]):tformat(duration) end, } @@ -473,7 +473,7 @@ newTalent{ info = function(self, t) local displace = t.getDisplaceDamage(self, t) * 100 return ([[You bend space around you, displacing %d%% of any damage you receive onto a random enemy within range. - ]]):format(displace) + ]]):tformat(displace) end, } @@ -517,7 +517,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[You surround yourself with a radius %d distortion of gravity, knocking back and dealing %0.2f physical damage to all creatures inside it. The effect lasts %d turns. Deals 50%% extra damage to pinned targets, in addition to the knockback. The blast wave may hit targets more then once, depending on the radius and the knockback effect. - The damage will scale with your Spellpower.]]):format(radius, damDesc(self, DamageType.PHYSICAL, damage), duration) + The damage will scale with your Spellpower.]]):tformat(radius, damDesc(self, DamageType.PHYSICAL, damage), duration) end, } @@ -579,7 +579,7 @@ newTalent{ game.party:addMember(m, { control="no", type="temporal-clone", - title="Temporal Clone", + title=_t"Temporal Clone", orders = {target=true}, }) end @@ -595,7 +595,7 @@ newTalent{ return ([[Clones the target creature for up to %d turns. The duration of the effect will be divided by half the target's rank, and the target will have have %d%% of its normal life and deal %d%% less damage. If you clone a hostile creature the clone will target the creature it was cloned from. The life and damage penalties will be lessened by your Spellpower.]]): - format(duration, 100 - damage_penalty, damage_penalty) + tformat(duration, 100 - damage_penalty, damage_penalty) end, } @@ -613,7 +613,7 @@ newTalent{ if dam > 0 and type ~= DamageType.TEMPORAL then local smear = dam * t.getPercent(self, t) self:setEffect(self.EFF_DAMAGE_SMEARING, t.getDuration(self, t), {dam=smear/t.getDuration(self, t), no_ct_effect=true}) - game:delayedLogDamage(src, self, 0, ("%s(%d smeared)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", smear), false) + game:delayedLogDamage(src, self, 0, ("%s(%d smeared)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", smear), false) dam = dam - smear end @@ -630,7 +630,7 @@ newTalent{ local percent = t.getPercent(self, t) * 100 local duration = t.getDuration(self, t) return ([[You convert %d%% of all non-temporal damage you receive into temporal damage spread out over %d turns. - This damage will bypass resistance and affinity.]]):format(percent, duration) + This damage will bypass resistance and affinity.]]):tformat(percent, duration) end, } @@ -651,7 +651,7 @@ newTalent{ info = function(self, t) local duration = t.getDuration(self, t) return ([[Phase shift yourself for %d turns; any damage greater than 10%% of your maximum life will teleport you to an adjacent tile and be reduced by 50%% (can only happen once per turn).]]): - format(duration) + tformat(duration) end, } @@ -705,7 +705,7 @@ newTalent{ game.logSeen(self, "The spell fizzles!") end else - game.logSeen(target, "%s resists the swap!", target.name:capitalize()) + game.logSeen(target, "%s resists the swap!", target:getName():capitalize()) end game:playSoundNear(self, "talents/teleport") @@ -716,7 +716,7 @@ newTalent{ local duration = t.getConfuseDuration(self, t) local power = t.getConfuseEfficency(self, t) return ([[You manipulate the spacetime continuum in such a way that you switch places with another creature with in a range of %d. The targeted creature will be confused (power %d%%) for %d turns. - The spell's hit chance will increase with your Spellpower.]]):format (range, power, duration) + The spell's hit chance will increase with your Spellpower.]]):tformat (range, power, duration) end, } @@ -769,7 +769,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getDuration(self, t), {apply_power=getParadoxSpellpower(self, t)}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end end end) @@ -785,7 +785,7 @@ newTalent{ return ([[Violently fold the space between yourself and another point within range. You teleport to the target location, and leave a temporal wake behind that stuns for %d turns and deals %0.2f temporal and %0.2f physical warp damage to targets in the path. The damage will scale with your Spellpower.]]): - format(stun, damDesc(self, DamageType.TEMPORAL, damage/2), damDesc(self, DamageType.PHYSICAL, damage/2)) + tformat(stun, damDesc(self, DamageType.TEMPORAL, damage/2), damDesc(self, DamageType.PHYSICAL, damage/2)) end, } @@ -835,7 +835,7 @@ newTalent{ return ([[Fragile spikes of carbon protrude from your flesh, clothing, and armor, increasing your armor rating by %d and inflicting %0.2f bleed damage over six turns on attackers. Each time you're struck, the armor increase will be reduced by 1. Each turn the spell will regenerate 1 armor up to its starting value. If the armor increase from the spell ever falls below 1, the sustain will deactivate and the effect will end. The armor and bleed damage will increase with your Spellpower.]]): - format(armor, damDesc(self, DamageType.PHYSICAL, damage)) + tformat(armor, damDesc(self, DamageType.PHYSICAL, damage)) end, } @@ -870,7 +870,7 @@ newTalent{ return ([[Destabilizes the target, inflicting %0.2f temporal damage per turn for 10 turns. If the target dies while destabilized, it will explode, doing %0.2f temporal damage and %0.2f physical damage in a radius of 4. If the target dies while also under the effects of continuum destabilization, all explosion damage will be done as temporal damage. The damage will scale with your Spellpower.]]): - format(damDesc(self, DamageType.TEMPORAL, damage), damDesc(self, DamageType.TEMPORAL, explosion/2), damDesc(self, DamageType.PHYSICAL, explosion/2)) + tformat(damDesc(self, DamageType.TEMPORAL, damage), damDesc(self, DamageType.TEMPORAL, explosion/2), damDesc(self, DamageType.PHYSICAL, explosion/2)) end, } @@ -910,10 +910,10 @@ newTalent{ if target then if target:checkHit(self:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("instakill") and target.life > 0 and target.life < target.max_life * 0.2 then -- KILL IT ! - game.logSeen(target, "%s has been pulled apart at a molecular level!", target.name:capitalize()) + game.logSeen(target, "%s has been pulled apart at a molecular level!", target:getName():capitalize()) target:die(self) elseif target.life > 0 and target.life < target.max_life * 0.2 then - game.logSeen(target, "%s resists the quantum spike!", target.name:capitalize()) + game.logSeen(target, "%s resists the quantum spike!", target:getName():capitalize()) end end @@ -930,6 +930,6 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Attempts to pull the target apart at a molecular level, inflicting %0.2f temporal damage and %0.2f physical damage. If the target ends up with low enough life (<20%%), it might be instantly killed. Quantum Spike deals 50%% additional damage to targets affected by temporal destabilization and/or continuum destabilization. - The damage will scale with your Spellpower.]]):format(damDesc(self, DamageType.TEMPORAL, damage/2), damDesc(self, DamageType.PHYSICAL, damage/2)) + The damage will scale with your Spellpower.]]):tformat(damDesc(self, DamageType.TEMPORAL, damage/2), damDesc(self, DamageType.PHYSICAL, damage/2)) end, } diff --git a/game/modules/tome/data/talents/chronomancy/spacetime-folding.lua b/game/modules/tome/data/talents/chronomancy/spacetime-folding.lua index 419d2d861fcddaccd4544f6ddc8b5e517312b5f5..c608cf6c02b627b4875def37d0e9091afe7f6b75 100644 --- a/game/modules/tome/data/talents/chronomancy/spacetime-folding.lua +++ b/game/modules/tome/data/talents/chronomancy/spacetime-folding.lua @@ -31,8 +31,8 @@ makeWarpMine = function(self, t, x, y, type, dam) -- Our Mines local mine = Trap.new{ - name = ("warp mine: %s"):format(type), - type = "temporal", id_by_type=true, unided_name = "trap", + name = ("warp mine: %s"):tformat(type == "toward" and _t"toward" or _t"away"), + type = "temporal", id_by_type=true, unided_name = _t"trap", display = '^', color=colors.BLUE, image = ("trap/chronomine_%s_0%d.png"):format(type == "toward" and "blue" or "red", rng.avg(1, 4, 3)), shader = "shadow_simulacrum", shader_args = { color = {0.2, 0.2, 0.2}, base = 0.8, time_factor = 1500 }, temporary = duration, @@ -84,7 +84,7 @@ makeWarpMine = function(self, t, x, y, type, dam) game:playSoundNear(self, "talents/teleport") end else - game.logSeen(who, "%s resists the teleport!", who.name:capitalize()) + game.logSeen(who, "%s resists the teleport!", who:getName():capitalize()) end end @@ -151,7 +151,7 @@ newTalent{ return ([[Lay Warp Mines in a radius of 1 that teleport enemies to you and inflict %0.2f physical and %0.2f temporal (warp) damage. The mines are hidden traps (%d detection and %d disarm power based on your Magic) and last for %d turns. The damage caused by your Warp Mines will improve with your Spellpower.]]): - format(damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage), detect, disarm, duration) + tformat(damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage), detect, disarm, duration) end, } @@ -201,7 +201,7 @@ newTalent{ return ([[Lay Warp Mines in a radius of 1 that teleport enemies away from you and inflict %0.2f physical and %0.2f temporal (warp) damage. The mines are hidden traps (%d detection and %d disarm power based on your Magic) and last for %d turns. The damage caused by your Warp Mines will improve with your Spellpower.]]): - format(damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage), detect, disarm, duration) + tformat(damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage), detect, disarm, duration) end, } @@ -240,7 +240,7 @@ newTalent{ Investing in this talent improves the range of all Spacetime Folding talents and the damage caused by your Warp Mines will improve with your Spellpower. Current Spacetime Folding Range: %d]]): - format(damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage), detect, disarm, duration, range) --I5 + tformat(damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage), detect, disarm, duration, range) --I5 end, } @@ -284,7 +284,7 @@ newTalent{ -- Make our tether local tether = mod.class.Object.new{ old_feat = oe, type = "temporal", subtype = "tether", - name = self.name:capitalize() .. "'s spatial tether", add_mos = {{image="object/temporal_instability.png"}}, + name = ("%s's spatial tether"):tformat(self:getName():capitalize()), add_mos = {{image="object/temporal_instability.png"}}, display = '&', color=colors.LIGHT_BLUE, temporary = t.getDuration(self, t), power = power, dest_power = dest_power, chance = chance, @@ -332,7 +332,7 @@ newTalent{ target:setEffect(target.EFF_CONTINUUM_DESTABILIZATION, 100, {power=self.dest_power}) end game:playSoundNear(self, "talents/teleport") - game.logSeen(target, "#CRIMSON#%s has been yanked back to the tether!", target.name:capitalize()) + game.logSeen(target, "#CRIMSON#%s has been yanked back to the tether!", target:getName():capitalize()) end -- Secondary blast, this occurs as long as the teleport is not resisted, even if it fails, say from Anchor @@ -347,7 +347,7 @@ newTalent{ end else - game.logSeen(target, "%s resists the teleport!", target.name:capitalize()) + game.logSeen(target, "%s resists the teleport!", target:getName():capitalize()) end end @@ -389,7 +389,7 @@ newTalent{ return ([[Tether the target to the location for %d turns. Each turn the target has a %d%% chance per tile it's travelled away from the tether to be teleported back, inflicting %0.2f physical and %0.2f temporal (warp) damage to all enemies in a radius of %d at both the entrance and exit locations. The damage will scale with your Spellpower.]]) - :format(duration, chance, damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage), radius) + :tformat(duration, chance, damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage), radius) end, } @@ -423,14 +423,14 @@ newTalent{ game.level.map:particleEmitter(target.x, target.y, 1, "temporal_teleport") if self:checkHit(getParadoxSpellpower(self, t), target:combatSpellResist() + (target:attr("continuum_destabilization") or 0)) and target:canBe("teleport") then if not target:teleportRandom(self.x, self.y, t.getTeleport(self, t), t.getTeleport(self, t)/2) then - game.logSeen(target, "The spell fizzles on %s!", target.name:capitalize()) + game.logSeen(target, "The spell fizzles on %s!", target:getName():capitalize()) else target:setEffect(target.EFF_CONTINUUM_DESTABILIZATION, 100, {power=getParadoxSpellpower(self, t, 0.3)}) game.level.map:particleEmitter(target.x, target.y, 1, "temporal_teleport") - game.logSeen(target, "#CRIMSON#%s has been banished!", target.name:capitalize()) + game.logSeen(target, "#CRIMSON#%s has been banished!", target:getName():capitalize()) end else - game.logSeen(target, "%s resists the banishment!", target.name:capitalize()) + game.logSeen(target, "%s resists the banishment!", target:getName():capitalize()) end -- random warp DamageType:get(DamageType.RANDOM_WARP).projector(self, target.x, target.y, DamageType.RANDOM_WARP, {dur=t.getDuration(self, t), apply_power=getParadoxSpellpower(self, t)}) @@ -444,7 +444,7 @@ newTalent{ local range = t.getTeleport(self, t) local duration = t.getDuration(self, t) return ([[Randomly teleports all enemies within a radius of three. Enemies will be teleported between %d and %d tiles from you and may be stunned, blinded, confused, or pinned for %d turns. - The chance of teleportion will scale with your Spellpower.]]):format(range / 2, range, duration) + The chance of teleportion will scale with your Spellpower.]]):tformat(range / 2, range, duration) end, } @@ -502,6 +502,6 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Create a radius three anti-teleport field for %d turns and daze all enemies in the area of effect for two turns. Enemies attempting to teleport while anchored take %0.2f physical and %0.2f temporal (warp) damage. - The damage will scale with your Spellpower.]]):format(duration, damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage)) + The damage will scale with your Spellpower.]]):tformat(duration, damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage)) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/spacetime-weaving.lua b/game/modules/tome/data/talents/chronomancy/spacetime-weaving.lua index 4f9e96c87f84b5573918f2dfbcf2bccf05bb56ba..f993dacea870425a55df09db537ca7e8a1122f15 100644 --- a/game/modules/tome/data/talents/chronomancy/spacetime-weaving.lua +++ b/game/modules/tome/data/talents/chronomancy/spacetime-weaving.lua @@ -73,9 +73,9 @@ newTalent{ else game.level.map:particleEmitter(self.x, self.y, 1, "temporal_teleport") if not self:teleportRandom(x, y, 0) then - game.logSeen(self, "%s's space-time folding fizzles!", self.name:capitalize()) + game.logSeen(self, "%s's space-time folding fizzles!", self:getName():capitalize()) else - game.logSeen(self, "%s emerges from a space-time rift!", self.name:capitalize()) + game.logSeen(self, "%s emerges from a space-time rift!", self:getName():capitalize()) game.level.map:particleEmitter(self.x, self.y, 1, "temporal_teleport") end end @@ -86,7 +86,7 @@ newTalent{ info = function(self, t) local range = self:getTalentRange(t) return ([[Teleports you to up to %d tiles away, to a targeted location in line of sight. - At talent level 5 you may swap positions with a target creature.]]):format(range) + At talent level 5 you may swap positions with a target creature.]]):tformat(range) end, } @@ -122,7 +122,7 @@ newTalent{ info = function(self, t) local reduction = t.getReduction(self, t) return ([[When you teleport you reduce the duration of a single detrimental effect by %d turns.]]): - format(reduction) + tformat(reduction) end, } @@ -163,11 +163,11 @@ newTalent{ -- Our base wormhole local function makeWormhole(x, y, dest_x, dest_y) local wormhole = mod.class.Trap.new{ - name = "wormhole", - type = "annoy", subtype="teleport", id_by_type=true, unided_name = "trap", + name = _t"wormhole", + type = "annoy", subtype="teleport", id_by_type=true, unided_name = _t"trap", image = "terrain/wormhole.png", display = '&', color_r=255, color_g=255, color_b=255, back_color=colors.STEEL_BLUE, - message = "@Target@ moves onto the wormhole.", + message = _t"@Target@ moves onto the wormhole.", temporary = t.getDuration(self, t), x = x, y = y, dest_x = dest_x, dest_y = dest_y, radius = self:getTalentRadius(t), @@ -181,14 +181,14 @@ newTalent{ if hit or (who.reactionToward and who:reactionToward(self) >= 0) then game.level.map:particleEmitter(who.x, who.y, 1, "temporal_teleport") if not who:teleportRandom(self.dest_x, self.dest_y, self.radius, 1) then - game.logSeen(who, "%s tries to enter the wormhole but a violent force pushes it back.", who.name:capitalize()) + game.logSeen(who, "%s tries to enter the wormhole but a violent force pushes it back.", who:getName():capitalize()) else if who ~= self.summoner then who:setEffect(who.EFF_CONTINUUM_DESTABILIZATION, 100, {power=self.dest_power}) end game.level.map:particleEmitter(who.x, who.y, 1, "temporal_teleport") game:playSoundNear(self, "talents/teleport") end else - game.logSeen(who, "%s ignores the wormhole.", who.name:capitalize()) + game.logSeen(who, "%s ignores the wormhole.", who:getName():capitalize()) end return true end, @@ -227,7 +227,7 @@ newTalent{ entrance.dest = exit exit.dest = entrance - game.logSeen(self, "%s folds the space between two points.", self.name) + game.logSeen(self, "%s folds the space between two points.", self:getName()) return true end, info = function(self, t) @@ -237,7 +237,7 @@ newTalent{ return ([[You fold the space between yourself and a second point within a range of %d, creating a pair of wormholes. Any creature stepping on either wormhole will be teleported near the other (radius %d accuracy). The wormholes will last %d turns and must be placed at least two tiles apart. The chance of teleporting enemies will scale with your Spellpower.]]) - :format(range, radius, duration) + :tformat(range, radius, duration) end, } @@ -294,6 +294,6 @@ newTalent{ local duration = t.getDuration(self, t) return ([[When you teleport you fire a pulse that jolts enemies out of phase in a radius of %d around both the start and the destination point. Each target has a %d%% chance per tile you travelled to be stunned, blinded, confused, or pinned for %d turns.]]): - format(radius, chance, duration) + tformat(radius, chance, duration) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/speed-control.lua b/game/modules/tome/data/talents/chronomancy/speed-control.lua index e39bfb983af571b77cececad404de2a7a1a23165..01eb5004d7e6da1767f363c0b0d8ab70c12a912a 100644 --- a/game/modules/tome/data/talents/chronomancy/speed-control.lua +++ b/game/modules/tome/data/talents/chronomancy/speed-control.lua @@ -36,7 +36,7 @@ newTalent{ info = function(self, t) local speed = t.getSpeed(self, t) * 100 local duration = t.getDuration(self, t) - return ([[When you move you gain %d%% movement speed for %d turns. This effect stacks up to three times but can only occur once per turn.]]):format(speed, duration) + return ([[When you move you gain %d%% movement speed for %d turns. This effect stacks up to three times but can only occur once per turn.]]):tformat(speed, duration) end, } @@ -60,7 +60,7 @@ newTalent{ local speed = t.getSpeed(self, t) * 100 local duration = t.getDuration(self, t) return ([[When you use a non-instant chronomancy spell you gain %d%% attack, spell, and mind speed for %d turns. This effect stacks up to three times but can only occur once per turn. - ]]):format(speed, duration) + ]]):tformat(speed, duration) end, } @@ -84,7 +84,7 @@ newTalent{ info = function(self, t) local duration = t.getDuration(self, t) local speed = t.getSpeed(self, t) * 100 - return ([[Increases your global speed by %d%% for %d game turns.]]):format(speed, duration) + return ([[Increases your global speed by %d%% for %d game turns.]]):tformat(speed, duration) end, } @@ -105,7 +105,7 @@ newTalent{ self.energy.value = self.energy.value + (t.getDuration(self, t) * 1000) self:setEffect(self.EFF_TIME_STOP, 1, {power=100}) - game.logSeen(self, "#STEEL_BLUE#%s has stopped time!#LAST#", self.name:capitalize()) + game.logSeen(self, "#STEEL_BLUE#%s has stopped time!#LAST#", self:getName():capitalize()) game:playSoundNear(self, "talents/heal") end) return true @@ -113,6 +113,6 @@ newTalent{ info = function(self, t) local duration = t.getDuration(self, t) local reduction = t.getReduction(self, t) - return ([[Gain %d turns. During this time your damage will be reduced by %d%%.]]):format(duration, reduction) + return ([[Gain %d turns. During this time your damage will be reduced by %d%%.]]):tformat(duration, reduction) end, } diff --git a/game/modules/tome/data/talents/chronomancy/spellbinding.lua b/game/modules/tome/data/talents/chronomancy/spellbinding.lua index 02dd2524c7d3ee2a3fbb2086c34b67b6e4178b87..1b1f3bd3bd74d4cb2c3ae5b1fac4774e7b74f367 100644 --- a/game/modules/tome/data/talents/chronomancy/spellbinding.lua +++ b/game/modules/tome/data/talents/chronomancy/spellbinding.lua @@ -47,12 +47,12 @@ newTalent{ end, info = function(self, t) local power = t.getPower(self, t) * 100 - local talent = self:isTalentActive(t.id) and self:getTalentFromId(self:isTalentActive(t.id).talent).name or "None" + local talent = self:isTalentActive(t.id) and self:getTalentFromId(self:isTalentActive(t.id).talent).name or _t"None" return ([[Empowers the selected chronomancy spell, increasing spellpower when casting it by %d%%. Each spell can only be spellbound in one way at a time. Current Empowered Spell: %s]]): - format(power, talent) + tformat(power, talent) end, } @@ -84,12 +84,12 @@ newTalent{ end, info = function(self, t) local power = t.getPower(self, t) * 100 - local talent = self:isTalentActive(t.id) and self:getTalentFromId(self:isTalentActive(t.id).talent).name or "None" + local talent = self:isTalentActive(t.id) and self:getTalentFromId(self:isTalentActive(t.id).talent).name or _t"None" return ([[Extends the duration of the selected chronomancy spell by %d%%. Each spell can only be spellbound in one way at a time. Current Extended Spell: %s]]): - format(power, talent) + tformat(power, talent) end, } @@ -121,12 +121,12 @@ newTalent{ end, info = function(self, t) local power = t.getPower(self, t) * 100 - local talent = self:isTalentActive(t.id) and self:getTalentFromId(self:isTalentActive(t.id).talent).name or "None" + local talent = self:isTalentActive(t.id) and self:getTalentFromId(self:isTalentActive(t.id).talent).name or _t"None" return ([[Reduces the cooldown of the selected chronomancy spell by %d%%. Each spell can only be spellbound in one way at a time. Current Matrix Spell: %s]]): - format(power, talent) + tformat(power, talent) end, } @@ -158,11 +158,11 @@ newTalent{ end, info = function(self, t) local power = t.getPower(self, t) * 100 - local talent = self:isTalentActive(t.id) and self:getTalentFromId(self:isTalentActive(t.id).talent).name or "None" + local talent = self:isTalentActive(t.id) and self:getTalentFromId(self:isTalentActive(t.id).talent).name or _t"None" return ([[Reduces the casting speed of the selected chronomancy spell by %d%%. Each spell can only be spellbound in one way at a time. Current Quickened Spell: %s]]): - format(power, talent) + tformat(power, talent) end, } diff --git a/game/modules/tome/data/talents/chronomancy/stasis.lua b/game/modules/tome/data/talents/chronomancy/stasis.lua index 8efc5b46a7178821f613a972d65160b8fa478bb0..e898c62f6e1bbc576d635363aba985c06b0b0cc8 100644 --- a/game/modules/tome/data/talents/chronomancy/stasis.lua +++ b/game/modules/tome/data/talents/chronomancy/stasis.lua @@ -35,7 +35,7 @@ newTalent{ local tune = t.getTuning(self, t) return ([[You automatically adjust your Paradox %0.2f points towards your preferred Paradox each turn. While using Spacetime Tuning twice this value will instead be added to the amount you would normally tune.]]): - format(tune) + tformat(tune) end, } @@ -65,7 +65,7 @@ newTalent{ Each turn the restoration field is active, you get healed for 10%% of the absorbed damage. While under the effect of Time Shield, all newly applied magical, physical and mental effects will have their durations reduced by %d%%. The shield's max absorption will increase with your Spellpower.]]): - format(maxabsorb, duration, time_reduc) + tformat(maxabsorb, duration, time_reduc) end, } @@ -115,7 +115,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Inflicts %0.2f temporal damage, and attempts to stun all targets in a radius %d ball for %d turns. The damage will scale with your Spellpower.]]): - format(damDesc(self, DamageType.TEMPORAL, damage), radius, duration) + tformat(damDesc(self, DamageType.TEMPORAL, damage), radius, duration) end, } @@ -138,6 +138,6 @@ newTalent{ local duration = t.getDuration(self, t) return ([[For the next %d turns you may not create minor anomalies. You do not regain Paradox or lose the spell you're casting if a random anomaly would normally occur. This spell has no effect on major anomalies.]]): - format(duration) + tformat(duration) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/temporal-archery.lua b/game/modules/tome/data/talents/chronomancy/temporal-archery.lua index dc297849bca827617e07e6e760ad6b21be9cea08..47a1759d8948ff6cda4478639bf69535cd46b7e1 100644 --- a/game/modules/tome/data/talents/chronomancy/temporal-archery.lua +++ b/game/modules/tome/data/talents/chronomancy/temporal-archery.lua @@ -39,7 +39,7 @@ newTalent{ info = function(self, t) local weapon = 100 * self:combatTalentWeaponDamage(t, 1.1, 1.9) return ([[You fire a shot that phases out of time and space allowing it to virtually ignore armor. The shot will deal %d%% weapon damage as temporal damage to its target.]]): - format(damDesc(self, DamageType.TEMPORAL, weapon)) + tformat(damDesc(self, DamageType.TEMPORAL, weapon)) end } @@ -66,7 +66,7 @@ newTalent{ info = function(self, t) local weapon = 100 * self:combatTalentWeaponDamage(t, 1.1, 1.9) return ([[You focus your aim and fire a shot with great accuracy, inflicting %d%% weapon damage. Afterwords your attack will remain improved for one turn as the chronomantic effects linger.]]) - :format(weapon) + :tformat(weapon) end, } @@ -98,7 +98,7 @@ newTalent{ info = function(self, t) local power = t.getPower(self, t) return ([[You focus your aim, increasing your critical damage multiplier by %d%% and your physical and spell critical strike chance by %d%% - The effect will scale with your Spellpower.]]):format(power, power / 2) + The effect will scale with your Spellpower.]]):tformat(power, power / 2) end, } @@ -125,6 +125,6 @@ newTalent{ info = function(self, t) local weapon = 100 * self:combatTalentWeaponDamage(t, 1, 1.5) return ([[You pause time around you long enough to fire a single shot, doing %d%% damage. - The damage will scale with your Paradox and the cooldown will go down with more talent points invested.]]):format(weapon) + The damage will scale with your Paradox and the cooldown will go down with more talent points invested.]]):tformat(weapon) end, } diff --git a/game/modules/tome/data/talents/chronomancy/temporal-combat.lua b/game/modules/tome/data/talents/chronomancy/temporal-combat.lua index f93cd756b78e3776428f3c24862907a2986a0785..67a1e0bb5022c14526e3f0cbe72fea5c0d4c3e45 100644 --- a/game/modules/tome/data/talents/chronomancy/temporal-combat.lua +++ b/game/modules/tome/data/talents/chronomancy/temporal-combat.lua @@ -81,7 +81,7 @@ newTalent{ return ([[When you hit with Weapon Folding you have a %d%% chance of dealing an additional %0.2f temporal damage to enemies in a radius of %d. Affected targets may also have their physical and temporal resistance reduced by %d%% for %d turns. This effect has a cooldown. If it triggers while on cooldown it will reduce the cooldown of Fold Gravity and Fold Warp by one turn.]]) - :format(chance, damDesc(self, DamageType.TEMPORAL, damage), radius, resists, duration) + :tformat(chance, damDesc(self, DamageType.TEMPORAL, damage), radius, resists, duration) end, } @@ -127,7 +127,7 @@ newTalent{ return ([[When you hit with Weapon Folding you have a %d%% chance of dealing an additional %0.2f physical and %0.2f temporal (warp) damage to enemies in a radius of %d. Each target hit may be stunned, blinded, pinned, or confused for %d turns. This effect has a cooldown. If it triggers while on cooldown it will reduce the cooldown of Fold Gravity and Fold Fate by one turn.]]) - :format(chance, damDesc(self, DamageType.TEMPORAL, damage/2), damDesc(self, DamageType.PHYSICAL, damage/2), radius, duration) + :tformat(chance, damDesc(self, DamageType.TEMPORAL, damage/2), damDesc(self, DamageType.PHYSICAL, damage/2), radius, duration) end, } @@ -175,7 +175,7 @@ newTalent{ return ([[When you hit with Weapon Folding you have a %d%% chance of dealing an additional %0.2f physical (gravity) damage to enemies in a radius of %d. Affected targets may also be slowed, decreasing their global speed speed by %d%% for %d turns This effect has a cooldown. If it triggers while on cooldown it will reduce the cooldown of Fold Fate and Fold Warp by one turn.]]) - :format(chance, damDesc(self, DamageType.PHYSICAL, damage), radius, slow, duration) + :tformat(chance, damDesc(self, DamageType.PHYSICAL, damage), radius, slow, duration) end, } @@ -216,7 +216,7 @@ newTalent{ local chance = t.getChance(self, t) return ([[Folds a single dimension of your weapons (or ammo) upon itself, adding %0.2f temporal damage to your strikes. Additionally you have a %d%% chance to gain 10%% of a turn when your weapons hit. - The damage will scale with your Spellpower.]]):format(damDesc(self, DamageType.TEMPORAL, damage), chance) + The damage will scale with your Spellpower.]]):tformat(damDesc(self, DamageType.TEMPORAL, damage), chance) end, } @@ -241,7 +241,7 @@ newTalent{ local power = t.getPower(self, t) local duration = t.getDuration(self, t) return ([[For the next %d turns, you recover %0.1f life and talents without fixed cooldowns will have their cooldowns refresh twice as fast as usual. - The life regeneration will scale with your Spellpower.]]):format(duration, power) + The life regeneration will scale with your Spellpower.]]):tformat(duration, power) end, } @@ -288,7 +288,7 @@ newTalent{ Fold Gravity: Deals %0.2f physical damage to enemies in a radius of %d. Affected targets will be slowed (%d%%) for %d turns. Each Fold has an eight turn cooldown. If an effect would be triggered while on cooldown it will reduce the cooldown of the other two Folds by one turn.]]) - :format(chance, damDesc(self, DamageType.TEMPORAL, damage), radius, resists, duration, damDesc(self, DamageType.PHYSICAL, damage/2), damDesc(self, DamageType.TEMPORAL, damage/2), radius, + :tformat(chance, damDesc(self, DamageType.TEMPORAL, damage), radius, resists, duration, damDesc(self, DamageType.PHYSICAL, damage/2), damDesc(self, DamageType.TEMPORAL, damage/2), radius, duration, damDesc(self, DamageType.PHYSICAL, damage), radius, slow, duration) end, } @@ -343,6 +343,6 @@ newTalent{ return ([[Attack the target with either your ranged or melee weapons for %d%% damage. If the attack hits you'll breach the target's immunities, reducing armor hardiness, stun, pin, blindness, and confusion immunity by 50%% for %d turns. Breach chance scales with your Spellpower.]]) - :format(damage, duration) + :tformat(damage, duration) end } \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/temporal-hounds.lua b/game/modules/tome/data/talents/chronomancy/temporal-hounds.lua index 66cf06d5c28a2915eb1432b55e997de9321ed2cc..be7edb2daedf5d504165d4ffff6c42e0ccb9eeea 100644 --- a/game/modules/tome/data/talents/chronomancy/temporal-hounds.lua +++ b/game/modules/tome/data/talents/chronomancy/temporal-hounds.lua @@ -34,7 +34,7 @@ summonTemporalHound = function(self, t) display = "C", color=colors.LIGHT_DARK, image = ("npc/temp_hound_0%d.png"):format(rng.range(1, 12)), shader = "shadow_simulacrum", shader_args = { color = {0.4, 0.4, 0.1}, base = 0.8, time_factor = 1500 }, name = "temporal hound", faction = self.faction, - desc = [[A trained hound that appears to be all at once a little puppy and a toothless old dog.]], + desc=_t[[A trained hound that appears to be all at once a little puppy and a toothless old dog.]], sound_moam = {"creatures/wolves/wolf_hurt_%d", 1, 2}, sound_die = {"creatures/wolves/wolf_hurt_%d", 1, 1}, autolevel = "none", @@ -142,7 +142,7 @@ summonTemporalHound = function(self, t) game.party:addMember(m, { control="no", type="hound", - title="temporal-hound", + title=_t"temporal-hound", orders = {target=true, leash=true, anchor=true, talents=true}, }) end @@ -235,7 +235,7 @@ newTalent{ return ([[Upon activation summon a Temporal Hound. Every %d turns another hound will be summoned, up to a maximum of three hounds. If a hound dies you'll summon a new hound in %d turns. Your hounds inherit your increased damage percent, have %d%% physical resistance and %d%% temporal resistance, and are immune to teleportation effects. Hounds will get, %d Strength, %d Dexterity, %d Constitution, %d Magic, %d Willpower, and %d Cunning, based on your Magic stat.]]) - :format(cooldown, cooldown, resists/2, math.min(100, resists*2), incStats.str + 1, incStats.dex + 1, incStats.con + 1, incStats.mag + 1, incStats.wil +1, incStats.cun + 1) + :tformat(cooldown, cooldown, resists/2, math.min(100, resists*2), incStats.str + 1, incStats.dex + 1, incStats.con + 1, incStats.mag + 1, incStats.wil +1, incStats.cun + 1) end } @@ -329,7 +329,7 @@ newTalent{ return ([[Command your Temporal Hounds to teleport to the targeted location. If you target an enemy your hounds will set that enemy as their target. When you learn this talent, your hounds gain %d defense and %d%% resist all after any teleport. At talent level five, if you're not at your maximum number of hounds when you cast this spell a new one will be summoned. - The teleportation bonuses scale with your Spellpower.]]):format(defense, defense, defense/2, defense/2) + The teleportation bonuses scale with your Spellpower.]]):tformat(defense, defense, defense/2, defense/2) end, } @@ -368,7 +368,7 @@ newTalent{ return ([[Your hounds can now survive for up to %d turns after their hit points are reduced below 1. While in this state they deal 50%% less damage but are immune to additional damage. Command Blink will now regenerate your hounds for %d life per turn and increase their global speed by %d%% for five turns. Hounds below 1 life when this effect occurs will have the bonuses doubled. When you learn this talent, your hounds gain %d%% stun, blind, confusion, and pin resistance. - The regeneration scales with your Spellpower.]]):format(duration, regen, haste, immunities) + The regeneration scales with your Spellpower.]]):tformat(duration, regen, haste, immunities) end } @@ -458,6 +458,6 @@ newTalent{ local affinity = t.getResists(self, t) return ([[Command your Temporal Hounds to breathe time, dealing %0.2f temporal damage and reducing the three highest stats of all targets in a radius %d cone. Affected targets will have their stats reduced by %d for %d turns. You are immune to the breath of your own hounds and your hounds are immune to stat damage from other hounds. - When you learn this talent, your hounds gain %d%% temporal damage affinity.]]):format(damDesc(self, DamageType.TEMPORAL, damage), radius, stat_damage, duration, affinity) + When you learn this talent, your hounds gain %d%% temporal damage affinity.]]):tformat(damDesc(self, DamageType.TEMPORAL, damage), radius, stat_damage, duration, affinity) end, } diff --git a/game/modules/tome/data/talents/chronomancy/threaded-combat.lua b/game/modules/tome/data/talents/chronomancy/threaded-combat.lua index e83ff774a82911b7f414705f264c591ef5d47e15..de655ae8d45330940ad4d86f830cf70fb73eaeb5 100644 --- a/game/modules/tome/data/talents/chronomancy/threaded-combat.lua +++ b/game/modules/tome/data/talents/chronomancy/threaded-combat.lua @@ -143,7 +143,7 @@ newTalent{ return ([[Attack with your bow or dual-weapons for %d%% damage. If you shoot an arrow you'll teleport near the target location. If you use your dual-weapons you'll teleport up to your bow's range away. Additionally you now go Out of Phase for five turns after any teleport, gaining %d defense and %d%% resist all. The Out of Phase bonuses will scale with your Magic stat.]]) - :format(damage, defense, resist) + :tformat(damage, defense, resist) end } @@ -201,7 +201,7 @@ newTalent{ return ([[Each time you hit with an arrow you reduce the cooldown of one Blade Threading talent on cooldown by one turn. Each time you hit with a melee weapon you reduce the cooldown of one Bow Threading talent on cooldown by one turn. This effect can only occur %d times per turn.]]) - :format(count) + :tformat(count) end } @@ -258,7 +258,7 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) * 100 return ([[Attack with your bow or dual-weapons for %d%% damage. If you use your bow you'll shoot all targets in a beam. If you use your dual-weapons you'll attack all targets within a radius of one around you.]]) - :format(damage) + :tformat(damage) end } @@ -327,7 +327,7 @@ newTalent{ local tx, ty = util.findFreeGrid(wf.x, wf.y, 1, true, {[Map.ACTOR]=true}) if tx and ty then m.blended_target = wf - game.logSeen(self, "%s calls forth a temporal warden from another timeline.", self.name:capitalize()) + game.logSeen(self, "%s calls forth a temporal warden from another timeline.", self:getName():capitalize()) game.zone:addEntity(game.level, m, "actor", tx, ty) end end @@ -340,7 +340,7 @@ newTalent{ local tx, ty = util.findFreeGrid(a.x, a.y, 1, true, {[Map.ACTOR]=true}) if tx and ty then m.blended_target = a - game.logSeen(self, "%s calls forth a temporal warden from another timeline.", self.name:capitalize()) + game.logSeen(self, "%s calls forth a temporal warden from another timeline.", self:getName():capitalize()) game.zone:addEntity(game.level, m, "actor", tx, ty) break else @@ -404,7 +404,7 @@ newTalent{ local tx, ty = find_space(self, target, m) if tx and ty then m.blended_target = wf - game.logSeen(self, "%s calls forth a temporal warden from another timeline.", self.name:capitalize()) + game.logSeen(self, "%s calls forth a temporal warden from another timeline.", self:getName():capitalize()) game.zone:addEntity(game.level, m, "actor", tx, ty) end else @@ -414,7 +414,7 @@ newTalent{ local tx, ty = find_space(self, target, m) if tx and ty then m.blended_target = a - game.logSeen(self, "%s calls forth a temporal warden from another timeline.", self.name:capitalize()) + game.logSeen(self, "%s calls forth a temporal warden from another timeline.", self:getName():capitalize()) game.zone:addEntity(game.level, m, "actor", tx, ty) end end @@ -427,6 +427,6 @@ newTalent{ The summoned warden will attempt a melee attack if you made an arrow attack, or an arrow attack if you made a melee attack. These wardens are out of phase with your reality and deal %d%% less damage, and their arrows will pass through friendly targets. A warden can only be summoned this way once per turn and they return to their own timeline after attacking.]]) - :format(t.getChance(self, t), t.getDamagePenalty(self, t)) + :tformat(t.getChance(self, t), t.getDamagePenalty(self, t)) end } diff --git a/game/modules/tome/data/talents/chronomancy/timeline-threading.lua b/game/modules/tome/data/talents/chronomancy/timeline-threading.lua index 43dfdaf9b40c15ca055d43b0d55c380f62a3493e..f39214f5a1b070348a0869d6ab78afa2cabe1463 100644 --- a/game/modules/tome/data/talents/chronomancy/timeline-threading.lua +++ b/game/modules/tome/data/talents/chronomancy/timeline-threading.lua @@ -113,7 +113,7 @@ newTalent{ return ([[Rethread the timeline, dealing %0.2f temporal damage to the target before moving on to a second target. Rethread can hit up to %d targets up to 10 grids apart, and will never hit the same one twice; nor will it hit the caster. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.TEMPORAL, damage), targets) + tformat(damDesc(self, DamageType.TEMPORAL, damage), targets) end, } @@ -135,8 +135,8 @@ newTalent{ local function makeFugueClone(self, t) local m = makeParadoxClone(self, self, t.getDuration(self, t)) -- Add and change some values - m.name = self.name.."'s Fugue Clone" - m.desc = ([[The real %s... or so %s says.]]):format(self.name, self:he_she()) + m.name = ("%s's Fugue Clone"):tformat(self:getName()) + m.desc = ([[The real %s... or so %s says.]]):tformat(self:getName(), self:he_she()) -- Handle some AI stuff m.ai_state = { talent_in=1, ally_compassion=10 } @@ -157,7 +157,7 @@ newTalent{ game.party:addMember(m, { control="full", type="fugue clone", - title="Fugue Clone", + title=_t"Fugue Clone", orders = {target=true, leash=true, anchor=true, talents=true}, }) end @@ -190,7 +190,7 @@ newTalent{ return ([[For the next %d turns two alternate versions of you enter your timeline. While the effect is active all damage done by you or your copies is reduced by two thirds and all damage received is split between the three of you. Temporal Fugue does not normally cooldown while active. You may take direct control of your clones, give them orders, and set their talent usage. Damage you deal to Fugue Clones or that they deal to you or each other is reduced to zero.]]): - format(duration) + tformat(duration) end, } @@ -207,7 +207,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Your Rethread now braids the lifelines of all targets it hits for %d turns. Braided targets take %d%% of all damage dealt to other braided targets. The amount of damage shared will scale with your Spellpower.]]) - :format(duration, braid) + :tformat(duration, braid) end } @@ -247,7 +247,7 @@ newTalent{ if target then game:onTickEnd(function() target:removeEffect(target.EFF_CEASE_TO_EXIST) - game.logSeen(target, "#LIGHT_BLUE#%s never existed, this never happened!", target.name:capitalize()) + game.logSeen(target, "#LIGHT_BLUE#%s never existed, this never happened!", target:getName():capitalize()) target:die(self) end) end @@ -263,7 +263,7 @@ newTalent{ if not target then return end if target == self then - game.logSeen(self, "#LIGHT_STEEL_BLUE#%s tries to remove %sself from existance!", self.name, string.his_her(self)) + game.logSeen(self, "#LIGHT_STEEL_BLUE#%s tries to remove %sself from existance!", self:getName(), string.his_her(self)) self:incParadox(400) game.level.map:particleEmitter(self.x, self.y, 1, "ball_temporal", {radius=1, tx=self.x, ty=self.y}) return true @@ -271,7 +271,7 @@ newTalent{ -- does the spell hit? if not nothing happens if not self:checkHit(getParadoxSpellpower(self, t), target:combatSpellResist()) then - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) return true end @@ -296,7 +296,7 @@ newTalent{ If you manage to kill the target while the spell is in effect, you'll be returned to the point in time you cast this spell and the target will be slain. This spell splits the timeline. Attempting to use another spell that also splits the timeline while this effect is active will be unsuccessful. The resistance penalty will scale with your Spellpower.]]) - :format(duration, power) + :tformat(duration, power) end, } @@ -338,7 +338,7 @@ newTalent{ -- Flavor :) local sex = self.female and "she" or "he" m.name = self.name - m.desc = [[The real ]]..self.name:capitalize()..[[... or so ]]..sex..[[ says.]] + m.desc=_t[[The real ]]..self.name:capitalize()..[[... or so ]]..sex..[[ says.]] m.shader = nil m.shader_args = nil @@ -391,7 +391,7 @@ newTalent{ game.party:addMember(m, { control="full", type="fugue clone", - title="Fugue Clone", + title=_t"Fugue Clone", orders = {target=true}, }) end @@ -430,7 +430,7 @@ newTalent{ game.party:addMember(m, { control="full", type="fugue clone", - title="Fugue Clone", + title=_t"Fugue Clone", orders = {target=true}, }) end @@ -460,6 +460,6 @@ newTalent{ Each clone that dies will increase your Paradox by 33%% of the difference between its Paradox and your own. This will never reduce your Paradox. When only one clone is left, or if you cast the spell while in the fugue state, the spell will end, returning you to the position of the last active clone. The life and damage penalties will be reduced by your Spellpower.]]): - format(100 - damage_penalty, damage_penalty, duration) + tformat(100 - damage_penalty, damage_penalty, duration) end, }]=]-- \ No newline at end of file diff --git a/game/modules/tome/data/talents/chronomancy/timetravel.lua b/game/modules/tome/data/talents/chronomancy/timetravel.lua index 7ec422f053637090064b9fd1d7d1d46681d53453..b41ac62631e7e4970877775b26a3929e6d3e84d7 100644 --- a/game/modules/tome/data/talents/chronomancy/timetravel.lua +++ b/game/modules/tome/data/talents/chronomancy/timetravel.lua @@ -72,7 +72,7 @@ newTalent{ local proj = require("mod.class.Projectile"):makeHoming( self, {particle="arrow", particle_args={tile="particles_images/temporal_bolt", proj_x=self.x, proj_y=self.y, src_x=x, src_y=y}, trail="trail_paradox"}, - {speed=3, name="Temporal Bolt", dam=dam, cdr=cdr, start_x=x, start_y=y}, + {speed=3, name=_t"Temporal Bolt", dam=dam, cdr=cdr, start_x=x, start_y=y}, self, self:getTalentRange(t), function(self, src) local talent = src:getTalentFromId 'T_TEMPORAL_BOLT' @@ -112,7 +112,7 @@ newTalent{ return ([[Pull a bolt of temporal energy back through time. The bolt will home in on your location, dealing %0.2f temporal damage to targets, and reducing the cooldown of one chronomancy talent on cooldown by one turn per enemy hit. The bolt gains 5%% damage each time it moves and the damage will scale with your Spellpower. At talent level five cooldowns are reduced by two.]]): - format(damDesc(self, DamageType.TEMPORAL, damage)) + tformat(damDesc(self, DamageType.TEMPORAL, damage)) end, } @@ -141,7 +141,7 @@ newTalent{ if not target then return end if target:attr("timetravel_immune") then - game.logSeen(target, "%s is immune!", target.name:capitalize()) + game.logSeen(target, "%s is immune!", target:getName():capitalize()) return true end @@ -157,7 +157,7 @@ newTalent{ -- Check hit local power = getParadoxSpellpower(self, t) local hit = self:checkHit(power, target:combatSpellResist() + (target:attr("continuum_destabilization") or 0)) - if not hit then game.logSeen(target, "%s resists!", target.name:capitalize()) return true end + if not hit then game.logSeen(target, "%s resists!", target:getName():capitalize()) return true end -- Apply spellshock and destabilization target:crossTierEffect(target.EFF_SPELLSHOCKED, getParadoxSpellpower(self, t)) @@ -168,7 +168,7 @@ newTalent{ if (oe and oe:attr("temporary")) or game.level.map:checkEntity(x, y, Map.TERRAIN, "block_move") then game.logPlayer(self, "Something has prevented the timetravel.") return true end local e = mod.class.Object.new{ old_feat = oe, type = "temporal", subtype = "instability", - name = "temporal instability", + name = _t"temporal instability", display = '&', color=colors.LIGHT_BLUE, temporary = t.getDuration(self, t), canAct = false, @@ -200,7 +200,7 @@ newTalent{ } -- Remove the target - game.logSeen(target, "%s has moved forward in time!", target.name:capitalize()) + game.logSeen(target, "%s has moved forward in time!", target:getName():capitalize()) game.level:removeEntity(target, true) -- add the time skip object to the map @@ -216,7 +216,7 @@ newTalent{ local damage = t.getDamage(self, t) local duration = t.getDuration(self, t) return ([[Inflicts %0.2f temporal damage. If your target survives, it may be removed from time for %d turns. - The damage will scale with your Spellpower.]]):format(damDesc(self, DamageType.TEMPORAL, damage), duration) + The damage will scale with your Spellpower.]]):tformat(damDesc(self, DamageType.TEMPORAL, damage), duration) end, } @@ -289,7 +289,7 @@ newTalent{ if not game.state.temporal_reprieve_lore and rng.percent(5) then game.state.temporal_reprieve_lore = true - require("engine.ui.Dialog"):simpleLongPopup("What the... ugh.", "Some rookie paradox mage is about to find out that the standard-issue Temporal Reprieve takes you to a random safe-zone, not a fixed one, and left the contents of their pack strewn about the place. Nearly all of it is equipment that your transmutation chest won't process and is unusable by anything with less than twelve limbs, so you kick most of it into the void, but a crumpled note catches your eye...", 500, function() + require("engine.ui.Dialog"):simpleLongPopup(_t"What the... ugh.", _t"Some rookie paradox mage is about to find out that the standard-issue Temporal Reprieve takes you to a random safe-zone, not a fixed one, and left the contents of their pack strewn about the place. Nearly all of it is equipment that your transmutation chest won't process and is unusable by anything with less than twelve limbs, so you kick most of it into the void, but a crumpled note catches your eye...", 500, function() game.party:learnLore("galsame-orientation-notes") end) end @@ -302,7 +302,7 @@ newTalent{ info = function(self, t) local duration = t.getDuration(self, t) return ([[Transport yourself to a safe place for %d turns.]]): - format(duration) + tformat(duration) end, } @@ -348,6 +348,6 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Creates a temporal echo in a radius of %d around you. Affected targets take %0.2f temporal damage, as well as up to %d%% of the difference between their current life and max life as additional temporal damage. The additional damage will be divided by the target's rank and the damage scales with your Spellpower.]]): - format(radius, damDesc(self, DamageType.TEMPORAL, damage), percent) + tformat(radius, damDesc(self, DamageType.TEMPORAL, damage), percent) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/corruptions/blight.lua b/game/modules/tome/data/talents/corruptions/blight.lua index 60c42245659830b6056ea90a4983a11cfe70048f..963c145fff19aa2726320d99176a08c34e243c5f 100644 --- a/game/modules/tome/data/talents/corruptions/blight.lua +++ b/game/modules/tome/data/talents/corruptions/blight.lua @@ -43,7 +43,7 @@ newTalent{ info = function(self, t) return ([[Increases your spell critical damage multiplier by %d%%. The multiplier will increase with your Spellpower.]]): - format(self:combatTalentSpellDamage(t, 20, 50)) + tformat(self:combatTalentSpellDamage(t, 20, 50)) end, } @@ -115,7 +115,7 @@ newTalent{ info = function(self, t) return ([[Project a corrupted blast of power that removes up to %d magical or physical effects or any type of sustain and deals %0.2f blight damage to any creatures caught in the radius 3 ball. For each effect, the creature has a chance to resist based on its spell save. - The damage will increase with your Spellpower.]]):format(t.getRemoveCount(self, t), damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 28, 120))) + The damage will increase with your Spellpower.]]):tformat(t.getRemoveCount(self, t), damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 28, 120))) end, } @@ -148,7 +148,7 @@ newTalent{ return ([[Infects the target with a corrosive worm for 6 turns that reduces blight and acid resistance by %d%% and feeds off damage taken. When this effect ends or the target dies the worm will explode, dealing %d acid damage in a 4 radius ball. This damage will increase by %d%% of all damage taken while infected. The damage dealt by the effect will increase with spellpower.]]): - format(t.getResist(self,t), t.getDamage(self, t), t.getPercent(self, t)) + tformat(t.getResist(self,t), t.getDamage(self, t), t.getPercent(self, t)) end, } @@ -217,6 +217,6 @@ newTalent{ Each possible effect is equally likely. The poison damage dealt is capable of a critical strike. The damage will increase with your Spellpower.]]): - format(self:getTalentRadius(t), t.getDuration(self, t), dam/4, dam, heal_factor, power, fail) + tformat(self:getTalentRadius(t), t.getDuration(self, t), dam/4, dam, heal_factor, power, fail) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/corruptions/blood.lua b/game/modules/tome/data/talents/corruptions/blood.lua index 5fdf1207e5e969b7a9364dcc0fdf768ef223bfef..0c2fa424e16ed50b5364ebcc62cef95acfd2df83 100644 --- a/game/modules/tome/data/talents/corruptions/blood.lua +++ b/game/modules/tome/data/talents/corruptions/blood.lua @@ -73,7 +73,7 @@ newTalent{ return ([[You extract corrupted blood from your own body, hitting everything in a frontal cone of radius %d for %0.2f blight damage. Each creature hit has a %d%% chance of being infected by a random disease, doing %0.2f blight damage and weakening either Constitution, Strength or Dexterity for 6 turns. The damage will increase with your Spellpower.]]): - format(self:getTalentRadius(t), damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 10, 190)), t.getChance(self, t), damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 10, 220))) + tformat(self:getTalentRadius(t), damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 10, 190)), t.getChance(self, t), damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 10, 220))) end, } @@ -104,7 +104,7 @@ newTalent{ info = function(self, t) return ([[Project a bolt of corrupted blood, doing %0.2f blight damage and healing you for 20%% the damage dealt. 50%% of the damage dealt will be gained as maximum life for 7 turns (before the healing). - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.BLIGHT, t.getDamage(self, t))) + The damage will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.BLIGHT, t.getDamage(self, t))) end, } @@ -158,7 +158,7 @@ newTalent{ info = function(self, t) return ([[Make the impure blood of all creatures around you in radius %d boil. Each enemy afflicted by a disease, poison, or wound will have one removed at random dealing %0.2f blight damage, healing you for %d, and slowing them by %d%% for 5 turns. - The damage will increase with your Spellpower.]]):format(self:getTalentRadius(t), damDesc(self, DamageType.BLIGHT, t.getDamage(self, t)), t.getHeal(self, t), t.getSlow(self, t)) + The damage will increase with your Spellpower.]]):tformat(self:getTalentRadius(t), damDesc(self, DamageType.BLIGHT, t.getDamage(self, t)), t.getHeal(self, t), t.getSlow(self, t)) end, } @@ -193,6 +193,6 @@ newTalent{ return ([[Concentrate on the corruption you bring, increasing your spell critical chance by %d%%. Each time your spells go critical, you enter a blood rage for 5 turns, increasing your blight and acid damage by %d%%. The critical chance and damage increase will improve with your Spellpower.]]): - format(self:combatTalentSpellDamage(t, 10, 14), self:combatTalentSpellDamage(t, 10, 30)) + tformat(self:combatTalentSpellDamage(t, 10, 14), self:combatTalentSpellDamage(t, 10, 30)) end, } diff --git a/game/modules/tome/data/talents/corruptions/bone.lua b/game/modules/tome/data/talents/corruptions/bone.lua index fa27f7a3983bd477fc995fe7d4ce321463c83aa5..47587bb02bf4228018a0bd2913f0eb8c777ffa9c 100644 --- a/game/modules/tome/data/talents/corruptions/bone.lua +++ b/game/modules/tome/data/talents/corruptions/bone.lua @@ -55,7 +55,7 @@ newTalent{ end, info = function(self, t) return ([[Conjures up a spear of bones, doing %0.2f physical damage to all targets in a line. Each target takes an additional %d%% damage for each magical debuff they are afflicted with up to a max of %d%% (%d). - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), t.getBonus(self, t)*100, t.getBonus(self, t)*100 * 5, damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t) * 2)) + The damage will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), t.getBonus(self, t)*100, t.getBonus(self, t)*100 * 5, damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t) * 2)) end, } @@ -86,12 +86,12 @@ newTalent{ if target:canBe("pin") then target:setEffect(target.EFF_BONE_GRAB, t.getDuration(self, t), {apply_power=self:combatSpellpower()}) else - game.logSeen(target, "%s resists the pin!", target.name:capitalize()) + game.logSeen(target, "%s resists the pin!", target:getName():capitalize()) end local hit = self:checkHit(self:combatSpellpower(), target:combatSpellResist() + (target:attr("continuum_destabilization") or 0)) if not target:canBe("teleport") or not hit then - game.logSeen(target, "%s resists being teleported by Bone Grab!", target.name:capitalize()) + game.logSeen(target, "%s resists being teleported by Bone Grab!", target:getName():capitalize()) return true end @@ -113,12 +113,12 @@ newTalent{ if target:canBe("pin") then target:setEffect(target.EFF_BONE_GRAB, t.getDuration(self, t), {apply_power=self:combatSpellpower()}) else - game.logSeen(target, "%s resists the pin!", target.name:capitalize()) + game.logSeen(target, "%s resists the pin!", target:getName():capitalize()) end local hit = self:checkHit(self:combatSpellpower(), target:combatSpellResist() + (target:attr("continuum_destabilization") or 0)) if not target:canBe("teleport") or not hit then - game.logSeen(target, "%s resists being teleported by Bone Grab!", target.name:capitalize()) + game.logSeen(target, "%s resists being teleported by Bone Grab!", target:getName():capitalize()) return true end @@ -133,7 +133,7 @@ newTalent{ return ([[Grab a target and teleport it to your side or if adjacent up to 6 spaces away from you, pinning it there with a bone rising from the ground for %d turns. The bone will also deal %0.2f physical damage. The damage will increase with your Spellpower.]]): - format(t.getDuration(self, t), damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) + tformat(t.getDuration(self, t), damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) end, } @@ -176,7 +176,7 @@ newTalent{ end, info = function(self, t) return ([[Whenever you use a non-instant talent you launch a spear of bone at all enemies afflicted by 3 or more magical detrimental effects dealing %d physical damage to all enemies it passes through. - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)) ) + The damage will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)) ) end, } @@ -243,7 +243,7 @@ newTalent{ local pid = table.remove(p.particles) self:removeParticles(pid) end - game:delayedLogDamage(src, self, 0, ("#SLATE#(%d to bones)#LAST#"):format(cb.value), false) + game:delayedLogDamage(src, self, 0, ("#SLATE#(%d to bones)#LAST#"):tformat(cb.value), false) cb.value = 0 return true end, @@ -279,6 +279,6 @@ newTalent{ %d shield(s) will be generated when first activated. Then every %d turns a new one will be created if not full. This will only trigger on hits over %d damage based on Spellpower.]]): - format(t.getNb(self, t), t.getRegen(self, t), t.getThreshold(self, t)) + tformat(t.getNb(self, t), t.getRegen(self, t), t.getThreshold(self, t)) end, } diff --git a/game/modules/tome/data/talents/corruptions/corruptions.lua b/game/modules/tome/data/talents/corruptions/corruptions.lua index 4bf6b34966f21ec26adcb8c6bef708577028982c..22fa24c981ddd49e0435ac9f9436d8565ca9d1b7 100644 --- a/game/modules/tome/data/talents/corruptions/corruptions.lua +++ b/game/modules/tome/data/talents/corruptions/corruptions.lua @@ -18,20 +18,20 @@ -- darkgod@te4.org -- Corruptions -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/sanguisuge", name = "sanguisuge", description = "Manipulate life force to feed your own dark powers." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/torment", name = "torment", generic = true, description = "All the tools to torment your foes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/vim", name = "vim", description = "Touch the very essence of your victims." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/bone", name = "bone", description = "Harness the power of bones." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/hexes", name = "hexes", generic = true, description = "Hex your foes, hindering and crippling them." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/curses", name = "curses", generic = true, description = "Curse your foes, hindering and crippling them." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/vile-life", name = "vile life", generic = true, description = "Manipulate life for your vile needs." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/plague", name = "plague", description = "Spread diseases to your foes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/scourge", name = "scourge", description = "Bring pain and destruction to the world." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/reaving-combat", name = "reaving combat", description = "Enhanced melee combat through the dark arts." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/blood", name = "blood", description = "Harness the power of blood, both your own and your foes'." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/blight", name = "blight", description = "Bring corruption and decay to all who oppose you." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/shadowflame", name = "Shadowflame", description = "Harness the power of the demonic shadowflame." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, min_lev = 10, type="corruption/rot", name = "rot", description = "Become one with rot and decay." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/sanguisuge", name = _t"sanguisuge", description = _t"Manipulate life force to feed your own dark powers." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/torment", name = _t"torment", generic = true, description = _t"All the tools to torment your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/vim", name = _t"vim", description = _t"Touch the very essence of your victims." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/bone", name = _t"bone", description = _t"Harness the power of bones." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/hexes", name = _t"hexes", generic = true, description = _t"Hex your foes, hindering and crippling them." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/curses", name = _t"curses", generic = true, description = _t"Curse your foes, hindering and crippling them." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/vile-life", name = _t"vile life", generic = true, description = _t"Manipulate life for your vile needs." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/plague", name = _t"plague", description = _t"Spread diseases to your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/scourge", name = _t"scourge", description = _t"Bring pain and destruction to the world." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/reaving-combat", name = _t"reaving combat", description = _t"Enhanced melee combat through the dark arts." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/blood", name = _t"blood", description = _t"Harness the power of blood, both your own and your foes'." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/blight", name = _t"blight", description = _t"Bring corruption and decay to all who oppose you." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="corruption/shadowflame", name = _t"Shadowflame", description = _t"Harness the power of the demonic shadowflame." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, min_lev = 10, type="corruption/rot", name = _t"rot", description = _t"Become one with rot and decay." } -- Generic requires for corruptions based on talent level corrs_req1 = { diff --git a/game/modules/tome/data/talents/corruptions/curses.lua b/game/modules/tome/data/talents/corruptions/curses.lua index f34a1fdb61d5a5f265eb74e46c8b377a7e6c559c..17bed19921157c2f9666dbb05e06318d8e13193f 100644 --- a/game/modules/tome/data/talents/corruptions/curses.lua +++ b/game/modules/tome/data/talents/corruptions/curses.lua @@ -43,7 +43,7 @@ newTalent{ end, info = function(self, t) return ([[Curses your target, decreasing its Defense and all saves by %d for 5 turns. This cannot be saved against. - The effects will improve with your Spellpower.]]):format(self:combatTalentSpellDamage(t, 30, 60)) + The effects will improve with your Spellpower.]]):tformat(self:combatTalentSpellDamage(t, 30, 60)) end, } @@ -74,7 +74,7 @@ newTalent{ end, info = function(self, t) return ([[Curses your target, decreasing all damage it does by %d%% for 10 turns. - The effects will improve with your Spellpower.]]):format(t.imppower(self,t)) + The effects will improve with your Spellpower.]]):tformat(t.imppower(self,t)) end, } @@ -104,7 +104,7 @@ newTalent{ end, info = function(self, t) return ([[Curses your target, preventing normal life regeneration and dealing %0.2f darkness damage over 10 turns. - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 10, 70)*10)) + The damage will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 10, 70)*10)) end, } @@ -134,6 +134,6 @@ newTalent{ end, info = function(self, t) return ([[Curses your target, decreasing all its resistances by %d%% for 7 turns. - The effect will improve with your Spellpower.]]):format(self:combatTalentSpellDamage(t, 10, 40)) + The effect will improve with your Spellpower.]]):tformat(self:combatTalentSpellDamage(t, 10, 40)) end, } diff --git a/game/modules/tome/data/talents/corruptions/hexes.lua b/game/modules/tome/data/talents/corruptions/hexes.lua index f3aee2a69bf95eb986486de406561359cf0e9a77..e7143dfb7db3a098b9cdb5edd27903d0c38e1dae 100644 --- a/game/modules/tome/data/talents/corruptions/hexes.lua +++ b/game/modules/tome/data/talents/corruptions/hexes.lua @@ -51,7 +51,7 @@ newTalent{ end, info = function(self, t) return ([[Hexes your target, dazing it and everything in a 2 radius ball around it for 3 turns and giving a %d%% chance to daze affected targets again each turn for 20 turns. - The chance will increase with your Spellpower.]]):format(t.getchance(self,t)) + The chance will increase with your Spellpower.]]):tformat(t.getchance(self,t)) end, } @@ -89,7 +89,7 @@ newTalent{ return ([[Hexes your target and everything within a radius 2 ball around it for 20 turns. Each time an affected target uses a resource (stamina, mana, vim, ...), it takes %0.2f fire damage. In addition, the cooldown of any talent used while so hexed is increased by %d%% + 1 turn. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 4, 90)), t.getCDincrease(self, t)*100) + tformat(damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 4, 90)), t.getCDincrease(self, t)*100) end, } @@ -125,7 +125,7 @@ newTalent{ end, info = function(self, t) return ([[Hexes your target and everything within a radius 2 ball around it. Each time they do damage, they take %d%% of the same damage for 20 turns. - The damage will increase with your Spellpower.]]):format(t.recoil(self,t)) + The damage will increase with your Spellpower.]]):tformat(t.recoil(self,t)) end, } @@ -162,6 +162,6 @@ newTalent{ end, info = function(self, t) return ([[Hexes your target, forcing it to be your thrall for %d turns. - If you damage the target, it will be freed from the hex.]]):format(t.getDuration(self, t)) + If you damage the target, it will be freed from the hex.]]):tformat(t.getDuration(self, t)) end, } diff --git a/game/modules/tome/data/talents/corruptions/plague.lua b/game/modules/tome/data/talents/corruptions/plague.lua index 19dc655ca11e10e7777b0939f898a16181ada2a2..2ec711c2fde68ae976d038f60874892544a04747 100644 --- a/game/modules/tome/data/talents/corruptions/plague.lua +++ b/game/modules/tome/data/talents/corruptions/plague.lua @@ -81,7 +81,7 @@ newTalent{ target:setEffect(disease[1], 6, {src=self, dam=self:spellCrit(7 + self:combatTalentSpellDamage(t, 6, 45)), [disease[2]]=self:combatTalentSpellDamage(t, 5, 35), apply_power=self:combatSpellpower()}) else - game.logSeen(target, "%s resists the disease!", target.name:capitalize()) + game.logSeen(target, "%s resists the disease!", target:getName():capitalize()) end self:startTalentCooldown(t) game.level.map:particleEmitter(target.x, target.y, 1, "circle", {oversize=0.7, a=200, limit_life=8, appear=8, speed=-2, img="disease_circle", radius=0}) @@ -92,7 +92,7 @@ newTalent{ Virulent Disease will always try to apply a disease the target does not currently have, and also one that will have the most debilitating effect for the target. This disease will try to prioritize being applied to an enemy with a high disease count near the target. The effect will increase with your Spellpower.]]): - format(damDesc(self, DamageType.BLIGHT, 7 + self:combatTalentSpellDamage(t, 6, 45)), self:combatTalentSpellDamage(t, 5, 35)) + tformat(damDesc(self, DamageType.BLIGHT, 7 + self:combatTalentSpellDamage(t, 6, 45)), self:combatTalentSpellDamage(t, 5, 35)) end, } @@ -166,7 +166,7 @@ newTalent{ if target:canBe("disease") then target:setEffect(disease.id, dur, parameters) else - game.logSeen(target, "%s resists the disease!", target.name:capitalize()) + game.logSeen(target, "%s resists the disease!", target:getName():capitalize()) end end end) @@ -180,7 +180,7 @@ newTalent{ return ([[Make your target's diseases burst, doing %0.2f blight damage for each disease it is infected with. This will also spread any diseases to any nearby foes in a radius of %d with a minimum duration of 6. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 115)), self:getTalentRadius(t)) + tformat(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 115)), self:getTalentRadius(t)) end, } @@ -226,7 +226,7 @@ newTalent{ local diseases = t.getTargetDiseases(self, target) if diseases and #diseases > 0 then -- Ravage diseased targets! - game.logSeen(target, "Diseases #DARK_GREEN#BURN THROUGH#LAST# %s!", target.name:capitalize()) + game.logSeen(target, "Diseases #DARK_GREEN#BURN THROUGH#LAST# %s!", target:getName():capitalize()) for i, d in ipairs(diseases) do target:removeEffect(d.id) DamageType:get(DamageType.BLIGHT).projector(self, px, py, DamageType.BLIGHT, d.params.dam * d.params.dur * t.getDamage(self, t)) @@ -235,7 +235,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getDuration(self, t), {apply_power=self:combatSpellpower()}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end end end) @@ -249,7 +249,7 @@ newTalent{ local duration = t.getDuration(self, t) local damage = t.getDamage(self, t) return ([[All your foes within a radius %d ball infected with a disease enter a cataleptic state, stunning them for %d turns and dealing %d%% of all remaining disease damage instantly.]]): - format(radius, duration, damage * 100) + tformat(radius, duration, damage * 100) end, } @@ -273,7 +273,7 @@ newTalent{ do_spread = function(self, t, carrier, dam) if not dam or type(dam) ~= "number" then return end if not rng.percent(100*dam/(t.spreadFactor(self, t)*carrier.max_life)) then return end - game.logSeen(self, "The diseases of %s spread!", self.name) + game.logSeen(self, "The diseases of %s spread!", self:getName()) -- List all diseases local diseases = {} for eff_id, p in pairs(carrier.tmp) do @@ -298,7 +298,7 @@ newTalent{ if target:canBe("disease") then target:setEffect(disease.id, dur, params) else - game.logSeen(target, "%s resists the disease!", target.name:capitalize()) + game.logSeen(target, "%s resists the disease!", target:getName():capitalize()) end game.level.map:particleEmitter(px, py, 1, "slime") end) @@ -326,6 +326,6 @@ newTalent{ Creatures suffering from that disease will also suffer healing reduction (%d%%) and diseases immunity reduction (%d%%). Epidemic is an extremely potent disease; as such, it fully ignores the target's diseases immunity. The damage will increase with your Spellpower, and the spread chance increases with the amount of blight damage dealt.]]): - format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 70)), t.spreadFactor(self, t)*100 ,t.healloss(self,t), t.disfact(self,t)) + tformat(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 70)), t.spreadFactor(self, t)*100 ,t.healloss(self,t), t.disfact(self,t)) end, } diff --git a/game/modules/tome/data/talents/corruptions/reaving-combat.lua b/game/modules/tome/data/talents/corruptions/reaving-combat.lua index e69c24f7e6751d9bdb76b164555ef082f21de416..9092563c3cf6694c8968d9f7887142e254a4b411 100644 --- a/game/modules/tome/data/talents/corruptions/reaving-combat.lua +++ b/game/modules/tome/data/talents/corruptions/reaving-combat.lua @@ -38,7 +38,7 @@ newTalent{ info = function(self, t) return ([[Allows you to dual wield any type of one handed weapons, and increases the damage of the off-hand weapon to %d%%. Also, casting a spell (which uses a turn) will give a free melee attack at a random target in melee range for %d%% blight damage.]]): - format(100*t.getoffmult(self,t), 100 * self:combatTalentWeaponDamage(t, 0.2, 0.7)) + tformat(100*t.getoffmult(self,t), 100 * self:combatTalentWeaponDamage(t, 0.2, 0.7)) end, } @@ -59,7 +59,7 @@ newTalent{ return ([[Each time you hit an enemy with a melee weapon you enter a bloodlust-infused frenzy, increasing your Spellpower by %0.1f. This effect stacks up to 10 times for a total Spellpower gain of %d. The frenzy lasts 3 turns.]]): - format(SPbonus, SPbonus*10) + tformat(SPbonus, SPbonus*10) end, } @@ -78,7 +78,7 @@ newTalent{ info = function(self, t) return ([[You gain a %d%% resistance to diseases, and each of your melee attacks have a %d%% chance to spread any diseases on your target. (As the Epidemic talent with the melee attack treated like blight damage.)]]): - format(t.getDiseaseImmune(self, t)*100, t.getDiseaseSpread(self, t)) + tformat(t.getDiseaseImmune(self, t)*100, t.getDiseaseSpread(self, t)) end, } @@ -103,6 +103,6 @@ newTalent{ This deals %0.2f acid damage each turn for 5 turns, and reduces the attacker's Accuracy by %d. At level 3, it will also reduce Armour by %d for 5 turns. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.ACID, self:combatTalentSpellDamage(t, 5, 30)), self:combatTalentSpellDamage(t, 15, 35), self:combatTalentSpellDamage(t, 15, 40)) + tformat(damDesc(self, DamageType.ACID, self:combatTalentSpellDamage(t, 5, 30)), self:combatTalentSpellDamage(t, 15, 35), self:combatTalentSpellDamage(t, 15, 40)) end, } diff --git a/game/modules/tome/data/talents/corruptions/rot.lua b/game/modules/tome/data/talents/corruptions/rot.lua index 47fb088200de3a4ef468b20c99793ddbcfc78f8a..44fa0631095d2d87632065aa884b7a40855e761b 100644 --- a/game/modules/tome/data/talents/corruptions/rot.lua +++ b/game/modules/tome/data/talents/corruptions/rot.lua @@ -21,7 +21,7 @@ newTalent{ name = "Infectious Bite", type = {"technique/other", 1}, points = 5, - message = "@Source@ bites blight poison into @target@.", + message = _t"@Source@ bites blight poison into @target@.", cooldown = 3, tactical = { ATTACK = {BLIGHT = 2}, }, requires_target = true, @@ -53,7 +53,7 @@ newTalent{ return ([[Bite the target, dealing %d%% melee damage If the attack hits you'll inject blight poison into the target, dealing %0.2f blight damage and a further %0.2f blight damage over 4 turns. The bonus damage improves with your Spellpower.]]) - :format(damage, damDesc(self, DamageType.BLIGHT, poison/4), damDesc(self, DamageType.BLIGHT, poison) ) + :tformat(damage, damDesc(self, DamageType.BLIGHT, poison/4), damDesc(self, DamageType.BLIGHT, poison) ) end } @@ -63,7 +63,7 @@ carrionworm = function(self, target, duration, x, y) type = "vermin", subtype = "worms", display = "w", color=colors.SANDY_BROWN, image = "npc/vermin_worms_carrion_worm_mass.png", name = "carrion worm mass", faction = self.faction, - desc = [[A worm spawned from a damaged horror. Destroying it may have consequences.]], + desc = _t[[A worm spawned from a damaged horror. Destroying it may have consequences.]], autolevel = "none", ai = "summoned", ai_real = "tactical", ai_state = { ai_move="move_complex", talent_in=1, ally_compassion=10, ai_target="target_closest", }, @@ -113,7 +113,7 @@ carrionworm = function(self, target, duration, x, y) 5, nil, engine.MapEffect.new{alpha=90, color_br=1, color_bg=1, color_bb=1, effect_shader="shader_images/poison_effect.png"} ) - game.logSeen(self, "%s exudes a corrupted gas as it dies.", self.name:capitalize()) + game.logSeen(self, "%s exudes a corrupted gas as it dies.", self:getName():capitalize()) end -- Snapshot the casters effective (not base) spellpower @@ -133,7 +133,7 @@ carrionworm = function(self, target, duration, x, y) control=false, temporary_level = true, type="summon", - title="Summon", + title=_t"Summon", }) end return m @@ -219,7 +219,7 @@ newTalent{ On taking damage greater than 15%% of your maximum health, the damage will be reduced by %d%% and a carrion worm mass will burst forth onto a nearby tile, attacking your foes for 5 turns. You can never have more than 5 worms active from any source at a time. When a carrion worm dies it will explode into a radius 2 pool of blight for 5 turns, dealing %0.2f blight damage each turn and healing you for 33%% of that amount.]]): - format(resist, affinity, reduction, damDesc(self, DamageType.BLIGHT, dam), dam) + tformat(resist, affinity, reduction, damDesc(self, DamageType.BLIGHT, dam), dam) end, } @@ -289,7 +289,7 @@ newTalent{ local vim = t.getVim(self, t) return ([[You disperse into a mass of carrion worms, reforming near the target location (%d teleport accuracy). If used on a worm mass, you merge with it, moving to it's location, healing you for %d, restoring %d vim, and destroying the mass.]]): -format (radius, heal, vim) +tformat (radius, heal, vim) end, } @@ -334,7 +334,7 @@ info = function(self, t) At talent level 4, this affects targets in a radius 1 ball. Your worms also have a %d%% chance to blind, silence, disarm or pin with their melee attacks, lasting 2 turns. The chance to apply this effect will increase with your Spellpower.]]): - format(chance, duration, chance/2) + tformat(chance, duration, chance/2) end, } @@ -378,7 +378,7 @@ newTalent{ if target:canBe("disease") then target:setEffect(target.EFF_WORM_ROT, 5, {src=self, dam=t.getDamage(self, t), burst=t.getBurstDamage(self, t), rot_timer = 5, apply_power=self:combatSpellpower()}) else - game.logSeen(target, "%s resists the worm rot!", target.name:capitalize()) + game.logSeen(target, "%s resists the worm rot!", target:getName():capitalize()) end game.level.map:particleEmitter(px, py, 1, "slime") end) @@ -395,6 +395,6 @@ If not cleared after five turns it will inflict %0.2f blight damage as the larva Even if this disease is removed early, there is still a %d%% chance for the larvae to hatch. You can never have more than 5 worms active from any source at a time. The damage dealt will increase with your Spellpower.]]): - format(damDesc(self, DamageType.ACID, (damage/2)), damDesc(self, DamageType.BLIGHT, (damage/2)), damDesc(self, DamageType.BLIGHT, (burst)), chance) + tformat(damDesc(self, DamageType.ACID, (damage/2)), damDesc(self, DamageType.BLIGHT, (damage/2)), damDesc(self, DamageType.BLIGHT, (burst)), chance) end, } diff --git a/game/modules/tome/data/talents/corruptions/sanguisuge.lua b/game/modules/tome/data/talents/corruptions/sanguisuge.lua index 30315be59d4978bbf655c9ec16664b7b74304ddd..32b1d52d766c1bf22f9c96f0104dd47e2aeb34d6 100644 --- a/game/modules/tome/data/talents/corruptions/sanguisuge.lua +++ b/game/modules/tome/data/talents/corruptions/sanguisuge.lua @@ -42,7 +42,7 @@ newTalent{ return ([[Fires a bolt of blight, doing %0.2f blight damage and replenishing 20%% of it as vim energy. The amount of vim regained depends on the target's rank (higher ranks give more vim). The effect will increase with your Spellpower.]]): - format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 25, 200))) + tformat(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 25, 200))) end, } @@ -59,7 +59,7 @@ newTalent{ end, info = function(self, t) return ([[The cost of using life instead of vim for talents is reduced to %d%%.]]): - format(t.getLifeCost(self,t)) + tformat(t.getLifeCost(self,t)) end, } @@ -94,7 +94,7 @@ newTalent{ info = function(self, t) return ([[Absorbs the life force of your foes as you kill them. As long as this talent is active, vim will decrease by 0.5 per turn and increase by %0.1f for each kill of a non-undead creature (in addition to the usual increase based on Willpower).]]): - format(t.VimOnDeath(self, t)) + tformat(t.VimOnDeath(self, t)) end, } @@ -117,6 +117,6 @@ newTalent{ return ([[Feed on the pain you cause your foes. For 2 turns you gain %d%% lifesteal on all damage dealt. The lifesteal will increase with your Spellpower.]]): - format(t.getMult(self,t)) + tformat(t.getMult(self,t)) end, } diff --git a/game/modules/tome/data/talents/corruptions/scourge.lua b/game/modules/tome/data/talents/corruptions/scourge.lua index 4a6945a139023391bbce2c6ea4e493097d6bd86c..2a1bda52a3b28b2ed8cfca3ee74d152b8e6b4bfb 100644 --- a/game/modules/tome/data/talents/corruptions/scourge.lua +++ b/game/modules/tome/data/talents/corruptions/scourge.lua @@ -80,7 +80,7 @@ newTalent{ end, info = function(self, t) return ([[Strike the target with both weapons dealing %d%% damage with each hit. Each strike that hits will increase the duration of the lowest duration disease effect by %d.]]): - format(100 * t.getDamage(self, t), t.getIncrease(self, t)) + tformat(100 * t.getDamage(self, t), t.getIncrease(self, t)) end, } @@ -110,7 +110,7 @@ newTalent{ local dam = damDesc(self, DamageType.BLIGHT, t.getDamage(self, t)) return ([[Concentrate on the corruption you bring, enhancing each of your melee strikes with %0.2f blight damage (which also heals you for %0.2f each hit). The damage will increase with your Spellpower.]]): - format(dam, dam * 0.4) + tformat(dam, dam * 0.4) end, } @@ -164,7 +164,7 @@ newTalent{ return ([[Strike with each of your weapons, doing %d%% acid weapon damage with each hit. If at least one of the strikes hits, an acid splash is generated, doing %0.2f acid damage to all enemies in radius %d around the foe you struck. The splash damage will increase with your Spellpower.]]): - format(100 * t.getDamage(self, t), damDesc(self, DamageType.ACID, t.getSplash(self, t)), self:getTalentRadius(t)) + tformat(100 * t.getDamage(self, t), damDesc(self, DamageType.ACID, t.getSplash(self, t)), self:getTalentRadius(t)) end, } @@ -206,6 +206,6 @@ newTalent{ end, info = function(self, t) return ([[Corrupt the target reducing disease immunity by 100%% for 2 turns and stripping up to 2 nature sustains then strike with both your weapons dealing %d%% damage.]]): - format(100 * t.getDamage(self, t)) + tformat(100 * t.getDamage(self, t)) end, } diff --git a/game/modules/tome/data/talents/corruptions/shadowflame.lua b/game/modules/tome/data/talents/corruptions/shadowflame.lua index b62b59c7542361206567a2d3c16675d9fa499913..86f66491f295965af083ba09e4320ae0dda6a4a8 100644 --- a/game/modules/tome/data/talents/corruptions/shadowflame.lua +++ b/game/modules/tome/data/talents/corruptions/shadowflame.lua @@ -38,7 +38,7 @@ newTalent{ Also increases your defense and armour by %d and %d, respectively. If you are still in a wall when the effect ends you will randomly teleport. ]]): - format(t.getDuration(self, t), t.getDefs(self, t)) + tformat(t.getDuration(self, t), t.getDefs(self, t)) end, } @@ -73,7 +73,7 @@ newTalent{ end, info = function(self, t) return ([[Conjures up a bolt of shadowflame that moves toward the target and explodes into a flash of darkness and fire, doing %0.2f fire damage and %0.2f darkness damage in a radius of %d. - The damage will increase with your Spellpower.]]):format( + The damage will increase with your Spellpower.]]):tformat( damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 28, 220) / 2), damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 28, 220) / 2), self:getTalentRadius(t) @@ -117,7 +117,7 @@ newTalent{ While in demon form, you gain %d%% fire resistance, %d%% darkness resistance, and your global speed is increased by %d%%. The flames of the Fearscape will heal you while in demon form. The resistances and heal will increase with your Spellpower.]]): - format(self:combatTalentSpellDamage(t, 20, 30), self:combatTalentSpellDamage(t, 20, 35), t.getSpeed(self, t)*100) + tformat(self:combatTalentSpellDamage(t, 20, 30), self:combatTalentSpellDamage(t, 20, 35), t.getSpeed(self, t)*100) end, } @@ -357,6 +357,6 @@ newTalent{ When the spell ends, only you and the target (if still alive) plus any loose objects are taken back to your home plane; all summons are left in the Fearscape. This powerful spell drains 5 vim per turn initially, increasing by +1 for each turn it has been active, and ends when your vim is depleted. It has no effect if cast from within the Fearscape. - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 12, 140))) + The damage will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 12, 140))) end, } diff --git a/game/modules/tome/data/talents/corruptions/torment.lua b/game/modules/tome/data/talents/corruptions/torment.lua index a17d55e4965c49d3d253864f95105a80fe5e85cc..c2486a4813ea7fc6cd6bef63ea67482cb2a56420 100644 --- a/game/modules/tome/data/talents/corruptions/torment.lua +++ b/game/modules/tome/data/talents/corruptions/torment.lua @@ -30,7 +30,7 @@ newTalent{ info = function(self, t) return ([[You set your mind toward a single goal: the destruction of all your foes. Increases the maximum amount of vim you can store by %d.]]): - format(t.VimBonus(self, t)) + tformat(t.VimBonus(self, t)) end, } @@ -65,7 +65,7 @@ newTalent{ end, info = function(self, t) return ([[Reach out and touch the blood and health of your foes. Any creatures caught in the radius 2 ball will be unable to heal above their current life value (at the time of the casting) for %d turns.]]): - format(t.getDuration(self, t)) + tformat(t.getDuration(self, t)) end, } @@ -105,7 +105,7 @@ newTalent{ end, info = function(self, t) return ([[When you kill a creature, the remainder of the damage done will not be lost. Instead, %d%% of it will splash in a radius 2 as blight damage. - The splash damage will increase with your Spellpower.]]):format(t.getOversplash(self,t)) + The splash damage will increase with your Spellpower.]]):tformat(t.getOversplash(self,t)) end, } @@ -147,7 +147,7 @@ newTalent{ for tid, cd in pairs(alt) do self:alterTalentCoolingdown(tid, -1) end - game.logSeen(self, "#RED#The powerful blow energizes %s reducing their cooldowns!#LAST#", self.name) + game.logSeen(self, "#RED#The powerful blow energizes %s reducing their cooldowns!#LAST#", self:getName()) end return cb.value @@ -157,6 +157,6 @@ newTalent{ return ([[When you are dealt a blow that reduces your life by at least %d%%, you have a %d%% chance to reduce the remaining cooldown of all your talents by 1. Temporary life from Sanguine Infusion will not count against the damage threshold. The chance will increase with your Spellpower.]]): - format(l, c) + tformat(l, c) end, } diff --git a/game/modules/tome/data/talents/corruptions/vile-life.lua b/game/modules/tome/data/talents/corruptions/vile-life.lua index f4a73bd911fc5c64383aa551bb455a719f7fc70a..3bf4ba6013e755b0d3aad9338f64e7f39ec86e2e 100644 --- a/game/modules/tome/data/talents/corruptions/vile-life.lua +++ b/game/modules/tome/data/talents/corruptions/vile-life.lua @@ -48,7 +48,7 @@ newTalent{ return ([[Inflicting pain and death invigorates you. Each time you deal a critical strike you gain %d life (this effect can only happen once per turn). Each time you kill a creature you gain %d life (this effect can only happen once per turn).]]): - format(t.heal(self, t), t.heal(self, t)) + tformat(t.heal(self, t), t.heal(self, t)) end, } @@ -115,7 +115,7 @@ newTalent{ - Nature: %d%% slow for 4 turns This effect can only happen once every 10 turns per damage type. The damage will increase with your Spellpower.]]): - format( + tformat( damDesc(self, DamageType.FIRE, t.getFire(self, t)), t.getCold(self, t), t.getAcid(self, t), @@ -154,7 +154,7 @@ newTalent{ info = function(self, t) return ([[You manipulate the vim of enemies in radius %d to temporarily invert all healing done to them (but not natural regeneration). For 5 turns all healing will instead damage them for %d%% of the healing done as blight. - The effect will increase with your Spellpower.]]):format(self:getTalentRadius(t), t.getPower(self,t)) + The effect will increase with your Spellpower.]]):tformat(self:getTalentRadius(t), t.getPower(self,t)) end, } @@ -196,7 +196,7 @@ newTalent{ self:cloneEffect(eff_id, target, {apply_power = self:combatSpellpower()}) if target:hasEffect(eff_id) then self:removeEffect(eff_id) - game:delayedLogMessage(self, target, "vile_transplant"..e.desc, ("#CRIMSON##Source# transfers an effect (%s) to #Target#!"):format(e.desc)) + game:delayedLogMessage(self, target, "vile_transplant"..e.desc, ("#CRIMSON##Source# transfers an effect (%s) to #Target#!"):tformat(e.desc)) self:incVim(-t.getVim(self, t)) -- Vim costs life if there isn't enough so no need to check total end end @@ -211,6 +211,6 @@ newTalent{ return ([[You transfer up to %d physical or magical detrimental effects currently affecting you to a nearby creature at a cost of %d vim per effect. Specific effect immunities will not prevent the transfer. The chance to transfer each effect increases with your Spellpower.]]): - format(t.getNb(self, t), t.getVim(self, t)) + tformat(t.getNb(self, t), t.getVim(self, t)) end, } diff --git a/game/modules/tome/data/talents/corruptions/vim.lua b/game/modules/tome/data/talents/corruptions/vim.lua index 21cb56aaa5896a23e464eb77c6d7c4f58f58a69c..74cc7dd488326d83884bafadb640721932ad0747 100644 --- a/game/modules/tome/data/talents/corruptions/vim.lua +++ b/game/modules/tome/data/talents/corruptions/vim.lua @@ -41,7 +41,7 @@ newTalent{ return ([[Projects a bolt of pure blight, doing %0.2f blight damage. This spell has an improved critical strike chance of +%0.2f%%. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 20, 250)), t.getCritChance(self, t)) + tformat(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 20, 250)), t.getCritChance(self, t)) end, } @@ -96,7 +96,7 @@ newTalent{ info = function(self, t) return ([[Open a dark portal (radius 3) to the target zone. All creatures caught inside will be teleported to your location, and you to theirs. All creatures (except you) traversing the portal will catch a random disease, doing %0.2f blight damage per turn for 6 turns and reducing one of its physical stats (strength, constitution, dexterity) by %d. - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 12, 80)), self:combatTalentSpellDamage(t, 5, 25)) + The damage will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 12, 80)), self:combatTalentSpellDamage(t, 5, 25)) end, } @@ -134,7 +134,7 @@ newTalent{ return ([[Feel the very existence of creatures around you for %d turns, in a radius of 10. The evil touch will reduce their blight resistance by %d%% and all saves by %d, but also make them aware of you. The resistance and save reduction will improve with your Spellpower.]]): - format(t.getDuration(self,t), t.getResistPenalty(self,t), t.getSaves(self, t)) + tformat(t.getDuration(self,t), t.getResistPenalty(self,t), t.getSaves(self, t)) end, } @@ -149,7 +149,7 @@ newTalent{ getHeal = function(self, t) return self:combatTalentScale(t, 4, 15, 0.75) end, info = function(self, t) return ([[Each time a creature affected by vimsense hurts you, you regain %0.2f vim and %0.2f health.]]): - format(t.getVim(self,t),t.getHeal(self,t)) + tformat(t.getVim(self,t),t.getHeal(self,t)) end, } diff --git a/game/modules/tome/data/talents/cunning/ambush.lua b/game/modules/tome/data/talents/cunning/ambush.lua index 51ea1f99e654a4fc29165b587b4b2c96bde4cf0f..49a4335d7028258e5d7b4453cc982e0565dc826f 100644 --- a/game/modules/tome/data/talents/cunning/ambush.lua +++ b/game/modules/tome/data/talents/cunning/ambush.lua @@ -45,7 +45,7 @@ newTalent{ local defence = t.getDefense(self, t) return ([[Your Soothing Darkness talent effect now grants 25%% all damage resistance on exiting stealth. When your life drops below 50%% you become immune to negative detrimental effects for %d turns and gain %d defense and %d spellpower for %d turns.]]): - format(duration2, defence, spellpower, duration) + tformat(duration2, defence, spellpower, duration) end, } @@ -86,13 +86,13 @@ newTalent{ if target:canBe("silence") then target:setEffect(target.EFF_SILENCED, t.getDuration(self, t), {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists the silence!", target.name:capitalize()) + game.logSeen(target, "%s resists the silence!", target:getName():capitalize()) end if target:canBe("disarm") then target:setEffect(target.EFF_DISARMED, t.getDuration(self, t), {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists the disarm!", target.name:capitalize()) + game.logSeen(target, "%s resists the disarm!", target:getName():capitalize()) end game:playSoundNear(self, "talents/arcane") @@ -104,7 +104,7 @@ newTalent{ return ([[You reach out with the shadows silencing and disarming your target for %d turns. The shadows will deal %d darkness damage to the target and pull it to you. The chance to apply debuffs improves with your Accuracy and the damage with your Spellpower.]]): - format(duration, damDesc(self, DamageType.DARKNESS, damage)) + tformat(duration, damDesc(self, DamageType.DARKNESS, damage)) end, } @@ -125,7 +125,7 @@ newTalent{ return ([[Your mastery of dark magic empowers you. You gain %d Accuracy, %d Defense, and %d%% Darkness damage penetration. The effects will increase with your Spellpower stat.]]) - :format(t.getAccuracy(self, t), t.getDefense(self, t), t.getPenetration(self, t)) + :tformat(t.getAccuracy(self, t), t.getDefense(self, t), t.getPenetration(self, t)) end, } @@ -195,6 +195,6 @@ newTalent{ If a target isn't found this effect ends. The movement is not considered a teleport. The resistance will increase with your Spellpower stat.]]): - format(duration, t.getBlinkRange(self, t) ,100 * damage, res) + tformat(duration, t.getBlinkRange(self, t) ,100 * damage, res) end, } diff --git a/game/modules/tome/data/talents/cunning/artifice.lua b/game/modules/tome/data/talents/cunning/artifice.lua index b3818b4c92022821bdf6d27be948b48612a15428..7615660fa3a124e6608f10df3d60a4a0e5fc7797 100644 --- a/game/modules/tome/data/talents/cunning/artifice.lua +++ b/game/modules/tome/data/talents/cunning/artifice.lua @@ -71,14 +71,14 @@ function artifice_tools_get_descs(self, t) local tool, desc = self:getTalentFromId(tool_id) local prepped = self.artifice_tools[t.id] == tool_id if prepped then - desc = ("#YELLOW#%s (prepared, level %s)#LAST#:\n"):format(tool.name, self:getTalentLevelRaw(tool)) + desc = ("#YELLOW#%s (prepared, level %s)#LAST#:\n"):tformat(tool.name, self:getTalentLevelRaw(tool)) else desc = tool.name..":\n" end if tool.short_info then desc = desc..tool.short_info(self, tool, t).."\n" else - desc = desc.."#GREY#(see talent description)#LAST#\n" + desc = desc.._t"#GREY#(see talent description)#LAST#\n" end tool_descs[#tool_descs+1] = desc end @@ -100,7 +100,7 @@ function artifice_tools_npc_select(self, t, silent, fake) self:startTalentCooldown(t); self:startTalentCooldown(tid) self:useEnergy() end - game.logSeen(self, "#GREY#You notice %s has prepared: %s.", self.name:capitalize(), self:getTalentFromId(tid).name) + game.logSeen(self, "#GREY#You notice %s has prepared: %s.", self:getName():capitalize(), self:getTalentFromId(tid).name) break end tid = rng.tableRemove(tool_ids) @@ -143,7 +143,7 @@ newTalent{ %s Preparing a tool sets its talent level and puts it on cooldown. -]]):format(self:getTalentLevelRaw(t), descs) +]]):tformat(self:getTalentLevelRaw(t), descs) end, } @@ -176,7 +176,7 @@ newTalent{ %s Preparing a tool sets its talent level and puts it on cooldown. Only one tool of each type can be equipped at a time. -]]):format(self:getTalentLevelRaw(t), descs) +]]):tformat(self:getTalentLevelRaw(t), descs) end, } @@ -209,7 +209,7 @@ newTalent{ %s Preparing a tool sets its talent level and puts it on cooldown. Only one tool of each type can be equipped at a time. -]]):format(self:getTalentLevelRaw(t), descs) +]]):tformat(self:getTalentLevelRaw(t), descs) end, } @@ -258,7 +258,7 @@ newTalent{ return tool_id ~= nil -- only use energy/cooldown if a new tool was mastered end, info = function(self, t) - local tool = "none" + local tool = _t"none" if self.artifice_tools_mastery then tool = self:getTalentFromId(self.artifice_tools_mastery).name end @@ -271,14 +271,14 @@ newTalent{ local desc local prepped = self.artifice_tools_mastery == tool_id if prepped then - desc = ("#YELLOW#%s (%s)#LAST#\n"):format(tool.name, mt.name) + desc = ("#YELLOW#%s (%s)#LAST#\n"):tformat(tool.name, mt.name) else - desc = ("%s (%s)\n"):format(tool.name, mt.name) + desc = ("%s (%s)\n"):tformat(tool.name, mt.name) end if mt.short_info then desc = desc..mt.short_info(self, mt).."\n" else - desc = desc.."#GREY#(see talent description)#LAST#\n" + desc = desc.._t"#GREY#(see talent description)#LAST#\n" end mastery_descs[#mastery_descs+1] = desc end @@ -288,7 +288,7 @@ newTalent{ %s The effects depend on this talent's level. -Mastering a new tool places it (and its special effects, as appropriate) on cooldown.]]):format(tool, mastery_descs) +Mastering a new tool places it (and its special effects, as appropriate) on cooldown.]]):tformat(tool, mastery_descs) end, } @@ -325,17 +325,17 @@ newTalent{ end end, short_info = function(self, t, slot_talent) - return ([[Melee criticals trigger an extra unarmed attack, inflicting %d%% damage. 4 turn cooldown.]]):format(t.getDamage(self, slot_talent)*100) + return ([[Melee criticals trigger an extra unarmed attack, inflicting %d%% damage. 4 turn cooldown.]]):tformat(t.getDamage(self, slot_talent)*100) end, info = function(self, t) local dam = t.getDamage(self, t) - local slot = "not prepared" + local slot = _t"not prepared" for slot_id, tool_id in pairs(self.artifice_tools or {}) do if tool_id == t.id then slot = self:getTalentFromId(slot_id).name break end end return ([[You conceal spring loaded blades within your equipment. On scoring a critical strike, you follow up with your blades for %d%% damage (as an unarmed attack). This talent has a cooldown. -#YELLOW#Prepared with: %s#LAST#]]):format(dam*100, slot) +#YELLOW#Prepared with: %s#LAST#]]):tformat(dam*100, slot) end, } @@ -391,14 +391,14 @@ newTalent{ return true end, short_info = function(self, t) - return ([[You prime your Hidden Blades to cause bleeding and facilitate the Assassinate ability, which allows you to strike twice for %d%% unarmed damage, hitting automatically while ignoring armor and resistance.]]):format(t.getDamage(self, t)*100) + return ([[You prime your Hidden Blades to cause bleeding and facilitate the Assassinate ability, which allows you to strike twice for %d%% unarmed damage, hitting automatically while ignoring armor and resistance.]]):tformat(t.getDamage(self, t)*100) end, info = function(self, t) local damage = t.getDamage(self, t) * 100 local bleed = t.getBleed(self,t) * 100 return ([[You strike your target with your Hidden Blades twice in a vital spot for %d%% unarmed (physical) damage. You must be able to see your target to use this attack, but it always hits and ignores all armor and physical resistance. In addition, your hidden blades now inflict a further %d%% of all damage dealt as bleeding over 5 turns.]]) - :format(damage, bleed) + :tformat(damage, bleed) end, } @@ -452,7 +452,7 @@ newTalent{ end end if known then - game.logSeen(self, "%s is cured!", self.name:capitalize()) + game.logSeen(self, "%s is cured!", self:getName():capitalize()) end self:incStamina(sta) @@ -466,18 +466,18 @@ newTalent{ end, short_info = function(self, t, slot_talent) - return ([[Prepare a potion that restores %d life, %d stamina, and cures %d negative physical effects. 20 turn cooldown.]]):format(t.getHeal(self, slot_talent), t.getStam(self, slot_talent), t.getCure(self, slot_talent)) + return ([[Prepare a potion that restores %d life, %d stamina, and cures %d negative physical effects. 20 turn cooldown.]]):tformat(t.getHeal(self, slot_talent), t.getStam(self, slot_talent), t.getCure(self, slot_talent)) end, info = function(self, t) local heal = t.getHeal(self, t) local sta = t.getStam(self, t) local cure = t.getCure(self,t) - local slot = "not prepared" + local slot = _t"not prepared" for slot_id, tool_id in pairs(self.artifice_tools or {}) do if tool_id == t.id then slot = self:getTalentFromId(slot_id).name break end end return ([[Imbibe a potent mixture of energizing and restorative substances, restoring %d life, %d stamina and curing %d detrimental physical effects. The restorative effects improve with your Cunning. - #YELLOW#Prepared with: %s#LAST#]]):format(heal, sta, cure, slot) + #YELLOW#Prepared with: %s#LAST#]]):tformat(heal, sta, cure, slot) end, } @@ -488,10 +488,10 @@ newTalent{ points = 1, getDieAt = function(self, t) return self:combatTalentScale(self:getTalentFromId(self.T_MASTER_ARTIFICER), 100, 600) end, short_info = function(self, t) - return ([[Your Rogue's Brew fortifies you for 8 turns, preventing you from dying until you reach -%d life.]]):format(t.getDieAt(self, t)) + return ([[Your Rogue's Brew fortifies you for 8 turns, preventing you from dying until you reach -%d life.]]):tformat(t.getDieAt(self, t)) end, info = function(self, t) - return ([[Adjust your Rogue's Brew formulation so that it fortifies you for 8 turns, preventing you from dying until you reach -%d life.]]):format(t.getDieAt(self,t)) + return ([[Adjust your Rogue's Brew formulation so that it fortifies you for 8 turns, preventing you from dying until you reach -%d life.]]):tformat(t.getDieAt(self,t)) end, } @@ -571,17 +571,17 @@ newTalent{ return true end, short_info = function(self, t, slot_talent) - return ([[Throw a smokebomb creating a radius 2 cloud of smoke, lasting %d turns, that blocks sight and reduces enemies' vision by %d. 15 turn cooldown.]]):format(t.getDuration(self, slot_talent), t.getSightLoss(self, slot_talent)) + return ([[Throw a smokebomb creating a radius 2 cloud of smoke, lasting %d turns, that blocks sight and reduces enemies' vision by %d. 15 turn cooldown.]]):tformat(t.getDuration(self, slot_talent), t.getSightLoss(self, slot_talent)) end, info = function(self, t) - local slot = "not prepared" + local slot = _t"not prepared" for slot_id, tool_id in pairs(self.artifice_tools or {}) do if tool_id == t.id then slot = self:getTalentFromId(slot_id).name break end end return ([[Throw a vial of volatile liquid that explodes in a radius %d cloud of smoke lasting %d turns. The smoke blocks line of sight, and enemies within will have their vision range reduced by %d. Use of this talent will not break stealth, and creatures affected by the smokes can never prevent you from activating stealth, even if their proximity would normally forbid it. #YELLOW#Prepared with: %s#LAST#]]): - format(self:getTalentRadius(t), t.getDuration(self, t), t.getSightLoss(self,t), slot) + tformat(self:getTalentRadius(t), t.getDuration(self, t), t.getSightLoss(self,t), slot) end, } @@ -592,11 +592,11 @@ newTalent{ mode = "passive", getDamage = function (self, t) return 30 + self:combatTalentStatDamage(self:getTalentFromId(self.T_MASTER_ARTIFICER), "cun", 10, 150) end, short_info = function(self, t) - return ([[Your Smokescreen is infused with chokedust. Enemies in the smoke take %0.2f nature damage and may be silenced.]]):format(t.getDamage(self, t)) + return ([[Your Smokescreen is infused with chokedust. Enemies in the smoke take %0.2f nature damage and may be silenced.]]):tformat(t.getDamage(self, t)) end, info = function(self, t) return ([[You infuse your smoke bomb with chokedust. Each turn, enemies in the smoke take %0.2f nature damage and are 50%% likely to be silenced.]]): - format(damDesc(self, DamageType.NATURE, t.getDamage(self,t))) + tformat(damDesc(self, DamageType.NATURE, t.getDamage(self,t))) end, } @@ -639,7 +639,7 @@ newTalent{ target:setEffect(target.EFF_SEDATED, 4, {src=self, power=t.getSleepPower(self,t), slow=slow, insomnia=20, no_ct_effect=true, apply_power=self:combatAttack()}) game.level.map:particleEmitter(target.x, target.y, 1, "generic_charge", {rm=180, rM=200, gm=100, gM=120, bm=30, bM=50, am=70, aM=180}) else - game.logSeen(self, "%s resists the sedation!", target.name:capitalize()) + game.logSeen(self, "%s resists the sedation!", target:getName():capitalize()) end end) @@ -647,19 +647,19 @@ newTalent{ return true end, short_info = function(self, t, slot_talent) - return ([[Fire a poisoned dart dealing %0.2f physical damage that puts the target to sleep for 4 turns. 10 turn cooldown.]]):format(t.getDamage(self, slot_talent)) + return ([[Fire a poisoned dart dealing %0.2f physical damage that puts the target to sleep for 4 turns. 10 turn cooldown.]]):tformat(t.getDamage(self, slot_talent)) end, info = function(self, t) local dam = t.getDamage(self,t) local power = t.getSleepPower(self,t) - local slot = "not prepared" + local slot = _t"not prepared" for slot_id, tool_id in pairs(self.artifice_tools or {}) do if tool_id == t.id then slot = self:getTalentFromId(slot_id).name break end end return ([[Fire a poisoned dart from a silent, concealed launcher on your person that deals %0.2f physical damage and puts the target (living only) to sleep for 4 turns, rendering them unable to act. Every %d points of damage the target takes brings it closer to waking by 1 turn. This can be used without breaking stealth. #YELLOW#Prepared with: %s#LAST#]]): - format(damDesc(self, DamageType.PHYSICAL, dam), power, slot) + tformat(damDesc(self, DamageType.PHYSICAL, dam), power, slot) end, } @@ -670,11 +670,11 @@ newTalent{ points = 1, getSlow = function(self, t) return self:combatTalentLimit(self:getTalentFromId(self.T_MASTER_ARTIFICER), 50, 15, 40)/100 end, short_info = function(self, t) - return ([[Your darts ignore poison and sleep immunity and waking targets are slowed by %d%% for 4 turns.]]):format(t.getSlow(self, t)*100) + return ([[Your darts ignore poison and sleep immunity and waking targets are slowed by %d%% for 4 turns.]]):tformat(t.getSlow(self, t)*100) end, info = function(self, t) return ([[The sleeping poison of your Dart Launcher becomes potent enough to ignore immunity, and upon waking the target is slowed by %d%% for 4 turns.]]): - format(t.getSlow(self, t)*100) + tformat(t.getSlow(self, t)*100) end, } @@ -750,7 +750,7 @@ newTalent{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, 2, {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists the pin!", target.name:capitalize()) + game.logSeen(target, "%s resists the pin!", target:getName():capitalize()) end if dam > 0 then if target:canBe("cut") then target:setEffect(target.EFF_CUT, 4, {power=dam2/4, src=self, no_ct_effect=true}) end @@ -772,7 +772,7 @@ newTalent{ ok = false return end - game.logSeen(self, "%s uses a grappling hook to pull %s %s!", self.name:capitalize(), self:his_her_self(), game.level.map:compassDirection(tx - self.x, ty - self.y)) + game.logSeen(self, "%s uses a grappling hook to pull %s %s!", self:getName():capitalize(), self:his_her_self(), game.level.map:compassDirection(tx - self.x, ty - self.y)) local ox, oy = self.x, self.y self:move(tx, ty, true) if config.settings.tome.smooth_move > 0 then @@ -789,18 +789,18 @@ newTalent{ return ok end, short_info = function(self, t, slot_talent) - return ([[Throw a grappling hook up to range %d that drags you towards the target or the target towards you. 8 turn cooldown.]]):format(t.range(self, slot_talent)) + return ([[Throw a grappling hook up to range %d that drags you towards the target or the target towards you. 8 turn cooldown.]]):tformat(t.range(self, slot_talent)) end, info = function(self, t) local range = t.range(self,t) - local slot = "not prepared" + local slot = _t"not prepared" for slot_id, tool_id in pairs(self.artifice_tools or {}) do if tool_id == t.id then slot = self:getTalentFromId(slot_id).name break end end return ([[Toss out a grappling hook to a target within range %d. If this strikes either a wall or a creature that is immovable or larger than you, you will pull yourself towards it, otherwise, you will drag the target towards you. Creatures struck by the hook will be pinned for 2 turns. Your grapple target must be at least 2 tiles from you. #YELLOW#Prepared with: %s#LAST#]]): - format(range, slot) + tformat(range, slot) end, } @@ -812,11 +812,11 @@ newTalent{ getDamage = function (self, t) return self:combatTalentWeaponDamage(self:getTalentLevel(self.T_MASTER_ARTIFICER), 1.0, 1.9) end, getSecondaryDamage = function (self, t) return 30 + self:combatTalentStatDamage(self:getTalentFromId(self.T_MASTER_ARTIFICER), "cun", 15, 200) end, short_info = function(self, t) - return ([[Your grappling hook deals %d%% unarmed damage when it hits, plus a further %0.2f physical and %0.2f nature damage over 4 turns.]]):format(t.getDamage(self, t)*100, damDesc(self, DamageType.PHYSICAL, t.getSecondaryDamage(self,t)), damDesc(self, DamageType.NATURE, t.getSecondaryDamage(self,t))) + return ([[Your grappling hook deals %d%% unarmed damage when it hits, plus a further %0.2f physical and %0.2f nature damage over 4 turns.]]):tformat(t.getDamage(self, t)*100, damDesc(self, DamageType.PHYSICAL, t.getSecondaryDamage(self,t)), damDesc(self, DamageType.NATURE, t.getSecondaryDamage(self,t))) end, info = function(self, t) return ([[Your grappling hook is tipped with vicious, venomous barbs. Creatures struck by it will be hit for %d%% unarmed damage, bleed for %0.2f physical damage and be poisoned for %0.2f nature damage over 4 turns.]]): - format(t.getDamage(self, t)*100, damDesc(self, DamageType.PHYSICAL, t.getSecondaryDamage(self,t)), damDesc(self, DamageType.NATURE, t.getSecondaryDamage(self,t))) + tformat(t.getDamage(self, t)*100, damDesc(self, DamageType.PHYSICAL, t.getSecondaryDamage(self,t)), damDesc(self, DamageType.NATURE, t.getSecondaryDamage(self,t))) end, } -- idea: Flash powder tool: Set off a bright flash with smoke and "phase-door" to a nearby spot. Mastery: triggers stealth and makes NPC's in LOS lose track. diff --git a/game/modules/tome/data/talents/cunning/called-shots.lua b/game/modules/tome/data/talents/cunning/called-shots.lua index 729a57318e68c7a30b56c1c0f12a8525bc5c3cba..a6238b7652141e5b868b64d62fdaf6f08f360a9a 100644 --- a/game/modules/tome/data/talents/cunning/called-shots.lua +++ b/game/modules/tome/data/talents/cunning/called-shots.lua @@ -96,7 +96,7 @@ newTalent { if target:canBe("pin") then target:setEffect(target.EFF_PINNED, t.pin_duration(self, t), {apply_power = self:combatAttack()}) else - game.logSeen(target, "%s resists being knocked down.", target.name:capitalize()) + game.logSeen(target, "%s resists being knocked down.", target:getName():capitalize()) end pen_off(self, t, target, x, y) end, @@ -110,7 +110,7 @@ newTalent { return ([[Strike your opponent in the knee (or other critical point in an ambulatory appendage) for %d%% weapon damage, knocking them down (%d turn pin) and slowing their movement by %d%% for %d turns afterwards. This shot will bypass other enemies between you and your target. The slow effect becomes more powerful with your Cunning.]]) - :format(t.damage_multiplier(self, t) * 100, + :tformat(t.damage_multiplier(self, t) * 100, t.pin_duration(self, t), t.slow_power(self, t) * 100, t.slow_duration(self, t)) @@ -180,7 +180,7 @@ newTalent { This shot is focused on precision at long range and deals base %d%% ranged damage with a bonus that increases with distance. The ranged bonus is %d%% (penalty) at point blank range, while at your maximum range of %d it is %d%%. This shot will bypass other enemies between you and your target.]]) - :format(t.damage_multiplier(self, t) * 100, t.getDistanceBonus(self, t, 1)*100, range, t.getDistanceBonus(self, t, range)*100) + :tformat(t.damage_multiplier(self, t) * 100, t.getDistanceBonus(self, t, 1)*100, range, t.getDistanceBonus(self, t, range)*100) end, } @@ -207,7 +207,7 @@ newTalent { if target:canBe("stun") then target:setEffect(target.EFF_SKIRMISHER_STUN_INCREASE, 1, {apply_power = self:combatAttack()}) else - game.logSeen(target, "%s resists the stunning shot!", target.name:capitalize()) + game.logSeen(target, "%s resists the stunning shot!", target:getName():capitalize()) end pen_off(self, t, target, x, y) end, @@ -219,7 +219,7 @@ newTalent { Each shot deals %d%% Ranged damage and will try to stun or increase the target's stun duration by 1. These shots will bypass other enemies between you and your target. The chance to stun increases with your Accuracy.]]) - :format(t.damage_multiplier(self, t) * 100) + :tformat(t.damage_multiplier(self, t) * 100) end, } @@ -234,7 +234,7 @@ newTalent { info = function(self, t) local bonuses = sniper_bonuses(self, true) return ([[Your mastery of called shots is unparalleled. and you gain %d%% bonus critical chance and %d%% critical damage with your Called Shots Talents. At rank 3 the cooldowns of all of your Called Shots Talents are reduced by 2 each. At rank 5 you gain %d%% Physical resistance penetration with all Called Shot attacks.]]) - :format(bonuses.crit_chance, + :tformat(bonuses.crit_chance, bonuses.crit_power * 100, bonuses.resists_pen[DamageType.PHYSICAL]) end diff --git a/game/modules/tome/data/talents/cunning/cunning.lua b/game/modules/tome/data/talents/cunning/cunning.lua index 744f5bf80c65f0d93364b25619fd60a2f7c0b97d..13e0dd62168ab2e8920e95a0b5a04d6b02065e1b 100644 --- a/game/modules/tome/data/talents/cunning/cunning.lua +++ b/game/modules/tome/data/talents/cunning/cunning.lua @@ -18,28 +18,28 @@ -- darkgod@te4.org -- Cunning talents -newTalentType{ allow_random=true, type="cunning/stealth-base", name = "stealth", description = "Allows the user to enter stealth." } -newTalentType{ allow_random=true, type="cunning/stealth", name = "stealth", description = "Allows the user to enter stealth." } -newTalentType{ allow_random=true, type="cunning/trapping", name = "trapping", description = "The knowledge of trap laying and assorted trickeries." } -newTalentType{ allow_random=true, type="cunning/traps", name = "traps", description = "Collection of known traps." } -newTalentType{ allow_random=true, type="cunning/poisons", name = "poisons", description = "The knowledge of poisons and how to apply them to 'good' effects." } -newTalentType{ allow_random=true, type="cunning/poisons-effects", name = "poisons", description = "Collection of known poisons." } -newTalentType{ allow_random=true, type="cunning/dirty", name = "dirty fighting", description = "Teaches various talents to cripple your foes." } -newTalentType{ allow_random=true, type="cunning/lethality", generic = true, name = "lethality", description = "How to make your foes feel the pain." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="cunning/shadow-magic", name = "shadow magic", description = "Blending magic and shadows." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="cunning/ambush", name = "ambush", min_lev = 10, description = "Using darkness and a bit of magic, you manipulate the shadows." } -newTalentType{ allow_random=true, type="cunning/survival", name = "survival", generic = true, description = "The knowledge of the dangers of the world, and how to best avoid them." } -newTalentType{ allow_random=true, type="cunning/tactical", name = "tactical", description = "Tactical combat abilities." } -newTalentType{ allow_random=true, type="cunning/scoundrel", name = "scoundrel", generic = true, description = "The use of ungentlemanly techniques." } -newTalentType{ allow_random=true, type="cunning/artifice", name = "artifice", min_lev = 10, description = "Create and use cunning tools." } -newTalentType{ allow_random=true, type="cunning/tools", name = "tools", description = "Artificer's tools." } +newTalentType{ allow_random=true, type="cunning/stealth-base", name = _t"stealth", description = _t"Allows the user to enter stealth." } +newTalentType{ allow_random=true, type="cunning/stealth", name = _t"stealth", description = _t"Allows the user to enter stealth." } +newTalentType{ allow_random=true, type="cunning/trapping", name = _t"trapping", description = _t"The knowledge of trap laying and assorted trickeries." } +newTalentType{ allow_random=true, type="cunning/traps", name = _t"traps", description = _t"Collection of known traps." } +newTalentType{ allow_random=true, type="cunning/poisons", name = _t"poisons", description = _t"The knowledge of poisons and how to apply them to 'good' effects." } +newTalentType{ allow_random=true, type="cunning/poisons-effects", name = _t"poisons", description = _t"Collection of known poisons." } +newTalentType{ allow_random=true, type="cunning/dirty", name = _t"dirty fighting", description = _t"Teaches various talents to cripple your foes." } +newTalentType{ allow_random=true, type="cunning/lethality", generic = true, name = _t"lethality", description = _t"How to make your foes feel the pain." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="cunning/shadow-magic", name = _t"shadow magic", description = _t"Blending magic and shadows." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="cunning/ambush", name = _t"ambush", min_lev = 10, description = _t"Using darkness and a bit of magic, you manipulate the shadows." } +newTalentType{ allow_random=true, type="cunning/survival", name = _t"survival", generic = true, description = _t"The knowledge of the dangers of the world, and how to best avoid them." } +newTalentType{ allow_random=true, type="cunning/tactical", name = _t"tactical", description = _t"Tactical combat abilities." } +newTalentType{ allow_random=true, type="cunning/scoundrel", name = _t"scoundrel", generic = true, description = _t"The use of ungentlemanly techniques." } +newTalentType{ allow_random=true, type="cunning/artifice", name = _t"artifice", min_lev = 10, description = _t"Create and use cunning tools." } +newTalentType{ allow_random=true, type="cunning/tools", name = _t"tools", description = _t"Artificer's tools." } -- Skirmisher newTalentType { type = "cunning/called-shots", - name = "Called Shots", + name = _t"Called Shots", allow_random = true, - description = "Inflict maximum pain to specific places on your enemies.", + description = _t"Inflict maximum pain to specific places on your enemies.", } -- Generic requires for cunning based on talent level @@ -86,7 +86,7 @@ cuns_req_high5 = { -- talents that require unlocking (specific poisons, traps) cuns_req_unlock = { - special = {desc="Talent not unlocked", fct=function(self, t, offset) + special = {desc=_t"Talent not unlocked", fct=function(self, t, offset) return game.state:unlockTalentCheck(t.id, self) end} } diff --git a/game/modules/tome/data/talents/cunning/dirty.lua b/game/modules/tome/data/talents/cunning/dirty.lua index b2baca96002ca0f2f36a58417342f9a755da77a6..a59c62cbbed1f9ac7b040376de16d56dbcc47a82 100644 --- a/game/modules/tome/data/talents/cunning/dirty.lua +++ b/game/modules/tome/data/talents/cunning/dirty.lua @@ -54,7 +54,7 @@ newTalent{ local power = t.getPower(self,t) return ([[You make a low blow against a sensitive point on the target, dealing %d%% unarmed damage. If your attack hits, the target is left reeling and vulnerable, reducing their physical save by %d and their stun, blind, confusion and pin immunities to 50%% of normal for %d turns. This effect bypasses saves.]]): - format(100 * damage, power, duration) + tformat(100 * damage, power, duration) end, } @@ -106,7 +106,7 @@ newTalent{ For this purpose, disabling effects are stun, blind, daze, confuse, pin, disarm, cripple and silence. In addition, for each disabling effect the target is under, your melee attacks have a %d%% (to a maximum of %d%%) chance to inflict a new effect on them (that they do not already have): either disarm, cripple (25%% power) or pin for 2 turns. The chance to further disable the target increases with your Accuracy.]]): - format(dam, dam*3, chance, chance*3) + tformat(dam, dam*3, chance, chance*3) end, } @@ -143,7 +143,7 @@ newTalent{ local speed = t.getSlow(self,t) local duration = t.getDuration(self, t) return ([[Throw a cloud of blinding dust in a radius %d cone. Enemies within will be blinded, as well as having their accuracy reduced by %d and movement speed decreased by %d%% for %d turns. - The chance to inflict these effects increase with your Accuracy.]]):format(self:getTalentRadius(t), accuracy, speed, duration) + The chance to inflict these effects increase with your Accuracy.]]):tformat(self:getTalentRadius(t), accuracy, speed, duration) end, } @@ -180,7 +180,7 @@ newTalent{ if e.status == "detrimental" and e.type ~= "other" and e.decrease ~= 0 then p.dur = p.dur + dur nb = nb + 1 - game.logSeen(target, "#CRIMSON#%s's %s was extended!#LAST#", target.name:capitalize(), util.getval(p.getName, p) or e.desc) + game.logSeen(target, "#CRIMSON#%s's %s was extended!#LAST#", target:getName():capitalize(), util.getval(p.getName, p) or e.desc) if nb >= max_nb then break end end end @@ -202,9 +202,9 @@ newTalent{ p.dur = p.dur - dur if p.dur <= 0 then target:removeEffect(eff[1]) - game.logSeen(target, "#CRIMSON#%s's %s was stripped!#LAST#", target.name:capitalize(), util.getval(p.getName, p) or eff[2].desc) + game.logSeen(target, "#CRIMSON#%s's %s was stripped!#LAST#", target:getName():capitalize(), util.getval(p.getName, p) or eff[2].desc) else - game.logSeen(target, "#CRIMSON#%s's %s was disrupted!#LAST#", target.name:capitalize(), util.getval(p.getName, p) or eff[2].desc) + game.logSeen(target, "#CRIMSON#%s's %s was disrupted!#LAST#", target:getName():capitalize(), util.getval(p.getName, p) or eff[2].desc) end else break end @@ -218,6 +218,6 @@ newTalent{ local dur = t.getDuration(self, t) local nb = t.getDebuffs(self, t) return ([[Make a painful strike dealing %d%% weapon damage that increases the duration of up to %d negative effect(s) on the target by %d turns. For each negative effect extended this way, the duration of a beneficial effect is reduced by the same amount, possibly canceling it.]]): - format(100 * damage, nb, dur) + tformat(100 * damage, nb, dur) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/cunning/lethality.lua b/game/modules/tome/data/talents/cunning/lethality.lua index 5ba24fa5404ca7d0107e0de66efbea77b54b1716..27a7521590c837d8ec7b13dbba54da6ecc538d47 100644 --- a/game/modules/tome/data/talents/cunning/lethality.lua +++ b/game/modules/tome/data/talents/cunning/lethality.lua @@ -34,7 +34,7 @@ newTalent{ local power = t.critpower(self, t) return ([[You have learned to find and hit weak spots. All your strikes have a %0.1f%% greater chance to be critical hits, and your critical hits do %0.1f%% more damage. Also, when using knives and throwing knives, you now use your Cunning instead of your Strength for bonus damage.]]): - format(critchance, power) + tformat(critchance, power) end, } @@ -79,7 +79,7 @@ newTalent{ For %d turns thereafter, you gain %d armor penetration, %d accuracy, and %d%% all damage peneration. Learning this technique allows you to permanently gain %d armour penetration with all melee and archery attacks. The temporary armor penetration and accuracy bonuses increase with Cunning.]]): - format(100 * damage, duration, t.getAPRBuff(self, t), t.getAccuracy(self, t), t.getPenetration(self, t), t.getAPR(self, t)) + tformat(100 * damage, duration, t.getAPRBuff(self, t), t.getAccuracy(self, t), t.getPenetration(self, t), t.getAPR(self, t)) end, } @@ -136,7 +136,7 @@ newTalent{ end, info = function(self, t) return ([[Become a whirling storm of blades, increasing attack speed by %d%% and causing melee attacks to strike an additional adjacent target other than your primary target for %d%% weapon damage. -This talent is exhausting to use, draining 4 stamina each turn.]]):format(t.getSpeed(self, t)*100, t.getDamage(self,t)*100) +This talent is exhausting to use, draining 4 stamina each turn.]]):tformat(t.getSpeed(self, t)*100, t.getDamage(self,t)*100) end, } @@ -174,6 +174,6 @@ newTalent{ local talentcount = t.getTalentCount(self, t) local maxlevel = t.getMaxLevel(self, t) return ([[Your quick wits allow you to reset the cooldown of up to %d of your combat talents (cunning or technique) of tier %d or less.]]): - format(talentcount, maxlevel) + tformat(talentcount, maxlevel) end, } diff --git a/game/modules/tome/data/talents/cunning/poisons.lua b/game/modules/tome/data/talents/cunning/poisons.lua index 68135dfd37c6b66a74a570a28ec27d71de823248..9e0029427f2dae35262e019e012c63d6a2fa033b 100644 --- a/game/modules/tome/data/talents/cunning/poisons.lua +++ b/game/modules/tome/data/talents/cunning/poisons.lua @@ -160,7 +160,7 @@ newTalent{ end end else - game.logSeen(target, "%s resists the vile poison!", target.name:capitalize()) + game.logSeen(target, "%s resists the vile poison!", target:getName():capitalize()) end end, callbackOnMeleeAttack = function(self, t, target, hitted, crit, weapon, damtype, mult, dam) @@ -186,7 +186,7 @@ newTalent{ info = function(self, t) return ([[Learn how to coat your melee weapons, throwing knives, sling and bow ammo with poison, giving your attacks a %d%% chance to poison the target for %d nature damage per turn for %d turns. Every application of the poison stacks, up to a maximum of %d nature damage per turn. The damage scales with your Cunning.]]): - format(t.getChance(self,t), damDesc(self, DamageType.NATURE, t.getDamage(self, t)), t.getDuration(self, t), damDesc(self, DamageType.NATURE, t.getDamage(self, t)*4)) + tformat(t.getChance(self,t), damDesc(self, DamageType.NATURE, t.getDamage(self, t)), t.getDuration(self, t), damDesc(self, DamageType.NATURE, t.getDamage(self, t)*4)) end, } @@ -212,7 +212,7 @@ newTalent{ if to_spread > 0 then local tg = {type="ball", range = 10, radius=t.getRadius(self, t), selffire = false, friendlyfire = false, talent=t} target.dead = false -- for combat log purposes - game.logSeen(target, "#GREEN#Poison bursts out of %s's corpse!", target.name:capitalize()) + game.logSeen(target, "#GREEN#Poison bursts out of %s's corpse!", target:getName():capitalize()) game.level.map:particleEmitter(target.x, target.y, tg.radius, "slime") self:project(tg, target.x, target.y, function(tx, ty) local target2 = game.level.map(tx, ty, Map.ACTOR) @@ -226,7 +226,7 @@ newTalent{ end end, info = function(self, t) - return ([[When you kill a creature, all of your poisons affecting it will spread to foes in a radius of %d.]]):format(t.getRadius(self, t)) + return ([[When you kill a creature, all of your poisons affecting it will spread to foes in a radius of %d.]]):tformat(t.getRadius(self, t)) end, } @@ -277,7 +277,7 @@ info = function(self, t) Also increases the effectiveness of your poisons by %d%%. (The effect varies for each poison.) Adjusting your weapon coating takes no time and does not break stealth. You may only have two poison enhancements active at once; applying a third will randomly cause one of the existing ones to be cancelled.]]): - format(self:getTalentLevel(t) * 20) + tformat(self:getTalentLevel(t) * 20) end, } @@ -336,7 +336,7 @@ newTalent{ local t = rng.tableRemove(tids) if not t then break end target.talents_cd[t.id] = cdr - game.logSeen(target, "#GREEN#%s's %s is disrupted by crippling poison!", target.name:capitalize(), t.name) + game.logSeen(target, "#GREEN#%s's %s is disrupted by crippling poison!", target:getName():capitalize(), t.name) count = count + 1 end end @@ -376,7 +376,7 @@ newTalent{ Leeching Poison - Heals you for %d. Volatile Poison - Deals a further %0.2f nature damage to foes in a radius %d ball. ]]): - format(power*100, damDesc(self, DamageType.NATURE, idam), nb, math.floor(nb*1.5), heal, damDesc(self, DamageType.NATURE, vdam), nb) + tformat(power*100, damDesc(self, DamageType.NATURE, idam), nb, math.floor(nb*1.5), heal, damDesc(self, DamageType.NATURE, vdam), nb) end, info = function(self, t) local dam = 100 * t.getDamage(self,t) @@ -386,7 +386,7 @@ newTalent{ %s Learning this talent in addition to the Throwing Knives talent allows you to learn the Venomous Throw talent, which can be used to throw poisoned daggers at your foes, but is put on cooldown when this talent is used. ]]): - format(dam, desc) + tformat(dam, desc) end, } @@ -422,7 +422,7 @@ newTalent{ end, info = function(self, t) return ([[Enhances your Deadly Poison with a numbing agent, causing the poison to reduce all damage the target deals by %d%%.]]): - format(t.getEffect(self, t)) + tformat(t.getEffect(self, t)) end, } @@ -454,7 +454,7 @@ newTalent{ end, info = function(self, t) return ([[Enhances your Deadly Poison with an insidious agent, causing it to reduce the healing taken by enemies by %d%%.]]): - format(t.getEffect(self, t)) + tformat(t.getEffect(self, t)) end } @@ -486,7 +486,7 @@ newTalent{ end, info = function(self, t) return ([[Enhances your Deadly Poison with a crippling agent, giving enemies a %d%% chance on using a talent to fail and lose a turn.]]): - format(t.getEffect(self, t)) + tformat(t.getEffect(self, t)) end, } @@ -518,7 +518,7 @@ newTalent{ end, info = function(self, t) return ([[Enhances your Deadly Poison with a leeching agent, causing it to heal you for %d%% of the damage it does to its target.]]): - format(t.getEffect(self, t)) + tformat(t.getEffect(self, t)) end, } @@ -555,7 +555,7 @@ newTalent{ end, info = function(self, t) return ([[Enhances your Deadly Poison with a volatile agent, causing the poison to deal %d%% increased damage to the victim and damage all of your enemies adjacent to it for 50%%.]]): - format(t.getEffect(self, t)) + tformat(t.getEffect(self, t)) end, } @@ -569,7 +569,7 @@ newTalent{ getDamage = function(self, t) return self:combatStatScale("mag", 20, 50, 0.75) end, info = function(self, t) return ([[Whenever you apply Deadly Poison, you also apply an unresistable magical poison dealing %0.2f arcane damage (based on your Magic) each turn. This poison reduces all damage resistance by 10%% and poison immunity by 50%%.]]): - format(damDesc(self, DamageType.ARCANE, t.getDamage(self,t))) + tformat(damDesc(self, DamageType.ARCANE, t.getDamage(self,t))) end, } @@ -630,6 +630,6 @@ newTalent{ return ([[Enhance your Deadly Poison with a stoning agent. Whenever you apply Deadly Poison, you afflict your target with an additional earth-based poison that inflicts %d nature damage per turn (stacking up to %d damage per turn) for %d turns. After either %d turns or the poison has run its course (<100%% chance, see effect description), the target will be turned to stone for %d turns. The damage scales with your Cunning.]]): - format(dam, dam*4, t.getDuration(self, t), t.stoneTime(self, t), t.getEffect(self, t)) + tformat(dam, dam*4, t.getDuration(self, t), t.stoneTime(self, t), t.getEffect(self, t)) end, } diff --git a/game/modules/tome/data/talents/cunning/scoundrel.lua b/game/modules/tome/data/talents/cunning/scoundrel.lua index c787ace46ff7e8b363125e3c4aa005ca7c45b67e..d129f3d3736a9bc3b8b57e85c47d78d6b1594c03 100644 --- a/game/modules/tome/data/talents/cunning/scoundrel.lua +++ b/game/modules/tome/data/talents/cunning/scoundrel.lua @@ -48,7 +48,7 @@ newTalent{ info = function(self, t) local chance = t.getChance(self,t) return ([[Your melee and ranged attacks have a %d%% chance to shred enemies inflicting an additional 100%% of the damage dealt as a bleed over 4 turns.]]): - format(chance) + tformat(chance) end, } @@ -76,7 +76,7 @@ newTalent{ local t = rng.tableRemove(tids) if not t or #tids<=0 then return end target.talents_cd[t.id] = cd - game.logSeen(target, "#CRIMSON#%s's %s is disrupted by %s wounds!#LAST#", target.name:capitalize(), t.name, target:his_her()) + game.logSeen(target, "#CRIMSON#%s's %s is disrupted by %s wounds!#LAST#", target:getName():capitalize(), t.name, target:his_her()) self.turn_procs.scoundrel = self.turn_procs.scoundrel or {} self.turn_procs.scoundrel[target] = true end, @@ -96,7 +96,7 @@ newTalent{ local t = rng.tableRemove(tids) if not t or #tids<=0 then return end target.talents_cd[t.id] = cd - game.logSeen(target, "#CRIMSON#%s's %s is disrupted by %s wounds!#LAST#", target.name:capitalize(), t.name, target:his_her()) + game.logSeen(target, "#CRIMSON#%s's %s is disrupted by %s wounds!#LAST#", target:getName():capitalize(), t.name, target:his_her()) self.turn_procs.scoundrel = self.turn_procs.scoundrel or {} self.turn_procs.scoundrel[target] = true end, @@ -106,7 +106,7 @@ newTalent{ local dur = t.getDuration(self,t) return ([[Your melee and ranged attacks inflict distracting wounds that reduce the target’s critical strike multiplier by %d%% for 5 turns. In addition, your attacks have a %d%% chance to inflict a painful wound that causes them to forget a random talent for %d turns. The last effect cannot occur more than once per turn per target. - ]]):format(crit, chance, dur) + ]]):tformat(crit, chance, dur) end, } @@ -132,7 +132,7 @@ newTalent{ if e.status ~= "detrimental" or e.type ~= "physical" or not (p.src and p.src._is_actor) then return end local chance = self:callTalent(self.T_MISDIRECTION, "getChance") if not rng.percent(chance) then return end - game.logSeen(self, "#ORANGE#%s redirects the effect '%s'!#LAST#", self.name:capitalize(), e.desc) + game.logSeen(self, "#ORANGE#%s redirects the effect '%s'!#LAST#", self:getName():capitalize(), e.desc) local tgts = {} self:project({type="ball", radius=1}, self.x, self.y, function(px, py) @@ -153,7 +153,7 @@ newTalent{ return ([[Your abilities in sowing confusion and chaos have reached their peak. Whenever a foe attempts to apply a detrimental physical effect to you, they have a %d%% chance to fail. If there is an adjacent enemy to you, you misdirect your foe into applying it to them at %d%% duration. You gain %d defense. The chance to apply status effects increases with your Accuracy and the Defense with your Cunning.]]): - format(t.getChance(self,t),t.getDuration(self,t), t.getDefense(self, t)) + tformat(t.getChance(self,t),t.getDuration(self,t), t.getDefense(self, t)) end, } @@ -184,6 +184,6 @@ newTalent{ If any effect causes the target's turn to fail they fumble and injure themself, taking %0.2f physical damage. If the turn loss was caused by this effect then Fumble is removed. The damage dealt increases with your Cunning. - ]]):format(stacks*3, damDesc(self, DamageType.PHYSICAL, dam)) + ]]):tformat(stacks*3, damDesc(self, DamageType.PHYSICAL, dam)) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/cunning/shadow-magic.lua b/game/modules/tome/data/talents/cunning/shadow-magic.lua index 6b4af9f5bd745d8d36330297021fe74831935195..5bcc807c4e2750cb866f25783ac620ed246075bb 100644 --- a/game/modules/tome/data/talents/cunning/shadow-magic.lua +++ b/game/modules/tome/data/talents/cunning/shadow-magic.lua @@ -51,7 +51,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Channel raw magical energy into your melee attacks; each blow you land will do an additional %.2f darkness damage. The damage will improve with your Spellpower.]]): - format(damDesc(self, DamageType.DARKNESS, damage)) + tformat(damDesc(self, DamageType.DARKNESS, damage)) end, } @@ -67,7 +67,7 @@ newTalent{ local spellpower = t.getSpellpower(self, t) local bonus = self:getCun()*spellpower/100 return ([[Your preparations give you greater magical capabilities. You gain a bonus to Spellpower equal to %d%% of your Cunning (Current bonus: %d).]]): - format(spellpower, bonus) + tformat(spellpower, bonus) end, } @@ -102,7 +102,7 @@ newTalent{ local manaregen = t.getManaRegen(self, t) return ([[You draw energy from the depths of the shadows. While sustained, you regenerate %0.2f mana per turn, and your physical and spell attack speed increases by %0.1f%%.]]): - format(manaregen, t.getAtkSpeed(self, t)) + tformat(manaregen, t.getAtkSpeed(self, t)) end, } @@ -143,7 +143,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_DAZED, t.getDuration(self, t), {}) else - game.logSeen(target, "%s is not dazed!", target.name:capitalize()) + game.logSeen(target, "%s is not dazed!", target:getName():capitalize()) end end @@ -155,6 +155,6 @@ newTalent{ return ([[Step through the shadows to your target, dazing it for %d turns and hitting it with all your weapons for %d%% darkness weapon damage. Dazed targets are significantly impaired, but any damage will free them. To Shadowstep, you need to be able to see the target.]]): - format(duration, t.getDamage(self, t) * 100) + tformat(duration, t.getDamage(self, t) * 100) end, } diff --git a/game/modules/tome/data/talents/cunning/stealth.lua b/game/modules/tome/data/talents/cunning/stealth.lua index 14d796c295af8cd41ff84d3bdcb28d1a5d15a74b..09cd1fc82ad155fe0716a4ad1e0fedc6de9a4640 100644 --- a/game/modules/tome/data/talents/cunning/stealth.lua +++ b/game/modules/tome/data/talents/cunning/stealth.lua @@ -141,7 +141,7 @@ newTalent{ info = function(self, t) local stealthpower = t.getStealthPower(self, t) + (self:attr("inc_stealth") or 0) local radius, rad_dark = t.getRadius(self, t, true) - xs = rad_dark ~= radius and (" (range %d in an unlit grid)"):format(rad_dark) or "" + xs = rad_dark ~= radius and (" (range %d in an unlit grid)"):tformat(rad_dark) or "" return ([[Enters stealth mode (power %d, based on Cunning), making you harder to detect. If successful (re-checked each turn), enemies will not know exactly where you are, or may not notice you at all. Stealth reduces your light radius to 0, increases your infravision by 3, and will not work with heavy or massive armours. @@ -150,7 +150,7 @@ newTalent{ Enemies uncertain of your location will still make educated guesses at it. While stealthed, enemies cannot share information about your location with each other and will be delayed in telling their allies that you exist at all.]]): - format(stealthpower, radius, xs) + tformat(stealthpower, radius, xs) end, } @@ -172,7 +172,7 @@ newTalent{ return ([[You know how to make the most out of being unseen. When striking from stealth, your attacks are automatically critical if the target does not notice you just before you land it. (Spell and mind attacks critically strike even if the target notices you.) Your critical multiplier against targets that cannot see you is increased by up to %d%%. (You must be able to see your target and the bonus is reduced from its full value at range 3 to 0 at range 10.) - Also, after exiting stealth for any reason, the critical multiplier persists for %d turns (with no range limitation).]]):format(multiplier, dur) + Also, after exiting stealth for any reason, the critical multiplier persists for %d turns (with no range limitation).]]):tformat(multiplier, dur) end, } @@ -193,7 +193,7 @@ newTalent{ return ([[You have a special affinity for darkness and shadows. When standing in an unlit grid, the minimum range to your foes for activating stealth or for maintaining it after a Shadow Dance is reduced by %d. While stealthed, your life regeneration is increased by %0.1f (based on your Cunning) and your stamina regeneration is increased by %0.1f. The regeneration effects persist for %d turns after exiting stealth, with 5 times the normal rate.]]): - format(t.getRadius(self, t, true), t.getLife(self,t), t.getStamina(self,t), t.getDuration(self, t)) + tformat(t.getRadius(self, t, true), t.getLife(self,t), t.getStamina(self,t), t.getDuration(self, t)) end, } @@ -220,6 +220,6 @@ newTalent{ info = function(self, t) return ([[Your mastery of stealth allows you to vanish from sight at any time. You automatically enter stealth and cause it to not break from unstealthy actions for %d turns.]]): - format(t.getDuration(self, t)) + tformat(t.getDuration(self, t)) end, } diff --git a/game/modules/tome/data/talents/cunning/survival.lua b/game/modules/tome/data/talents/cunning/survival.lua index 019890fd17febd4dee90accc36c4c7e1dbb9a848..c4310adc78cb6b9d1eb042bc54419a3332e342a3 100644 --- a/game/modules/tome/data/talents/cunning/survival.lua +++ b/game/modules/tome/data/talents/cunning/survival.lua @@ -44,7 +44,7 @@ newTalent{ This is not telepathy, however, and it is still limited to line of sight. Also, your attention to detail increases stealth detection and invisibility detection by %d, and you gain the ability to detect traps (+%d detect 'power'). The detection abilities improve with Cunning.]]): - format(t.sense(self,t), t.seePower(self,t), t.trapDetect(self, t)) + tformat(t.sense(self,t), t.seePower(self,t), t.trapDetect(self, t)) end, } @@ -70,7 +70,7 @@ newTalent{ info = function(self, t) return ([[Your cunning manipulations allow you to use charms (wands, totems and torques) more efficiently, reducing their cooldowns and the power cost of all usable items by %d%%. In addition your knowledge of devices allows you to disarm known traps (%d disarm 'power', improves with Cunning).]]): - format(t.cdReduc(self, t), t.trapDisarm(self, t)) + tformat(t.cdReduc(self, t), t.trapDisarm(self, t)) end, } @@ -96,7 +96,7 @@ newTalent{ info = function(self, t) local rad = self:getTalentRadius(t) return ([[Sense foes around you in a radius of %d for %d turns. - The radius will increase with your Cunning.]]):format(rad, t.getDuration(self, t)) + The radius will increase with your Cunning.]]):tformat(rad, t.getDuration(self, t)) end, } @@ -134,7 +134,7 @@ newTalent{ Attacks against you have a %0.1f%% reduced chance to be critical hits, and damage bonuses attackers gain against you for being unseen are reduced by %d%%. You also gain an additional chance (at your normal save %+d, effective) to resist detrimental status effects that can be resisted. The detection and additional save chance improve with Cunning.]]): - format(t.trapDetect(self, t), t.critResist(self, t), t.getUnseenReduction(self, t)*100, -t.savePenalty(self, t)) + tformat(t.trapDetect(self, t), t.critResist(self, t), t.getUnseenReduction(self, t)*100, -t.savePenalty(self, t)) end, } @@ -160,7 +160,7 @@ newTalent{ dir = util.getDir(x, y, self.x, self.y) x, y = util.coordAddDir(self.x, self.y, dir) - print("Requesting disarm trap", self.name, t.id, x, y) + print("Requesting disarm trap", self:getName(), t.id, x, y) local t_det = self:attr("see_traps") or 0 local trap = game.level.map(x, y, engine.Map.TRAP) if trap and not trap:knownBy(self) then trap = self:detectTrap(nil, x, y, t_det) end @@ -188,7 +188,7 @@ newTalent{ local t_det, t_dis = self:attr("see_traps") or 0, tdm.trapDisarm(self, tdm) return ([[You search a nearby grid for a hidden trap (%d detection 'power') and disarm it if possible (%d disarm 'power', based on your skill with %s). Disarming a trap requires at least a minimum skill level, and you must be able to enter the trap's grid to manipulate it, though you stay in your current location. A failed attempt to disarm a trap may trigger it. - Your skill improves with your your Cunning.]]):format(t_det, t_dis, tdm.name) + Your skill improves with your your Cunning.]]):tformat(t_det, t_dis, tdm.name) end, } diff --git a/game/modules/tome/data/talents/cunning/tactical.lua b/game/modules/tome/data/talents/cunning/tactical.lua index 0096c323d493d9e373039f4170999564658876ea..30b9b4fc1c9eb1bdc9de7a2aa110f26614060861 100644 --- a/game/modules/tome/data/talents/cunning/tactical.lua +++ b/game/modules/tome/data/talents/cunning/tactical.lua @@ -56,7 +56,7 @@ newTalent{ local defense = t.getDefense(self, t) local maximum = t.getMaximum(self, t) return ([[Your Defense is increased by %d for every adjacent visible foe, up to a maximum of +%d Defense. - The Defense increase per enemy and maximum Defense bonus will scale with your Cunning.]]):format(defense, maximum) + The Defense increase per enemy and maximum Defense bonus will scale with your Cunning.]]):tformat(defense, maximum) end, } @@ -102,7 +102,7 @@ newTalent{ end end else - game.logSeen(self, "%s counters the attack!", target.name:capitalize()) + game.logSeen(self, "%s counters the attack!", target:getName():capitalize()) end end, on_unlearn = function(self, t) @@ -112,7 +112,7 @@ newTalent{ local damage = t.getDamage(self, t) * 100 return ([[When you avoid a melee blow from an adjacent foe, you have a %d%% chance to get a free, automatic melee attack against the attacker for %d%% damage, up to %0.1f times per turn. Unarmed fighters using it will also attempt to throw the target to the ground if the attack lands, dazing them for 2 turns or stunning them for 2 turns if the target is grappled. - The chance of countering and number of counter attacks increase with your Cunning.]]):format(t.counterchance(self,t), damage, t.getCounterAttacks(self, t)) + The chance of countering and number of counter attacks increase with your Cunning.]]):tformat(t.counterchance(self,t), damage, t.getCounterAttacks(self, t)) end, } @@ -139,7 +139,7 @@ newTalent{ local defense = t.getDefense(self, t) return ([[Increases Defense by %d for %d turns. When you avoid a melee blow, you set the target up, increasing the chance of you landing a critical strike on them by %d%% and reducing their saving throws by %d. The effects will scale with your Cunning.]]) - :format(defense, duration, power, power) + :tformat(defense, duration, power, power) end, } @@ -169,6 +169,6 @@ newTalent{ info = function(self, t) local reduction = t.getReductionMax(self, t) return ([[Systematically find the weaknesses in your opponents' physical resists, at the cost of 10%% of your physical damage. Each time you hit an opponent with a melee attack, you reduce their physical resistance by 5%%, up to a maximum of %d%%. - ]]):format(reduction) + ]]):tformat(reduction) end, } diff --git a/game/modules/tome/data/talents/cunning/traps.lua b/game/modules/tome/data/talents/cunning/traps.lua index fe885d829cf1255741c7c728120167c585c8050c..452d772a89a88614057786969c440b19f83f6666 100644 --- a/game/modules/tome/data/talents/cunning/traps.lua +++ b/game/modules/tome/data/talents/cunning/traps.lua @@ -223,7 +223,7 @@ trapGetGrid = function(self, t, tg, defense) end local trap = game.level.map(x, y, Map.TRAP) if trap then - game.logPlayer(self, trap:knownBy(self) and game.level.map.seens(x, y) and "There is already a trap there." or "You somehow fail to set the trap.") return nil + game.logPlayer(self, trap:knownBy(self) and game.level.map.seens(x, y) and _t"There is already a trap there." or _t"You somehow fail to set the trap.") return nil end end print("Trap Placement for", self.name, t.id, x, y) @@ -239,7 +239,7 @@ end trapping_CreateTrap = function(self, t, dur, add) local Trap = require "mod.class.Trap" local trap = { - id_by_type=true, unided_name = "trap", + id_by_type=true, unided_name = _t"trap", display = '^', type = "rogue", faction = self.faction, @@ -260,7 +260,7 @@ trapping_CreateTrap = function(self, t, dur, add) game.level.map:remove(self.x, self.y, engine.Map.TRAP) if self.summoner and self.stamina and self.stamina > 0 then -- Refund self.summoner:incStamina(self.stamina * 0.8) - game.logPlayer(self.summoner, "#CADET_BLUE#Your %s has expired.", self.name) + game.logPlayer(self.summoner, "#CADET_BLUE#Your %s has expired.", self:getName()) end end if self.particles then game.level.map:removeParticleEmitter(self.particles) end @@ -303,7 +303,7 @@ traps_initialize = function() trap_mastery_tids[t.id] = t.trap_mastery_level end if t.message == nil then -- default, vague talent message - t.message = "@Source@ activates a prepared device." + t.message = _t"@Source@ activates a prepared device." end if t.on_pre_use_ai == nil then t.on_pre_use_ai = traps_on_pre_use_ai end end @@ -317,8 +317,8 @@ summon_assassin = function(self, target, duration, x, y, scale ) local m = mod.class.NPC.new{ type = "humanoid", subtype = "human", display = "p", color=colors.BLUE, image = "npc/humanoid_human_assassin.png", shader = "shadow_simulacrum", - name = "shadowy assassin", faction = self.faction, - desc = [[A shadowy figure, garbed all in black.]], + name = _t"shadowy assassin", faction = self.faction, + desc = _t[[A shadowy figure, garbed all in black.]], autolevel = "rogue", ai = "dumb_talented_simple", ai_state = { ai_move="move_complex", talent_in=5, }, stats = { str=8, dex=15, mag=6, cun=15, con=7 }, @@ -392,8 +392,8 @@ summon_bladestorm = function(self, target, duration, x, y, scale ) local m = mod.class.NPC.new{ type = "construct", subtype = "mechanical", display = "^", color=colors.BROWN, image = "npc/trap_bladestorm_swish_01.png", - name = "bladestorm construct", faction = self.faction, - desc = [[A lethal contraption of whirling blades.]], + name = _t"bladestorm construct", faction = self.faction, + desc = _t[[A lethal contraption of whirling blades.]], autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_complex", talent_in=5, }, stats = { str=18, dex=15, mag=6, cun=6, con=7 }, @@ -597,8 +597,8 @@ newTalent{ end, action = function(self, t) local nb = t.getNbTraps(self,t) - local txt = ("Prepare which traps? (maximum: %d, up to tier %d)%s"):format(nb, math.min(5, self:getTalentLevelRaw(t)), self.turn_procs.free_trap_mastery and "\nGame Start: Newly prepared traps will NOT start on cooldown." or "\n#YELLOW#Newly prepared traps are put on cooldown.#LAST#") - local traps_dialog = require("mod.dialogs.TrapsSelect").new("Select Prepared Traps", self, + local txt = ("Prepare which traps? (maximum: %d, up to tier %d)%s"):tformat(nb, math.min(5, self:getTalentLevelRaw(t)), self.turn_procs.free_trap_mastery and _t"\nGame Start: Newly prepared traps will NOT start on cooldown." or _t"\n#YELLOW#Newly prepared traps are put on cooldown.#LAST#") + local traps_dialog = require("mod.dialogs.TrapsSelect").new(_t"Select Prepared Traps", self, txt, t, nb, trap_mastery_tids) local traps_sel, traps_prev = self:talentDialog(traps_dialog) @@ -613,7 +613,7 @@ newTalent{ end for tid, sel in pairs(traps_sel) do if sel and not traps_prev[tid] then - game.log("#LIGHT_GREEN#Preparing %s%s", self:getTalentFromId(tid).name, self.trap_primed == tid and " (normal trigger)" or "") + game.log("#LIGHT_GREEN#Preparing %s%s", self:getTalentFromId(tid).name, self.trap_primed == tid and _t" (normal trigger)" or "") self:learnTalent(tid, true, 1, {no_unlearn=true}) if self.trap_primed == tid then self.trap_primed = nil @@ -645,13 +645,13 @@ newTalent{ local tr = self:getTalentFromId(tid) show_traps[#show_traps+1] = {tier=tr.trap_mastery_level, name=tr.name, known = self.trap_primed ~= tid and known, - info = tr.short_info and tr.short_info(self, tr) or "#GREY#(see trap description)#LAST#"} + info = tr.short_info and tr.short_info(self, tr) or _t"#GREY#(see trap description)#LAST#"} end end table.sort(show_traps, function(a, b) return a.tier < b.tier end) local trap_descs = "" for i, trap in ipairs(show_traps) do - trap_descs = trap_descs.."\n\t"..("%sTier %d: %s#LAST#\n%s"):format(trap.known and "#YELLOW#" or "#YELLOW_GREEN#", trap.tier, trap.name, trap.info) + trap_descs = trap_descs.."\n\t"..("%sTier %d: %s#LAST#\n%s"):tformat(trap.known and "#YELLOW#" or "#YELLOW_GREEN#", trap.tier, trap.name, trap.info) end self.turn_procs.trap_mastery_tid = nil return ([[This talent allows you to prepare up to %d different trap(s) of tier %d or less for later deployment. (Use this ability to select which to prepare.) @@ -662,7 +662,7 @@ newTalent{ You are immune to the damage and negative effects of your traps, and traps may critically strike based on your physical crit chance. Most traps last %d turns if not triggered, and refund 80%% of their stamina cost on expiration. More designs may be discovered via disarming or learned from special instructors in the world.]]): - format(t.getNbTraps(self, t), math.min(5, self:getTalentLevelRaw(t)), trap_descs, detect_power, disarm_power, t.getTrapMastery(self, t), stealth_chance, t.getDuration(self, t)) + tformat(t.getNbTraps(self, t), math.min(5, self:getTalentLevelRaw(t)), trap_descs, detect_power, disarm_power, t.getTrapMastery(self, t), stealth_chance, t.getDuration(self, t)) end, } @@ -701,8 +701,8 @@ newTalent{ local m = NPC.new{ type = "construct", subtype = "lure", display = "*", color=colors.UMBER, - name = "lure", faction = self.faction, image = "npc/lure.png", - desc = [[A noisy lure.]], + name = _t"lure", faction = self.faction, image = "npc/lure.png", + desc = _t[[A noisy lure.]], autolevel = "none", ai = "summoned", ai_real = "dumb_talented", ai_state = { talent_in=1, }, level_range = {1, nil}, exp_worth = 0, @@ -749,7 +749,7 @@ newTalent{ return ([[Deploy a noisy lure that attracts all creatures within radius %d to it for %d turns. It has %d life (based on your Cunning) and is very durable, with %d armor and %d%% resistance to non-physical damage. At level 5, when the lure is destroyed, it will trigger some traps in a radius of 2 around it (check individual trap descriptions to see if they are triggered). - Use of this talent will not break stealth.]]):format(rad, t.getDuration(self,t), t.getLife(self, t), t.getArmor(self, t), t.getResist(self, t)) + Use of this talent will not break stealth.]]):tformat(rad, t.getDuration(self,t), t.getLife(self, t), t.getArmor(self, t), t.getResist(self, t)) end, } @@ -763,7 +763,7 @@ newTalent{ trapStealth = function(self, t) return math.min(25, self:getTalentLevel(t)) end, info = function(self, t) return ([[You learn new techniques for setting traps. - Deploying one of your traps is possible up to %d grids from you, takes %d%% less time than normal, and has %d%% less chance to break stealth.]]):format(trap_range(self, t), (1 - t.trapSpeed(self, t))*100, t.trapStealth(self, t)) + Deploying one of your traps is possible up to %d grids from you, takes %d%% less time than normal, and has %d%% less chance to break stealth.]]):tformat(trap_range(self, t), (1 - t.trapSpeed(self, t))*100, t.trapStealth(self, t)) end, } @@ -827,7 +827,7 @@ newTalent{ -- show only primable traps that are primed or that the player knows about if tr and tr.allow_primed_trigger and tr.trap_mastery_level and (self:knowTalent(tid) or game.state:unlockTalentCheck(tid, player)) then show_traps[#show_traps+1] = {tier=tr.trap_mastery_level, name=tr.name, - info = tr.short_info and tr.short_info(self, tr) or "#GREY#(see trap description)#LAST#"} + info = tr.short_info and tr.short_info(self, tr) or _t"#GREY#(see trap description)#LAST#"} if tid == self.trap_primed then show_traps[#show_traps].instant = true instant = tr.name @@ -838,7 +838,7 @@ newTalent{ table.sort(show_traps, function(a, b) return a.tier < b.tier end) local trap_descs = "" for i, trap in ipairs(show_traps) do - trap_descs = trap_descs.."\n\t"..("%sTier %d: %s#LAST#\n%s"):format(trap.instant and "#YELLOW#" or "#YELLOW_GREEN#", trap.tier, trap.name, trap.info) + trap_descs = trap_descs.."\n\t"..("%sTier %d: %s#LAST#\n%s"):tformat(trap.instant and "#YELLOW#" or "#YELLOW_GREEN#", trap.tier, trap.name, trap.info) end return ([[You prepare an additional trap (up to tier %d) with a special primed trigger that causes it to activate immediately when deployed. (Use this ability to select the trap.) Not all traps can be prepared this way and each trap can have only one type of preparation. @@ -847,7 +847,7 @@ newTalent{ A trap with a primed trigger gains %+d%% effectiveness (replacing the normal bonus from Trap Mastery) and won't break stealth %d%% of the time. #YELLOW#Current primed trap: %s#LAST#]]): - format(self:getTalentLevelRaw(t), trap_descs, mastery, stealth_chance, instant) + tformat(self:getTalentLevelRaw(t), trap_descs, mastery, stealth_chance, instant) end, } @@ -882,7 +882,7 @@ newTalent{ local dam = self:physicalCrit(t.getDamage(self, t)) local power = t.getPower(self,t) local trap = trapping_CreateTrap(self, t, nil, { - type = "physical", name = "springrazor trap", color=colors.LIGHT_RED, image = "trap/trap_springrazor.png", + type = "physical", name = _t"springrazor trap", color=colors.LIGHT_RED, image = "trap/trap_springrazor.png", dam = dam, power = power, tg = tg, @@ -922,15 +922,15 @@ newTalent{ end, short_info = function(self, t) return ([[Shrapnel (radius 2) deals %0.2f physical damage, reduces accuracy, armour, and defence by %d.]]): - format(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), t.getPower(self,t)) + tformat(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), t.getPower(self,t)) end, info = function(self, t) local dam = t.getDamage(self, t) local power = t.getPower(self,t) - local instant = self.trap_primed == t.id and "\n#YELLOW#Triggers immediately when placed.#LAST#" or "" + local instant = self.trap_primed == t.id and _t"\n#YELLOW#Triggers immediately when placed.#LAST#" or "" return ([[Lay a pressure triggered trap that explodes into a radius 2 wave of razor sharp wire, doing %0.2f physical damage. Those struck by the wire may be shredded, reducing accuracy, armor and defence by %d. This trap can use a primed trigger and a high level lure can trigger it.%s]]): - format(damDesc(self, DamageType.PHYSICAL, dam), power, instant) + tformat(damDesc(self, DamageType.PHYSICAL, dam), power, instant) end, } @@ -956,7 +956,7 @@ newTalent{ local dam = self:physicalCrit(t.getDamage(self, t)) local trap = trapping_CreateTrap(self, t, nil, { - type = "physical", name = "bear trap", color=colors.UMBER, image = "trap/beartrap01.png", + type = "physical", name = _t"bear trap", color=colors.UMBER, image = "trap/beartrap01.png", dam = dam, stamina = t.stamina, check_hit = self:combatAttack(), @@ -988,12 +988,12 @@ newTalent{ end, short_info = function(self, t) local dam = damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)) - return ([[Deals %0.2f physical damage and pins, slows (30%%), and wounds for an additional %0.2f damage over 5 turns).]]):format(dam, dam) + return ([[Deals %0.2f physical damage and pins, slows (30%%), and wounds for an additional %0.2f damage over 5 turns).]]):tformat(dam, dam) end, info = function(self, t) local dam = damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)) - local instant = self.trap_primed == t.id and "\n#YELLOW#Triggers immediately when placed.#LAST#" or "" - return ([[Lay a pressure triggered bear trap that snaps onto the first creature passing over it. Victims are dealt %0.2f physical damage and become snared (pinned and slowed 30%%) and wounded for %0.2f bleeding damage over 5 turns. Creatures that avoid being snared still suffer bleeding damage.%s]]):format(dam, dam, instant) + local instant = self.trap_primed == t.id and _t"\n#YELLOW#Triggers immediately when placed.#LAST#" or "" + return ([[Lay a pressure triggered bear trap that snaps onto the first creature passing over it. Victims are dealt %0.2f physical damage and become snared (pinned and slowed 30%%) and wounded for %0.2f bleeding damage over 5 turns. Creatures that avoid being snared still suffer bleeding damage.%s]]):tformat(dam, dam, instant) end, } @@ -1018,7 +1018,7 @@ newTalent{ local dam = t.getDamage(self, t) local trap = trapping_CreateTrap(self, t, nil, { - type = "physical", name = "disarming trap", color=colors.DARK_GREY, image = "trap/trap_magical_disarm_01_64.png", + type = "physical", name = _t"disarming trap", color=colors.DARK_GREY, image = "trap/trap_magical_disarm_01_64.png", dur = t.getDuration(self, t), check_hit = self:combatAttack(), dam = dam, @@ -1029,7 +1029,7 @@ newTalent{ if who:canBe("disarm") then who:setEffect(who.EFF_DISARMED, self.dur, {apply_power=self.check_hit}) else - game.logSeen(who, "%s resists!", who.name:capitalize()) + game.logSeen(who, "%s resists!", who:getName():capitalize()) end return true, true end, @@ -1046,11 +1046,11 @@ newTalent{ end, short_info = function(self, t) return ([[Deals %0.2f acid damage, disarms for %d turns.]]): - format(damDesc(self, DamageType.ACID, t.getDamage(self, t)), t.getDuration(self, t)) + tformat(damDesc(self, DamageType.ACID, t.getDamage(self, t)), t.getDuration(self, t)) end, info = function(self, t) return ([[Lay a tricky trap that maims creatures passing by with acid doing %0.2f damage and disarming them for %d turns.]]): - format(damDesc(self, DamageType.ACID, t.getDamage(self, t)), t.getDuration(self, t)) + tformat(damDesc(self, DamageType.ACID, t.getDamage(self, t)), t.getDuration(self, t)) end, } @@ -1074,7 +1074,7 @@ newTalent{ local dam = self:physicalCrit(t.getDamage(self, t)) local trap = trapping_CreateTrap(self, t, nil, { - type = "physical", name = "pitfall trap", color=colors.UMBER, image = "trap/trap_pitfall_setup.png", + type = "physical", name = _t"pitfall trap", color=colors.UMBER, image = "trap/trap_pitfall_setup.png", dam = dam, stamina = t.stamina, check_hit = self:combatAttack(), @@ -1087,15 +1087,15 @@ newTalent{ -- Check hit local hit = self:checkHit(self.check_hit, who:combatPhysicalResist()) if hit and not who.player then - game.logSeen(who, "%s disappears into a collapsing pit!", who.name:capitalize()) + game.logSeen(who, "%s disappears into a collapsing pit!", who:getName():capitalize()) else -- try to pin if they avoided the pit if rng.percent(50) or who:canBe("pin") then - game.logSeen(who, "%s is partially buried in a collapsing pit!", who.name:capitalize()) + game.logSeen(who, "%s is partially buried in a collapsing pit!", who:getName():capitalize()) if (table.get(who, "can_pass", "pass_wall") or 0) <= 0 then who:setEffect(who.EFF_PINNED, 5, {}) end else - game.logSeen(who, "%s avoids a collapsing pit!", who.name:capitalize()) + game.logSeen(who, "%s avoids a collapsing pit!", who:getName():capitalize()) end return true, true end @@ -1104,7 +1104,7 @@ newTalent{ if (oe and oe:attr("temporary")) or game.level.map:checkEntity(x, y, engine.Map.TERRAIN, "block_move") then game.logPlayer(self, "Something has prevented the pit.") return true end local e = mod.class.Object.new{ old_feat = oe, type = "pit", subtype = "pit", - name = "pit", image = "trap/trap_pitfall_pit.png", + name = _t"pit", image = "trap/trap_pitfall_pit.png", display = '&', color=colors.BROWN, temporary = 5, canAct = false, @@ -1128,7 +1128,7 @@ newTalent{ self.target.forceLevelup = function() end self.target.check = function() end game.zone:addEntity(game.level, self.target, "actor", mx, my) - game.logSeen(self.target, "%s emerges from a collapsed pit.", self.target.name:capitalize()) + game.logSeen(self.target, "%s emerges from a collapsed pit.", self.target:getName():capitalize()) self.target.forceLevelup = old_levelup self.target.check = old_check end @@ -1163,12 +1163,12 @@ newTalent{ return true end, short_info = function(self, t) - return ([[Deals %0.2f physical damage. Target removed from combat or pinned 5 turns.]]):format(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) + return ([[Deals %0.2f physical damage. Target removed from combat or pinned 5 turns.]]):tformat(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) end, info = function(self, t) return ([[Lay a pressure triggered trap that collapses the ground under the target, dealing %0.2f physical damage while burying them (removing from combat) for 5 turns. Victims may resist being buried, in which case they are pinned (ignores 50%% pin immunity) instead.]]): - format(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) + tformat(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) end, } @@ -1199,7 +1199,7 @@ newTalent{ local tg = self:getTalentTarget(t) local dam = self:physicalCrit(t.getDamage(self, t)) local trap = trapping_CreateTrap(self, t, nil, { - type = "elemental", name = "flash bang trap", color=colors.YELLOW, image = "trap/trap_flashbang.png", + type = "elemental", name = _t"flash bang trap", color=colors.YELLOW, image = "trap/trap_flashbang.png", dur = t.getDuration(self, t), check_hit = self:combatAttack(), lure_trigger = true, @@ -1243,13 +1243,13 @@ newTalent{ return true end, short_info = function(self, t) - return ([[Explodes (radius 2) for %0.2f physical damage, 50%% blind/daze for %d turns.]]):format(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), t.getDuration(self, t)) + return ([[Explodes (radius 2) for %0.2f physical damage, 50%% blind/daze for %d turns.]]):tformat(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), t.getDuration(self, t)) end, info = function(self, t) - local instant = self.trap_primed == t.id and "\n#YELLOW#Triggers immediately when placed.#LAST#" or "" + local instant = self.trap_primed == t.id and _t"\n#YELLOW#Triggers immediately when placed.#LAST#" or "" return ([[Lay a trap that explodes in a radius of 2, dealing %0.2f physical damage and blinding and dazing (50%% chance of each) any creature caught inside for %d turns. This trap can use a primed trigger and a high level lure can trigger it.%s]]): - format(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), t.getDuration(self, t), instant) + tformat(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), t.getDuration(self, t), instant) end, } @@ -1274,7 +1274,7 @@ newTalent{ local dur = t.getDuration(self,t) local trap = trapping_CreateTrap(self, t, nil, { - type = "physical", name = "bladestorm trap", color=colors.BLACK, image = "trap/trap_bladestorm_01.png", + type = "physical", name = _t"bladestorm trap", color=colors.BLACK, image = "trap/trap_bladestorm_01.png", dur = dur, stamina = t.stamina, triggered = function(self, x, y, who) @@ -1296,10 +1296,10 @@ newTalent{ return true end, short_info = function(self, t) - return ([[Construct attacks all adjacent enemies each turn for %d turns.]]):format(t.getDuration(self, t)) + return ([[Construct attacks all adjacent enemies each turn for %d turns.]]):tformat(t.getDuration(self, t)) end, info = function(self, t) - return ([[Lay a trap that activates a lethal contraption of whirling blades, lasting %d turns. This stationary construct is very durable, receives your damage bonuses, and automatically attacks all adjacent enemies each turn.]]):format(t.getDuration(self,t)) + return ([[Lay a trap that activates a lethal contraption of whirling blades, lasting %d turns. This stationary construct is very durable, receives your damage bonuses, and automatically attacks all adjacent enemies each turn.]]):tformat(t.getDuration(self,t)) end, } @@ -1331,7 +1331,7 @@ newTalent{ local dam = self:physicalCrit(t.getDamage(self, t)) local trap = trapping_CreateTrap(self, t, nil, { - type = "physical", name = "beam trap", color=colors.BLUE, image = "trap/trap_beam.png", + type = "physical", name = _t"beam trap", color=colors.BLUE, image = "trap/trap_beam.png", dam = dam, proj_speed = 2, triggered = function(self, x, y, who) return true, false end, @@ -1373,14 +1373,14 @@ newTalent{ end, short_info = function(self, t) return ([[Fires a beam (range 5) at a foe each turn for %0.2f arcane damage. Lasts %d turns.]]): - format(damDesc(self, DamageType.ARCANE, t.getDamage(self, t)), t.getDuration(self, t)) + tformat(damDesc(self, DamageType.ARCANE, t.getDamage(self, t)), t.getDuration(self, t)) end, info = function(self, t) local dam = t.getDamage(self, t) local dur = t.getDuration(self,t) return ([[Lay a magical trap that fires a beam of arcane energy at a random foe (within range 5) each turn for %d turns, inflicting %0.2f arcane damage. This trap requires 20 Magic to prepare and does not refund stamina when it expires. -#YELLOW#Activates immediately when placed.#LAST#]]):format(dur, damDesc(self, DamageType.ARCANE, dam)) +#YELLOW#Activates immediately when placed.#LAST#]]):tformat(dur, damDesc(self, DamageType.ARCANE, dam)) end, } @@ -1391,7 +1391,7 @@ newTalent{ points = 1, type_no_req = true, require = cuns_req_unlock, - unlock_talent = "You have learned how to create Poison Gas traps!", + unlock_talent = _t"You have learned how to create Poison Gas traps!", cooldown = 10, stamina = 12, tactical = { ATTACKAREA = { poison = 1.5 }, DISABLE = { poison = 0.5 }, @@ -1415,7 +1415,7 @@ newTalent{ local power = t.getPower(self,t) local trap = trapping_CreateTrap(self, t, nil, { - type = "nature", name = "poison gas trap", color=colors.LIGHT_RED, image = "trap/trap_poison_gas.png", + type = "nature", name = _t"poison gas trap", color=colors.LIGHT_RED, image = "trap/trap_poison_gas.png", dam = dam, power = power, check_hit = self:combatAttack(), @@ -1454,14 +1454,14 @@ newTalent{ return true end, short_info = function(self, t) - return ([[Releases a radius 3 poison gas cloud, poisoning for %0.2f nature damage over 5 turns with a 25%% for enhanced effects.]]):format(damDesc(self, DamageType.POISON, t.getDamage(self, t))) + return ([[Releases a radius 3 poison gas cloud, poisoning for %0.2f nature damage over 5 turns with a 25%% for enhanced effects.]]):tformat(damDesc(self, DamageType.POISON, t.getDamage(self, t))) end, info = function(self, t) - local instant = self.trap_primed == t.id and "\n#YELLOW#Triggers immediately when placed.#LAST#" or "" + local instant = self.trap_primed == t.id and _t"\n#YELLOW#Triggers immediately when placed.#LAST#" or "" return ([[Lay a trap that releases a radius 3 cloud of thick poisonous gas lasting 4 turns. Each turn, the cloud poisons all within (%0.2f nature damage over 5 turns). There is a 25%% chance the poison is enhanced with crippling, numbing or insidious effects. This trap can use a primed trigger and a high level lure can trigger it.%s]]): - format(damDesc(self, DamageType.POISON, t.getDamage(self, t)), instant) + tformat(damDesc(self, DamageType.POISON, t.getDamage(self, t)), instant) end, } @@ -1492,7 +1492,7 @@ newTalent{ local dam = self:physicalCrit(t.getDamage(self, t)) local tg = self:getTalentTarget(t) local trap = trapping_CreateTrap(self, t, nil, { - type = "cold", name = "freezing trap", color=colors.BLUE, image = "trap/trap_freezing.png", + type = "cold", name = _t"freezing trap", color=colors.BLUE, image = "trap/trap_freezing.png", dam = dam, tg = tg, power = power, @@ -1541,15 +1541,15 @@ newTalent{ end, short_info = function(self, t) local dam = damDesc(self, DamageType.COLD, t.getDamage(self, t)) - return ([[Explodes (radius 2): Deals %0.2f cold damage and pins for 3 turns. Area freezes (%0.2f cold damage, 25%% freeze chance) for 5 turns.]]):format(dam, dam/3) + return ([[Explodes (radius 2): Deals %0.2f cold damage and pins for 3 turns. Area freezes (%0.2f cold damage, 25%% freeze chance) for 5 turns.]]):tformat(dam, dam/3) end, info = function(self, t) local dam = damDesc(self, DamageType.COLD, t.getDamage(self, t)) - local instant = self.trap_primed == t.id and "\n#YELLOW#Triggers immediately when placed.#LAST#" or "" + local instant = self.trap_primed == t.id and _t"\n#YELLOW#Triggers immediately when placed.#LAST#" or "" return ([[Lay a trap that explodes into a radius 2 cloud of freezing vapour when triggered. Foes take %0.2f cold damage and are pinned for 3 turns. The freezing vapour persists for 5 turns, dealing %0.2f cold damage each turn to foes with a 25%% chance to freeze. This trap can use a primed trigger and a high level lure can trigger it.%s]]): - format(dam, dam/3, instant) + tformat(dam, dam/3, instant) end, } @@ -1582,7 +1582,7 @@ newTalent{ local tg = self:getTalentTarget(t) local dam = self:physicalCrit(t.getDamage(self, t)) local trap = trapping_CreateTrap(self, t, nil, { - type = "fire", name = "dragonsfire trap", color=colors.RED, image = "trap/trap_dragonsfire.png", + type = "fire", name = _t"dragonsfire trap", color=colors.RED, image = "trap/trap_dragonsfire.png", dam = dam, tg = tg, power = power, @@ -1636,15 +1636,15 @@ newTalent{ end, short_info = function(self, t) dam = damDesc(self, DamageType.FIRE, t.getDamage(self, t)) - return ([[Explodes (radius 2): stuns and combusts for %0.2f fire damage per turn for 3 turns. Area deflagrates (%0.2f fire damage) for 5 turns.]]):format(dam/3, dam/2) + return ([[Explodes (radius 2): stuns and combusts for %0.2f fire damage per turn for 3 turns. Area deflagrates (%0.2f fire damage) for 5 turns.]]):tformat(dam/3, dam/2) end, info = function(self, t) - local instant = self.trap_primed == t.id and "\n#YELLOW#Triggers immediately when placed.#LAST#" or "" + local instant = self.trap_primed == t.id and _t"\n#YELLOW#Triggers immediately when placed.#LAST#" or "" dam = damDesc(self, DamageType.FIRE, t.getDamage(self, t)) return ([[Lay a pressure triggered trap that explodes in a radius 2 cloud of searing flames when triggered, stunning foes with the blast (%0.2f fire damage per turn) for 3 turns. The deflagration persists in the area for 5 turns, burning foes for %0.2f fire damage each turn. This trap can use a primed trigger and a high level lure can trigger it.%s]]): - format(dam/3, dam/2, instant) + tformat(dam/3, dam/2, instant) end, } @@ -1663,7 +1663,7 @@ newTalent{ range = trap_range, speed = trap_speed, no_break_stealth = trap_stealth, - message = "@Source@ deploys a warped device.", + message = _t"@Source@ deploys a warped device.", getDamage = function(self, t) return 10 + trap_effectiveness(self, t, "mag")*10 end, getDuration = function(self, t) return math.floor(self:combatTalentLimit(self:getTalentLevel(self.T_TRAP_MASTERY), 20/2, 3, 5)) end, target = function(self, t) return {type="ball", range=self:getTalentRange(t), friendlyfire=false, radius=5} end, -- for AI @@ -1676,7 +1676,7 @@ newTalent{ local dam = t.getDamage(self, t) local dur = t.getDuration(self, t) local trap = trapping_CreateTrap(self, t, nil, { - subtype = "arcane", name = "gravitic trap", color=colors.LIGHT_RED, image = "invis.png", + subtype = "arcane", name = _t"gravitic trap", color=colors.LIGHT_RED, image = "invis.png", embed_particles = {{name="wormhole", rad=5, args={image="shockbolt/trap/trap_gravitic", speed=1}}}, dam = dam, check_hit = math.max(self:combatAttack(), self:combatSpellpower()), @@ -1757,14 +1757,14 @@ newTalent{ end, short_info = function(self, t) return ([[Creates a radius 5 gravitic anomaly lasting up to %d turns. Hostile creatures are dealt %d temporal damgae and pulled in. Triggers out to range 1.]]): - format(t.getDuration(self,t), damDesc(self, engine.DamageType.TEMPORAL, t.getDamage(self, t))) + tformat(t.getDuration(self,t), damDesc(self, engine.DamageType.TEMPORAL, t.getDamage(self, t))) end, info = function(self, t) return ([[Lay a trap that creates a radius 5 gravitic anomaly when triggered by foes approaching within range 1. Each turn, the anomaly deals %0.2f temporal damage (based on your Magic) to foes whle pulling them towards its center (chance increases with your combat accuracy or spell power, whichever is higher). Each anomaly lasts %d turns (up to the amount of time since the last anomaly dissipated, based on your Trap Mastery skill). The trap may trigger more than once, but requires at least 2 turns to recharge between activations. This design does not require advanced preparation to use.]]): - format(damDesc(self, engine.DamageType.TEMPORAL, t.getDamage(self, t)), t.getDuration(self,t)) + tformat(damDesc(self, engine.DamageType.TEMPORAL, t.getDamage(self, t)), t.getDuration(self,t)) end, } @@ -1775,7 +1775,7 @@ newTalent{ points = 1, type_no_req = true, require = cuns_req_unlock, - unlock_talent = "You have learned how to create Ambush traps!", + unlock_talent = _t"You have learned how to create Ambush traps!", no_unlearn_last = true, cooldown = 25, stamina = 20, @@ -1792,7 +1792,7 @@ newTalent{ local dur = t.getDuration(self,t) local trap = trapping_CreateTrap(self, t, nil, { - type = "annoy", subtype = "alarm", name = "ambush trap", color=colors.BLACK, image = "trap/trap_ambush.png", + type = "annoy", subtype = "alarm", name = _t"ambush trap", color=colors.BLACK, image = "trap/trap_ambush.png", dur = dur, unlock_talent_on_disarm = {tid=t.id, chance=20}, triggered = function(self, x, y, who) @@ -1818,13 +1818,13 @@ newTalent{ return true end, short_info = function(self, t) - return ([[3 stealthed rogues attack the target for %d turns.]]):format(t.getDuration(self,t)) + return ([[3 stealthed rogues attack the target for %d turns.]]):tformat(t.getDuration(self,t)) end, info = function(self, t) return ([[Lay a magical trap that summons a trio of shadowy rogues to attack the target. The rogues receive your damage bonuses and are permanently stealthed. They disappear after %d turns or when their work is done.]]): - format(t.getDuration(self,t)) + tformat(t.getDuration(self,t)) end, } @@ -1868,7 +1868,7 @@ newTalent{ local dur = t.getDuration(self,t) local nb = t.getNb(self,t) local trap = trapping_CreateTrap(self, t, nil, { - type = "nature", name = "purging trap", color=colors.YELLOW, image = "trap/trap_purging.png", + type = "nature", name = _t"purging trap", color=colors.YELLOW, image = "trap/trap_purging.png", check_hit = self:combatAttack(), lure_trigger = true, stamina = t.stamina, @@ -1943,7 +1943,7 @@ newTalent{ local dur = t.getDuration(self,t) local nb = t.getNb(self,t) return ([[Radius 2 antimagic: Drains up to %d mana, %d vim, %d positive/negative, deals up to %0.2f arcane damage. Removes %d magical effects and silences for %d turns.]]): - format(base, base/2, base/4, damDesc(self, DamageType.ARCANE, base), nb, dur) + tformat(base, base/2, base/4, damDesc(self, DamageType.ARCANE, base), nb, dur) end, info = function(self, t) local base = t.getDamage(self,t) @@ -1953,11 +1953,11 @@ newTalent{ local negative = base / 4 local dur = t.getDuration(self,t) local nb = t.getNb(self,t) - local instant = self.trap_primed == t.id and "\n#YELLOW#Triggers immediately when placed.#LAST#" or "" + local instant = self.trap_primed == t.id and _t"\n#YELLOW#Triggers immediately when placed.#LAST#" or "" return ([[Lay a trap that releases a burst of antimagic energies (radius 2), draining up to %d mana, %d vim, %d positive and %d negative energies from affected targets, while inflicting up to %0.2f arcane damage based on the resources drained, silencing for %d turns, and removing up to %d beneficial magical effects or sustains. The draining effect scales with your Willpower, and you must have 25 Willpower to prepare this trap. This trap can use a primed trigger and a high level lure can trigger it.%s]]): - format(mana, vim, positive, negative, damDesc(self, DamageType.ARCANE, base), dur, nb, instant) + tformat(mana, vim, positive, negative, damDesc(self, DamageType.ARCANE, base), dur, nb, instant) end, } @@ -1968,7 +1968,7 @@ newTalent{ points = 1, type_no_req = true, require = cuns_req_unlock, - unlock_talent = "You have learned how to create Explosion traps!", + unlock_talent = _t"You have learned how to create Explosion traps!", no_unlearn_last = true, cooldown = 8, stamina = 15, @@ -1990,7 +1990,7 @@ newTalent{ local tg = self:getTalentTarget(t) local dam = t.getDamage(self, t) local trap = trapping_CreateTrap(self, t, nil, { - type = "elemental", name = "explosion trap", color=colors.LIGHT_RED, image = "trap/blast_fire01.png", + type = "elemental", name = _t"explosion trap", color=colors.LIGHT_RED, image = "trap/blast_fire01.png", dam = dam, stamina = t.stamina, lure_trigger = true, @@ -2026,13 +2026,13 @@ newTalent{ end, short_info = function(self, t) return ([[Explodes (radius 2) for %0.2f fire damage over 3 turns.]]): - format(damDesc(self, DamageType.FIRE, t.getDamage(self, t))) + tformat(damDesc(self, DamageType.FIRE, t.getDamage(self, t))) end, info = function(self, t) - local instant = self.trap_primed == t.id and "\n#YELLOW#Triggers immediately when placed.#LAST#" or "" + local instant = self.trap_primed == t.id and _t"\n#YELLOW#Triggers immediately when placed.#LAST#" or "" return ([[Lay a simple yet effective trap that explodes in a radius 2 on contact, setting those affected on fire for %0.2f fire damage over 3 turns. This trap can use a primed trigger and a high level lure can trigger it.%s]]): - format(damDesc(self, DamageType.FIRE, t.getDamage(self, t)), instant) + tformat(damDesc(self, DamageType.FIRE, t.getDamage(self, t)), instant) end, } @@ -2043,7 +2043,7 @@ newTalent{ points = 1, type_no_req = true, require = cuns_req_unlock, - unlock_talent = "You have learned how to create Catapult traps!", + unlock_talent = _t"You have learned how to create Catapult traps!", no_unlearn_last = true, cooldown = 10, stamina = 15, @@ -2065,7 +2065,7 @@ newTalent{ if not (x and y) then return nil end local trap = trapping_CreateTrap(self, t, nil, { - type = "physical", name = "catapult trap", color=colors.LIGHT_UMBER, image = "trap/trap_catapult_01_64.png", + type = "physical", name = _t"catapult trap", color=colors.LIGHT_UMBER, image = "trap/trap_catapult_01_64.png", dist = t.getDistance(self, t), unlock_talent_on_disarm = {tid=t.id, chance=50}, check_hit = self:combatAttack(), @@ -2079,11 +2079,11 @@ newTalent{ target_y = self.y, desc = function(self) local dir = game.level.map:compassDirection(self.target_x-self.x, self.target_y-self.y) - dir = dir and (" (%s)"):format(dir) or "" - return ([[Target knocked back up to %d grids%s and dazed.]]):format(self.dist, dir) + dir = dir and (" (%s)"):tformat(dir) or "" + return ([[Target knocked back up to %d grids%s and dazed.]]):tformat(self.dist, dir) end, disarm = function(self, x, y, who) -- summoner won't disarm ---game.log("custom disarm for %s at (%s, %s) by %s", self.name, x, y, who.name) +--game.log("custom disarm for %s at (%s, %s) by %s", self.name, x, y, who:getName()) if who == self.summoner then return false end --game.log("non summoner disarm") return mod.class.Trap.disarm(self, x, y, who) @@ -2101,11 +2101,11 @@ newTalent{ end if kb_test(who) then - game.logSeen(who, "%s knocks %s back!", self:getName():capitalize(), who.name:capitalize()) + game.logSeen(who, "%s knocks %s back!", self:getName():capitalize(), who:getName():capitalize()) who:pull(self.target_x, self.target_y, self.dist, kb_test) if who:canBe("stun") then who:setEffect(who.EFF_DAZED, 5, {}) end else - game.logSeen(who, "%s fails to knock %s back!", self:getName():capitalize(), who.name:capitalize()) + game.logSeen(who, "%s fails to knock %s back!", self:getName():capitalize(), who:getName():capitalize()) end return true, not rng.percent(self.resetChance) end, @@ -2146,13 +2146,13 @@ newTalent{ end, short_info = function(self, t) return ([[Target knocked back %d grids and dazed.]]): - format(t.getDistance(self, t)) + tformat(t.getDistance(self, t)) end, info = function(self, t) return ([[Deploy a hidden spring-loaded catapult that will trigger (by pressure) for any creature passing over it. Victims will be knocked back towards a target location up to %d grids away and be dazed for 5 turns. This trap has a %d%% chance to reset itself after triggering, but can only trigger once per turn. The chance to affect the target improves with your combat accuracy.]]): - format(t.getDistance(self, t), t.resetChance(self, t)) + tformat(t.getDistance(self, t), t.resetChance(self, t)) end, } @@ -2163,7 +2163,7 @@ newTalent{ points = 1, type_no_req = true, require = cuns_req_unlock, - unlock_talent = "You have learned how to create Nightshade traps!", + unlock_talent = _t"You have learned how to create Nightshade traps!", no_unlearn_last = true, trap_mastery_level = 4, cooldown = 8, @@ -2179,7 +2179,7 @@ newTalent{ local dam = t.getDamage(self, t) local trap = trapping_CreateTrap(self, t, nil, { - type = "nature", name = "nightshade trap", color=colors.LIGHT_BLUE, image = "trap/poison_vines01.png", + type = "nature", name = _t"nightshade trap", color=colors.LIGHT_BLUE, image = "trap/poison_vines01.png", dam = dam, stamina = t.stamina, check_hit = self:combatAttack(), @@ -2208,12 +2208,12 @@ newTalent{ short_info = function(self, t) local dam = damDesc(self, DamageType.NATURE, t.getDamage(self, t)) return ([[Deals %0.1f nature damage, stuns and poisons for %0.1f nature/turn for 4 turns.]]): - format(dam, dam/10) + tformat(dam, dam/10) end, info = function(self, t) local dam = damDesc(self, DamageType.NATURE, t.getDamage(self, t)) return ([[Lay a trap armed with potent venom. A creature passing over it will be dealt %0.2f nature damage and be stunned and poisoned for %0.2f nature damage per turn for 4 turns.]]): - format(dam, dam/10) + tformat(dam, dam/10) end, } diff --git a/game/modules/tome/data/talents/cursed/advanced-shadowmancy.lua b/game/modules/tome/data/talents/cursed/advanced-shadowmancy.lua index 962fca45e7bd5a78a5733efbf73e0b3d1160ed4e..0192509d349b72a64590b783f4b480de36eaf715 100644 --- a/game/modules/tome/data/talents/cursed/advanced-shadowmancy.lua +++ b/game/modules/tome/data/talents/cursed/advanced-shadowmancy.lua @@ -59,7 +59,7 @@ newTalent{ info = function(self, t) return ([[Target a nearby shadow, and command it to merge into a nearby enemy, reducing their damage by %d%% for 5 turns. Killing your shadow releases some of your inner hatred, restoring 8 Hate to yourself.]]): - format(t.getReduction(self, t)) + tformat(t.getReduction(self, t)) end, } @@ -110,7 +110,7 @@ newTalent{ return ([[Target a nearby shadow, and force it to slam into a nearby enemy, dealing %0.1f Physical damage. Your shadow will then set them as their target, and they will target your shadow. Damage increases with your Mindpower.]]): - format(t.getDamage(self, t) * shadowWarriorMult(self)) + tformat(t.getDamage(self, t) * shadowWarriorMult(self)) end, } @@ -195,7 +195,7 @@ newTalent{ return ([[Command all Shadows within sight to tele-dash to a target location, damaging any enemies they pass through for %0.1f Physical damage. For the purpose of this talent, you force your shadows through any walls in their way. Damage increases with your Mindpower.]]): - format(t.getDamage(self, t) * shadowWarriorMult(self)) + tformat(t.getDamage(self, t) * shadowWarriorMult(self)) end, } @@ -263,6 +263,6 @@ newTalent{ return ([[Share your hatred with all shadows within sight range, gaining temporary full control. You then fire a blast of pure hatred from all affected shadows, dealing %0.1f Mind damage per blast. You cannot cancel this talent once the first bolt is cast. Damage increases with your Mindpower.]]): - format(t.getDamage(self, t) * shadowWarriorMult(self)) + tformat(t.getDamage(self, t) * shadowWarriorMult(self)) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/cursed/cursed-aura.lua b/game/modules/tome/data/talents/cursed/cursed-aura.lua index 86ac38cc6abd6252190e7f7d34392659c7db5f9d..2ffe28585399ae747de03efba39eaf6822961b35 100644 --- a/game/modules/tome/data/talents/cursed/cursed-aura.lua +++ b/game/modules/tome/data/talents/cursed/cursed-aura.lua @@ -85,7 +85,7 @@ newTalent{ local def = self.tempeffect_def[curse] local ego = Entity.new{ - name = "curse", + name = _t"curse", display_string = " ("..def.short_desc..")", curse = curse, fake_ego = true, unvault_ego = true, @@ -162,21 +162,21 @@ newTalent{ if choose then Dialog:yesnoLongPopup( - "Cursed Fate", - ("The %s lying nearby catches your attention. What draws you to it is not the thing itself, but something burning inside you. You feel contempt for it and all worldly things. This feeling is not new but the power of it overwhelms you. You reach out to touch the object, to curse it, to defile it. And you notice it begin to change. The colors of it begin to fade and are replaced with an insatiable hate. For a moment you hesitate. You know you must choose to resist this manifestation of your curse now and forever, or fall further into your madness."):format(item.name), + _t"Cursed Fate", + ("The %s lying nearby catches your attention. What draws you to it is not the thing itself, but something burning inside you. You feel contempt for it and all worldly things. This feeling is not new but the power of it overwhelms you. You reach out to touch the object, to curse it, to defile it. And you notice it begin to change. The colors of it begin to fade and are replaced with an insatiable hate. For a moment you hesitate. You know you must choose to resist this manifestation of your curse now and forever, or fall further into your madness."):tformat(item:getName()), 300, function(ret) if ret then - Dialog:simpleLongPopup("Cursed Fate", ("The %s lies defiled at your feet. An aura of hatred surrounds you and you now feel truly cursed. You have gained the Cursed Aura talent tree and 1 point in Defiling Touch, but at the cost of 2 Willpower."):format(item.name), 300) + Dialog:simpleLongPopup(_t"Cursed Fate", ("The %s lies defiled at your feet. An aura of hatred surrounds you and you now feel truly cursed. You have gained the Cursed Aura talent tree and 1 point in Defiling Touch, but at the cost of 2 Willpower."):tformat(item:getName()), 300) self:learnTalentType("cursed/cursed-aura", true) self:learnTalent(self.T_DEFILING_TOUCH, true, 1, {no_unlearn=true}) self:incIncStat(Stats.STAT_WIL, -2) else - Dialog:simplePopup("Cursed Fate", ("The %s returns to normal and your hate subsides."):format(item.name)) + Dialog:simplePopup(_t"Cursed Fate", ("The %s returns to normal and your hate subsides."):tformat(item:getName())) end end, - "Release your hate upon the object", - "Suppress your affliction") + _t"Release your hate upon the object", + _t"Suppress your affliction") end return choose end @@ -269,7 +269,7 @@ newTalent{ level 10 -- ammunition At level 5, you can activate this talent to surround yourself with an aura that adds 2 levels to a curse of your choosing. (%s chosen) Also, talent levels above 5 reduce the negative effects of your curses (currently %d%% reduction).]]): - format(t.getCursedAuraName(self, t), (1-t.cursePenalty(self, t))*100) + tformat(t.getCursedAuraName(self, t), (1-t.cursePenalty(self, t))*100) end, } @@ -296,7 +296,7 @@ newTalent{ local xs = t.curseBonusLevel(self,t) return ([[Your curses bring you dark gifts. Unlocks bonus level %d effects on all of your curses, allowing you to gain that effect when the power level of your curse reaches that level. At talent level 5, the luck penalty of cursed effects is reduced to 1. Talent levels above 5 add bonus power levels to your curses, increasing their effects (currently %0.1f).]]): - format(level, xs) + tformat(level, xs) end, } @@ -344,7 +344,7 @@ newTalent{ local duration = t.getDuration(self, t) local incDamage = t.getIncDamage(self, t) - return ([[Curse the earth around you in a radius of %d for %d turns. Any who stand upon it are weakened, reducing the damage they inflict by %d%%]]):format(range, duration, incDamage) + return ([[Curse the earth around you in a radius of %d for %d turns. Any who stand upon it are weakened, reducing the damage they inflict by %d%%]]):tformat(range, duration, incDamage) end, } @@ -356,14 +356,14 @@ newTalent{ action = function(self, t) local ct = self:getTalentFromId(self.T_CURSED_SENTRY) local inven = self:getInven("INVEN") - local d = self:showInventory("Which weapon will be your sentry?", inven, function(o) return ct.filterObject(self, ct, o) end, nil) + local d = self:showInventory(_t"Which weapon will be your sentry?", inven, function(o) return ct.filterObject(self, ct, o) end, nil) d.action = function(o, item) self:talentDialogReturn(true, o, item) return false end local ret, o, item = self:talentDialog(d) if not ret then return nil end self.cursed_sentry = o return true end, - info = function(self, t) return [[Choose a sentry to instill your affliction into.]] end, + info = function(self, t) return _t[[Choose a sentry to instill your affliction into.]] end, } newTalent{ @@ -427,10 +427,10 @@ newTalent{ local sentry = NPC.new { type = "construct", subtype = "weapon", display = o.display, color=o.color, image = o.image, blood_color = colors.GREY, - name = "animated "..o:getName(), + name = ("animated %s"):tformat(o:getName()), neuter = true, faction = self.faction, - desc = "A weapon imbued with a living curse. It seems to be searching for its next victim.", + desc = _t"A weapon imbued with a living curse. It seems to be searching for its next victim.", faction = self.faction, body = { INVEN = 10, MAINHAND=1, QUIVER=1 }, rank = 2, @@ -565,7 +565,7 @@ newTalent{ sentry.cursed_item = o if game.party:hasMember(self) then sentry.remove_from_party_on_death = true - game.party:addMember(sentry, { control="no", type="summon", title="Cursed Sentry"}) + game.party:addMember(sentry, { control="no", type="summon", title=_t"Cursed Sentry"}) end game:playSoundNear(self, "talents/spell_generic") @@ -580,6 +580,6 @@ newTalent{ Cursed Sentry attack speed (currently %d%%) will improve with talent level. When you first select a weapon, it will be remembered and used as long as it's in your inventory. Use Choose Cursed Sentry talent to alter your selection. At talent level 3, you get the ability to afflict powerful mundane objects (greater egos). - At talent level 5, you can corrupt artifacts.]]):format(duration, attackSpeed) + At talent level 5, you can corrupt artifacts.]]):tformat(duration, attackSpeed) end, } diff --git a/game/modules/tome/data/talents/cursed/cursed-form.lua b/game/modules/tome/data/talents/cursed/cursed-form.lua index 75d416297a0bdc503981f9ae0a3f9a2591a33c39..f77f186ab269be90b74e055988c6202e6533bf30 100644 --- a/game/modules/tome/data/talents/cursed/cursed-form.lua +++ b/game/modules/tome/data/talents/cursed/cursed-form.lua @@ -71,7 +71,7 @@ newTalent{ local regenRate = t.getRegenRate(self, t) return ([[Your body's strength is fed by your hatred. This causes most forms of healing to be between 50%% effective (at 0 Hate) to 100%% effective (at 100+ Hate). In addition, after each kill, you store the waning life force to invigorate yourself, restoring %d life (limited by the foe's maximum life, up to a maximum of %d at any time). You can heal no more than %0.1f life per turn this way, and it is not affected by your hatred level or other effects. - Healing from kills improves with your Willpower.]]):format(healPerKill, maxUnnaturalBodyHeal, regenRate) + Healing from kills improves with your Willpower.]]):tformat(healPerKill, maxUnnaturalBodyHeal, regenRate) end, } @@ -89,7 +89,7 @@ newTalent{ self:talentTemporaryValue(p, "stun_immune", t.getImmune(self, t)) end, info = function(self, t) - return ([[Your thirst for blood drives your movements. You gain +%d%% confusion, fear, knockback and stun immunity.]]):format(t.getImmune(self, t)*100) + return ([[Your thirst for blood drives your movements. You gain +%d%% confusion, fear, knockback and stun immunity.]]):tformat(t.getImmune(self, t)*100) end, } @@ -104,7 +104,7 @@ newTalent{ end, info = function(self, t) local incDamageChangeMax = t.getIncDamageChange(self, t, 5) - return ([[You have learned to hold onto your hate and use your suffering to fuel your body's rage. Every turn you take damage, the damage you inflict increases, until it reaches a maximum of +%d%% after 5 turns. Any turn in which you do not take damage will reduce the bonus.]]):format(incDamageChangeMax) + return ([[You have learned to hold onto your hate and use your suffering to fuel your body's rage. Every turn you take damage, the damage you inflict increases, until it reaches a maximum of +%d%% after 5 turns. Any turn in which you do not take damage will reduce the bonus.]]):tformat(incDamageChangeMax) end } @@ -119,7 +119,7 @@ newTalent{ info = function(self, t) local statChangeMax = t.getStatChange(self, t, 5) local neutralizeChance = t.getNeutralizeChance(self, t) - return ([[You rise to meet the pain that others would inflict on you. Every turn you take damage, your Strength and Willpower increase until they reach a maximum of +%d after 5 turns. Any turn in which you do not take damage will reduce the bonus. While in effect, your body also has a %d%% chance to overcome poisons and diseases each turn.]]):format(statChangeMax, neutralizeChance) + return ([[You rise to meet the pain that others would inflict on you. Every turn you take damage, your Strength and Willpower increase until they reach a maximum of +%d after 5 turns. Any turn in which you do not take damage will reduce the bonus. While in effect, your body also has a %d%% chance to overcome poisons and diseases each turn.]]):tformat(statChangeMax, neutralizeChance) end, } diff --git a/game/modules/tome/data/talents/cursed/cursed.lua b/game/modules/tome/data/talents/cursed/cursed.lua index 99beef395ab4c2912bb705dfcf410992070b6e36..4e53c0314cc16a162d676585dc412294ddb88ed4 100644 --- a/game/modules/tome/data/talents/cursed/cursed.lua +++ b/game/modules/tome/data/talents/cursed/cursed.lua @@ -18,28 +18,28 @@ -- darkgod@te4.org -- Cursed -newTalentType{ allow_random=true, type="cursed/slaughter", name = "slaughter", description = "Your weapon yearns for its next victim." } -newTalentType{ allow_random=true, type="cursed/endless-hunt", name = "endless hunt", description = "Each day, you lift your weary body and begin the unending hunt." } -newTalentType{ allow_random=true, type="cursed/strife", name = "strife", description = "The battlefield is your home; death and confusion, your comfort." } -newTalentType{ allow_random=true, is_mind=true, type="cursed/gloom", name = "gloom", description = "All those in your sight must share your despair." } -newTalentType{ allow_random=true, type="cursed/rampage", name = "rampage", description = "Let loose the hate that has grown within." } -newTalentType{ allow_random=false, type="cursed/predator", name = "predator", description = "Track and kill your prey with single-minded focus." } +newTalentType{ allow_random=true, type="cursed/slaughter", name = _t"slaughter", description = _t"Your weapon yearns for its next victim." } +newTalentType{ allow_random=true, type="cursed/endless-hunt", name = _t"endless hunt", description = _t"Each day, you lift your weary body and begin the unending hunt." } +newTalentType{ allow_random=true, type="cursed/strife", name = _t"strife", description = _t"The battlefield is your home; death and confusion, your comfort." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/gloom", name = _t"gloom", description = _t"All those in your sight must share your despair." } +newTalentType{ allow_random=true, type="cursed/rampage", name = _t"rampage", description = _t"Let loose the hate that has grown within." } +newTalentType{ allow_random=false, type="cursed/predator", name = _t"predator", description = _t"Track and kill your prey with single-minded focus." } -- Doomed -newTalentType{ allow_random=true, is_mind=true, type="cursed/dark-sustenance", name = "dark sustenance", generic = true, description = "The powers of your foes feed your dark will." } -newTalentType{ allow_random=true, is_mind=true, type="cursed/force-of-will", name = "force of will", description = "Invoke the powerful force of your will." } -newTalentType{ allow_random=true, is_mind=true, type="cursed/darkness", name = "darkness", description = "Harness the power of darkness to envelop your foes." } -newTalentType{ allow_random=true, is_mind=true, type="cursed/shadows", name = "shadows", description = "Summon shadows from the darkness to aid you." } -newTalentType{ allow_random=true, is_mind=true, type="cursed/punishments", name = "punishments", description = "Your hate becomes punishment in the minds of your foes." } -newTalentType{ allow_random=true, is_mind=true, type="cursed/one-with-shadows", name = "one with shadows", min_lev = 10, description = "Harness your shadows to their full potential." } -newTalentType{ allow_random=true, is_mind=true, type="cursed/advanced-shadowmancy", name = "advanced shadowmancy", min_lev = 10, description = "Gain more direct control over your shadows with physical damage talents." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/dark-sustenance", name = _t"dark sustenance", generic = true, description = _t"The powers of your foes feed your dark will." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/force-of-will", name = _t"force of will", description = _t"Invoke the powerful force of your will." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/darkness", name = _t"darkness", description = _t"Harness the power of darkness to envelop your foes." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/shadows", name = _t"shadows", description = _t"Summon shadows from the darkness to aid you." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/punishments", name = _t"punishments", description = _t"Your hate becomes punishment in the minds of your foes." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/one-with-shadows", name = _t"one with shadows", min_lev = 10, description = _t"Harness your shadows to their full potential." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/advanced-shadowmancy", name = _t"advanced shadowmancy", min_lev = 10, description = _t"Gain more direct control over your shadows with physical damage talents." } -- Generic -newTalentType{ allow_random=true, is_mind=true, type="cursed/gestures", name = "gestures", generic = true, description = "Enhance the power of your mind with gestures." } -newTalentType{ allow_random=true, is_mind=true, type="cursed/cursed-form", name = "cursed form", generic = true, description = "You are wracked with the dark energies of the curse." } -newTalentType{ allow_random=true, is_mind=true, type="cursed/cursed-aura", name = "cursed aura", generic = true, description = "The things you surround yourself with soon wither away." } -newTalentType{ allow_random=false, is_mind=true, type="cursed/curses", name = "curses", hide = true, description = "The effects of cursed objects." } -newTalentType{ allow_random=true, is_mind=true, type="cursed/fears", name = "fears", description = "Use the fear that lies at the heart of your curse to attack the minds of your enemies." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/gestures", name = _t"gestures", generic = true, description = _t"Enhance the power of your mind with gestures." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/cursed-form", name = _t"cursed form", generic = true, description = _t"You are wracked with the dark energies of the curse." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/cursed-aura", name = _t"cursed aura", generic = true, description = _t"The things you surround yourself with soon wither away." } +newTalentType{ allow_random=false, is_mind=true, type="cursed/curses", name = _t"curses", hide = true, description = _t"The effects of cursed objects." } +newTalentType{ allow_random=true, is_mind=true, type="cursed/fears", name = _t"fears", description = _t"Use the fear that lies at the heart of your curse to attack the minds of your enemies." } cursed_wil_req1 = { stat = { wil=function(level) return 12 + (level-1) * 2 end }, diff --git a/game/modules/tome/data/talents/cursed/dark-figure.lua b/game/modules/tome/data/talents/cursed/dark-figure.lua index 1fef405acd6d2e9a8e535f6aa5679f1f31fda1cf..5fde66de89fe0a343dac3edd63423053317afc6a 100644 --- a/game/modules/tome/data/talents/cursed/dark-figure.lua +++ b/game/modules/tome/data/talents/cursed/dark-figure.lua @@ -49,7 +49,7 @@ newTalent{ info = function(self, t) local radius = t.getRadius(self, t) local duration = t.getDuration(self, t) - return ([[Fear radiates from your target in a radius of %d for %d turns driving all others away.]]):format(radius, duration) + return ([[Fear radiates from your target in a radius of %d for %d turns driving all others away.]]):tformat(radius, duration) end, } @@ -66,7 +66,7 @@ newTalent{ getPercent = function(self, t) return 15 + math.floor(self:getTalentLevel(t) * 10) end, info = function(self, t) local percent = t.getPercent(self, t) - return ([[The time you have spent suppressing the curse has taught you self control. The duration of most non-magical effects are reduced by %d%%.]]):format(percent) + return ([[The time you have spent suppressing the curse has taught you self control. The duration of most non-magical effects are reduced by %d%%.]]):tformat(percent) end, } @@ -90,7 +90,7 @@ newTalent{ info = function(self, t) local speed = t.getSpeed(self, t) local duration = t.getDuration(self, t) - return ([[You are invigorated by the death around you. Each life you take grants %d%% speed for %d more turns.]]):format(100 + speed, duration) + return ([[You are invigorated by the death around you. Each life you take grants %d%% speed for %d more turns.]]):tformat(100 + speed, duration) end, } @@ -140,7 +140,7 @@ newTalent{ end, info = function(self, t) local range = t.range(self, t) - return ([[You hide your terrible nature behind a pitiful figure. Those that see you from a distance of %d will ignore you. If you attack or use a talent they will see you for what you are and pity will be deactivated.]]):format(range) + return ([[You hide your terrible nature behind a pitiful figure. Those that see you from a distance of %d will ignore you. If you attack or use a talent they will see you for what you are and pity will be deactivated.]]):tformat(range) end, } diff --git a/game/modules/tome/data/talents/cursed/dark-sustenance.lua b/game/modules/tome/data/talents/cursed/dark-sustenance.lua index 234fd8f5a10e2e27164946b0a2cfd2af02a5e59e..f8d39db9618fff1697516935b12d26a59bfa9bf4 100644 --- a/game/modules/tome/data/talents/cursed/dark-sustenance.lua +++ b/game/modules/tome/data/talents/cursed/dark-sustenance.lua @@ -115,7 +115,7 @@ newTalent{ local hateGain = t.getHateGain(self, t) return ([[Feed from the essence of your enemy. Draws %0.1f hate per turn from a targeted foe, as long as they remain in your line of sight. If you aren't already feeding this will be automatically applied to the nearest enemy. - Hate gain improves with your Mindpower.]]):format(hateGain) + Hate gain improves with your Mindpower.]]):tformat(hateGain) end, } @@ -131,7 +131,7 @@ newTalent{ info = function(self, t) local regen = t.getLifeRegen(self, t) return ([[Devours life from the target of your feeding reducing their life regeneration by %d and adding half of that to yours. - Improves with your Mindpower.]]):format(regen) + Improves with your Mindpower.]]):tformat(regen) end, } @@ -159,7 +159,7 @@ newTalent{ local constitutionGain = t.getConstitutionGain(self, t) local lifeRegenGain = t.getLifeRegenGain(self, t) return ([Enhances your feeding by transferring %d constitution and %0.1f life per turn from a targeted foe to you. - Improves with the Willpower stat.]):format(constitutionGain, lifeRegenGain) + Improves with the Willpower stat.]):tformat(constitutionGain, lifeRegenGain) end, } ]] @@ -175,7 +175,7 @@ newTalent{ info = function(self, t) local damageGain = t.getDamageGain(self, t) return ([[Enhances your feeding by reducing your targeted foe's damage by %d%%, and increasing yours by the same amount. - Improves with your Mindpower.]]):format(damageGain) + Improves with your Mindpower.]]):tformat(damageGain) end, } @@ -191,6 +191,6 @@ newTalent{ info = function(self, t) local resistGain = t.getResistGain(self, t) return ([[Enhances your feeding by reducing your targeted foe's resistances, multiplying them by %0.2f and increasing your resistances by the amount drained. Resistance to "all" is not affected. - Improves with your Mindpower.]]):format((1-(resistGain/100))) + Improves with your Mindpower.]]):tformat((1-(resistGain/100))) end, } diff --git a/game/modules/tome/data/talents/cursed/darkness.lua b/game/modules/tome/data/talents/cursed/darkness.lua index 303fc2938e5199c99a33d7382801e134886beeb3..9add149bf3216eabe0a9c754e3550296c26d3924 100644 --- a/game/modules/tome/data/talents/cursed/darkness.lua +++ b/game/modules/tome/data/talents/cursed/darkness.lua @@ -24,7 +24,7 @@ local function createDarkTendrils(summoner, x, y, target, damage, duration, pinD if not summoner:getTalentFromId(summoner.T_CREEPING_DARKNESS) then return end local e = Object.new{ - name = "dark tendril", + name = _t"dark tendril", block_sight=false, canAct = false, x = x, y = y, @@ -89,7 +89,7 @@ local function createDarkTendrils(summoner, x, y, target, damage, duration, pinD if hitTarget and self.target:canBe("pin") then -- attack the target - game.logSeen(self, "The dark tendrils lash at %s.", self.target.name) + game.logSeen(self, "The dark tendrils lash at %s.", self.target:getName()) -- pin target self.target:setEffect(self.target.EFF_PINNED, self.pinDuration, {}) @@ -204,7 +204,7 @@ newTalent{ end, createDark = function(summoner, x, y, damage, duration, creep, creepChance, initialCreep) local e = Object.new{ - name = summoner.name:capitalize() .. "'s creeping dark", + name = ("%s's creeping dark"):tformat(summoner:getName():capitalize()), block_sight=function(self, x, y, who) if who and who.attr and who:attr("pierce_creeping_darkness") and x and who.x and core.fov.distance(x, y, who.x, who.y) <= who:attr("pierce_creeping_darkness") then return false @@ -350,7 +350,7 @@ newTalent{ local darkCount = t.getDarkCount(self, t) local damageIncrease = getDamageIncrease(self) return ([[Creeping dark slowly spreads from the target location and %d spots in a radius of %d around the targeted location. The dark deals %0.2f darkness damage each turn to anything in its area, and blocks the sight of any who do not possess Dark Vision or some other magical means of seeing. - The damage will increase with your Mindpower. You do +%d%% damage to anything that has entered your creeping dark.]]):format(darkCount, radius, damage, damageIncrease) + The damage will increase with your Mindpower. You do +%d%% damage to anything that has entered your creeping dark.]]):tformat(darkCount, radius, damage, damageIncrease) end, } @@ -373,7 +373,7 @@ newTalent{ local movementSpeedChange = t.getMovementSpeedChange(self, t) local damageIncrease = getDamageIncrease(self) return ([[Your eyes penetrate the darkness to find anyone that may be hiding there. This allows you to see through creeping darkness out to a radius of %d. You can also find your way through the darkness with greater speed (+%d%% movement into creeping darkness). - You do +%d%% damage to anything that has entered your creeping dark.]]):format(range, movementSpeedChange * 100, damageIncrease) + You do +%d%% damage to anything that has entered your creeping dark.]]):tformat(range, movementSpeedChange * 100, damageIncrease) end, } @@ -411,7 +411,7 @@ newTalent{ if not target.dead and target:canBe("blind") then target:setEffect(target.EFF_BLINDED, 3, {apply_power=self:combatMindpower(), min_dur=1}) target:setTarget(nil) - --game.logSeen(target, "%s stumbles in the darkness!", target.name:capitalize()) + --game.logSeen(target, "%s stumbles in the darkness!", target:getName():capitalize()) end end end @@ -431,7 +431,7 @@ newTalent{ local damage = t.getDamage(self, t) local damageIncrease = getDamageIncrease(self) return ([[Sends a torrent of searing darkness through your foes, doing %d damage. There is a 25%% chance the rushing darkness will blind them for 3 turns, and cause them to forget their target. - The damage will increase with your Mindpower. You do +%d%% damage to anything that has entered your creeping dark.]]):format(damDesc(self, DamageType.DARKNESS, damage), damageIncrease) + The damage will increase with your Mindpower. You do +%d%% damage to anything that has entered your creeping dark.]]):tformat(damDesc(self, DamageType.DARKNESS, damage), damageIncrease) end, } @@ -474,6 +474,6 @@ newTalent{ local damage = t.getDamage(self, t) local damageIncrease = getDamageIncrease(self) return ([[Send tendrils of creeping dark out to attack your target, and pin them in the darkness for %d turns. Creeping dark will trail behind the tendrils as they move. The darkness does %d damage per turn. - The damage will increase with your Mindpower. You do +%d%% damage to anything that has entered your creeping dark.]]):format(pinDuration, damage, damageIncrease) + The damage will increase with your Mindpower. You do +%d%% damage to anything that has entered your creeping dark.]]):tformat(pinDuration, damage, damageIncrease) end, } diff --git a/game/modules/tome/data/talents/cursed/endless-hunt.lua b/game/modules/tome/data/talents/cursed/endless-hunt.lua index 8a30b8575b64f3a7fbfc5eac86d7c2b124d50f36..e26f734ecb0150a344175f6b407b7bff07701b75 100644 --- a/game/modules/tome/data/talents/cursed/endless-hunt.lua +++ b/game/modules/tome/data/talents/cursed/endless-hunt.lua @@ -85,7 +85,7 @@ newTalent{ Bonus level 1: +%d Accuracy, +%d%% melee damage, +%0.2f hate/turn prey was hit Bonus level 2: +%d Accuracy, +%d%% melee damage, +%0.2f hate/turn prey was hit Bonus level 3: +%d Accuracy, +%d%% melee damage, +%0.2f hate/turn prey was hit - The accuracy bonus improves with your Willpower, and the melee damage bonus with your Strength.]]):format(duration, + The accuracy bonus improves with your Willpower, and the melee damage bonus with your Strength.]]):tformat(duration, t.getAttackChange(self, t, 1), t.getStalkedDamageMultiplier(self, t, 1) * 100 - 100, t.getHitHateChange(self, t, 1), t.getAttackChange(self, t, 2), t.getStalkedDamageMultiplier(self, t, 2) * 100 - 100, t.getHitHateChange(self, t, 2), t.getAttackChange(self, t, 3), t.getStalkedDamageMultiplier(self, t, 3) * 100 - 100, t.getHitHateChange(self, t, 3)) @@ -149,7 +149,7 @@ newTalent{ local t = rng.tableRemove(tids) if t then target.talents_cd[t.id] = getCooldownDuration - game.logSeen(target, "#F53CBE#%s's %s is disrupted!", target.name:capitalize(), t.name) + game.logSeen(target, "#F53CBE#%s's %s is disrupted!", target:getName():capitalize(), t.name) end end end @@ -164,7 +164,7 @@ newTalent{ return ([[Harass your stalked victim with two quick attacks for %d%% (at 0 Hate) to %d%% (at 100+ Hate) damage each. Each attack that scores a hit disrupts one talent, rune or infusion for %d turns. Your opponent will be unnerved by the attacks, reducing the damage they deal by %d%% for %d turns. Damage reduction increases with the Willpower stat. - This talent will also attack with your shield, if you have one equipped.]]):format(t.getDamageMultiplier(self, t, 0) * 100, t.getDamageMultiplier(self, t, 100) * 100, cooldownDuration, -targetDamageChange, duration) + This talent will also attack with your shield, if you have one equipped.]]):tformat(t.getDamageMultiplier(self, t, 0) * 100, t.getDamageMultiplier(self, t, 100) * 100, cooldownDuration, -targetDamageChange, duration) end, } @@ -212,7 +212,7 @@ newTalent{ local spellpowerChange = t.getSpellpowerChange(self, t) local mindpowerChange = t.getMindpowerChange(self, t) return ([[The connection between predator and prey allows you to speak to the mind of your target and beckon them closer. For %d turns, they will try to come to you, even pushing others aside to do so. They will move towards you instead of acting %d%% of the time, but can save verses Mindpower to slow the effect. If they take significant damage, the beckoning may be overcome altogether. The effect makes concentration difficult for your target, reducing Spellpower and Mindpower by %d until they reach you. - The Spellpower and Mindpower reduction increases with your Willpower.]]):format(duration, chance, -spellpowerChange) + The Spellpower and Mindpower reduction increases with your Willpower.]]):tformat(duration, chance, -spellpowerChange) end, } @@ -268,6 +268,6 @@ newTalent{ return ([[Let hate fuel your movements. While active, you gain %d%% movement speed. The recklessness of your movement brings you bad luck (Luck -3). Cleave, Repel and Surge cannot be active simultaneously, and activating one will place the others in cooldown. Sustaining Surge while Dual Wielding grants %d additional Defense. - Movement speed and dual-wielding Defense both increase with the Willpower stat.]]):format(movementSpeedChange * 100, defenseChange) + Movement speed and dual-wielding Defense both increase with the Willpower stat.]]):tformat(movementSpeedChange * 100, defenseChange) end, } diff --git a/game/modules/tome/data/talents/cursed/fears.lua b/game/modules/tome/data/talents/cursed/fears.lua index 07b5b0de05b779f1bb1b85b6ca42c57daaeecd83..5ef9bb010cf48b2832eb9933319b17862456da87 100644 --- a/game/modules/tome/data/talents/cursed/fears.lua +++ b/game/modules/tome/data/talents/cursed/fears.lua @@ -67,7 +67,7 @@ newTalent{ --mindpower check local mindpower = self:combatMindpower() if not target:checkHit(mindpower, target:combatMentalResist()) then - game.logSeen(target, "%s resists the fear!", target.name:capitalize()) + game.logSeen(target, "%s resists the fear!", target:getName():capitalize()) return nil end @@ -83,7 +83,7 @@ newTalent{ --fear res check & heighten fear bypass if not no_fearRes and not target:canBe("fear") then - game.logSeen(target, "#F53CBE#%s resists the fear!", target.name:capitalize()) + game.logSeen(target, "#F53CBE#%s resists the fear!", target:getName():capitalize()) return true end @@ -194,7 +194,7 @@ newTalent{ #ORANGE#Despair:#LAST# Reduces mind resist, mindsave, armour and defence by %d. #ORANGE#Terrified:#LAST# Deals %0.2f mind and %0.2f darkness damage per turn and increases cooldowns by %d%%. #ORANGE#Haunted:#LAST# Causes the target to suffer %0.2f mind and %0.2f darkness damage for each detrimental mental effect every turn. - ]]):format(self:getTalentRadius(t), damDesc(self, DamageType.MIND, damInstil), damDesc(self, DamageType.DARKNESS, damInstil), t.getDuration(self, t), + ]]):tformat(self:getTalentRadius(t), damDesc(self, DamageType.MIND, damInstil), damDesc(self, DamageType.DARKNESS, damInstil), t.getDuration(self, t), t.getParanoidAttackChance(self, t), -t.getDespairStatChange(self, t), damDesc(self, DamageType.MIND, damTerri), damDesc(self, DamageType.DARKNESS, damTerri), t.getTerrifiedPower(self, t), @@ -230,7 +230,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Heighten the fears of those near to you. Any foe you attempt to inflict a fear upon and who remains in a radius of %d and in sight of you for %d (non-consecutive) turns, will take %0.2f mind and %0.2f darkness damage and gain a new fear that lasts for %d turns. This effect completely ignores fear resistance, but can be saved against.]]): - format(range, turnsUntilTrigger, damDesc(self, DamageType.MIND, t.getDamage(self, t) / 2), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t) / 2 ), duration) + tformat(range, turnsUntilTrigger, damDesc(self, DamageType.MIND, t.getDamage(self, t) / 2), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t) / 2 ), duration) end, } @@ -251,7 +251,7 @@ newTalent{ getExtendChance = function(self, t) return self:combatTalentLimit(t, 60, 20, 50) end, info = function(self, t) return ([[Impose your tyranny on the minds of those who fear you. When a foe gains a new fear, you have a %d%% chance to increase the duration of their heightened fear and one random existing fear effect by %d turns, to a maximum of 8 turns. - Additionally, you gain %d Mindpower and Physical power for 5 turns every time you apply a fear, stacking up to %d times.]]):format(t. getExtendChance(self, t), t.getExtendFear(self, t), t.getTyrantPower(self, t), t.getMaxStacks(self, t)) + Additionally, you gain %d Mindpower and Physical power for 5 turns every time you apply a fear, stacking up to %d times.]]):tformat(t. getExtendChance(self, t), t.getExtendFear(self, t), t.getTyrantPower(self, t), t.getMaxStacks(self, t)) end, } @@ -281,11 +281,11 @@ newTalent{ local actor = game.level.map(px, py, engine.Map.ACTOR) if actor and self:reactionToward(actor) < 0 and actor ~= self then if not actor:canBe("fear") then - game.logSeen(actor, "#F53CBE#%s ignores the panic!", actor.name:capitalize()) + game.logSeen(actor, "#F53CBE#%s ignores the panic!", actor:getName():capitalize()) elseif actor:checkHit(self:combatMindpower(), actor:combatMentalResist(), 0, 95) then actor:setEffect(actor.EFF_PANICKED, duration, {src=self, range=10, chance=chance, tyrantPower=tyrantPower, maxStacks=maxStacks, tyrantDur=tyrantDur}) else - game.logSeen(actor, "#F53CBE#%s resists the panic!", actor.name:capitalize()) + game.logSeen(actor, "#F53CBE#%s resists the panic!", actor:getName():capitalize()) end end end, @@ -296,6 +296,6 @@ newTalent{ local range = self:getTalentRange(t) local duration = t.getDuration(self, t) local chance = t.getChance(self, t) - return ([[Panic your enemies within a range of %d for %d turns. Anyone who fails to make a mental save against your Mindpower has a %d%% chance each turn of trying to run away from you.]]):format(range, duration, chance) + return ([[Panic your enemies within a range of %d for %d turns. Anyone who fails to make a mental save against your Mindpower has a %d%% chance each turn of trying to run away from you.]]):tformat(range, duration, chance) end, } diff --git a/game/modules/tome/data/talents/cursed/force-of-will.lua b/game/modules/tome/data/talents/cursed/force-of-will.lua index cae982201ef78862ea0f93c6be6630ea3e86dc71..9d6c6e315034fb794166dd17ee5f8195563ca499 100644 --- a/game/modules/tome/data/talents/cursed/force-of-will.lua +++ b/game/modules/tome/data/talents/cursed/force-of-will.lua @@ -76,9 +76,9 @@ newTalent{ target:logCombat(nextTarget, "#Source# was blasted into #Target#!") end elseif knockbackCount > 0 then - game.logSeen(target, "%s was smashed back %d spaces!", target.name:capitalize(), knockbackCount) + game.logSeen(target, "%s was smashed back %d spaces!", target:getName():capitalize(), knockbackCount) else - game.logSeen(target, "%s was smashed!", target.name:capitalize()) + game.logSeen(target, "%s was smashed!", target:getName():capitalize()) end -- take partial damage @@ -103,7 +103,7 @@ newTalent{ end if not blocked and knockbackCount > 0 then - game.logSeen(target, "%s was blasted back %d spaces!", target.name:capitalize(), knockbackCount) + game.logSeen(target, "%s was blasted back %d spaces!", target:getName():capitalize(), knockbackCount) end if not target.dead and (finalX ~= target.x or finalY ~= target.y) then @@ -139,7 +139,7 @@ newTalent{ local knockback = t.getKnockback(self, t) return ([[Focusing your hate, you strike your foe with unseen force for %d damage and %d knockback. In addition, your ability to channel force with this talent increases all critical damage by %d%% (currently: %d%%) - Damage increases with your Mindpower.]]):format(damDesc(self, DamageType.PHYSICAL, damage), knockback, t.critpower(self, t), self.combat_critical_power or 0) + Damage increases with your Mindpower.]]):tformat(damDesc(self, DamageType.PHYSICAL, damage), knockback, t.critpower(self, t), self.combat_critical_power or 0) end, } @@ -158,7 +158,7 @@ newTalent{ return self:combatTalentMindDamage(t, 0, 400) end, getDisplayName = function(self, t, p) - return ("Deflection (%d)"):format(p.value) + return ("Deflection (%d)"):tformat(p.value) end, iconOverlay = function(self, t, p) local val = p.value or 0 @@ -230,7 +230,7 @@ newTalent{ local recharge_rate = t.getRechargeRate(self, t) return ([[Create a barrier that siphons hate from you at the rate of 0.2 a turn. The barrier will deflect 50%% of incoming damage with the force of your will, up to %d damage. The barrier charges at a rate of 1/%d of its maximum charge per turn. In addition, your ability to channel force with this talent increases all critical damage by %d%% (currently: %d%%) - The maximum damage deflected increases with your Mindpower.]]):format(maxDamage, recharge_rate, t.critpower(self, t),self.combat_critical_power or 0) + The maximum damage deflected increases with your Mindpower.]]):tformat(maxDamage, recharge_rate, t.critpower(self, t),self.combat_critical_power or 0) end, } @@ -306,7 +306,7 @@ newTalent{ local dazeDuration = t.getDazeDuration(self, t) return ([[You rage coalesces at a single point, and then explodes outward, blasting enemies within a radius of %d in all directions. The blast causes %d damage and %d knockback at the center, that decreases with distance. Anyone caught in the explosion will also be dazed for 3 turns. In addition, your ability to channel force with this talent increases all critical damage by %d%% (currently: %d%%) - Damage increases with your Mindpower.]]):format(radius, damDesc(self, DamageType.PHYSICAL, damage), knockback, t.critpower(self, t), self.combat_critical_power or 0) + Damage increases with your Mindpower.]]):tformat(radius, damDesc(self, DamageType.PHYSICAL, damage), knockback, t.critpower(self, t), self.combat_critical_power or 0) end, } @@ -359,6 +359,6 @@ newTalent{ local chance = secondHitChance - math.floor(secondHitChance/100)*100 return ([[Your fury becomes an unseen force that randomly lashes out at foes around you. For %d turns you strike %d (%d%% chance for %d) nearby target(s) within range %d doing %d damage and %d knockback. The number of extra strikes increases at higher talent levels. In addition, your ability to channel force with this talent increases all critical damage by %d%% (currently: %d%%) - Damage increases with your Mindpower.]]):format(duration, hits, chance, hits+1, self:getTalentRange(t), damDesc(self, DamageType.PHYSICAL, damage), knockback, t.critpower(self, t), self.combat_critical_power or 0) + Damage increases with your Mindpower.]]):tformat(duration, hits, chance, hits+1, self:getTalentRange(t), damDesc(self, DamageType.PHYSICAL, damage), knockback, t.critpower(self, t), self.combat_critical_power or 0) end, } diff --git a/game/modules/tome/data/talents/cursed/gestures.lua b/game/modules/tome/data/talents/cursed/gestures.lua index cc24900229c1959734094c015c12b6aeef7bdbbc..9650a3faaf95ec77d1ef0beca2ba8e1748c136f3 100644 --- a/game/modules/tome/data/talents/cursed/gestures.lua +++ b/game/modules/tome/data/talents/cursed/gestures.lua @@ -132,7 +132,7 @@ newTalent{ target:removeEffect(target.EFF_DISMAYED) end else - game.logSeen(self, "%s resists the Gesture of Pain.", target.name:capitalize()) + game.logSeen(self, "%s resists the Gesture of Pain.", target:getName():capitalize()) game:playSoundNear(self, "actions/melee_miss") end @@ -203,7 +203,7 @@ newTalent{ This talent requires two free or mindstar-equipped hands and has a 25%% chance to inflict brainlock, which can critically hit. The damage will increase with your Mindpower. If attacking with two mindstars the attack will trigger their proc effects, if any. Mindstars bonuses from damage and physical criticals: (+%d damage, +%d critical chance)]]) - :format(damDesc(self, DamageType.MIND, baseDamage * 0.5), damDesc(self, DamageType.MIND, baseDamage), stunChance, bonusDamage, bonusCritical) + :tformat(damDesc(self, DamageType.MIND, baseDamage * 0.5), damDesc(self, DamageType.MIND, baseDamage), stunChance, bonusDamage, bonusCritical) end, } @@ -224,7 +224,7 @@ newTalent{ local resistAllChange = t.getResistAllChange(self, t) local duration = t.getDuration(self, t) return ([[Enhance your Gesture of Pain with a malicious curse that causes any victim that is struck to have all resistances lowered by %d%% for %d turns. - ]]):format(-resistAllChange, duration) + ]]):tformat(-resistAllChange, duration) end, } @@ -249,7 +249,7 @@ newTalent{ local mindpowerChange = t.getMindpowerChange(self, t, 2) local mindCritChange = t.getMindCritChange(self, t) return ([[Enhance your mental attacks with a single gesture. You gain +%d mindpower and +%d%% chance to inflict critical damage with mind-based attacks (current chance is %d%%). - Requires two free or mindstar-equipped hands; does not require Gesture of Pain to be sustained.]]):format(mindpowerChange, mindCritChange, self:combatMindCrit()) + Requires two free or mindstar-equipped hands; does not require Gesture of Pain to be sustained.]]):tformat(mindpowerChange, mindCritChange, self:combatMindCrit()) end, } @@ -303,6 +303,6 @@ newTalent{ local counterAttackChance = t.getCounterAttackChance(self, t, true) return ([[You guard against melee damage with a sweep of your hand. So long as you can use Gestures (Requires two free or mindstar-equipped hands), you deflect up to %d damage (%0.1f%% of your best free hand melee damage) from up to %0.1f melee attack(s) each turn (based on your cunning). Deflected attacks cannot be crits. If Gesture of Pain is active, you also have a %0.1f%% chance to counterattack.]]): - format(damageChange, t.getGuardPercent(self, t), t.getDeflects(self, t, true), counterAttackChance) + tformat(damageChange, t.getGuardPercent(self, t), t.getDeflects(self, t, true), counterAttackChance) end, } diff --git a/game/modules/tome/data/talents/cursed/gloom.lua b/game/modules/tome/data/talents/cursed/gloom.lua index 95f115d26e7e6700c0dd574ec268f6b71ae20c31..f63994ad92d260d1d7c8a9e0fefd8ca54aaaa3c5 100644 --- a/game/modules/tome/data/talents/cursed/gloom.lua +++ b/game/modules/tome/data/talents/cursed/gloom.lua @@ -124,7 +124,7 @@ newTalent{ return ([[A terrible gloom surrounds you, affecting all those who approach to within radius 3. At the end of each game turn, those caught in your gloom must save against your Mindpower, or have a %d%% chance to suffer from slowness (30%%), stun or confusion (30%%) for %d turns. The chance increases with your mind speed. This ability is innate, and carries no cost to activate or deactivate. - Each point in Gloom talents increases your Mindpower (current total: %d).]]):format(chance, duration, mindpowerChange) + Each point in Gloom talents increases your Mindpower (current total: %d).]]):tformat(chance, duration, mindpowerChange) end, } @@ -150,7 +150,7 @@ newTalent{ local mindpowerChange = gloomTalentsMindpower(self) return ([[Each turn, those caught in your gloom must save against your Mindpower, or have a %d%% chance to be crippled by fear for %d turns, reducing damage they inflict by %d%%. The first time you melee strike a foe after they have been weakened will give you %d hate. The chance increases with your mind speed. - Each point in Gloom talents increases your Mindpower (current total: %d).]]):format(chance, duration, -incDamageChange, hateBonus, mindpowerChange) + Each point in Gloom talents increases your Mindpower (current total: %d).]]):tformat(chance, duration, -incDamageChange, hateBonus, mindpowerChange) end, } @@ -184,7 +184,7 @@ newTalent{ info = function(self, t) return ([[Every time you act, all enemies in your gloom take %0.2f mind damage and %0.2f darkness damage. The damage scales with your Mindpower. - Each point in Gloom talents increases your Mindpower (current total: %d).]]):format(damDesc(self, DamageType.MIND, t.getDamage(self, t) * 0.5), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t) * 0.5), gloomTalentsMindpower(self)) + Each point in Gloom talents increases your Mindpower (current total: %d).]]):tformat(damDesc(self, DamageType.MIND, t.getDamage(self, t) * 0.5), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t) * 0.5), gloomTalentsMindpower(self)) end, } @@ -201,6 +201,6 @@ newTalent{ local damageChange = t.getDamageChange(self, t) local mindpowerChange = gloomTalentsMindpower(self) return ([[Your gloom has become a sanctuary from the outside world. Damage from any attack that originates beyond the boundary of your gloom is reduced by %d%%. - Each point in Gloom talents increases your Mindpower (current total: %d).]]):format(-damageChange, mindpowerChange) + Each point in Gloom talents increases your Mindpower (current total: %d).]]):tformat(-damageChange, mindpowerChange) end, } diff --git a/game/modules/tome/data/talents/cursed/one-with-shadows.lua b/game/modules/tome/data/talents/cursed/one-with-shadows.lua index 5e93316f0f3ea5ba3ae56fca2302786c85d807e6..d11a73086b5e6157a0efdb1d209e09d5a7e5cf0f 100644 --- a/game/modules/tome/data/talents/cursed/one-with-shadows.lua +++ b/game/modules/tome/data/talents/cursed/one-with-shadows.lua @@ -30,7 +30,7 @@ newTalent{ info = function(self, t) return ([[Your awareness extends to your shadows. You always know exactly where your shadows are and can perceive any foe within %d tiles of their vision.]]) - :format(self:getTalentRange(t)) + :tformat(self:getTalentRange(t)) end, } @@ -88,7 +88,7 @@ newTalent{ info = function(self, t) return ([[You empathy with your shadows causes the line between you and your shadows to blur. You lose %d%% light resistance, but gain %d%% darkness resistance and affinity. You also gain %0.2f%% all resistance for each shadow in your party.]]): - format(t.getLightResist(self, t), t.getDarkResist(self, t), t.getAllResScale(self, t)) + tformat(t.getLightResist(self, t), t.getDarkResist(self, t), t.getAllResScale(self, t)) end, } @@ -125,7 +125,7 @@ newTalent{ return ([[Observers find it difficult to tell you and your shadows apart. You can target a shadow in radius %d and instantly trade places with it. %d random negative physical or magical effects are transferred from you to the chosen shadow in the process.]]) - :format(self:getTalentRadius(t), t.getNb(self, t)) + :tformat(self:getTalentRadius(t), t.getNb(self, t)) end, } @@ -161,8 +161,8 @@ newTalent{ -- end if not shadow then return false end - game:delayedLogDamage(src, self, 0, ("#GOLD#(%d decoy)#LAST#"):format(value), false) - game:delayedLogDamage(src, shadow, value, ("#GOLD#%d decoy#LAST#"):format(value), false) + game:delayedLogDamage(src, self, 0, ("#GOLD#(%d decoy)#LAST#"):tformat(value), false) + game:delayedLogDamage(src, shadow, value, ("#GOLD#%d decoy#LAST#"):tformat(value), false) shadow:takeHit(value, src) self:setEffect(self.EFF_SHADOW_DECOY, 4, {power=t.getPower(self, t)}) self:forceUseTalent(t.id, {ignore_energy=true}) @@ -184,6 +184,6 @@ newTalent{ When you would receive a fatal blow, you instantly transpose with a random shadow that takes the blow instead, putting this talent on cooldown. For the next 4 turns you only die if you reach -%d life. Effect increases with Mindpower.]]): - format(t.getPower(self, t)) + tformat(t.getPower(self, t)) end, } diff --git a/game/modules/tome/data/talents/cursed/predator.lua b/game/modules/tome/data/talents/cursed/predator.lua index 7854e2b7ab315b6d3019632ef80f538dcfd72d92..07b11eac9d47eaa367e34a0b2b1e53593efa0f0a 100644 --- a/game/modules/tome/data/talents/cursed/predator.lua +++ b/game/modules/tome/data/talents/cursed/predator.lua @@ -54,7 +54,7 @@ newTalent{ end end, info = function(self, t) - return ([[Improve your predation by learning from past hunts. You gain %0.2f accuracy and %0.2f armor penetration against foes for each foe of that type you have previously slain, to a maximum of %d accuracy and %d apr.]]):format(t.getATK(self, t), t.getAPR(self, t), t.getATK(self, t) * t.getTypeKillMax(self, t), t.getAPR(self, t) * t.getTypeKillMax(self, t), t.getTypeKillMax(self, t)) + return ([[Improve your predation by learning from past hunts. You gain %0.2f accuracy and %0.2f armor penetration against foes for each foe of that type you have previously slain, to a maximum of %d accuracy and %d apr.]]):tformat(t.getATK(self, t), t.getAPR(self, t), t.getATK(self, t) * t.getTypeKillMax(self, t), t.getAPR(self, t) * t.getTypeKillMax(self, t), t.getTypeKillMax(self, t)) end, } @@ -103,7 +103,7 @@ newTalent{ end, createDark = function(summoner, x, y, damage, duration, creep, creepChance, initialCreep) local e = Object.new{ - name = summoner.name:capitalize() .. "'s cursed miasma", + name = ("%s's cursed miasma"):tformat(summoner:getName():capitalize()), block_sight=function(self, x, y, who) if who and who.attr and who:attr("pierce_cursed_miasma") and x and who.x and core.fov.distance(x, y, who.x, who.y) <= 10 then return false @@ -239,7 +239,7 @@ newTalent{ return ([[Upon making a critical melee attack the savagery of your predation causes a Cursed Miasma to begin permeating your hunting grounds. The miasma will seep from %d locations, including your own, within radius %d, deals %0.2f damage split between Darkness and Mind and blocks sight. Prey lost within your miasma have a %d%% chance to lose track of you and may mistake friends for foe. - Savage Hunter costs #ffa0ff#8 Hate#LAST# on trigger and does not trigger when you're in Cursed Miasma.]]):format(t.getMiasmaCount(self, t), self:getTalentRadius(t), self:damDesc(DamageType.DARKNESS, t.getDamage(self, t)/2) + self:damDesc(DamageType.MIND, t.getDamage(self, t)/2), t.getChance(self, t)) + Savage Hunter costs #ffa0ff#8 Hate#LAST# on trigger and does not trigger when you're in Cursed Miasma.]]):tformat(t.getMiasmaCount(self, t), self:getTalentRadius(t), self:damDesc(DamageType.DARKNESS, t.getDamage(self, t)/2) + self:damDesc(DamageType.MIND, t.getDamage(self, t)/2), t.getChance(self, t)) end, } @@ -264,7 +264,7 @@ newTalent{ end, info = function(self, t) return ([[While shrouded in cursed miasma you gain stealth (%d power) and %d physical power. - The stealth power and physical power will increase with your mindpower.]]):format(t.getStealthPower(self, t), t.getPhysPower(self, t)) + The stealth power and physical power will increase with your mindpower.]]):tformat(t.getStealthPower(self, t), t.getPhysPower(self, t)) end, } @@ -325,6 +325,6 @@ newTalent{ end, info = function(self, t) - return([[Focus your predation on the most worthy prey. Upon entering a level for the first time, up to %d foes are marked as your prey. You gain vision of them, wherever they are. Additionally, all damage you receive from their subtype is reduced by %d%%.]]):format(t.getCount(self, t), t.getPower(self, t)) + return([[Focus your predation on the most worthy prey. Upon entering a level for the first time, up to %d foes are marked as your prey. You gain vision of them, wherever they are. Additionally, all damage you receive from their subtype is reduced by %d%%.]]):tformat(t.getCount(self, t), t.getPower(self, t)) end, } diff --git a/game/modules/tome/data/talents/cursed/primal-magic.lua b/game/modules/tome/data/talents/cursed/primal-magic.lua index 59afedd7d9e512644477d1d64ed3879633398e4b..1bf8636eefebbbff206532e59fdc3d52e2cfa500 100644 --- a/game/modules/tome/data/talents/cursed/primal-magic.lua +++ b/game/modules/tome/data/talents/cursed/primal-magic.lua @@ -93,7 +93,7 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) return ([[Each turn for 4 turns you fire a bolt of arcane energy at your nearest enemy inflicting %d damage. - The damage will increase with the Magic stat.]]):format(damDesc(self, DamageType.ARCANE, damage)) + The damage will increase with the Magic stat.]]):tformat(damDesc(self, DamageType.ARCANE, damage)) end, } @@ -136,7 +136,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Instantaneously displace yourself within line of sight up to 3 squares away.]]) + return ([[Instantaneously displace yourself within line of sight up to 3 squares away.]]):tformat() end, } @@ -151,7 +151,7 @@ newTalent{ info = function(self, t) local armor = t.getArmor(self, t) return ([[Years of magic have permeated your skin leaving it resistant to the physical world. Your armor is increased by %d. - The bonus will increase with the Magic stat.]]):format(armor) + The bonus will increase with the Magic stat.]]):tformat(armor) end, } @@ -204,6 +204,6 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Bathes the target in raw magic inflicting %d damage. Such wild magic is difficult to control and if you fail to keep your wits you will be confused for 4 turns. The damage will increase with the Magic stat.]]): - format(damDesc(self, DamageType.ARCANE, damage)) + tformat(damDesc(self, DamageType.ARCANE, damage)) end, } diff --git a/game/modules/tome/data/talents/cursed/punishments.lua b/game/modules/tome/data/talents/cursed/punishments.lua index 4734aebfd062a5942f92a7e33e32b6d108bebb95..fdde2a38be845d7cb57153abd482ad70303a2878 100644 --- a/game/modules/tome/data/talents/cursed/punishments.lua +++ b/game/modules/tome/data/talents/cursed/punishments.lua @@ -62,7 +62,7 @@ newTalent{ local damage = t.getDamage(self, t) local spreadFactor = t.getSpreadFactor(self, t) return ([[You unleash your hateful mind on any who dare approach you, inflicing %d mind damage. The attack will hit multiple targets, but each additional target will further reduce damage by %d%%. - 25%% chance to brainlock. The damage increases with your Mindpower.]]):format(damDesc(self, DamageType.MIND, damage), (1 - spreadFactor) * 100) + 25%% chance to brainlock. The damage increases with your Mindpower.]]):tformat(damDesc(self, DamageType.MIND, damage), (1 - spreadFactor) * 100) end, } @@ -135,7 +135,7 @@ newTalent{ local jumpChance = t.getJumpChance(self, t) local hateGain = t.getHateGain(self, t) return ([[Send a whisper filled with hate to spread throughout your foes. When the whisper is first heard, they will suffer %d mind damage and feed you %d hate. For the first %d turns, the whisper will travel from the original victim to a new one within a range of %0.1f. Every victim of the whisper has a %d%% chance of spreading it to another victim every turn. - 25%% chance to brainlock. The damage increases with your Mindpower.]]):format(damDesc(self, DamageType.MIND, damage), hateGain, jumpCount, jumpRange, jumpChance) + 25%% chance to brainlock. The damage increases with your Mindpower.]]):tformat(damDesc(self, DamageType.MIND, damage), hateGain, jumpCount, jumpRange, jumpChance) end, } @@ -190,7 +190,7 @@ newTalent{ local tr = Trap.new{ type = "elemental", id_by_type=true, - unided_name = "trap", + unided_name = _t"trap", name = "cursed ground", color={48,48,132}, display = '^', @@ -252,7 +252,7 @@ newTalent{ local duration = t.getDuration(self, t) local stunDuration = t.getStunDuration(self, t) return ([You mark the ground at your feet with a terrible curse. Anyone passing the mark suffers %d mind damage and has a chance to be stunned for %d turns. The mark lasts for %d turns but the will weaken each time it is triggered. (%d mindpower vs mental resistance) - The damage and mindpower will increase with the Willpower stat.]):format(damDesc(self, DamageType.MIND, damage), stunDuration, duration, mindpower) + The damage and mindpower will increase with the Willpower stat.]):tformat(damDesc(self, DamageType.MIND, damage), stunDuration, duration, mindpower) end, } ]] @@ -298,7 +298,7 @@ newTalent{ local maxDamage = t.getDamage(self, t) local minDamage = maxDamage / duration return ([[Unleash agony upon your target. The pain will grow over the course of %d turns. The first turn will inflict %d damage, and slowly increase to %d on the last turn (%d total). - 25%% chance of brainlock. The damage will increase with your Mindpower.]]):format(duration, damDesc(self, DamageType.MIND, minDamage), damDesc(self, DamageType.MIND, maxDamage), maxDamage * (duration + 1) / 2) + 25%% chance of brainlock. The damage will increase with your Mindpower.]]):tformat(duration, damDesc(self, DamageType.MIND, minDamage), damDesc(self, DamageType.MIND, maxDamage), maxDamage * (duration + 1) / 2) end, } @@ -336,7 +336,7 @@ newTalent{ info = function(self, t) local chance = t.getChance(self, t) local mindResistChange = t.getMindResistChange(self, t) - return ([[Every time you inflict mind damage, there is a %d%% chance that your foe must save against your Mindpower or go mad. Madness can cause them to become confused, slowed or stunned for 3 turns, and lowers resistance to mind damage by %d%%.]]):format(chance, -mindResistChange) + return ([[Every time you inflict mind damage, there is a %d%% chance that your foe must save against your Mindpower or go mad. Madness can cause them to become confused, slowed or stunned for 3 turns, and lowers resistance to mind damage by %d%%.]]):tformat(chance, -mindResistChange) end, } @@ -376,7 +376,7 @@ newTalent{ target:setEffect(target.EFF_DAZED, duration, {src=self}) game.level.map:particleEmitter(x, y, 1, "cursed_ground", {}) else - game.logSeen(self, "%s holds on to its sanity.", self.name:capitalize()) + game.logSeen(self, "%s holds on to its sanity.", self:getName():capitalize()) end end end @@ -390,7 +390,7 @@ newTalent{ local duration = t.getDuration(self, t) local chance = t.getChance(self, t) return ([Your will reaches into the minds of all nearby enemies and tortures their sanity. Anyone within range who fails a mental save has a %d%% chance of being dazed for %d turns (%d mindpower vs mental resistance). - The mindpower will increase with the Willpower stat.]):format(chance, duration, mindpower) + The mindpower will increase with the Willpower stat.]):tformat(chance, duration, mindpower) end, } ]] diff --git a/game/modules/tome/data/talents/cursed/rampage.lua b/game/modules/tome/data/talents/cursed/rampage.lua index f6c7b03d2f62bbb69340237b221f8f4dbaec4206..913ef0ab71013cb7c876cf46d3665dbda366486d 100644 --- a/game/modules/tome/data/talents/cursed/rampage.lua +++ b/game/modules/tome/data/talents/cursed/rampage.lua @@ -92,7 +92,7 @@ newTalent{ Any talent, rune or infusion you use while rampaging becomes a distraction, and reduces the duration of the rampage by 1. Your first movement while rampaging increases the rampage duration by 1. Rampage Bonus: +%d%% movement speed. Rampage Bonus: +%d%% attack speed. - Rampage Bonus: +%d%% mind speed.]]):format(duration, maxDuration, movementSpeedChange * 100, combatPhysSpeedChange * 100, combatMindSpeedChange *100) + Rampage Bonus: +%d%% mind speed.]]):tformat(duration, maxDuration, movementSpeedChange * 100, combatPhysSpeedChange * 100, combatMindSpeedChange *100) end, } @@ -115,7 +115,7 @@ newTalent{ local combatMentalResistChange = t.getCombatMentalResistChange(self, t) return ([[You attack with mindless brutality. The first critical hit inflicted while rampaging increases the rampage duration by 1. Rampage Bonus: Your physical damage increases by %d%%. - Rampage Bonus: Your Physical Save increases by %d and Mental Save increases by %d.]]):format(physicalDamageChange, combatPhysResistChange, combatMentalResistChange) + Rampage Bonus: Your Physical Save increases by %d and Mental Save increases by %d.]]):tformat(physicalDamageChange, combatPhysResistChange, combatMentalResistChange) end, } @@ -140,7 +140,7 @@ newTalent{ local damageShieldBonus = t.getDamageShieldBonus(self, t) return ([[Nothing will stop your rampage. Rampage Bonus: You shrug off up to %d damage each turn during your rampage. If you shrug off more than %d damage, the rampage duration increases by 1. - The amount of damage you can shrug off improves with your Strength.]]):format(damageShield, damageShieldBonus) + The amount of damage you can shrug off improves with your Strength.]]):tformat(damageShield, damageShieldBonus) end, } @@ -188,12 +188,12 @@ newTalent{ local y = self.y + math.floor((i % 9) / 3) - 1 local target = game.level.map(x, y, Map.ACTOR) if target and not target.dead and self:reactionToward(target) < 0 then - game.logSeen(self, "#F53CBE#%s slams %s!", self.name:capitalize(), target.name) + game.logSeen(self, "#F53CBE#%s slams %s!", self:getName():capitalize(), target:getName()) DamageType:get(DamageType.PHYSICAL).projector(self, target.x, target.y, DamageType.PHYSICAL, damage) if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, stunDuration, {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "#F53CBE#%s resists the stunning blow!", target.name:capitalize()) + game.logSeen(target, "#F53CBE#%s resists the stunning blow!", target:getName():capitalize()) end hitCount = hitCount - 1 @@ -217,6 +217,6 @@ newTalent{ local stunDuration = t.getStunDuration(self, t) local damage = t.getDamage(self, t) return ([[While rampaging, you slam up to %d adjacent opponents, stunning them for %d turns and damaging them for between %d and %d physical damage. Your first slam of at least two opponents increases the rampage duration by 1. - Damage increases with your Physical Power.]]):format(hitCount, stunDuration, damage * 0.5, damage) + Damage increases with your Physical Power.]]):tformat(hitCount, stunDuration, damage * 0.5, damage) end, } diff --git a/game/modules/tome/data/talents/cursed/shadows.lua b/game/modules/tome/data/talents/cursed/shadows.lua index c5d901ca988aa026100a1614d2fc59c88d26b5bf..90e5b29afcfb848288379139936160293bc3cda5 100644 --- a/game/modules/tome/data/talents/cursed/shadows.lua +++ b/game/modules/tome/data/talents/cursed/shadows.lua @@ -30,7 +30,7 @@ newTalent{ return true end, info = function(self, t) - return ([[You fade from sight, making you invulnerable until the beginning of your next turn.]]) + return ([[You fade from sight, making you invulnerable until the beginning of your next turn.]]):tformat() end, } @@ -58,7 +58,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Teleports you within a small range.]]) + return ([[Teleports you within a small range.]]):tformat() end, } @@ -97,7 +97,7 @@ newTalent{ return false end,info = function(self, t) local multiplier = self:combatTalentWeaponDamage(t, 0.9, 1.9) - return ([[With blinding speed you suddenly appear next to a target up to %d spaces away and attack for %d%% damage.]]):format(self:getTalentRange(t), multiplier * 100) + return ([[With blinding speed you suddenly appear next to a target up to %d spaces away and attack for %d%% damage.]]):tformat(self:getTalentRange(t), multiplier * 100) end, } @@ -127,7 +127,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Strikes the target with a spark of lightning doing %0.2f to %0.2f damage (%0.2f average). The damage will increase with the Magic stat]]): - format(damDesc(self, DamageType.LIGHTNING, damage / 3), + tformat(damDesc(self, DamageType.LIGHTNING, damage / 3), damDesc(self, DamageType.LIGHTNING, damage), damDesc(self, DamageType.LIGHTNING, (damage + damage / 3) / 2)) end, @@ -158,7 +158,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Bathes the target in flames doing %0.2f damage The damage will increase with the Magic stat]]): - format(damDesc(self, DamageType.FIREBURN, damage)) + tformat(damDesc(self, DamageType.FIREBURN, damage)) end, } @@ -173,7 +173,7 @@ newTalent{ end, info = function(self, t) local chance = t.getChance(self, t) - return ([[When a shadow is hit and killed, there is a %d%% chance it will reform unhurt.]]):format(chance) + return ([[When a shadow is hit and killed, there is a %d%% chance it will reform unhurt.]]):tformat(chance) end, } @@ -436,7 +436,7 @@ newTalent{ shadow.no_points_on_levelup = true if game.party:hasMember(self) then shadow.remove_from_party_on_death = true - game.party:addMember(shadow, { control="no", type="summon", title="Summon"}) + game.party:addMember(shadow, { control="no", type="summon", title=_t"Summon"}) end game:playSoundNear(self, "talents/spell_generic") @@ -464,7 +464,7 @@ newTalent{ local blindsideLevel = t.getBlindsideLevel(self, t) local avoid_master_damage = t.getAvoidMasterDamage(self, t) return ([[While this ability is active, you will continually call up to %d level %d shadows to aid you in battle. Each shadow costs 5 hate to summon. Shadows are weak combatants that can: Use Arcane Reconstruction to heal themselves (level %d), Blindside their opponents (level %d), and Phase Door from place to place. - Shadows ignore %d%% of the damage dealt to them by their master.]]):format(maxShadows, level, healLevel, blindsideLevel, avoid_master_damage) + Shadows ignore %d%% of the damage dealt to them by their master.]]):tformat(maxShadows, level, healLevel, blindsideLevel, avoid_master_damage) end, } @@ -521,7 +521,7 @@ newTalent{ local dominateChance = t.getDominateChance(self, t) local dominateLevel = t.getDominateLevel(self, t) local fadeCooldown = math.max(3, 8 - self:getTalentLevelRaw(t)) - return ([[Instill hate in your shadows, strengthening their attacks. They gain %d%% extra Accuracy and %d%% extra damage. The fury of their attacks gives them the ability to try to Dominate their foes, increasing all damage taken by that foe for 4 turns (level %d, %d%% chance at range 1). They also gain the ability to Fade when hit, avoiding all damage until their next turn (%d turn cooldown).]]):format(combatAtk, incDamage, dominateLevel, dominateChance, fadeCooldown) + return ([[Instill hate in your shadows, strengthening their attacks. They gain %d%% extra Accuracy and %d%% extra damage. The fury of their attacks gives them the ability to try to Dominate their foes, increasing all damage taken by that foe for 4 turns (level %d, %d%% chance at range 1). They also gain the ability to Fade when hit, avoiding all damage until their next turn (%d turn cooldown).]]):tformat(combatAtk, incDamage, dominateLevel, dominateChance, fadeCooldown) end, } @@ -597,7 +597,7 @@ newTalent{ return ([[Infuse magic into your shadows to give them fearsome spells. Your shadows receive a bonus of %d to their Spellpower. Your shadows can strike adjacent foes with Lightning (level %d, %d%% chance at range 1). At level 3 your shadows can sear their enemies from a distance with Flames (level %d, %d%% chance at range 2 to 6). - At level 5 when your shadows are struck down they will attempt to Reform, becoming whole again (50%% chance).]]):format(spellpowerChange, lightningLevel, closeAttackSpellChance, flamesLevel, farAttackSpellChance) + At level 5 when your shadows are struck down they will attempt to Reform, becoming whole again (50%% chance).]]):tformat(spellpowerChange, lightningLevel, closeAttackSpellChance, flamesLevel, farAttackSpellChance) end, } @@ -680,6 +680,6 @@ newTalent{ local blindsideChance = t.getBlindsideChance(self, t) return ([[Focus your shadows on a single target. Friendly targets will be defended for %d turns. Hostile targets will be attacked, with a %d%% chance the shadows will blindside the target. If you have less than maximum shadows available, they will automatically be summoned before focusing. - This talent has no cost.]]):format(defenseDuration, blindsideChance) + This talent has no cost.]]):tformat(defenseDuration, blindsideChance) end, } diff --git a/game/modules/tome/data/talents/cursed/slaughter.lua b/game/modules/tome/data/talents/cursed/slaughter.lua index acf53e2be1b5df39c934bf23a03b89f5615dfc90..cbc7cb95a54e60e75b4f75bc63abc69a5cb1d32f 100644 --- a/game/modules/tome/data/talents/cursed/slaughter.lua +++ b/game/modules/tome/data/talents/cursed/slaughter.lua @@ -78,7 +78,7 @@ newTalent{ At level 3, any wound you inflict with this carries a part of your curse, reducing the effectiveness of healing by %d%% for %d turns. The effect will stack. The damage multiplier increases with your Strength. - This talent will also attack with your shield, if you have one equipped.]]):format(t.getDamageMultiplier(self, t, 0) * 100, t.getDamageMultiplier(self, t, 100) * 100, -healFactorChange * 100, woundDuration) + This talent will also attack with your shield, if you have one equipped.]]):tformat(t.getDamageMultiplier(self, t, 0) * 100, t.getDamageMultiplier(self, t, 100) * 100, -healFactorChange * 100, woundDuration) end, } @@ -154,7 +154,7 @@ newTalent{ At level 3 the intensity of your assault overwhelms anyone who is struck, reducing their Defense by %d for 4 turns. The damage multiplier and Defense reduction increase with your Strength. - This talent will also attack with your shield, if you have one equipped.]]):format(t.getDamageMultiplier(self, t, 0) * 100, t.getDamageMultiplier(self, t, 100) * 100, -defenseChange) + This talent will also attack with your shield, if you have one equipped.]]):tformat(t.getDamageMultiplier(self, t, 0) * 100, t.getDamageMultiplier(self, t, 100) * 100, -defenseChange) end, } @@ -265,7 +265,7 @@ newTalent{ else size = "Small" end - return ([[Charge through your opponents, attacking anyone near your path for %d%% (at 0 Hate) to %d%% (at 100+ Hate) damage. %s opponents may be knocked away from your path. You can attack a maximum of %d times, and can hit targets along your path more than once.]]):format(t.getDamageMultiplier(self, t, 0) * 100, t.getDamageMultiplier(self, t, 100) * 100, size, maxAttackCount) + return ([[Charge through your opponents, attacking anyone near your path for %d%% (at 0 Hate) to %d%% (at 100+ Hate) damage. %s opponents may be knocked away from your path. You can attack a maximum of %d times, and can hit targets along your path more than once.]]):tformat(t.getDamageMultiplier(self, t, 0) * 100, t.getDamageMultiplier(self, t, 100) * 100, size, maxAttackCount) end, } @@ -288,7 +288,7 @@ newTalent{ -- local secondTarget = game.level.map(x, y, Map.ACTOR) -- if secondTarget and secondTarget ~= target and self:reactionToward(secondTarget) < 0 then -- local multiplier = multiplier or 1 * self:combatTalentWeaponDamage(t, 0.2, 0.7) * getHateMultiplier(self, 0.5, 1.0, false) --- game.logSeen(self, "%s cleaves through another foe!", self.name:capitalize()) +-- game.logSeen(self, "%s cleaves through another foe!", self:getName():capitalize()) -- self:attackTarget(secondTarget, nil, multiplier, true) -- inCleave = false -- return @@ -301,7 +301,7 @@ newTalent{ -- info = function(self, t) -- local chance = 28 + self:getTalentLevel(t) * 7 -- local multiplier = self:combatTalentWeaponDamage(t, 0.2, 0.7) --- return ([[Every swing of your weapon has a %d%% chance of striking a second target for %d%% (at 0 Hate) to %d%% (at 100+ Hate) damage.]]):format(chance, multiplier * 50, multiplier * 100) +-- return ([[Every swing of your weapon has a %d%% chance of striking a second target for %d%% (at 0 Hate) to %d%% (at 100+ Hate) damage.]]):tformat(chance, multiplier * 50, multiplier * 100) -- end, --} @@ -370,6 +370,6 @@ newTalent{ Cleave, Repel and Surge cannot be active simultaneously, and activating one will place the others in cooldown. Cleave will deal 25%% additional damage while using a two-handed weapon. The Cleave damage increases with your Strength.]]): - format( t.getDamageMultiplier(self, t, 0) * 100, t.getDamageMultiplier(self, t, 100) * 100) + tformat( t.getDamageMultiplier(self, t, 0) * 100, t.getDamageMultiplier(self, t, 100) * 100) end, } diff --git a/game/modules/tome/data/talents/cursed/strife.lua b/game/modules/tome/data/talents/cursed/strife.lua index ae3c03399f703aeaefebde971e268784f5ce8496..58ac5727740976e308f67a214a0774b4eec42daa 100644 --- a/game/modules/tome/data/talents/cursed/strife.lua +++ b/game/modules/tome/data/talents/cursed/strife.lua @@ -83,7 +83,7 @@ newTalent{ return ([[Turn your attention to a nearby foe, and dominate them with your overwhelming presence. If the target fails to save versus your Mindpower, it will be unable to move for %d turns and vulnerable to attacks. They will lose %d Armour, %d Defense and your attacks will gain %d%% resistance penetration. If the target is adjacent to you, your domination will include a melee attack. Effects will improve with your Willpower. - This talent will also attack with your shield, if you have one equipped.]]):format(duration, -armorChange, -defenseChange, resistPenetration) + This talent will also attack with your shield, if you have one equipped.]]):tformat(duration, -armorChange, -defenseChange, resistPenetration) end, } @@ -102,7 +102,7 @@ newTalent{ return ([[Your preternatural senses aid you in your hunt for the next victim. You sense foes in a radius of %0.1f. You will always sense a stalked victim in a radius of 10. Also increases stealth detection by %d and invisibility detection by %d. Stealth and invisibility detection improves with your Willpower]]): - format(range, sense, sense) + tformat(range, sense, sense) end, } @@ -140,7 +140,7 @@ newTalent{ -- local conversionDuration = t.getConversionDuration(self, t) -- local conversionPercent = t.getConversionPercent(self, t) -- local maxConversion = t.getMaxConversion(self, t) --- return ([[Your suffering becomes theirs. %d%% of all damage (up to a maximum of %d per turn) that you inflict over %d turns feeds your own endurance allowing you to negate that much damage over % turns.]]):format(conversionPercent, maxConversion, conversionDuration, duration) +-- return ([[Your suffering becomes theirs. %d%% of all damage (up to a maximum of %d per turn) that you inflict over %d turns feeds your own endurance allowing you to negate that much damage over % turns.]]):tformat(conversionPercent, maxConversion, conversionDuration, duration) -- end, --} @@ -177,7 +177,7 @@ newTalent{ -- info = function(self, t) -- local damagePercent = t.getDamagePercent(self, t) -- local distance = t.getDistance(self, t) --- return ([[Swing your weapon for %d%% damage as you leap backwards %d spaces from your target.]]):format(damagePercent, distance) +-- return ([[Swing your weapon for %d%% damage as you leap backwards %d spaces from your target.]]):tformat(damagePercent, distance) -- end, --} @@ -229,7 +229,7 @@ newTalent{ -- local healFactorMax = t.getHealFactor(self, t, 100) -- local duration = t.getDuration(self, t) -- return ([[Poison your foe with the essence of your curse inflicting %d%% damage and %d (at 0 Hate) to %d (at 100+ Hate) poison damage over %d turns. Healing is also reduced by %d%% (at 0 Hate) to %d%% (at 100+ Hate). --- Poison damage increases with the Willpower stat. Hate-based effects will improve when wielding cursed weapons.]]):format(damagePercent, poisonDamageMin, poisonDamageMax, duration, healFactorMin, healFactorMax) +-- Poison damage increases with the Willpower stat. Hate-based effects will improve when wielding cursed weapons.]]):tformat(damagePercent, poisonDamageMin, poisonDamageMax, duration, healFactorMin, healFactorMax) -- end, --} @@ -274,7 +274,7 @@ newTalent{ local multiplier = self:combatTalentWeaponDamage(t, 0.7, 1.9) local defenseChange = t.getDefenseChange(self, t) return ([[With blinding speed, you suddenly appear next to a target up to %d spaces away and attack for %d%% (at 0 Hate) to %d%% (at 100+ Hate) damage. Your sudden appearance catches everyone off-guard, giving you %d extra Defense for 1 turn. - The Defense boost improves with your Strength.]]):format(self:getTalentRange(t), multiplier * 30, multiplier * 100, defenseChange) + The Defense boost improves with your Strength.]]):tformat(self:getTalentRange(t), multiplier * 30, multiplier * 100, defenseChange) end, } @@ -364,7 +364,7 @@ newTalent{ -- local confuseDuration = t.getConfuseDuration(self, t) -- local confuseEfficiency = t.getConfuseEfficiency(self, t) - -- return ([[With unnatural speed you assail all foes in sight within a range of 4 with wild swings from your axe. You will attack up to %d different targets for %d%% damage. When the assualt finally ends all foes in range will be confused for %d turns and you will find yourself in a nearby location.]]):format(attackCount, damagePercent, confuseDuration) + -- return ([[With unnatural speed you assail all foes in sight within a range of 4 with wild swings from your axe. You will attack up to %d different targets for %d%% damage. When the assualt finally ends all foes in range will be confused for %d turns and you will find yourself in a nearby location.]]):tformat(attackCount, damagePercent, confuseDuration) -- end, -- } @@ -419,6 +419,6 @@ newTalent{ local chance = t.getChance(self, t) return ([[Rather than hide from the onslaught, you face down every threat. While active you have a %d%% chance of repelling a melee attack. The recklessness of your defense brings you bad luck (Luck -3). Cleave, Repel and Surge cannot be active simultaneously, and activating one will place the others in cooldown. - Repel chance increases with your Strength and by 20%% when equipped with a shield.]]):format(chance) + Repel chance increases with your Strength and by 20%% when equipped with a shield.]]):tformat(chance) end, } diff --git a/game/modules/tome/data/talents/cursed/traveler.lua b/game/modules/tome/data/talents/cursed/traveler.lua index 291406f2dafddf8af359e6ad873efb9e29a5b9e4..561524f7859e65aab38ce4ec372c129b7bbda38f 100644 --- a/game/modules/tome/data/talents/cursed/traveler.lua +++ b/game/modules/tome/data/talents/cursed/traveler.lua @@ -30,7 +30,7 @@ newTalent{ self.combat_armor = self.combat_armor - 2 end, info = function(self, t) - return ([[Your travels have hardened you. You gain +%d armor.]]):format(self:getTalentLevelRaw(t) * 2) + return ([[Your travels have hardened you. You gain +%d armor.]]):tformat(self:getTalentLevelRaw(t) * 2) end } @@ -47,7 +47,7 @@ newTalent{ self.trap_avoidance = self.trap_avoidance - 14 end, info = function(self, t) - return ([[You have become wary of danger in your journeys. You have a %d%% chance of not triggering traps.]]):format(self:getTalentLevelRaw(t) * 14) + return ([[You have become wary of danger in your journeys. You have a %d%% chance of not triggering traps.]]):tformat(self:getTalentLevelRaw(t) * 14) end } @@ -67,7 +67,7 @@ newTalent{ self.resists[DamageType.COLD] = self.resists[DamageType.COLD] - 7 end, info = function(self, t) - return ([[You have become weathered by the elements. Your Cold and Fire resistance is increased by %d%%]]):format(self:getTalentLevel(t) * 7) + return ([[You have become weathered by the elements. Your Cold and Fire resistance is increased by %d%%]]):tformat(self:getTalentLevel(t) * 7) end } @@ -84,7 +84,7 @@ newTalent{ self.exp_kill_multiplier = (self.exp_kill_multiplier or 1) - 0.03 end, info = function(self, t) - return ([[You have become a keen observer in your travels. Each kill gives you %d%% more experience.]]):format(self:getTalentLevelRaw(t) * 3) + return ([[You have become a keen observer in your travels. Each kill gives you %d%% more experience.]]):tformat(self:getTalentLevelRaw(t) * 3) end } diff --git a/game/modules/tome/data/talents/gifts/antimagic.lua b/game/modules/tome/data/talents/gifts/antimagic.lua index 0fcb1c7423afc08f1eb8e88941992b18c1be5f88..7f0593d2af6eb15f9742f2965623f9f00af27b85 100644 --- a/game/modules/tome/data/talents/gifts/antimagic.lua +++ b/game/modules/tome/data/talents/gifts/antimagic.lua @@ -43,7 +43,7 @@ newTalent{ self:setEffect(self.EFF_RESOLVE, 7, {damtype=damtype, res=eff.res, max_types = max}) end - --game.logSeen(self, "%s is invigorated by the attack!", self.name:capitalize()) Too spammy, delayedLog maybe? + --game.logSeen(self, "%s is invigorated by the attack!", self:getName():capitalize()) Too spammy, delayedLog maybe? end, info = function(self, t) @@ -54,7 +54,7 @@ newTalent{ At talent level 3, the bonus resistance may apply to 3 elements, refreshing the duration with each element added. Additionally, each time you take non-physical, non-mind damage, your equilibrium will decrease and stamina increase by %0.2f. The effects will increase with the greater of your Mindpower or Physical power and the bonus resistance can be a mental crit.]]): - format( resist, regen ) + tformat( resist, regen ) end, } @@ -91,7 +91,7 @@ newTalent{ target:setEffect(target.EFF_SILENCED, math.ceil(t.getduration(self,t)), {apply_power=math.max(self:combatMindpower(), self:combatPhysicalpower())}) if target:hasEffect(target.EFF_SILENCED) then nb = nb + 1 end else - game.logSeen(target, "%s resists the silence!", target.name:capitalize()) + game.logSeen(target, "%s resists the silence!", target:getName():capitalize()) end end end) @@ -111,7 +111,7 @@ newTalent{ The damage and apply power will increase with the greater of your Mindpower or Physical power. Learning this talent will let your Nature damage and penetration bonuses apply to all Manaburn damage regardless of source.]]): - format(t.getduration(self,t), rad, t.getFloorDuration(self,t), t.getDamage(self, t), t.getEquiRegen(self, t)) + tformat(t.getduration(self,t), rad, t.getFloorDuration(self,t), t.getDamage(self, t), t.getEquiRegen(self, t)) end, } @@ -144,7 +144,7 @@ newTalent{ if not self:equilibriumChance() then self:forceUseTalent(self.T_ANTIMAGIC_SHIELD, {ignore_energy=true}) - game.logSeen(self, "#GREEN#The antimagic shield of %s crumbles.", self.name) + game.logSeen(self, "#GREEN#The antimagic shield of %s crumbles.", self:getName()) end return dam end, @@ -167,7 +167,7 @@ newTalent{ return ([[Surround yourself with a shield that will absorb at most %d non-physical, non-mind element damage per attack. Each time damage is absorbed by the shield, your equilibrium increases by 1 for every 30 points of damage and a standard Equilibrium check is made. If the check fails, the shield will crumble and Antimagic Shield will go on cooldown. The damage the shield can absorb will increase with your Mindpower or Physical power (whichever is greater).]]): - format(t.getMax(self, t)) + tformat(t.getMax(self, t)) end, } @@ -213,12 +213,12 @@ newTalent{ local vim = base / 2 local positive = base / 4 local negative = base / 4 - local is_adept = self:knowTalent(self.T_ANTIMAGIC_ADEPT) and "\n#GREEN#Antimagic Adept: #LAST#4 magical sustains from the target will be removed." or "" + local is_adept = self:knowTalent(self.T_ANTIMAGIC_ADEPT) and _t"\n#GREEN#Antimagic Adept: #LAST#4 magical sustains from the target will be removed." or "" return ([[Drain %d mana, %d vim, %d positive and negative energies from your target, triggering a chain reaction that explodes in a burst of arcane damage. The damage done is equal to 100%% of the mana drained, 200%% of the vim drained, or 400%% of the positive or negative energy drained, whichever is higher. This effect is called a manaburn. The effect will increase with your Mindpower or Physical power (whichever is greater). %s]]): - format(mana, vim, positive, is_adept) + tformat(mana, vim, positive, is_adept) end, } @@ -230,6 +230,6 @@ newTalent{ points = 1, info = function(self, t) return ([[Your Mana Clash talent also removes 4 magical sustains from the target.]]): - format() + tformat() end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/gifts/call.lua b/game/modules/tome/data/talents/gifts/call.lua index c3511594ebd530f2ca0bd20ecc9706e5d7e973d5..4c375d0c1bab2894320afb90f21e4d9909eb9ee8 100644 --- a/game/modules/tome/data/talents/gifts/call.lua +++ b/game/modules/tome/data/talents/gifts/call.lua @@ -22,7 +22,7 @@ newTalent{ type = {"wild-gift/call", 1}, require = gifts_req1, points = 5, - message = function(self, t) return self.sustain_talents[t.id] and "@Source@ interrupts @hisher@ #GREEN#meditation#LAST#." or "@Source@ #GREEN#meditates#LAST# on nature." end, + message = function(self, t) return self.sustain_talents[t.id] and _t"@Source@ interrupts @hisher@ #GREEN#meditation#LAST#." or _t"@Source@ #GREEN#meditates#LAST# on nature." end, mode = "sustained", cooldown = 20, range = 10, @@ -84,7 +84,7 @@ newTalent{ Your deep meditation does not let you deal damage correctly, reducing the damage you and your summons deal by 50%%. Also, any time you are resting (even with Meditation not sustained) you enter a simple meditative state that decreases your equilibrium by %0.2f per turn. The activated effects increase with your Mindpower.]]): - format(pt, save, heal, rest) + tformat(pt, save, heal, rest) end, } @@ -146,7 +146,7 @@ newTalent{ short_name = "NATURE_TOUCH", info = function(self, t) return ([[Touch a target (or yourself) to infuse it with Nature, healing it for %d (this heal does not work on undead). The amount healed will increase with your Mindpower.]]): - format(t.getHeal(self, t)) + tformat(t.getHeal(self, t)) end, } @@ -172,7 +172,7 @@ newTalent{ local radius_esp = t.radius_esp(self, t) return ([[Using your connection to Nature, you can see your surrounding area in a radius of %d. Also, while meditating, you are able to detect the presence of creatures around you in a radius of %d.]]): - format(radius, radius_esp) + tformat(radius, radius_esp) end, } @@ -211,6 +211,6 @@ newTalent{ end, info = function(self, t) return ([[Your deep link with Nature allows you to reset the cooldown of %d of your wild gifts of tier %d or less.]]): - format(t.getTalentCount(self, t), t.getMaxLevel(self, t)) + tformat(t.getTalentCount(self, t), t.getMaxLevel(self, t)) end, } diff --git a/game/modules/tome/data/talents/gifts/cold-drake.lua b/game/modules/tome/data/talents/gifts/cold-drake.lua index 4a1b3e8c35761bef48b00b9234b55bf833966554..892f1020bce2c867b5ef658edbd61e97fad3b4b2 100644 --- a/game/modules/tome/data/talents/gifts/cold-drake.lua +++ b/game/modules/tome/data/talents/gifts/cold-drake.lua @@ -72,7 +72,7 @@ newTalent{ Every level in Ice Claw additionally raises your Physical Save by 2. Each point in cold drake talents also increases your cold resistance by 1%%. - This talent will also attack with your shield, if you have one equipped.]]):format(100 * t.damagemult(self, t), self:getTalentRadius(t)) + This talent will also attack with your shield, if you have one equipped.]]):tformat(100 * t.damagemult(self, t), self:getTalentRadius(t)) end, } @@ -109,7 +109,7 @@ newTalent{ return ([[Your skin forms icy scales and your flesh toughens, increasing your Maximum Life by %d%% and your Armour by %d. You also deal %0.2f cold damage to any enemies that physically strike you. Each point in cold drake talents also increases your cold resistance by 1%%. - The life increase will scale with your Talent Level, and your Armour and retaliation cold damage will scale with Mindpower.]]):format(life * 100, t.getArmor(self, t), damDesc(self, DamageType.COLD, t.getDamageOnMeleeHit(self, t))) + The life increase will scale with your Talent Level, and your Armour and retaliation cold damage will scale with Mindpower.]]):tformat(life * 100, t.getArmor(self, t), damDesc(self, DamageType.COLD, t.getDamageOnMeleeHit(self, t))) end, } @@ -152,8 +152,8 @@ newTalent{ if not oe or oe:attr("temporary") or game.level.map:checkAllEntities(px, py, "block_move") then return end local e = Object.new{ old_feat = oe, - name = "ice wall", image = "npc/iceblock.png", - desc = "a summoned, transparent wall of ice", + name = _t"ice wall", image = "npc/iceblock.png", + desc = _t"a summoned, transparent wall of ice", type = "wall", display = '#', color=colors.LIGHT_BLUE, back_color=colors.BLUE, always_remember = true, @@ -202,7 +202,7 @@ newTalent{ local icedam = t.getIceDamage(self, t) return ([[Summons an icy wall of %d length for %d turns. Ice walls are transparent, but block projectiles and enemies. Ice walls also emit freezing cold, dealing %0.2f damage for each ice wall within radius %d of an enemy, and with each wall giving a 25%% chance to freeze an enemy. This cold cannot hurt the talent user or their allies. - Each point in cold drake talents also increases your cold resistance by 1%%.]]):format(3 + math.floor(self:getTalentLevel(t) / 2) * 2, t.getDuration(self, t), damDesc(self, DamageType.COLD, icedam), icerad) + Each point in cold drake talents also increases your cold resistance by 1%%.]]):tformat(3 + math.floor(self:getTalentLevel(t) / 2) * 2, t.getDuration(self, t), damDesc(self, DamageType.COLD, icedam), icerad) end, } @@ -214,7 +214,7 @@ newTalent{ random_ego = "attack", equilibrium = 20, cooldown = 20, - message = "@Source@ breathes ice!", + message = _t"@Source@ breathes ice!", tactical = { ATTACKAREA = { COLD = 2 }, DISABLE = { stun = 1 } }, range = 0, radius = function(self, t) return math.min(13, math.floor(self:combatTalentScale(t, 5, 9))) end, @@ -243,7 +243,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_FROZEN, 3, {hp=damage, apply_power = self:combatMindpower()}) else - game.logSeen(target, "%s resists the freeze!", target.name:capitalize()) + game.logSeen(target, "%s resists the freeze!", target:getName():capitalize()) end end, t.getDamage(self, t), {type="freeze"}) @@ -259,6 +259,6 @@ newTalent{ info = function(self, t) return ([[You breathe ice in a frontal cone of radius %d. Any target caught in the area will take %0.2f cold damage and be frozen for 3 turns. The damage will increase with your Strength, the critical chance is based on your Mental crit rate, and the Freeze apply power is based on your Mindpower. - Each point in cold drake talents also increases your cold resistance by 1%%.]]):format( self:getTalentRadius(t), damDesc(self, DamageType.COLD, t.getDamage(self, t))) + Each point in cold drake talents also increases your cold resistance by 1%%.]]):tformat( self:getTalentRadius(t), damDesc(self, DamageType.COLD, t.getDamage(self, t))) end, } diff --git a/game/modules/tome/data/talents/gifts/corrosive-blades.lua b/game/modules/tome/data/talents/gifts/corrosive-blades.lua index e05235b7785376ed3d7e0a5735b8f15f11f4a532..249f99d7247af417cfac3e81a89be6ea94392dc5 100644 --- a/game/modules/tome/data/talents/gifts/corrosive-blades.lua +++ b/game/modules/tome/data/talents/gifts/corrosive-blades.lua @@ -51,7 +51,7 @@ newTalent{ local dam = t.getDamage(self, t) return ([[Channel acid through your psiblades, extending their reach to create a beam doing %0.1f Acid damage (which can disarm them). The damage increases with your Mindpower.]]): - format(damDesc(self, DamageType.ACID, dam)) + tformat(damDesc(self, DamageType.ACID, dam)) end, } @@ -75,14 +75,14 @@ newTalent{ When you deal Nature damage to a creature, you gain a %0.1f%% bonus to Acid damage for %d turns. This damage bonus will improve up to 4 times (no more than once each turn) with later Nature damage you do, up to a maximum of %0.1f%%. The resistance and damage increase improve with your Mindpower.]]): - format(t.getResist(self, t), t.getAcidDamage(self, t, 1), t.getDuration(self, t), t.getAcidDamage(self, t, 5)) + tformat(t.getResist(self, t), t.getAcidDamage(self, t, 1), t.getDuration(self, t), t.getAcidDamage(self, t, 5)) end, } local basetrap = function(self, t, x, y, dur, add) local Trap = require "mod.class.Trap" local trap = { - id_by_type=true, unided_name = "trap", + id_by_type=true, unided_name = _t"trap", display = '^', faction = self.faction, summoner = self, summoner_gain_exp = true, @@ -176,7 +176,7 @@ newTalent{ The first seed will appear at the center of the target zone, while others will appear at random spots. Each seed lasts %d turns and will explode when a hostile creature walks over it, knocking the creature back and dealing %0.1f Acid damage within radius 1. The damage will increase with your Mindpower.]]): - format(nb, t.getDuration(self, t), damDesc(self, DamageType.ACID, dam)) + tformat(nb, t.getDuration(self, t), damDesc(self, DamageType.ACID, dam)) end, } @@ -218,6 +218,6 @@ newTalent{ local regen = t.getRegen(self, t) return ([[Surround yourself with natural forces, ignoring %d%% acid resistance of your targets. In addition, the acid will nourish your bloated oozes, giving them an additional %0.1f life regeneration per turn.]]) - :format(ressistpen, regen) + :tformat(ressistpen, regen) end, } diff --git a/game/modules/tome/data/talents/gifts/dwarven-nature.lua b/game/modules/tome/data/talents/gifts/dwarven-nature.lua index 57dc9b2e3d2fdebeb57de0be234a08f065eb8be2..30d7e9955c2e8c77c0eeaf39e96b52d6039fbc0c 100644 --- a/game/modules/tome/data/talents/gifts/dwarven-nature.lua +++ b/game/modules/tome/data/talents/gifts/dwarven-nature.lua @@ -63,7 +63,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Conjures %d missile-shaped rocks that you target individually at any target or targets in range. Each missile deals %0.2f physical damage, and an additional %0.2f bleeding damage every turn for 5 turns. At talent level 5, you can conjure one additional missile. - The damage will increase with your Spellpower.]]):format(count,damDesc(self, DamageType.PHYSICAL, damage/2), damDesc(self, DamageType.PHYSICAL, damage/12)) + The damage will increase with your Spellpower.]]):tformat(count,damDesc(self, DamageType.PHYSICAL, damage/2), damDesc(self, DamageType.PHYSICAL, damage/12)) end, } @@ -96,8 +96,8 @@ newTalent{ summon_time=t.getDuration(self, t), ai_target={actor=nil}, ai="summoned", ai_real="tactical", - name="Crystaline Half ("..self.name..")", - desc=([[A crystaline structure that has taken the form of %s.]]):format(self.name), + name=("Crystaline Half (%s)"):tformat(self:getName()), + desc=([[A crystaline structure that has taken the form of %s.]]):tformat(self:getName()), }) local tids = table.keys(m.talents) for i, tid in ipairs(tids) do @@ -123,7 +123,7 @@ newTalent{ game.party:addMember(m, { control="no", type="dwarven nature crystaline half", - title="Crystaline Half", + title=_t"Crystaline Half", orders = {target=true}, }) end @@ -139,8 +139,8 @@ newTalent{ summon_time=t.getDuration(self, t), ai_target={actor=nil}, ai="summoned", ai_real="tactical", - name="Stone Half ("..self.name..")", - desc=([[A stone structure that has taken the form of %s.]]):format(self.name), + name=("Stone Half (%s)"):tformat(self:getName()), + desc=([[A stone structure that has taken the form of %s.]]):tformat(self:getName()), }) local tids = table.keys(m.talents) for i, tid in ipairs(tids) do @@ -166,7 +166,7 @@ newTalent{ game.party:addMember(m, { control="no", type="dwarven nature stone half", - title="Stone Half", + title=_t"Stone Half", orders = {target=true}, }) end @@ -182,7 +182,7 @@ newTalent{ Your Crystaline Half will attack your foes with earthen missiles. Your Stone Half will taunt your foes to protect you. This power can not be called upon while under the effect of Deeprock Form. - ]]):format(t.getDuration(self, t)) + ]]):tformat(t.getDuration(self, t)) end, } @@ -197,7 +197,7 @@ newTalent{ Crystaline Half: Rain of Spikes - A massive effect that makes all nearby foes bleed. Stone Half: Stone Link - A protective shield that will redirect all damage against nearby allies to your Stone Half. The level of those talents is %d.]]): - format(math.floor(self:getTalentLevel(t))) + tformat(math.floor(self:getTalentLevel(t))) end, } @@ -255,7 +255,7 @@ newTalent{ Your Stone Half will trade places (if in sight) with you and all creatures currently targetting you in a radius of %d will target it instead. Your Crystaline Half will instantly fire a volley of level %d earthen missiles at all foes near the stone half (or you if the stone half is dead) in radius %d. In addition, as passive effect, your halves now also learn your level of Combat Accuracy.]]): - format(self:getTalentRadius(t), self:getTalentLevelRaw(t), self:getTalentRadius(t)) + tformat(self:getTalentRadius(t), self:getTalentLevelRaw(t), self:getTalentRadius(t)) end, } @@ -319,7 +319,7 @@ newTalent{ local heal = t.getHeal(self, t) return ([[Merges your halves back into you, cleansing your body of %d detrimental magical, mental or physical effects. Each half also heals you for %d and releases a shockwave dealing %0.2f Nature damage in a radius 3.]]): - format(nb, heal, damDesc(self, DamageType.NATURE, dam)) + tformat(nb, heal, damDesc(self, DamageType.NATURE, dam)) end, } @@ -343,7 +343,7 @@ newTalent{ end, info = function(self, t) local radius = self:getTalentRadius(t) - return ([[Creates a shield of radius %d that redirects all damage done to friends inside it to you for 5 turns.]]):format(radius) + return ([[Creates a shield of radius %d that redirects all damage done to friends inside it to you for 5 turns.]]):tformat(radius) end, } @@ -374,6 +374,6 @@ newTalent{ local radius = self:getTalentRadius(t) local dam = t.getDamage(self, t) return ([[Fires spikes all around you, making your foes within radius %d bleed for %0.2f damage over 6 turns. - Damage and chance to apply the effect increase with Willpower.]]):format(radius, damDesc(self, DamageType.PHYSICAL, dam)) + Damage and chance to apply the effect increase with Willpower.]]):tformat(radius, damDesc(self, DamageType.PHYSICAL, dam)) end, } diff --git a/game/modules/tome/data/talents/gifts/earthen-power.lua b/game/modules/tome/data/talents/gifts/earthen-power.lua index 2d3b76976d1f78fb3df83a726674d7636e4996e6..fac80e3a78d58acefb430c1b125d0dd0cae0b71f 100644 --- a/game/modules/tome/data/talents/gifts/earthen-power.lua +++ b/game/modules/tome/data/talents/gifts/earthen-power.lua @@ -45,7 +45,7 @@ newTalent{ local inc = t.getPercentInc(self, t) return ([[The first time you take damage each turn, you regenerate %d%% of the damage dealt as mana (up to a maximum of %0.2f) and %d%% as equilibrium (up to %0.2f). Increases Physical Power by %d, increases damage done with shields by %d%%, and allows you to dual-wield shields. - Also, all of your melee attacks will perform a shield bash in addition to their normal effects.]]):format(100 * m, mm, 100 * e, em, damage, inc*100) + Also, all of your melee attacks will perform a shield bash in addition to their normal effects.]]):tformat(100 * m, mm, 100 * e, em, damage, inc*100) end, } @@ -66,7 +66,7 @@ newTalent{ info = function(self, t) return ([[When you use your Resilience of the Dwarves racial power your skin becomes so tough that it even absorbs damage from non-physical attacks. Non-physical damage is reduced by %d%% of your total armour value (ignoring hardiness).]]): - format(t.getPercent(self, t)) + tformat(t.getPercent(self, t)) end, } @@ -89,7 +89,7 @@ newTalent{ return ([[Sharp shards of stone grow from your shields. When you are hit in melee, you will get a free attack against the attacker with the shards doing %d%% shield damage (as Nature). This effect can only happen once per turn.]]): - format(self:combatTalentWeaponDamage(t, 0.4, 1) * 100) + tformat(self:combatTalentWeaponDamage(t, 0.4, 1) * 100) end, } @@ -121,6 +121,6 @@ newTalent{ When the effect ends, all equilibrium above minimum will be converted to mana in a storm of arcane energy and the cooldown of your Block is reset. The storm inflicts Arcane damage equal to the converted equilibrium (maximum %d) against everyone around you in a radius %d. Also while resting you will passively regenerate %0.2f mana each turn. - The shield strength will increase with Willpower]]):format(power, t.maxDamage(self, t), radius, t.manaRegen(self, t)) + The shield strength will increase with Willpower]]):tformat(power, t.maxDamage(self, t), radius, t.manaRegen(self, t)) end, } diff --git a/game/modules/tome/data/talents/gifts/earthen-vines.lua b/game/modules/tome/data/talents/gifts/earthen-vines.lua index 996c51f77e8bd36054a8a344d6742cf252702e3c..9564886acd2fca79b79f4bfd027eef9463076e10 100644 --- a/game/modules/tome/data/talents/gifts/earthen-vines.lua +++ b/game/modules/tome/data/talents/gifts/earthen-vines.lua @@ -65,13 +65,13 @@ newTalent{ info = function(self, t) local rad = self:getTalentRadius(t) local turns, dam, arcanedam = t.getValues(self, t) - local xs = arcanedam and (" and %0.1f Arcane"):format(damDesc(self, DamageType.ARCANE, arcanedam)) or "" + local xs = arcanedam and (" and %0.1f Arcane"):tformat(damDesc(self, DamageType.ARCANE, arcanedam)) or "" return ([[From the ground around you, you form living stone vines extending from your feet. Each turn, the vines will attempt to seize a random target within radius %d. Affected creatures are pinned to the ground and take %0.1f nature%s damage each turn for %d turns. A creature entangled by the vines will have a chance to break free each turn, and will automatically succeed if it is more than %d grids away from you. The chance to affect targets and damage increase with talent level and Willpower.]]): - format(rad, damDesc(self, DamageType.NATURE, dam), xs, turns, rad+4) + tformat(rad, damDesc(self, DamageType.NATURE, dam), xs, turns, rad+4) end, } @@ -88,7 +88,7 @@ newTalent{ info = function(self, t) return ([[Each time one of your stone vines deals damage to a creature it will restore %0.1f equilibrium and %0.1f mana. Your vines also become infused with eldritch energies, dealing an additional %0.1f arcane damage.]]) - :format(t.getEquilibrium(self, t), t.getMana(self, t), damDesc(self, DamageType.ARCANE, t.getDamage(self, t))) + :tformat(t.getEquilibrium(self, t), t.getMana(self, t), damDesc(self, DamageType.ARCANE, t.getDamage(self, t))) end, } @@ -134,7 +134,7 @@ newTalent{ return ([[Merge with one of your stone vines, traversing it to emerge near an entangled creature (maximum range %d). Merging with the stone is beneficial for you, healing %0.2f life (increases with Willpower). This will not break Body of Stone.]]) - :format(self:getTalentRange(t) ,100 + self:combatTalentStatDamage(t, "wil", 40, 630)) + :tformat(self:getTalentRange(t) ,100 + self:combatTalentStatDamage(t, "wil", 40, 630)) end, } @@ -174,6 +174,6 @@ newTalent{ return ([[Merge your target (within range %d) with one of your stone vines that has seized it, forcing it to traverse the vine and reappear near you. Merging with the stone is detrimental for the target, dealing %0.1f nature damage. The damage will increases with your Willpower.]]) - :format(self:getTalentRange(t), 80 + self:combatTalentStatDamage(t, "wil", 40, 330)) + :tformat(self:getTalentRange(t), 80 + self:combatTalentStatDamage(t, "wil", 40, 330)) end, } diff --git a/game/modules/tome/data/talents/gifts/eyals-fury.lua b/game/modules/tome/data/talents/gifts/eyals-fury.lua index 693293de3c61bc7f2f219e736a7ad9084d6c9c61..b550e86ba077e3eb899f36ecc280d6960a289bdd 100644 --- a/game/modules/tome/data/talents/gifts/eyals-fury.lua +++ b/game/modules/tome/data/talents/gifts/eyals-fury.lua @@ -47,7 +47,7 @@ newTalent{ return ([[You focus the inexorable pull of nature against a single creature, eroding it and allowing it to be reclaimed by the cycle of life. This deals %0.1f Nature and %0.1f Acid damage to the target, and is particularly devastating against undead and constructs, dealing %d%% more damage to them. The damage increases with your Mindpower.]]): - format(damDesc(self, DamageType.NATURE, dam/2), damDesc(self, DamageType.ACID, dam/2), t.undeadBonus) + tformat(damDesc(self, DamageType.NATURE, dam/2), damDesc(self, DamageType.ACID, dam/2), t.undeadBonus) end, } @@ -77,7 +77,7 @@ newTalent{ You gain %d Spell save, %0.1f%% Arcane resistance, and %0.1f%% Nature damage affinity. You defy arcane forces, so that any time you take damage from a spell, you restore %0.1f Equilibrium each turn for %d turns. The effects increase with your Mindpower.]]): - format(t.getSave(self, t), t.getResist(self, t), t.getAffinity(self, t), t.getPower(self, t), t.getDuration(self, t)) + tformat(t.getSave(self, t), t.getResist(self, t), t.getAffinity(self, t), t.getPower(self, t), t.getDuration(self, t)) end, } @@ -155,7 +155,7 @@ newTalent{ ) eff.chance = t.getChance(self, t) eff.removeEffect = t.removeEffect - eff.name = "Acidfire cloud" + eff.name = _t"Acidfire cloud" game:playSoundNear(self, "talents/cloud") return true end, @@ -163,7 +163,7 @@ newTalent{ return ([[You call upon the earth to create a blinding, corrosive cloud in an area of radius %d for %d turns. Each turn, this cloud deals %0.1f acid damage to each foe with a 25%% chance to blind and a %d%% chance of burning away one magical sustain or beneficial magical effect. The damage increases with your Mindpower.]]): - format(self:getTalentRadius(t), t.getDuration(self, t), damDesc(self, DamageType.ACID, t.getDamage(self, t)), t.getChance(self, t)) + tformat(self:getTalentRadius(t), t.getDuration(self, t), damDesc(self, DamageType.ACID, t.getDamage(self, t)), t.getChance(self, t)) end, } @@ -188,7 +188,7 @@ newTalent{ act:incMana(-mana); act:incVim(-vim); act:incPositive(-positive); act:incNegative(-negative) local drain = mana + vim + positive + negative if drain > 0 then - game:delayedLogMessage(eff.src, act, "Eyal's Wrath", ("#CRIMSON#%s drains magical energy!"):format(eff:getName())) + game:delayedLogMessage(eff.src, act, "Eyal's Wrath", ("#CRIMSON#%s drains magical energy!"):tformat(eff:getName())) eff.src:incEquilibrium(-drain/10) end end, @@ -220,7 +220,7 @@ newTalent{ ) eff.drain = t.getDrain(self, t) eff.drainMagic = t.drainMagic - eff.name = "Eyal's Wrath" + eff.name = _t"Eyal's Wrath" game:playSoundNear(self, "talents/thunderstorm") return true end, @@ -230,6 +230,6 @@ newTalent{ This storm moves with you and deals %0.1f Nature damage each turn to all foes it hits. In addtion, it will drain up to %d Mana, %d Vim, %d Positive, and %d Negative energy from each enemy within it's area every turn, while you restore Equilibrium equal to 10%% of the amount drained. The damage and drain increase with your Mindpower.]]): - format(self:getTalentRadius(t), t.getDuration(self, t), damDesc(self, DamageType.NATURE, t.getDamage(self, t)), drain, drain/2, drain/4, drain/4) + tformat(self:getTalentRadius(t), t.getDuration(self, t), damDesc(self, DamageType.NATURE, t.getDamage(self, t)), drain, drain/2, drain/4, drain/4) end, } diff --git a/game/modules/tome/data/talents/gifts/fire-drake.lua b/game/modules/tome/data/talents/gifts/fire-drake.lua index 05390b7b1a9f32ae26436f031387829cb5b998c7..99edada2068e2f85904646c7af50719dd64b8edd 100644 --- a/game/modules/tome/data/talents/gifts/fire-drake.lua +++ b/game/modules/tome/data/talents/gifts/fire-drake.lua @@ -79,7 +79,7 @@ newTalent{ Every level in Wing Buffet additionally raises your Physical Power and Accuracy by 2, passively. Each point in fire drake talents also increases your fire resistance by 1%%. - This talent will also attack with your shield, if you have one equipped.]]):format(self:getTalentRadius(t),damage*100) + This talent will also attack with your shield, if you have one equipped.]]):tformat(self:getTalentRadius(t),damage*100) end, } @@ -89,7 +89,7 @@ newTalent{ require = gifts_req2, points = 5, random_ego = "attack", - message = "@Source@ roars!", + message = _t"@Source@ roars!", equilibrium = 8, cooldown = 20, range = 0, @@ -119,7 +119,7 @@ newTalent{ return ([[You let out a powerful roar that sends your foes in radius %d into utter confusion (power: %d%%) for 3 turns. The sound wave is so strong, your foes also take %0.2f physical damage. The damage improves with your Strength. - Each point in fire drake talents also increases your fire resistance by 1%%.]]):format(radius, power, self:combatTalentStatDamage(t, "str", 30, 380)) + Each point in fire drake talents also increases your fire resistance by 1%%.]]):tformat(radius, power, self:combatTalentStatDamage(t, "str", 30, 380)) end, } @@ -174,7 +174,7 @@ newTalent{ return ([[Spit a cloud of flames, doing %0.2f fire damage in a radius of %d each turn for %d turns. The flames will ignore the caster, and will drain 10%% of the damage dealt as the flames consume enemies life force and transfer it to the user. The damage will increase with your Mindpower, and can critical. - Each point in fire drake talents also increases your fire resistance by 1%%.]]):format(damDesc(self, DamageType.FIRE, dam), radius, duration) + Each point in fire drake talents also increases your fire resistance by 1%%.]]):tformat(damDesc(self, DamageType.FIRE, dam), radius, duration) end, } @@ -186,7 +186,7 @@ newTalent{ random_ego = "attack", equilibrium = 20, cooldown = 20, - message = "@Source@ breathes fire!", + message = _t"@Source@ breathes fire!", tactical = { ATTACKAREA = { FIRE = 2 }}, range = 0, radius = function(self, t) return math.min(13, math.floor(self:combatTalentScale(t, 5, 9))) end, @@ -218,6 +218,6 @@ newTalent{ info = function(self, t) return ([[You breathe fire in a frontal cone of radius %d. Any target caught in the area will take %0.2f fire damage over 3 turns. The damage will increase with your Strength and the critical chance is based on your Mental crit rate. - Each point in fire drake talents also increases your fire resistance by 1%%.]]):format(self:getTalentRadius(t), damDesc(self, DamageType.FIRE, t.getDamage(self, t))) + Each point in fire drake talents also increases your fire resistance by 1%%.]]):tformat(self:getTalentRadius(t), damDesc(self, DamageType.FIRE, t.getDamage(self, t))) end, } diff --git a/game/modules/tome/data/talents/gifts/fungus.lua b/game/modules/tome/data/talents/gifts/fungus.lua index 8a2d364de178816a4719a39df5b1b8e6a8b85ca5..261c36434fd5e297bb5fb6afd027fd604c9e7c5b 100644 --- a/game/modules/tome/data/talents/gifts/fungus.lua +++ b/game/modules/tome/data/talents/gifts/fungus.lua @@ -38,7 +38,7 @@ newTalent{ return ([[Surround yourself with a myriad of tiny, nearly invisible, reinforcing fungi. You gain %d maximum life and %d life regeneration. The effects will increase with your Willpower.]]): - format(t.getLife(self, t), t.getRegen(self, t)) + tformat(t.getLife(self, t), t.getRegen(self, t)) end, } @@ -59,7 +59,7 @@ newTalent{ return ([[The fungus on your body allows regeneration effects to last longer. Each time you gain a beneficial effect with the regeneration subtype you increase its duration by %d%% + 1 rounded up. The effect will increase with your Mindpower.]]): - format(t.getDurationBonus(self, t) * 100) + tformat(t.getDurationBonus(self, t) * 100) end, } @@ -102,7 +102,7 @@ newTalent{ Each time you receive non-regeneration healing you gain %0.1f%% of a turn per 100 life healed. This effect can't add energy past 2 stored turns and overhealing is not counted. Also, regeneration effects on you will decrease your equilibrium by %0.1f each turn. The turn gain increases with your Mindpower.]]): - format(turn * 100, eq) + tformat(turn * 100, eq) end, } @@ -128,6 +128,6 @@ newTalent{ info = function(self, t) local mult = t.getMult(self, t) return ([[A wave of energy passes through your fungus, making it release immediate healing energies on you, healing you for %d%% of your current life regeneration rate (#GREEN#%d#LAST#).]]): - format(mult * 100, self.life_regen * mult) + tformat(mult * 100, self.life_regen * mult) end, } diff --git a/game/modules/tome/data/talents/gifts/gifts.lua b/game/modules/tome/data/talents/gifts/gifts.lua index b2694cdcbe7fb8684f55baef83d3479b4f1b1c9c..a641709e7ce795b95c77833bcfd6f541cdd9e4d0 100644 --- a/game/modules/tome/data/talents/gifts/gifts.lua +++ b/game/modules/tome/data/talents/gifts/gifts.lua @@ -18,33 +18,33 @@ -- darkgod@te4.org -- Wild Gifts -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/call", name = "call of the wild", generic = true, description = "Be at one with nature." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/harmony", name = "harmony", generic = true, description = "Nature heals and cleans you." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, is_antimagic=true, type="wild-gift/antimagic", name = "antimagic", generic = true, description = "The way to combat magic, or even nullify it." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/summon-melee", name = "summoning (melee)", description = "The art of calling creatures adept in melee combat to your aid." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/summon-distance", name = "summoning (distance)", description = "The art of calling creatures adept in elemental destruction to your aid." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/summon-utility", name = "summoning (utility)", description = "The art of calling versatile creatures to your aid." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/summon-augmentation", name = "summoning (augmentation)", description = "The art of manipulating the lifespan and location of your summons." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/summon-advanced", name = "summoning (advanced)", min_lev = 10, description = "The art of improving the quality of your summons." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/slime", name = "slime", description = "Through dedicated consumption of slime mold juice, you have gained an affinity with slime molds." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/fungus", name = "fungus", generic = true, description = "By covering yourself in fungus, you better your healing." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/sand-drake", name = "sand drake aspect", description = "Take on the defining aspects of a Sand Drake." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/fire-drake", name = "fire drake aspect", description = "Take on the defining aspects of a Fire Drake." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/cold-drake", name = "cold drake aspect", description = "Take on the defining aspects of a Cold Drake." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/storm-drake", name = "storm drake aspect", description = "Take on the defining aspects of a Storm Drake." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/venom-drake", name = "venom drake aspect", description = "Take on the defining aspects of a Venom Drake." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/higher-draconic", name = "higher draconic abilities", description = "Take on the aspects of aged and powerful dragons." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/mindstar-mastery", name = "mindstar mastery", generic = true, description = "Learn to channel your mental power through mindstars, forming powerful psionic blades." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/mucus", name = "mucus", description = "Cover the floor with natural mucus." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/ooze", name = "ooze", description = "Your body and internal organs are becoming more ooze-like in nature, allowing you to spawn more of you." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/moss", name = "moss", description = "You learn to control moss, making it grow at will to help you on the battlefield." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/malleable-body", name = "malleable body", description = "Your body's anatomy is starting to blur." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/oozing-blades", name = "oozing blades", description = "You channel ooze through your psiblades." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/corrosive-blades", name = "corrosive blades", description = "You channel acid through your psiblades." } -newTalentType{ allow_random=true, is_mind=true, is_nature=true, is_antimagic=true, type="wild-gift/eyals-fury", name = "eyal's fury", description = "Unleash nature's fury against foes around you." } -newTalentType{ allow_random=true, is_nature=true, type="wild-gift/earthen-power", name = "earthen power", description = "Dwarves have learned to imbue their shields with the power of stone itself." } -newTalentType{ allow_random=true, is_nature=true, type="wild-gift/earthen-vines", name = "earthen vines", description = "Control the stone itself and bring it alive in the form of dreadful vines." } -newTalentType{ allow_random=true, is_nature=true, type="wild-gift/dwarven-nature", name = "dwarven nature", description = "Learn to harness the innate power of your race." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/call", name = _t"call of the wild", generic = true, description = _t"Be at one with nature." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/harmony", name = _t"harmony", generic = true, description = _t"Nature heals and cleans you." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, is_antimagic=true, type="wild-gift/antimagic", name = _t"antimagic", generic = true, description = _t"The way to combat magic, or even nullify it." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/summon-melee", name = _t"summoning (melee)", description = _t"The art of calling creatures adept in melee combat to your aid." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/summon-distance", name = _t"summoning (distance)", description = _t"The art of calling creatures adept in elemental destruction to your aid." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/summon-utility", name = _t"summoning (utility)", description = _t"The art of calling versatile creatures to your aid." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/summon-augmentation", name = _t"summoning (augmentation)", description = _t"The art of manipulating the lifespan and location of your summons." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/summon-advanced", name = _t"summoning (advanced)", min_lev = 10, description = _t"The art of improving the quality of your summons." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/slime", name = _t"slime", description = _t"Through dedicated consumption of slime mold juice, you have gained an affinity with slime molds." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/fungus", name = _t"fungus", generic = true, description = _t"By covering yourself in fungus, you better your healing." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/sand-drake", name = _t"sand drake aspect", description = _t"Take on the defining aspects of a Sand Drake." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/fire-drake", name = _t"fire drake aspect", description = _t"Take on the defining aspects of a Fire Drake." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/cold-drake", name = _t"cold drake aspect", description = _t"Take on the defining aspects of a Cold Drake." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/storm-drake", name = _t"storm drake aspect", description = _t"Take on the defining aspects of a Storm Drake." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/venom-drake", name = _t"venom drake aspect", description = _t"Take on the defining aspects of a Venom Drake." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/higher-draconic", name = _t"higher draconic abilities", description = _t"Take on the aspects of aged and powerful dragons." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/mindstar-mastery", name = _t"mindstar mastery", generic = true, description = _t"Learn to channel your mental power through mindstars, forming powerful psionic blades." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/mucus", name = _t"mucus", description = _t"Cover the floor with natural mucus." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/ooze", name = _t"ooze", description = _t"Your body and internal organs are becoming more ooze-like in nature, allowing you to spawn more of you." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/moss", name = _t"moss", description = _t"You learn to control moss, making it grow at will to help you on the battlefield." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/malleable-body", name = _t"malleable body", description = _t"Your body's anatomy is starting to blur." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/oozing-blades", name = _t"oozing blades", description = _t"You channel ooze through your psiblades." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/corrosive-blades", name = _t"corrosive blades", description = _t"You channel acid through your psiblades." } +newTalentType{ allow_random=true, is_mind=true, is_nature=true, is_antimagic=true, type="wild-gift/eyals-fury", name = _t"eyal's fury", description = _t"Unleash nature's fury against foes around you." } +newTalentType{ allow_random=true, is_nature=true, type="wild-gift/earthen-power", name = _t"earthen power", description = _t"Dwarves have learned to imbue their shields with the power of stone itself." } +newTalentType{ allow_random=true, is_nature=true, type="wild-gift/earthen-vines", name = _t"earthen vines", description = _t"Control the stone itself and bring it alive in the form of dreadful vines." } +newTalentType{ allow_random=true, is_nature=true, type="wild-gift/dwarven-nature", name = _t"dwarven nature", description = _t"Learn to harness the innate power of your race." } -- Generic requires for gifts based on talent level gifts_req1 = { @@ -148,7 +148,7 @@ function setupSummon(self, m, x, y, no_control) game.party:addMember(m, { control=can_control and "full" or "no", type="summon", - title="Summon", + title=_t"Summon", orders = {target=true, leash=true, anchor=true, talents=true}, }) end diff --git a/game/modules/tome/data/talents/gifts/harmony.lua b/game/modules/tome/data/talents/gifts/harmony.lua index f68a78bda8024c86e474b40190c3cff37954aadf..5165c9fd952d54a6053cf0dd8002f75754664467 100644 --- a/game/modules/tome/data/talents/gifts/harmony.lua +++ b/game/modules/tome/data/talents/gifts/harmony.lua @@ -55,7 +55,7 @@ newTalent{ For %d turns, all poisons and diseases will heal you instead of damaging you. When activated, it also heals you for %d life for each disease or poison you have. The healing per disease/poison will increase with your Willpower.]]): - format(t.getdur(self,t), self:combatTalentStatDamage(t, "wil", 20, 60)) + tformat(t.getdur(self,t), self:combatTalentStatDamage(t, "wil", 20, 60)) end, } @@ -98,7 +98,7 @@ newTalent{ Lightning: +%d to all stats Acid: +%0.2f life regen Nature: +%d%% to all resists]]): - format(turns, turns, fire, cold, lightning, acid, nature) + tformat(turns, turns, fire, cold, lightning, acid, nature) end, } @@ -136,7 +136,7 @@ newTalent{ local turns = t.getCooldown(self, t) local nb = t.getNb(self, t) return ([[Commune with nature, removing the infusion saturation effect and reducing the cooldown of %d infusions by %d turns.]]): - format(nb, turns) + tformat(nb, turns) end, } @@ -176,6 +176,6 @@ newTalent{ On you, this effect causes each heal received to restore %d equilibrium and be %d%% effective. On other creatures, all healing is intercepted and redirected to you at %d%% efficiency. Only direct healing (not normal regeneration) is affected.]]): - format(self:getTalentRadius(t), t.getDur(self, t), t.getEquilibrium(self, t), 100 + pct, pct) + tformat(self:getTalentRadius(t), t.getDur(self, t), t.getEquilibrium(self, t), 100 + pct, pct) end, } diff --git a/game/modules/tome/data/talents/gifts/higher-draconic.lua b/game/modules/tome/data/talents/gifts/higher-draconic.lua index 6e17ec8e5501106784a9aedc90db9506d3f100ee..5567b7a8e2900357b946debb71043a8d048c3b34 100644 --- a/game/modules/tome/data/talents/gifts/higher-draconic.lua +++ b/game/modules/tome/data/talents/gifts/higher-draconic.lua @@ -100,7 +100,7 @@ newTalent{ Additionally, you will cause a burst that deals %0.2f of that damage to creatures in radius %d, regardless of if you hit with the blow. Levels in Prismatic Slash increase your Physical and Mental attack speeds by %d%%. - This talent will also attack with your shield, if you have one equipped.]]):format(100 * self:combatTalentWeaponDamage(t, 1.2, 2.0), burstdamage, radius, 100*speed) + This talent will also attack with your shield, if you have one equipped.]]):tformat(100 * self:combatTalentWeaponDamage(t, 1.2, 2.0), burstdamage, radius, 100*speed) end, } @@ -112,7 +112,7 @@ newTalent{ random_ego = "attack", equilibrium = 12, cooldown = 12, - message = "@Source@ breathes venom!", + message = _t"@Source@ breathes venom!", tactical = { ATTACKAREA = { poison = 2 } }, range = 0, radius = function(self, t) return math.min(13, math.floor(self:combatTalentScale(t, 5, 9))) end, @@ -159,7 +159,7 @@ newTalent{ return ([[You breathe crippling poison in a frontal cone of radius %d. Any target caught in the area will take %0.2f nature damage each turn for 6 turns. The poison also gives enemies a %d%% chance to fail actions more complicated than basic attacks and movement, while it is in effect. The damage will increase with your Strength, and the critical chance is based on your Mental crit rate. - Each point in Venomous Breath also increases your nature resistance by 3%%, and your nature damage by 4%%.]] ):format(self:getTalentRadius(t), damDesc(self, DamageType.NATURE, t.getDamage(self,t)/6), effect) + Each point in Venomous Breath also increases your nature resistance by 3%%, and your nature damage by 4%%.]] ):tformat(self:getTalentRadius(t), damDesc(self, DamageType.NATURE, t.getDamage(self,t)/6), effect) end, } @@ -178,7 +178,7 @@ newTalent{ end, info = function(self, t) return ([[You have mastered your draconic nature. - You gain %d%% knockback resistance, and your blindness and stun resistances are increased by %d%%.]]):format(100*t.resistKnockback(self, t), 100*t.resistBlindStun(self, t)) + You gain %d%% knockback resistance, and your blindness and stun resistances are increased by %d%%.]]):tformat(100*t.resistKnockback(self, t), 100*t.resistBlindStun(self, t)) end, } @@ -231,6 +231,6 @@ newTalent{ Your resistance to these elements is increased by %0.1f%% and all damage you deal with them is increased by %0.1f%% with %0.1f%% resistance penetration. Learning this talent will add a Willpower bonus to your breath talent damage with the same scaling as Strength, effectively doubling it when the stats are equal.]]) - :format(t.getResists(self, t), t.getDamageIncrease(self, t), t.getResistPen(self, t)) + :tformat(t.getResists(self, t), t.getDamageIncrease(self, t), t.getResistPen(self, t)) end, } diff --git a/game/modules/tome/data/talents/gifts/malleable-body.lua b/game/modules/tome/data/talents/gifts/malleable-body.lua index 556a0c380578ac2409e7c6952e80e6e5d16d9955..45efc1c9e920f93806a9d257b3dafca1e51f7aac 100644 --- a/game/modules/tome/data/talents/gifts/malleable-body.lua +++ b/game/modules/tome/data/talents/gifts/malleable-body.lua @@ -39,7 +39,7 @@ newTalent{ Your two selves share the same healthpool. While you are split both of you gain %d%% all resistances. Resistances will increase with Mindpower.]]): - format(dur, 10 + self:combatTalentMindDamage(t, 5, 200) / 10) + tformat(dur, 10 + self:combatTalentMindDamage(t, 5, 200) / 10) end, } @@ -56,7 +56,7 @@ newTalent{ return ([[Improve your fungus to allow it to take a part of any healing you receive and improve it. Each time you are healed you get a regeneration effect for 6 turns that heals you of %d%% of the direct heal you received. The effect will increase with your Mindpower.]]): - format(p) + tformat(p) end, } @@ -76,7 +76,7 @@ newTalent{ return ([[Both of you swap place in an instant, creatures attacking one will target the other. While swaping you briefly merge together, boosting all your nature and acid damage by %d%% for 6 turns and healing you for %d. Damage and healing increase with Mindpower.]]): - format(15 + self:combatTalentMindDamage(t, 5, 300) / 10, 40 + self:combatTalentMindDamage(t, 5, 300)) + tformat(15 + self:combatTalentMindDamage(t, 5, 300) / 10, 40 + self:combatTalentMindDamage(t, 5, 300)) end, } @@ -95,6 +95,6 @@ newTalent{ info = function(self, t) return ([[Your body's internal organs are melted together, making it much harder to suffer critical hits. All direct critical hits (physical, mental, spells) against you have a %d%% chance to instead do their normal damage.]]): - format(self:getTalentLevelRaw(t) * 15) + tformat(self:getTalentLevelRaw(t) * 15) end, } diff --git a/game/modules/tome/data/talents/gifts/mindstar-mastery.lua b/game/modules/tome/data/talents/gifts/mindstar-mastery.lua index 308d8e67d905e3ed27865e7228eac8c1dc156a09..3f8a4534a55060c1dbbfcddbbb144161ee55e7cc 100644 --- a/game/modules/tome/data/talents/gifts/mindstar-mastery.lua +++ b/game/modules/tome/data/talents/gifts/mindstar-mastery.lua @@ -71,7 +71,7 @@ newTalent{ return ([[Channel your mental power through your wielded mindstars, generating psionic blades. Mindstar psiblades have their damage modifiers (how much damage they gain from stats) multiplied by %0.2f, their armour penetration by %0.2f and mindpower, willpower and cunning by %0.2f. Also passively increases weapon damage by %d%% and physical power by 30 when using mindstars.]]): - format(t.getStatmult(self, t), t.getAPRmult(self, t), t.getPowermult(self, t), 100 * inc) --I5 + tformat(t.getStatmult(self, t), t.getAPRmult(self, t), t.getPowermult(self, t), 100 * inc) --I5 end, } @@ -100,7 +100,7 @@ newTalent{ return ([[You touch the target with your psiblade, bringing the forces of nature to bear on your foe. Thorny vines will grab the target, slowing it by %d%% and dealing %0.2f nature damage each turn for 10 turns. Damage will increase with your Mindpower and Mindstar power (requires two mindstars, multiplier %2.f).]]): - format(100*t.speedPenalty(self,t), damDesc(self, DamageType.NATURE, self:combatTalentMindDamage(t, 15, 250) / 10 * get_mindstar_power_mult(self)), get_mindstar_power_mult(self)) + tformat(100*t.speedPenalty(self,t), damDesc(self, DamageType.NATURE, self:combatTalentMindDamage(t, 15, 250) / 10 * get_mindstar_power_mult(self)), get_mindstar_power_mult(self)) end, } @@ -145,7 +145,7 @@ newTalent{ All foes hit by the leaves will start bleeding for %0.2f per turn (cumulative). All allies hit will be covered in leaves, granting them %d%% chance to completely avoid any damaging attack. Damage and avoidance will increase with your Mindpower and Mindstar power (requires two mindstars, multiplier %0.2f).]]): - format(dam, c, get_mindstar_power_mult(self)) + tformat(dam, c, get_mindstar_power_mult(self)) end, } @@ -199,6 +199,6 @@ newTalent{ return ([[You hit a foe with your mainhand psiblade doing %d%% weapon damage, channeling all the damage done through your offhand psiblade with which you touch a friendly creature to heal it. The maximum heal possible is %d. Equilibrium of the healed target will also decrease by 10%% of the heal power. Max heal will increase with your Mindpower and Mindstar power (requires two mindstars, multiplier %2.f).]]): - format(self:combatTalentWeaponDamage(t, 2.5, 4) * 100, t.getMaxDamage(self, t), get_mindstar_power_mult(self)) + tformat(self:combatTalentWeaponDamage(t, 2.5, 4) * 100, t.getMaxDamage(self, t), get_mindstar_power_mult(self)) end, } diff --git a/game/modules/tome/data/talents/gifts/moss.lua b/game/modules/tome/data/talents/gifts/moss.lua index f90b4ae1ec9764e5005457fb19dbcb2d0af0dbc8..6ad9228145be54c99f46e261a2bbcdb6ea26b2fb 100644 --- a/game/modules/tome/data/talents/gifts/moss.lua +++ b/game/modules/tome/data/talents/gifts/moss.lua @@ -71,7 +71,7 @@ newTalent{ The moss lasts %d turns. Moss talents are instant but place all other moss talents on cooldown for 3 turns. The damage will increase with your Mindpower.]]): - format(radius, damDesc(self, DamageType.NATURE, damage), slow, pin, duration) + tformat(radius, damDesc(self, DamageType.NATURE, damage), slow, pin, duration) end, } @@ -120,7 +120,7 @@ newTalent{ The moss lasts %d turns. Moss talents are instant but place all other moss talents on cooldown for 3 turns. The damage will increase with your Mindpower.]]): - format(radius, damDesc(self, DamageType.NATURE, damage), heal, duration) + tformat(radius, damDesc(self, DamageType.NATURE, damage), heal, duration) end, } @@ -168,7 +168,7 @@ newTalent{ The moss lasts %d turns. Moss talents are instant but place all other moss talents on cooldown for 3 turns. The damage and the chance to apply the slippery effect increase with your Mindpower.]]): - format(radius, damDesc(self, DamageType.NATURE, damage), fail, duration) + tformat(radius, damDesc(self, DamageType.NATURE, damage), fail, duration) end, } @@ -218,6 +218,6 @@ newTalent{ The moss lasts %d turns. Moss talents are instant but place all other moss talents on cooldown for 3 turns. The damage will increase with your Mindpower.]]): - format(radius, damDesc(self, DamageType.NATURE, damage), chance, power, duration) + tformat(radius, damDesc(self, DamageType.NATURE, damage), chance, power, duration) end, } diff --git a/game/modules/tome/data/talents/gifts/mucus.lua b/game/modules/tome/data/talents/gifts/mucus.lua index b063371f369586ad04f4027594e909c7d2fc007c..2ad4661de3ca4a7f496da963d38831aaa0d31c59 100644 --- a/game/modules/tome/data/talents/gifts/mucus.lua +++ b/game/modules/tome/data/talents/gifts/mucus.lua @@ -81,7 +81,7 @@ newTalent{ Your mucus will poison all foes crossing it, dealing %0.1f nature damage every turn for 5 turns (stacking). In addition, each turn, you will restore %0.1f Equilibrium while in your own mucus, and other friendly creatures in your mucus will restore 1 Equilibrium both for you and for themselves. The Poison damage and Equilibrium regeneration increase with your Mindpower, and laying down more mucus in the same spot will intensify its effects and refresh its duration.]]): - format(dur, dur, damDesc(self, DamageType.NATURE, dam), equi) + tformat(dur, dur, damDesc(self, DamageType.NATURE, dam), equi) end, } @@ -146,7 +146,7 @@ newTalent{ return ([[Calling upon nature, you cause the ground to erupt in an radius %d acidic explosion, dealing %0.1f acid damage to all creatures and creating mucus in the area. Any Mucus Oozes you have active will, if in line of sight, instantly spit slime (at reduced power) at one of the targets hit by the splash. The damage increases with your Mindpower.]]): - format(self:getTalentRadius(t), damDesc(self, DamageType.ACID, dam)) + tformat(self:getTalentRadius(t), damDesc(self, DamageType.ACID, dam)) end, } @@ -172,7 +172,7 @@ newTalent{ short_name = "MUCUS_OOZE_SPIT", end, info = function(self, t) return ([[Spits a beam of slime doing %0.2f slime damage. - The damage will increase with mindpower.]]):format(damDesc(self, DamageType.SLIME, self:combatTalentMindDamage(t, 8, 80))) + The damage will increase with mindpower.]]):tformat(damDesc(self, DamageType.SLIME, self:combatTalentMindDamage(t, 8, 80))) end, } @@ -204,9 +204,9 @@ newTalent{ local m = mod.class.NPC.new{ type = "vermin", subtype = "oozes", display = "j", color=colors.GREEN, image = "npc/vermin_oozes_green_ooze.png", - name = self.name:bookCapitalize().."'s mucus ooze", + name = ("%s's mucus ooze"):tformat(self:getName():bookCapitalize()), faction = self.faction, - desc = "It's made from mucus and it's oozing.", + desc = _t"It's made from mucus and it's oozing.", sound_moam = {"creatures/jelly/jelly_%d", 1, 3}, sound_die = {"creatures/jelly/jelly_die_%d", 1, 2}, sound_random = {"creatures/jelly/jelly_%d", 1, 3}, @@ -262,7 +262,7 @@ newTalent{ You may have up to %d Mucus Oozes active at any time (based on your Cunning). Any time you deal a mental critical, the remaining time on all of your Mucus Oozes will increase by 2. The spawn chance increases with your Mindpower.]]): - format(t.getChance(self, t), t.getSummonTime(self, t), t.getMax(self, t)) + tformat(t.getChance(self, t), t.getSummonTime(self, t), t.getMax(self, t)) end, } @@ -313,6 +313,6 @@ newTalent{ return ([[You temporarily merge with your mucus, cleansing yourself of %d physical or magical detrimental effects. You can then reemerge on any tile within sight and range that is also covered by mucus. This is quick, performed in only %d%% of the normal time, but you must be in contact with your mucus.]]): - format(nb, (energy) * 100) + tformat(nb, (energy) * 100) end, } diff --git a/game/modules/tome/data/talents/gifts/ooze.lua b/game/modules/tome/data/talents/gifts/ooze.lua index 4b7626c2a133c51e666721acdc933637a30f2864..b6ad511097252abda9f448c42fd0ba4b43821c9b 100644 --- a/game/modules/tome/data/talents/gifts/ooze.lua +++ b/game/modules/tome/data/talents/gifts/ooze.lua @@ -54,8 +54,8 @@ newTalent{ local m = mod.class.NPC.new{ type = "vermin", subtype = "oozes", display = "j", color=colors.GREEN, image = "npc/vermin_oozes_bloated_ooze.png", - name = "bloated ooze", - desc = "It's made from your own flesh and it's oozing.", + name = _t"bloated ooze", + desc = _t"It's made from your own flesh and it's oozing.", sound_moam = {"creatures/jelly/jelly_%d", 1, 3}, sound_die = {"creatures/jelly/jelly_die_%d", 1, 2}, sound_random = {"creatures/jelly/jelly_%d", 1, 3}, @@ -108,7 +108,7 @@ newTalent{ end, info = function(self, t) local xs = self:knowTalent(self.T_REABSORB) and ([[In addition, you restore %0.1f Equilibrium per turn while this talent is active. - ]]):format(self:callTalent(self.T_REABSORB, "equiRegen")) or "" + ]]):tformat(self:callTalent(self.T_REABSORB, "equiRegen")) or "" return ([[Your body is more like that of an ooze. When you take damage, you may split and create a Bloated Ooze nearby within your line of sight. This ooze has as much health as twice the damage you took (up to a maximum of %d, based on your Mindpower and maximum life). @@ -116,7 +116,7 @@ newTalent{ You may have up to %d Bloated Oozes active at any time (limited by talent level and the summoning limit), and all damage you take will be split equally between you and them so long as this talent is active. Bloated Oozes last for %d turns, are very resilient (%d%% all damage resistance to damage not coming through your shared link), and regenerate life quickly. %sThe chance to split increases with your Cunning.]]): - format(t.getMaxHP(self, t), t.getChance(self, t)*3/100, t.getMax(self, t), t.getSummonTime(self, t), t.getOozeResist(self, t), xs) + tformat(t.getMaxHP(self, t), t.getChance(self, t)*3/100, t.getMax(self, t), t.getSummonTime(self, t), t.getOozeResist(self, t), xs) end, } @@ -166,7 +166,7 @@ newTalent{ This process releases a burst of antimagic, dealing %0.1f Manaburn damage in radius %d. This talent allows you to restore %0.1f Equilibrium per turn while Mitosis is active. The damage, duration and Equilibrium restoration increase with your Mindpower.]]): - format(t.getDuration(self, t), damDesc(self, DamageType.ARCANE, t.getDam(self, t)), 3, t.equiRegen(self, t)) + tformat(t.getDuration(self, t), damDesc(self, DamageType.ARCANE, t.getDam(self, t)), 3, t.equiRegen(self, t)) end, } @@ -240,7 +240,7 @@ newTalent{ If you have less than the maximum number of oozes allowed by the Mitosis talent, up to %d will be created with %d life (%d%% of the maximum life allowed by Mitosis). Each ooze created will form near a random foe in sight (no more than one ooze per target) and grab its attention. This will then allow you to channel a melee attack through your ooze to its target, doing %d%% weapon damage (as Acid).]]): - format(t.getMax(self, t), t.getLife(self, t), t.getModHP(self, t)*100, t.getWepDamage(self, t) * 100) + tformat(t.getMax(self, t), t.getLife(self, t), t.getModHP(self, t)*100, t.getWepDamage(self, t) * 100) end, } @@ -264,6 +264,6 @@ newTalent{ return ([[Your body's internal organs are indistinct, disguising your vital areas. You have a %d%% chance to shrug off all direct critical hits (physical, mental, spell). In addition you gain %d%% resistance to disease, poison, wounds and blindness.]]): - format(t.critResist(self, t), 100*t.immunities(self, t)) + tformat(t.critResist(self, t), 100*t.immunities(self, t)) end, } diff --git a/game/modules/tome/data/talents/gifts/oozing-blades.lua b/game/modules/tome/data/talents/gifts/oozing-blades.lua index 002ac1c0066b6565e1d6a228b6a789695e8d3f13..e0e26c82df912ea6b302c78bb5e20f31d64c752a 100644 --- a/game/modules/tome/data/talents/gifts/oozing-blades.lua +++ b/game/modules/tome/data/talents/gifts/oozing-blades.lua @@ -52,7 +52,7 @@ newTalent{ local dam = t.getDamage(self, t) return ([[Channel slime through your psiblades, extending their reach to create a beam doing %0.1f Slime damage. The damage increases with your Mindpower.]]): - format(damDesc(self, DamageType.NATURE, dam)) + tformat(damDesc(self, DamageType.NATURE, dam)) end, } @@ -76,7 +76,7 @@ newTalent{ When you deal Acid damage to a creature, you gain a %0.1f%% bonus to Nature damage for %d turns. This damage bonus will improve up to 4 times (no more than once each turn) with later Acid damage you do, up to a maximum of %0.1f%%. The resistance and damage increase improve with your Mindpower.]]): - format(t.getResist(self, t), t.getNatureDamage(self, t, 1), t.getDuration(self, t), t.getNatureDamage(self, t, 5)) + tformat(t.getResist(self, t), t.getNatureDamage(self, t, 1), t.getDuration(self, t), t.getNatureDamage(self, t, 5)) end, } @@ -118,7 +118,7 @@ newTalent{ When it hits, it will burrow into the target's brain and stay there for 6 turns, interfering with its ability to use talents. Each time a talent is used there is %d%% chance that %d talent(s) are placed on a %d turn(s) cooldown. The chance will increase with your Mindpower.]]): - format(t.getChance(self, t), t.getNb(self, t), t.getTurns(self, t)) + tformat(t.getChance(self, t), t.getNb(self, t), t.getTurns(self, t)) end, } @@ -178,6 +178,6 @@ newTalent{ local chance = t.getChance(self, t) return ([[Surround yourself with natural forces, ignoring %d%% nature resistance of your targets. In addition, any time you deal damage with a wild gift there is a %d%% chance that one of your mucus oozes will spit at the target as a free action.]]) - :format(ressistpen, chance) + :tformat(ressistpen, chance) end, } diff --git a/game/modules/tome/data/talents/gifts/sand-drake.lua b/game/modules/tome/data/talents/gifts/sand-drake.lua index 30afc33fbfe0c19fe248663a0970bcd8e6f98eb5..4b95879ffa0dce2ee652fa305aa609834a900ad5 100644 --- a/game/modules/tome/data/talents/gifts/sand-drake.lua +++ b/game/modules/tome/data/talents/gifts/sand-drake.lua @@ -75,7 +75,7 @@ newTalent{ end self:attr("allow_on_heal", -1) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end return true end, @@ -94,7 +94,7 @@ return ([[Attack the target for %d%% Nature weapon damage. Big: %d%% Huge: %d%% Gargantuan: %d%%]]): - format(100 * t.getDamage(self, t), t.getPassiveCrit(self, t), + tformat(100 * t.getDamage(self, t), t.getPassiveCrit(self, t), t.maxSwallow(self, t, 1), t.maxSwallow(self, t, 2), t.maxSwallow(self, t, 3), @@ -110,7 +110,7 @@ newTalent{ require = gifts_req2, points = 5, random_ego = "attack", - message = "@Source@ shakes the ground!", + message = _t"@Source@ shakes the ground!", equilibrium = 4, cooldown = 20, tactical = { ATTACKAREA = { PHYSICAL = 2 }, DISABLE = { knockback = 2 } }, @@ -137,7 +137,7 @@ newTalent{ return ([[You slam the ground, shaking the area around you in a radius of %d. Creatures caught by the quake will be damaged for %d%% weapon damage, and knocked back up to 3 tiles away. The terrain will also be moved around within the radius, and the user will be shifted to a random square within the radius. - Each point in sand drake talents also increases your physical resistance by 0.5%%.]]):format(radius, dam * 100) + Each point in sand drake talents also increases your physical resistance by 0.5%%.]]):tformat(radius, dam * 100) end, } @@ -163,7 +163,7 @@ newTalent{ return ([[Allows you to burrow into earthen walls for %d turns. Your powerful digging abilities also allow you to exploit and smash through enemy defensive weaknesses; You ignore %d of target armor and %d%% of enemy physical damage resistance while this is in effect. At Talent Level 5, this talent can be used instantly, and the cooldown will reduce with levels. - Each point in sand drake talents also increases your physical resistance by 0.5%%.]]):format(t.getDuration(self, t), t.getPenetration(self, t), t.getPenetration(self, t) / 2) + Each point in sand drake talents also increases your physical resistance by 0.5%%.]]):tformat(t.getDuration(self, t), t.getPenetration(self, t), t.getPenetration(self, t) / 2) end, } @@ -175,7 +175,7 @@ newTalent{ random_ego = "attack", equilibrium = 20, cooldown = 20, - message = "@Source@ breathes sand!", + message = _t"@Source@ breathes sand!", tactical = { ATTACKAREA = {PHYSICAL = 2}, DISABLE = { blind = 2 } }, range = 0, radius = function(self, t) return math.min(13, math.floor(self:combatTalentScale(t, 5, 9))) end, @@ -210,6 +210,6 @@ newTalent{ local duration = t.getDuration(self, t) return ([[You breathe sand in a frontal cone of radius %d. Any target caught in the area will take %0.2f physical damage, and will be blinded for %d turns. The damage will increase with your Strength, the critical chance is based on your Mental crit rate, and the Blind apply power is based on your Mindpower. - Each point in sand drake talents also increases your physical resistance by 0.5%%.]]):format(self:getTalentRadius(t), damDesc(self, DamageType.PHYSICAL, damage), duration) + Each point in sand drake talents also increases your physical resistance by 0.5%%.]]):tformat(self:getTalentRadius(t), damDesc(self, DamageType.PHYSICAL, damage), duration) end, } diff --git a/game/modules/tome/data/talents/gifts/slime.lua b/game/modules/tome/data/talents/gifts/slime.lua index c30912546e208304a9d0793d75beddbd942e7a0d..96c369386d274d8b1cbefc540b799c5097cd66db 100644 --- a/game/modules/tome/data/talents/gifts/slime.lua +++ b/game/modules/tome/data/talents/gifts/slime.lua @@ -43,7 +43,7 @@ newTalent{ return ([[Spit slime at your target doing %0.1f nature damage and slowing it down by 30%% for 3 turns. The slime can bounce from foe to foe, hitting up to a total of %d target(s). Additional targets must be within 6 tiles of each other and the slime loses %0.1f%% damage per bounce. - The damage will increase with your Mindpower]]):format(damDesc(self, DamageType.NATURE, self:combatTalentMindDamage(t, 30, 250)), t.getTargetCount(self, t), 100-t.bouncePercent(self, t)) + The damage will increase with your Mindpower]]):tformat(damDesc(self, DamageType.NATURE, self:combatTalentMindDamage(t, 30, 250)), t.getTargetCount(self, t), 100-t.bouncePercent(self, t)) end, } @@ -53,7 +53,7 @@ newTalent{ require = gifts_req2, random_ego = "attack", points = 5, - message = "@Source@ releases poisonous spores at @target@.", + message = _t"@Source@ releases poisonous spores at @target@.", equilibrium = 2, cooldown = 10, range = 10, @@ -85,7 +85,7 @@ newTalent{ info = function(self, t) return ([[Releases poisonous spores at an area of radius %d, infecting the foes inside with a random poison doing %0.1f Nature damage over 10 turns. This attack can crit and deals %d%% additional critical damage. - The damage and critical bonus increase with your Mindpower.]]):format(self:getTalentRadius(t), damDesc(self, DamageType.NATURE, t.getDamage(self, t)), t.critPower(self, t)) + The damage and critical bonus increase with your Mindpower.]]):tformat(self:getTalentRadius(t), damDesc(self, DamageType.NATURE, t.getDamage(self, t)), t.critPower(self, t)) end, } @@ -97,7 +97,7 @@ newTalent{ require = gifts_req3, points = 5, mode = "sustained", - message = "The skin of @Source@ starts dripping acid.", + message = _t"The skin of @Source@ starts dripping acid.", sustain_equilibrium = 3, cooldown = 30, range = 1, @@ -118,7 +118,7 @@ newTalent{ end, info = function(self, t) return ([[Your skin drips with acid, damaging all that hit you for %0.1f disarming acid damage. - The damage increases with your Mindpower.]]):format(damDesc(self, DamageType.ACID, t.getDamage(self, t))) + The damage increases with your Mindpower.]]):tformat(damDesc(self, DamageType.ACID, t.getDamage(self, t))) end, } @@ -178,7 +178,7 @@ newTalent{ local radius = self:getTalentRadius(t) local talents = t.getNbTalents(self, t) return ([[You extend slimy roots into the ground, follow them, and re-appear somewhere else in a range of %d with error margin of %d. - Doing so changes your internal structure slightly, taking %d random talent(s) off cooldown.]]):format(range, radius, talents) + Doing so changes your internal structure slightly, taking %d random talent(s) off cooldown.]]):tformat(range, radius, talents) end, } diff --git a/game/modules/tome/data/talents/gifts/storm-drake.lua b/game/modules/tome/data/talents/gifts/storm-drake.lua index 86d9e0309fafcbf16193e140ed7b40c27a4c2101..578fd54960a5e376ca97d65b2a1b434a6b1582f2 100644 --- a/game/modules/tome/data/talents/gifts/storm-drake.lua +++ b/game/modules/tome/data/talents/gifts/storm-drake.lua @@ -49,7 +49,7 @@ newTalent{ Any actions other than moving will stop this effect. Note: since you will be moving very fast, game turns will pass very slowly. Levels in Lightning Speed additionally raises your Movement Speed by %d%%, passively. - Each point in storm drake talents also increases your lightning resistance by 1%%.]]):format(t.getSpeed(self, t), t.getDuration(self, t), t.getPassiveSpeed(self, t)*100) + Each point in storm drake talents also increases your lightning resistance by 1%%.]]):tformat(t.getSpeed(self, t), t.getDuration(self, t), t.getPassiveSpeed(self, t)*100) end, } @@ -82,11 +82,11 @@ newTalent{ local target = game.level.map(px, py, Map.ACTOR) if not target then return end if not target:checkHit(self:combatMindpower(), target:combatPhysicalResist(), 10) then - game.logSeen(target, "%s resists the static field!", target.name:capitalize()) + game.logSeen(target, "%s resists the static field!", target:getName():capitalize()) return end target:crossTierEffect(target.EFF_OFFBALANCE, self:combatMindpower()) - game.logSeen(target, "%s is caught in the static field!", target.name:capitalize()) + game.logSeen(target, "%s is caught in the static field!", target:getName():capitalize()) local perc = t.getPercent(self, t) if target.rank >= 5 then perc = perc / 2.5 @@ -99,7 +99,7 @@ newTalent{ target:takeHit(dam, self) self:project({type="hit", talent=t},target.x,target.y,DamageType.LIGHTNING,litdam) - game:delayedLogDamage(self, target, dam, ("#PURPLE#%d STATIC#LAST#"):format(math.ceil(dam))) + game:delayedLogDamage(self, target, dam, ("#PURPLE#%d STATIC#LAST#"):tformat(math.ceil(dam))) end, nil, {type="lightning_explosion"}) game:playSoundNear(self, "talents/lightning") return true @@ -110,7 +110,7 @@ newTalent{ return ([[Generate an electrical field around you in a radius of %d. Any creature caught inside will lose up to %0.1f%% of its current life (%0.1f%% if the target is Elite or Rare, %0.1f%% if the target is a Unique or Boss, and %0.1f%% if they are an Elite Boss.). This life drain is irresistable, but can be saved against with physical save. Additionally, it will deal %0.2f lightning damage afterwards, regardless of target rank. Current life loss and lightning damage will increase with your Mindpower, and the lightning damage element can critically hit with mental critical chances. - Each point in storm drake talents also increases your lightning resistance by 1%%.]]):format(self:getTalentRadius(t), percent, percent/1.5, percent/2, percent/2.5, damDesc(self, DamageType.LIGHTNING, litdam)) + Each point in storm drake talents also increases your lightning resistance by 1%%.]]):tformat(self:getTalentRadius(t), percent, percent/1.5, percent/2, percent/2.5, damDesc(self, DamageType.LIGHTNING, litdam)) end, } @@ -145,7 +145,7 @@ newTalent{ local proj = require("mod.class.Projectile"):makeHoming( self, {particle="bolt_lightning", trail="lightningtrail"}, - {speed=1, name="Tornado", dam=dam, movedam=movedam, rad=rad, dur=dur}, + {speed=1, name=_t"Tornado", dam=dam, movedam=movedam, rad=rad, dur=dur}, target, self:getTalentRange(t), function(self, src) @@ -157,9 +157,9 @@ newTalent{ if not target or target == self then return end if target:canBe("knockback") then target:knockback(src.x, src.y, 2) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end src:project({type="ball", radius=2, selffire=false, x=self.x, y=self.y, friendlyfire=false}, self.x, self.y, DT.LIGHTNING, self.def.movedam) @@ -196,7 +196,7 @@ newTalent{ When it reaches the target it explodes in a radius of %d, knocking back targets and dealing %0.2f lightning and %0.2f physical damage. The tornado will move a maximum of 20 times. Damage will increase with your Mindpower. - Each point in storm drake talents also increases your lightning resistance by 1%%.]]):format(damDesc(self, DamageType.LIGHTNING, t.getMoveDamage(self, t)), rad, damDesc(self, DamageType.LIGHTNING, t.getDamage(self, t)), damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) + Each point in storm drake talents also increases your lightning resistance by 1%%.]]):tformat(damDesc(self, DamageType.LIGHTNING, t.getMoveDamage(self, t)), rad, damDesc(self, DamageType.LIGHTNING, t.getDamage(self, t)), damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) end, } @@ -208,7 +208,7 @@ newTalent{ random_ego = "attack", equilibrium = 20, cooldown = 20, - message = "@Source@ breathes lightning!", + message = _t"@Source@ breathes lightning!", tactical = { ATTACKAREA = {LIGHTNING = 2}, DISABLE = { stun = 1 } }, range = 0, radius = function(self, t) return math.min(13, math.floor(self:combatTalentScale(t, 5, 9))) end, @@ -236,7 +236,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 3, {apply_power = self:combatMindpower()}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end end) @@ -255,7 +255,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[You breathe lightning in a frontal cone of radius %d. Any target caught in the area will take %0.2f to %0.2f lightning damage (%0.2f average) and be stunned for 3 turns. The damage will increase with your Strength, and the critical chance is based on your Mental crit rate, and the Stun apply power is based on your Mindpower. - Each point in storm drake talents also increases your lightning resistance by 1%%.]]):format( + Each point in storm drake talents also increases your lightning resistance by 1%%.]]):tformat( self:getTalentRadius(t), damDesc(self, DamageType.LIGHTNING, damage / 3), damDesc(self, DamageType.LIGHTNING, damage), diff --git a/game/modules/tome/data/talents/gifts/summon-advanced.lua b/game/modules/tome/data/talents/gifts/summon-advanced.lua index 5db705b97862f281ca8afcaa861bac5fe01cbb26..782d6814478adec43695c16f6a1b6acf8f2f1824 100644 --- a/game/modules/tome/data/talents/gifts/summon-advanced.lua +++ b/game/modules/tome/data/talents/gifts/summon-advanced.lua @@ -52,7 +52,7 @@ newTalent{ info = function(self, t) local cooldownred = t.getCooldownReduction(self, t) return ([[Reduces the cooldown of all summons by %d%%.]]): - format(cooldownred * 100) + tformat(cooldownred * 100) end, } @@ -83,7 +83,7 @@ newTalent{ - Turtle: Heals all friendly targets in the radius %d HP - Spider: Pins all foes in the radius Radius for effects is %d, and the duration of each lasting effect is %d turns. - The effects improve with your mindpower.]]):format(t.resReduction(self, t), t.poisonDamage(self,t) / 6, t.resReduction(self, t), t.nbEscorts(self, t), t.resReduction(self, t), t.resReduction(self, t), 100*t.slowStrength(self,t), t.amtHealing(self,t), radius, t.effectDuration(self, t)) + The effects improve with your mindpower.]]):tformat(t.resReduction(self, t), t.poisonDamage(self,t) / 6, t.resReduction(self, t), t.nbEscorts(self, t), t.resReduction(self, t), t.resReduction(self, t), 100*t.slowStrength(self,t), t.amtHealing(self,t), radius, t.effectDuration(self, t)) end, } @@ -97,7 +97,7 @@ newTalent{ getReduction = function(self, t) return math.floor(self:combatTalentLimit(t, 5, 1, 3.1)) end, -- Limit < 5 info = function(self, t) return ([[While Master Summoner is active, each new summon will reduce the remaining cooldown of Pheromones, Detonate and Wild Summon. - %d%% chance to reduce them by %d.]]):format(t.getChance(self, t), t.getReduction(self, t)) + %d%% chance to reduce them by %d.]]):tformat(t.getChance(self, t), t.getReduction(self, t)) end, } @@ -135,6 +135,6 @@ newTalent{ - Turtle: Can force all foes in a radius into melee range - Spider: Can project an insidious poison at its foes, reducing their healing This talent requires Master Summoner to be active to be used. - Effects scale with levels in summon talents.]]):format(t.duration(self,t)) + Effects scale with levels in summon talents.]]):tformat(t.duration(self,t)) end, } diff --git a/game/modules/tome/data/talents/gifts/summon-augmentation.lua b/game/modules/tome/data/talents/gifts/summon-augmentation.lua index 1c22303555583eb1160e1b7b196bcc43707b2aa8..c4258dfcf23266516555faf05a5a4d86eb4ba7c3 100644 --- a/game/modules/tome/data/talents/gifts/summon-augmentation.lua +++ b/game/modules/tome/data/talents/gifts/summon-augmentation.lua @@ -36,7 +36,7 @@ newTalent{ end, info = function(self, t) return ([[Induces a killing rage in all your summons within a radius of 5 when a summon is killed, increasing all their stats by %d for 5 turns. - The bonus will increase with your mindpower.]]):format(t.incStats(self, t)) + The bonus will increase with your mindpower.]]):tformat(t.incStats(self, t)) end, } @@ -121,7 +121,7 @@ newTalent{ - Spider: Knocks back all foes %d tiles In addition, a random summon will come off cooldown. Hostile effects will not hit you or your other summons. - The effects improve with your mindpower, and can crit.]]):format(radius, t.explodeSecondary(self,t), t.hydraAffinity(self,t), t.hydraRegen(self,t), t.explodeSecondary(self,t), t.explodeFire(self,t), t.explodeBleed(self,t) / 6, t.explodeSecondary(self,t), t.jellySlow(self,t) * 100, t.minotaurConfuse(self,t), t.golemArmour(self,t), t.golemHardiness(self,t), t.shellShielding(self,t), t.spiderKnockback(self,t)) + The effects improve with your mindpower, and can crit.]]):tformat(radius, t.explodeSecondary(self,t), t.hydraAffinity(self,t), t.hydraRegen(self,t), t.explodeSecondary(self,t), t.explodeFire(self,t), t.explodeBleed(self,t) / 6, t.explodeSecondary(self,t), t.jellySlow(self,t) * 100, t.minotaurConfuse(self,t), t.golemArmour(self,t), t.golemHardiness(self,t), t.shellShielding(self,t), t.spiderKnockback(self,t)) end, } @@ -134,7 +134,7 @@ newTalent{ incLife = function(self, t) return self:combatTalentLimit(t, 1, 0.05, 0.20) end, incDur = function(self, t) return math.floor(self:combatTalentLimit(t, 6, 1, 2.8)) end, info = function(self, t) - return ([[Increases all your summons' max life by %0.1f%% and extends your summons' maximum lifetime by %d turns.]]):format(100*t.incLife(self, t), t.incDur(self,t)) + return ([[Increases all your summons' max life by %0.1f%% and extends your summons' maximum lifetime by %d turns.]]):tformat(100*t.incLife(self, t), t.incDur(self,t)) end, } @@ -169,6 +169,6 @@ newTalent{ return true end, info = function(self, t) - return ([[Switches places with one of your summons. This disorients your foes, granting both you and your summon 50%% evasion for %d turns.]]):format(t.getDuration(self, t)) + return ([[Switches places with one of your summons. This disorients your foes, granting both you and your summon 50%% evasion for %d turns.]]):tformat(t.getDuration(self, t)) end, } diff --git a/game/modules/tome/data/talents/gifts/summon-distance.lua b/game/modules/tome/data/talents/gifts/summon-distance.lua index 69c813b04d1b67deccfc2963b47d2c52a5130672..d8644597809960860817b9bf7c927c433d17ef4f 100644 --- a/game/modules/tome/data/talents/gifts/summon-distance.lua +++ b/game/modules/tome/data/talents/gifts/summon-distance.lua @@ -22,7 +22,7 @@ newTalent{ short_name = "RITCH_FLAMESPITTER_BOLT", type = {"wild-gift/other",1}, points = 5, equilibrium = 2, - message = "@Source@ spits flames!", + message = _t"@Source@ spits flames!", range = 10, reflectable = true, requires_target = true, @@ -37,7 +37,7 @@ newTalent{ short_name = "RITCH_FLAMESPITTER_BOLT", end, info = function(self, t) return ([[Spits a bolt of fire, doing %0.2f fire damage. - The damage will increase with your Mindpower.]]):format(damDesc(self, DamageType.FIRE, self:combatTalentMindDamage(t, 8, 120))) + The damage will increase with your Mindpower.]]):tformat(damDesc(self, DamageType.FIRE, self:combatTalentMindDamage(t, 8, 120))) end, } @@ -46,7 +46,7 @@ newTalent{ short_name = "WILD_RITCH_FLAMESPITTER_BOLT", type = {"wild-gift/other",1}, points = 5, equilibrium = 2, - message = "@Source@ spits flames!", + message = _t"@Source@ spits flames!", range = 10, reflectable = true, requires_target = true, @@ -62,7 +62,7 @@ newTalent{ short_name = "WILD_RITCH_FLAMESPITTER_BOLT", end, info = function(self, t) return ([[Spits a bolt of fire, doing %0.2f fire damage. - The damage will increase with your Mindpower.]]):format(damDesc(self, DamageType.FIRE, self:combatTalentMindDamage(t, 8, 120))) + The damage will increase with your Mindpower.]]):tformat(damDesc(self, DamageType.FIRE, self:combatTalentMindDamage(t, 8, 120))) end, } @@ -93,7 +93,7 @@ newTalent{ local damage = t.getDamage(self, t) local radius = self:getTalentRadius(t) return ([[A wave of fire emanates from you with radius %d, knocking back anything caught inside and setting them ablaze and doing %0.2f fire damage over 3 turns. - The damage will increase with your Mindpower.]]):format(radius, damDesc(self, DamageType.FIRE, damage)) + The damage will increase with your Mindpower.]]):tformat(radius, damDesc(self, DamageType.FIRE, damage)) end, } @@ -104,7 +104,7 @@ newTalent{ points = 5, equilibrium = 10, cooldown = 8, - message = "@Source@ breathes acid!", + message = _t"@Source@ breathes acid!", tactical = { ATTACKAREA = { ACID = 2 } }, range = 0, radius = 5, @@ -125,7 +125,7 @@ newTalent{ end, info = function(self, t) return ([[Breathe acid on your foes, doing %0.2f damage. - The damage will increase with your Willpower.]]):format(damDesc(self, DamageType.ACID, self:combatTalentStatDamage(t, "wil", 30, 430))) + The damage will increase with your Willpower.]]):tformat(damDesc(self, DamageType.ACID, self:combatTalentStatDamage(t, "wil", 30, 430))) end, } @@ -136,7 +136,7 @@ newTalent{ points = 5, equilibrium = 10, cooldown = 8, - message = "@Source@ spits acid!", + message = _t"@Source@ spits acid!", tactical = { ATTACK = { ACID = 2 } }, range = 5, requires_target = true, @@ -155,7 +155,7 @@ newTalent{ end, info = function(self, t) return ([[Spit acid on a foe, doing %0.2f damage. - The damage will increase with your Willpower.]]):format(damDesc(self, DamageType.ACID, self:combatTalentStatDamage(t, "wil", 30, 430))) + The damage will increase with your Willpower.]]):tformat(damDesc(self, DamageType.ACID, self:combatTalentStatDamage(t, "wil", 30, 430))) end, } @@ -166,7 +166,7 @@ newTalent{ points = 5, equilibrium = 10, cooldown = 8, - message = "@Source@ breathes lightning!", + message = _t"@Source@ breathes lightning!", tactical = { ATTACKAREA = { LIGHTNING = 2 } }, range = 0, radius = 5, @@ -191,7 +191,7 @@ newTalent{ info = function(self, t) return ([[Breathe lightning on your foes, doing %d to %d damage. The damage will increase with your Willpower.]]): - format( + tformat( damDesc(self, DamageType.LIGHTNING, (self:combatTalentStatDamage(t, "wil", 30, 500)) / 3), damDesc(self, DamageType.LIGHTNING, self:combatTalentStatDamage(t, "wil", 30, 500)) ) @@ -205,7 +205,7 @@ newTalent{ points = 5, equilibrium = 10, cooldown = 8, - message = "@Source@ spits lightning!", + message = _t"@Source@ spits lightning!", tactical = { ATTACK = { LIGHTNING = 2 } }, range = 5, requires_target = true, @@ -226,7 +226,7 @@ newTalent{ info = function(self, t) return ([[Spit lightning on your foe, doing %d to %d damage. The damage will increase with your Willpower.]]): - format( + tformat( damDesc(self, DamageType.LIGHTNING, (self:combatTalentStatDamage(t, "wil", 30, 500)) / 3), damDesc(self, DamageType.LIGHTNING, self:combatTalentStatDamage(t, "wil", 30, 500)) ) @@ -240,7 +240,7 @@ newTalent{ points = 5, equilibrium = 10, cooldown = 8, - message = "@Source@ breathes poison!", + message = _t"@Source@ breathes poison!", tactical = { ATTACKAREA = { NATURE = 1, poison = 1 } }, range = 0, radius = 5, @@ -261,7 +261,7 @@ newTalent{ end, info = function(self, t) return ([[Breathe poison on your foes, doing %d damage over a few turns. - The damage will increase with your Willpower.]]):format(damDesc(self, DamageType.NATURE, self:combatTalentStatDamage(t, "wil", 30, 460))) + The damage will increase with your Willpower.]]):tformat(damDesc(self, DamageType.NATURE, self:combatTalentStatDamage(t, "wil", 30, 460))) end, } @@ -272,7 +272,7 @@ newTalent{ points = 5, equilibrium = 10, cooldown = 8, - message = "@Source@ spits poison!", + message = _t"@Source@ spits poison!", tactical = { ATTACK = { NATURE = 1, poison = 1 } }, range = 5, requires_target = true, @@ -291,7 +291,7 @@ newTalent{ end, info = function(self, t) return ([[Spit poison on your foes, doing %d damage over a few turns. - The damage will increase with your Willpower.]]):format(damDesc(self, DamageType.NATURE, self:combatTalentStatDamage(t, "wil", 30, 460))) + The damage will increase with your Willpower.]]):tformat(damDesc(self, DamageType.NATURE, self:combatTalentStatDamage(t, "wil", 30, 460))) end, } @@ -335,7 +335,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[A furious ice storm rages around the user doing %0.2f cold damage in a radius of 3 each turn for %d turns. It has 25%% chance to freeze damaged targets. - The damage and duration will increase with your Willpower.]]):format(damDesc(self, DamageType.COLD, damage), duration) + The damage and duration will increase with your Willpower.]]):tformat(damDesc(self, DamageType.COLD, damage), duration) end, } @@ -375,7 +375,7 @@ newTalent{ return ([[Grab a target and pull it next to you, covering it with frost while reducing its movement speed by 50%% for %d turns. The ice will also deal %0.2f cold damage. The damage and chance to slow will increase with your Mindpower.]]): - format(t.getDuration(self, t), damDesc(self, DamageType.COLD, self:combatTalentMindDamage(t, 5, 140))) + tformat(t.getDuration(self, t), damDesc(self, DamageType.COLD, self:combatTalentMindDamage(t, 5, 140))) end, } @@ -385,7 +385,7 @@ newTalent{ require = gifts_req1, points = 5, random_ego = "attack", - message = "@Source@ summons a Ritch Flamespitter!", + message = _t"@Source@ summons a Ritch Flamespitter!", equilibrium = 2, cooldown = 10, range = 5, @@ -444,7 +444,7 @@ newTalent{ type = "insect", subtype = "ritch", display = "I", color=colors.LIGHT_RED, image = "npc/summoner_ritch.png", name = "ritch flamespitter", faction = self.faction, - desc = [[]], + desc = _t[[]], autolevel = "none", ai = "summoned", ai_real = "tactical", ai_state = { talent_in=1, ally_compassion=10}, ai_tactic = resolvers.tactic"ranged", @@ -471,7 +471,7 @@ newTalent{ ai_target = {actor=target} } if self:attr("wild_summon") and rng.percent(self:attr("wild_summon")) then - m.name = m.name.." (wild summon)" + m.name = ("%s (wild summon)"):tformat(_t(m.name)) m[#m] = resolvers.talents{ [self.T_WILD_RITCH_FLAMESPITTER_BOLT]=self:getTalentLevelRaw(t) } end m.is_nature_summon = true @@ -492,7 +492,7 @@ newTalent{ It will get %d Willpower, %d Cunning and %d Constitution. Your summons inherit some of your stats: increased damage%%, resistance penetration %%, stun/pin/confusion/blindness resistance, armour penetration. Their Willpower and Cunning will increase with your Mindpower.]]) - :format(t.summonTime(self, t), incStats.wil, incStats.cun, incStats.con) + :tformat(t.summonTime(self, t), incStats.wil, incStats.cun, incStats.con) end, } @@ -502,7 +502,7 @@ newTalent{ require = gifts_req2, points = 5, random_ego = "attack", - message = "@Source@ summons a 3-headed hydra!", + message = _t"@Source@ summons a 3-headed hydra!", equilibrium = 5, cooldown = 18, range = 5, @@ -569,7 +569,7 @@ newTalent{ type = "hydra", subtype = "3head", display = "M", color=colors.GREEN, image = "npc/summoner_hydra.png", name = "3-headed hydra", faction = self.faction, - desc = [[A strange reptilian creature with three smouldering heads.]], + desc = _t[[A strange reptilian creature with three smouldering heads.]], autolevel = "none", ai = "summoned", ai_real = "tactical", ai_state = { talent_in=1, ally_compassion=10}, @@ -597,7 +597,7 @@ newTalent{ ai_target = {actor=target} } if self:attr("wild_summon") and rng.percent(self:attr("wild_summon")) then - m.name = m.name.." (wild summon)" + m.name = ("%s (wild summon)"):tformat(_t(m.name)) m[#m+1] = resolvers.talents{ [self.T_LIGHTNING_SPIT_HYDRA]=self:getTalentLevelRaw(t) } m[#m+1] = resolvers.talents{ [self.T_ACID_SPIT_HYDRA]=self:getTalentLevelRaw(t) } m[#m+1] = resolvers.talents{ [self.T_POISON_SPIT_HYDRA]=self:getTalentLevelRaw(t) } @@ -620,7 +620,7 @@ newTalent{ It will get %d Willpower, %d Constitution and 18 Strength. Your summons inherit some of your stats: increased damage%%, resistance penetration %%, stun/pin/confusion/blindness resistance, armour penetration. Their Willpower will increase with your Mindpower.]]) - :format(t.summonTime(self, t), incStats.wil, incStats.con, incStats.str) + :tformat(t.summonTime(self, t), incStats.wil, incStats.con, incStats.str) end, } @@ -630,7 +630,7 @@ newTalent{ require = gifts_req3, points = 5, random_ego = "attack", - message = "@Source@ summons a Rimebark!", + message = _t"@Source@ summons a Rimebark!", equilibrium = 8, cooldown = 10, range = 5, @@ -689,7 +689,7 @@ newTalent{ display = "#", color=colors.WHITE, name = "rimebark", faction = self.faction, image = "npc/immovable_plants_rimebark.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/immovable_plants_rimebark.png", display_h=2, display_y=-1}}}, - desc = [[This huge treant-like being is embedded with the fury of winter itself.]], + desc = _t[[This huge treant-like being is embedded with the fury of winter itself.]], autolevel = "none", ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=1, ally_compassion=10}, ai_tactic = resolvers.tactic"ranged", @@ -716,7 +716,7 @@ newTalent{ ai_target = {actor=target} } if self:attr("wild_summon") and rng.percent(self:attr("wild_summon")) then - m.name = m.name.." (wild summon)" + m.name = ("%s (wild summon)"):tformat(_t(m.name)) m[#m+1] = resolvers.talents{ [self.T_WINTER_S_GRASP]=self:getTalentLevelRaw(t) } end m.is_nature_summon = true @@ -737,7 +737,7 @@ newTalent{ It will get %d Willpower, %d Cunning and %d Constitution. Your summons inherit some of your stats: increased damage%%, resistance penetration %%, stun/pin/confusion/blindness resistance, armour penetration. Their Willpower and Cunning will increase with your Mindpower.]]) - :format(t.summonTime(self, t), incStats.wil, incStats.cun, incStats.con) + :tformat(t.summonTime(self, t), incStats.wil, incStats.cun, incStats.con) end, } @@ -747,7 +747,7 @@ newTalent{ require = gifts_req4, points = 5, random_ego = "attack", - message = "@Source@ summons a Fire Drake!", + message = _t"@Source@ summons a Fire Drake!", equilibrium = 15, cooldown = 10, range = 5, @@ -785,7 +785,7 @@ newTalent{ type = "dragon", subtype = "fire", display = "d", color=colors.RED, image = "npc/dragon_fire_fire_drake_hatchling.png", name = "fire drake hatchling", faction = self.faction, - desc = [[A mighty fire drake.]], + desc = _t[[A mighty fire drake.]], autolevel = "none", ai = "summoned", ai_real = "tactical", ai_state = { talent_in=1, ally_compassion=10}, stats = {str=0, dex=0, con=0, cun=0, wil=0, mag=0}, @@ -849,7 +849,7 @@ newTalent{ type = "dragon", subtype = "fire", display = "D", color=colors.RED, image = "npc/dragon_fire_fire_drake.png", name = "fire drake", faction = self.faction, - desc = [[A mighty fire drake.]], + desc = _t[[A mighty fire drake.]], autolevel = "none", ai = "summoned", ai_real = "tactical", ai_state = { talent_in=1, ally_compassion=10}, stats = {str=0, dex=0, con=0, cun=0, wil=0, mag=0}, @@ -879,7 +879,7 @@ newTalent{ ai_target = {actor=target} } if self:attr("wild_summon") and rng.percent(self:attr("wild_summon")) then - m.name = m.name.." (wild summon)" + m.name = ("%s (wild summon)"):tformat(_t(m.name)) m[#m+1] = resolvers.talents{ [self.T_AURA_OF_SILENCE]=self:getTalentLevelRaw(t) } end m.is_nature_summon = true @@ -900,6 +900,6 @@ newTalent{ It will get %d Strength, %d Constitution and 38 Willpower. Your summons inherit some of your stats: increased damage%%, resistance penetration %%, stun/pin/confusion/blindness resistance, armour penetration. Their Strength and Constitution will increase with your Mindpower.]]) - :format(t.summonTime(self, t), incStats.str, incStats.con) + :tformat(t.summonTime(self, t), incStats.str, incStats.con) end, } diff --git a/game/modules/tome/data/talents/gifts/summon-melee.lua b/game/modules/tome/data/talents/gifts/summon-melee.lua index eef84d94f54cd8d2acc2c719b17e657aeb1e93e4..18b2b76bcba6a4a78c109b3e6a02dcbb21855169 100644 --- a/game/modules/tome/data/talents/gifts/summon-melee.lua +++ b/game/modules/tome/data/talents/gifts/summon-melee.lua @@ -22,7 +22,7 @@ newTalent{ type = {"wild-gift/other",1}, points = 5, equilibrium = 10, - message = "@source@ oozes over the ground!!", + message = _t"@source@ oozes over the ground!!", cooldown = 15, tactical = { ATTACKAREA = { SLIME = 4} }, range = 0, @@ -53,7 +53,7 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) local duration = t.getDuration(self, t) - return ([[Ooze over the floor, spreading caustic jelly in a radius of 1 lasting %d turns and dealing %d nature damage per turn to hostile creatures caught within.]]):format(duration, damDesc(self, DamageType.NATURE, damage)) + return ([[Ooze over the floor, spreading caustic jelly in a radius of 1 lasting %d turns and dealing %d nature damage per turn to hostile creatures caught within.]]):tformat(duration, damDesc(self, DamageType.NATURE, damage)) end, } @@ -68,7 +68,7 @@ newTalent{ self:talentTemporaryValue(p, "clone_on_hit", {min_dam_pct=t.getDamage(self,t), chance=t.getChance(self,t)}) end, info = function(self, t) - return ([[%d%% chance to split upon taking a single hit dealing at least %d%% of your maximum life.]]):format(t.getChance(self, t), t.getDamage(self, t)) + return ([[%d%% chance to split upon taking a single hit dealing at least %d%% of your maximum life.]]):tformat(t.getChance(self, t), t.getDamage(self, t)) end, } @@ -78,7 +78,7 @@ newTalent{ require = gifts_req1, points = 5, random_ego = "attack", - message = "@Source@ summons a War Hound!", + message = _t"@Source@ summons a War Hound!", equilibrium = 3, cooldown = 15, range = 5, @@ -135,7 +135,7 @@ newTalent{ type = "animal", subtype = "canine", display = "C", color=colors.LIGHT_DARK, image = "npc/summoner_wardog.png", name = "war hound", faction = self.faction, - desc = [[]], + desc = _t[[]], autolevel = "none", ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=5, }, stats = {str=0, dex=0, con=0, cun=0, wil=0, mag=0}, @@ -157,7 +157,7 @@ newTalent{ ai_target = {actor=target} } if self:attr("wild_summon") and rng.percent(self:attr("wild_summon")) then - m.name = m.name.." (wild summon)" + m.name = ("%s (wild summon)"):tformat(_t(m.name)) m[#m+1] = resolvers.talents{ [self.T_TOTAL_THUGGERY]=self:getTalentLevelRaw(t) } end m.is_nature_summon = true @@ -178,7 +178,7 @@ newTalent{ It will get %d Strength, %d Dexterity and %d Constitution. Your summons inherit some of your stats: increased damage%%, resistance penetration %%, stun/pin/confusion/blindness resistance, armour penetration. The hound's Strength and Dexterity will increase with your Mindpower.]]) - :format(t.summonTime(self, t), incStats.str, incStats.dex, incStats.con) + :tformat(t.summonTime(self, t), incStats.str, incStats.dex, incStats.con) end, } @@ -188,7 +188,7 @@ newTalent{ require = gifts_req2, points = 5, random_ego = "attack", - message = "@Source@ summons a Jelly!", + message = _t"@Source@ summons a Jelly!", equilibrium = 2, cooldown = 10, range = 5, @@ -243,7 +243,7 @@ newTalent{ local m = NPC.new{ type = "immovable", subtype = "jelly", image = "npc/jelly-darkgrey.png", display = "j", color=colors.BLACK, - desc = "A strange blob on the dungeon floor.", + desc = _t"A strange blob on the dungeon floor.", name = "black jelly", autolevel = "none", faction=self.faction, stats = {str=0, dex=0, con=0, cun=0, wil=0, mag=0}, @@ -278,7 +278,7 @@ newTalent{ end, } if self:attr("wild_summon") and rng.percent(self:attr("wild_summon")) then - m.name = m.name.." (wild summon)" + m.name = ("%s (wild summon)"):tformat(_t(m.name)) m[#m+1] = resolvers.talents{ [self.T_JELLY_MITOTIC_SPLIT]=self:getTalentLevelRaw(t) } end m.is_nature_summon = true @@ -299,7 +299,7 @@ newTalent{ It will get %d Constitution and %d Strength. Your summons inherit some of your stats: increased damage%%, resistance penetration %%, stun/pin/confusion/blindness resistance, armour penetration. The jelly's Constitution will increase with your Mindpower.]]) - :format(t.summonTime(self, t), incStats.con, incStats.str) + :tformat(t.summonTime(self, t), incStats.con, incStats.str) end, } @@ -309,7 +309,7 @@ newTalent{ require = gifts_req3, points = 5, random_ego = "attack", - message = "@Source@ summons a Minotaur!", + message = _t"@Source@ summons a Minotaur!", equilibrium = 10, cooldown = 15, range = 5, @@ -378,7 +378,7 @@ newTalent{ global_speed_base=1.2, stats = {str=0, dex=0, con=0, cun=0, wil=0, mag=0}, inc_stats = t.incStats(self, t), - desc = [[It is a cross between a human and a bull.]], + desc = _t[[It is a cross between a human and a bull.]], resolvers.equip{ {type="weapon", subtype="battleaxe", auto_req=true}, }, level_range = {self.level, self.level}, exp_worth = 0, @@ -393,7 +393,7 @@ newTalent{ ai_target = {actor=target} } if self:attr("wild_summon") and rng.percent(self:attr("wild_summon")) then - m.name = m.name.." (wild summon)" + m.name = ("%s (wild summon)"):tformat(_t(m.name)) m[#m+1] = resolvers.talents{ [self.T_RUSH]=self:getTalentLevelRaw(t) } end m.is_nature_summon = true @@ -414,7 +414,7 @@ newTalent{ It will get %d Strength, %d Constitution and %d Dexterity. Your summons inherit some of your stats: increased damage%%, resistance penetration %%, stun/pin/confusion/blindness resistance, armour penetration. The minotaur's Strength and Dexterity will increase with your Mindpower.]]) - :format(t.summonTime(self,t), incStats.str, incStats.con, incStats.dex) + :tformat(t.summonTime(self,t), incStats.str, incStats.con, incStats.dex) end, } @@ -424,7 +424,7 @@ newTalent{ require = gifts_req4, points = 5, random_ego = "attack", - message = "@Source@ summons a Stone Golem!", + message = _t"@Source@ summons a Stone Golem!", equilibrium = 15, cooldown = 20, range = 5, @@ -496,7 +496,7 @@ newTalent{ ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=2, }, stats = {str=0, dex=0, con=0, cun=0, wil=0, mag=0}, inc_stats = t.incStats(self, t), - desc = [[It is a massive animated statue.]], + desc = _t[[It is a massive animated statue.]], level_range = {self.level, self.level}, exp_worth = 0, combat_armor = 25, combat_def = -20, @@ -514,7 +514,7 @@ newTalent{ resolvers.sustains_at_birth(), } if self:attr("wild_summon") and rng.percent(self:attr("wild_summon")) then - m.name = m.name.." (wild summon)" + m.name = ("%s (wild summon)"):tformat(_t(m.name)) m[#m+1] = resolvers.talents{ [self.T_DISARM]=self:getTalentLevelRaw(t) } end m.is_nature_summon = true @@ -535,6 +535,6 @@ newTalent{ It will get %d Strength, %d Constitution and %d Dexterity. Your summons inherit some of your stats: increased damage%%, resistance penetration %%, stun/pin/confusion/blindness resistance, armour penetration. The golem's Strength and Dexterity will increase with your Mindpower.]]) - :format(t.summonTime(self, t), incStats.str, incStats.con, incStats.dex) + :tformat(t.summonTime(self, t), incStats.str, incStats.con, incStats.dex) end, } diff --git a/game/modules/tome/data/talents/gifts/summon-utility.lua b/game/modules/tome/data/talents/gifts/summon-utility.lua index acf17e2947aa14220102343d6fbef9fd95034049..8aae7dcec8cc51fc002713b2d915c84764d2c6d3 100644 --- a/game/modules/tome/data/talents/gifts/summon-utility.lua +++ b/game/modules/tome/data/talents/gifts/summon-utility.lua @@ -37,7 +37,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Forces all hostile foes in radius %d to attack you.]]):format(self:getTalentRadius(t)) + return ([[Forces all hostile foes in radius %d to attack you.]]):tformat(self:getTalentRadius(t)) end, } @@ -55,7 +55,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Under the cover of your shell, gain %d%% all resistance for %d turns]]):format(t.resistPower(self, t), t.getDuration(self, t)) + return ([[Under the cover of your shell, gain %d%% all resistance for %d turns]]):tformat(t.resistPower(self, t), t.getDuration(self, t)) end, } @@ -82,7 +82,7 @@ newTalent{ short_name="SPIDER_WEB", return true end, info = function(self, t) - return ([[Spread a web and throw it toward your target. If caught, it won't be able to move for %d turns.]]):format(t.getDuration(self, t)) + return ([[Spread a web and throw it toward your target. If caught, it won't be able to move for %d turns.]]):tformat(t.getDuration(self, t)) end, } @@ -92,7 +92,7 @@ newTalent{ require = gifts_req1, random_ego = "attack", points = 5, - message = "@Source@ summons a Turtle!", + message = _t"@Source@ summons a Turtle!", equilibrium = 2, cooldown = 10, range = 5, @@ -188,7 +188,7 @@ newTalent{ ai_target = {actor=target} } if self:attr("wild_summon") and rng.percent(self:attr("wild_summon")) then - m.name = m.name.." (wild summon)" + m.name = ("%s (wild summon)"):tformat(_t(m.name)) m[#m+1] = resolvers.talents{ [self.T_BATTLE_CALL]=self:getTalentLevelRaw(t) } end m.is_nature_summon = true @@ -211,7 +211,7 @@ newTalent{ It will get %d Constitution, %d Dexterity and 18 willpower. Your summons inherit some of your stats: increased damage%%, resistance penetration %%, stun/pin/confusion/blindness resistance, armour penetration. Their Constitution will increase with your Mindpower.]]) - :format(t.summonTime(self, t), incStats.con, incStats.dex) + :tformat(t.summonTime(self, t), incStats.con, incStats.dex) end, } @@ -221,7 +221,7 @@ newTalent{ require = gifts_req2, points = 5, random_ego = "attack", - message = "@Source@ summons a Spider!", + message = _t"@Source@ summons a Spider!", equilibrium = 5, cooldown = 10, range = 5, @@ -304,7 +304,7 @@ newTalent{ ai_target = {actor=target} } if self:attr("wild_summon") and rng.percent(self:attr("wild_summon")) then - m.name = m.name.." (wild summon)" + m.name = ("%s (wild summon)"):tformat(_t(m.name)) m[#m+1] = resolvers.inscription("INFUSION:_INSIDIOUS_POISON", {cooldown=12, range=6, heal_factor=60, power=self:getTalentLevel(t) * 60}) end m.is_nature_summon = true @@ -325,7 +325,7 @@ newTalent{ It will get %d Dexterity, %d Strength, 18 Willpower and %d Constitution. Your summons inherit some of your stats: increased damage%%, resistance penetration %%, stun/pin/confusion/blindness resistance, armour penetration. Their Dexterity will increase with your Mindpower.]]) - :format(t.summonTime(self, t), incStats.dex, incStats.str, incStats.con) + :tformat(t.summonTime(self, t), incStats.dex, incStats.str, incStats.con) end, } @@ -351,7 +351,7 @@ newTalent{ return ([[You focus yourself on nature, allowing you to summon natural creatures much faster (%d%% of a normal summon time) and with no chance to fail from high equilibrium for %d turns. When activating this power, a random summoning talent will come off cooldown. Each time you summon, the duration of the frantic summoning effect will reduce by 1.]]): - format(100 - reduc, t.getDuration(self, t)) + tformat(100 - reduc, t.getDuration(self, t)) end, } @@ -386,6 +386,6 @@ newTalent{ end, info = function(self, t) return ([[Mark a creature with pheromones, signalling to all of your summons within %d tiles to shift aggression towards the marked creature for %d turns. Marked targets will receive %d%% increased damage from your summons and your summons will change target to it. - The increased damage from your summons will increase with your Mindpower]]):format(t.getRad(self,t), t.getDur(self,t), t.getDamage(self,t)) + The increased damage from your summons will increase with your Mindpower]]):tformat(t.getRad(self,t), t.getDur(self,t), t.getDamage(self,t)) end, } diff --git a/game/modules/tome/data/talents/gifts/venom-drake.lua b/game/modules/tome/data/talents/gifts/venom-drake.lua index 6565e31686913f4d1069c1ad496a692637b4b337..8def01b0c56ff0ba09b3ce057787c3954d71bfc3 100644 --- a/game/modules/tome/data/talents/gifts/venom-drake.lua +++ b/game/modules/tome/data/talents/gifts/venom-drake.lua @@ -23,7 +23,7 @@ newTalent{ require = gifts_req1, points = 5, random_ego = "attack", - message = "@Source@ spits acid!", + message = _t"@Source@ spits acid!", equilibrium = 3, cooldown = function(self, t) return math.ceil(self:combatTalentLimit(t, 3, 6.9, 5.5)) end, -- Limit >=3 tactical = { ATTACK = { ACID = 2 } }, @@ -65,7 +65,7 @@ newTalent{ Enemies struck have a 25%% chance to be Disarmed for three turns, as their weapon is rendered useless by an acid coating. At Talent Level 5, this becomes a piercing line of acid. Every level in Acidic Spray additionally raises your Mindpower by 4, passively. - Each point in acid drake talents also increases your acid resistance by 1%%.]]):format(damDesc(self, DamageType.ACID, damage)) + Each point in acid drake talents also increases your acid resistance by 1%%.]]):tformat(damDesc(self, DamageType.ACID, damage)) end, } @@ -127,7 +127,7 @@ newTalent{ return ([[Exhale a mist of lingering acid, dealing %0.2f acid damage that can critical in a radius of %d each turn for %d turns. Enemies in this mist will be corroded for %d turns, lowering their Accuracy, their Armour and their Defense by %d. The damage and duration will increase with your Mindpower, and the radius will increase with talent level. - Each point in acid drake talents also increases your acid resistance by 1%%.]]):format(damDesc(self, DamageType.ACID, damage), radius, duration, cordur, atk) + Each point in acid drake talents also increases your acid resistance by 1%%.]]):tformat(damDesc(self, DamageType.ACID, damage), radius, duration, cordur, atk) end, } @@ -180,7 +180,7 @@ newTalent{ Every two talent levels, one of your strikes becomes blinding acid instead of normal acid, blinding the target 25%% of the time if it hits. Each point in acid drake talents also increases your acid resistance by 1%%. - This talent will also attack with your shield, if you have one equipped.]]):format(100 * self:combatTalentWeaponDamage(t, 0.1, 0.6)) + This talent will also attack with your shield, if you have one equipped.]]):tformat(100 * self:combatTalentWeaponDamage(t, 0.1, 0.6)) end, } @@ -192,7 +192,7 @@ newTalent{ random_ego = "attack", equilibrium = 20, cooldown = 20, - message = "@Source@ breathes acid!", + message = _t"@Source@ breathes acid!", tactical = { ATTACKAREA = { ACID = 2 }, DISABLE = {disarm = 1} }, range = 0, radius = function(self, t) return math.min(13, math.floor(self:combatTalentScale(t, 5, 9))) end, @@ -234,6 +234,6 @@ newTalent{ return ([[You breathe acid in a frontal cone of radius %d. Any target caught in the area will take %0.2f acid damage. Enemies caught in the acid are disarmed for 3 turns. The damage will increase with your Strength, the critical chance is based on your Mental crit rate, and the Disarm apply power is based on your Mindpower. - Each point in acid drake talents also increases your acid resistance by 1%%.]]):format(self:getTalentRadius(t), damDesc(self, DamageType.ACID, t.getDamage(self, t))) + Each point in acid drake talents also increases your acid resistance by 1%%.]]):tformat(self:getTalentRadius(t), damDesc(self, DamageType.ACID, t.getDamage(self, t))) end, } diff --git a/game/modules/tome/data/talents/misc/horrors.lua b/game/modules/tome/data/talents/misc/horrors.lua index 4848e4c69982f83c61410b908bb9a3671e82e501..06a2528cb4ba1dc8e41c5e3cead4c75f9684def4 100644 --- a/game/modules/tome/data/talents/misc/horrors.lua +++ b/game/modules/tome/data/talents/misc/horrors.lua @@ -17,12 +17,12 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -newTalentType{ type="technique/horror", name = "horror techniques", hide = true, description = "Physical talents of the various horrors of the world." } -newTalentType{ type="psionic/horror", name = "horror techniques", hide = false, description = "Psionic talents of the various horrors of the world." } -newTalentType{ type="wild-gift/horror", name = "horror techniques", hide = false, description = "Psionic talents of the various horrors of the world." } -newTalentType{ no_silence=true, is_spell=true, type="spell/horror", name = "horror spells", hide = true, description = "Spell talents of the various horrors of the world." } -newTalentType{ no_silence=true, is_spell=true, type="corruption/horror", name = "horror spells", hide = true, description = "Spell talents of the various horrors of the world." } -newTalentType{ type="other/horror", name = "horror powers", hide = true, description = "Unclassified talents of the various horrors of the world." } +newTalentType{ type="technique/horror", name = _t"horror techniques", hide = true, description = _t"Physical talents of the various horrors of the world." } +newTalentType{ type="psionic/horror", name = _t"horror techniques", hide = false, description = _t"Psionic talents of the various horrors of the world." } +newTalentType{ type="wild-gift/horror", name = _t"horror techniques", hide = false, description = _t"Psionic talents of the various horrors of the world." } +newTalentType{ no_silence=true, is_spell=true, type="spell/horror", name = _t"horror spells", hide = true, description = _t"Spell talents of the various horrors of the world." } +newTalentType{ no_silence=true, is_spell=true, type="corruption/horror", name = _t"horror spells", hide = true, description = _t"Spell talents of the various horrors of the world." } +newTalentType{ type="other/horror", name = _t"horror powers", hide = true, description = _t"Unclassified talents of the various horrors of the world." } local oldTalent = newTalent local newTalent = function(t) if type(t.hide) == "nil" then t.hide = true end return oldTalent(t) end @@ -37,7 +37,7 @@ newTalent{ cooldown = 12, stamina = 24, tactical = { ATTACK = { PHYSICAL = 1 }, DISABLE = { cut = 2 } }, - message = "In a frenzy @Source@ bites at @Target@!", + message = _t"In a frenzy @Source@ bites at @Target@!", is_melee = true, range = 1, target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end, @@ -63,7 +63,7 @@ newTalent{ local bleed = t.getBleedDamage(self, t) * 100 local heal_penalty = t.getHealingPenalty(self, t) return ([[A nasty bite that hits for %d%% weapon damage, reduces the targets healing by %d%%, and causes the target to bleed for %d%% weapon damage over 5 turns. - Only usable while frenzied.]]):format(damage, heal_penalty, bleed) + Only usable while frenzied.]]):tformat(damage, heal_penalty, bleed) end, } @@ -74,7 +74,7 @@ newTalent{ cooldown = 5, tactical = { CLOSEIN = 3 }, direct_hit = true, - message = "@Source@ leaps forward in a frenzy!", + message = _t"@Source@ leaps forward in a frenzy!", range = function(self, t) return math.floor(self:combatTalentScale(t, 2.4, 10)) end, requires_target = true, on_pre_use = function(self, t, silent) if not self:hasEffect(self.EFF_FRENZY) or self:attr("encased_in_ice") or self:attr("never_move") then return false end return true end, @@ -106,7 +106,7 @@ newTalent{ end, info = function(self, t) return ([[Leaps toward a target within range. - Only usable while frenzied.]]) + Only usable while frenzied.]]):tformat() end, } @@ -116,7 +116,7 @@ newTalent{ points = 5, cooldown = 3, stamina = 8, - message = "@Source@ tries to bite @Target@ with razor sharp teeth!", + message = _t"@Source@ tries to bite @Target@ with razor sharp teeth!", requires_target = true, is_melee = true, target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end, @@ -127,7 +127,7 @@ newTalent{ getPower = function(self, t) return self:combatLimit(self:combatTalentStatDamage(t, "con", 10, 50), 1, 0, 0, 0.357, 35.7) end, getDuration = function(self, t) return math.floor(self:combatTalentScale(t, 3, 7)) end, do_devourer_frenzy = function(self, target, t) - game.logSeen(self, "The scent of blood sends the %ss into a frenzy!", self.name:capitalize()) + game.logSeen(self, "The scent of blood sends the %ss into a frenzy!", self:getName():capitalize()) -- frenzy devourerers local tg = {type="ball", range=0, radius=3, selffire=true, talent=t} self:project(tg, target.x, target.y, function(px, py) @@ -161,7 +161,7 @@ newTalent{ target:setEffect(target.EFF_CUT, 5, {power=t.getBleedDamage(self, t), src=self, apply_power=self:combatPhysicalpower()}) t.do_devourer_frenzy(self, target, t) else - game.logSeen(target, "%s resists the cut!", target.name:capitalize()) + game.logSeen(target, "%s resists the cut!", target:getName():capitalize()) end return true @@ -173,7 +173,7 @@ newTalent{ return ([[Bites the target for %d%% weapon damage, potentially causing it to bleed for %d%% weapon damage over five turns. If the target is affected by the bleed it will send the devourer into a frenzy for %d turns (which in turn will frenzy other nearby devourers). The frenzy will increase global speed by %d%%, physical crit chance by %d%%, and prevent death until -%d%% life.]]): - format(damage, bleed, t.getDuration(self, t), power, power, power) + tformat(damage, bleed, t.getDuration(self, t), power, power, power) end, } @@ -221,7 +221,7 @@ newTalent{ local light_reduction = t.getLiteReduction(self, t) local darkness_resistance = t.getDarknessPower(self, t) return ([[Creates a shroud of darkness over a radius 3 area that lasts %d turns. The shroud causes %0.2f darkness damage each turn, reduces light radius by %d, and darkness resistance by %d%% of those within.]]): - format(duration, damDesc(self, DamageType.DARKNESS, (damage)), light_reduction, darkness_resistance) + tformat(duration, damDesc(self, DamageType.DARKNESS, (damage)), light_reduction, darkness_resistance) end, } -- Temporal Stalker Powers @@ -231,7 +231,7 @@ newTalent{ name = "Echoes From The Void", type = {"other/horror", 1}, points = 5, - message = "@Source@ shows @Target@ the madness of the void.", + message = _t"@Source@ shows @Target@ the madness of the void.", cooldown = 10, range = 10, requires_target = true, @@ -253,7 +253,7 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) return ([[Shows the target the madness of the void. Each turn for 6 turns the target must make a mental save or suffer %0.2f mind damage as well as resource damage (based off the mind damage and nature of the resource).]]): - format(damDesc(self, DamageType.MIND, (damage))) + tformat(damDesc(self, DamageType.MIND, (damage))) end, } @@ -261,7 +261,7 @@ newTalent{ name = "Void Shards", type = {"other/horror", 1}, points = 5, - message = "@Source@ summons void shards.", + message = _t"@Source@ summons void shards.", cooldown = 20, range = 10, radius = 5, -- used by the the AI as additional range to the target @@ -298,8 +298,8 @@ newTalent{ local m = NPC.new{ type = "horror", subtype = "temporal", display = "h", color=colors.GREY, image = "npc/horror_temporal_void_horror.png", - name = "void shard", faction = self.faction, - desc = [[It looks like a small hole in the fabric of spacetime.]], + name = _t"void shard", faction = self.faction, + desc = _t[[It looks like a small hole in the fabric of spacetime.]], stats = { str=22, dex=20, wil=15, con=15 }, --level_range = {self.level, self.level}, @@ -345,7 +345,7 @@ newTalent{ local damage = t.getDamage(self, t) local explosion = t.getExplosion(self, t) return ([[Summons %d void shards. The void shards come into being destabilized and will suffer %0.2f temporal damage each turn for five turns. If they die while destabilized they'll explode for %0.2f temporal and %0.2f physical damage in a radius of 4.]]): - format(number, damDesc(self, DamageType.TEMPORAL, (damage)), damDesc(self, DamageType.TEMPORAL, (explosion/2)), damDesc(self, DamageType.PHYSICAL, (explosion/2))) + tformat(number, damDesc(self, DamageType.TEMPORAL, (damage)), damDesc(self, DamageType.TEMPORAL, (explosion/2)), damDesc(self, DamageType.PHYSICAL, (explosion/2))) end, } ------------------------------------------- @@ -392,7 +392,7 @@ newTalent{ local damage = t.getDamage(self, t) local duration = t.getDuration(self, t) return ([[Summon a storm of swirling blades to slice your foes, inflicting %d physical damage and bleeding to anyone who approaches for %d turns. - The damage and duration will increase with your Mindpower.]]):format(damDesc(self, DamageType.PHYSICAL, damage), duration) + The damage and duration will increase with your Mindpower.]]):tformat(damDesc(self, DamageType.PHYSICAL, damage), duration) end, } @@ -422,14 +422,14 @@ newTalent{ local ox, oy = target.x, target.y target:pull(self.x, self.y, 2) self:project({type="hit", range=10, friendlyfire=false, talent=t}, target.x, target.y, engine.DamageType.PHYSICAL, self:mindCrit(self:combatTalentMindDamage(t, 20, 120))) - if target.x ~= ox or target.y ~= oy then game.logSeen(target, "%s is pulled in!", target.name:capitalize()) end + if target.x ~= ox or target.y ~= oy then game.logSeen(target, "%s is pulled in!", target:getName():capitalize()) end end end) return true end, info = function(self, t) return ([[Pull all foes toward you in radius 5 while dealing %d physical damage. -The damage will increase with your mindpower.]]):format(damDesc(self, DamageType.PHYSICAL, self:combatTalentMindDamage(t, 20, 120))) +The damage will increase with your mindpower.]]):tformat(damDesc(self, DamageType.PHYSICAL, self:combatTalentMindDamage(t, 20, 120))) end, } @@ -457,7 +457,7 @@ newTalent{ end, info = function(self, t) return ([[Launches a knife with intense power doing %0.2f physical damage to all targets in line. - The damage will increase with Mindpower]]):format(damDesc(self, DamageType.PHYSICAL, self:combatTalentMindDamage(t, 20, 200))) + The damage will increase with Mindpower]]):tformat(damDesc(self, DamageType.PHYSICAL, self:combatTalentMindDamage(t, 20, 200))) end, } @@ -504,7 +504,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[A wall of slime oozes out from the caster with radius 1, increasing once every two turns to a maximum eventual radius of %d, doing %0.2f slime damage for %d turns. The damage and duration will increase with your Mindpower.]]): - format(radius, damDesc(self, DamageType.NATURE, damage), duration) + tformat(radius, damDesc(self, DamageType.NATURE, damage), duration) end, } @@ -539,7 +539,7 @@ newTalent{ end end) else - game.logSeen(target, "%s resists the grab!", target.name:capitalize()) + game.logSeen(target, "%s resists the grab!", target:getName():capitalize()) end game:playSoundNear(self, "talents/slime") @@ -551,7 +551,7 @@ newTalent{ return ([[Grab a target and drag it to your side, holding it in place and silencing non-undead and creatures that need to breathe for %d turns. The grab will also deal %0.2f slime damage per turn. The damage will increase with your Mindpower.]]): - format(duration, damDesc(self, DamageType.SLIME, damage)) + tformat(duration, damDesc(self, DamageType.SLIME, damage)) end, } @@ -578,7 +578,7 @@ newTalent{ end, info = function(self, t) return ([[Spit slime at your target doing %0.2f nature damage and slowing it down by 30%% for 3 turns. - The damage will increase with the Dexterity stat]]):format(damDesc(self, DamageType.NATURE, self:combatTalentStatDamage(t, "dex", 30, 290))) + The damage will increase with the Dexterity stat]]):tformat(damDesc(self, DamageType.NATURE, self:combatTalentStatDamage(t, "dex", 30, 290))) end, } @@ -616,7 +616,7 @@ newTalent{ info = function(self, t) local range = self:getTalentRange(t) local radius = self:getTalentRadius(t) - return ([[You extend slimy roots into the ground, follow them, and re-appear somewhere else in a range of %d with error margin of %d.]]):format(range, radius) + return ([[You extend slimy roots into the ground, follow them, and re-appear somewhere else in a range of %d with error margin of %d.]]):tformat(range, radius) end, } @@ -668,7 +668,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Open a hole in space, summoning an animated blade for 10 turns.]]) + return ([[Open a hole in space, summoning an animated blade for 10 turns.]]):tformat() end, } @@ -701,14 +701,14 @@ newTalent{ info = function(self, t) local radius = self:getTalentRadius(t) return ([[Blast a wave of water all around you with a radius of %d, making all creatures Wet for 10 turns. - The damage will increase with your Spellpower.]]):format(radius) + The damage will increase with your Spellpower.]]):tformat(radius) end, } newTalent{ name = "Blood Suckers", type = {"wild-gift/other", 1}, - message = "@Source@ tries to latch on and suck blood!", + message = _t"@Source@ tries to latch on and suck blood!", points = 5, cooldown = 2, tactical = { ATTACK = { weapon = 2 } }, @@ -733,6 +733,6 @@ newTalent{ return ([[Latch on to the target and suck their blood, doing %0.2f physical and %0.2f acid damage per turn. After 5 turns of drinking, drop off and gain the ability to Multiply. Damage scales with your level. - ]]):format(Pdam, Fdam) + ]]):tformat(Pdam, Fdam) end, } diff --git a/game/modules/tome/data/talents/misc/inscriptions.lua b/game/modules/tome/data/talents/misc/inscriptions.lua index acfd4d7ca81589b1ca9e45d11edb32cfcd42c731..e98665b060926556a411f2a9c3dd7f3910622600 100644 --- a/game/modules/tome/data/talents/misc/inscriptions.lua +++ b/game/modules/tome/data/talents/misc/inscriptions.lua @@ -37,7 +37,7 @@ newInscription = function(t) elseif tt.type[1] == "inscriptions/runes" then tt.auto_use_check = function(self, t) return not self:hasEffect(self.EFF_RUNE_COOLDOWN) end elseif tt.type[1] == "inscriptions/taints" then tt.auto_use_check = function(self, t) return not self:hasEffect(self.EFF_TAINT_COOLDOWN) end end - tt.auto_use_warning = "- will only auto use when no saturation effect exists" + tt.auto_use_warning = _t"- will only auto use when no saturation effect exists" tt.cooldown = function(self, t) local data = self:getInscriptionData(t.short_name) return data.cooldown @@ -47,7 +47,7 @@ newInscription = function(t) local ret = t.old_info(self, t) local data = self:getInscriptionData(t.short_name) if data.use_stat and data.use_stat_mod then - ret = ret..("\nIts effects scale with your %s stat."):format(self.stats_def[data.use_stat].name) + ret = ret..("\nIts effects scale with your %s stat."):tformat(self.stats_def[data.use_stat].name) end return ret end @@ -77,11 +77,11 @@ newInscription{ end, info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[Activate the infusion to heal yourself for %d life over %d turns.]]):format(data.heal + data.inc_stat, data.dur) + return ([[Activate the infusion to heal yourself for %d life over %d turns.]]):tformat(data.heal + data.inc_stat, data.dur) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[heal %d; %d cd]]):format(data.heal + data.inc_stat, data.cooldown) + return ([[heal %d; %d cd]]):tformat(data.heal + data.inc_stat, data.cooldown) end, } @@ -125,11 +125,11 @@ newInscription{ end, info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[Activate the infusion to instantly heal yourself for %d then cleanse 1 wound, poison, and disease effect.]]):format(data.heal + data.inc_stat) + return ([[Activate the infusion to instantly heal yourself for %d then cleanse 1 wound, poison, and disease effect.]]):tformat(data.heal + data.inc_stat) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[heal %d; cd %d]]):format(data.heal + data.inc_stat, data.cooldown) + return ([[heal %d; cd %d]]):tformat(data.heal + data.inc_stat, data.cooldown) end, } @@ -159,22 +159,22 @@ newInscription{ end if removed > 0 then - game.logSeen(self, "%s is cured!", self.name:capitalize()) + game.logSeen(self, "%s is cured!", self:getName():capitalize()) end self:setEffect(self.EFF_PAIN_SUPPRESSION, data.dur, {power=data.power + data.inc_stat}) return true end, info = function(self, t) local data = self:getInscriptionData(t.short_name) - local what = table.concatNice(table.keys(data.what), ", ", " and ") + local what = table.concatNice(table.ts(table.keys(data.what)), ", ", _t" and ") return ([[Activate the infusion to cure yourself of one random %s effect and reduce all damage taken by %d%% for %d turns. -Also removes cross-tier effects of the affected types for free.]]):format(what, data.power+data.inc_stat, data.dur) +Also removes cross-tier effects of the affected types for free.]]):tformat(what, data.power+data.inc_stat, data.dur) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - local what = table.concat(table.keys(data.what), ", ") - return ([[res %d%%; %s; dur %d; cd %d]]):format(data.power + data.inc_stat, what, data.dur, data.cooldown) + local what = table.concat(table.ts(table.keys(data.what)), ", ") + return ([[res %d%%; %s; dur %d; cd %d]]):tformat(data.power + data.inc_stat, what, data.dur, data.cooldown) end, } @@ -192,11 +192,11 @@ newInscription{ info = function(self, t) local data = self:getInscriptionData(t.short_name) return ([[Activate the infusion to heal for %d%% of all damage taken (calculated before resistances) and reduce the duration of a random debuff by %d each turn for %d turns.]]): - format(data.power+data.inc_stat*10, math.floor((data.reduce or 0) + data.inc_stat * 2), data.dur) + tformat(data.power+data.inc_stat*10, math.floor((data.reduce or 0) + data.inc_stat * 2), data.dur) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[affinity %d%%; reduction %d; dur %d; cd %d]]):format(data.power + data.inc_stat*10, math.floor((data.reduce or 0) + data.inc_stat * 2), data.dur, data.cooldown ) + return ([[affinity %d%%; reduction %d; dur %d; cd %d]]):tformat(data.power + data.inc_stat*10, math.floor((data.reduce or 0) + data.inc_stat * 2), data.dur, data.cooldown ) end, } @@ -217,11 +217,11 @@ newInscription{ return ([[Activate the infusion to increase movement speed by %d%% for 1 game turn. You gain 100%% stun, daze, and pin immunity during the effect. Any actions other than movement will cancel the effect. - Note: since you will be moving very fast, game turns will pass very slowly.]]):format(data.speed + data.inc_stat) + Note: since you will be moving very fast, game turns will pass very slowly.]]):tformat(data.speed + data.inc_stat) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[speed %d%%; cd %d]]):format(data.speed + data.inc_stat, data.cooldown) + return ([[speed %d%%; cd %d]]):tformat(data.speed + data.inc_stat, data.cooldown) end, } @@ -245,11 +245,11 @@ newInscription{ return ([[Activate the infusion to endure even the most grievous of wounds for %d turns. While Heroism is active, you will only die when reaching -%d life. The duration and life will increase by 1%% for every 1%% life you have lost (currently %d life, %d duration) - If your life is below 0 when this effect wears off it will be set to 1.]]):format(data.dur, data.die_at + data.inc_stat * 30, bonus1, bonus2) + If your life is below 0 when this effect wears off it will be set to 1.]]):tformat(data.dur, data.die_at + data.inc_stat * 30, bonus1, bonus2) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[die at -%d; dur %d; cd %d]]):format(data.die_at + data.inc_stat * 30, data.dur, data.cooldown) + return ([[die at -%d; dur %d; cd %d]]):tformat(data.die_at + data.inc_stat * 30, data.dur, data.cooldown) end, } @@ -282,11 +282,11 @@ newInscription{ local damage = t.getDamage(self, t) return ([[Causes thick vines to spring from the ground and entangle all targets within %d squares for %d turns, pinning them in place for 5 turns and dealing %0.2f physical damage and %0.2f nature damage. The vines also grow all around you, increasing your armour by %d and armour hardiness by %d.]]): - format(self:getTalentRadius(t), data.dur, damDesc(self, DamageType.PHYSICAL, damage)/3, damDesc(self, DamageType.NATURE, 2*damage)/3, data.armor or 50, data.hard or 30) + tformat(self:getTalentRadius(t), data.dur, damDesc(self, DamageType.PHYSICAL, damage)/3, damDesc(self, DamageType.NATURE, 2*damage)/3, data.armor or 50, data.hard or 30) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[rad %d; dur %d;]]):format(self:getTalentRadius(t), data.dur) + return ([[rad %d; dur %d;]]):tformat(self:getTalentRadius(t), data.dur) end, } @@ -319,11 +319,11 @@ newInscription{ end, info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[Activate the rune to teleport randomly in a range of %d with a minimum range of 15.]]):format(data.range + data.inc_stat) + return ([[Activate the rune to teleport randomly in a range of %d with a minimum range of 15.]]):tformat(data.range + data.inc_stat) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[range %d; cd %d]]):format(data.range + data.inc_stat, data.cooldown) + return ([[range %d; cd %d]]):tformat(data.range + data.inc_stat, data.cooldown) end, } @@ -345,11 +345,11 @@ newInscription{ end, info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[Activate the rune to create a protective shield absorbing at most %d damage for %d turns.]]):format((data.power + data.inc_stat) * (100 + (self:attr("shield_factor") or 0)) / 100, data.dur) + return ([[Activate the rune to create a protective shield absorbing at most %d damage for %d turns.]]):tformat((data.power + data.inc_stat) * (100 + (self:attr("shield_factor") or 0)) / 100, data.dur) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[absorb %d; dur %d; cd %d]]):format((data.power + data.inc_stat) * (100 + (self:attr("shield_factor") or 0)) / 100, data.dur, data.cooldown) + return ([[absorb %d; dur %d; cd %d]]):tformat((data.power + data.inc_stat) * (100 + (self:attr("shield_factor") or 0)) / 100, data.dur, data.cooldown) end, } @@ -375,13 +375,13 @@ newInscription{ local data = self:getInscriptionData(t.short_name) local power = 100+5*self:getMag() if data.power and data.inc_stat then power = data.power + data.inc_stat end - return ([[Activate the rune to create a protective shield absorbing and reflecting at most %d damage for %d turns.]]):format(power, data.dur or 5) + return ([[Activate the rune to create a protective shield absorbing and reflecting at most %d damage for %d turns.]]):tformat(power, data.dur or 5) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) local power = 100+5*self:getMag() if data.power and data.inc_stat then power = data.power + data.inc_stat end - return ([[absorb and reflect %d; dur %d; cd %d]]):format(power, data.dur or 5, data.cd) + return ([[absorb and reflect %d; dur %d; cd %d]]):tformat(power, data.dur or 5, data.cd) end, } @@ -425,11 +425,11 @@ newInscription{ return ([[Activate the rune to direct a cone of chilling stormwind doing %0.2f cold damage. The storm will soak enemies hit reducing their resistance to stuns by 50%% then attempt to freeze them for %d turns. These effects can be resisted but not saved against.]]): - format(damDesc(self, DamageType.COLD, data.power + data.inc_stat), data.dur) + tformat(damDesc(self, DamageType.COLD, data.power + data.inc_stat), data.dur) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[damage %d; dur %d; cd %d]]):format(damDesc(self, DamageType.COLD, data.power + data.inc_stat), data.dur, data.cooldown) + return ([[damage %d; dur %d; cd %d]]):tformat(damDesc(self, DamageType.COLD, data.power + data.inc_stat), data.dur, data.cooldown) end, } @@ -477,12 +477,12 @@ newInscription{ return ([[Activate the rune to unleash a cone dealing %0.2f acid damage. The corrosive acid will also disarm enemies struck for %d turns. This effect can be resisted but not saved against.]]): - format(damDesc(self, DamageType.ACID, data.power + data.inc_stat), data.dur or 3) + tformat(damDesc(self, DamageType.ACID, data.power + data.inc_stat), data.dur or 3) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) local pow = data.power - return ([[damage %d; dur %d; cd %d]]):format(damDesc(self, DamageType.ACID, data.power + data.inc_stat), data.dur or 3, data.cooldown) + return ([[damage %d; dur %d; cd %d]]):tformat(damDesc(self, DamageType.ACID, data.power + data.inc_stat), data.dur or 3, data.cooldown) end, } @@ -523,11 +523,11 @@ newInscription{ local data = self:getInscriptionData(t.short_name) local total = (data.mana + data.inc_stat) / 100 * (self.mana_regen or 0) * 10 return ([[Activate the rune to unleash a manasurge upon yourself, increasing mana regeneration by %d%% for %d turns (%d total) and instantly restoring %d mana. - Also when resting your mana will regenerate at 0.5 per turn.]]):format(data.mana + data.inc_stat, data.dur, total, (data.mana + data.inc_stat) / 20) + Also when resting your mana will regenerate at 0.5 per turn.]]):tformat(data.mana + data.inc_stat, data.dur, total, (data.mana + data.inc_stat) / 20) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[regen %d%% over %d turns; mana %d; cd %d]]):format(data.mana + data.inc_stat, data.dur, (data.mana + data.inc_stat) / 20, data.cooldown) + return ([[regen %d%% over %d turns; mana %d; cd %d]]):tformat(data.mana + data.inc_stat, data.dur, (data.mana + data.inc_stat) / 20, data.cooldown) end, } @@ -556,12 +556,12 @@ newInscription{ if not target then return end if target:attr("timetravel_immune") then - game.logSeen(target, "%s is immune!", target.name:capitalize()) + game.logSeen(target, "%s is immune!", target:getName():capitalize()) return true end local hit = self:checkHit(self:combatSpellpower(), target:combatSpellResist() + (target:attr("continuum_destabilization") or 0)) - if not hit then game.logSeen(target, "%s resists!", target.name:capitalize()) return true end + if not hit then game.logSeen(target, "%s resists!", target:getName():capitalize()) return true end self:project(tg, x, y, DamageType.TEMPORAL, self:spellCrit(t.getDamage(self, t))) game.level.map:particleEmitter(x, y, 1, "temporal_thrust") @@ -575,7 +575,7 @@ newInscription{ if (oe and oe:attr("temporary")) or game.level.map:checkEntity(x, y, Map.TERRAIN, "block_move") then game.logPlayer(self, "Something has prevented the timetravel.") return true end local e = mod.class.Object.new{ old_feat = oe, type = "temporal", subtype = "instability", - name = "temporal instability", + name = _t"temporal instability", display = '&', color=colors.LIGHT_BLUE, temporary = t.getDuration(self, t), canAct = false, @@ -607,7 +607,7 @@ newInscription{ } -- Remove the target - game.logSeen(target, "%s has moved forward in time!", target.name:capitalize()) + game.logSeen(target, "%s has moved forward in time!", target:getName():capitalize()) game.level:removeEntity(target, true) -- add the time skip object to the map @@ -624,10 +624,10 @@ newInscription{ local duration = t.getDuration(self, t) return ([[Inflicts %0.2f temporal damage. If your target survives, it will be sent %d turns into the future. It will also lower your paradox by 25 (if you have any). - Note that messing with the spacetime continuum may have unforeseen consequences.]]):format(damDesc(self, DamageType.TEMPORAL, damage), duration) + Note that messing with the spacetime continuum may have unforeseen consequences.]]):tformat(damDesc(self, DamageType.TEMPORAL, damage), duration) end, short_info = function(self, t) - return ("%0.2f temporal damage, removed from time %d turns"):format(t.getDamage(self, t), t.getDuration(self, t)) + return ("%0.2f temporal damage, removed from time %d turns"):tformat(t.getDamage(self, t), t.getDuration(self, t)) end, } @@ -673,12 +673,12 @@ newInscription{ local data = self:getInscriptionData(t.short_name) local power = data.power + data.inc_stat * 3 return ([[Activate the rune to teleport up to %d spaces within line of sight. Afterwards you stay out of phase for %d turns. In this state all new negative status effects duration is reduced by %d%%, your defense is increased by %d and all your resistances by %d%%.]]): - format(data.range + data.inc_stat, t.getDur(self, t), power, power, power) + tformat(data.range + data.inc_stat, t.getDur(self, t), power, power, power) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) local power = data.power + data.inc_stat * 3 - return ([[range %d; phase %d; cd %d]]):format(self:getTalentRange(t), power, data.cooldown ) + return ([[range %d; phase %d; cd %d]]):tformat(self:getTalentRange(t), power, data.cooldown ) end, } @@ -717,11 +717,11 @@ newInscription{ local data = self:getInscriptionData(t.short_name) return ([[Activate the rune to become ethereal for %d turns. While ethereal all damage you deal is reduced by %d%%, you gain %d%% all resistance, you move %d%% faster, and you are invisible (power %d).]]): - format(t.getDur(self, t),t.getReduction(self, t) * 100, t.getResistance(self, t), t.getMove(self, t), t.getPower(self, t)) + tformat(t.getDur(self, t),t.getReduction(self, t) * 100, t.getResistance(self, t), t.getMove(self, t), t.getPower(self, t)) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[power %d; resist %d%%; move %d%%; dur %d; cd %d]]):format(t.getPower(self, t), t.getResistance(self, t), t.getMove(self, t), t.getDur(self, t), data.cooldown) + return ([[power %d; resist %d%%; move %d%%; dur %d; cd %d]]):tformat(t.getPower(self, t), t.getResistance(self, t), t.getMove(self, t), t.getDur(self, t), data.cooldown) end, } @@ -756,11 +756,11 @@ newInscription{ local data = self:getInscriptionData(t.short_name) return ([[Activate the rune to summon a protective storm around you for %d turns. While active the storm will completely block all damage over %d up to %d times.]]) - :format(t.getDur(self, t), t.getThreshold(self, t), t.getBlocks(self, t) ) + :tformat(t.getDur(self, t), t.getThreshold(self, t), t.getBlocks(self, t) ) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[threshold %d; blocks %d; dur %d; cd %d]]):format(t.getThreshold(self, t), t.getBlocks(self, t), t.getDur(self, t), data.cooldown ) + return ([[threshold %d; blocks %d; dur %d; cd %d]]):tformat(t.getThreshold(self, t), t.getBlocks(self, t), t.getDur(self, t), data.cooldown ) end, } @@ -786,16 +786,16 @@ newInscription{ local data = self:getInscriptionData(t.short_name) local str = "" for k,v in pairs(data.wards) do - str = str .. ", " .. v .. " " .. k:lower() + str = str .. ", " .. v .. " " .. _t(k:lower()) end str = string.sub(str, 2) return ([[Activate the rune to create a shield for %d turns blocking several instances of damage of the following types:%s]]) -- color me - :format(t.getDur(self, t), str) + :tformat(t.getDur(self, t), str) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - local str = table.concat(table.keys(data.wards), ", ") - return ([[%d turns; %s]]):format(t.getDur(self, t), str:lower() ) + local str = table.concat(table.ts(table.lower(table.keys(data.wards))), ", ") + return ([[%d turns; %s]]):tformat(t.getDur(self, t), str:lower() ) end, } @@ -844,10 +844,10 @@ newInscription{ local NPC = require "mod.class.NPC" local caster = self local image = NPC.new{ - name = "Mirror Image", + name = _t"Mirror Image", type = "image", subtype = "image", ai = "summoned", ai_real = nil, ai_state = { talent_in=1, }, ai_target = {actor=nil}, - desc = "A blurred image.", + desc = _t"A blurred image.", image = caster.image, add_mos = caster.add_mos, -- this is horribly wrong isn't it? seems to work though shader = "shadow_simulacrum", shader_args = { color = {0.0, 0.4, 0.8}, base = 0.6, time_factor = 1500 }, @@ -882,7 +882,7 @@ newInscription{ game.party:addMember(image, { control=false, type="summon", - title="Summon", + title=_t"Summon", temporary_level = true, orders = {}, }) @@ -898,11 +898,11 @@ newInscription{ return ([[Activate the rune to create up to 3 images of yourself that taunt nearby enemies each turn and immediately after being summoned. Only one image can be created per enemy in radius 10 with the first being created near the closest enemy. Images inherit all of your life, resistance, armor, defense, and armor hardiness.]]) - :format(t.getInheritance(self, t)*100 ) + :tformat(t.getInheritance(self, t)*100 ) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[dur %d; cd %d]]):format(t.getDur(self, t), data.cooldown) + return ([[dur %d; cd %d]]):tformat(t.getDur(self, t), data.cooldown) end } @@ -957,11 +957,11 @@ newInscription{ return ([[Activate the rune to instantly dissipate the energy of your ailments, cleansing all cross tier effects and 1 physical, mental, and magical effect. You use the dissipated energy to create a shield lasting 3 turns and blocking %d damage per debuff cleansed (not counting cross-tier ones). If there were only cross-tier effects to cleanse, no shield is created and the rune goes on a 75%% reduced cooldown.]]) - :format(t.getShield(self, t) * (100 + (self:attr("shield_factor") or 0)) / 100) + :tformat(t.getShield(self, t) * (100 + (self:attr("shield_factor") or 0)) / 100) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[absorb %d; cd %d]]):format(t.getShield(self, t) * (100 + (self:attr("shield_factor") or 0)) / 100, data.cooldown) + return ([[absorb %d; cd %d]]):tformat(t.getShield(self, t) * (100 + (self:attr("shield_factor") or 0)) / 100, data.cooldown) end, } @@ -1009,11 +1009,11 @@ newInscription{ info = function(self, t) local data = self:getInscriptionData(t.short_name) return ([[Activate the rune to remove 8 beneficial magical sustains from an enemy target or all magical debuffs from you.]]): - format() + tformat() end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[ ]]):format() + return ([[ ]]):tformat() end, } @@ -1102,11 +1102,11 @@ newInscription{ end, info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[Activate the taint on a foe, removing up to %d magical or physical effects or sustains from it and healing you for %d for each effect.]]):format(data.effects, data.heal + data.inc_stat) + return ([[Activate the taint on a foe, removing up to %d magical or physical effects or sustains from it and healing you for %d for each effect.]]):tformat(data.effects, data.heal + data.inc_stat) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[%d effects / %d heal]]):format(data.effects, data.heal + data.inc_stat) + return ([[%d effects / %d heal]]):tformat(data.effects, data.heal + data.inc_stat) end, } @@ -1131,10 +1131,10 @@ newInscription{ local data = self:getInscriptionData(t.short_name) return ([[Activate the taint to purge your body of physical afflictions for %d turns. Each turn the purge will attempt to cleanse 1 physical debuff from you, and if one is removed, increase its duration by 1.]]) - :format(t.getDur(self, t) ) + :tformat(t.getDur(self, t) ) end, short_info = function(self, t) - return ([[%d turns]]):format(t.getDur(self, t) ) + return ([[%d turns]]):tformat(t.getDur(self, t) ) end, } @@ -1171,12 +1171,12 @@ newInscription{ local apply = self:rescaleCombatStats((data.power + data.inc_stat)) return ([[Activate the infusion to brighten the area in a radius of %d and illuminate stealthy creatures, possibly revealing them (reduces stealth power by %d).%s It will also blind any creatures caught inside (power %d) for %d turns.]]): - format(data.range, apply/2, apply >= 19 and "\nThe light is so powerful it will also banish magical darkness" or "", apply, data.turns) + tformat(data.range, apply/2, apply >= 19 and _t"\nThe light is so powerful it will also banish magical darkness" or "", apply, data.turns) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) local apply = self:rescaleCombatStats((data.power + data.inc_stat)) - return ([[rad %d; power %d; turns %d%s]]):format(data.range, apply, data.turns, apply >= 19 and "; dispels darkness" or "") + return ([[rad %d; power %d; turns %d%s]]):tformat(data.range, apply, data.turns, apply >= 19 and _t"; dispels darkness" or "") end, } @@ -1199,11 +1199,11 @@ newInscription{ end, info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[Strip the protective barriers from your mind for %d turns, allowing in the thoughts all creatures within %d squares but reducing mind save by %d and increasing your mindpower by %d for 10 turns.]]):format(data.dur, self:getTalentRange(t), 10, 35) + return ([[Strip the protective barriers from your mind for %d turns, allowing in the thoughts all creatures within %d squares but reducing mind save by %d and increasing your mindpower by %d for 10 turns.]]):tformat(data.dur, self:getTalentRange(t), 10, 35) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[Range %d telepathy for %d turns]]):format(self:getTalentRange(t), data.dur) + return ([[Range %d telepathy for %d turns]]):tformat(self:getTalentRange(t), data.dur) end, } @@ -1245,11 +1245,11 @@ newInscription{ info = function(self, t) local data = self:getInscriptionData(t.short_name) return ([[Activate the rune to fire a bolt of ice, doing %0.2f cold damage with a chance to freeze the target. - The deep cold also crystalizes your mind, removing one random detrimental mental effect from you.]]):format(damDesc(self, DamageType.COLD, data.power + data.inc_stat)) + The deep cold also crystalizes your mind, removing one random detrimental mental effect from you.]]):tformat(damDesc(self, DamageType.COLD, data.power + data.inc_stat)) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[%d cold damage]]):format(damDesc(self, DamageType.COLD, data.power + data.inc_stat)) + return ([[%d cold damage]]):tformat(damDesc(self, DamageType.COLD, data.power + data.inc_stat)) end, } @@ -1294,11 +1294,11 @@ newInscription{ info = function(self, t) local data = self:getInscriptionData(t.short_name) return ([[Activate the rune to fire a beam of heat, doing %0.2f fire damage over 5 turns - The intensity of the heat will also remove one random detrimental physical effect from you.]]):format(damDesc(self, DamageType.FIRE, data.power + data.inc_stat)) + The intensity of the heat will also remove one random detrimental physical effect from you.]]):tformat(damDesc(self, DamageType.FIRE, data.power + data.inc_stat)) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[%d fire damage]]):format(damDesc(self, DamageType.FIRE, data.power + data.inc_stat)) + return ([[%d fire damage]]):tformat(damDesc(self, DamageType.FIRE, data.power + data.inc_stat)) end, } @@ -1316,11 +1316,11 @@ newInscription{ end, info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[Activate the rune to increase your global speed by %d%% for %d turns.]]):format(data.power + data.inc_stat, data.dur) + return ([[Activate the rune to increase your global speed by %d%% for %d turns.]]):tformat(data.power + data.inc_stat, data.dur) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[speed %d%% for %d turns]]):format(data.power + data.inc_stat, data.dur) + return ([[speed %d%% for %d turns]]):tformat(data.power + data.inc_stat, data.dur) end, } @@ -1349,11 +1349,11 @@ newInscription{ local data = self:getInscriptionData(t.short_name) return ([[Activate the rune to get a vision of the area surrounding you (%d radius) and to allow you to see invisible and stealthed creatures (power %d) for %d turns. Your mind will become more receptive for %d turns, allowing you to sense any %s around.]]): - format(data.range, data.power + data.inc_stat, data.dur, data.dur, data.esp or "humanoid") + tformat(data.range, data.power + data.inc_stat, data.dur, data.dur, data.esp or "humanoid") end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[radius %d; dur %d; see %s]]):format(data.range, data.dur, data.esp or "humanoid") + return ([[radius %d; dur %d; see %s]]):tformat(data.range, data.dur, data.esp or "humanoid") end, } @@ -1381,12 +1381,12 @@ newInscription{ local power = (data.power or data.range) + data.inc_stat * 3 return ([[Activate the rune to teleport randomly in a range of %d. Afterwards you stay out of phase for %d turns. In this state all new negative status effects duration is reduced by %d%%, your defense is increased by %d and all your resistances by %d%%.]]): - format(data.range + data.inc_stat, data.dur or 3, power, power, power) + tformat(data.range + data.inc_stat, data.dur or 3, power, power, power) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) local power = (data.power or data.range) + data.inc_stat * 3 - return ([[range %d; power %d; dur %d]]):format(data.range + data.inc_stat, power, data.dur or 3) + return ([[range %d; power %d; dur %d]]):tformat(data.range + data.inc_stat, power, data.dur or 3) end, } @@ -1426,11 +1426,11 @@ newInscription{ end, info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[Activate the rune to teleport in a range of %d.]]):format(data.range + data.inc_stat) + return ([[Activate the rune to teleport in a range of %d.]]):tformat(data.range + data.inc_stat) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[range %d]]):format(data.range + data.inc_stat) + return ([[range %d]]):tformat(data.range + data.inc_stat) end, } @@ -1470,11 +1470,11 @@ newInscription{ local dam = damDesc(self, DamageType.LIGHTNING, data.power + data.inc_stat) return ([[Activate the rune to fire a beam of lightning, doing %0.2f to %0.2f lightning damage. Also transform you into pure lightning for %d turns; any damage will teleport you to an adjacent tile and ignore the damage (can only happen once per turn)]]): - format(dam / 3, dam, 2) + tformat(dam / 3, dam, 2) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[%d lightning damage]]):format(damDesc(self, DamageType.LIGHTNING, data.power + data.inc_stat)) + return ([[%d lightning damage]]):tformat(damDesc(self, DamageType.LIGHTNING, data.power + data.inc_stat)) end, } @@ -1509,11 +1509,11 @@ newInscription{ info = function(self, t) local data = self:getInscriptionData(t.short_name) return ([[Activate the infusion to spit a bolt of poison doing %0.2f nature damage per turn for 7 turns, and reducing the target's healing received by %d%%. - The sudden stream of natural forces also strips you of one random detrimental magical effect.]]):format(damDesc(self, DamageType.NATURE, data.power + data.inc_stat) / 7, data.heal_factor) + The sudden stream of natural forces also strips you of one random detrimental magical effect.]]):tformat(damDesc(self, DamageType.NATURE, data.power + data.inc_stat) / 7, data.heal_factor) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[%d nature damage, %d%% healing reduction]]):format(damDesc(self, DamageType.NATURE, data.power + data.inc_stat) / 7, data.heal_factor) + return ([[%d nature damage, %d%% healing reduction]]):tformat(damDesc(self, DamageType.NATURE, data.power + data.inc_stat) / 7, data.heal_factor) end, } @@ -1532,10 +1532,10 @@ newInscription{ local data = self:getInscriptionData(t.short_name) return ([[Activate the rune to become invisible (power %d) for %d turns. As you become invisible you fade out of phase with reality, all your damage is reduced by 40%%. - ]]):format(data.power + data.inc_stat, data.dur) + ]]):tformat(data.power + data.inc_stat, data.dur) end, short_info = function(self, t) local data = self:getInscriptionData(t.short_name) - return ([[power %d for %d turns]]):format(data.power + data.inc_stat, data.dur) + return ([[power %d for %d turns]]):tformat(data.power + data.inc_stat, data.dur) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/misc/misc.lua b/game/modules/tome/data/talents/misc/misc.lua index 53447a26827fec43636f38913a575603b0a46f04..2654d30841bce4b82920584d9b27965e466b7475 100644 --- a/game/modules/tome/data/talents/misc/misc.lua +++ b/game/modules/tome/data/talents/misc/misc.lua @@ -18,11 +18,11 @@ -- darkgod@te4.org -- race & classes -newTalentType{ type="base/class", name = "class", hide = true, description = "The basic talents defining a class." } -newTalentType{ type="base/race", name = "race", hide = true, description = "The various racial bonuses a character can have." } -newTalentType{ is_nature = true, type="inscriptions/infusions", name = "infusions", hide = true, description = "Infusions are not class abilities, you must find them or learn them from other people." } -newTalentType{ is_spell=true, no_silence=true, type="inscriptions/runes", name = "runes", hide = true, description = "Runes are not class abilities, you must find them or learn them from other people." } -newTalentType{ is_spell=true, no_silence=true, type="inscriptions/taints", name = "taints", hide = true, description = "Taints are not class abilities, you must find them or learn them from other people." } +newTalentType{ type="base/class", name = _t"class", hide = true, description = _t"The basic talents defining a class." } +newTalentType{ type="base/race", name = _t"race", hide = true, description = _t"The various racial bonuses a character can have." } +newTalentType{ is_nature = true, type="inscriptions/infusions", name = _t"infusions", hide = true, description = _t"Infusions are not class abilities, you must find them or learn them from other people." } +newTalentType{ is_spell=true, no_silence=true, type="inscriptions/runes", name = _t"runes", hide = true, description = _t"Runes are not class abilities, you must find them or learn them from other people." } +newTalentType{ is_spell=true, no_silence=true, type="inscriptions/taints", name = _t"taints", hide = true, description = _t"Taints are not class abilities, you must find them or learn them from other people." } -- Load other misc things load("/data/talents/misc/objects.lua") @@ -87,7 +87,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Hack and slash, baby!]]) + return ([[Hack and slash, baby!]]):tformat() end, } @@ -213,17 +213,17 @@ newTalent{ if target.level - 2 > self.level then -- level bonus hateGain = hateGain + math.ceil(self:combatTalentScale(target.level - 2 - self.level, 2, 10, "log", 0, 1)) - hateMessage = "#F53CBE#You have taken the life of an experienced foe!" + hatemessage = _t"#F53CBE#You have taken the life of an experienced foe!" end if target.rank >= 4 then -- boss bonus hateGain = hateGain * 4 - hateMessage = "#F53CBE#Your hate has conquered a great adversary!" + hatemessage = _t"#F53CBE#Your hate has conquered a great adversary!" elseif target.rank >= 3 then -- elite bonus hateGain = hateGain * 2 - hateMessage = "#F53CBE#An elite foe has fallen to your hate!" + hatemessage = _t"#F53CBE#An elite foe has fallen to your hate!" end hateGain = math.min(hateGain, 100) @@ -262,7 +262,7 @@ newTalent{ end, info = function(self, t) return ([[You are hunted!. There is a %d%% chance each turn that all foes in a %d radius get a glimpse of your position for 30 turns.]]): - format(math.min(100, 1 + self.level / 7), 10 + self.level / 5) + tformat(math.min(100, 1 + self.level / 7), 10 + self.level / 5) end, } @@ -295,7 +295,7 @@ newTalent{ self:setEffect(self.EFF_TELEPORT_ANGOLWEN, 40, {}) return true end, - info = [[Allows a mage to teleport to the secret town of Angolwen. + info = _t[[Allows a mage to teleport to the secret town of Angolwen. You have studied the magic arts there and have been granted a special portal spell to teleport there. Nobody must learn about this spell and so it should never be used while seen by any creatures. The spell will take time to activate. You must be out of sight of any creature when you cast it and when the teleportation takes effect.]] @@ -338,7 +338,7 @@ newTalent{ self:attr("time_travel_times", 1) return true end, - info = [[Allows a chronomancer to timeport to Point Zero. + info = _t[[Allows a chronomancer to timeport to Point Zero. You have studied the chronomancy there and have been granted a special portal spell to teleport back. This spell must be kept secret; it should never be used within view of uninitiated witnesses. The spell takes time (40 turns) to activate, and you must be out of sight of any other creature when you cast it and when the timeportation takes effect.]] @@ -371,7 +371,7 @@ newTalent{ local e = target.tempeffect_def[eff_id] if e.status == "detrimental" and self.save_for_effects[e.type] then local decrease = t.getReduction(self, t, e) - print(("%s: Reducing duration of %s, using %s, by %d"):format(t.name, e.desc, self.save_for_effects[e.type], decrease)) + print(("%s: Reducing duration of %s, using %s, by %d"):tformat(t.name, e.desc, self.save_for_effects[e.type], decrease)) p.dur = p.dur - decrease if p.dur <= 0 then todel[#todel+1] = eff_id end end @@ -385,13 +385,13 @@ newTalent{ info = function(self, t) local eff_desc = "" for e_type, fn in pairs(self.save_for_effects) do - eff_desc = eff_desc .. ("\n%s effect durations -%d turns"):format(e_type:capitalize(), t.getReduction(self, t, e_type)) + eff_desc = eff_desc .. ("\n%s effect durations -%d turns"):tformat(_t(e_type):capitalize(), t.getReduction(self, t, e_type)) end return ([[Not the Master himself, nor all the orcs in fallen Reknor, nor even the terrifying unknown beyond Reknor's portal could slow your pursuit of the Staff of Absorption. Children will hear of your relentlessness in song for years to come. When activated, this ability reduces the duration of all active detrimental effects by 20%% of your associated save value or 2, whichever is greater: %s]]): - format(eff_desc) + tformat(eff_desc) end, } @@ -412,7 +412,7 @@ newTalent{ end) return true end, - info = [[Use the onboard short-range teleport of the Fortress to beam down to the surface. + info = _t[[Use the onboard short-range teleport of the Fortress to beam down to the surface. Requires being in flight above the ground of a planet.]] } @@ -443,7 +443,7 @@ newTalent{ game:playSoundNear(self, "talents/arcane") return true end, - info = [[Use 10 Fortress energy to send a powerful blast to the ground, directly below the Fortress, heavily damaging any creatures caught inside. + info = _t[[Use 10 Fortress energy to send a powerful blast to the ground, directly below the Fortress, heavily damaging any creatures caught inside. Requires being in flight above the ground of a planet.]] } @@ -462,6 +462,6 @@ newTalent{ return true end, - info = [[Activate the powerful flight engines of the Fortress, propelling it fast into high planetary orbit. + info = _t[[Activate the powerful flight engines of the Fortress, propelling it fast into high planetary orbit. Requires being in flight above the ground of a planet.]] } diff --git a/game/modules/tome/data/talents/misc/npcs.lua b/game/modules/tome/data/talents/misc/npcs.lua index 06cf825e29c349e2787ed0aff4c7e854b73ee93c..5ea895a4e82c7f2f3d9b61e0607c09ec44ad9324 100644 --- a/game/modules/tome/data/talents/misc/npcs.lua +++ b/game/modules/tome/data/talents/misc/npcs.lua @@ -20,16 +20,16 @@ local Object = require "mod.class.Object" -- race & classes -newTalentType{ type="technique/other", name = "other", hide = true, description = "Talents of the various entities of the world." } -newTalentType{ no_silence=true, is_spell=true, type="chronomancy/other", name = "other", hide = true, description = "Talents of the various entities of the world." } -newTalentType{ no_silence=true, is_spell=true, type="spell/other", name = "other", hide = true, description = "Talents of the various entities of the world." } -newTalentType{ no_silence=true, is_spell=true, type="corruption/other", name = "other", hide = true, description = "Talents of the various entities of the world." } -newTalentType{ is_nature=true, type="wild-gift/other", name = "other", hide = true, description = "Talents of the various entities of the world." } -newTalentType{ type="psionic/other", name = "other", hide = true, description = "Talents of the various entities of the world." } -newTalentType{ type="other/other", name = "other", hide = true, description = "Talents of the various entities of the world." } -newTalentType{ type="undead/other", name = "other", hide = true, description = "Talents of the various entities of the world." } -newTalentType{ type="undead/keepsake", name = "keepsake shadow", generic = true, description = "Keepsake shadows's innate abilities." } -newTalentType{ is_mind=true, type="cursed/misc", name = "misc", description = "Talents of the various entities of the world." } +newTalentType{ type="technique/other", name = _t"other", hide = true, description = _t"Talents of the various entities of the world." } +newTalentType{ no_silence=true, is_spell=true, type="chronomancy/other", name = _t"other", hide = true, description = _t"Talents of the various entities of the world." } +newTalentType{ no_silence=true, is_spell=true, type="spell/other", name = _t"other", hide = true, description = _t"Talents of the various entities of the world." } +newTalentType{ no_silence=true, is_spell=true, type="corruption/other", name = _t"other", hide = true, description = _t"Talents of the various entities of the world." } +newTalentType{ is_nature=true, type="wild-gift/other", name = _t"other", hide = true, description = _t"Talents of the various entities of the world." } +newTalentType{ type="psionic/other", name = _t"other", hide = true, description = _t"Talents of the various entities of the world." } +newTalentType{ type="other/other", name = _t"other", hide = true, description = _t"Talents of the various entities of the world." } +newTalentType{ type="undead/other", name = _t"other", hide = true, description = _t"Talents of the various entities of the world." } +newTalentType{ type="undead/keepsake", name = _t"keepsake shadow", generic = true, description = _t"Keepsake shadows's innate abilities." } +newTalentType{ is_mind=true, type="cursed/misc", name = _t"misc", description = _t"Talents of the various entities of the world." } local oldTalent = newTalent local newTalent = function(t) if type(t.hide) == "nil" then t.hide = true end return oldTalent(t) end @@ -69,7 +69,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Multiply yourself! (up to %d times)]]):format(self.can_multiply or 0) + return ([[Multiply yourself! (up to %d times)]]):tformat(self.can_multiply or 0) end, } @@ -78,7 +78,7 @@ newTalent{ name = "Poisonous Crawl", type = {"technique/other", 1}, points = 5, - message = "@Source@ envelops @target@ with poison.", + message = _t"@Source@ envelops @target@ with poison.", cooldown = 5, range = 1, requires_target = true, @@ -97,7 +97,7 @@ newTalent{ end, info = function(self, t) return ([[Crawl onto the target, doing %d%% damage and covering it in poison.]]): - format(100*t.getMult(self, t)) + tformat(100*t.getMult(self, t)) end, } @@ -106,7 +106,7 @@ newTalent{ name = "Acidic Crawl", points = 5, type = {"technique/other", 1}, - message = "@Source@ envelops @target@ with acid.", + message = _t"@Source@ envelops @target@ with acid.", cooldown = 2, range = 1, tactical = { ATTACK = { ACID = 2 } }, @@ -123,7 +123,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Crawl onto the target, covering it in acid.]]) + return ([[Crawl onto the target, covering it in acid.]]):tformat() end, } @@ -132,7 +132,7 @@ newTalent{ name = "Blinding Spores", type = {"technique/other", 1}, points = 5, - message = "@Source@ releases blinding spores at @target@.", + message = _t"@Source@ releases blinding spores at @target@.", cooldown = 2, range = 1, tactical = { DISABLE = { blind = 2 } }, @@ -150,7 +150,7 @@ newTalent{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the blinding!", target.name:capitalize()) + game.logSeen(target, "%s resists the blinding!", target:getName():capitalize()) end end @@ -158,7 +158,7 @@ newTalent{ end, info = function(self, t) return ([[Releases stinging spores at the target, blinding it for %d turns.]]): - format(t.getDuration(self, t)) + tformat(t.getDuration(self, t)) end, } @@ -167,7 +167,7 @@ newTalent{ name = "Poisonous Spores", type = {"technique/other", 1}, points = 5, - message = "@Source@ releases poisonous spores at @target@.", + message = _t"@Source@ releases poisonous spores at @target@.", cooldown = 2, range = 1, tactical = { ATTACK = { NATURE = 1, poison = 1} }, @@ -185,7 +185,7 @@ newTalent{ end, info = function(self, t) return ([[Releases poisonous spores at the target, doing %d%% damage and poisoning it.]]): - format(100 * t.getMult(self, t)) + tformat(100 * t.getMult(self, t)) end, } @@ -212,7 +212,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the stunning blow!", target.name:capitalize()) + game.logSeen(target, "%s resists the stunning blow!", target:getName():capitalize()) end end @@ -221,7 +221,7 @@ newTalent{ info = function(self, t) return ([[Hits the target doing %d%% damage. If the attack hits, the target is stunned for %d turns. The chance to stun improves with your Physical Power.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.5, 1), t.getDuration(self, t)) + tformat(100 * self:combatTalentWeaponDamage(t, 0.5, 1), t.getDuration(self, t)) end, } @@ -247,14 +247,14 @@ newTalent{ target:setEffect(target.EFF_DISARMED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower()}) target:crossTierEffect(target.EFF_DISARMED, self:combatPhysicalpower()) else - game.logSeen(target, "%s resists the blow!", target.name:capitalize()) + game.logSeen(target, "%s resists the blow!", target:getName():capitalize()) end return true end, info = function(self, t) return ([[Hits the target doing %d%% damage and trying to disarm the target for %d turns. The chance improves with your Physical Power.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.5, 1), t.getDuration(self, t)) + tformat(100 * self:combatTalentWeaponDamage(t, 0.5, 1), t.getDuration(self, t)) end, } @@ -281,7 +281,7 @@ newTalent{ if target:canBe("pin") then target:setEffect(target.EFF_CONSTRICTED, t.getDuration(self, t), {src=self, power=1.5 * self:getTalentLevel(t), apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the constriction!", target.name:capitalize()) + game.logSeen(target, "%s resists the constriction!", target:getName():capitalize()) end end @@ -290,7 +290,7 @@ newTalent{ info = function(self, t) return ([[Hits the target doing %d%% damage. If the attack hits, the target is constricted for %d turns. The constriction power improves with your Physical Power.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.5, 1), t.getDuration(self, t)) + tformat(100 * self:combatTalentWeaponDamage(t, 0.5, 1), t.getDuration(self, t)) end, } @@ -317,14 +317,14 @@ newTalent{ target:knockback(self.x, self.y, 4) target:crossTierEffect(target.EFF_OFFBALANCE, self:combatPhysicalpower()) else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end return true end, info = function(self, t) - return ([[Hits the target with your weapon doing %d%% damage. If the attack hits, the target is knocked back up to 4 grids. The chance improves with your Physical Power.]]):format(100 * self:combatTalentWeaponDamage(t, 1.5, 2)) + return ([[Hits the target with your weapon doing %d%% damage. If the attack hits, the target is knocked back up to 4 grids. The chance improves with your Physical Power.]]):tformat(100 * self:combatTalentWeaponDamage(t, 1.5, 2)) end, } @@ -333,7 +333,7 @@ newTalent{ name = "Poisonous Bite", type = {"technique/other", 1}, points = 5, - message = "@Source@ bites poison into @target@.", + message = _t"@Source@ bites poison into @target@.", cooldown = 5, range = 1, tactical = { ATTACK = { NATURE = 1, poison = 1} }, @@ -348,7 +348,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Bites the target (an unarmed attack), doing %d%% damage and injecting it with poison.]]):format(100 * t.getMult(self, t)) + return ([[Bites the target (an unarmed attack), doing %d%% damage and injecting it with poison.]]):tformat(100 * t.getMult(self, t)) end, } @@ -418,7 +418,7 @@ newTalent{ return num_summon > 0 end, info = function(self, t) - return ([[Summon allies.]]) + return ([[Summon allies.]]):tformat() end, } @@ -427,7 +427,7 @@ newTalent{ type = {"technique/other", 1}, points = 5, cooldown = 8, - message = "@Source@ performs a diseased attack against @target@.", + message = _t"@Source@ performs a diseased attack against @target@.", requires_target = true, tactical = { ATTACK = { weapon=1, BLIGHT = { disease = 2 } }, DISABLE = { disease = 1 } }, getDuration = function(self, t) return math.floor(self:combatTalentScale(t, 13, 25)) end, @@ -446,7 +446,7 @@ newTalent{ if target:canBe("disease") then target:setEffect(target.EFF_ROTTING_DISEASE, t.getDuration(self, t), {src=self, dam=t.getDamage(self, t), con=math.floor(4 + target:getCon() * 0.1), apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the disease!", target.name:capitalize()) + game.logSeen(target, "%s resists the disease!", target:getName():capitalize()) end end @@ -454,7 +454,7 @@ newTalent{ end, info = function(self, t) return ([[Hits the target doing %d%% damage. If the attack hits, the target is afflicted with a disease, inflicting %0.2f blight damage per turn for %d turns and reducing constitution by 10%% + 4. The disease damage increases with your Strength, and the chance to apply it increases with your Physical Power.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.5, 1),damDesc(self, DamageType.BLIGHT,t.getDamage(self, t)),t.getDuration(self, t)) + tformat(100 * self:combatTalentWeaponDamage(t, 0.5, 1),damDesc(self, DamageType.BLIGHT,t.getDamage(self, t)),t.getDuration(self, t)) end, } @@ -463,7 +463,7 @@ newTalent{ type = {"technique/other", 1}, points = 5, cooldown = 8, - message = "@Source@ performs a diseased attack against @target@.", + message = _t"@Source@ performs a diseased attack against @target@.", tactical = { ATTACK = { weapon=1, BLIGHT = { disease = 2 } }, DISABLE = { disease = 1 } }, requires_target = true, getDuration = function(self, t) return math.floor(self:combatTalentScale(t, 13, 25)) end, @@ -482,7 +482,7 @@ newTalent{ if target:canBe("disease") then target:setEffect(target.EFF_DECREPITUDE_DISEASE, t.getDuration(self, t), {src=self, dam=t.getDamage(self, t), dex=math.floor(4 + target:getDex() * 0.1), apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the disease!", target.name:capitalize()) + game.logSeen(target, "%s resists the disease!", target:getName():capitalize()) end end @@ -490,7 +490,7 @@ newTalent{ end, info = function(self, t) return ([[Hits the target doing %d%% damage. If the attack hits, the target is afflicted with a disease, inflicting %0.2f blight damage per turn for %d turns and reducing dexterity by 10%% + 4. The disease damage increases with your Strength, and the chance to apply it increases with your Physical Power.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.5, 1),damDesc(self, DamageType.BLIGHT,t.getDamage(self, t)),t.getDuration(self, t)) + tformat(100 * self:combatTalentWeaponDamage(t, 0.5, 1),damDesc(self, DamageType.BLIGHT,t.getDamage(self, t)),t.getDuration(self, t)) end, } @@ -499,7 +499,7 @@ newTalent{ type = {"technique/other", 1}, points = 5, cooldown = 8, - message = "@Source@ performs a diseased attack against @target@.", + message = _t"@Source@ performs a diseased attack against @target@.", requires_target = true, tactical = { ATTACK = { weapon=1, BLIGHT = { disease = 2 } }, DISABLE = { disease = 1 } }, getDuration = function(self, t) return math.floor(self:combatTalentScale(t, 13, 25)) end, @@ -518,7 +518,7 @@ newTalent{ if target:canBe("disease") then target:setEffect(target.EFF_WEAKNESS_DISEASE, t.getDuration(self, t), {src=self, dam=t.getDamage(self, t), str=math.floor(4 + target:getStr() * 0.1), apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the disease!", target.name:capitalize()) + game.logSeen(target, "%s resists the disease!", target:getName():capitalize()) end end @@ -526,7 +526,7 @@ newTalent{ end, info = function(self, t) return ([[Hits the target doing %d%% damage. If the attack hits, the target is afflicted with a disease, inflicting %0.2f blight damage per turn for %d turns and reducing strength by 10%% + 4. The disease damage increases with your Strength, and the chance to apply it increases with your Physical Power.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.5, 1),damDesc(self, DamageType.BLIGHT,t.getDamage(self, t)),t.getDuration(self, t)) + tformat(100 * self:combatTalentWeaponDamage(t, 0.5, 1),damDesc(self, DamageType.BLIGHT,t.getDamage(self, t)),t.getDuration(self, t)) end, } @@ -551,7 +551,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Try to confuse the target's mind for %d (power %d%%) turns.]]):format(t.getDuration(self, t), t.getConfusion(self, t)) + return ([[Try to confuse the target's mind for %d (power %d%%) turns.]]):tformat(t.getDuration(self, t), t.getConfusion(self, t)) end, } @@ -577,7 +577,7 @@ newTalent{ info = function(self, t) return ([[Condenses ambient water on a target, inflicting %0.1f cold damage. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.COLD,t.getDamage(self, t))) + tformat(damDesc(self, DamageType.COLD,t.getDamage(self, t))) end, } @@ -619,7 +619,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Conjures up a bolt of fire, setting the target ablaze and doing %0.2f fire damage over 3 turns. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.FIRE, damage)) + tformat(damDesc(self, DamageType.FIRE, damage)) end, } @@ -659,7 +659,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Hurl ice shard at the target dealing %0.2f ice damage. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.COLD, damage)) + tformat(damDesc(self, DamageType.COLD, damage)) end, } @@ -691,7 +691,7 @@ newTalent{ return ([[Projects a bolt of pure blight, doing %0.2f blight damage. This spell has an improved critical strike chance of +%0.2f%%. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 1, 180)), t.getCritChance(self, t)) + tformat(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 1, 180)), t.getCritChance(self, t)) end, } @@ -718,7 +718,7 @@ newTalent{ info = function(self, t) return ([[Condenses ambient water on a target, inflicting %0.1f cold damage and stunning it for 4 turns. The damage will increase with your Spellpower]]): - format(damDesc(self, DamageType.COLD,t.getDamage(self, t))) + tformat(damDesc(self, DamageType.COLD,t.getDamage(self, t))) end, } @@ -744,7 +744,7 @@ newTalent{ end, info = function(self, t) return ([[Fires a blast of void energies that slowly travel to their target, dealing %0.2f arcane damage on impact. - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.ARCANE, self:combatTalentSpellDamage(t, 15, 240))) + The damage will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.ARCANE, self:combatTalentSpellDamage(t, 15, 240))) end, } @@ -790,7 +790,7 @@ newTalent{ info = function(self, t) local curecount = t.getCureCount(self, t) return ([[Call upon the forces of nature to cure your body of %d poisons and diseases.]]): - format(curecount) + tformat(curecount) end, } @@ -812,7 +812,7 @@ newTalent{ local regen = t.getRegeneration(self, t) return ([[Call upon the forces of nature to regenerate your body for %d life every turn for 10 turns. The life healed increases with Spellpower.]]): - format(regen) + tformat(regen) end, } @@ -839,14 +839,14 @@ newTalent{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the grab!", target.name:capitalize()) + game.logSeen(target, "%s resists the grab!", target:getName():capitalize()) end end return true end, info = function(self, t) - return ([[Hits the target doing %d%% damage; if the attack hits, the target is pinned to the ground for %d turns. The chance to pin improves with Physical Power.]]):format(100 * self:combatTalentWeaponDamage(t, 0.8, 1.4), t.getDuration(self, t)) + return ([[Hits the target doing %d%% damage; if the attack hits, the target is pinned to the ground for %d turns. The chance to pin improves with Physical Power.]]):tformat(100 * self:combatTalentWeaponDamage(t, 0.8, 1.4), t.getDuration(self, t)) end, } @@ -856,7 +856,7 @@ newTalent{ points = 5, equilibrium = 12, cooldown = 12, - message = "@Source@ projects ink!", + message = _t"@Source@ projects ink!", range = 0, radius = function(self, t) return math.floor(self:combatTalentScale(t, 5, 9)) end, direct_hit = true, @@ -877,7 +877,7 @@ newTalent{ end, info = function(self, t) local duration = t.getDuration(self, t) - return ([[You project thick black ink, blinding targets in a radius %d cone for %d turns. The chance to blind improves with Physical Power.]]):format(t.radius(self, t), duration) + return ([[You project thick black ink, blinding targets in a radius %d cone for %d turns. The chance to blind improves with Physical Power.]]):tformat(t.radius(self, t), duration) end, } @@ -906,7 +906,7 @@ newTalent{ info = function(self, t) return ([[Spit poison at your target, doing %0.2f poison damage over six turns. The damage will increase with your Strength or Dexterity (whichever is higher).]]): - format(damDesc(self, DamageType.POISON, t.getDamage(self,t))) + tformat(damDesc(self, DamageType.POISON, t.getDamage(self,t))) end, } @@ -933,7 +933,7 @@ newTalent{ info = function(self, t) return ([[Strike your target with poison, doing %0.2f poison damage over six turns. The damage will increase with your mindpower.]]): - format(damDesc(self, DamageType.POISON, t.getDamage(self,t))) + tformat(damDesc(self, DamageType.POISON, t.getDamage(self,t))) end, } @@ -960,14 +960,14 @@ newTalent{ end, info = function(self, t) return ([[Spit blight at your target doing %0.2f blight damage. - The damage will increase with your Magic.]]):format(t.getDamage(self,t)) + The damage will increase with your Magic.]]):tformat(t.getDamage(self,t)) end, } newTalent{ name = "Rushing Claws", type = {"wild-gift/other", 1}, - message = "@Source@ rushes out, claws sharp and ready!", + message = _t"@Source@ rushes out, claws sharp and ready!", points = 5, equilibrium = 10, cooldown = 15, @@ -1009,7 +1009,7 @@ newTalent{ end, info = function(self, t) return ([[Rushes toward your target with incredible speed. If the target is reached, you use your claws to pin it to the ground for 5 turns. - You must rush from at least 2 tiles away.]]) + You must rush from at least 2 tiles away.]]):tformat() end, } @@ -1038,7 +1038,7 @@ newTalent{ info = function(self, t) return ([[Throws a pack of bones at your target doing %0.2f physical damage as bleeding within radius %d. The damage will increase with the Strength stat]]): - format(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), self:getTalentRadius(t)) + tformat(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), self:getTalentRadius(t)) end, } @@ -1048,7 +1048,7 @@ newTalent{ points = 5, equilibrium = 4, cooldown = 6, - message = "@Source@ seems to search the ground...", + message = _t"@Source@ seems to search the ground...", range = 10, requires_target = true, tactical = { DISABLE = { pin = 1 } }, @@ -1058,13 +1058,13 @@ newTalent{ action = function(self, t) local dur = t.getDuration(self,t) local trap = mod.class.Trap.new{ - type = "web", subtype="web", id_by_type=true, unided_name = "sticky web", + type = "web", subtype="web", id_by_type=true, unided_name = _t"sticky web", display = '^', color=colors.YELLOW, image = "trap/trap_spiderweb_01_64.png", - name = "sticky web", auto_id = true, + name = _t"sticky web", auto_id = true, detect_power = t.getDetect(self, t), disarm_power = t.getDisarm(self, t), level_range = {self.level, self.level}, - message = "@Target@ is caught in a web!", + message = _t"@Target@ is caught in a web!", pin_dur = dur, temporary = dur * 5, summoner = self, @@ -1074,7 +1074,7 @@ newTalent{ x=self.x, y=self.y, desc = function(self) - return ("Pins non spiderkin for %d turns. Decays over time."):format(self.pin_dur) + return ("Pins non spiderkin for %d turns. Decays over time."):tformat(self.pin_dur) end, canTrigger = function(self, x, y, who) if who.type == "spiderkin" then return false end @@ -1098,7 +1098,7 @@ newTalent{ if who:canBe("stun") and who:canBe("pin") then who:setEffect(who.EFF_PINNED, math.ceil(self.pin_dur), {apply_power=self.disarm_power + 5}) else - game.logSeen(who, "%s resists!", who.name:capitalize()) + game.logSeen(who, "%s resists!", who:getName():capitalize()) end return true, true end @@ -1111,7 +1111,7 @@ newTalent{ info = function(self, t) local dur = t.getDuration(self, t) return ([[Lay a concealed web (%d detect 'power', %d disarm 'power') under yourself that lasts %d turns and pins all non-spiderkin that pass through it for %d turns. The web weakens over time.]]): - format(t.getDetect(self, t), t.getDisarm(self, t), dur*5, dur) + tformat(t.getDetect(self, t), t.getDisarm(self, t), dur*5, dur) end, } @@ -1146,7 +1146,7 @@ newTalent{ end, info = function(self, t) return ([[Weave darkness (power %d) in a radius of %d, blocking all light but the most powerful and teleporting you a short range.]]): - format(t.darkPower(self, t), self:getTalentRadius(t)) + tformat(t.darkPower(self, t), self:getTalentRadius(t)) end, } @@ -1170,7 +1170,7 @@ newTalent{ local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) if not x or not y then return nil end - local target = game.level.map(x, y, engine.Map.ACTOR) or self.ai_target.actor or {name="something"} + local target = game.level.map(x, y, engine.Map.ACTOR) or self.ai_target.actor or {name=_t"something"} self:logCombat(target, "#Source# hurls a huge boulder at #target#!") self:project(tg, x, y, DamageType.PHYSKNOCKBACK, {dist=t.getDist(self, t), dam=self:mindCrit(t.getDam(self, t))}, {type="archery"}) game:playSoundNear(self, "talents/ice") @@ -1178,7 +1178,7 @@ newTalent{ end, info = function(self, t) return ([[Throw a huge boulder, dealing %0.2f physical damage and knocking targets back %d tiles within radius %d. - The damage will increase with your Strength.]]):format(damDesc(self, DamageType.PHYSICAL, t.getDam(self, t)), t.getDist(self, t), self:getTalentRadius(t)) + The damage will increase with your Strength.]]):tformat(damDesc(self, DamageType.PHYSICAL, t.getDam(self, t)), t.getDist(self, t), self:getTalentRadius(t)) end, } @@ -1188,7 +1188,7 @@ newTalent{ points = 5, equilibrium = 5, cooldown = 10, - message = "@Source@ howls", + message = _t"@Source@ howls", range = 10, tactical = { ATTACK = 3 }, direct_hit = true, @@ -1214,7 +1214,7 @@ newTalent{ end, info = function(self, t) return ([[Howl (radius %d) to call your hunting pack.]]): - format(self:getTalentRadius(t)) + tformat(self:getTalentRadius(t)) end, } @@ -1224,7 +1224,7 @@ newTalent{ points = 5, equilibrium = 5, cooldown = 10, - message = "@Source@ shrieks.", + message = _t"@Source@ shrieks.", range = 10, direct_hit = true, no_difficulty_boost = true, @@ -1250,7 +1250,7 @@ newTalent{ end, info = function(self, t) return ([[Shriek (radius %d) to call your allies.]]): - format(self:getTalentRadius(t)) + tformat(self:getTalentRadius(t)) end, } @@ -1283,7 +1283,7 @@ newTalent{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the crushing!", target.name:capitalize()) + game.logSeen(target, "%s resists the crushing!", target:getName():capitalize()) end end @@ -1291,7 +1291,7 @@ newTalent{ end, info = function(self, t) return ([[Hits the target with a mighty blow to the legs doing %d%% weapon damage. If the attack hits, the target is unable to move for %d turns.]]): - format(100 * self:combatTalentWeaponDamage(t, 1, 1.4), t.getDuration(self, t)) + tformat(100 * self:combatTalentWeaponDamage(t, 1, 1.4), t.getDuration(self, t)) end, } @@ -1316,7 +1316,7 @@ newTalent{ end, info = function(self, t) return ([[Sends a telepathic attack, silencing the target for %d turns. The chance to silence improves with Mindpower.]]): - format(t.getDuration(self, t)) + tformat(t.getDuration(self, t)) end, } @@ -1344,7 +1344,7 @@ newTalent{ end, info = function(self, t) return ([[Sends a telekinetic attack, knocking back the target up to 3 grids and doing %0.2f physical damage. - The damage will increase with Mindpower.]]):format(self:damDesc(engine.DamageType.PHYSICAL, t.getDamage(self, t))) + The damage will increase with Mindpower.]]):tformat(self:damDesc(engine.DamageType.PHYSICAL, t.getDamage(self, t))) end, } @@ -1385,7 +1385,7 @@ newTalent{ info = function(self, t) return ([[Corrupted vapour rises at the target location (radius 4) doing %0.2f blight damage every turn for %d turns. The damage increases with Spellpower.]]): - format(damDesc(self, engine.DamageType.BLIGHT, self:combatTalentSpellDamage(t, 5, 65)), t.getDuration(self, t)) + tformat(damDesc(self, engine.DamageType.BLIGHT, self:combatTalentSpellDamage(t, 5, 65)), t.getDuration(self, t)) end, } @@ -1428,11 +1428,11 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) if self.is_grgglck then - game.logSeen(self, "%s spawns one of its tentacles!", self.name:capitalize()) + game.logSeen(self, "%s spawns one of its tentacles!", self:getName():capitalize()) else - m.name = self.name.."'s summoned tentacle" - m.desc = "Ewwww.." - game.logSeen(self, "%s spawns a tentacle!", self.name:capitalize()) + m.name = ("%s's summoned tentacle"):tformat(self:getName()) + m.desc = _t"Ewwww.." + game.logSeen(self, "%s spawns a tentacle!", self:getName():capitalize()) end else return end @@ -1440,7 +1440,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Invoke a tentacle to assault your foes. If the tentacle is killed, you will lose life equal to 2/3 of it's maximum life.]]) + return ([[Invoke a tentacle to assault your foes. If the tentacle is killed, you will lose life equal to 2/3 of it's maximum life.]]):tformat() end, } @@ -1448,7 +1448,7 @@ newTalent{ name = "Explode", type = {"technique/other", 1}, points = 5, - message = "@Source@ explodes! @target@ is enveloped in searing light.", + message = _t"@Source@ explodes! @target@ is enveloped in searing light.", cooldown = 1, range = 1, requires_target = true, @@ -1467,7 +1467,7 @@ newTalent{ end, info = function(self, t) return ([[Causes the user to explode (killing it) in a blinding flash for %0.2f light damage.]]): - format(damDesc(self, DamageType.LIGHT, t.getDamage(self, t))) + tformat(damDesc(self, DamageType.LIGHT, t.getDamage(self, t))) end, } @@ -1475,7 +1475,7 @@ newTalent{ name = "Will o' the Wisp Explode", type = {"technique/other", 1}, points = 5, - message = "@Source@ explodes! @target@ is enveloped in frost.", + message = _t"@Source@ explodes! @target@ is enveloped in frost.", cooldown = 1, range = 1, requires_target = true, @@ -1492,7 +1492,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Explode against one target for %0.2f cold damage.]]):format(damDesc(self, DamageType.COLD, self.will_o_wisp_dam or 1)) + return ([[Explode against one target for %0.2f cold damage.]]):tformat(damDesc(self, DamageType.COLD, self.will_o_wisp_dam or 1)) end, } @@ -1501,7 +1501,7 @@ newTalent{ type = {"spell/other", 1}, points = 5, mana = 10, - message = "@Source@ casts Elemental Bolt!", + message = _t"@Source@ casts Elemental Bolt!", cooldown = 3, range = 20, proj_speed = 2, @@ -1531,7 +1531,7 @@ newTalent{ end, info = function(self, t) return ([[Fire a slow bolt of a random element for %d damage. Damage increases with the magic stat.]]): - format(t.getDamage(self, t)) + tformat(t.getDamage(self, t)) end, } @@ -1540,7 +1540,7 @@ newTalent{ type = {"spell/other", 1}, points = 5, mana = 10, - message = "A volcano erupts!", + message = _t"A volcano erupts!", cooldown = 20, range = 10, proj_speed = 2, @@ -1563,7 +1563,7 @@ newTalent{ local e = Object.new{ old_feat = oe, type = rawget(oe, "type"), subtype = oe.subtype, - name = "raging volcano", image = oe.image, add_mos = {{image = "terrain/lava/volcano_01.png"}}, + name = _t"raging volcano", image = oe.image, add_mos = {{image = "terrain/lava/volcano_01.png"}}, display = '&', color=colors.LIGHT_RED, back_color=colors.RED, always_remember = true, temporary = t.getDuration(self, t), @@ -1613,7 +1613,7 @@ newTalent{ local dam = t.getDamage(self, t) return ([[Summons a small raging volcano for %d turns. Every turn, it will fire a molten boulder towards up to %d of your foes, dealing %0.2f fire and %0.2f physical damage. The damage will scale with your Spellpower.]]): - format(t.getDuration(self, t), t.nbProj(self, t), damDesc(self, DamageType.FIRE, dam/2), damDesc(self, DamageType.PHYSICAL, dam/2)) + tformat(t.getDuration(self, t), t.nbProj(self, t), damDesc(self, DamageType.FIRE, dam/2), damDesc(self, DamageType.PHYSICAL, dam/2)) end, } @@ -1651,7 +1651,7 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) return ([[Saps 30%% of the target's speed (increasing yours by the same amount) and inflicts %0.2f temporal damage for three turns. - ]]):format(damDesc(self, DamageType.TEMPORAL, damage)) + ]]):tformat(damDesc(self, DamageType.TEMPORAL, damage)) end, } @@ -1704,7 +1704,7 @@ newTalent{ local power = t.getPower(self,t) * 100 return ([[Sends Dredges in a radius of %d into a frenzy for %d turns. The frenzy will increase global speed by %d%%, physical crit chance by %d%%, and prevent death until -%d%% life.]]): - format(range, t.getDuration(self, t), power, power, power) + tformat(range, t.getDuration(self, t), power, power, power) end, } @@ -1734,7 +1734,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Start to sever the lifeline of the target. After 4 turns, if the target is still in line of sight of you, its existance will be ended (%d temporal damage).]]):format(damDesc(self, "TEMPORAL", t.getDamage(self, t))) + return ([[Start to sever the lifeline of the target. After 4 turns, if the target is still in line of sight of you, its existance will be ended (%d temporal damage).]]):tformat(damDesc(self, "TEMPORAL", t.getDamage(self, t))) end, } @@ -1761,13 +1761,13 @@ newTalent{ tgts[target] = true local ox, oy = target.x, target.y target:pull(self.x, self.y, 1) - if target.x ~= ox or target.y ~= oy then game.logSeen(target, "%s is pulled in!", target.name:capitalize()) end + if target.x ~= ox or target.y ~= oy then game.logSeen(target, "%s is pulled in!", target:getName():capitalize()) end end end) return true end, info = function(self, t) - return ([[Pull all foes within radius 10 1 grid towards you.]]) + return ([[Pull all foes within radius 10 1 grid towards you.]]):tformat() end, } @@ -1803,14 +1803,14 @@ newTalent{ local target = game.level.map(tx, ty, Map.ACTOR) m:setTarget(target) - game.logSeen(self, "%s spawns a slimy crawler!", self.name:capitalize()) + game.logSeen(self, "%s spawns a slimy crawler!", self:getName():capitalize()) else return end return true end, info = function(self, t) - return ([[Invoke a slimy crawler for 10 turns.]]) + return ([[Invoke a slimy crawler for 10 turns.]]):tformat() end, } @@ -1844,7 +1844,7 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) return ([[Conjures up a fist of stone, doing %0.2f physical damage and knocking the target back 3 grids. - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.PHYSICAL, damage)) + The damage will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.PHYSICAL, damage)) end, } @@ -1888,7 +1888,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Corrosive fumes rise from the ground doing %0.2f acid damage in a radius of 3 each turn for %d turns. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.ACID, damage), duration) + tformat(damDesc(self, DamageType.ACID, damage), duration) end, } @@ -1910,7 +1910,7 @@ newTalent{ local restoration = t.getManaRestoration(self, t) return ([[Engulf yourself in a surge of mana, quickly restoring %d mana every turn for 10 turns. The mana restored will increase with your Spellpower.]]): - format(restoration) + tformat(restoration) end, } newTalent{ @@ -1954,7 +1954,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Exhale a wave of dark fire with radius %d. Any non demon caught in the area will take %0.2f fire damage, and flames will be left dealing a further %0.2f each turn. Demons will be healed for the same amount. The damage will increase with your Strength Stat.]]): - format(radius, damDesc(self, DamageType.FIRE, t.getDamage(self, t)), damDesc(self, DamageType.FIRE, t.getBurnDamage(self, t))) + tformat(radius, damDesc(self, DamageType.FIRE, t.getDamage(self, t)), damDesc(self, DamageType.FIRE, t.getBurnDamage(self, t))) end, } @@ -1985,7 +1985,7 @@ newTalent{ local icedamageinc = t.getIceDamageIncrease(self, t) return ([[Engulfs your hands (and weapons) in a sheath of frost, dealing %0.2f cold damage per melee attack and increasing all cold damage by %d%%. The effects will increase with your Spellpower.]]): - format(damDesc(self, DamageType.COLD, icedamage), icedamageinc, self:getTalentLevel(t) / 3) + tformat(damDesc(self, DamageType.COLD, icedamage), icedamageinc, self:getTalentLevel(t) / 3) end, } @@ -2072,7 +2072,7 @@ newTalent{ return ([[Use arcane forces to summon %d meteors that fall to the ground within range 2 of the target. Each meteor smashes everything within radius 2, dealing %0.2f fire and %0.2f physical damage to creatures other than yourself, while liquefying some of the terrain into lava for 8 turns. The damage increases with your Spellpower.]]): - format(t.getNb(self, t), damDesc(self, DamageType.FIRE, dam), damDesc(self, DamageType.PHYSICAL, dam)) + tformat(t.getNb(self, t), damDesc(self, DamageType.FIRE, dam), damDesc(self, DamageType.PHYSICAL, dam)) end, } @@ -2100,7 +2100,7 @@ newTalent{ local heal = t.getHeal(self, t) return ([[Imbues your body with natural energies, healing for %d life. The life healed will increase with your Mindpower.]]): - format(heal) + tformat(heal) end, } @@ -2111,7 +2111,7 @@ newTalent{ equi = 4, cooldown = 3, tactical = { ATTACK = {LIGHTNING = 2} }, - message = "@Source@ hurls lightning at @target@!", + message = _t"@Source@ hurls lightning at @target@!", range = 10, direct_hit = true, reflectable = true, @@ -2135,7 +2135,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Calls forth a powerful beam of lightning doing %0.2f to %0.2f lightning damage (%0.2f average). The damage will increase with your Mindpower.]]): - format(damDesc(self, DamageType.LIGHTNING, damage / 3), + tformat(damDesc(self, DamageType.LIGHTNING, damage / 3), damDesc(self, DamageType.LIGHTNING, damage), damDesc(self, DamageType.LIGHTNING, (damage + damage / 3) / 2)) end, @@ -2155,7 +2155,7 @@ newTalent{ return true end, info = function(self, t) - return ([[You fade from sight, making you invulnerable until the beginning of your next turn.]]) + return ([[You fade from sight, making you invulnerable until the beginning of your next turn.]]):tformat() end, } @@ -2174,7 +2174,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Teleports you randomly within range 10.]]) + return ([[Teleports you randomly within range 10.]]):tformat() end, } @@ -2216,7 +2216,7 @@ newTalent{ end, info = function(self, t) local multiplier = self:combatTalentWeaponDamage(t, 1.1, 1.9) - return ([[With blinding speed you suddenly appear next to a target up to %d spaces away and attack for %d%% damage.]]):format(self:getTalentRange(t), multiplier) + return ([[With blinding speed you suddenly appear next to a target up to %d spaces away and attack for %d%% damage.]]):tformat(self:getTalentRange(t), multiplier) end, } @@ -2234,11 +2234,11 @@ newTalent{ return ret end, deactivate = function(self, t, p) - game.logSeen("#VIOLET#%s is freed from the suspended state!", self.name:capitalize()) + game.logSeen("#VIOLET#%s is freed from the suspended state!", self:getName():capitalize()) return true end, info = function(self, t) - return ([[The target will not react until attacked.]]) + return ([[The target will not react until attacked.]]):tformat() end, } @@ -2278,7 +2278,7 @@ newTalent{ return ([[Grab a target and pull it next to you, covering it with frost while reducing its movement speed by 50%% for %d turns. The ice will also deal %0.2f cold damage. The damage and chance to slow will increase with your Spellpower.]]): - format(t.getDuration(self, t), damDesc(self, DamageType.COLD, self:combatTalentSpellDamage(t, 5, 140))) + tformat(t.getDuration(self, t), damDesc(self, DamageType.COLD, self:combatTalentSpellDamage(t, 5, 140))) end, } @@ -2288,7 +2288,7 @@ newTalent{ points = 5, cooldown = 10, stamina = 10, - message = "@Source@ throws a body shot.", + message = _t"@Source@ throws a body shot.", tactical = { ATTACK = { weapon = 2 }, DISABLE = { stun = 2 } }, requires_target = true, --on_pre_use = function(self, t, silent) if not self:hasEffect(self.EFF_COMBO) then if not silent then game.logPlayer(self, "You must have a combo going to use this ability.") end return false end return true end, @@ -2314,7 +2314,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_DAZED, t.getDuration(self, t, self:getCombo(combo)), {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the body shot!", target.name:capitalize()) + game.logSeen(target, "%s resists the body shot!", target:getName():capitalize()) end target:incStamina(- t.getDrain(self, t)) @@ -2333,7 +2333,7 @@ newTalent{ return ([[A punch to the body that deals %d%% damage, drains %d of the target's stamina per combo point, and dazes the target for %d to %d turns, depending on the amount of combo points you've accumulated. The daze chance will increase with your Physical Power. Using this talent removes your combo points.]]) - :format(damage, drain, daze, dazemax) + :tformat(damage, drain, daze, dazemax) end, } @@ -2349,7 +2349,7 @@ newTalent{ local chance = t.getChance(self, t) return ([[When gaining a combo point, you have a %d%% chance to gain an extra combo point. Additionally, your combo points will last %d turns longer before expiring. The chance of building a second combo point will improve with your Cunning.]]): - format(chance, duration) + tformat(chance, duration) end, } @@ -2365,7 +2365,7 @@ newTalent{ local saves = t.getMental(self, t) return ([[Superior cunning and training allows you to outthink and outwit your opponents' physical and mental assaults. Increases Defense by %d and Mental Save by %d. The Defense bonus will scale with your Dexterity, and the save bonus with your Cunning.]]): - format(defense, saves) + tformat(defense, saves) end, } @@ -2423,7 +2423,7 @@ newTalent{ local maim = t.getMaim(self, t) return ([[Grapples the target and inflicts %0.2f physical damage. If the target is already grappled, the target will be maimed as well, reducing damage by %d and global speed by 30%% for %d turns. The grapple effects will be based off your grapple talent, if you have it, and the damage will scale with your Physical Power.]]) - :format(damDesc(self, DamageType.PHYSICAL, (damage)), maim, duration) + :tformat(damDesc(self, DamageType.PHYSICAL, (damage)), maim, duration) end, } @@ -2438,7 +2438,7 @@ newTalent{ end, info = function(self, t) return ([[Each time one of your foes bites the dust, you feel a surge of power, increasing your strength by 2 (stacking up to a maximum of %d) for %d turns.]]): - format(math.floor(self:getTalentLevel(t) * 6), t.getDuration(self, t)) + tformat(math.floor(self:getTalentLevel(t) * 6), t.getDuration(self, t)) end, } @@ -2471,7 +2471,7 @@ newTalent{ info = function(self, t) local returndamage = t.getReturnDamage(self, t) return ([[Designate a target as a martyr for 10 turns. When the martyr deals damage, it also damages itself for %d%% of the damage dealt.]]): - format(returndamage) + tformat(returndamage) end, } @@ -2511,7 +2511,7 @@ newTalent{ if target:checkHit(self:combatAttack(shield_combat), target:combatPhysicalResist(), 0, 95, 5 - self:getTalentLevel(t) / 2) and target:canBe("knockback") then target:knockback(self.x, self.y, 4) else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end @@ -2520,7 +2520,7 @@ newTalent{ info = function(self, t) return ([[Hits the target with your weapon doing %d%% damage and two shield strikes doing %d%% damage each, trying to overpower your target. If the last attack hits, the target is knocked back 4 grids. The chance for knockback increases with your Accuracy.]]) - :format(100 * self:combatTalentWeaponDamage(t, 0.8, 1.3), 100 * self:combatTalentWeaponDamage(t, 0.8, 1.3, self:getTalentLevel(self.T_SHIELD_EXPERTISE))) + :tformat(100 * self:combatTalentWeaponDamage(t, 0.8, 1.3), 100 * self:combatTalentWeaponDamage(t, 0.8, 1.3, self:getTalentLevel(self.T_SHIELD_EXPERTISE))) end, } @@ -2544,7 +2544,7 @@ newTalent{ local dur = t.getDuration(self, t) return ([[Encase your body in a sheath of thought-quick forces, allowing you to control your body's movements directly without the inefficiency of dealing with crude mechanisms like nerves and muscles. Increases Accuracy by %d and critical strike chance by %0.1f%% for %d turns.]]): - format(boost, 0.5*boost, dur) + tformat(boost, 0.5*boost, dur) end, } @@ -2620,7 +2620,7 @@ newTalent{ local dam = damDesc(self, DamageType.PHYSICAL, t.getDam(self, t)) return ([[You expend massive amounts of energy to launch yourself across %d squares at incredible speed. All enemies in your path will be knocked flying and dealt between %d and %d Physical damage. At talent level 5, you can batter through solid walls.]]): - format(range, 2*dam/3, dam) + tformat(range, 2*dam/3, dam) end, } @@ -2667,7 +2667,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 4, {apply_power=self:combatMindpower()}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end else --If the target resists the knockback, do half damage to it. target:logCombat(self, "#YELLOW##Source# resists #Target#'s throw!") @@ -2682,7 +2682,7 @@ newTalent{ Upon landing, your target takes %0.1f Physical damage and is stunned for 4 turns. All other creatures within radius 2 of the landing point take %0.1f Physical damage and are knocked away from you. This talent ignores %d%% of the knockback resistance of the thrown target, which takes half damage if it resists being thrown. The damage improves with your Mindpower and the range increases with both Mindpower and Strength.]]): - format(range, dam, dam/2, t.getKBResistPen(self, t)) + tformat(range, dam, dam/2, t.getKBResistPen(self, t)) end, } @@ -2728,7 +2728,7 @@ newTalent{ Doing so requires no turn but you are considered disarmed for 2 turns. Reloading does not break stealth.]]) - :format(self:reloadRate()) + :tformat(self:reloadRate()) end, } @@ -2793,7 +2793,7 @@ newTalent{ info = function(self, t) return ([[Attack your foes in a frontal arc, doing %d%% weapon damage and making your targets bleed for %d each turn for %d turns. The bleed damage increases with your main hand weapon damage and Dexterity.]]): - format(100 * self:combatTalentWeaponDamage(t, 1, 1.7), damDesc(self, DamageType.PHYSICAL, t.cutPower(self, t)), t.cutdur(self, t)) + tformat(100 * self:combatTalentWeaponDamage(t, 1, 1.7), damDesc(self, DamageType.PHYSICAL, t.cutPower(self, t)), t.cutdur(self, t)) end, } @@ -2837,7 +2837,7 @@ newTalent{ info = function(self, t) return ([[Reduces the duration of all poisons on the target by 50%%, but increases their damage by %d%%. The effect increases with your Cunning.]]): - format(100 + self:combatTalentStatDamage(t, "cun", 40, 250)) + tformat(100 + self:combatTalentStatDamage(t, "cun", 40, 250)) end, } @@ -2862,7 +2862,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[For %d turns, you put all your will into your blows, adding %d physical power to each strike. The effect will improve with your Cunning and Willpower stats.]]): - format(duration, damage) + tformat(duration, damage) end, } @@ -2903,7 +2903,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[You hit your target, doing %d%% damage. If your attack hits, you gain %d armor penetration (APR) for %d turns. The APR will increase with your Cunning.]]): - format(100 * damage, apr, duration) + tformat(100 * damage, apr, duration) end, } @@ -2935,7 +2935,7 @@ newTalent{ return ([[Throws a vial of sticky smoke that explodes in radius %d on your foes, reducing their vision range by %d for 5 turns. Creatures affected by smoke bomb can never prevent you from stealthing, even if their proximity would normally forbid it. Use of this will not break stealth.]]): - format(self:getTalentRadius(t), t.getSightLoss(self,t)) + tformat(self:getTalentRadius(t), t.getSightLoss(self,t)) end, } @@ -2985,7 +2985,7 @@ newTalent{ return ([[Using a series of tricks and maneuvers, you switch places with your target. Switching places will confuse your foes, granting you Evasion (50%%) for %d turns. While switching places, your weapon(s) will connect with the target; this will not do weapon damage, but on hit effects of the weapons can trigger.]]): - format(duration) + tformat(duration) end, } @@ -3025,14 +3025,14 @@ newTalent{ local speedpen = t.getSpeedPenalty(self, t) return ([[You hit your target, doing %d%% damage. If your attack connects, the target is crippled for %d turns, losing %d%% melee, spellcasting and mind speed. The chance to land the status improves with Accuracy, and the status power improves with Cunning.]]): - format(100 * damage, duration, speedpen) + tformat(100 * damage, duration, speedpen) end, } newTalent{ name = "Nimble Movements", type = {"other/other",1}, - message = "@Source@ dashes quickly!", + message = _t"@Source@ dashes quickly!", no_break_stealth = true, -- require = cuns_req3, points = 5, @@ -3075,7 +3075,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Quickly and quietly dash your way to the target square, if it is not blocked by enemies or obstacles. This talent will not break Stealth.]]) + return ([[Quickly and quietly dash your way to the target square, if it is not blocked by enemies or obstacles. This talent will not break Stealth.]]):tformat() end, } @@ -3131,7 +3131,7 @@ newTalent{ You always succeed if you are not directly observed. This resets the cooldown of your Stealth talent, and, if successful, all creatures currently following you will lose track of your position. You estimate your current chance to hide as %0.1f%%.]]): - format(t.stealthMult(self, t), t.getChance(self, t, true), t.getChance(self, t, false, true)) + tformat(t.stealthMult(self, t), t.getChance(self, t, true), t.getChance(self, t, false, true)) end, } @@ -3160,7 +3160,7 @@ newTalent{ Success is more likely against fewer opponents and is determined by comparing %0.2f times your stealth power (currently %d) to the stealth detection (reduced by 10%% per tile distance) of all enemies that have a clear line of sight to you. Your base chance of success is 100%% if you are not directly observed, and good or bad luck may also affect it. You estimate your current chance to maintain stealth as %0.1f%%.]]): - format(t.stealthMult(self, t), t.getChance(self, t, true), t.getChance(self, t, false, true)) + tformat(t.stealthMult(self, t), t.getChance(self, t, true), t.getChance(self, t, false, true)) end, } @@ -3198,7 +3198,7 @@ newTalent{ local damage = t.getDamage(self, t) local dist = t.getDist(self, t) return ([[You hit your target, doing %d%% damage, distracting it while you jump back %d squares away.]]): - format(100 * damage, dist) + tformat(100 * damage, dist) end, } @@ -3216,7 +3216,7 @@ newTalent{ getHardiness = function(self, t) return self:combatTalentLimit(t, 100, 6, 30) end, -- Limit < 100% info = function(self, t) return ([[Whilst wearing leather or lighter armour, you gain %d%% Defense and %d%% Armour hardiness.]]): - format(t.getDef(self, t) * 100, t.getHardiness(self, t)) + tformat(t.getDef(self, t) * 100, t.getHardiness(self, t)) end, } @@ -3233,7 +3233,7 @@ newTalent{ info = function(self, t) return ([[You are light on your feet, handling your armour better. Each step you take regenerates %0.2f stamina, and your fatigue is permanently reduced by %0.1f%%. At level 3 you are able to walk so lightly that you never trigger traps that require pressure.]]): - format(self:getTalentLevelRaw(t) * 0.2, t.getFatigue(self, t)) + tformat(self:getTalentLevelRaw(t) * 0.2, t.getFatigue(self, t)) end, } @@ -3254,7 +3254,7 @@ newTalent{ end, info = function(self, t) return ([[You literally dance around your foes, increasing your movement speed by %d%% and reducing the cooldown of Hack'n'Back, Rush, Disengage and Evasion by %d turns.]]): - format(t.incspeed(self, t)*100,t.CDreduce(self, t)) + tformat(t.incspeed(self, t)*100,t.CDreduce(self, t)) end, } @@ -3275,7 +3275,7 @@ newTalent{ -- end, info = function(self, t) return ([[Your cunning manipulations allow you to use charms (wands, totems and torques) more efficiently, reducing their cooldowns by %d%%.]]): - format(t.cdReduc(self:getTalentLevel(t))) + tformat(t.cdReduc(self:getTalentLevel(t))) end, } @@ -3291,7 +3291,7 @@ newTalent{ return ([[You look at your surroundings with more intensity than most people, allowing you to see stealthed or invisible creatures. Increases stealth detection by %d and invisibility detection by %d. The detection power increases with your Cunning.]]): - format(t.seePower(self,t), t.seePower(self,t)) + tformat(t.seePower(self,t), t.seePower(self,t)) end, } @@ -3325,7 +3325,7 @@ newTalent{ end, info = function(self, t) return ([[You have learned to hit the right spot, increasing your armor penetration by %d when dual wielding. - The Armour penetration bonus will increase with your Dexterity.]]):format(t.getApr(self, t)) + The Armour penetration bonus will increase with your Dexterity.]]):tformat(t.getApr(self, t)) end, } @@ -3359,7 +3359,7 @@ newTalent{ return true end, info = function(self, t) - return ([[When dual wielding, increases attack speed by %d%%, but drains stamina quickly (-6 stamina/turn).]]):format(t.getSpeed(self, t)*100) + return ([[When dual wielding, increases attack speed by %d%%, but drains stamina quickly (-6 stamina/turn).]]):tformat(t.getSpeed(self, t)*100) end, } @@ -3404,7 +3404,7 @@ newTalent{ end end else - self:logCombat(target, "#Source# misses a defensive throw against #Target#!", self.name:capitalize(),target.name:capitalize()) + self:logCombat(target, "#Source# misses a defensive throw against #Target#!", self:getName():capitalize(),target:getName():capitalize()) end end, on_unlearn = function(self, t) @@ -3415,7 +3415,7 @@ newTalent{ local damagetwo = t.getDamageTwo(self, t) return ([[When you avoid a melee blow while unarmed, you have a %d%% chance to throw the target to the ground. If the throw lands, the target will take %0.2f damage and be dazed for 2 turns, or %0.2f damage and be stunned for 2 turns if the target is grappled. You may attempt up to %0.1f throws per turn. The chance of throwing increases with your Accuracy, the damage scales with your Physical Power, and the number of attempts with your Strength and Dexterity.]]): - format(t.getchance(self,t), damDesc(self, DamageType.PHYSICAL, (damage)), damDesc(self, DamageType.PHYSICAL, (damagetwo)), t.getThrows(self, t)) + tformat(t.getchance(self,t), damDesc(self, DamageType.PHYSICAL, (damage)), damDesc(self, DamageType.PHYSICAL, (damagetwo)), t.getThrows(self, t)) end, } @@ -3451,7 +3451,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Attack your foes in a frontal arc with a roundhouse kick, which deals %0.2f physical damage and knocks your foes back 4 grids. This will break any grapples you're maintaining The damage improves with your Physical Power.]]): - format(damDesc(self, DamageType.PHYSICAL, (damage))) + tformat(damDesc(self, DamageType.PHYSICAL, (damage))) end, } @@ -3477,7 +3477,7 @@ newTalent{ end, info = function(self, t) return ([[Fire bone spears in all directions, hitting all foes within radius %d for %0.2f physical damage, and inflicting bleeding for another %0.2f damage over 5 turns. - The damage will increase with your Spellpower.]]):format(self:getTalentRadius(t), damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)/2)) + The damage will increase with your Spellpower.]]):tformat(self:getTalentRadius(t), damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)/2)) end, } @@ -3513,7 +3513,7 @@ newTalent{ if target:canBe("silence") then target:setEffect(target.EFF_SILENCED, t.getDuration(self, t), {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists the shadow!", target.name:capitalize()) + game.logSeen(target, "%s resists the shadow!", target:getName():capitalize()) end end @@ -3523,7 +3523,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[You reach out with shadowy vines toward your target, pulling it to you and silencing it for %d turns and dazing it for 2 turns. The chance to hit improves with your Accuracy.]]): - format(duration) + tformat(duration) end, } @@ -3550,8 +3550,8 @@ newTalent{ return end - local m = self:cloneActor({name = "Shadow of "..self.name, - desc = ([[A dark shadowy form in the shape of %s.]]):format(self.name), + local m = self:cloneActor({name = ("Shadow of %s"):tformat(self:getName()), + desc = ([[A dark shadowy form in the shape of %s.]]):tformat(self:getName()), summoner=self, summoner_gain_exp=true, exp_worth=0, summon_time=t.getDuration(self, t), ai_target={actor=nil}, ai="summoned", ai_real="tactical", @@ -3589,7 +3589,7 @@ newTalent{ game.party:addMember(m, { control="full", type="shadow", - title="Shadow of "..self.name, + title=("Shadow of %s"):tformat(self:getName()), temporary_level=1, orders = {target=true}, on_control = function(self) @@ -3613,7 +3613,7 @@ newTalent{ Your shadow is permanently stealthed (%d power), and all melee damage it deals is converted to darkness damage. The shadow cannot teleport. If you release control early or if it leaves your sight for too long, your shadow will dissipate.]]): - format(t.getDuration(self, t), t.getHealth(self, t) * 100, t.getDam(self, t) * 100, t.getStealthPower(self, t)) + tformat(t.getDuration(self, t), t.getHealth(self, t) * 100, t.getDam(self, t) * 100, t.getStealthPower(self, t)) end, } @@ -3639,7 +3639,7 @@ newTalent{ if target:canBe("disarm") then target:setEffect(target.EFF_DISARMED, t.getDuration(self, t), {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists the shadow!", target.name:capitalize()) + game.logSeen(target, "%s resists the shadow!", target:getName():capitalize()) end return true @@ -3648,7 +3648,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[For an instant, your weapons turn into a shadow leash that tries to grab the target's weapon, disarming it for %d turns. The chance to hit improves with your Accuracy.]]): - format(duration) + tformat(duration) end, } @@ -3664,7 +3664,7 @@ newTalent{ info = function(self, t) local chance = t.getChance(self, t) local duration = t.getDuration(self, t) - return ([[Each turn, those caught in your gloom must save against your Mindpower or have an %0.1f%% chance of becoming dismayed for %d turns. When dismayed, the first melee attack against the foe will result in a critical hit.]]):format(chance, duration, mindpowerChange) + return ([[Each turn, those caught in your gloom must save against your Mindpower or have an %0.1f%% chance of becoming dismayed for %d turns. When dismayed, the first melee attack against the foe will result in a critical hit.]]):tformat(chance, duration, mindpowerChange) end, } @@ -3703,7 +3703,7 @@ newTalent{ local duration = t.getDur(self, t) return ([[You are linked to your shadows for %d turns, diverting %d%% of all damage you take to a random shadow. Effect increases with Mindpower.]]): - format(duration, power) + tformat(duration, power) end, } @@ -3747,6 +3747,6 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Creates a circle of radius %d at your feet; the circle lights up affected tiles, increases your positive energy by %d each turn and deals %0.2f light damage and %0.2f fire damage per turn to everyone else within its radius. The circle lasts %d turns. The damage will increase with your Spellpower.]]): - format(radius, 1 + (damage / 4), (damDesc (self, DamageType.LIGHT, damage)), (damDesc (self, DamageType.FIRE, damage)), duration) + tformat(radius, 1 + (damage / 4), (damDesc (self, DamageType.LIGHT, damage)), (damDesc (self, DamageType.FIRE, damage)), duration) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/misc/objects.lua b/game/modules/tome/data/talents/misc/objects.lua index 949aa7007bff7fce0e4c0a5271698f671acfa2fe..0ca7a16448a84b78ab76b11e9748586b213b44a3 100644 --- a/game/modules/tome/data/talents/misc/objects.lua +++ b/game/modules/tome/data/talents/misc/objects.lua @@ -17,12 +17,12 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -newTalentType{ no_silence=true, is_spell=true, type="sher'tul/fortress", name = "fortress", description = "Yiilkgur abilities." } -newTalentType{ no_silence=true, is_spell=true, type="spell/objects", name = "object spells", description = "Spell abilities of the various objects of the world." } -newTalentType{ no_silence=true, type="other/objects", name = "object powers", description = "Abilities of the various objects of the world." } -newTalentType{ type="technique/objects", name = "object techniques", description = "Techniques of the various objects of the world." } -newTalentType{ type="wild-gift/objects", name = "object techniques", description = "Wild gifts of the various objects of the world." } -newTalentType{ type="misc/objects", name = "object techniques", description = "Powers of the various objects of the world." } +newTalentType{ no_silence=true, is_spell=true, type="sher'tul/fortress", name = _t"fortress", description = _t"Yiilkgur abilities." } +newTalentType{ no_silence=true, is_spell=true, type="spell/objects", name = _t"object spells", description = _t"Spell abilities of the various objects of the world." } +newTalentType{ no_silence=true, type="other/objects", name = _t"object powers", description = _t"Abilities of the various objects of the world." } +newTalentType{ type="technique/objects", name = _t"object techniques", description = _t"Techniques of the various objects of the world." } +newTalentType{ type="wild-gift/objects", name = _t"object techniques", description = _t"Wild gifts of the various objects of the world." } +newTalentType{ type="misc/objects", name = _t"object techniques", description = _t"Powers of the various objects of the world." } --local oldTalent = newTalent --local newTalent = function(t) if type(t.hide) == "nil" then t.hide = true end return oldTalent(t) end @@ -102,7 +102,7 @@ newTalent{ info = function(self, t) local count = t.getRemoveCount(self, t) return ([[Removes up to %d detrimental magical effects and empowers you with arcane energy for ten turns, increasing spellpower and spell save by 5 plus 5 per effect removed.]]): - format(count) + tformat(count) end, } @@ -114,7 +114,7 @@ newTalent{ no_unlearn_last = true, no_npc_use = true, message = function(self, t) - return ("@Source@ refocuses the energies of %s mindstar."):format(self:his_her()) + return ("@Source@ refocuses the energies of %s mindstar."):tformat(self:his_her()) end, action = function(self, t) local apply = function(o) @@ -134,7 +134,7 @@ newTalent{ if oh then apply(oh) end end, info = function(self, t) - return ([[Alter the flow of energies of your equiped mindstars, changing their damage type between nature and mind.]]) + return ([[Alter the flow of energies of your equiped mindstars, changing their damage type between nature and mind.]]):tformat() end, } @@ -146,7 +146,7 @@ newTalent{ no_unlearn_last = true, on_unlearn = function(self, t) self.ai_state._pref_staff_element = nil end, message = function(self, t) - return ("@Source@ refocuses the energies of %s staff."):format(self:his_her()) + return ("@Source@ refocuses the energies of %s staff."):tformat(self:his_her()) end, tactical = {BUFF = function(self, t, aitarget) if self.ai_state._pref_staff_element == false then return end @@ -177,7 +177,7 @@ newTalent{ if self.player then -- prompt the player to pick a new element local state = {} local Chat = require("engine.Chat") - local chat = Chat.new("command-staff", {name="Command Staff: "..staff:getName{do_color=true, no_add_name=true}}, self, {version=staff, state=state, co=coroutine.running()}) + local chat = Chat.new("command-staff", {name=_t"Command Staff: "..staff:getName{do_color=true, no_add_name=true}}, self, {version=staff, state=state, co=coroutine.running()}) local d = chat:invoke() if not coroutine.yield() then return nil end return true @@ -194,7 +194,7 @@ newTalent{ end end, info = function(self, t) - return ([[Alter the flow of energies through a staff.]]) + return ([[Alter the flow of energies through a staff.]]):tformat() end, } @@ -211,7 +211,7 @@ newTalent{ action = function(self, t) local state = {} local Chat = require("engine.Chat") - local chat = Chat.new("ward", {name="Ward"}, self, {version=self, state=state}) + local chat = Chat.new("ward", {name=_t"Ward"}, self, {version=self, state=state}) local d = chat:invoke() local co = coroutine.running() --print("before d.unload, state.set_ward is ", state.set_ward) @@ -228,7 +228,7 @@ newTalent{ end end return ([[Bring a damage-type-specific ward into being. The ward will fully negate as many attacks of its element as it has charges. - You can activate the following wards: %s]]):format(#xs>0 and xs or "None") + You can activate the following wards: %s]]):tformat(#xs>0 and xs or "None") end, } @@ -241,7 +241,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Use Yiilkgur's teleporter to teleport to the ground.]]) + return ([[Use Yiilkgur's teleporter to teleport to the ground.]]):tformat() end, } @@ -300,7 +300,7 @@ newTalent{ local list = table.keys(bonuses) local n = #list - if n < 1 then return bt, "None" end + if n < 1 then return bt, _t"None" end local e_string = "" if n == 1 then e_string = DamageType.dam_def[next(bonuses)].name @@ -309,7 +309,7 @@ newTalent{ if DamageType.dam_def[list[i]] and bt[list[i]] then list[i] = DamageType.dam_def[list[i]].text_color..string.lower(DamageType.dam_def[list[i]].name).."#LAST#" end end - e_string = table.concatNice(list, ", ", " and ") + e_string = table.concatNice(list, ", ", _t" and ") end return bt, e_string end, @@ -325,13 +325,13 @@ newTalent{ local ref_text = "" local br_text = "" if properties.sp then - sp_text = (" Increases your spell save by %d for that turn."):format(t.getBlockValue(self, t)) + sp_text = (" Increases your spell save by %d for that turn."):tformat(t.getBlockValue(self, t)) end if properties.ref then - ref_text = " Reflects all blocked damage back to the source." + ref_text = _t" Reflects all blocked damage back to the source." end if properties.br then - br_text = " All blocked damage heals the wielder." + br_text = _t" All blocked damage heals the wielder." end local bt, bt_string = t.getBlockedTypes(self, t) return ([[Raise your shield into blocking position for 2 turns reducing all non-Mind damage by %d. If you block all of an attack's damage, the attacker will be vulnerable to a deadly counterstrike (the next weapon attack will instead deal 200%% damage) for one turn. @@ -340,7 +340,7 @@ newTalent{ If the shield has damage resistance to the blocked damage type the block value is increased by 50%%. Current Bonuses: %s%s%s%s]]): - format(t.getBlockValue(self, t), bt_string, sp_text, ref_text, br_text) + tformat(t.getBlockValue(self, t), bt_string, sp_text, ref_text, br_text) end, } @@ -359,7 +359,7 @@ newTalent{ end, info = function(self, t) return ([[Call upon the power of nature to regenerate your body for %d life every turn for 6 turns. - The life healed will increase with the Willpower stat.]]):format(7 + self:getWil() * 0.5) + The life healed will increase with the Willpower stat.]]):tformat(7 + self:getWil() * 0.5) end, } @@ -424,14 +424,14 @@ newTalent{ if target.undead or target.construct then self:project({type="hit"}, target.x, target.y, engine.DamageType.ARCANE, 40+self:combatMindpower()) if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 5, {apply_power=self:combatMindpower()}) end - game.logSeen(self, "%s's animating magic is disrupted!", target.name:capitalize()) + game.logSeen(self, "%s's animating magic is disrupted!", target:getName():capitalize()) end end end, nil, {type="slime"}) return true end, info = function(self, t) - return ([[The target has a %d%% chance (stacking to a maximum of %d%%) to fail to cast any spell. At level 2 magical effects may be disrupted, at level 3 magical sustains may be disrupted, and at level 5 magical constructs and undead may be stunned.]]):format(t.getpower(self, t),t.maxpower(self,t)) + return ([[The target has a %d%% chance (stacking to a maximum of %d%%) to fail to cast any spell. At level 2 magical effects may be disrupted, at level 3 magical sustains may be disrupted, and at level 5 magical constructs and undead may be stunned.]]):tformat(t.getpower(self, t),t.maxpower(self,t)) end, } @@ -468,7 +468,7 @@ newTalent{ end, info = function(self, t) return ([[You enter into a fighting trance, gaining 15%% resist all, losing 15 mindpower, but gaining 20 mental save. However, each turn after the fifth that this talent is active, there is a chance that you will be overcome and become confused. -This does not take a turn to use.]]) +This does not take a turn to use.]]):tformat() end, } @@ -488,7 +488,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Remove any talent Morrigor has absorbed.]]) + return ([[Remove any talent Morrigor has absorbed.]]):tformat() end, } @@ -520,7 +520,7 @@ newTalent{ local wait = function() local co = coroutine.running() local ok = false - self:restInit(best.digspeed, "digging", "dug", function(cnt, max) + self:restInit(best.digspeed, _t"digging", _t"dug", function(cnt, max) if cnt > max then ok = true end coroutine.resume(co) end) @@ -540,7 +540,7 @@ newTalent{ info = function(self, t) local best = t.findBest(self, t) or {digspeed=100} return ([[Dig/cut a tree/... - Digging takes %d turns (based on your currently best digger available).]]):format(best.digspeed) + Digging takes %d turns (based on your currently best digger available).]]):tformat(best.digspeed) end, } @@ -570,7 +570,7 @@ newTalent{ return ([[You absorb latent cold around you, turning into an ice elemental - a shivgoroth - for %d turns. While transformed, you do not need to breathe, gain access to the Ice Storm talent at level %d, gain %d%% resistance to cuts and stuns, gain %d%% cold resistance, and all cold damage heals you for %d%% of the damage done. The power will increase with your Spellpower.]]): - format(dur, self:getTalentLevelRaw(t), power * 100, power * 100 / 2, 50 + power * 100) + tformat(dur, self:getTalentLevelRaw(t), power * 100, power * 100 / 2, 50 + power * 100) end, } @@ -604,7 +604,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Reset up to 3 wild gift, psionic or cursed talents.]]) + return ([[Reset up to 3 wild gift, psionic or cursed talents.]]):tformat() end, } @@ -670,7 +670,7 @@ newTalent{ end, info = function(self, t) return ([[Raise your dagger into blocking position for one turn, reducing the damage of all physical melee attacks against you by %d. If you block all of an attack's damage, the attacker will be vulnerable to a deadly counterstrike (a normal attack will instead deal 200%% damage) for one turn and be left disarmed for 3 turns. - The blocking value will increase with your Dexterity and Cunning.]]):format(t.getPower(self, t)) + The blocking value will increase with your Dexterity and Cunning.]]):tformat(t.getPower(self, t)) end, } @@ -684,14 +684,14 @@ newTalent{ if not self:isTalentCoolingDown(t) then self:startTalentCooldown(t) cb.value=0 - game.logSeen(self, "#CRIMSON#%s's shield deflects the blow!", self.name) + game.logSeen(self, "#CRIMSON#%s's shield deflects the blow!", self:getName()) return true else return false end end, info = function(self, t) - return ([[Can block up to 1 hit per 10 turns.]]) + return ([[Can block up to 1 hit per 10 turns.]]):tformat() end, } @@ -720,7 +720,7 @@ newTalent{ return true end, info = function(self, t) - return ([[For the next 8 turns, powerful blasts of psionic energies will erupt from you, doing %d damage.]]):format(t.getDamage(self, t)) + return ([[For the next 8 turns, powerful blasts of psionic energies will erupt from you, doing %d damage.]]):tformat(t.getDamage(self, t)) end, } @@ -737,6 +737,6 @@ newTalent{ points = 1, mode = "passive", info = function(self, t) - return ([[Intermediary for melee retaliation.]]) + return ([[Intermediary for melee retaliation.]]):tformat() end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/misc/races.lua b/game/modules/tome/data/talents/misc/races.lua index 84533b0ec54e17f7f10d18e80dbf8f083c99c310..55b8dd79fb504ff771da79c7cfab791472ae0a43 100644 --- a/game/modules/tome/data/talents/misc/races.lua +++ b/game/modules/tome/data/talents/misc/races.lua @@ -34,7 +34,7 @@ racial_req4 = { ------------------------------------------------------------------ -- Highers' powers ------------------------------------------------------------------ -newTalentType{ type="race/higher", name = "higher", generic = true, description = "The various racial bonuses a character can have." } +newTalentType{ type="race/higher", name = _t"higher", generic = true, description = _t"The various racial bonuses a character can have." } newTalent{ short_name = "HIGHER_HEAL", -- Backwards compatibility, two tier 1 racials were swapped @@ -53,7 +53,7 @@ newTalent{ info = function(self, t) return ([[Call upon the power of the Highborn, increasing all damage by %d%% and reducing all damage taken by %d%% for 5 turns. The bonus will increase with your Magic.]]): - format(t.getPower(self, t), t.getPower(self, t)) + tformat(t.getPower(self, t), t.getPower(self, t)) end, } @@ -82,7 +82,7 @@ newTalent{ Their nature grants them better senses than other humans. Increase blindness immunity by %d%%, maximum sight range by %d, and increases existing infravision, and heightened senses range by %d. At talent level 5, each time you hit a target you gain telepathy to all similar creatures in radius 15 for 5 turns.]]): - format(t.getImmune(self, t) * 100, t.getSight(self, t), t.getESight(self, t)) + tformat(t.getImmune(self, t) * 100, t.getSight(self, t), t.getESight(self, t)) end, } @@ -108,7 +108,7 @@ newTalent{ return ([[Highers were originally created during the Age of Allure by the human Conclave. They are imbued with magic at the very core of their being. Increase spell save by %d and arcane resistance by %d%%. Also, when you cast a spell dealing damage, you gain a 20%% bonus to the damage type for 5 turns. (This effect has a cooldown.)]]): - format(t.getSave(self, t), netpower) + tformat(t.getSave(self, t), netpower) end, } @@ -154,14 +154,14 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Activate some of your inner magic, using it to power your abilities. For the next %d turns all active talents will be used without resource cost. Your resources must still be high enough to initially power the talent and failure rates (etc.) still apply. - ]]):format(duration) + ]]):tformat(duration) end, } ------------------------------------------------------------------ -- Shaloren's powers ------------------------------------------------------------------ -newTalentType{ type="race/shalore", name = "shalore", generic = true, is_spell=true, description = "The various racial bonuses a character can have." } +newTalentType{ type="race/shalore", name = _t"shalore", generic = true, is_spell=true, description = _t"The various racial bonuses a character can have." } newTalent{ short_name = "SHALOREN_SPEED", name = "Grace of the Eternals", @@ -179,7 +179,7 @@ newTalent{ info = function(self, t) return ([[Call upon the grace of the Eternals to increase your global speed by %d%% for 5 turns. The speed bonus will increase with your Dexterity or Magic (whichever is higher).]]): - format(t.getSpeed(self, t) * 100) + tformat(t.getSpeed(self, t) * 100) end, } @@ -198,7 +198,7 @@ newTalent{ info = function(self, t) return ([[Reality bends slightly in the presence of a Shaloren due to their inherent magical nature. Increases critical chance by %d%% and critical strike power by %d%%.]]): - format(t.critChance(self, t), t.critPower(self, t)) + tformat(t.critChance(self, t), t.critPower(self, t)) end, } @@ -231,7 +231,7 @@ newTalent{ info = function(self, t) return ([[As the only immortal race of Eyal, Shaloren have learnt over the long years to use their innate inner magic to protect themselves. %d%% chance to become invisible (power %d) for 5 turns when hit by a blow doing at least 10%% of your total life.]]): - format(t.getChance(self, t), t.getInvis(self, t)) + tformat(t.getChance(self, t), t.getInvis(self, t)) end, } @@ -299,14 +299,14 @@ newTalent{ info = function(self, t) return ([[The world grows old as you stand through the ages. To you, time is different. Reduces the time remaining on detrimental effects by %d, most cooling down talents by %d, and increases the time remaining on beneficial effects by %d (up to 2 times the current duration).]]): - format(t.getEffectBad(self, t), t.getEffectGood(self, t), t.getEffectGood(self, t)) + tformat(t.getEffectBad(self, t), t.getEffectGood(self, t), t.getEffectGood(self, t)) end, } ------------------------------------------------------------------ -- Thaloren's powers ------------------------------------------------------------------ -newTalentType{ type="race/thalore", name = "thalore", generic = true, is_nature=true, description = "The various racial bonuses a character can have." } +newTalentType{ type="race/thalore", name = _t"thalore", generic = true, is_nature=true, description = _t"The various racial bonuses a character can have." } newTalent{ short_name = "THALOREN_WRATH", -- Backwards compatibility.. name = "Gift of the Woods", @@ -326,7 +326,7 @@ newTalent{ end, info = function(self, t) return ([[Call upon nature to regenerate your body for %d life every turn and increase healing mod by %d%% for 8 turns. - The life healed will increase with your Willpower or Constitution (whichever is higher).]]):format(t.getHealing(self, t), t.getHealMod(self, t)) + The life healed will increase with your Willpower or Constitution (whichever is higher).]]):tformat(t.getHealing(self, t), t.getHealMod(self, t)) end, } @@ -347,7 +347,7 @@ newTalent{ info = function(self, t) return ([[Thaloren have an affinity for natural elements, allowing them to heal for a portion of damage taken from them. You gain %d%% Nature and Acid damage affinity.]]): - format(t.getAffinity(self, t)) + tformat(t.getAffinity(self, t)) end, } @@ -368,7 +368,7 @@ newTalent{ info = function(self, t) return ([[Thaloren are part of the wood; it shields them from corruption. Increase disease immunity by %d%%, blight resistance by %0.1f%%, and all resistances by %0.1f%%.]]): - format(t.getDiseaseImmune(self, t)*100, t.getBResist(self, t), t.getAllResist(self, t)) + tformat(t.getDiseaseImmune(self, t)*100, t.getBResist(self, t), t.getAllResist(self, t)) end, } @@ -401,9 +401,9 @@ newTalent{ local m = NPC.new{ type = "immovable", subtype = "plants", display = "#", - name = "treant", color=colors.GREEN, + name = _t"treant", color=colors.GREEN, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/immovable_plants_treant.png", display_h=2, display_y=-1}}}, - desc = "A very strong near-sentient tree.", + desc = _t"A very strong near-sentient tree.", body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, @@ -451,14 +451,14 @@ newTalent{ Summons two elite Treants to your side for 8 turns. The treants have a global resistance equal to your blight resistance and can stun, knockback, and taunt foes. Your Willpower (%d) will be added to all of their non-Magic primary stats and their talent levels will increase with your Nature's Pride talent level. - Your increased damage, damage penetration, and many other stats will be inherited.]]):format(self:getWil()) + Your increased damage, damage penetration, and many other stats will be inherited.]]):tformat(self:getWil()) end, } ------------------------------------------------------------------ -- Dwarves' powers ------------------------------------------------------------------ -newTalentType{ type="race/dwarf", name = "dwarf", generic = true, description = "The various racial bonuses a character can have." } +newTalentType{ type="race/dwarf", name = _t"dwarf", generic = true, description = _t"The various racial bonuses a character can have." } newTalent{ short_name = "DWARF_RESILIENCE", name = "Resilience of the Dwarves", @@ -484,7 +484,7 @@ newTalent{ local params = t.getParams(self, t) return ([[Call upon the legendary resilience of the Dwarven race to increase armour (+%d), armour hardiness (+%d%%), spell (+%d) and physical (+%d) saves for 8 turns. The bonuses will increase with your Constitution.]]): - format(params.armor, params.armor_hardiness, params.physical, params.spell) + tformat(params.armor, params.armor_hardiness, params.physical, params.spell) end, } @@ -502,7 +502,7 @@ newTalent{ return ([[Dwarf skin is a complex structure; it can automatically react to physical blows and harden itself. When you are hit in melee, you have a 15%% chance to increase your armour total by %d for 5 turns and fully ignore the attack triggering it. There is no cooldown to this effect; it can happen while already active.]]): - format(t.armor(self, t)) + tformat(t.armor(self, t)) end, } @@ -522,7 +522,7 @@ newTalent{ return ([[Money is the heart of the Dwarven Empire; it rules over all other considerations. Increases Physical, Mental and Spell Saves based on the amount of gold you possess. +1 save every %d gold, up to +%d. (currently +%d)]]): - format(t.getGold(self, t), t.getMaxSaves(self, t), t.getSaves(self, t)) + tformat(t.getGold(self, t), t.getMaxSaves(self, t), t.getSaves(self, t)) end, } @@ -560,14 +560,14 @@ newTalent{ return ([[While the origins of the dwarves remain clouded in mystery to the other races, it is obvious that they share strong ties to the stone. You can target any wall and immediately enter it, appearing on the other side. This can pass through up to %d tiles (increases with Constitution and talent level).]]): - format(range) + tformat(range) end, } ------------------------------------------------------------------ -- Halflings' powers ------------------------------------------------------------------ -newTalentType{ type="race/halfling", name = "halfling", generic = true, description = "The various racial bonuses a character can have." } +newTalentType{ type="race/halfling", name = _t"halfling", generic = true, description = _t"The various racial bonuses a character can have." } newTalent{ short_name = "HALFLING_LUCK", name = "Luck of the Little Folk", @@ -591,7 +591,7 @@ newTalent{ local params = t.getParams(self, t) return ([[Call upon the luck and cunning of the Little Folk to increase your critical strike chance by %d%% and your saves by %d for 5 turns. The bonus will increase with your Cunning.]]): - format(params.crit, params.save) + tformat(params.crit, params.save) end, } @@ -615,7 +615,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Halfling's incredible luck always kicks in at just the right moment to save their skin. Whenever you take %d%% or more of your life from a single attack, you gain %d%% Evasion and %d additional defense for the next %d turns. The defense increases based on your luck and other defensive stats.]]): - format(threshold * 100, evasion, t.getDefense(self), duration) + tformat(threshold * 100, evasion, t.getDefense(self), duration) end, } @@ -628,7 +628,7 @@ newTalent{ info = function(self, t) return ([[Halflings have always been a very organised and methodical race; the more foes they face, the more organised they are. If two or more foes are in sight your Physical Power, Physical Save, Spellpower, Spell Save, Mental Save, and Mindpower are increased by %0.1f per foe (up to 5 foes).]]): - format(self:getTalentLevel(t) * 2) + tformat(self:getTalentLevel(t) * 2) end, } @@ -689,14 +689,14 @@ newTalent{ local duration = t.getDuration(self, t) local count = t.getRemoveCount(self, t) return ([[Halflings have one of the most powerful military forces in the known world and have been at war with most other races for thousands of years. - Removes %d stun, daze, or pin effects and grants immunity to stuns, dazes and pins for %d turns.]]):format(duration, count) + Removes %d stun, daze, or pin effects and grants immunity to stuns, dazes and pins for %d turns.]]):tformat(duration, count) end, } ------------------------------------------------------------------ -- Orcs' powers ------------------------------------------------------------------ -newTalentType{ type="race/orc", name = "orc", generic = true, description = "The various racial bonuses a character can have." } +newTalentType{ type="race/orc", name = _t"orc", generic = true, description = _t"The various racial bonuses a character can have." } newTalent{ short_name = "ORC_FURY", name = "Orcish Fury", @@ -735,7 +735,7 @@ newTalent{ return ([[Summons your lust for blood and destruction; especially when the odds are against you. You increase your damage by 10%% + %0.1f%% per enemy you can see in line of sight of you (maximum 5 enemies, %0.1f%% bonus) for 3 turns. The damage bonus will increase with your Constitution.]]): - format(t.getPower(self, t), 10 + t.getPower(self, t) * 5) + tformat(t.getPower(self, t), 10 + t.getPower(self, t) * 5) end, } @@ -757,7 +757,7 @@ newTalent{ local nb = self:removeEffectsFilter({status = "detrimental", type = "mental"}, t.getDebuff(self, t)) if nb > 0 then - game.logSeen(self, "#CRIMSON#%s roars with rage shaking off %d mental debuffs!", self.name:capitalize(), nb) + game.logSeen(self, "#CRIMSON#%s roars with rage shaking off %d mental debuffs!", self:getName():capitalize(), nb) self:startTalentCooldown(t) end end, @@ -765,7 +765,7 @@ newTalent{ return ([[Orcs have been the prey of the other races for thousands of years, with or without justification. They have learnt to withstand things that would break weaker races. When your life goes below 50%% your sheer determination cleanses you of %d mental debuff(s) based on talent level and Willpower. This can only happen once every %d turns. Also increases physical save by %d.]]): - format(t.getDebuff(self, t), self:getTalentCooldown(t), t.getSaves(self, t)) + tformat(t.getDebuff(self, t), self:getTalentCooldown(t), t.getSaves(self, t)) end, } @@ -789,7 +789,7 @@ newTalent{ You revel in the defeat of your foes, gaining %d%% damage resistance for 2 turns each time you kill an enemy. The resistance will scale with talent level and your Constitution. Additionally, passively increase all damage penetration by %d%%.]]): - format(t.getResist(self, t), t.getPen(self, t)) + tformat(t.getResist(self, t), t.getPen(self, t)) end, } @@ -848,7 +848,7 @@ newTalent{ return ([[Call upon the will of all of the Orc Prides to survive this battle. You remove up to %d detrimental effect(s) then heal for %d life. The healing will increase with talent level and your Willpower.]]): - format(t.remcount(self,t), t.heal(self, t)) + tformat(t.remcount(self,t), t.heal(self, t)) end, } @@ -856,7 +856,7 @@ newTalent{ -- Yeeks' powers ------------------------------------------------------------------ -- We check for max life on boss targets to avoid people using this to engage thus ensuring all their allies target them first -newTalentType{ type="race/yeek", name = "yeek", is_mind=true, generic = true, description = "The various racial bonuses a character can have." } +newTalentType{ type="race/yeek", name = _t"yeek", is_mind=true, generic = true, description = _t"The various racial bonuses a character can have." } newTalent{ short_name = "YEEK_WILL", name = "Dominant Will", @@ -878,11 +878,11 @@ newTalent{ if not target or target.dead or target == self then return end if game.party:hasMember(target) then return end if target.instakill_immune and target.instakill_immune >= 1 then -- We special case this instead of letting the canBe check waste the talent because instakill is at present always binary - game.logSeen(target, "%s is immune to instakill and mind control effects!", target.name:capitalize()) + game.logSeen(target, "%s is immune to instakill and mind control effects!", target:getName():capitalize()) return end if target.rank > 3 and ((target.life / target.max_life) >= 0.8) then - game.logSeen(target, "%s must be below 80%% of their max life to be controlled!", target.name:capitalize()) + game.logSeen(target, "%s must be below 80%% of their max life to be controlled!", target:getName():capitalize()) return end self:project(tg, x, y, function(px, py) @@ -897,7 +897,7 @@ newTalent{ target:setEffect(target.EFF_DOMINANT_WILL, t.getduration(self), {src=self}) end else - game.logSeen(target, "%s resists the mental assault!", target.name:capitalize()) + game.logSeen(target, "%s resists the mental assault!", target:getName():capitalize()) end end) @@ -907,7 +907,7 @@ newTalent{ return ([[Shatter the mind of your victim, giving you full control of its actions for %s turns (based on your Willpower). When the effect ends, you pull out your mind and the victim's body collapses, dead. Targets with ranks at or above rare must be below 80%% of their maximum life to be controlled, will be invulnerable for the duration, and will break free of the effect without dying after 3 turns. - This effect cannot be saved against but checks instakill immunity.]]):format(t.getduration(self)) + This effect cannot be saved against but checks instakill immunity.]]):tformat(t.getduration(self)) end, } @@ -927,7 +927,7 @@ newTalent{ info = function(self, t) return ([[Your mind becomes more attuned to the Way, and is shielded from outside effects. Increase confusion and silence immunities by %d%% and Mental Save by %d.]]): - format(100*t.getImmune(self, t), t.getSave(self, t)) + tformat(100*t.getImmune(self, t), t.getSave(self, t)) end, } @@ -947,14 +947,14 @@ newTalent{ if self:isTalentCoolingDown(t) then return end if (self.life / self.max_life) >= 0.3 then return end - game.logSeen(self, "#RED#%s reacts immediately after taking severe wounds!#LAST#", self.name:capitalize()) + game.logSeen(self, "#RED#%s reacts immediately after taking severe wounds!#LAST#", self:getName():capitalize()) self.energy.value = self.energy.value + game.energy_to_act * 1.5 self:startTalentCooldown(t) end, info = function(self, t) return ([[Yeeks live fast, think fast, and sacrifice fast for the Way. Your global speed is increased by %0.1f%%. - If your life drops below 30%% you gain 1.5 turns. This effect can only happen once every %d turns.]]):format(100*t.speedup(self, t), self:getTalentCooldown(t)) + If your life drops below 30%% you gain 1.5 turns. This effect can only happen once every %d turns.]]):tformat(100*t.speedup(self, t), self:getTalentCooldown(t)) end, } @@ -987,9 +987,9 @@ newTalent{ local m = NPC.new{ type = "humanoid", subtype = "yeek", display = "y", - name = "yeek mindslayer", color=colors.YELLOW, + name = _t"yeek mindslayer", color=colors.YELLOW, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_yeek_yeek_mindslayer.png", display_h=2, display_y=-1}}}, - desc = "A wayist that came to help.", + desc = _t"A wayist that came to help.", body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, PSIONIC_FOCUS=1 }, @@ -1046,7 +1046,7 @@ newTalent{ return ([[Reach through the collective psionic gestalt of the yeeks, the Way, to call for immediate help. Summons up to 3 yeek mindslayers to your side for 6 turns. All their primary stats will be set to %d (based on your Willpower and Talent Level). - Your increased damage, damage penetration, and many other stats will be inherited.]]):format(base_stats) + Your increased damage, damage penetration, and many other stats will be inherited.]]):tformat(base_stats) end, } @@ -1061,14 +1061,14 @@ newTalent{ on_learn = function(self, t) self.auto_id = 100 end, info = function(self, t) return ([[You merge your mind with the rest of the Way for a brief moment; the sum of all yeek knowledge gathers in your mind - and allows you to identify any item you could not recognize yourself.]]) + and allows you to identify any item you could not recognize yourself.]]):tformat() end, } ------------------------------------------------------------------ -- Ogre' powers ------------------------------------------------------------------ -newTalentType{ type="race/ogre", name = "ogre", is_spell=true, generic = true, description = "The various racial bonuses a character can have." } +newTalentType{ type="race/ogre", name = _t"ogre", is_spell=true, generic = true, description = _t"The various racial bonuses a character can have." } newTalent{ short_name = "OGRE_WRATH", name = "Ogric Wrath", @@ -1092,7 +1092,7 @@ newTalent{ In addition, whenever you use an infusion or rune, miss a melee attack, or any damage you deal is reduced by a damage shield (or similar effect) you gain a charge of Ogre Fury (up to 5 charges total, each lasting 7 turns). Each charge grants 20%% critical damage power and 5%% critical strike chance. You lose a charge each time you deal a critical strike. - The duration will increase with your Strength.]]):format(t.getduration(self)) + The duration will increase with your Strength.]]):tformat(t.getduration(self)) end, } @@ -1120,7 +1120,7 @@ newTalent{ Increases spell save by %d and improves the contribution of primary stats on infusions and runes by %d%%. At level 5 your body is so strong you can use a two handed weapon in your main hand while still using an offhand item. When using a two handed weapon this way you suffer a 20%% accuracy, physical power, spellpower and mindpower penalty, decreasing by 5%% per size category above #{italic}#big#{normal}#; further, all damage procs from your weapons are reduced by 50%%.]]): - format(t.getSave(self, t), t.getMult(self, t) * 100) + tformat(t.getSave(self, t), t.getMult(self, t) * 100) end, } @@ -1153,7 +1153,7 @@ newTalent{ info = function(self, t) return ([[When you crit you have a %d%% chance to reduce by 1 the remaining cooldown of one of your inscriptions and of any saturations effects. This effect can only happen once per turn.]]): - format(t.getChance(self, t)) + tformat(t.getChance(self, t)) end, } @@ -1183,6 +1183,6 @@ newTalent{ return ([[Instantly removes runic and infusion saturations. For %d turns your inscriptions cool down twice as fast. At level 5 your command over inscriptions is so good that you can use one more (you still need a category point to unlock it; you need to exit the levelup screen to validate it).]]): - format(t.getDuration(self, t)) + tformat(t.getDuration(self, t)) end, } diff --git a/game/modules/tome/data/talents/misc/tutorial.lua b/game/modules/tome/data/talents/misc/tutorial.lua index 37ff4a6ef9a05a2a40d7834647977d256ac7ca86..330ec31b1bfe124d5775866802ff64bdba566a12 100644 --- a/game/modules/tome/data/talents/misc/tutorial.lua +++ b/game/modules/tome/data/talents/misc/tutorial.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org -- race & classes -newTalentType{ type="tutorial", name = "tutorial", hide = true, description = "Tutorial-specific talents." } +newTalentType{ type="tutorial", name = _t"tutorial", hide = true, description = _t"Tutorial-specific talents." } newTalent{ name = "Shove", short_name = "TUTORIAL_PHYS_KB", @@ -36,12 +36,12 @@ newTalent{ if self:checkHit(self:combatPhysicalpower(), target:combatPhysicalResist()) then target:knockback(self.x, self.y, 1) else - game.logSeen(target, "%s resists the shove!", target.name:capitalize()) + game.logSeen(target, "%s resists the shove!", target:getName():capitalize()) end return true end, info = function(self, t) - return ([[Give the target a good old-fashioned shove, knocking it back a square.]]) + return ([[Give the target a good old-fashioned shove, knocking it back a square.]]):tformat() end, } @@ -61,16 +61,16 @@ newTalent{ if core.fov.distance(self.x, self.y, x, y) > self:getTalentRange(t) then return nil end if self:checkHit(self:combatSpellpower(), target:combatPhysicalResist()) then target:knockback(self.x, self.y, self:getTalentLevel(t)) - game.logSeen(target, "%s is knocked back by the gale!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back by the gale!", target:getName():capitalize()) target:crossTierEffect(target.EFF_OFFBALANCE, self:combatSpellpower()) else - game.logSeen(target, "%s remains firmly planted in the face of the gale!", target.name:capitalize()) + game.logSeen(target, "%s remains firmly planted in the face of the gale!", target:getName():capitalize()) end return true end, info = function(self, t) local dist = self:getTalentLevel(t) - return ([[Conjure up a powerful magical wind, pushing the target back a distance of %d.]]):format(dist) + return ([[Conjure up a powerful magical wind, pushing the target back a distance of %d.]]):tformat(dist) end, } @@ -90,15 +90,15 @@ newTalent{ if core.fov.distance(self.x, self.y, x, y) > self:getTalentRange(t) then return nil end if self:checkHit(self:combatMindpower(), target:combatPhysicalResist()) then target:knockback(self.x, self.y, 1) - game.logSeen(target, "%s is knocked back by the telekinetic blow!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back by the telekinetic blow!", target:getName():capitalize()) target:crossTierEffect(target.EFF_OFFBALANCE, self:combatMindpower()) else - game.logSeen(target, "%s holds its ground!", target.name:capitalize()) + game.logSeen(target, "%s holds its ground!", target:getName():capitalize()) end return true end, info = function(self, t) - return ([[Knock the target backwards with a powerful telekinetic blow.]]) + return ([[Knock the target backwards with a powerful telekinetic blow.]]):tformat() end, } @@ -118,15 +118,15 @@ newTalent{ if core.fov.distance(self.x, self.y, x, y) > self:getTalentRange(t) then return nil end if self:checkHit(self:combatSpellpower(), target:combatSpellResist()) then target:knockback(self.x, self.y, 1) - game.logSeen(target, "%s is teleported a short distance!", target.name:capitalize()) + game.logSeen(target, "%s is teleported a short distance!", target:getName():capitalize()) target:crossTierEffect(target.EFF_SPELLSHOCKED, self:combatSpellpower()) else - game.logSeen(target, "%s resists the teleportation!", target.name:capitalize()) + game.logSeen(target, "%s resists the teleportation!", target:getName():capitalize()) end return true end, info = function(self, t) - return ([[Attempts to magically teleport a target slightly farther from you.]]) + return ([[Attempts to magically teleport a target slightly farther from you.]]):tformat() end, } @@ -146,15 +146,15 @@ newTalent{ if core.fov.distance(self.x, self.y, x, y) > self:getTalentRange(t) then return nil end if self:checkHit(self:combatMindpower(), target:combatMentalResist()) then target:knockback(self.x, self.y, 1) - game.logSeen(target, "%s retreats in terror!", target.name:capitalize()) + game.logSeen(target, "%s retreats in terror!", target:getName():capitalize()) target:crossTierEffect(target.EFF_BRAINLOCKED, self:combatMindpower()) else - game.logSeen(target, "%s shakes off the fear!", target.name:capitalize()) + game.logSeen(target, "%s shakes off the fear!", target:getName():capitalize()) end return true end, info = function(self, t) - return ([[Attempts to briefly terrify a target into retreating.]]) + return ([[Attempts to briefly terrify a target into retreating.]]):tformat() end, } @@ -178,7 +178,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Inflicts a 10-turn bleed effect.]]) + return ([[Inflicts a 10-turn bleed effect.]]):tformat() end, } @@ -202,6 +202,6 @@ newTalent{ return true end, info = function(self, t) - return ([[Use your mental powers to confuse the target for five turns.]]) + return ([[Use your mental powers to confuse the target for five turns.]]):tformat() end, } diff --git a/game/modules/tome/data/talents/psionic/absorption.lua b/game/modules/tome/data/talents/psionic/absorption.lua index ecc7c4ff3413864a20fc993c40ca9c7ee63270ba..64a94cc0a6d60451ff149d5197e80de8f9470da7 100644 --- a/game/modules/tome/data/talents/psionic/absorption.lua +++ b/game/modules/tome/data/talents/psionic/absorption.lua @@ -192,7 +192,7 @@ newTalent{ At talent level 3, when you de-activate the shield twice the absorbed damage (if any) in the last 3 turns is released as a full psionic shield (absorbing all damage). The maximum amount of damage your shield can absorb and the efficiency of the psi gain scale with your mindpower. You can only have two of these shields active at once.]]): - format(absorb, s_str, shieldMastery(self, t), maxPsiAbsorb(self,t)) + tformat(absorb, s_str, shieldMastery(self, t), maxPsiAbsorb(self,t)) end, } @@ -257,7 +257,7 @@ newTalent{ At talent level 3, when you de-activate the shield twice the absorbed damage (if any) in the last 3 turns is released as a full psionic shield (absorbing all damage). The maximum amount of damage your shield can absorb and the efficiency of the psi gain scale with your mindpower. You can only have two of these shields active at once.]]): - format(absorb, s_str, shieldMastery(self, t), maxPsiAbsorb(self,t)) + tformat(absorb, s_str, shieldMastery(self, t), maxPsiAbsorb(self,t)) end, } @@ -322,7 +322,7 @@ newTalent{ At talent level 3, when you de-activate the shield twice the absorbed damage (if any) in the last 3 turns is released as a full psionic shield (absorbing all damage). The maximum amount of damage your shield can absorb and the efficiency of the psi gain scale with your mindpower. You can only have two of these shields active at once.]]): - format(absorb, s_str, shieldMastery(self, t), maxPsiAbsorb(self,t)) + tformat(absorb, s_str, shieldMastery(self, t), maxPsiAbsorb(self,t)) end, } @@ -388,6 +388,6 @@ newTalent{ return ([[Surround yourself with a forcefield, reducing all incoming damage by %d%%. Such a shield is very expensive to maintain, draining 5%% of your maximum psi per turn initially plus an addition 5%% for each turn it has been maintained. For example, on turn 2 it will drain 10%%. Current drain rate: %0.1f psi/turn]]): - format(t.getResist(self,t), drain) + tformat(t.getResist(self,t), drain) end, } diff --git a/game/modules/tome/data/talents/psionic/augmented-mobility.lua b/game/modules/tome/data/talents/psionic/augmented-mobility.lua index cce61c62ccd67f73cc22ba8cd10a674fb3347638..171afe20a408a0bc9efcfe9f1d24a7927ab892cd 100644 --- a/game/modules/tome/data/talents/psionic/augmented-mobility.lua +++ b/game/modules/tome/data/talents/psionic/augmented-mobility.lua @@ -45,7 +45,7 @@ newTalent{ return ([[You telekinetically float just off the ground. This allows you to slide around the battle quickly, increasing your movement speed by %d%%. It also makes you more vulnerable to being pushed around (-%d%% knockback resistance).]]): - format(t.getSpeed(self, t)*100, t.getKBVulnerable(self, t)*100) + tformat(t.getSpeed(self, t)*100, t.getKBVulnerable(self, t)*100) end, } @@ -76,7 +76,7 @@ newTalent{ return ([[Encase your body in a sheath of thought-quick forces, allowing you to control your body's movements directly without the inefficiency of dealing with crude mechanisms like nerves and muscles. Increases Accuracy by %d, your critical strike chance by %0.1f%% and your global speed by %d%% for %d turns. The duration improves with your Mindpower.]]): - format(boost, 0.5*boost, percentinc, t.getDuration(self, t)) + tformat(boost, 0.5*boost, percentinc, t.getDuration(self, t)) end, } @@ -111,7 +111,7 @@ newTalent{ return ([[Briefly extend your telekinetic reach to grab an enemy and haul them towards you. Works on enemies up to %d squares away. The cooldown decreases, and the range increases, with additional talent points spent.]]): - format(range) + tformat(range) end, } @@ -126,7 +126,7 @@ newTalent{ range = function(self, t) return math.floor(math.max(1, self:combatTalentLimit(t, 10, 2, 7.5))) -- Limit < 10 end, - message = "@Source@ performs a telekinetically enhanced leap!", + message = _t"@Source@ performs a telekinetically enhanced leap!", target = function(self, t) local range=self:getTalentRange(t) local tg = {talent=t, type="hit", nolock=true, pass_terrain=false, nowarning=true, range=range} @@ -147,6 +147,6 @@ newTalent{ info = function(self, t) local range = self:getTalentRange(t) return ([[You perform a precise, telekinetically-enhanced leap, landing up to %d squares from your starting point.]]): - format(range) + tformat(range) end, } diff --git a/game/modules/tome/data/talents/psionic/augmented-striking.lua b/game/modules/tome/data/talents/psionic/augmented-striking.lua index ae0e174d680a3843ac089d398514dffd66b294dc..018d4192eed5123fb4c70b5e767df69f7adc37dc 100644 --- a/game/modules/tome/data/talents/psionic/augmented-striking.lua +++ b/game/modules/tome/data/talents/psionic/augmented-striking.lua @@ -52,7 +52,7 @@ newTalent{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, dur, {apply_power=self:combatMindpower()}) else - game.logSeen(target, "%s resists the pin!", target.name:capitalize()) + game.logSeen(target, "%s resists the pin!", target:getName():capitalize()) end if target:attr("frozen") then DamageType:get(DamageType.PHYSICAL).projector(self, x, y, DamageType.PHYSICAL, dam) @@ -102,7 +102,7 @@ newTalent{ They will be pinned to the ground for %d turns by the force of this attack. Any frozen creature hit by this attack will take an extra %0.2f physical damage. The extra damage will scale with your Mindpower.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.5, 2.0), t.getDur(self, t), damDesc(self, DamageType.PHYSICAL, t.getDam(self, t))) + tformat(100 * self:combatTalentWeaponDamage(t, 0.5, 2.0), t.getDur(self, t), damDesc(self, DamageType.PHYSICAL, t.getDam(self, t))) end, } @@ -153,8 +153,8 @@ newTalent{ if oe and not oe:attr("temporary") and not game.level.map:checkAllEntities(x + i, y + j, "block_move") and not oe.special then local e = Object.new{ old_feat = oe, - name = "ice wall", image = "npc/iceblock.png", - desc = "a summoned, transparent wall of ice", + name = _t"ice wall", image = "npc/iceblock.png", + desc = _t"a summoned, transparent wall of ice", type = "wall", display = '#', color=colors.LIGHT_BLUE, back_color=colors.BLUE, always_remember = true, @@ -200,7 +200,7 @@ newTalent{ A burst of cold will then engulf them, doing an extra %0.1f Cold damage and also freeze them for %d turns. If the attack freezes a pinned creature a burst of ice is summoned, circling the caster and the creature with a wall of ice for 3 turns. The cold burst damage will scale with your Mindpower.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.5, 2.0), damDesc(self, DamageType.COLD, t.getDam(self, t)), t.getDur(self, t)) + tformat(100 * self:combatTalentWeaponDamage(t, 0.5, 2.0), damDesc(self, DamageType.COLD, t.getDam(self, t)), t.getDur(self, t)) end, } @@ -316,7 +316,7 @@ newTalent{ If the target is pinned and Charged Shield is sustained, its absorb value will be increased by %0.2f. If the target is frozen, the ice will melt in a flash of vapour, knocking back all creatures around it in radius 2. The discharge damage will scale with your Mindpower.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.5, 2.0), damDesc(self, DamageType.LIGHTNING, t.getDam(self, t)), t.getDur(self, t), 1.5 * damDesc(self, DamageType.LIGHTNING, t.getDam(self, t))) + tformat(100 * self:combatTalentWeaponDamage(t, 0.5, 2.0), damDesc(self, DamageType.LIGHTNING, t.getDam(self, t)), t.getDur(self, t), 1.5 * damDesc(self, DamageType.LIGHTNING, t.getDam(self, t))) end, } @@ -332,6 +332,6 @@ newTalent{ self:talentTemporaryValue(p, "combat_apr", t.getPsiRecover(self, t)*3) end, info = function(self, t) - return ([[Wrap a psionic energy field around your weapons, increasing their armour penentration by %d and allowing you to siphon excess energy from each weapon hit you land, gaining %0.1f psi per hit.]]):format(t.getPsiRecover(self, t)*3, t.getPsiRecover(self, t)) + return ([[Wrap a psionic energy field around your weapons, increasing their armour penentration by %d and allowing you to siphon excess energy from each weapon hit you land, gaining %0.1f psi per hit.]]):tformat(t.getPsiRecover(self, t)*3, t.getPsiRecover(self, t)) end, } diff --git a/game/modules/tome/data/talents/psionic/charged-mastery.lua b/game/modules/tome/data/talents/psionic/charged-mastery.lua index 1f64ea9ef84f0d62ab578310756ede6e660ccf77..ff4b92fbf92e6e8ad3173e628db03e836291a800 100644 --- a/game/modules/tome/data/talents/psionic/charged-mastery.lua +++ b/game/modules/tome/data/talents/psionic/charged-mastery.lua @@ -50,7 +50,7 @@ newTalent{ Charge Leech will also inflict confusion (%d%% effect). Charged Strike will have its secondary lightning burst chain to up to 3 targets in a radius of 3. The damage bonus and resistance penetration scale with your Mindpower. - Only one Transcendent talent may be in effect at a time.]]):format(t.getDuration(self, t), t.getPower(self, t), t.getPenetration(self, t), t.getConfuse(self, t)) + Only one Transcendent talent may be in effect at a time.]]):tformat(t.getDuration(self, t), t.getPower(self, t), t.getPenetration(self, t), t.getConfuse(self, t)) end, } @@ -72,7 +72,7 @@ newTalent{ info = function(self, t) return ([[Detect the mental activity of creatures in a radius of %d for %d turns. This reveals their location and boosts your defense by %d. - The defense scales with you Mindpower and the range with your Willpower.]]):format(t.radius(self, t), t.getDuration(self, t), t.getDefense(self, t)) + The defense scales with you Mindpower and the range with your Willpower.]]):tformat(t.radius(self, t), t.getDuration(self, t), t.getDefense(self, t)) end, } @@ -120,7 +120,7 @@ newTalent{ Enemies standing in the net will take %0.1f Lightning damage and be slowed by %d%%. When you move through the net, a static charge will accumulate on your weapon which will add %0.1f additional Lightning damage to your next attack for each turn you spend within its area. These effects scale with your Mindpower.]]): - format(self:getTalentRadius(t), duration, damDesc(self, DamageType.LIGHTNING, damage), t.getSlow(self, t), damDesc(self, DamageType.LIGHTNING, t.getWeaponDamage(self, t))) + tformat(self:getTalentRadius(t), duration, damDesc(self, DamageType.LIGHTNING, damage), t.getSlow(self, t), damDesc(self, DamageType.LIGHTNING, t.getWeaponDamage(self, t))) end, } @@ -157,7 +157,7 @@ newTalent{ return ([[Store an electric charge for saving your life at a later time. If you are reduced to less than zero life while this is active, it will deactivate, cure you of all stun/daze/freeze effects and allow you to survive with up to %d negative health for %d turns. The negative health limit scales with your Mindpower and maxium life.]]): - format(t.getPower(self, t), t.getDuration(self, t)) + tformat(t.getPower(self, t), t.getDuration(self, t)) end, } diff --git a/game/modules/tome/data/talents/psionic/discharge.lua b/game/modules/tome/data/talents/psionic/discharge.lua index d47d340ffb89b533057f3d206e4ee4bb359ad507..c314aec8c6b17d99dbe23566406203dc84061954 100644 --- a/game/modules/tome/data/talents/psionic/discharge.lua +++ b/game/modules/tome/data/talents/psionic/discharge.lua @@ -104,7 +104,7 @@ newTalent{ return ([[Unleash your subconscious on the world around you. While active, you fire up to %d bolts each turn (one per hostile target) that deal %0.2f mind damage. Each bolt consumes 5 Feedback. Feedback gains beyond your maximum allowed amount may generate extra bolts (one bolt per %d excess Feedback per target), but no more than %d extra bolts per turn. This effect is a psionic channel, increasing the range of Mind Sear, Psychic Lobotomy, and Sunder Mind to 10 but will break if you move. - The damage will scale with your Mindpower.]]):format(targets, damDesc(self, DamageType.MIND, damage), charge_ratio, targets) + The damage will scale with your Mindpower.]]):tformat(targets, damDesc(self, DamageType.MIND, damage), charge_ratio, targets) end, } @@ -135,7 +135,7 @@ newTalent{ local duration = t.getDuration(self, t, true) return ([[Activate to invert your Feedback decay for %d turns. This effect can be a critical hit, increasing the duration even further. You must have some Feedback in order to start the loop. - The maximum Feedback gain will scale with your Mindpower.]]):format(duration) + The maximum Feedback gain will scale with your Mindpower.]]):tformat(duration) end, } @@ -178,7 +178,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Your subconscious now retaliates when you take damage. If the attacker is within range (%d), you'll inflict mind damage equal to the Feedback gained from the attack or %0.2f, whichever is lower. This effect can only happen once per creature per turn. - The damage will scale with your Mindpower.]]):format(range, damDesc(self, DamageType.MIND, damage)) + The damage will scale with your Mindpower.]]):tformat(range, damDesc(self, DamageType.MIND, damage)) end, } @@ -220,6 +220,6 @@ newTalent{ local crit_bonus = t.getCritBonus(self, t) return ([[Focus your mind on a single target, diverting all offensive Discharge talent effects to it for %d turns. While this effect is active, all Discharge talents gain %d%% critical power and you ignore %d%% mind resistance of your targets. If the target is killed, the effect will end early. - The damage bonus will scale with your Mindpower.]]):format(duration, crit_bonus, penetration) + The damage bonus will scale with your Mindpower.]]):tformat(duration, crit_bonus, penetration) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/psionic/distortion.lua b/game/modules/tome/data/talents/psionic/distortion.lua index 1ea607cf44d46a44ac38ea6e45572885c81683f0..6608ae603466af4263c40369f4e71b88455ab6ae 100644 --- a/game/modules/tome/data/talents/psionic/distortion.lua +++ b/game/modules/tome/data/talents/psionic/distortion.lua @@ -70,7 +70,7 @@ newTalent{ If the bolt comes in contact with a target that's already distorted, a detonation will occur, inflicting 150%% of the base damage in a radius of %d. Investing in this talent will increase the physical resistance reduction from all of your distortion effects. At talent level 5, you learn to shape your distortion effects, preventing them from hitting you or your allies. - The damage will scale with your Mindpower.]]):format(damDesc(self, DamageType.PHYSICAL, damage), distort, radius) + The damage will scale with your Mindpower.]]):tformat(damDesc(self, DamageType.PHYSICAL, damage), distort, radius) end, } @@ -115,7 +115,7 @@ newTalent{ This damage will distort affected targets, decreasing physical resistance by %d%% and rendering them vulnerable to distortion effects for two turns. Investing in this talent will increase the physical resistance reduction from all of your distortion effects. If the target is already distorted, they'll be stunned for %d turns as well. - The damage will scale with your Mindpower.]]):format(radius, damDesc(self, DamageType.PHYSICAL, damage), distort, power) + The damage will scale with your Mindpower.]]):tformat(radius, damDesc(self, DamageType.PHYSICAL, damage), distort, power) end, } @@ -161,7 +161,7 @@ newTalent{ This damage will distort affected targets, decreasing physical resistance by %d%% and rendering them vulnerable to distortion effects for two turns. If the target is already distorted when Ravage is applied, the damage will be increased by 50%% and the target will lose one beneficial physical effect or sustain each turn. Investing in this talent will increase the physical resistance reduction from all of your distortion effects. - The damage will scale with your Mindpower.]]):format(damDesc(self, DamageType.PHYSICAL, damage), duration, distort) + The damage will scale with your Mindpower.]]):tformat(damDesc(self, DamageType.PHYSICAL, damage), duration, distort) end, } @@ -192,7 +192,7 @@ newTalent{ local e = Object.new{ old_feat = oe, type = "psionic", subtype = "maelstrom", - name = self.name:capitalize().. "'s maelstrom", + name = ("%s's maelstrom"):tformat(self:getName():capitalize()), display = ' ', tooltip = mod.class.Grid.tooltip, always_remember = true, @@ -263,6 +263,6 @@ newTalent{ return ([[Create a powerful maelstorm for %d turns. Each turn, the maelstrom will pull in targets within a radius of %d, and inflict %0.2f physical damage. This damage will distort affected targets, decreasing physical resistance by %d%% and rendering them vulnerable to distortion effects for two turns. Investing in this talent will increase the physical resistance reduction from all of your distortion effects. - The damage will scale with your Mindpower.]]):format(duration, radius, damDesc(self, DamageType.PHYSICAL, damage), distort) + The damage will scale with your Mindpower.]]):tformat(duration, radius, damDesc(self, DamageType.PHYSICAL, damage), distort) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/psionic/dream-forge.lua b/game/modules/tome/data/talents/psionic/dream-forge.lua index fbe9e338f14821611ec2aa66b1589ab975f60a81..9ea665e91c2d545863c912ed36d41c1c8e332075 100644 --- a/game/modules/tome/data/talents/psionic/dream-forge.lua +++ b/game/modules/tome/data/talents/psionic/dream-forge.lua @@ -48,7 +48,7 @@ newTalent{ self:setEffect(self.EFF_FORGE_SHIELD, dur, {power=t.getPower(self, t), number=1, d_types={[type]=true}}) amt = util.bound(dam - t.getPower(self, t), 0, dam) blocked = t.getPower(self, t) - game.logSeen(self, "#ORANGE#%s forges a dream shield to block the attack!", self.name:capitalize()) + game.logSeen(self, "#ORANGE#%s forges a dream shield to block the attack!", self:getName():capitalize()) elseif eff and eff.d_types[type] then amt = util.bound(dam - eff.power, 0, dam) blocked = eff.power @@ -57,7 +57,7 @@ newTalent{ eff.d_types[type] = true amt = util.bound(dam - eff.power, 0, dam) blocked = eff.power - game.logSeen(self, "#ORANGE#%s's dream shield has been strengthened by the attack!", self.name:capitalize()) + game.logSeen(self, "#ORANGE#%s's dream shield has been strengthened by the attack!", self:getName():capitalize()) end if blocked then @@ -93,7 +93,7 @@ newTalent{ You may block multiple damage types at one time, but the base damage threshold increases by 15%% per damage type the shield is already blocking. If you block all of an attack's damage, the attacker will be vulnerable to a deadly counterstrike (a normal melee or ranged attack will instead deal 200%% damage) for one turn. At talent level 5, the block effect will last two turns. - This damage reduction scales with your Mindpower.]]):format(power, dur) + This damage reduction scales with your Mindpower.]]):tformat(power, dur) end, } @@ -133,13 +133,13 @@ newTalent{ local e = Object.new{ old_feat = oe, type = oe.type, subtype = oe.subtype, - name = self.name:capitalize().."'s forge barrier", + name = ("%s's forge barrier"):tformat(self:getName():capitalize()), image = "terrain/lava/lava_mountain5.png", display = '#', color=colors.RED, back_color=colors.DARK_GREY, shader = "shadow_simulacrum", shader_args = { color = {0.6, 0.0, 0.0}, base = 0.9, time_factor = 1500 }, always_remember = true, - desc = "a summoned wall of mental energy", + desc = _t"a summoned wall of mental energy", type = "wall", can_pass = {pass_wall=1}, does_block_move = true, @@ -190,7 +190,7 @@ newTalent{ return ([[Release the bellows of the forge upon your surroundings, inflicting %0.2f mind damage, %0.2f burning damage, and knocking back your enemies in a radius %d cone. Empty terrain may be changed (50%% chance) for %d turns into forge walls, which block movement and inflict %0.2f mind and %0.2f fire damage on nearby enemies. The damage and knockback chance will scale with your Mindpower.]]): - format(damDesc(self, DamageType.MIND, blast_damage), damDesc(self, DamageType.FIRE, blast_damage), radius, duration, damDesc(self, DamageType.MIND, forge_damage), damDesc(self, DamageType.FIRE, forge_damage)) + tformat(damDesc(self, DamageType.MIND, blast_damage), damDesc(self, DamageType.FIRE, blast_damage), radius, duration, damDesc(self, DamageType.MIND, forge_damage), damDesc(self, DamageType.FIRE, forge_damage)) end, } @@ -208,7 +208,7 @@ newTalent{ local defense = t.getDefense(self, t) local psi = t.getPsiRegen(self, t) return([[Your Forge Shield talent now increases your Armour by %d, your Defense by %d, and gives you %0.2f psi when you're hit by a melee or ranged attack. - The bonuses will scale with your Mindpower.]]):format(armor, defense, psi) + The bonuses will scale with your Mindpower.]]):tformat(armor, defense, psi) end, } @@ -248,10 +248,10 @@ newTalent{ if p.damage < max_damage then p.radius = math.min(p.radius + 1, max_radius) p.damage = math.min(max_damage/4 + p.damage, max_damage) - game.logSeen(self, "#GOLD#%s strikes the dreamforge!", self.name:capitalize()) + game.logSeen(self, "#GOLD#%s strikes the dreamforge!", self:getName():capitalize()) elseif p.power == 0 then p.power = power - game.logSeen(self, "#GOLD#%s begins breaking dreams!", self.name:capitalize()) + game.logSeen(self, "#GOLD#%s begins breaking dreams!", self:getName():capitalize()) game:playSoundNear(self, "talents/lightning_loud") end local tg = {type="ball", range=self:getTalentRange(t), friendlyfire=false, radius=p.radius, talent=t} @@ -281,6 +281,6 @@ newTalent{ At this point you'll begin breaking the dreams of enemies who hear the forge, reducing their Mental Save by %d and giving them a %d%% chance of spell failure due to the tremendous echo in their minds for %d turns. Broken Dreams has a %d%% chance to brainlock your enemies. The damage and dream breaking effect will scale with your Mindpower.]]): - format(radius, damDesc(self, DamageType.MIND, damage), damDesc(self, DamageType.FIRE, damage), power, fail, duration, chance) + tformat(radius, damDesc(self, DamageType.MIND, damage), damDesc(self, DamageType.FIRE, damage), power, fail, duration, chance) end, } diff --git a/game/modules/tome/data/talents/psionic/dream-smith.lua b/game/modules/tome/data/talents/psionic/dream-smith.lua index 64976eb5fd67982cb6e4a87ffdeff64a3652a9aa..cc5b7b735bb1ad20460f69e243e67e5d54b409e5 100644 --- a/game/modules/tome/data/talents/psionic/dream-smith.lua +++ b/game/modules/tome/data/talents/psionic/dream-smith.lua @@ -113,7 +113,7 @@ newTalent{ The base power, Accuracy, Armour penetration, and critical strike chance of the weapon will scale with your Mindpower. Current Dream Hammer Stats: - %s]]):format(damage * 100, tostring(weapon_stats)) + %s]]):tformat(damage * 100, tostring(weapon_stats)) end, } @@ -158,7 +158,7 @@ newTalent{ if x == px and y == py and self and self.x and self.y then print("[Dream Hammer Return] Projection from", x, y, "to", self.x, self.y) local tgr = tg - tgr.name = "Hammer Toss" + tgr.name = _t"Hammer Toss" tgr.x, tgr.y = px, py self:projectile(tgr, self.x, self.y, function(px, py, tgr, self) local tmp_target = game.level.map(px, py, engine.Map.ACTOR) @@ -177,7 +177,7 @@ newTalent{ local damage = t.getDamage(self, t) local attack_bonus = t.getAttack(self, t) return ([[Throw your Dream Hammer at a distant location, inflicting %d%% weapon damage on all targets between you and it. After reaching its destination, the Dream Hammer will return, potentially hitting targets a second time. - Learning this talent increases the Accuracy of your Dream Hammer by %d.]]):format(damage * 100, attack_bonus) + Learning this talent increases the Accuracy of your Dream Hammer by %d.]]):tformat(damage * 100, attack_bonus) end, } @@ -208,7 +208,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getStun(self, t), {apply_power=self:combatMindpower()}) else - game.logSeen(target, "%s resists the stunning blow!", target.name:capitalize()) + game.logSeen(target, "%s resists the stunning blow!", target:getName():capitalize()) end if rng.percent(50) then game.level.map:particleEmitter(target.x, target.y, 1, "generic_discharge", {rm=225, rM=255, gm=0, gM=0, bm=0, bM=0, am=35, aM=90}) @@ -226,7 +226,7 @@ newTalent{ local stun = t.getStun(self, t) return ([[Crush your enemy with your Dream Hammer, inflicting %d%% weapon damage. If the attack hits, the target is stunned for %d turns. Stun chance improves with your Mindpower. Learning this talent increases your Physical Power for Dream Hammer damage calculations by %d and all damage with Dream Hammer attacks by %d%%. - ]]):format(damage * 100, stun, power, percent * 100) + ]]):tformat(damage * 100, stun, power, percent * 100) end, } @@ -281,6 +281,6 @@ newTalent{ local project = t.getProject(self, t) /2 return ([[Strike an adjacent target with a mighty blow from the forge, inflicting %d%% weapon damage. If the attack hits, the echo of the attack will lash out at all enemies in a %d radius of the impact. Learning this talent adds %0.2f mind damage and %0.2f burning damage to your Dream Hammer strikes. - The mind and fire damage will scale with your Mindpower.]]):format(damage * 100, radius, damDesc(self, DamageType.MIND, project), damDesc(self, DamageType.FIRE, project)) + The mind and fire damage will scale with your Mindpower.]]):tformat(damage * 100, radius, damDesc(self, DamageType.MIND, project), damDesc(self, DamageType.FIRE, project)) end, } diff --git a/game/modules/tome/data/talents/psionic/dreaming.lua b/game/modules/tome/data/talents/psionic/dreaming.lua index a93d036ee6cefdbdd77f82f78b8e646563e9e95c..e22afd2944359fa1d515cbb7b4cedabe16d541f0 100644 --- a/game/modules/tome/data/talents/psionic/dreaming.lua +++ b/game/modules/tome/data/talents/psionic/dreaming.lua @@ -79,7 +79,7 @@ newTalent{ target:setEffect(target.EFF_SLEEP, t.getDuration(self, t), {src=self, power=power, contagious=is_contagious, waking=is_waking, insomnia=t.getInsomniaPower(self, t), no_ct_effect=true, apply_power=self:combatMindpower()}) game.level.map:particleEmitter(target.x, target.y, 1, "generic_charge", {rm=0, rM=0, gm=180, gM=255, bm=180, bM=255, am=35, aM=90}) else - game.logSeen(self, "%s resists the sleep!", target.name:capitalize()) + game.logSeen(self, "%s resists the sleep!", target:getName():capitalize()) end end end) @@ -94,7 +94,7 @@ newTalent{ return([[Puts targets in a radius of %d to sleep for %d turns, rendering them unable to act. Every %d points of damage the target suffers will reduce the effect duration by one turn. When Sleep ends, the target will suffer from Insomnia for a number of turns equal to the amount of time it was asleep (up to ten turns max), granting it %d%% sleep immunity for each turn of the Insomnia effect. At talent level 5 Sleep will become contagious and has a 25%% chance to spread to nearby targets each turn. - The damage threshold will scale with your Mindpower.]]):format(radius, duration, power, insomnia) + The damage threshold will scale with your Mindpower.]]):tformat(radius, duration, power, insomnia) end, } @@ -132,7 +132,7 @@ newTalent{ local power = t.getPower(self, t) return ([[Slip into a lucid dream. While in this state, you are considered sleeping, but can still act, are immune to insomnia, inflict %d%% more damage to targets under the effects of Insomnia, and your Physical, Mental, and Spell saves are increased by %d. Note that being asleep may make you more vulnerable to certain effects (such as Inner Demons, Night Terror, and Waking Nightmare). - The saving throw bonuses scale with your Mindpower.]]):format(power, power) + The saving throw bonuses scale with your Mindpower.]]):tformat(power, power) end, } @@ -188,7 +188,7 @@ newTalent{ info = function(self, t) local radius = self:getTalentRadius(t) return ([[You move through the dream world, reappearing at a nearby location. - If there is a sleeping creature at the target location, you'll appear as close to them as possible, otherwise, you'll appear within %d tiles of your intended destination.]]):format(radius) + If there is a sleeping creature at the target location, you'll appear as close to them as possible, otherwise, you'll appear within %d tiles of your intended destination.]]):tformat(radius) end, } @@ -228,6 +228,6 @@ newTalent{ local drain = t.getDrain(self, t) return ([[Imprisons all sleeping targets within range in their dream state, effectively extending sleeping effects for as long as Dream Prison is maintainted. This powerful effect constantly drains %0.2f%% of your maximum Psi (excluding this talent) per turn, and is considered a psionic channel; as such it will break if you move. - (Note that sleeping effects that happen each turn, such as Nightmare's damage and Sleep's contagion, will cease to function for the duration of the effect.)]]):format(drain) + (Note that sleeping effects that happen each turn, such as Nightmare's damage and Sleep's contagion, will cease to function for the duration of the effect.)]]):tformat(drain) end, } diff --git a/game/modules/tome/data/talents/psionic/feedback.lua b/game/modules/tome/data/talents/psionic/feedback.lua index d7cbeb2be1636ea30ee6ce52a8631c1b854a7ae7..8da83fe9794a02ff6faa0490f5cc675667d146e5 100644 --- a/game/modules/tome/data/talents/psionic/feedback.lua +++ b/game/modules/tome/data/talents/psionic/feedback.lua @@ -33,7 +33,7 @@ newTalent{ local newDecay = decaySpeed*0.1 local netHeal = newDecay*heal return ([[Your Feedback decay now heals you for %0.1f times the loss, and the decay rate is reduced to %d%% of the normal rate (up to %0.1f%% per turn). As a result, you are healed for %0.2f%% of your feedback pool each turn. - The healing effect improves with your Willpower.]]):format(heal, decaySpeed*100, newDecay*100, netHeal*100) + The healing effect improves with your Willpower.]]):tformat(heal, decaySpeed*100, newDecay*100, netHeal*100) end, } @@ -56,7 +56,7 @@ newTalent{ info = function(self, t) local shield_power = t.getShieldPower(self, t) return ([[Activate to create a resonance field that will absorb 50%% of all damage you take (%d max absorption). The field will not interfere with Feedback gain. - The max absorption value will scale with your Mindpower, and the effect lasts up to ten turns.]]):format(shield_power) + The max absorption value will scale with your Mindpower, and the effect lasts up to ten turns.]]):tformat(shield_power) end, } @@ -82,14 +82,14 @@ newTalent{ local max_feedback = t.getMaxFeedback(self, t) local gain = t.getFeedbackGain(self, t) return ([[Increases your maximum Feedback by %d, and increases your base Feedback gain ratio to %d%%. - The Feedback gain will scale with your Mindpower.]]):format(max_feedback, gain * 100) + The Feedback gain will scale with your Mindpower.]]):tformat(max_feedback, gain * 100) end, info = function(self, t) local max_feedback = t.getMaxFeedback(self, t) local gain = t.getFeedbackGain(self, t) local feedbackratio = self:callTalent(self.T_FEEDBACK_POOL, "getFeedbackRatio") return ([[Increases your maximum Feedback by %d, and increases the Feedback you gain from damage by %0.1f%% (to %0.1f%% of damage received). - The Feedback gain will scale with your Mindpower.]]):format(max_feedback, gain*100, feedbackratio*100) + The Feedback gain will scale with your Mindpower.]]):tformat(max_feedback, gain*100, feedbackratio*100) end, } @@ -137,6 +137,6 @@ newTalent{ info = function(self, t) local data = t.getData(self, t) return ([[Use Feedback to replenish yourself. This heals you for %d life, and restores %d stamina, %d mana, %d equilibrium, %d vim, %d positive and negative energies, %d psi energy, and %d hate. - The heal and resource gain will improve with your Mindpower.]]):format(data.heal, data.stamina, data.mana, -data.equilibrium, data.vim, data.positive, data.psi, data.hate) + The heal and resource gain will improve with your Mindpower.]]):tformat(data.heal, data.stamina, data.mana, -data.equilibrium, data.vim, data.positive, data.psi, data.hate) end, } diff --git a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua index 3f903464c37d1d288d295407a755528386a1941e..48d8bffc85d2ba5aa6a144f6b33fbf0838bbc87d 100644 --- a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua +++ b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua @@ -63,7 +63,7 @@ newTalent{ end end if known then - game.logSeen(self, "%s is cured!", self.name:capitalize()) + game.logSeen(self, "%s is cured!", self:getName():capitalize()) end if core.shader.active(4) then @@ -78,7 +78,7 @@ newTalent{ local cure = t.numCure(self, t) return ([[Realign and readjust your body with the power of your mind, curing up to %d detrimental physical effects and healing you for %d life. The life healed increases with your Mindpower.]]): - format(cure, heal) + tformat(cure, heal) end, } @@ -118,7 +118,7 @@ newTalent{ The accuracy and damage of any weapon will act as if it were %d higher. (Mindstars cannot be manipulated in this way because they are already in an ideal natural state.) Your total armour will increase by %d and your fatigue will decrease by %d for each body armour and shield worn. The effects increase with your Mindpower.]]): - format(weapon_boost, arm, fat) + tformat(weapon_boost, arm, fat) end, } @@ -134,7 +134,7 @@ newTalent{ return self:combatTalentMindDamage(t, 10, 40) end, action = function(self, t) - local ret = self:talentDialog(self:showInventory("Use which gem?", self:getInven("INVEN"), function(gem) return gem.type == "gem" and gem.material_level and not gem.unique end, function(gem, gem_item) + local ret = self:talentDialog(self:showInventory(_t"Use which gem?", self:getInven("INVEN"), function(gem) return gem.type == "gem" and gem.material_level and not gem.unique end, function(gem, gem_item) self:removeObject(self:getInven("INVEN"), gem_item) local amt = t.energy_per_turn(self, t) local dur = 3 + 2*(gem.material_level or 0) @@ -150,7 +150,7 @@ newTalent{ return ([[Matter is energy, as any good Mindslayer knows. Unfortunately, the various bonds and particles involved are just too numerous and complex to make the conversion feasible in most cases. The ordered, crystalline structure of a gem, however, make it possible to transform a small percentage of its matter into usable energy. This talent consumes one gem and grants %d psi per turn for between 5 and 13 turns, depending on the quality of the gem used. This process also creates a resonance field that provides the (imbued) effects of the gem to you while this effect lasts.]]): - format(amt) + tformat(amt) end, } @@ -179,6 +179,6 @@ newTalent{ For conventional weapons, this increases the percentage of your willpower and cunning that is used in place of strength and dexterity for all weapon attacks, from 60%% to %d%%. For mindstars, this increases the chance to pull enemies to you by +%d%%. For gems, this increases the bonus stats by %d.]]): - format(60+inc, inc, math.ceil(inc/5)) + tformat(60+inc, inc, math.ceil(inc/5)) end, } diff --git a/game/modules/tome/data/talents/psionic/focus.lua b/game/modules/tome/data/talents/psionic/focus.lua index d81a55d0a4d36fac6520f899e7e4910c07eba17a..a5f8e73ff0687a611019b42d030fa6c531b76bab 100644 --- a/game/modules/tome/data/talents/psionic/focus.lua +++ b/game/modules/tome/data/talents/psionic/focus.lua @@ -60,7 +60,7 @@ newTalent{ local dam = t.getDamage(self, t) return ([[Focus energies into a beam to lash all creatures in a line with physical force, doing %d Physical damage and knocking them off balance (-15%% damage penalty) for 2 turns. The damage will scale with your Mindpower.]]): - format(damDesc(self, DamageType.PHYSICAL, dam)) + tformat(damDesc(self, DamageType.PHYSICAL, dam)) end, } @@ -97,7 +97,7 @@ newTalent{ local radius = self:getTalentRadius(t) local dam = t.getDamage(self, t) return ([[Telekinetically energize the matter of all foes within %d squares at the molecular level, setting them ablaze. This does %0.1f fire damage over six turns.]]): - format(radius, damDesc(self, DamageType.FIRE, dam)) + tformat(radius, damDesc(self, DamageType.FIRE, dam)) end, } @@ -143,7 +143,7 @@ newTalent{ The plasma will explode on impact, dealing %0.1f Lightning damage within radius %d. This talent will apply cross tier Brainlock. The damage will increase with your Mindpower.]]): - format(damDesc(self, DamageType.LIGHTNING, dam), self:getTalentRadius(t)) + tformat(damDesc(self, DamageType.LIGHTNING, dam), self:getTalentRadius(t)) end, } @@ -173,11 +173,11 @@ newTalent{ if #effs > 0 then local eff = rng.tableRemove(effs) self:removeEffect(eff[2]) - game.logSeen(self, "#ORCHID#%s has recovered!", self.name:capitalize()) + game.logSeen(self, "#ORCHID#%s has recovered!", self:getName():capitalize()) end end, info = function(self, t) return ([[Your Iron Will improves your stun immunity by %d%% and gives you a %d%% chance of recovering from a random mental effect each turn.]]): - format(t.stunImmune(self, t)*100, t.cureChance(self, t)*100) + tformat(t.stunImmune(self, t)*100, t.cureChance(self, t)*100) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/psionic/grip.lua b/game/modules/tome/data/talents/psionic/grip.lua index 824d14250f47c5a8c514c93526ec5c27c8df779b..fbf81b4833dc92ab2355ef4b11df572bb8e1c4f5 100644 --- a/game/modules/tome/data/talents/psionic/grip.lua +++ b/game/modules/tome/data/talents/psionic/grip.lua @@ -55,7 +55,7 @@ newTalent{ local dur = t.getDuration(self, t) return ([[Bind the target in crushing bands of telekinetic force, immobilizing it for %d turns. The duration will improve with your Mindpower.]]): - format(dur) + tformat(dur) end, } @@ -80,6 +80,6 @@ newTalent{ Allows %d%% of Willpower and Cunning (instead of the usual 60%%) to be substituted for Strength and Dexterity for the purposes of determining damage done by telekinetically-wielded weapons. At talent level 5, telekinetically wielded gems and mindstars will be treated as one material level higher than they actually are. ]]): - format(t.getImmune(self, t)*100, boost) + tformat(t.getImmune(self, t)*100, boost) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/psionic/kinetic-mastery.lua b/game/modules/tome/data/talents/psionic/kinetic-mastery.lua index d9e47bf05b409be227e59c40863445201eecadac..8407db0276586f69ab31e9119ff409c3591eeea2 100644 --- a/game/modules/tome/data/talents/psionic/kinetic-mastery.lua +++ b/game/modules/tome/data/talents/psionic/kinetic-mastery.lua @@ -49,7 +49,7 @@ newTalent{ Kinetic Leech will put enemies to sleep. Kinetic Strike will hit 2 adjacent enemies in a sweeping attack. The damage bonus and resistance penetration scale with your Mindpower. - Only one Transcendent talent may be in effect at a time.]]):format(t.getDuration(self, t), t.getPower(self, t), t.getPenetration(self, t)) + Only one Transcendent talent may be in effect at a time.]]):tformat(t.getDuration(self, t), t.getPower(self, t), t.getPenetration(self, t)) end, } @@ -99,7 +99,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, math.floor(self:getTalentRange(t) / 2), {apply_power=self:combatMindpower()}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end else --If the target resists the knockback, do half damage to it. target:logCombat(self, "#YELLOW##Source# resists #Target#'s throw!") @@ -151,7 +151,7 @@ newTalent{ When used on yourself, you will launch in a straight line, knocking enemies flying and doing %0.1f Physical damage to each. You can break through %d walls while doing this. The damage and range increases with Mindpower.]]): - format(range, dam, math.floor(range/2), dam/2, t.getKBResistPen(self, t), dam, math.floor(range/2)) + tformat(range, dam, math.floor(range/2), dam/2, t.getKBResistPen(self, t), dam, math.floor(range/2)) end, } @@ -212,7 +212,7 @@ newTalent{ All projectiles targeting you have a %d%% chance to instead target another spot within radius %d and move %d%% slower. If you choose, you can use your mind to grab all projectiles within radius 10 of you and hurl them toward any location within range %d of you, but this will break your concentration. To do this, deactivate this sustained talent.]]): - format(chance, spread, chance, self:getTalentRange(t)) + tformat(chance, spread, chance, self:getTalentRange(t)) end, } @@ -255,6 +255,6 @@ newTalent{ local dam = t.getDamage(self, t) return ([[Bind the target mercilessly with constant, bone-shattering pressure, pinning and slowing it by 50%% for %d turns and dealing %0.1f Physical damage each turn. The duration and damage improve with Mindpower.]]): - format(dur, damDesc(self, DamageType.PHYSICAL, dam)) + tformat(dur, damDesc(self, DamageType.PHYSICAL, dam)) end, } diff --git a/game/modules/tome/data/talents/psionic/mental-discipline.lua b/game/modules/tome/data/talents/psionic/mental-discipline.lua index c4a818e5f650a50de79c013228a0ef68d848e5b1..8467f9fff46281da425493e2bfa5104ba5c30fe6 100644 --- a/game/modules/tome/data/talents/psionic/mental-discipline.lua +++ b/game/modules/tome/data/talents/psionic/mental-discipline.lua @@ -32,7 +32,7 @@ newTalent{ local cooldown = t.cooldownred(self,t) local mast = t.getMastery(self, t) return ([[Your expertise in the art of energy projection grows. - Aura cooldowns are all reduced by %d turns. Aura damage drains energy more slowly (+%0.2f damage required to lose a point of energy).]]):format(cooldown, mast) + Aura cooldowns are all reduced by %d turns. Aura damage drains energy more slowly (+%0.2f damage required to lose a point of energy).]]):tformat(cooldown, mast) end, } @@ -49,7 +49,7 @@ newTalent{ local cooldown = t.cooldownred(self,t) local mast = t.mastery(self,t) return ([[Your expertise in the art of energy absorption grows. Shield cooldowns are all reduced by %d turns, the amount of damage absorption required to gain a point of energy is reduced by %0.1f, and the maximum energy you can gain from each shield is increased by %0.1f per turn.]]): - format(cooldown, mast, t.absorbLimit(self, t)) + tformat(cooldown, mast, t.absorbLimit(self, t)) end, } @@ -71,7 +71,7 @@ newTalent{ end, info = function(self, t) return ([[Improves Mental Saves by %d, and stun immunity by %d%%.]]): - format(self:getTalentLevelRaw(t)*6, t.stunImmune(self, t)*100) + tformat(self:getTalentLevelRaw(t)*6, t.stunImmune(self, t)*100) end, } @@ -95,6 +95,6 @@ newTalent{ end, info = function(self, t) return ([[A life of the mind has had predictably good effects on your Willpower and Cunning. - Increases Willpower and Cunning by %d.]]):format(2*self:getTalentLevelRaw(t)) + Increases Willpower and Cunning by %d.]]):tformat(2*self:getTalentLevelRaw(t)) end, } diff --git a/game/modules/tome/data/talents/psionic/mentalism.lua b/game/modules/tome/data/talents/psionic/mentalism.lua index 4d4f5aa597a9798eee956d90b2c9e22bab32ea9f..7db27cdacf3c5a3b6e3008364ba06d24aef788a2 100644 --- a/game/modules/tome/data/talents/psionic/mentalism.lua +++ b/game/modules/tome/data/talents/psionic/mentalism.lua @@ -54,7 +54,7 @@ newTalent{ info = function(self, t) local max = t.getPsychometryCap(self, t) return ([[Resonate with psionic, nature, and anti-magic powered objects you wear, increasing your physical and mind power by %0.2f or %d%% of the object's material level (whichever is lower). - This effect stacks and applies for each qualifying object worn.]]):format(max, 100*t.getMaterialMult(self,t)) + This effect stacks and applies for each qualifying object worn.]]):tformat(max, 100*t.getMaterialMult(self,t)) end, } @@ -106,13 +106,13 @@ newTalent{ self:setEffect(self.EFF_CLEAR_MIND, 6, {power=count}) end - game.logSeen(self, "%s's mind is clear!", self.name:capitalize()) + game.logSeen(self, "%s's mind is clear!", self:getName():capitalize()) game:playSoundNear(self, "talents/heal") return true end, info = function(self, t) local count = t.getRemoveCount(self, t) - return ([[Clears your mind of current mental effects, and blocks additional ones over 6 turns. At most, %d mental effects will be affected.]]):format(count) + return ([[Clears your mind of current mental effects, and blocks additional ones over 6 turns. At most, %d mental effects will be affected.]]):tformat(count) end, } @@ -143,8 +143,8 @@ newTalent{ ai_target={actor=table.NIL_MERGE}, ai = "summoned", ai_real = "tactical", subtype = "ghost", is_psychic_projection = 1, - name = "Projection of "..self.name, - desc = [[A ghostly figure.]], + name = ("Projection of %s"):tformat(self:getName()), + desc = _t[[A ghostly figure.]], lite=0, } m:removeTimedEffectsOnClone() @@ -179,7 +179,7 @@ newTalent{ game.party:addMember(m, { control="full", type = m.type, subtype="ghost", - title="Projection of "..self.name, + title=("Projection of %s"):tformat(self:getName()), temporary_level=1, orders = {target=true}, on_control = function(self) @@ -209,7 +209,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Activate to project your mind from your body for %d turns. In this state you're invisible (+%d power), can see invisible and stealthed creatures (+%d detection power), can move through walls, and do not need air to survive. All damage you suffer is shared with your physical body, and while in this form you may only deal damage to 'ghosts' or through an active mind link (mind damage only in the second case.) - To return to your body, simply release control of the projection.]]):format(duration, power/2, power) + To return to your body, simply release control of the projection.]]):tformat(duration, power/2, power) end, } @@ -277,6 +277,6 @@ newTalent{ local range = self:getTalentRange(t) * 2 return ([[Link minds with the target. While your minds are linked, you'll inflict %d%% more mind damage to the target and gain telepathy for its creature type. Only one mindlink can be maintained at a time, and the effect will break if the target dies or goes beyond range (%d)). - The mind damage bonus will scale with your Mindpower.]]):format(damage, range) + The mind damage bonus will scale with your Mindpower.]]):tformat(damage, range) end, } diff --git a/game/modules/tome/data/talents/psionic/nightmare.lua b/game/modules/tome/data/talents/psionic/nightmare.lua index 9b1bec395fbe1dd145a4cb9e79522ba9fd8888b3..a06e11f14d47ddc7da61eb43c5440d05f5447c2a 100644 --- a/game/modules/tome/data/talents/psionic/nightmare.lua +++ b/game/modules/tome/data/talents/psionic/nightmare.lua @@ -65,7 +65,7 @@ newTalent{ if target:canBe("sleep") then target:setEffect(target.EFF_NIGHTMARE, t.getDuration(self, t), {src=self, power=power, waking=is_waking, dam=damage, insomnia=t.getInsomniaPower(self, t), no_ct_effect=true, apply_power=self:combatMindpower()}) else - game.logSeen(self, "%s resists the nightmare!", target.name:capitalize()) + game.logSeen(self, "%s resists the nightmare!", target:getName():capitalize()) end end end) @@ -83,7 +83,7 @@ newTalent{ return([[Puts targets in a radius %d cone into a nightmarish sleep for %d turns, rendering them unable to act. Every %d points of damage the target suffers will reduce the effect duration by one turn. Each turn, they'll suffer %0.2f darkness damage. This damage will not reduce the duration of the effect. When Nightmare ends, the target will suffer from Insomnia for a number of turns equal to the amount of time it was asleep (up to ten turns max), granting it %d%% sleep immunity for each turn of the Insomnia effect. - The damage threshold and mind damage will scale with your Mindpower.]]):format(radius, duration, power, damDesc(self, DamageType.DARKNESS, (damage)), insomnia) + The damage threshold and mind damage will scale with your Mindpower.]]):tformat(radius, duration, power, damDesc(self, DamageType.DARKNESS, (damage)), insomnia) end, } @@ -123,8 +123,8 @@ newTalent{ ai_target = {actor=target}, ai = "summoned", ai_real = "tactical", ai_tactic={escape=0}, -- never flee - name = ""..target.name.."'s Inner Demon", - desc = [[A hideous, demonic entity that resembles the creature it came from.]], + name = ("%s's Inner Demon"):tformat(target:getName()), + desc = _t[[A hideous, demonic entity that resembles the creature it came from.]], } mod.class.NPC.castAs(m) engine.interface.ActorAI.init(m, m) @@ -152,7 +152,7 @@ newTalent{ game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "generic_teleport", {rm=60, rM=130, gm=20, gM=110, bm=90, bM=130, am=70, aM=180}) - game.logSeen(target, "#F53CBE#%s's Inner Demon manifests!", target.name:capitalize()) + game.logSeen(target, "#F53CBE#%s's Inner Demon manifests!", target:getName():capitalize()) end, action = function(self, t) @@ -173,7 +173,7 @@ newTalent{ if target:canBe("fear") or target:attr("sleep") then target:setEffect(target.EFF_INNER_DEMONS, t.getDuration(self, t), {src = self, chance=chance, apply_power=self:combatMindpower()}) else - game.logSeen(target, "%s resists the demons!", target.name:capitalize()) + game.logSeen(target, "%s resists the demons!", target:getName():capitalize()) end game:playSoundNear(self, "talents/arcane") @@ -185,7 +185,7 @@ newTalent{ return ([[Brings the target's inner demons to the surface. Each turn, for %d turns, there's a %d%% chance that a demon will surface, requiring the target to make a Mental Save to keep it from manifesting. If the target is sleeping, the chance to save will be halved, and fear immunity will be ignored. Otherwise, if the summoning is resisted, the effect will end early. The summon chance will scale with your Mindpower and the demon's life will scale with the target's rank. - If a demon manifests the sheer terror will remove all sleep effects from the victim, but not the Inner Demons.]]):format(duration, chance) + If a demon manifests the sheer terror will remove all sleep effects from the victim, but not the Inner Demons.]]):tformat(duration, chance) end, } @@ -222,7 +222,7 @@ newTalent{ target:setEffect(target.EFF_WAKING_NIGHTMARE, t.getDuration(self, t), {src = self, chance=t.getChance(self, t), dam=self:mindCrit(t.getDamage(self, t)), apply_power=self:combatMindpower()}) game.level.map:particleEmitter(target.x, target.y, 1, "generic_charge", {rm=60, rM=130, gm=20, gM=110, bm=90, bM=130, am=70, aM=180}) else - game.logSeen(target, "%s resists the nightmare!", target.name:capitalize()) + game.logSeen(target, "%s resists the nightmare!", target:getName():capitalize()) end game:playSoundNear(self, "talents/arcane") @@ -235,7 +235,7 @@ newTalent{ return ([[Inflicts %0.2f darkness damage each turn for %d turns, and has a %d%% chance to randomly cause blindness, stun, or confusion (lasting 3 turns). If the target is sleeping, the chance of avoiding a negative effect will be halved and fear immunity will be ignored. The damage will scale with your Mindpower.]]): - format(damDesc(self, DamageType.DARKNESS, (damage)), duration, chance) + tformat(damDesc(self, DamageType.DARKNESS, (damage)), duration, chance) end, } @@ -266,10 +266,10 @@ newTalent{ local stats = 10 + self:combatTalentMindDamage(t, 10, 50) local NPC = require "mod.class.NPC" local m = NPC.new{ - name = "terror", + name = _t"terror", display = "h", color=colors.DARK_GREY, image="npc/horror_eldritch_nightmare_horror.png", blood_color = colors.BLUE, - desc = "A formless terror that seems to cut through the air, and its victims, like a knife.", + desc = _t"A formless terror that seems to cut through the air, and its victims, like a knife.", type = "horror", subtype = "eldritch", rank = 2, size_category = 2, @@ -315,7 +315,7 @@ newTalent{ game.party:addMember(m, { control="no", type="terror", - title="Night Terror", + title=_t"Night Terror", orders = {target=true}, }) end @@ -338,6 +338,6 @@ newTalent{ local damage = t.getDamageBonus(self, t) local summon = t.getSummonTime(self, t) return ([[Increases your damage and resistance penetration on sleeping targets by %d%%. Additionally, every time you slay a sleeping target, a Night Terror will be summoned for %d turns. - The Night Terror's stats will scale with your Mindpower, as will the damage bonus to sleeping targets.]]):format(damage, summon) + The Night Terror's stats will scale with your Mindpower, as will the damage bonus to sleeping targets.]]):tformat(damage, summon) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/psionic/other.lua b/game/modules/tome/data/talents/psionic/other.lua index 235025737f92655f132f3c71bdf084f2b393f5a6..a61ab6edee53b93151b02e756c29f4590641eb54 100644 --- a/game/modules/tome/data/talents/psionic/other.lua +++ b/game/modules/tome/data/talents/psionic/other.lua @@ -29,7 +29,7 @@ newTalent{ filter = function(o) return (o.type == "weapon" or o.type == "gem") end, action = function(self, t) local inven = self:getInven("INVEN") - local ret = self:talentDialog(self:showInventory("Telekinetically grasp which item?", inven, t.filter, function(o, item) + local ret = self:talentDialog(self:showInventory(_t"Telekinetically grasp which item?", inven, t.filter, function(o, item) local pf = self:getInven("PSIONIC_FOCUS") if not pf then return end -- Put back the old one in inventory @@ -67,7 +67,7 @@ newTalent{ o = self:removeObject(inven, item) -- Force "wield" self:addObject(pf, o) - game.logSeen(self, "%s telekinetically seizes: %s.", self.name:capitalize(), o:getName{do_color=true}) + game.logSeen(self, "%s telekinetically seizes: %s.", self:getName():capitalize(), o:getName{do_color=true}) self:sortInven() self:talentDialogReturn(true) @@ -77,7 +77,7 @@ newTalent{ end, info = function(self, t) return ([[Telekinetically grasp a weapon or gem using mentally-directed forces, holding it aloft and bringing it to bear with the power of your mind alone. - Note: The normal restrictions on worn equipment do not apply to this item.]]) + Note: The normal restrictions on worn equipment do not apply to this item.]]):tformat() end, } @@ -199,7 +199,7 @@ newTalent{ local tx, ty = util.findFreeGrid(self.x, self.y, 5, true, {[Map.ACTOR]=true}) if tx and ty and a:canBe("knockback") then a:move(tx, ty, true) - game.logSeen(a, "%s telekinetically grabs %s!", self.name:capitalize(), a.name) + game.logSeen(a, "%s telekinetically grabs %s!", self:getName():capitalize(), a.name) end end, callbackOnActBase = function(self, t) @@ -240,7 +240,7 @@ newTalent{ local tk = self:getInven("PSIONIC_FOCUS") and self:getInven("PSIONIC_FOCUS")[1] if not tk then return false end - local ret = {name = self.name:capitalize().."'s "..t.name} + local ret = {name = ("%s's %s"):tformat(self:getName():capitalize(), t.name)} if tk.type == "gem" then local power = (tk.material_level or 1) * 3 + math.ceil(self:callTalent(self.T_RESONANT_FOCUS, "bonus") / 5) self:talentTemporaryValue(ret, "inc_stats", { @@ -272,7 +272,7 @@ newTalent{ return true end, info = function(self, t) - local base = [[Allows you to wield a physical melee or ranged weapon, a mindstar or a gem telekinetically, gaining a special effect for each. + local base = _t[[Allows you to wield a physical melee or ranged weapon, a mindstar or a gem telekinetically, gaining a special effect for each. A gem will provide a +3 bonus to all primary stats per tier of the gem. A mindstar will randomly try to telekinetically grab a far away foe (10% chance and range 3 for a tier 1 mindstar, +1 range and +5% chance for each tier above 1) and pull it into melee range. A physical melee weapon will act as a semi independant entity, automatically attacking adjacent foes each turn, while a ranged weapon will fire at your target whenever you perform a ranged attack. @@ -295,10 +295,10 @@ newTalent{ if ammo and ammo.archery_ammo ~= o.archery then ammo = nil end if o.type == "gem" then local ml = o.material_level or 1 - base = base..([[The telekinetically-wielded gem grants you +%d stats.]]):format(ml * 3) + base = base..([[The telekinetically-wielded gem grants you +%d stats.]]):tformat(ml * 3) elseif o.subtype == "mindstar" then local ml = o.material_level or 1 - base = base..([[The telekinetically-wielded mindstar has a %d%% chance to grab a foe up to %d range away.]]):format((ml + 1) * 5, ml + 2) + base = base..([[The telekinetically-wielded mindstar has a %d%% chance to grab a foe up to %d range away.]]):tformat((ml + 1) * 5, ml + 2) elseif o.archery and ammo then self:attr("use_psi_combat", 1) range = math.max(math.min(o.combat.range or 6), self:attr("archery_range_override") or 1) @@ -316,7 +316,7 @@ newTalent{ APR: %d Crit: %0.1f%% Speed: %0.1f%%]]): - format(range, atk, dam, apr, crit, speed*100) + tformat(range, atk, dam, apr, crit, speed*100) else self:attr("use_psi_combat", 1) atk = self:combatAttack(o.combat) @@ -332,7 +332,7 @@ newTalent{ APR: %d Crit: %0.2f Speed: %0.2f]]): - format(atk, dam, apr, crit, speed) + tformat(atk, dam, apr, crit, speed) end return base end, diff --git a/game/modules/tome/data/talents/psionic/projection.lua b/game/modules/tome/data/talents/psionic/projection.lua index 5c213ab15bac467d74a51a064febbde95f123f40..436ed10a6470ba91b378ac0a4e7ee2c45af4a1a8 100644 --- a/game/modules/tome/data/talents/psionic/projection.lua +++ b/game/modules/tome/data/talents/psionic/projection.lua @@ -255,7 +255,7 @@ newTalent{ #{bold}#Activating the aura takes no time but de-activating it does.#{normal}# To turn off an aura without spiking it, deactivate it and target yourself. The damage will improve with your Mindpower. You can only have two of these auras active at once.]]): - format(damDesc(self, DamageType.PHYSICAL, dam), mast, damDesc(self, DamageType.PHYSICAL, dam), mast, spikecost, t.getSpikedRange(self, t), + tformat(damDesc(self, DamageType.PHYSICAL, dam), mast, damDesc(self, DamageType.PHYSICAL, dam), mast, spikecost, t.getSpikedRange(self, t), damDesc(self, DamageType.PHYSICAL, spikedam)) end, } @@ -375,7 +375,7 @@ newTalent{ #{bold}#Activating the aura takes no time but de-activating it does.#{normal}# To turn off an aura without spiking it, deactivate it and target yourself. The damage will improve with your Mindpower. You can only have two of these auras active at once.]]): - format(damDesc(self, DamageType.FIRE, dam), mast, damDesc(self, DamageType.FIRE, dam), mast, spikecost, rad, + tformat(damDesc(self, DamageType.FIRE, dam), mast, damDesc(self, DamageType.FIRE, dam), mast, spikecost, rad, damDesc(self, DamageType.FIRE, spikedam)) end, } @@ -539,7 +539,7 @@ newTalent{ #{bold}#Activating the aura takes no time but de-activating it does.#{normal}# To turn off an aura without spiking it, deactivate it and target yourself. The damage will improve with your Mindpower. You can only have two of these auras active at once.]]): - format(damDesc(self, DamageType.LIGHTNING, dam), mast, damDesc(self, DamageType.LIGHTNING, dam), mast, spikecost, nb, damDesc(self, DamageType.LIGHTNING, spikedam)) + tformat(damDesc(self, DamageType.LIGHTNING, dam), mast, damDesc(self, DamageType.LIGHTNING, dam), mast, spikecost, nb, damDesc(self, DamageType.LIGHTNING, spikedam)) end, } @@ -598,6 +598,6 @@ newTalent{ A telekinetically wielded melee weapon enters a frenzy, striking up to %d enemies per turn, also increases the radius by %d. A mindstar will attempt to pull in all enemies within its normal range. A gem will fire an energy bolt at a random enemy in range 6, each turn for %0.1f damage. The type is determined by the colour of the gem. Damage scales with Mindpower.]]): - format(dur, targets, targets, t.getDamage(self,t)) + tformat(dur, targets, targets, t.getDamage(self,t)) end, } diff --git a/game/modules/tome/data/talents/psionic/psi-archery.lua b/game/modules/tome/data/talents/psionic/psi-archery.lua index 854ef206db8d7d1a352f46f0e3d8a28ed67659b9..b9b574cd1b2ab939fc8cee204ab1cb4d218e9fb3 100644 --- a/game/modules/tome/data/talents/psionic/psi-archery.lua +++ b/game/modules/tome/data/talents/psionic/psi-archery.lua @@ -47,7 +47,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Fire and guide an arrow to its target with precise telekinetic nudges. Does normal damage, but accuracy and crit chance are increased by %d.]]):format(t.shot_boost(self, t)) + return ([[Fire and guide an arrow to its target with precise telekinetic nudges. Does normal damage, but accuracy and crit chance are increased by %d.]]):tformat(t.shot_boost(self, t)) end, } @@ -83,7 +83,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Use telekinetic forces to greatly augment the durability and tension of your bow in order to fire an arrow with velocity unmatched by even the mightiest mundane archers. Increases armor penetration by %d, and deals %d%% damage.]]):format(t.apr_boost(self, t), t.dam_mult(self, t) * 100) + return ([[Use telekinetic forces to greatly augment the durability and tension of your bow in order to fire an arrow with velocity unmatched by even the mightiest mundane archers. Increases armor penetration by %d, and deals %d%% damage.]]):tformat(t.apr_boost(self, t), t.dam_mult(self, t) * 100) end, } @@ -119,7 +119,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Ready and release an arrow with a flitting thought. This attack does not use a turn, and increases in talent level reduce its cooldown.]]) + return ([[Ready and release an arrow with a flitting thought. This attack does not use a turn, and increases in talent level reduce its cooldown.]]):tformat() end, } @@ -224,7 +224,7 @@ newTalent{ if not o then return ([[You temporarily set aside a part of you mind to direct your telekinetically-wielded bow. It will automatically attack the nearest target each turn for %d turns. The telekinetically-wielded bow uses Willpower in place of Strength and Cunning in place of Dexterity to determine attack and damage. - You are not telekinetically wielding anything right now.]]):format(duration) + You are not telekinetically wielding anything right now.]]):tformat(duration) end if o.type == "weapon" then self:attr("use_psi_combat", 1) @@ -243,6 +243,6 @@ newTalent{ APR: %d Crit: %0.2f Speed: %0.2f]]): - format(duration, atk, dam, apr, crit, speed) + tformat(duration, atk, dam, apr, crit, speed) end, } diff --git a/game/modules/tome/data/talents/psionic/psi-fighting.lua b/game/modules/tome/data/talents/psionic/psi-fighting.lua index 3924f0278106b9fa9a5a7c1965b66001d3ed25cf..6dd3c1ed860a2634dd3109eaac2fd831d7c6a457 100644 --- a/game/modules/tome/data/talents/psionic/psi-fighting.lua +++ b/game/modules/tome/data/talents/psionic/psi-fighting.lua @@ -61,7 +61,7 @@ newTalent{ If your mainhand weapon hits, you will also stun the target for %d turns. This attack uses 60%% of your Willpower and Cunning instead of Strength and Dexterity to determine weapon damage and accuracy, for both attacks. Any active Aura damage bonusses will extend to the weapons used for this attack.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.9, 1.5), t.duration(self,t)) + tformat(100 * self:combatTalentWeaponDamage(t, 0.9, 1.5), t.duration(self,t)) end, } @@ -107,7 +107,7 @@ newTalent{ return ([[While active, you give your flesh and blood body a boost in the form of precisely applied mental forces. Increases Strength and Dexterity by %d%% of your Willpower and Cunning, respectively. Strength increased by %d Dexterity increased by %d]]): - format(inc*100, str_power, dex_power) + tformat(inc*100, str_power, dex_power) end, } @@ -132,7 +132,7 @@ newTalent{ At raw talent level 3 you will also disarm the attacker for 3 turns. At raw talent level 5 you will be able to reflexively block up to one attack per turn with a %d%% chance, based on your cunning. Each trigger requires and uses 10 Psi. This requires a telekinetically-wielded weapon.]]): - format(100 * t.getWeaponDamage(self, t), t.getChance(self, t)) + tformat(100 * t.getWeaponDamage(self, t), t.getChance(self, t)) end, } @@ -183,7 +183,7 @@ newTalent{ local eff = rng.tableRemove(effs) if eff[1] == "effect" then - game.logSeen(self, "#CRIMSON#%s shatters %s shield!", self.name:capitalize(), target.name) + game.logSeen(self, "#CRIMSON#%s shatters %s shield!", self:getName():capitalize(), target:getName()) target:removeEffect(eff[2]) end end @@ -195,6 +195,6 @@ newTalent{ This deals %d%% weapon damage and then causes the victim to bleed for %0.1f Physical damage over four turns. At level 3 the thrust is so powerful that it has %d%% chance to shatter a temporary damage shield if one exists. The bleeding damage increases with your Mindpower.]]): - format(100 * t.getWeaponDamage(self, t), damDesc(self, DamageType.PHYSICAL, t.getDamage(self,t)), t.getShatter(self, t)) + tformat(100 * t.getWeaponDamage(self, t), damDesc(self, DamageType.PHYSICAL, t.getDamage(self,t)), t.getShatter(self, t)) end, } diff --git a/game/modules/tome/data/talents/psionic/psionic.lua b/game/modules/tome/data/talents/psionic/psionic.lua index dafbfa69e1a4db93116375128bde529c36efb4e3..62770c5f6edd0ae73f7ae05da637300aae63aa70 100644 --- a/game/modules/tome/data/talents/psionic/psionic.lua +++ b/game/modules/tome/data/talents/psionic/psionic.lua @@ -18,42 +18,42 @@ -- darkgod@te4.org -- Talent trees -newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/absorption", name = "absorption", description = "Absorb damage and gain energy." } -newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/projection", name = "projection", description = "Project energy to damage foes." } -newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/psi-fighting", name = "psi-fighting", description = "Wield melee weapons with mentally-manipulated forces." } -newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/focus", name = "focus", description = "Use gems to focus your energies." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/augmented-mobility", generic = true, name = "augmented mobility", description = "Use energy to move yourself and others." } -newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/augmented-striking", name = "augmented striking", description = "Augment melee attacks with psionic enegies." } -newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/voracity", name = "voracity", description = "Pull energy from your surroundings." } -newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/finer-energy-manipulations", generic = true, name = "finer energy manipulations", description = "Subtle applications of the psionic arts." } ---newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/mental-discipline", generic = true, name = "mental discipline", description = "Increase mental capacity, endurance, and flexibility." } -newTalentType{ is_mind=true, type="psionic/other", name = "other", description = "Various psionic talents." } +newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/absorption", name = _t"absorption", description = _t"Absorb damage and gain energy." } +newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/projection", name = _t"projection", description = _t"Project energy to damage foes." } +newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/psi-fighting", name = _t"psi-fighting", description = _t"Wield melee weapons with mentally-manipulated forces." } +newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/focus", name = _t"focus", description = _t"Use gems to focus your energies." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/augmented-mobility", generic = true, name = _t"augmented mobility", description = _t"Use energy to move yourself and others." } +newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/augmented-striking", name = _t"augmented striking", description = _t"Augment melee attacks with psionic enegies." } +newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/voracity", name = _t"voracity", description = _t"Pull energy from your surroundings." } +newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/finer-energy-manipulations", generic = true, name = _t"finer energy manipulations", description = _t"Subtle applications of the psionic arts." } +--newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/mental-discipline", generic = true, name = _t"mental discipline", description = _t"Increase mental capacity, endurance, and flexibility." } +newTalentType{ is_mind=true, type="psionic/other", name = _t"other", description = _t"Various psionic talents." } -- Advanced Talent Trees ---newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/grip", name = "grip", min_lev = 10, description = "Augment your telekinetic grip." } -newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/kinetic-mastery", name = "kinetic mastery", min_lev = 10, description = "Mastery of telekinetic forces." } -newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/thermal-mastery", name = "thermal mastery", min_lev = 10, description = "Mastery of pyrokinetic forces." } -newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/charged-mastery", name = "charged mastery", min_lev = 10, description = "Mastery of electrokinetic forces." } ---newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/psi-archery", name = "psi-archery", min_lev = 10, description = "Use your telekinetic powers to wield bows with deadly effectiveness." } ---newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/greater-psi-fighting", name = "greater psi-fighting", description = "Elevate psi-fighting prowess to epic levels." } ---newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/brainstorm", name = "brainstorm", description = "Focus your telekinetic powers in ways undreamed of by most mindslayers." } +--newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/grip", name = _t"grip", min_lev = 10, description = _t"Augment your telekinetic grip." } +newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/kinetic-mastery", name = _t"kinetic mastery", min_lev = 10, description = _t"Mastery of telekinetic forces." } +newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/thermal-mastery", name = _t"thermal mastery", min_lev = 10, description = _t"Mastery of pyrokinetic forces." } +newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/charged-mastery", name = _t"charged mastery", min_lev = 10, description = _t"Mastery of electrokinetic forces." } +--newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/psi-archery", name = _t"psi-archery", min_lev = 10, description = _t"Use your telekinetic powers to wield bows with deadly effectiveness." } +--newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/greater-psi-fighting", name = _t"greater psi-fighting", description = _t"Elevate psi-fighting prowess to epic levels." } +--newTalentType{ allow_random=true, is_mind=true, autolearn_mindslayer=true, type="psionic/brainstorm", name = _t"brainstorm", description = _t"Focus your telekinetic powers in ways undreamed of by most mindslayers." } -- Solipsist Talent Trees -newTalentType{ allow_random=true, is_mind=true, type="psionic/discharge", name = "discharge", description = "Project feedback on the world around you." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/distortion", name = "distortion", description = "Distort reality with your mental energy." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/dream-smith", name = "Dream Smith", description = "Call the dream-forge hammer to smite your foes." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/nightmare", name = "nightmare", description = "Manifest your enemies nightmares." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/psychic-assault", name = "Psychic Assault", description = "Directly attack your opponents minds." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/slumber", name = "slumber", description = "Force enemies into a deep sleep." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/solipsism", name = "solipsism", description = "Nothing exists outside the minds ability to perceive it." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/thought-forms", name = "Thought-Forms", description = "Manifest your thoughts as psionic summons." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/discharge", name = _t"discharge", description = _t"Project feedback on the world around you." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/distortion", name = _t"distortion", description = _t"Distort reality with your mental energy." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/dream-smith", name = _t"Dream Smith", description = _t"Call the dream-forge hammer to smite your foes." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/nightmare", name = _t"nightmare", description = _t"Manifest your enemies nightmares." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/psychic-assault", name = _t"Psychic Assault", description = _t"Directly attack your opponents minds." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/slumber", name = _t"slumber", description = _t"Force enemies into a deep sleep." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/solipsism", name = _t"solipsism", description = _t"Nothing exists outside the minds ability to perceive it." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/thought-forms", name = _t"Thought-Forms", description = _t"Manifest your thoughts as psionic summons." } -- Generic Solipsist Trees -newTalentType{ allow_random=true, is_mind=true, type="psionic/dream-forge", generic = true, name = "Dream Forge", description = "Master the dream forge to create powerful armor and effects." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/dreaming", generic = true, name = "dreaming", description = "Manipulate the sleep cycles of yourself and your enemies." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/mentalism", generic = true, name = "mentalism", description = "Various mind based effects." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/feedback", generic = true, name = "feedback", description = "Store feedback as you get damaged and use it to protect and heal your body." } -newTalentType{ allow_random=true, is_mind=true, type="psionic/trance", generic = true, name = "trance", description = "Put your mind into a deep trance." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/dream-forge", generic = true, name = _t"Dream Forge", description = _t"Master the dream forge to create powerful armor and effects." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/dreaming", generic = true, name = _t"dreaming", description = _t"Manipulate the sleep cycles of yourself and your enemies." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/mentalism", generic = true, name = _t"mentalism", description = _t"Various mind based effects." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/feedback", generic = true, name = _t"feedback", description = _t"Store feedback as you get damaged and use it to protect and heal your body." } +newTalentType{ allow_random=true, is_mind=true, type="psionic/trance", generic = true, name = _t"trance", description = _t"Put your mind into a deep trance." } -- Level 0 wil tree requirements: psi_absorb = { diff --git a/game/modules/tome/data/talents/psionic/psychic-assault.lua b/game/modules/tome/data/talents/psionic/psychic-assault.lua index 2edaa656ab3bb0be211f6c27769ca95dcff998c5..fbdf25f6420e662708c1868a45aac0020b3d9ff7 100644 --- a/game/modules/tome/data/talents/psionic/psychic-assault.lua +++ b/game/modules/tome/data/talents/psionic/psychic-assault.lua @@ -53,7 +53,7 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) return ([[Sends a telepathic attack, trying to destroy the brains of any target in the beam, doing %0.2f mind damage. - The damage will increase with your Mindpower.]]):format(damDesc(self, DamageType.MIND, damage)) + The damage will increase with your Mindpower.]]):tformat(damDesc(self, DamageType.MIND, damage)) end, } @@ -92,7 +92,7 @@ newTalent{ if target:canBe("confusion") then target:setEffect(target.EFF_LOBOTOMIZED, t.getDuration(self, t), {src=self, dam=dam, power=t.getPower(self, t), confuse=t.getConfuse(self,t), apply_power=self:combatMindpower()}) else - game.logSeen(target, "%s resists the lobotomy!", target.name:capitalize()) + game.logSeen(target, "%s resists the lobotomy!", target:getName():capitalize()) end game:playSoundNear(self, "talents/cloud") @@ -105,7 +105,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Inflicts %0.2f mind damage and cripples the target's higher mental functions, reducing cunning by %d and confusing (%d%% power) the target for %d turns. The damage, cunning penalty, and confusion power will scale with your Mindpower.]]): - format(damDesc(self, DamageType.MIND, (damage)), cunning_damage, power, duration) + tformat(damDesc(self, DamageType.MIND, (damage)), cunning_damage, power, duration) end, } @@ -134,7 +134,7 @@ newTalent{ local damage = t.getDamage(self, t) local radius = self:getTalentRadius(t) return ([[Sends out a blast of telepathic static in a %d radius, inflicting %0.2f mind damage. This attack can brainlock affected targets. - The damage will increase with your Mindpower.]]):format(radius, damDesc(self, DamageType.MIND, damage)) + The damage will increase with your Mindpower.]]):tformat(radius, damDesc(self, DamageType.MIND, damage)) end, } @@ -177,6 +177,6 @@ newTalent{ return ([[Cripples the target's mind, inflicting %0.2f mind damage and reducing its Mental Save by %d for 4 turns. This attack always hits, and the mental save reduction stacks. Against brainlocked targets, the damage and Mental Save reduction will be doubled. The damage and save reduction will scale with your Mindpower.]]): - format(damDesc(self, DamageType.MIND, (damage)), power) + tformat(damDesc(self, DamageType.MIND, (damage)), power) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/psionic/slumber.lua b/game/modules/tome/data/talents/psionic/slumber.lua index 74ca372a31a47f25359ecc79cb9c1905ef6a9ac7..e0bfde20f00c577b80687961c28abdcfdb80dda4 100644 --- a/game/modules/tome/data/talents/psionic/slumber.lua +++ b/game/modules/tome/data/talents/psionic/slumber.lua @@ -64,7 +64,7 @@ newTalent{ target:setEffect(target.EFF_SLUMBER, t.getDuration(self, t), {src=self, power=power, waking=is_waking, insomnia=t.getInsomniaPower(self, t), no_ct_effect=true, apply_power=self:combatMindpower()}) game.level.map:particleEmitter(target.x, target.y, 1, "generic_charge", {rm=180, rM=200, gm=100, gM=120, bm=30, bM=50, am=70, aM=180}) else - game.logSeen(self, "%s resists the sleep!", target.name:capitalize()) + game.logSeen(self, "%s resists the sleep!", target:getName():capitalize()) end game:playSoundNear(self, "talents/dispel") return true @@ -75,7 +75,7 @@ newTalent{ local insomnia = t.getInsomniaPower(self, t) return([[Puts the target into a deep sleep for %d turns, rendering it unable to act. Every %d points of damage the target suffers will reduce the effect duration by one turn. When Slumber ends, the target will suffer from Insomnia for a number of turns equal to the amount of time it was asleep (up to ten turns max), granting it %d%% sleep immunity for each turn of the Insomnia effect. - The damage threshold will scale with your Mindpower.]]):format(duration, power, insomnia) + The damage threshold will scale with your Mindpower.]]):tformat(duration, power, insomnia) end, } @@ -94,7 +94,7 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) return([[Targets you have slept take %0.2f mind damage each turn for five turns upon waking. - The damage will scale with your Mindpower.]]):format(damDesc(self, DamageType.MIND, (damage))) + The damage will scale with your Mindpower.]]):tformat(damDesc(self, DamageType.MIND, (damage))) end, } @@ -111,7 +111,7 @@ newTalent{ local insomnia = t.getInsomniaPower(self, t) return([[Increases the amount of damage you can deal to sleeping targets before reducing the effect duration by %d%%, and reduces the sleep immunity of your Insomnia effects by %d%%. These effects will be directly reflected in the appropriate talent descriptions. - The damage threshold bonus will scale with your Mindpower.]]):format(power_bonus * 100, insomnia) + The damage threshold bonus will scale with your Mindpower.]]):tformat(power_bonus * 100, insomnia) end, } @@ -244,6 +244,6 @@ newTalent{ Projections inflict 50%% less damage than the original, unless the target has Lucid Dreamer active. When the Dreamscape ends, for each projection destroyed, the target's life will be reduced by 10%% and it will be brainlocked for one turn. In the Dreamscape, your damage will be improved by %d%%. - The damage bonus will improve with your Mindpower.]]):format(duration, power) + The damage bonus will improve with your Mindpower.]]):tformat(duration, power) end, } diff --git a/game/modules/tome/data/talents/psionic/solipsism.lua b/game/modules/tome/data/talents/psionic/solipsism.lua index 3ce7c1ffed4a6c8125922947e312731972943c39..8d06fb78cad07539a54be2a3febed04055f55d4f 100644 --- a/game/modules/tome/data/talents/psionic/solipsism.lua +++ b/game/modules/tome/data/talents/psionic/solipsism.lua @@ -60,7 +60,7 @@ newTalent{ You also have learned to overcome damage with your mind alone, and convert %d%% of all damage you receive into Psi damage and %d%% of your healing and life regen now recovers Psi instead of life. Converted Psi damage you take will be further reduced by %0.1f%% (%0.1f%% from character level with the remainder further reduced by %0.1f%% from talent level). The first talent point invested will also increase the amount of Psi you gain from Willpower by 0.5, but reduce the amount of life you gain from Constitution by 0.25. - The first talent point also increases your solipsism threshold by 20%% (currently %d%%), reducing your global speed by 1%% for each percentage your current Psi falls below this threshold.]]):format(conversion_ratio * 100, conversion_ratio * 100, psi_damage_resist, psi_damage_resist_base * 100, psi_damage_resist_talent, (self.solipsism_threshold or 0) * 100) + The first talent point also increases your solipsism threshold by 20%% (currently %d%%), reducing your global speed by 1%% for each percentage your current Psi falls below this threshold.]]):tformat(conversion_ratio * 100, conversion_ratio * 100, psi_damage_resist, psi_damage_resist_base * 100, psi_damage_resist_talent, (self.solipsism_threshold or 0) * 100) end, } @@ -98,7 +98,7 @@ newTalent{ local ratio = t.getBalanceRatio(self, t) * 100 return ([[You now substitute %d%% of your Mental Save for %d%% of your Physical and Spell Saves throws (so at 100%%, you would effectively use mental save for all saving throw rolls). The first talent point invested will also increase the amount of Psi you gain from Willpower by 0.5, but reduce the amount of life you gain from Constitution by 0.25. - Learning this talent also increases your solipsism threshold by 10%% (currently %d%%).]]):format(ratio, ratio, math.min((self.solipsism_threshold or 0),self.clarity_threshold or 1) * 100) + Learning this talent also increases your solipsism threshold by 10%% (currently %d%%).]]):tformat(ratio, ratio, math.min((self.solipsism_threshold or 0),self.clarity_threshold or 1) * 100) end, } @@ -141,7 +141,7 @@ newTalent{ end return ([[For every percent that your Psi pool exceeds %d%%, you gain 1%% global speed (up to a maximum of %+d%%). The first talent point invested will also increase the amount of Psi you gain from Willpower by 0.5, but reduce the amount of life you gain from Constitution by 0.25 and will increase your solipsism threshold by 10%% (currently %d%%).]]): - format(threshold * 100, (1-threshold)*100, math.min(self.solipsism_threshold or 0,threshold) * 100)..bonus + tformat(threshold * 100, (1-threshold)*100, math.min(self.solipsism_threshold or 0,threshold) * 100)..bonus end, } @@ -178,11 +178,11 @@ newTalent{ -- called by _M:onTakeHit in mod.class.Actor.lua doDismissalOnHit = function(self, value, src, t) local saving_throw = self:combatMentalResist() * t.getSavePercentage(self, t) - print("[Dismissal] ", self.name:capitalize(), " attempting to ignore ", value, "damage from ", src.name:capitalize(), "using", saving_throw, "mental save.") + print("[Dismissal] ", self:getName():capitalize(), " attempting to ignore ", value, "damage from ", src.name:capitalize(), "using", saving_throw, "mental save.") if self:checkHit(saving_throw, value) then local dismissed = value * (1 - (1 / self:mindCrit(2))) -- Diminishing returns on high crits game:delayedLogMessage(self, nil, "Dismissal", "#TAN##Source# mentally dismisses some damage!") - game:delayedLogDamage(src, self, 0, ("#TAN#(%d dismissed)#LAST#"):format(dismissed)) + game:delayedLogDamage(src, self, 0, ("#TAN#(%d dismissed)#LAST#"):tformat(dismissed)) return value - dismissed else return value @@ -192,6 +192,6 @@ newTalent{ local save_percentage = t.getSavePercentage(self, t) return ([[Each time you take damage, you roll %d%% of your mental save against it. A successful saving throw can crit and will reduce the damage by at least 50%%. The first talent point invested will also increase the amount of Psi you gain from Willpower by 0.5, but reduce the amount of life you gain from Constitution by 0.25. - The first talent point also increases your solipsism threshold by 10%% (currently %d%%).]]):format(save_percentage * 100, math.min(self.solipsism_threshold or 0,self.clarity_threshold or 1) * 100) + The first talent point also increases your solipsism threshold by 10%% (currently %d%%).]]):tformat(save_percentage * 100, math.min(self.solipsism_threshold or 0,self.clarity_threshold or 1) * 100) end, } diff --git a/game/modules/tome/data/talents/psionic/telekinetic-combat.lua b/game/modules/tome/data/talents/psionic/telekinetic-combat.lua index fdf30e8a65bd5dea8d4abce84f14ee4a155ec9bc..8de117f889ab3a21052ae9369163e48dd3ac2fba 100644 --- a/game/modules/tome/data/talents/psionic/telekinetic-combat.lua +++ b/game/modules/tome/data/talents/psionic/telekinetic-combat.lua @@ -58,6 +58,6 @@ newTalent{ return ([[Assault your target with all weapons, dealing two strikes with your telekinetically-wielded weapon for %d%% damage followed by an attack with your physical weapon for %d%% damage. This physical weapon attack uses your Willpower and Cunning instead of Strength and Dexterity to determine Accuracy and damage. Any active Aura damage bonusses will extend to your main weapons for this attack.]]): - format(100 * self:combatTalentWeaponDamage(t, 1.2, 1.9), 100 * self:combatTalentWeaponDamage(t, 1.5, 2.5)) + tformat(100 * self:combatTalentWeaponDamage(t, 1.2, 1.9), 100 * self:combatTalentWeaponDamage(t, 1.5, 2.5)) end, } diff --git a/game/modules/tome/data/talents/psionic/thermal-mastery.lua b/game/modules/tome/data/talents/psionic/thermal-mastery.lua index a090251d245863b131da5217a845bb83563def84..186757858a616fe1ba551baa03cc014a359da226 100644 --- a/game/modules/tome/data/talents/psionic/thermal-mastery.lua +++ b/game/modules/tome/data/talents/psionic/thermal-mastery.lua @@ -50,7 +50,7 @@ newTalent{ Thermal Leech will reduce enemy damage by %d%%. Thermal Strike will have its secondary cold/freeze explode in radius 1. The damage bonus and resistance penetration scale with your Mindpower. - Only one Transcendent talent may be in effect at a time.]]):format(t.getDuration(self, t), t.getPower(self, t), t.getPenetration(self, t), t.getDamagePenalty(self, t)) + Only one Transcendent talent may be in effect at a time.]]):tformat(t.getDuration(self, t), t.getPower(self, t), t.getPenetration(self, t), t.getDamagePenalty(self, t)) end, } @@ -91,7 +91,7 @@ newTalent{ return ([[Quickly drain the heat from your target's brain, dealing %0.1f Cold damage. Affected creatures will also be brainlocked for 4 turns, putting a random talent on cooldown, and freezing cooldowns. The damage and chance to brainlock increase with your Mindpower.]]): - format(damDesc(self, DamageType.COLD, dam)) + tformat(damDesc(self, DamageType.COLD, dam)) end, } @@ -146,7 +146,7 @@ newTalent{ Those afflicted will be dealt %0.1f Cold and %0.1f Fire damage, and be pinned (Frozen Feet) and disarmed for %d turns. Targets suffering both types of damage will also have have their Armour and saves reduced by %d. The chance to apply the effects and the duration increase with your Mindpower.]]): - format(rad, damDesc(self, DamageType.COLD, dam), damDesc(self, DamageType.FIRE, dam), dur, t.getArmor(self, t)) + tformat(rad, damDesc(self, DamageType.COLD, dam), damDesc(self, DamageType.FIRE, dam), dur, t.getArmor(self, t)) end, } @@ -189,7 +189,7 @@ newTalent{ You blast your foes with %0.1f Fire damage based on your current Psi, %0.1f Cold damage based on your max Psi minus your current Psi, in a radius %d ball. This sets your current Psi to half of your maximum Psi. The damage scales with your Mindpower.]]): - format(damDesc(self, DamageType.FIRE, dam2), damDesc(self, DamageType.COLD, dam1), self:getTalentRadius(t)) + tformat(damDesc(self, DamageType.FIRE, dam2), damDesc(self, DamageType.COLD, dam1), self:getTalentRadius(t)) end, } diff --git a/game/modules/tome/data/talents/psionic/thought-forms.lua b/game/modules/tome/data/talents/psionic/thought-forms.lua index b8eb34a4a9a5b9efa31d374dab727846848358cc..827a9a97f7db453afc42cc3413265b6e8c1c96dc 100644 --- a/game/modules/tome/data/talents/psionic/thought-forms.lua +++ b/game/modules/tome/data/talents/psionic/thought-forms.lua @@ -137,7 +137,7 @@ function setupThoughtForm(self, m, x, y, t) game.party:addMember(m, { control="no", type="thought-form", - title="thought-form", + title=_t"thought-form", orders = {target=true, leash=true, anchor=true, talents=true}, }) end @@ -192,10 +192,10 @@ newTalent{ local NPC = require "mod.class.NPC" local m = NPC.new{ _no_upvalues_check=true, - name = "thought-forged bowman", summoner = self, + name = _t"thought-forged bowman", summoner = self, color=colors.SANDY_BROWN, shader = "shadow_simulacrum", shader_args = { color = {0.8, 0.8, 0.8}, base = 0.8, time_factor = 4000 }, - desc = [[A thought-forged bowman. It appears ready for battle.]], + desc = _t[[A thought-forged bowman. It appears ready for battle.]], body = { INVEN = 10, MAINHAND = 1, BODY = 1, QUIVER=1, HANDS = 1, FEET = 1}, ai = "summoned", ai_real = "tactical", @@ -258,7 +258,7 @@ newTalent{ local stat = t.getStatBonus(self, t) return ([[Forge a bowman, clad in leather armor, from your thoughts. The bowman learns Bow Mastery, Combat Accuracy, Steady Shot, Crippling Shot, and Rapid Shot as it levels up, and has +%d Strength, +%d Dexterity, and +%d Constitution. Activating this talent will put all other thought-forms on cooldown. - The stat bonuses will improve with your Mindpower.]]):format(stat/2, stat, stat/2) + The stat bonuses will improve with your Mindpower.]]):tformat(stat/2, stat, stat/2) end, } @@ -293,10 +293,10 @@ newTalent{ local NPC = require "mod.class.NPC" local m = NPC.new{ _no_upvalues_check=true, - name = "thought-forged warrior", summoner = self, + name = _t"thought-forged warrior", summoner = self, color=colors.ORANGE, shader = "shadow_simulacrum", shader_args = { color = {0.8, 0.8, 0.8}, base = 0.8, time_factor = 4000 }, - desc = [[A thought-forged warrior wielding a massive battle-axe and clad in heavy armor. It appears ready for battle.]], + desc = _t[[A thought-forged warrior wielding a massive battle-axe and clad in heavy armor. It appears ready for battle.]], body = { INVEN = 10, MAINHAND = 1, BODY = 1, HANDS = 1, FEET = 1}, ai = "summoned", ai_real = "tactical", @@ -360,7 +360,7 @@ newTalent{ local stat = t.getStatBonus(self, t) return ([[Forge a warrior wielding a battle-axe from your thoughts. The warrior learns Weapon Mastery, Combat Accuracy, Berserker, Death Dance, and Rush as it levels up, and has +%d Strength, +%d Dexterity, and +%d Constitution. Activating this talent will put all other thought-forms on cooldown. - The stat bonuses will improve with your Mindpower.]]):format(stat, stat/2, stat/2) + The stat bonuses will improve with your Mindpower.]]):tformat(stat, stat/2, stat/2) end, } @@ -395,10 +395,10 @@ newTalent{ local NPC = require "mod.class.NPC" local m = NPC.new{ _no_upvalues_check=true, - name = "thought-forged defender", summoner = self, + name = _t"thought-forged defender", summoner = self, color=colors.GOLD, shader = "shadow_simulacrum", shader_args = { color = {0.8, 0.8, 0.8}, base = 0.8, time_factor = 4000 }, - desc = [[A thought-forged defender clad in massive armor. It wields a sword and shield and appears ready for battle.]], + desc = _t[[A thought-forged defender clad in massive armor. It wields a sword and shield and appears ready for battle.]], body = { INVEN = 10, MAINHAND = 1, OFFHAND = 1, BODY = 1, HANDS = 1, FEET = 1}, ai = "summoned", ai_real = "tactical", @@ -464,7 +464,7 @@ newTalent{ local stat = t.getStatBonus(self, t) return ([[Forge a defender wielding a sword and shield from your thoughts. The solider learns Armor Training, Weapon Mastery, Combat Accuracy, Shield Pummel, and Shield Wall as it levels up, and has +%d Strength, +%d Dexterity, and +%d Constitution. Activating this talent will put all other thought-forms on cooldown. - The stat bonuses will improve with your Mindpower.]]):format(stat/2, stat/2, stat) + The stat bonuses will improve with your Mindpower.]]):tformat(stat/2, stat/2, stat) end, } @@ -506,7 +506,7 @@ newTalent{ return([[Forge a guardian from your thoughts alone. Your guardian's primary stat will be improved by %d, its two secondary stats by %d, and it will have Magic, Cunning, and Willpower equal to your own. At talent level one, you may forge a mighty bowman clad in leather armor; at level three a powerful warrior wielding a two-handed weapon; and at level five a strong defender using a sword and shield. Thought forms can only be maintained up to a range of %d, and will rematerialize next to you if this range is exceeded. - Only one thought-form may be active at a time, and the stat bonuses will improve with your Mindpower.]]):format(bonus, bonus/2, range) + Only one thought-form may be active at a time, and the stat bonuses will improve with your Mindpower.]]):tformat(bonus, bonus/2, range) end, } @@ -519,7 +519,7 @@ newTalent{ mode = "passive", info = function(self, t) local level = math.floor(self:getTalentLevel(t)) - return([[Your thought-forms now know Lucid Dreamer, Biofeedback, and Psychometry at talent level %d.]]):format(level) + return([[Your thought-forms now know Lucid Dreamer, Biofeedback, and Psychometry at talent level %d.]]):tformat(level) end, } @@ -598,7 +598,7 @@ newTalent{ return ([[Take direct control of your active thought-form, improving its damage, attack speed, and maximum life by %d%%, but leaving your body a defenseless shell. At talent level 1, any Feedback your Thought-Forms gain will be given to you as well. At level 3, your Thought-Forms gain a bonus to all saves equal to your Mental Save. At level 5, they gain a bonus to all damage equal to your bonus mind damage. The secondary bonuses apply whether or not this talent is currently active. - The life, damage, and speed bonus will improve with your Mindpower.]]):format(bonus) + The life, damage, and speed bonus will improve with your Mindpower.]]):tformat(bonus) end, } @@ -617,6 +617,6 @@ newTalent{ local defense = t.getDefensePower(self, t) local speed = t.getSpeedPower(self, t) return([[You now gain %d%% mind speed while Thought-Form: Bowman is active, %d Mindpower while Thought-Form: Warrior is active, and %d%% resist all while Thought-Form: Defender is active. - These bonuses scale with your Mindpower.]]):format(speed, offense, defense, speed) + These bonuses scale with your Mindpower.]]):tformat(speed, offense, defense, speed) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/psionic/trance.lua b/game/modules/tome/data/talents/psionic/trance.lua index 9fbc17daeb24934032f713e452d3a18aacd8627c..bd2884e2ad78d16babe68ca08d5c63b9debfca9c 100644 --- a/game/modules/tome/data/talents/psionic/trance.lua +++ b/game/modules/tome/data/talents/psionic/trance.lua @@ -84,7 +84,7 @@ newTalent{ local saves = t.getSavingThrows(self, t) return ([[Activate to purge negative status effects (100%% chance for the first effect, -%d%% less chance for each subsequent effect). While this talent is sustained all your saving throws are increased by %d. The chance to purge and saving throw bonus will scale with your mindpower. - Only one trance may be active at a time.]]):format(purge, saves) + Only one trance may be active at a time.]]):tformat(purge, saves) end, } @@ -135,7 +135,7 @@ newTalent{ local regen = t.getLifeRegen(self, t) return ([[Activate to heal yourself for %0.2f life. While this talent is sustained your healing modifier will be increased by %d%% and your life regen by %0.2f. The effects will scale with your mindpower. - Only one trance may be active at a time.]]):format(heal, healing_modifier, regen) + Only one trance may be active at a time.]]):tformat(heal, healing_modifier, regen) end, } @@ -175,7 +175,7 @@ newTalent{ local chance = t.getCriticalChance(self, t) return ([[Activate to increase your critical strike damage by %d%% for 10 turns. While this talent is sustained your critical strike chance is improved by +%d%%. The effects will scale with your mindpower. - Only one trance may be active at a time.]]):format(power, chance) + Only one trance may be active at a time.]]):tformat(power, chance) end, } @@ -187,6 +187,6 @@ newTalent{ mode = "passive", info = function(self, t) return ([[When you wield or wear an item infused by psionic, nature, or arcane-disrupting forces you improve all values under its 'when wielded/worn' field %d%%. - Note this doesn't change the item itself, but rather the effects it has on your person (the item description will not reflect the improved values).]]):format(1) + Note this doesn't change the item itself, but rather the effects it has on your person (the item description will not reflect the improved values).]]):tformat(1) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/psionic/voracity.lua b/game/modules/tome/data/talents/psionic/voracity.lua index bd13fa995e55411568033700a5c8bbd9d6ae1eb1..9cce8d548354e5f04c4344a1e6e5182e36da685b 100644 --- a/game/modules/tome/data/talents/psionic/voracity.lua +++ b/game/modules/tome/data/talents/psionic/voracity.lua @@ -80,7 +80,7 @@ newTalent{ This will slow all targets within radius %d by %d%% (max %d%%) for four turns, draining %0.1f (max %0.1f) stamina from each. You replenish %d (max %d) Psi from the first target, with each additional target restoring 20%% less than the one before it. The strength of these effects increases as your Psi depletes and with your Mindpower.]]) - :format(range, t.getSlow(self, t)*100, t.getSlow(self, t, 0)*100, t.getDam(self, t), t.getDam(self, t, 0), t.getLeech(self, t), t.getLeech(self, t, 0)) + :tformat(range, t.getSlow(self, t)*100, t.getSlow(self, t, 0)*100, t.getDam(self, t), t.getDam(self, t, 0), t.getLeech(self, t), t.getLeech(self, t, 0)) end, } @@ -140,7 +140,7 @@ newTalent{ This will freeze all targets within radius %d for %d (max %d) turns, and deal %0.1f (max %0.1f) Cold damage. You replenish %d (max %d) Psi from the first target, with each additional target restoring 20%% less than the one before it. The damage and the strength of these effects increases as your Psi depletes and with your Mindpower.]]) - :format(range, t.getDur(self, t), t.getDur(self, t, 0), damDesc(self, DamageType.COLD, t.getDam(self, t)), damDesc(self, DamageType.COLD, t.getDam(self, t, 0)), t.getLeech(self, t), t.getLeech(self, t, 0)) + :tformat(range, t.getDur(self, t), t.getDur(self, t, 0), damDesc(self, DamageType.COLD, t.getDam(self, t)), damDesc(self, DamageType.COLD, t.getDam(self, t, 0)), t.getLeech(self, t), t.getLeech(self, t, 0)) end, } @@ -209,7 +209,7 @@ newTalent{ This deals %0.1f (max %0.1f) Lightning damage to all targets around you within radius %d, and has a %d%% (max %d%%) chance to daze them for 3 turns. You replenish %d (max %d) Psi from the first target, with each additional target restoring 20%% less than the one before it. The strength of these effects increases as your Psi depletes and with your Mindpower.]]) - :format(t.getDam(self, t), t.getDam(self, t, 0), range, t.getDaze(self, t), t.getDaze(self, t, 0), t.getLeech(self, t), t.getLeech(self, t, 0)) + :tformat(t.getDam(self, t), t.getDam(self, t, 0), range, t.getDaze(self, t), t.getDaze(self, t, 0), t.getLeech(self, t), t.getLeech(self, t, 0)) end, } @@ -228,7 +228,7 @@ newTalent{ end, info = function(self, t) local recover = t.getPsiRecover(self, t) - return ([[Increases your maximum energy by %d. You also gain %0.1f Psi for each kill and %0.1f Psi for each mind critical.]]):format(5 * recover, 0.5*recover, recover) + return ([[Increases your maximum energy by %d. You also gain %0.1f Psi for each kill and %0.1f Psi for each mind critical.]]):tformat(5 * recover, 0.5*recover, recover) end, } diff --git a/game/modules/tome/data/talents/spells/acid-alchemy.lua b/game/modules/tome/data/talents/spells/acid-alchemy.lua index 47db2f84965ef67312c66755b2a0933a3ba14f0a..b5f173c31dcbbf04507c819e0cf4edf3b5bf3c33 100644 --- a/game/modules/tome/data/talents/spells/acid-alchemy.lua +++ b/game/modules/tome/data/talents/spells/acid-alchemy.lua @@ -43,7 +43,7 @@ newTalent{ return ([[When you throw your alchemist bombs, you infuse them with explosive acid that can blind. In addition all acid damage you do is increased by %d%%. You cannot have more than one alchemist infusion sustain active at once.]]): - format(daminc) + tformat(daminc) end, } @@ -69,7 +69,7 @@ newTalent{ return ([[While Acid Infusion is active, your bombs coat your golem in acid for %d turns when they hit it. While coated, any melee hit against your golem has a %d%% chance to trigger a radius 4 cone of acid towards the attacker that does %0.1f Acid damage to all caught inside. (This can only happen once per turn.) The effects increase with your talent level and with the Spellpower and damage modifiers of your golem.]]): - format(duration, chance, dam) + tformat(duration, chance, dam) end, } @@ -117,7 +117,7 @@ newTalent{ return ([[A radius %d pool of acid spawns at the target location, doing %0.1f Acid damage each turn for %d turns. All creatures caught in the mire will also suffer a %d%% slowness effect. The damage will increase with your Spellpower.]]): - format(radius, damDesc(self, DamageType.ACID, damage), duration, slow) + tformat(radius, damDesc(self, DamageType.ACID, damage), duration, slow) end, } @@ -185,6 +185,6 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Acid erupts all around your target, dealing %0.1f acid damage. The acid attack is extremely distracting, and may remove up to %d physical or mental temporary effects or mental sustains (depending on the Spell Save of the target). - The damage and chance to remove effects will increase with your Spellpower.]]):format(damDesc(self, DamageType.ACID, damage), t.getRemoveCount(self, t)) + The damage and chance to remove effects will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.ACID, damage), t.getRemoveCount(self, t)) end, } diff --git a/game/modules/tome/data/talents/spells/advanced-golemancy.lua b/game/modules/tome/data/talents/spells/advanced-golemancy.lua index d5ca95a3d53375143fdbe33739216ce6514dcc83..0094d79c09869a989d4df833d22ff90249344905 100644 --- a/game/modules/tome/data/talents/spells/advanced-golemancy.lua +++ b/game/modules/tome/data/talents/spells/advanced-golemancy.lua @@ -22,7 +22,7 @@ newTalent{ name = "Life Tap", short_name = "GOLEMANCY_LIFE_TAP", type = {"spell/advanced-golemancy", 1}, require = { - special = { desc="Having an Alchemist Golem", fct=function(self, t) return self.alchemy_golem end}, + special = { desc=_t"Having an Alchemist Golem", fct=function(self, t) return self.alchemy_golem end}, stat = { mag=function(level) return 22 + (level-1) * 2 end }, level = function(level) return 10 + (level-1) end, }, @@ -56,7 +56,7 @@ newTalent{ info = function(self, t) local power=t.getPower(self, t) return ([[You tap into your golem's life energies to replenish your own. Drains %d life.]]): - format(power) + tformat(power) end, } @@ -70,7 +70,7 @@ newTalent{ info = function(self, t) return ([[Insert a pair of gems into your golem, providing it with the gem bonuses and changing its melee attack damage type. You may remove the gems and insert different ones; this does not destroy the gems you remove. Gem level usable: %d - Gem changing is done in the golem's inventory.]]):format(self:getTalentLevelRaw(t)) + Gem changing is done in the golem's inventory.]]):tformat(self:getTalentLevelRaw(t)) end, } @@ -121,7 +121,7 @@ newTalent{ return ([[You activate a special mode of your golem, boosting its regeneration rate by %0.2f life per turn for %d turns. If your golem was dead, it is instantly brought back to life with %d%% life. While supercharged, your golem is enraged and deals 25%% more damage.]]): - format(regen, turns, life) + tformat(regen, turns, life) end, } @@ -161,6 +161,6 @@ newTalent{ return ([[Increases your golem's life, mana and stamina regeneration rates by %0.2f. At level 1, 3 and 5, the golem also gains a new rune slot. Even without this talent, Golems start with three rune slots.]]): - format(self:getTalentLevelRaw(t)) + tformat(self:getTalentLevelRaw(t)) end, } diff --git a/game/modules/tome/data/talents/spells/advanced-necrotic-minions.lua b/game/modules/tome/data/talents/spells/advanced-necrotic-minions.lua index 15b883ec99d4f5833cc30662a22da2a5ef0fb00f..3dff2fc273fc23a05c9c346942a8c8d2aac0d2be 100644 --- a/game/modules/tome/data/talents/spells/advanced-necrotic-minions.lua +++ b/game/modules/tome/data/talents/spells/advanced-necrotic-minions.lua @@ -44,7 +44,7 @@ local minions_list = { see_invisible = resolvers.mbonus(15, 5), undead = 1, name = "bone giant", color=colors.WHITE, - desc = [[A towering creature, made from the bones of dozens of dead bodies. It is covered by an unholy aura.]], + desc=_t[[A towering creature, made from the bones of dozens of dead bodies. It is covered by an unholy aura.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_bone_giant.png", display_h=2, display_y=-1}}}, max_life = resolvers.rngavg(100,120), level_range = {1, nil}, exp_worth = 0, @@ -79,7 +79,7 @@ local minions_list = { see_invisible = resolvers.mbonus(15, 5), undead = 1, name = "heavy bone giant", color=colors.RED, - desc = [[A towering creature, made from the bones of hundreds of dead bodies. It is covered by an unholy aura.]], + desc=_t[[A towering creature, made from the bones of hundreds of dead bodies. It is covered by an unholy aura.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_heavy_bone_giant.png", display_h=2, display_y=-1}}}, level_range = {1, nil}, exp_worth = 0, max_life = resolvers.rngavg(100,120), @@ -114,7 +114,7 @@ local minions_list = { see_invisible = resolvers.mbonus(15, 5), undead = 1, name = "eternal bone giant", color=colors.GREY, - desc = [[A towering creature, made from the bones of hundreds of dead bodies. It is covered by an unholy aura.]], + desc=_t[[A towering creature, made from the bones of hundreds of dead bodies. It is covered by an unholy aura.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_eternal_bone_giant.png", display_h=2, display_y=-1}}}, level_range = {1, nil}, exp_worth = 0, max_life = resolvers.rngavg(100,120), @@ -151,7 +151,7 @@ local minions_list = { see_invisible = resolvers.mbonus(15, 5), undead = 1, name = "runed bone giant", color=colors.RED, - desc = [[A towering creature, made from the bones of hundreds of dead bodies, rune-etched and infused with hateful sorceries.]], + desc=_t[[A towering creature, made from the bones of hundreds of dead bodies, rune-etched and infused with hateful sorceries.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_runed_bone_giant.png", display_h=2, display_y=-1}}}, level_range = {1, nil}, exp_worth = 0, rank = 3, @@ -206,7 +206,7 @@ newTalent{ return ([[Minions are only tools. You may dispose of them... Violently. Makes the targeted minion explode for %d%% of its maximum life in a radius of %d as blight damage. Beware! Don't get caught in the blast! (unless you know Dark Empthy: %d%% chance to ignore damage)]]): - format(t.getDamage(self, t),t.radius(self,t), self:getTalentLevelRaw(self.T_DARK_EMPATHY) * 20) + tformat(t.getDamage(self, t),t.radius(self,t), self:getTalentLevelRaw(self.T_DARK_EMPATHY) * 20) end, } @@ -300,7 +300,7 @@ newTalent{ At level 5, it makes an eternal bone giant. At level 6, it has a 20%% chance to produce a runed bone giant. Only %s can be active at any time.]]): - format(necroEssenceDead(self, true) and "two bone giants" or "one bone giant") + tformat(necroEssenceDead(self, true) and _t"two bone giants" or _t"one bone giant") end, } @@ -354,7 +354,7 @@ newTalent{ info = function(self, t) return ([[Sacrifice a bone giant minion. Using its bones, you make a temporary shield around you that prevents any attacks from doing more than %d%% of your total life. The effect lasts %d turns.]]): - format(t.getPower(self, t), t.getTurns(self, t)) + tformat(t.getPower(self, t), t.getTurns(self, t)) end, } @@ -366,6 +366,6 @@ newTalent{ mode = "passive", info = function(self, t) return ([[Each minion you summon has a chance to be a more advanced form of undead. Your chance for each type of minion is as follows:%s]]): - format(self:callTalent(self.T_CREATE_MINIONS,"MinionChancesDesc")) + tformat(self:callTalent(self.T_CREATE_MINIONS,"MinionChancesDesc")) end, } diff --git a/game/modules/tome/data/talents/spells/aegis.lua b/game/modules/tome/data/talents/spells/aegis.lua index a06b5bbc581e48fa44c4a58a4e3865019416003d..0aa0fb63e152e47339e526b90626c2e652c4de4e 100644 --- a/game/modules/tome/data/talents/spells/aegis.lua +++ b/game/modules/tome/data/talents/spells/aegis.lua @@ -43,7 +43,7 @@ newTalent{ local heal = t.getHeal(self, t) return ([[Imbues your body with arcane forces, reconstructing it to a default state, healing for %d life. The life healed will increase with your Spellpower.]]): - format(heal) + tformat(heal) end, } @@ -82,7 +82,7 @@ newTalent{ Every damage shield, time shield, displacement shield, and disruption shield affecting you has its power increased by %d%%. At level 5, it also increases the duration of all shields by 1 turn. The shield value will increase with your Spellpower.]]): - format(shield, dur) + tformat(shield, dur) end, } @@ -116,7 +116,7 @@ newTalent{ Each time you receive a direct heal (not a life regeneration effect), you automatically gain a damage shield equal to %d%% of the heal value for 3 turns. This will replace an existing damage shield if the new shield value and duration would be greater than or equal to the old. The shield value will increase with your Spellpower.]]): - format(shield) + tformat(shield) end, } @@ -175,6 +175,6 @@ newTalent{ Damage Shield, Time Shield, Displacement Shield: Increase the damage absorption value by %d%%. Disruption Shield: Tap into the stored energies to restore the shield (at a rate of 2 energy per 1 shield power). Any leftover energy is converted back into mana at a rate of %0.2f energy per mana. The charging will increase with your Spellpower.]]): - format(t.getNumEffects(self, t), shield, 100 / t.getDisruption(self, t)) + tformat(t.getNumEffects(self, t), shield, 100 / t.getDisruption(self, t)) end, } diff --git a/game/modules/tome/data/talents/spells/aether.lua b/game/modules/tome/data/talents/spells/aether.lua index 95730b19d9eeb21e1b5a2ba15b0825d8ed6de127..16b74ff948d24101b7df9b299c3dfec86d51463a 100644 --- a/game/modules/tome/data/talents/spells/aether.lua +++ b/game/modules/tome/data/talents/spells/aether.lua @@ -20,7 +20,7 @@ local basetrap = function(self, t, x, y, dur, add) local Trap = require "mod.class.Trap" local trap = { - id_by_type=true, unided_name = "trap", + id_by_type=true, unided_name = _t"trap", display = '^', disarmable = false, no_disarm_message = true, @@ -69,7 +69,7 @@ newTalent{ if game.level.map:checkEntity(x, y, Map.TERRAIN, "block_move") then game.logPlayer(self, "You somehow fail to set the aether beam.") return nil end local t = basetrap(self, t, x, y, 44, { - type = "aether", name = "aether beam", color=colors.VIOLET, image = "trap/aether_beam.png", + type = "aether", name = _t"aether beam", color=colors.VIOLET, image = "trap/aether_beam.png", dam = self:spellCrit(t.getDamage(self, t)), triggered = function(self, x, y, who) return true, true end, combatSpellpower = function(self) return self.summoner:combatSpellpower() end, @@ -139,7 +139,7 @@ newTalent{ The beam will also damage its epicenter each turn for 10%% of the damage (but it will not silence). The beam spins with incredible speed (1600%%) and can only hit the same target up to 3 times inbetween their turns. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.ARCANE, dam)) + tformat(damDesc(self, DamageType.ARCANE, dam)) end, } @@ -184,7 +184,7 @@ newTalent{ Each explosion does %0.2f arcane damage in radius 2, and will each trigger at one turn intervals. Subsequent casts will stack but the explosions will still only occur once per turn and will be centered at the last area targeted. The damage will increase with your Spellpower.]]): - format(t.getNb(self, t), damDesc(self, DamageType.ARCANE, damage)) + tformat(t.getNb(self, t), damDesc(self, DamageType.ARCANE, damage)) end, } @@ -212,7 +212,7 @@ newTalent{ if self:attr("force_talent_ignore_ressources") then return end if self.turn_procs.aether_avatar_penalty then return end self:incMana(-50) - game.logSeen(self, "#VIOLET#%s loses 50 mana from using a non-Arcane talent!#LAST#", self.name:capitalize()) + game.logSeen(self, "#VIOLET#%s loses 50 mana from using a non-Arcane talent!#LAST#", self:getName():capitalize()) self.turn_procs.aether_avatar_penalty = true end, @@ -237,7 +237,7 @@ newTalent{ local list = {} for i = 1, 10 do if levels[i] then table.sort(levels[i]) - list[#list+1] = ("At level %d: #AQUAMARINE#%s#LAST#"):format(i, table.concatNice(levels[i], '#LAST#, #AQUAMARINE#', '#LAST# and #AQUAMARINE#')) + list[#list+1] = ("At level %d: #AQUAMARINE#%s#LAST#"):tformat(i, table.concatNice(levels[i], '#LAST#, #AQUAMARINE#', _t'#LAST# and #AQUAMARINE#')) end end return table.concat(list, "\n") end, @@ -257,7 +257,7 @@ newTalent{ Spells considered arcane for the purpose of not-losing mana are: %s]]): - format(t.getNb(self, t), t.getSpellsList(self, t)) + tformat(t.getNb(self, t), t.getSpellsList(self, t)) end, } @@ -301,6 +301,6 @@ newTalent{ local ressistpen = t.getResistPenalty(self, t) return ([[Surround yourself with Pure Aether, increasing all your arcane damage by %0.1f%% and ignoring %d%% arcane resistance of your targets. At level 5 casting Aether Avatar removes up to %d magical or physical detrimental effects.]]) - :format(damageinc, ressistpen, t.getNbRemove(self, t)) + :tformat(damageinc, ressistpen, t.getNbRemove(self, t)) end, } diff --git a/game/modules/tome/data/talents/spells/air.lua b/game/modules/tome/data/talents/spells/air.lua index 9f860e88e7aabe1c0c205425038818b144a1a44f..ff6288286626886f2cf0d1f083ae13f64b4c54a0 100644 --- a/game/modules/tome/data/talents/spells/air.lua +++ b/game/modules/tome/data/talents/spells/air.lua @@ -51,7 +51,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Conjures up mana into a powerful beam of lightning, doing %0.2f to %0.2f damage (%0.2f average) The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.LIGHTNING, damage / 3), + tformat(damDesc(self, DamageType.LIGHTNING, damage / 3), damDesc(self, DamageType.LIGHTNING, damage), damDesc(self, DamageType.LIGHTNING, (damage + damage / 3) / 2)) @@ -135,7 +135,7 @@ newTalent{ return ([[Invokes a forking beam of lightning doing %0.2f to %0.2f damage (%0.2f average) and forking to another target. It can hit up to %d targets up to 10 grids apart, and will never hit the same one twice; nor will it hit the caster. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.LIGHTNING, damage / 3), + tformat(damDesc(self, DamageType.LIGHTNING, damage / 3), damDesc(self, DamageType.LIGHTNING, damage), damDesc(self, DamageType.LIGHTNING, (damage + damage / 3) / 2), targets) @@ -190,7 +190,7 @@ newTalent{ return ([[A gentle wind circles around the caster, increasing carrying capacity by %d, defense against projectiles by %d, pin immunity by %d%% and stun immunity by %d%%. At level 4 it also makes you levitate slightly above the ground, allowing you to ignore some traps. At level 5 it also grants %d%% movement speed and removes %d fatigue.]]): - format(encumberance, rangedef, pin*100, stun*100, t.getSpeed(self, t) * 100, t.getFatigue(self, t)) + tformat(encumberance, rangedef, pin*100, stun*100, t.getSpeed(self, t) * 100, t.getFatigue(self, t)) end, } @@ -232,12 +232,12 @@ newTalent{ end, activate = function(self, t) game:playSoundNear(self, "talents/thunderstorm") - game.logSeen(self, "#0080FF#A furious lightning storm forms around %s!", self.name) + game.logSeen(self, "#0080FF#A furious lightning storm forms around %s!", self:getName()) return { } end, deactivate = function(self, t, p) - game.logSeen(self, "#0080FF#The furious lightning storm around %s calms down and disappears.", self.name) + game.logSeen(self, "#0080FF#The furious lightning storm around %s calms down and disappears.", self:getName()) return true end, info = function(self, t) @@ -246,6 +246,6 @@ newTalent{ return ([[Conjures a furious, raging lightning storm with a radius of 6 that follows you as long as this spell is active. Each turn, a random lightning bolt will hit up to %d of your foes for 1.00 to %0.2f damage (%0.2f average) in a radius of 1. The damage will increase with your Spellpower.]]): - format(targetcount, damDesc(self, DamageType.LIGHTNING, damage), damDesc(self, DamageType.LIGHTNING, damage / 2)) + tformat(targetcount, damDesc(self, DamageType.LIGHTNING, damage), damDesc(self, DamageType.LIGHTNING, damage / 2)) end, } diff --git a/game/modules/tome/data/talents/spells/animus.lua b/game/modules/tome/data/talents/spells/animus.lua index 37d9dec395d0d17968fe1a12c4442e945099a715..7b3cc71a7a6873b709bb757701858ab2ad884f07 100644 --- a/game/modules/tome/data/talents/spells/animus.lua +++ b/game/modules/tome/data/talents/spells/animus.lua @@ -46,7 +46,7 @@ newTalent{ local heal = t.getHeal(self, t) return ([[Crush and consume one of your captured souls, healing you for %d life and restoring %d mana. The life and mana healed will increase with your Spellpower.]]): - format(heal, heal / 3) + tformat(heal, heal / 3) end, } @@ -66,7 +66,7 @@ newTalent{ local max, chance = t.getMax(self, t), t.getChance(self, t) return ([[Your hunger for souls grows ever more. When you kill a creature you rip away its animus with great force, granting you a %d%% chance to gain one additional soul. In addition you are able to store %d more souls.]]): - format(chance, max) + tformat(chance, max) end, } @@ -176,7 +176,7 @@ newTalent{ game.party:addMember(m, { control="full", type="husk", - title="Lifeless Husk", + title=_t"Lifeless Husk", orders = {leash=true, follow=true}, on_control = function(self) self:hotkeyAutoTalents() @@ -200,7 +200,7 @@ newTalent{ Only one husk can be controlled at any time, if this spell is cast again it will dispell the previous husk, even if no new one is created. Bosses, other undeads and summoned creatures can not be turned into husks. The damage and chance will increase with your Spellpower.]]): - format(damDesc(self, DamageType.DARKNESS, damage), t.getMaxLife(self, t)) + tformat(damDesc(self, DamageType.DARKNESS, damage), t.getMaxLife(self, t)) end, } @@ -230,7 +230,7 @@ newTalent{ - Cold Flames: freeze chance increased to 100%% - Freeze: becomes a ball of radius 2 and makes all targets wet - Consume Soul: effect increased by 50%%]]): - format(nb) + tformat(nb) end, } @@ -265,6 +265,6 @@ newTalent{ info = function(self, t) local rad = self:getTalentRadius(t) return ([[The husk self-destructs, destroying itself and generating a blast of shadows in a radius of %d, doing %0.2f darkness damage. - This spell is only usable when the husk's master is dead.]]):format(rad, damDesc(self, DamageType.DARKNESS, 50 + 10 * self.level)) + This spell is only usable when the husk's master is dead.]]):tformat(rad, damDesc(self, DamageType.DARKNESS, 50 + 10 * self.level)) end, } diff --git a/game/modules/tome/data/talents/spells/arcane.lua b/game/modules/tome/data/talents/spells/arcane.lua index f07e33bef21d0346780780a9bfcce0443f9d5c80..1b9622f9de3ad4c7e16feedf19698a80fad82c7b 100644 --- a/game/modules/tome/data/talents/spells/arcane.lua +++ b/game/modules/tome/data/talents/spells/arcane.lua @@ -57,7 +57,7 @@ newTalent{ return ([[Conjures up mana into a powerful bolt doing %0.2f arcane damage. At level 3, it becomes a beam. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.ARCANE, damage)) + tformat(damDesc(self, DamageType.ARCANE, damage)) end, } @@ -91,7 +91,7 @@ newTalent{ info = function(self, t) local resist = self.sustain_talents[t.id] and self.sustain_talents[t.id].display_resist or t.getArcaneResist(self, t) return ([[Your mastery of magic allows you to enter a state of deep concentration, increasing your Spellpower by %d and arcane resistance by %d%%.]]): - format(t.getSpellpowerIncrease(self, t), resist) + tformat(t.getSpellpowerIncrease(self, t), resist) end, } @@ -127,7 +127,7 @@ newTalent{ If no foes are found, the target will take 50%% more arcane damage. If the target dies, the vortex explodes, releasing all remaining damage in a radius 2 ball of arcane force. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.ARCANE, dam)) + tformat(damDesc(self, DamageType.ARCANE, dam)) end, } @@ -157,7 +157,7 @@ newTalent{ return max_dam * 2 -- Maximum damage is 2x total mana pool end, explode = function(self, t, dam) - game.logSeen(self, "#VIOLET#%s's disruption shield collapses and then explodes in a powerful manastorm!", self.name:capitalize()) + game.logSeen(self, "#VIOLET#%s's disruption shield collapses and then explodes in a powerful manastorm!", self:getName():capitalize()) dam = math.min(dam, t.getMaxDamage(self, t)) -- Damage cap -- Add a lasting map effect local radius = self:getTalentRadius(t) @@ -217,12 +217,12 @@ newTalent{ self.disruption_shield_storage = self.disruption_shield_storage or 0 if cb.value <= self.disruption_shield_power then - game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):format(cb.value), false) + game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):tformat(cb.value), false) self.disruption_shield_power = self.disruption_shield_power - cb.value cb.value = 0 return true else - game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):format(cb.value), false) + game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):tformat(cb.value), false) self.disruption_shield_power = 0 cb.value = cb.value - self.disruption_shield_power end @@ -244,7 +244,7 @@ newTalent{ self:incMana(-mana_usage) self.disruption_shield_storage = math.min(self.disruption_shield_storage + store, t.getMaxDamage(self, t)) - game:delayedLogDamage(src, self, 0, ("#PURPLE#(%d mana)#LAST#"):format(store), false) + game:delayedLogDamage(src, self, 0, ("#PURPLE#(%d mana)#LAST#"):tformat(store), false) if do_explode then -- Deactivate without losing energy @@ -260,10 +260,10 @@ newTalent{ if eneed < energy then self.disruption_shield_power = max self:incMana((energy - eneed) * val / 100) - game.logSeen(self, "%s restores Disruption Shield (+%d) and gains %d mana with Aegis!", self.name, eneed/2, (energy - eneed) * val / 100) + game.logSeen(self, "%s restores Disruption Shield (+%d) and gains %d mana with Aegis!", self:getName(), eneed/2, (energy - eneed) * val / 100) else self.disruption_shield_power = self.disruption_shield_power + energy / 2 - game.logSeen(self, "%s restores Disruption Shield (+%d) with Aegis!", self.name, energy / 2) + game.logSeen(self, "%s restores Disruption Shield (+%d) with Aegis!", self:getName(), energy / 2) end self.disruption_shield_storage = 0 end, @@ -305,6 +305,6 @@ newTalent{ Current shield power: %d Current stored energy: %d]]): - format(t.getMaxAbsorb(self, t), t.getManaRatio(self, t), t.getMaxDamage(self, t), self:getTalentRadius(t), t.getMaxDamageLimit(self, t), self.disruption_shield_power or 0, self.disruption_shield_storage or 0) + tformat(t.getMaxAbsorb(self, t), t.getManaRatio(self, t), t.getMaxDamage(self, t), self:getTalentRadius(t), t.getMaxDamageLimit(self, t), self.disruption_shield_power or 0, self.disruption_shield_storage or 0) end, } diff --git a/game/modules/tome/data/talents/spells/conveyance.lua b/game/modules/tome/data/talents/spells/conveyance.lua index e111e95b9c9afeb0e1891aa174c4798dcefa3fad..81ae77038ed49c133912aaecb2ae1c5e75c7598e 100644 --- a/game/modules/tome/data/talents/spells/conveyance.lua +++ b/game/modules/tome/data/talents/spells/conveyance.lua @@ -163,7 +163,7 @@ newTalent{ At level 4, it allows you to specify which creature to teleport. At level 5, it allows you to choose the target area (radius %d). If the target area is not in line of sight, there is a chance the spell will partially fail and teleport the target randomly. - The range will increase with your Spellpower.]]):format(range, radius) + The range will increase with your Spellpower.]]):tformat(range, radius) end, } @@ -279,7 +279,7 @@ newTalent{ At level 5, it allows you to choose the target area (radius %d). If the target area is not in line of sight, there is a chance the spell will partially fail and teleport the target randomly. Random teleports have a minimum range of %d. - The range will increase with your Spellpower.]]):format(range, radius, t.minRange) + The range will increase with your Spellpower.]]):tformat(range, radius, t.minRange) end, } @@ -317,7 +317,7 @@ newTalent{ Any time the caster should take damage, there is a %d%% chance that it will instead be warped by the shield and hit the designated target. Once the maximum damage (%d) is absorbed, the time runs out (%d turns), or the target dies, the shield will crumble. The max damage the shield can absorb will increase with your Spellpower.]]): - format(chance, maxabsorb, duration) + tformat(chance, maxabsorb, duration) end, } @@ -350,6 +350,6 @@ newTalent{ Teleports up to %d grids. After a successful probability travel you are left unstable, unable to do it again for a number of turns equal to %d%% of the number of tiles you blinked through. The range will improve with your Spellpower.]]): - format(range, (2 + (5 - math.min(self:getTalentLevelRaw(t), 5)) / 2) * 100) + tformat(range, (2 + (5 - math.min(self:getTalentLevelRaw(t), 5)) / 2) * 100) end, } diff --git a/game/modules/tome/data/talents/spells/deeprock.lua b/game/modules/tome/data/talents/spells/deeprock.lua index 8a0535272081978f858ec6bdc2bd13adfeec0f7e..0269c0bf1b294c36d1abf236f06b4679b7a29424 100644 --- a/game/modules/tome/data/talents/spells/deeprock.lua +++ b/game/modules/tome/data/talents/spells/deeprock.lua @@ -43,21 +43,21 @@ newTalent{ local xsi = "" if self:knowTalent(self.T_VOLCANIC_ROCK) then xs = xs..(", Arcane damage by %0.1f%% and Arcane damage penetration by %0.1f%%"): - format(self:callTalent(self.T_VOLCANIC_ROCK, "getDam"), self:callTalent(self.T_VOLCANIC_ROCK, "getPen")) + tformat(self:callTalent(self.T_VOLCANIC_ROCK, "getDam"), self:callTalent(self.T_VOLCANIC_ROCK, "getPen")) end if self:knowTalent(self.T_BOULDER_ROCK) then xs = (", Nature damage by %0.1f%% and Nature damage penetration by %0.1f%%"): - format(self:callTalent(self.T_BOULDER_ROCK, "getDam"), self:callTalent(self.T_BOULDER_ROCK, "getPen"))..xs + tformat(self:callTalent(self.T_BOULDER_ROCK, "getDam"), self:callTalent(self.T_BOULDER_ROCK, "getPen"))..xs end if self:knowTalent(self.T_MOUNTAINHEWN) then xsi = (" and %d%% bleeding, poison, disease, and stun immunity"): - format(self:callTalent(self.T_MOUNTAINHEWN, "getImmune")*100) + tformat(self:callTalent(self.T_MOUNTAINHEWN, "getImmune")*100) end return ([[You call upon the very core of the world, harnessing its power to transform your body. For %d turns you become a Deeprock Elemental, gaining two size categories%s. This increases your Physical damage by %0.1f%% and Physical damage penetration by %0.1f%%%s, and armour by %d.%s The effects increase with spellpower.]]) - :format(t.getTime(self, t), xsi, t.getDam(self, t),t.getPen(self, t), xs, t.getArmor(self, t), self:getTalentLevel(self.T_MOUNTAINHEWN) >=5 and "\nIn addition, you use your physical resistance versus all damage against you." or "") + :tformat(t.getTime(self, t), xsi, t.getDam(self, t),t.getPen(self, t), xs, t.getArmor(self, t), self:getTalentLevel(self.T_MOUNTAINHEWN) >=5 and _t"\nIn addition, you use your physical resistance versus all damage against you." or "") end, } @@ -73,7 +73,7 @@ newTalent{ local tv = self:getTalentFromId(self.T_VOLCANO) return ([[When you turn into a Deeprock elemental your Arcane damage is increased by %0.1f%%, Arcane damage penetration by %0.1f%% and you gain the power to invoke volcanos: %s]]): - format(t.getDam(self, t),t.getPen(self, t), self:getTalentFullDescription(tv, self:getTalentLevelRaw(t) * 2):toString()) -- rescale volcano talent levels? + tformat(t.getDam(self, t),t.getPen(self, t), self:getTalentFullDescription(tv, self:getTalentLevelRaw(t) * 2):toString()) -- rescale volcano talent levels? end, } @@ -89,7 +89,7 @@ newTalent{ local tv = self:getTalentFromId(self.T_THROW_BOULDER) return ([[When you turn into a Deeprock elemental your Nature damage is increased by %0.1f%%, Nature damage penetration by %0.1f%% and you gain the power to throw boulders: %s]]): - format(t.getDam(self, t),t.getPen(self, t), self:getTalentFullDescription(tv, self:getTalentLevelRaw(t) * 2):toString()) + tformat(t.getDam(self, t),t.getPen(self, t), self:getTalentFullDescription(tv, self:getTalentLevelRaw(t) * 2):toString()) end, } @@ -103,6 +103,6 @@ newTalent{ info = function(self, t) return ([[While in deeprock form, you become indomitable, granting you %d%% resistance to cuts, poisons, diseases and stuns. At level 5 and higher, while Deeprock Form is active, all incoming damage is applied against physical resistance instead of the normal resistance type.]]): - format(t.getImmune(self, t)*100) + tformat(t.getImmune(self, t)*100) end, } diff --git a/game/modules/tome/data/talents/spells/divination.lua b/game/modules/tome/data/talents/spells/divination.lua index 70dba56e490544021f0c0a3619f30eeca4fa3595..3be5a6c4bd16d2c4140273e3e6835c40c58c12f8 100644 --- a/game/modules/tome/data/talents/spells/divination.lua +++ b/game/modules/tome/data/talents/spells/divination.lua @@ -51,7 +51,7 @@ newTalent{ Only one arcane eye can exist at any given time. At level 4, if cast on a creature it will follow it until it expires, or until the creature dies. At level 5, it will place a magical marker on the creatures, negating invisibility and stealth effects.]]): - format(duration, radius) + tformat(duration, radius) end, } @@ -88,7 +88,7 @@ newTalent{ return ([[You focus your senses, getting information from moments in the future. Improves your capacity to see invisible foes by +%d, to see through stealth by +%d, and to perform a critical spell cast by +%d%%. The effects will improve with your Spellpower.]]): - format(seeinvisible, seestealth, criticalchance) + tformat(seeinvisible, seestealth, criticalchance) end, } @@ -110,7 +110,7 @@ newTalent{ info = function(self, t) local radius = t.getRadius(self, t) return ([[Form a map of your surroundings in your mind in a radius of %d]]): - format(radius) + tformat(radius) end, } @@ -145,6 +145,6 @@ newTalent{ return ([[Echoes of the future flash before your eyes, allowing you to sense some incoming attacks. If the attack is not physical, you will erect a temporary shield that reduces all damage of this type by %d%% for 5 turns. This effect can only happen once every 5 turns, and happens before damage is taken. - The bonus will increase with your Spellpower.]]):format(resist) + The bonus will increase with your Spellpower.]]):tformat(resist) end, } diff --git a/game/modules/tome/data/talents/spells/earth.lua b/game/modules/tome/data/talents/spells/earth.lua index a9aa1f077b4a7c90bdf82b7f3f19bc3b29a3db9c..38a10a747df96f055f2cfce356f0f2361528347b 100644 --- a/game/modules/tome/data/talents/spells/earth.lua +++ b/game/modules/tome/data/talents/spells/earth.lua @@ -65,7 +65,7 @@ newTalent{ The beam continues to a range of %d, affecting any creatures in its path, dealing %0.2f physical damage to them. If any walls are dug, you gain %d%% physical damage bonus for 6 turns. The damage will increase with your Spellpower.]]): - format(nb, self:getTalentRange(t), damDesc(self, DamageType.PHYSICAL, damage), t.getBonus(self, t)) + tformat(nb, self:getTalentRange(t), damDesc(self, DamageType.PHYSICAL, damage), t.getBonus(self, t)) end, } @@ -118,7 +118,7 @@ newTalent{ return ([[The caster's skin grows as hard as stone, granting a %d bonus to Armour. Each time you are hit in melee, you have a %d%% chance to reduce the cooldown of an Earth or Stone spell by 2 (this effect can only happen once per turn). The bonus to Armour will increase with your Spellpower.]]): - format(armor, t.getCDChance(self, t)) + tformat(armor, t.getCDChance(self, t)) end, } @@ -152,7 +152,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Conjures a mudslide, dealing %0.2f physical damage in a radius of %d. Any creatures caught inside will be knocked back 8 spaces. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.PHYSICAL, damage), self:getTalentRadius(t)) + tformat(damDesc(self, DamageType.PHYSICAL, damage), self:getTalentRadius(t)) end, } @@ -208,12 +208,12 @@ newTalent{ local e = Object.new{ old_feat = oe, - name = "stone wall", + name = _t"stone wall", image = oe.image, add_mos = table.clone(oe.add_mos or {}, true), add_displays = table.clone(oe.add_displays or {}), display = '#', color_r=255, color_g=255, color_b=255, back_color=colors.GREY, - desc = "a summoned wall of stone", + desc = _t"a summoned wall of stone", type = "wall", --subtype = "floor", always_remember = true, can_pass = {pass_wall=1}, @@ -259,6 +259,6 @@ newTalent{ At level 4, it becomes targetable. Any hostile creature caught in the radius will also suffer %0.2f physical damage. Duration and damage will improve with your Spellpower.]]): - format(duration, damDesc(self, DamageType.PHYSICAL, damage)) + tformat(duration, damDesc(self, DamageType.PHYSICAL, damage)) end, } diff --git a/game/modules/tome/data/talents/spells/eldritch-shield.lua b/game/modules/tome/data/talents/spells/eldritch-shield.lua index e4029f1fdd4e7a6c38e7643cc4a406c85d4180c8..ee71e2899ad952124cbb9ad135f6e023d86084c0 100644 --- a/game/modules/tome/data/talents/spells/eldritch-shield.lua +++ b/game/modules/tome/data/talents/spells/eldritch-shield.lua @@ -47,7 +47,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower(), apply_save="combatSpellResist"}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end self:forceUseTalent(self.T_BLOCK, {ignore_cooldown=true, ignore_energy=true}) end @@ -59,7 +59,7 @@ newTalent{ If either attack hits, the target will be stunned for %d turns and you automatically Block. The chance for the attack to stun increases with your Physical Power, but it is considered a magical attack and thus is resisted with spell save, rather than physical save. Damage increases with Spellpower.]]) - :format(100 * self:combatTalentWeaponDamage(t, 0.6, (100 + self:combatTalentSpellDamage(t, 50, 300)) / 100), t.getDuration(self, t)) + :tformat(100 * self:combatTalentWeaponDamage(t, 0.6, (100 + self:combatTalentSpellDamage(t, 50, 300)) / 100), t.getDuration(self, t)) end, } @@ -98,7 +98,7 @@ newTalent{ return ([[Imbues your shields with arcane power, dealing %0.2f arcane damage with each melee strike and %0.2f arcane damage when hit. Allows counterstrikes after incomplete blocks and the cooldown of Block is reduced by %d turns. The damage will increase with Spellpower.]]): - format(damDesc(self, DamageType.ARCANE, dam), damDesc(self, DamageType.ARCANE, dam * 0.7), t.getBlockCD(self, t)) + tformat(damDesc(self, DamageType.ARCANE, dam), damDesc(self, DamageType.ARCANE, dam * 0.7), t.getBlockCD(self, t)) end, } @@ -131,7 +131,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_DAZED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower(), apply_save="combatSpellResist"}) else - game.logSeen(target, "%s resists the dazing blows!", target.name:capitalize()) + game.logSeen(target, "%s resists the dazing blows!", target:getName():capitalize()) end self:alterTalentCoolingdown(self.T_BLOCK, -1000) end @@ -142,7 +142,7 @@ newTalent{ return ([[Channel eldritch forces into a ferocious melee attack, hitting the target three times with your shields doing %d%% Nature damage. If any of the attacks hit, the target will be dazed for %d turns and your Block cooldown is reset. The chance for the attack to daze increases with you Physical Power, but it is considered a magical attack and thus is resisted with spell save, rather than physical save.]]) - :format(100 * self:combatTalentWeaponDamage(t, 0.6, 1.6), t.getDuration(self, t)) + :tformat(100 * self:combatTalentWeaponDamage(t, 0.6, 1.6), t.getDuration(self, t)) end, } @@ -184,7 +184,7 @@ newTalent{ You perform a melee attack for %d%% arcane damage against everyone within radius %d. Any creature hit by the attack will be submitted to a Counterstrike effect for 3 turns, as if you had blocked against them. At level 5 your Block cooldown is reset.]]) - :format(100 * self:combatTalentWeaponDamage(t, 1.3, 2.6), self:getTalentRadius(t)) + :tformat(100 * self:combatTalentWeaponDamage(t, 1.3, 2.6), self:getTalentRadius(t)) end, } diff --git a/game/modules/tome/data/talents/spells/eldritch-stone.lua b/game/modules/tome/data/talents/spells/eldritch-stone.lua index b86fb4f109c1c42bb9341d0bc5b9de5d3831c9f4..fbb9ac3babdd1a05d9c1d9f2fdd3486ab82a1f2b 100644 --- a/game/modules/tome/data/talents/spells/eldritch-stone.lua +++ b/game/modules/tome/data/talents/spells/eldritch-stone.lua @@ -77,18 +77,18 @@ newTalent{ info = function(self, t) local xs = "" if self:knowTalent(self.T_POISONED_SPIKES) then - xs = ("poisoned for %0.1f Nature damage over 6 turns (%d%% healing reduction)"):format(damDesc(self, DamageType.NATURE, self:callTalent(self.T_POISONED_SPIKES, "getDamage")), self:callTalent(self.T_POISONED_SPIKES, "getHeal")) + xs = ("poisoned for %0.1f Nature damage over 6 turns (%d%% healing reduction)"):tformat(damDesc(self, DamageType.NATURE, self:callTalent(self.T_POISONED_SPIKES, "getDamage")), self:callTalent(self.T_POISONED_SPIKES, "getHeal")) end if self:knowTalent(self.T_ELDRITCH_SPIKES) then - xs = xs..(", blasted for %0.1f Arcane damage (and silenced for %d turns),"):format(damDesc(self, DamageType.ARCANE, self:callTalent(self.T_ELDRITCH_SPIKES, "getDamage")), self:callTalent(self.T_ELDRITCH_SPIKES, "getSilence")) + xs = xs..(", blasted for %0.1f Arcane damage (and silenced for %d turns),"):tformat(damDesc(self, DamageType.ARCANE, self:callTalent(self.T_ELDRITCH_SPIKES, "getDamage")), self:callTalent(self.T_ELDRITCH_SPIKES, "getSilence")) end if self:knowTalent(self.T_IMPALING_SPIKES) then - xs = xs..(" impaled for %0.1f Physical damage (and disarmed for %d turns),"):format(damDesc(self, DamageType.PHYSICAL, self:callTalent(self.T_IMPALING_SPIKES, "getDamage")), self:callTalent(self.T_IMPALING_SPIKES, "getDisarm")) + xs = xs..(" impaled for %0.1f Physical damage (and disarmed for %d turns),"):tformat(damDesc(self, DamageType.PHYSICAL, self:callTalent(self.T_IMPALING_SPIKES, "getDamage")), self:callTalent(self.T_IMPALING_SPIKES, "getDisarm")) end return ([[Stony spikes erupt from the ground in a radius %d cone. Creatures caught in the area will be %scut for %0.1f Physical damage dealt over 6 turns. The damage increases with your Spellpower, and the chance to apply the detrimental effect(s) improves with Spellpower or Physical Power, whichever is greater.]]) - :format(self:getTalentRadius(t), xs ~="" and xs.." and " or "", damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) + :tformat(self:getTalentRadius(t), xs ~="" and xs.._t" and " or "", damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t))) end, } @@ -106,7 +106,7 @@ newTalent{ local dam = t.getDamage(self, t) return ([[Coats your stone spikes with insidious poison, dealing %0.1f total nature damage over 6 turns while reducing all healing by %d%%. The damage increases with Spellpower and the chance to poison and healing reduction increases with either Spellpower or Physical Power, whichever is greater.]]): - format(damDesc(self, DamageType.NATURE, t.getDamage(self, t)), t.getHeal(self, t)) + tformat(damDesc(self, DamageType.NATURE, t.getDamage(self, t)), t.getHeal(self, t)) end, } @@ -122,7 +122,7 @@ newTalent{ local dam = t.getDamage(self, t) return ([[Imbues your stone spikes with arcane forces, dealing %0.1f Arcane damage and silencing each target hit for %d turns. The damage increases with Spellpower and the chance to silence increases with either Spellpower or Physical Power, whichever is greater.]]): - format(damDesc(self, DamageType.ARCANE, t.getDamage(self, t)), t.getSilence(self, t)) + tformat(damDesc(self, DamageType.ARCANE, t.getDamage(self, t)), t.getSilence(self, t)) end, } @@ -137,7 +137,7 @@ newTalent{ info = function(self, t) return ([[Your stone spikes grow in length, instantly dealing %0.1f Physical damage and disarming targets hit for %d turns. The damage increases with Spellpower and the chance to disarm increases with either Spellpower or Physical Power, whichever is greater.]]): - format(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), t.getDisarm(self, t)) + tformat(damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), t.getDisarm(self, t)) end, } diff --git a/game/modules/tome/data/talents/spells/energy-alchemy.lua b/game/modules/tome/data/talents/spells/energy-alchemy.lua index b6285c16d9980665e80cbe7e6cab613a3f5ac35a..0419c2231ed8dc10584ccd20a2325d1227bc775a 100644 --- a/game/modules/tome/data/talents/spells/energy-alchemy.lua +++ b/game/modules/tome/data/talents/spells/energy-alchemy.lua @@ -43,7 +43,7 @@ newTalent{ return ([[When you throw your alchemist bombs, you infuse them with lightning damage that can daze your foes. In addition all lightning damage you do is increased by %d%%. You cannot have more than one alchemist infusion sustain active at once.]]): - format(daminc) + tformat(daminc) end, } @@ -73,7 +73,7 @@ newTalent{ info = function(self, t) return ([[While Lightning Infusion is active, your bombs energize your golem. All talents on cooldown on your golem have %d%% chance to be reduced by %d.]]): - format(t.getChance(self, t), t.getNb(self, t)) + tformat(t.getChance(self, t), t.getNb(self, t)) end, } @@ -132,7 +132,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[By crushing an alchemist gem you generate a thunderclap in a cone of radius %d dealing %0.2f physical damage and %0.2f lightning damage. All creatures caught inside are knocked back and disarmed for %d turns. - The duration and damage will increase with your Spellpower.]]):format(radius, damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), damDesc(self, DamageType.LIGHTNING, t.getDamage(self, t)), t.getDuration(self, t)) + The duration and damage will increase with your Spellpower.]]):tformat(radius, damDesc(self, DamageType.PHYSICAL, t.getDamage(self, t)), damDesc(self, DamageType.LIGHTNING, t.getDamage(self, t)), t.getDuration(self, t)) end, } @@ -179,14 +179,14 @@ newTalent{ if not p.last_life then p.last_life = self.life end local min = self.max_life * 0.2 if self.life <= p.last_life - min then - game.logSeen(self, "#LIGHT_STEEL_BLUE#%s is energized by all the damage taken!", self.name:capitalize()) + game.logSeen(self, "#LIGHT_STEEL_BLUE#%s is energized by all the damage taken!", self:getName():capitalize()) self.energy.value = self.energy.value + (t.getTurn(self, t) * game.energy_to_act / 100) end p.last_life = self.life end, activate = function(self, t) game:playSoundNear(self, "talents/lightning") - local ret = {name = self.name:capitalize().."'s "..t.name} + local ret = {name = ("%s's %s"):tformat(self:getName():capitalize(), t.name)} self:talentTemporaryValue(ret, "movement_speed", t.getSpeed(self, t)) ret.last_life = self.life @@ -210,6 +210,6 @@ newTalent{ In addition, damage to your health will energize you. At the start of each turn in which you have lost at least %d life (20%% of your maximum life) since your last turn, you will gain %d%% of a turn. The effects increase with your Spellpower.]]): - format(speed, range, damDesc(self, DamageType.LIGHTNING, t.getDamage(self, t)), self.max_life * 0.2, turn) + tformat(speed, range, damDesc(self, DamageType.LIGHTNING, t.getDamage(self, t)), self.max_life * 0.2, turn) end, } diff --git a/game/modules/tome/data/talents/spells/enhancement.lua b/game/modules/tome/data/talents/spells/enhancement.lua index a1acbdd1c34c2a787ee17c0a71ba0f48f07e02f4..486b351894b40130892809659ffd4cac5155b74f 100644 --- a/game/modules/tome/data/talents/spells/enhancement.lua +++ b/game/modules/tome/data/talents/spells/enhancement.lua @@ -61,7 +61,7 @@ newTalent{ return ([[Strike twice with your mainhand weapon dealing %d%% Arcane damage. If either of these attacks hit you gain %d mana. The mana gain will increase with your Spellpower.]]): - format(t.getDamage(self, t)*100, t.getMana(self, t)) + tformat(t.getDamage(self, t)*100, t.getMana(self, t)) end, } @@ -105,7 +105,7 @@ newTalent{ return ([[Engulfs your hands (and weapons) in a sheath of fire, dealing %0.2f fire damage per melee attack and increasing all fire damage dealt by %d%%. Each hit will also regenerate %0.2f stamina. The effects will increase with your Spellpower.]]): - format(damDesc(self, DamageType.FIRE, firedamage), firedamageinc, self:getTalentLevel(t) / 3) + tformat(damDesc(self, DamageType.FIRE, firedamage), firedamageinc, self:getTalentLevel(t) / 3) end, } @@ -148,7 +148,7 @@ newTalent{ return ([[Engulfs your hands (and weapons) in a sheath of lightning, dealing %d lightning damage with a chance to daze (25%%) per melee attack and increasing all lightning damage dealt by %d%%. Each hit will also regenerate %0.2f mana. The effects will increase with your Spellpower.]]): - format(damDesc(self, DamageType.LIGHTNING, icedamage), icedamageinc, self:getTalentLevel(t) / 3) + tformat(damDesc(self, DamageType.LIGHTNING, icedamage), icedamageinc, self:getTalentLevel(t) / 3) end, } @@ -192,6 +192,6 @@ newTalent{ return ([[You concentrate on your inner self, increasing your Strength, Dexterity, Magic, and Cunning by %d. Additionally, you gain a shield absorbing %d damage before you take damage every %d turns. The stat increase and shield will improve with your Spellpower.]]): - format(statinc, absorb, self:getTalentCooldown(t) ) + tformat(statinc, absorb, self:getTalentCooldown(t) ) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/spells/explosives.lua b/game/modules/tome/data/talents/spells/explosives.lua index 553b41c0d0b0d31349af1812f13f6fe6704e953f..245f56fa1aeb6793bd40741976921160a1887469 100644 --- a/game/modules/tome/data/talents/spells/explosives.lua +++ b/game/modules/tome/data/talents/spells/explosives.lua @@ -144,7 +144,7 @@ newTalent{ return ([[Imbue an alchemist gem with an explosive charge of mana and throw it. The gem will explode for %0.1f %s damage. Each kind of gem will also provide a specific effect. - The damage will improve with better gems and with your Spellpower.]]):format(dam, DamageType:get(damtype).name) + The damage will improve with better gems and with your Spellpower.]]):tformat(dam, DamageType:get(damtype).name) end, } @@ -169,7 +169,7 @@ newTalent{ info = function(self, t) return ([[Grants %d%% protection to you, your golem and other friendly creatures against the elemental damage of your own bombs, and against external elemental damage (fire, cold, lightning and acid) by %d%%. At talent level 5 it also protects against all side effects of your bombs.]]): - format(math.min(100, self:getTalentLevelRaw(t) * 20), self:getTalentLevelRaw(t) * 3) + tformat(math.min(100, self:getTalentLevelRaw(t) * 20), self:getTalentLevelRaw(t) * 3) end, } @@ -199,7 +199,7 @@ newTalent{ local min, max = t.minmax(self, t) return ([[Your alchemist bombs now affect a radius of %d around them. Explosion damage may increase by %d%% (if the explosion is not contained) to %d%% if the area of effect is confined.]]): - format(t.getRadius(self, t), min*100, max*100) --I5 + tformat(t.getRadius(self, t), min*100, max*100) --I5 end, } @@ -299,6 +299,6 @@ newTalent{ return ([[Crush together two alchemist gems, making them extremely unstable. You then throw them to a target area, where they explode on impact, dealing %0.2f physical damage and knocking back any creatures in the blast radius. Each kind of gem will also provide a specific effect. - The damage will improve with better gems and with your Spellpower.]]):format(dam) + The damage will improve with better gems and with your Spellpower.]]):tformat(dam) end, } diff --git a/game/modules/tome/data/talents/spells/fire-alchemy.lua b/game/modules/tome/data/talents/spells/fire-alchemy.lua index 2ec15e1daed305baa3e7f6c12e3b9446d7fa3910..5ebb01f1faab5281aa3c37871251b35c9c8d6cb7 100644 --- a/game/modules/tome/data/talents/spells/fire-alchemy.lua +++ b/game/modules/tome/data/talents/spells/fire-alchemy.lua @@ -43,7 +43,7 @@ newTalent{ return ([[When you throw your alchemist bombs, you infuse them with flames that burn for a few turns. In addition all fire damage you do is increased by %d%%. You cannot have more than one alchemist infusion sustain active at once.]]): - format(daminc) + tformat(daminc) end, } @@ -109,7 +109,7 @@ newTalent{ return ([[Throw a smoke bomb, blocking everyone's line of sight. The smoke dissipates after %d turns. If a creature inside is victim of fire burns the smoke will consume instantly, replicating the burns on all foes and increasing its duration by %d turns. Duration will increase with your Spellpower.]]): - format(duration, math.ceil(duration / 3)) + tformat(duration, math.ceil(duration / 3)) end, } @@ -144,7 +144,7 @@ newTalent{ end, 0, 0 ) - ef.name = "firestorm" + ef.name = _t"firestorm" game:playSoundNear(self, "talents/fire") return true end, @@ -154,7 +154,7 @@ newTalent{ return ([[A furious fire storm rages around the caster, doing %0.2f fire damage in a radius of 3 each turn for %d turns. You closely control the firestorm, preventing it from harming your party members. The damage and duration will increase with your Spellpower.]]): - format(damDesc(self, DamageType.FIRE, damage), duration) + tformat(damDesc(self, DamageType.FIRE, damage), duration) end, } @@ -217,7 +217,7 @@ newTalent{ end, activate = function(self, t) game:playSoundNear(self, "talents/fireflash") - game.logSeen(self, "#FF8000#%s turns into pure flame!", self.name:capitalize()) + game.logSeen(self, "#FF8000#%s turns into pure flame!", self:getName():capitalize()) self:addShaderAura("body_of_fire", "awesomeaura", {time_factor=3500, alpha=1, flame_scale=1.1}, "particles_images/wings.png") return { onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.FIRE]=t.getFireDamageOnHit(self, t)}), @@ -226,7 +226,7 @@ newTalent{ end, deactivate = function(self, t, p) self:removeShaderAura("body_of_fire") - game.logSeen(self, "#FF8000#The raging fire around %s calms down and disappears.", self.name) + game.logSeen(self, "#FF8000#The raging fire around %s calms down and disappears.", self:getName()) self:removeTemporaryValue("on_melee_hit", p.onhit) self:removeTemporaryValue("resists", p.res) return true @@ -238,6 +238,6 @@ newTalent{ return ([[Turn your body into pure flame, increasing your fire resistance by %d%%, burning any creatures striking you in melee for %0.2f fire damage, and randomly launching up to %d slow-moving fire bolt(s) per turn at targets in sight, each dealing %0.2f fire damage. The projectiles safely go through your friends without harming them. The damage and resistance will increase with your Spellpower.]]): - format(res,onhitdam, t.getNumber(self, t), insightdam) + tformat(res,onhitdam, t.getNumber(self, t), insightdam) end, } diff --git a/game/modules/tome/data/talents/spells/fire.lua b/game/modules/tome/data/talents/spells/fire.lua index 83e80c57012df2663c4baffcb93d16789042da86..973eaaef0b20aa9699c2c902b90a07924e01b07b 100644 --- a/game/modules/tome/data/talents/spells/fire.lua +++ b/game/modules/tome/data/talents/spells/fire.lua @@ -71,7 +71,7 @@ newTalent{ return ([[Conjures up a bolt of fire, setting the target ablaze and doing %0.2f fire damage over 3 turns. At level 5, it will create a beam of flames. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.FIRE, damage)) + tformat(damDesc(self, DamageType.FIRE, damage)) end, } @@ -121,7 +121,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Conjures up a cone of flame with radius %d. Any targets caught in the area will suffer Burning Shock, stunning them and dealing %0.2f fire damage over %d turns. The damage will increase with your Spellpower.]]): - format(radius, damDesc(self, DamageType.FIRE, damage), stunduration) + tformat(radius, damDesc(self, DamageType.FIRE, damage), stunduration) end, } @@ -167,7 +167,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Conjures up a bolt of fire that moves toward the target and explodes into a flash of fire, doing %0.2f fire damage in a radius of %d. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.FIRE, damage), radius) + tformat(damDesc(self, DamageType.FIRE, damage), radius) end, } @@ -212,7 +212,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Raging flames burn foes and allies alike, doing %0.2f fire damage in a radius of %d each turn for %d turns. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.FIRE, damage), radius, duration) + tformat(damDesc(self, DamageType.FIRE, damage), radius, duration) end, } diff --git a/game/modules/tome/data/talents/spells/frost-alchemy.lua b/game/modules/tome/data/talents/spells/frost-alchemy.lua index 9cd5010ed09f1ed209a81daea244381a79091366..e00e1a4caca4e917a6607c9130d6131fa374920a 100644 --- a/game/modules/tome/data/talents/spells/frost-alchemy.lua +++ b/game/modules/tome/data/talents/spells/frost-alchemy.lua @@ -43,7 +43,7 @@ newTalent{ return ([[When you throw your alchemist bombs, you infuse them with cold damage that can freeze your foes. In addition all cold damage you do is increased by %d%%. You cannot have more than one alchemist infusion sustain active at once.]]): - format(daminc) + tformat(daminc) end, } @@ -69,7 +69,7 @@ newTalent{ return ([[While Frost Infusion is active, your bombs deposit a layer of ice on your golem for %d turns when they hit it. This ice provides your golem with %d additional armour, melee attacks against it deal %0.1f Cold damage to the attacker, and 50%% of its damage is converted to Cold. The effects increase with your talent level and with the Spellpower and damage modifiers of your golem.]]): - format(duration, armor, dam) + tformat(duration, armor, dam) end, } @@ -101,7 +101,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Invoke a blast of cold all around you with a radius of %d, doing %0.1f Cold damage and freezing creatures to the ground for %d turns. Affected creatures can still act, but cannot move. - The duration will increase with your Spellpower.]]):format(radius, damDesc(self, DamageType.COLD, t.getDamage(self, t)), t.getDuration(self, t)) + The duration will increase with your Spellpower.]]):tformat(radius, damDesc(self, DamageType.COLD, t.getDamage(self, t)), t.getDuration(self, t)) end, } @@ -139,6 +139,6 @@ newTalent{ return ([[Turn your body into pure ice, increasing your Cold damage affinity by %d%% and your physical resistance by %d%%. You have a %d%% chance to shrug off all direct critical hits (physical, mental, spell). The effects increase with your Spellpower.]]): - format(t.getAffinity(self, t), resist, crit) + tformat(t.getAffinity(self, t), resist, crit) end, } diff --git a/game/modules/tome/data/talents/spells/golem.lua b/game/modules/tome/data/talents/spells/golem.lua index 50505fb865b44d6beaf2e2a80ad0e1ba219b70f9..a02c37854fb06cb3ea6e911a9a336668d113938e 100644 --- a/game/modules/tome/data/talents/spells/golem.lua +++ b/game/modules/tome/data/talents/spells/golem.lua @@ -70,7 +70,7 @@ newTalent{ target:knockback(self.x, self.y, 3) target:crossTierEffect(target.EFF_OFFBALANCE, self:combatPhysicalpower()) else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end @@ -80,7 +80,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Your golem rushes to the target, dealing %d%% damage and knocking it back. Knockback chance will increase with talent level. - While rushing the golem becomes ethereal, passing harmlessly through creatures on the path to its target.]]):format(100 * damage) + While rushing the golem becomes ethereal, passing harmlessly through creatures on the path to its target.]]):tformat(100 * damage) end, } @@ -119,7 +119,7 @@ newTalent{ return true end, info = function(self, t) - return ([[The golem taunts targets in a radius of %d, forcing them to attack it.]]):format(self:getTalentRadius(t)) + return ([[The golem taunts targets in a radius of %d, forcing them to attack it.]]):tformat(self:getTalentRadius(t)) end, } @@ -170,7 +170,7 @@ newTalent{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, t.getPinDuration(self, t), {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the crushing!", target.name:capitalize()) + game.logSeen(target, "%s resists the crushing!", target:getName():capitalize()) end end @@ -182,7 +182,7 @@ newTalent{ return ([[Your golem rushes to the target, crushing it into the ground for %d turns and doing %d%% damage. Pinning chance will increase with talent level. While rushing the golem becomes ethereal, passing harmlessly through creatures on the path to its target.]]): - format(duration, 100 * damage) + tformat(duration, 100 * damage) end, } @@ -237,7 +237,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_DAZED, t.getDazeDuration(self, t), {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the dazing blow!", target.name:capitalize()) + game.logSeen(target, "%s resists the dazing blow!", target:getName():capitalize()) end end end) @@ -250,7 +250,7 @@ newTalent{ return ([[Your golem rushes to the target and creates a shockwave with radius 2, dazing all foes for %d turns and doing %d%% damage. Daze chance increases with talent level. While rushing the golem becomes ethereal, passing harmlessly through creatures on the path to its target.]]): - format(duration, 100 * damage) + tformat(duration, 100 * damage) end, } @@ -304,7 +304,7 @@ newTalent{ return ([[Your golem fires a beam from his eyes, doing %0.2f fire damage, %0.2f cold damage or %0.2f lightning damage. The beam will always be the maximun range it can be and will not harm friendly creatures. The damage will increase with your golem's Spellpower.]]): - format(damDesc(self, DamageType.FIRE, damage), damDesc(self, DamageType.COLD, damage), damDesc(self, DamageType.LIGHTNING, damage)) + tformat(damDesc(self, DamageType.FIRE, damage), damDesc(self, DamageType.COLD, damage), damDesc(self, DamageType.LIGHTNING, damage)) end, } @@ -338,7 +338,7 @@ newTalent{ Any damage it takes is partly reflected (%d%%) to the attacker. The golem still takes full damage. Damage returned will increase with your golem's Spellpower.]]): - format(t.getReflect(self, t)) + tformat(t.getReflect(self, t)) end, } @@ -382,7 +382,7 @@ newTalent{ local rad = self:getTalentRadius(t) local dam = t.getDamage(self, t) return ([[Your golem pulls all foes within radius %d toward itself while dealing %0.2f arcane damage.]]): - format(rad, dam) + tformat(rad, dam) end, } @@ -425,7 +425,7 @@ newTalent{ Burning is cumulative; the longer they stay within range, they higher the fire damage they take. In addition the golem gains %d%% fire resistance. Molten Skin damage will not affect friendly creatures. - The damage and resistance will increase with your Spellpower.]]):format(damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 12, 120)), 5 + self:getTalentLevel(t), 30 + self:combatTalentSpellDamage(t, 12, 60)) + The damage and resistance will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 12, 120)), 5 + self:getTalentLevel(t), 30 + self:combatTalentSpellDamage(t, 12, 60)) end, } @@ -455,7 +455,7 @@ newTalent{ info = function(self, t) local rad = self:getTalentRadius(t) return ([[The golem self-destructs, destroying itself and generating a blast of fire in a radius of %d, doing %0.2f fire damage. - This spell is only usable when the golem's master is dead.]]):format(rad, damDesc(self, DamageType.FIRE, 50 + 10 * self.level)) + This spell is only usable when the golem's master is dead.]]):tformat(rad, damDesc(self, DamageType.FIRE, 50 + 10 * self.level)) end, } @@ -473,10 +473,10 @@ newTalent{ local hardiness = t.getArmorHardiness(self, t) local armor = t.getArmor(self, t) local critreduce = t.getCriticalChanceReduction(self, t) - local dir = self:getTalentLevelRaw(t) >= 3 and "In" or "De" + local dir = self:getTalentLevelRaw(t) >= 3 and _t"Increases" or _t"Decreases" return ([[The golem automatically reconfigures heavy mail and massive armours designed for living creatures to protect its own vital areas. - %screases armour value by %d, armour hardiness by %d%%, and provides %d%% critical hit reduction when wearing heavy mail or massive armour.]]): - format(dir, armor, hardiness, critreduce) + %s armour value by %d, armour hardiness by %d%%, and provides %d%% critical hit reduction when wearing heavy mail or massive armour.]]): + tformat(dir, armor, hardiness, critreduce) end, } @@ -487,7 +487,7 @@ newTalent{ points = 5, mana = 25, cooldown = 8, - message = "@Source@ breathes poison!", + message = _t"@Source@ breathes poison!", tactical = { ATTACKAREA = { NATURE = {1, poison = 1 } }}, range = 0, radius = 5, @@ -506,6 +506,6 @@ newTalent{ end, info = function(self, t) return ([[Breathe poison on your foes, doing %d damage over a few turns. - The damage will increase with your Magic.]]):format(damDesc(self, DamageType.NATURE, self:combatTalentStatDamage(t, "mag", 30, 460))) + The damage will increase with your Magic.]]):tformat(damDesc(self, DamageType.NATURE, self:combatTalentStatDamage(t, "mag", 30, 460))) end, } diff --git a/game/modules/tome/data/talents/spells/golemancy.lua b/game/modules/tome/data/talents/spells/golemancy.lua index 01707d6c5803cf4e1ec3f45207b408db43dd6b73..431f8382b0b2a5d32c89a15439e8fc5a30234c8e 100644 --- a/game/modules/tome/data/talents/spells/golemancy.lua +++ b/game/modules/tome/data/talents/spells/golemancy.lua @@ -48,10 +48,10 @@ function makeAlchemistGolem(self) body = { INVEN = 1000, QS_MAINHAND = 1, QS_OFFHAND = 1, MAINHAND = 1, OFFHAND = 1, BODY=1, GEM={max = 2, stack_limit = 1} }, canWearObjectCustom = function(self, o) if o.type ~= "gem" then return end - if not self.summoner then return "Golem has no master" end - if not self.summoner:knowTalent(self.summoner.T_GEM_GOLEM) then return "Master must know the Gem Golem talent" end - if not o.material_level then return "impossible to use this gem" end - if o.material_level > self.summoner:getTalentLevelRaw(self.summoner.T_GEM_GOLEM) then return "Master's Gem Golem talent too low for this gem" end + if not self.summoner then return _t"Golem has no master" end + if not self.summoner:knowTalent(self.summoner.T_GEM_GOLEM) then return _t"Master must know the Gem Golem talent" end + if not o.material_level then return _t"impossible to use this gem" end + if o.material_level > self.summoner:getTalentLevelRaw(self.summoner.T_GEM_GOLEM) then return _t"Master's Gem Golem talent too low for this gem" end end, equipdoll = "alchemist_golem", is_alchemist_golem = 1, @@ -148,7 +148,7 @@ function makeAlchemistGolem(self) } if self.alchemist_golem_is_drolem then - g.name = "drolem" + g.name = _t"drolem" g.image="invis.png" g.add_mos = {{image="npc/construct_golem_drolem.png", display_h=2, display_y=-1}} g.moddable_tile = nil @@ -189,7 +189,7 @@ newTalent{ info = function(self, t) return ([[Interact with your golem to check its inventory, talents, ... Note: You can also do that while taking direct control of the golem.]]): - format() + tformat() end, } @@ -229,13 +229,13 @@ newTalent{ self.alchemy_golem = game.zone:finishEntity(game.level, "actor", makeAlchemistGolem(self)) if game.party:hasMember(self) then game.party:addMember(self.alchemy_golem, { - control="full", type="golem", title="Golem", important=true, + control="full", type="golem", title=_t"Golem", important=true, orders = {target=true, leash=true, anchor=true, talents=true, behavior=true}, }) end if not self.alchemy_golem then return end self.alchemy_golem.faction = self.faction - self.alchemy_golem.name = self.alchemy_golem.name.." (servant of "..self.name..")" + self.alchemy_golem.name = ("%s (servant of %s)"):tformat(_t(self.alchemy_golem.name),self:getName()) self.alchemy_golem.summoner = self self.alchemy_golem.summoner_gain_exp = true @@ -256,7 +256,7 @@ newTalent{ local wait = function() local co = coroutine.running() local ok = false - self:restInit(20, "refitting", "refitted", function(cnt, max) + self:restInit(20, _t"refitting", _t"refitted", function(cnt, max) if cnt > max then ok = true end coroutine.resume(co) end) @@ -337,7 +337,7 @@ newTalent{ return ([[Take care of your golem: - If it is destroyed, you will take some time to reconstruct it (this takes 15 alchemist gems and 20 turns). - If it is alive but hurt, you will be able to repair it for %d (takes 2 alchemist gems). Spellpower, alchemist gem and Golem Power talent all influence the healing done.]]): - format(heal) + tformat(heal) end, } @@ -382,7 +382,7 @@ newTalent{ local damage = td.getPercentInc(self.alchemy_golem, td) self.alchemy_golem.talents[Talents.T_WEAPON_COMBAT], self.alchemy_golem.talents[Talents.T_WEAPONS_MASTERY] = olda, oldd return ([[Improves your golem's proficiency with weapons, increasing its Accuracy by %d, Physical Power by %d and damage by %d%%.]]): - format(attack, power, 100 * damage) + tformat(attack, power, 100 * damage) end, } @@ -423,7 +423,7 @@ newTalent{ return ([[Improves your golem's armour training, damage resistance, and healing efficiency. Increases all damage resistance by %d%%; increases Armour value by %d, Armour hardiness by %d%%, reduces chance to be critically hit by %d%% when wearing heavy mail or massive plate armour, and increases healing factor by %d%%. The golem can always use any kind of armour, including massive armours.]]): - format(res, heavyarmor, hardiness, crit, t.getHealingFactor(self, t)*100) + tformat(res, heavyarmor, hardiness, crit, t.getHealingFactor(self, t)*100) end, } @@ -461,7 +461,7 @@ newTalent{ info = function(self, t) local power=t.getPower(self, t) return ([[You invoke your golem to your side, granting it a temporary melee power increase of %d for 5 turns.]]): - format(power) + tformat(power) end, } @@ -505,6 +505,6 @@ newTalent{ end, info = function(self, t) return ([[Teleport to your golem, while your golem teleports to your location. Your foes will be confused, and those that were attacking you will have a %d%% chance to target your golem instead.]]): - format(math.min(100, self:getTalentLevelRaw(t) * 15 + 25)) + tformat(math.min(100, self:getTalentLevelRaw(t) * 15 + 25)) end, } diff --git a/game/modules/tome/data/talents/spells/grave.lua b/game/modules/tome/data/talents/spells/grave.lua index beb6bef49d38790619868ebf9caafcee703cd9fe..4aa7d66ae019f00e828ce1ccb75eebfc0796b6e4 100644 --- a/game/modules/tome/data/talents/spells/grave.lua +++ b/game/modules/tome/data/talents/spells/grave.lua @@ -54,7 +54,7 @@ newTalent{ return ([[Conjures up a bolt of cold that moves toward the target and explodes into a chilly circle of death, doing %0.2f cold damage in a radius of %d. The damage will increase with your Spellpower. Additionally, when Will o' the Wisp is sustained, minions killed by this spell will spawn Wisps.]]): - format(damDesc(self, DamageType.COLD, damage), radius) + tformat(damDesc(self, DamageType.COLD, damage), radius) end, callbackOnKill = function(self, t, target, death_note) if not death_note then return end @@ -84,7 +84,8 @@ newTalent{ summon = function(self, t, dam, src, killer, grave) if not killer or not killer.faction or (self:reactionToward(killer) >= 0 and not grave) or self.dead then return end local minion = require("mod.class.NPC").new{ - name = "will o' the wisp", + name = _t"will o' the wisp", + image = "npc/undead_ghost_will_o__the_wisp.png", type = "undead", subtype = "ghost", blood_color = colors.GREY, display = "G", color=colors.WHITE, @@ -140,7 +141,7 @@ newTalent{ return ([[Surround yourself with undead energies. When one of your minions is destroyed while inside your necrotic aura, it has a %d%% chance to create a will o' the wisp. The will o' the wisp will take a random target in sight and home in on it. When it reaches the target, it will explode for %0.2f cold damage. The damage will increase with your Spellpower.]]): - format(chance, damDesc(self, DamageType.COLD, dam)) + tformat(chance, damDesc(self, DamageType.COLD, dam)) end, } @@ -195,7 +196,7 @@ newTalent{ end, createDark = function(summoner, x, y, damage, duration, creep, creepChance, initialCreep) local e = Object.new{ - name = "cold flames", + name = _t"cold flames", canAct = false, canCreep = true, x = x, y = y, @@ -332,7 +333,7 @@ newTalent{ local damage = t.getDamage(self, t) local darkCount = t.getDarkCount(self, t) return ([[Cold Flames slowly spread from %d spots in a radius of %d around the targeted location. The flames deal %0.2f cold damage, and have a chance of freezing. - Damage improves with your Spellpower.]]):format(darkCount, radius, damDesc(self, DamageType.COLD, damage)) + Damage improves with your Spellpower.]]):tformat(darkCount, radius, damDesc(self, DamageType.COLD, damage)) end, } @@ -371,6 +372,6 @@ newTalent{ local chance, val = t.getParams(self, t) return ([[Vampiric energies fill you; each time you deal damage, you have %d%% chance to heal for %d%% of the damage done. The absorption percent will increase with your Spellpower.]]): - format(chance, val) + tformat(chance, val) end, } diff --git a/game/modules/tome/data/talents/spells/ice.lua b/game/modules/tome/data/talents/spells/ice.lua index 985e224160ec76736484b5c96dcb4d3bcdaf3f8d..968c68f622c00db5f46a9d42ee9eb2a63b3d2c5f 100644 --- a/game/modules/tome/data/talents/spells/ice.lua +++ b/game/modules/tome/data/talents/spells/ice.lua @@ -69,7 +69,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Condenses ambient water on a target, freezing it for %d turns and damaging it for %0.2f. If this is used on a friendly target the cooldown is reduced by 33%%.%s - The damage will increase with your Spellpower.]]):format(t.getDuration(self, t), damDesc(self, DamageType.COLD, damage), necroEssenceDead(self, true) and "\nAffects all creatures in radius 2." or "") + The damage will increase with your Spellpower.]]):tformat(t.getDuration(self, t), damDesc(self, DamageType.COLD, damage), necroEssenceDead(self, true) and _t"\nAffects all creatures in radius 2." or "") end, } @@ -102,7 +102,7 @@ newTalent{ return ([[Blast a wave of cold all around you with a radius of %d, doing %0.2f cold damage and freezing creatures to the ground for 4 turns. Affected creatures can still act, but cannot move. For each affected creature that is also wet the cooldown of Shatter decreases by 2. - The damage will increase with your Spellpower.]]):format(radius, damDesc(self, DamageType.COLD, damage)) + The damage will increase with your Spellpower.]]):tformat(radius, damDesc(self, DamageType.COLD, damage)) end, } @@ -164,7 +164,7 @@ newTalent{ At most, it will affect %d foes. If you are yourself Frozen, it will instantly be destroyed. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.COLD, damage), targetcount) + tformat(damDesc(self, DamageType.COLD, damage), targetcount) end, } @@ -212,6 +212,6 @@ newTalent{ local pierce = t.getPierce(self, t) return ([[Surround yourself with Uttercold, increasing all your cold damage by %0.1f%% and ignoring %d%% cold resistance of your targets In addition you pierce through iceblocks easily, reducing damage absorbed from your attacks by iceblocks by %d%%.]]) - :format(damageinc, ressistpen, pierce) + :tformat(damageinc, ressistpen, pierce) end, } diff --git a/game/modules/tome/data/talents/spells/meta.lua b/game/modules/tome/data/talents/spells/meta.lua index 4553da6c995cbafd2a66a86f90c0820e2f8c5117..48c9ef6a8ae3abd0509f993e5311038e4a3a2897 100644 --- a/game/modules/tome/data/talents/spells/meta.lua +++ b/game/modules/tome/data/talents/spells/meta.lua @@ -115,7 +115,7 @@ newTalent{ At level 3, it can be targeted. ]]): -- At level 7, it takes no turn to cast. - format(count) + tformat(count) end, } @@ -144,7 +144,7 @@ newTalent{ return ([[You learn to finely craft and tune your offensive spells. You try to carve a hole in spells that affect an area to avoid damaging yourself. The chance of success is %d%%. In addition, you hone your damaging spells to spellshock their targets. Whenever you deal damage with a spell you attempt to spellshock them with %d more Spellpower than normal. Spellshocked targets suffer a temporary 20%% penalty to damage resistances.]]): - format(chance, self:combatTalentSpellDamage(t, 10, 320) / 4) + tformat(chance, self:combatTalentSpellDamage(t, 10, 320) / 4) end, } @@ -171,7 +171,7 @@ newTalent{ info = function(self, t) local cooldownred = t.getCooldownReduction(self, t) return ([[Reduces the cooldown of all spells by %d%%.]]): - format(cooldownred * 100) + tformat(cooldownred * 100) end, } @@ -220,6 +220,6 @@ newTalent{ local talentcount = t.getTalentCount(self, t) local maxlevel = t.getMaxLevel(self, t) return ([[Your mastery of arcane flows allow you to reset the cooldown of up to %d of your spells (that don't have a fixed cooldown) of tier %d or less.]]): - format(talentcount, maxlevel) + tformat(talentcount, maxlevel) end, } diff --git a/game/modules/tome/data/talents/spells/necrosis.lua b/game/modules/tome/data/talents/spells/necrosis.lua index 5e65d5e1625b1451e6d1dfc45e02a73950703e52..c1859dc8515e1dd744c58de2bfbcdd892af37407 100644 --- a/game/modules/tome/data/talents/spells/necrosis.lua +++ b/game/modules/tome/data/talents/spells/necrosis.lua @@ -33,7 +33,7 @@ newTalent{ if self.player and not self:attr("no_lichform_quest") and not self:hasQuest("lichform") and not self:attr("undead") then self:grantQuest("lichform") if not game:isCampaign("Maj'Eyal") then self:setQuestStatus("lichform", engine.Quest.DONE) end - require("engine.ui.Dialog"):simplePopup("Lichform", "You have mastered the lesser arts of overcoming death, but your true goal is before you: the true immortality of Lichform!") + require("engine.ui.Dialog"):simplePopup(_t"Lichform", _t"You have mastered the lesser arts of overcoming death, but your true goal is before you: the true immortality of Lichform!") end local ret = { @@ -47,7 +47,7 @@ newTalent{ end, info = function(self, t) return ([[The line between life and death blurs for you; you can only die when you reach -%d life.]]): - format(t.lifeBonus(self, t)) + tformat(t.lifeBonus(self, t)) end, } @@ -82,7 +82,7 @@ newTalent{ info = function(self, t) return ([[Your target's doom draws near. Its healing factor is reduced by 80%%, and will take %d%% of its remaining life (or %0.2f, whichever is lower) over 10 turns as arcane damage. The damage will increase with your Spellpower.]]): - format(t.getDamage(self, t), t.getMax(self, t)) + tformat(t.getDamage(self, t), t.getMax(self, t)) end, } @@ -153,7 +153,7 @@ newTalent{ local heal = t.getHeal(self, t) return ([[Absorb up to %d%% of the maximum life of each of your necrotic minions (even negative life, possibly destroying them). This will heal you for the greatest amount absorbed. The healing will increase with your Spellpower.]]): - format(heal) + tformat(heal) end, } @@ -163,7 +163,7 @@ newTalent{ require = { stat = { mag=function(level) return 40 + (level-1) * 2 end }, level = function(level) return 20 + (level-1) end, - special = { desc="'From Death, Life' quest completed and not already undead", fct=function(self, t) return not self:attr("undead") and (self:isQuestStatus("lichform", engine.Quest.DONE) or game.state.birth.ignore_prodigies_special_reqs) end}, + special = { desc=_t"'From Death, Life' quest completed and not already undead", fct=function(self, t) return not self:attr("undead") and (self:isQuestStatus("lichform", engine.Quest.DONE) or game.state.birth.ignore_prodigies_special_reqs) end}, }, mode = "sustained", points = 5, @@ -250,11 +250,11 @@ newTalent{ if not self.has_custom_tile then self:removeAllMOs() self:updateModdableTile() - require("engine.ui.Dialog"):yesnoLongPopup("Lichform", "#GREY#You feel your life slip away, only to be replaced by pure arcane forces! Your flesh starts to rot on your bones, and your eyes fall apart as you are reborn into a Lich!\n\n#{italic}#You may now choose to customize the appearance of your Lich, this can not be changed afterwards.", 600, function(ret) if ret then + require("engine.ui.Dialog"):yesnoLongPopup(_t"Lichform", _t"#GREY#You feel your life slip away, only to be replaced by pure arcane forces! Your flesh starts to rot on your bones, and your eyes fall apart as you are reborn into a Lich!\n\n#{italic}#You may now choose to customize the appearance of your Lich, this can not be changed afterwards.", 600, function(ret) if ret then require("mod.dialogs.Birther"):showCosmeticCustomizer(self, "Lich Cosmetic Options") - end end, "Customize Appearance", "Use Default", true) + end end, _t"Customize Appearance", _t"Use Default", true) else - require("engine.ui.Dialog"):simplePopup("Lichform", "#GREY#You feel your life slip away, only to be replaced by pure arcane forces! Your flesh starts to rot on your bones, and your eyes fall apart as you are reborn into a Lich!") + require("engine.ui.Dialog"):simplePopup(_t"Lichform", _t"#GREY#You feel your life slip away, only to be replaced by pure arcane forces! Your flesh starts to rot on your bones, and your eyes fall apart as you are reborn into a Lich!") end game.level.map:particleEmitter(self.x, self.y, 1, "demon_teleport") @@ -292,6 +292,6 @@ newTalent{ The undead cannot use this talent. While active, it will drain 4 mana per turn. Once you die and turn into a Lich you can not invest any more in this talent.]]): - format() + tformat() end, } diff --git a/game/modules/tome/data/talents/spells/necrotic-minions.lua b/game/modules/tome/data/talents/spells/necrotic-minions.lua index e7281408d67efa756e525d330bed3c7d42ef41d7..817efb5d4e3c295e42567721300655e436ebf1cd 100644 --- a/game/modules/tome/data/talents/spells/necrotic-minions.lua +++ b/game/modules/tome/data/talents/spells/necrotic-minions.lua @@ -30,31 +30,31 @@ newTalent{ die_speach = function(self, t) if rng.percent(90) then return end self:doEmote(rng.table{ - "Noooooo!", - "Save me, Master, save meeee---", - "Aaaauuuggghhh!", - "Did I do good?", - "Bwuh? Nwaaah!", - "Why, Master, whyyyyy---?", - "I thought you loved me! I thought-", - "For Master's glory!", - "Bye... bye....", - "We love you, Master!", - "EeeeeeeaaaAAAAAUUUUUGGGGGHHHHH!!!!", - "The pain, the PAAAAAIN!", - "Please, no, nooo--", - "Unlife no more for this dead matter, the time comes for my flesh to splatter.", - "You gave back life, you gave back dreams, but now I'm bursting at the seams...", - "Remember meeeee!", - "My tummy hurts...", - "Whu..?", - "Ahahahahaha!", - "Me go boom, me go BOOM!", - "Grave circumstances, Master....", - "I see the light.. I see, oh.. just a wisp....", - "Master, wait... I thought I saw a....Master? ..", - "I'm not.. so sure my spine is supposed to bend this way....", - "I told you I could Dash 100 yards and back in time! You owe me 10 gol....", + _t"Noooooo!", + _t"Save me, Master, save meeee---", + _t"Aaaauuuggghhh!", + _t"Did I do good?", + _t"Bwuh? Nwaaah!", + _t"Why, Master, whyyyyy---?", + _t"I thought you loved me! I thought-", + _t"For Master's glory!", + _t"Bye... bye....", + _t"We love you, Master!", + _t"EeeeeeeaaaAAAAAUUUUUGGGGGHHHHH!!!!", + _t"The pain, the PAAAAAIN!", + _t"Please, no, nooo--", + _t"Unlife no more for this dead matter, the time comes for my flesh to splatter.", + _t"You gave back life, you gave back dreams, but now I'm bursting at the seams...", + _t"Remember meeeee!", + _t"My tummy hurts...", + _t"Whu..?", + _t"Ahahahahaha!", + _t"Me go boom, me go BOOM!", + _t"Grave circumstances, Master....", + _t"I see the light.. I see, oh.. just a wisp....", + _t"Master, wait... I thought I saw a....Master? ..", + _t"I'm not.. so sure my spine is supposed to bend this way....", + _t"I told you I could Dash 100 yards and back in time! You owe me 10 gol....", }, 40) end, getDecay = function(self, t) return math.max(3, 10 - self:getTalentLevelRaw(self.T_AURA_MASTERY)) end, @@ -64,7 +64,7 @@ newTalent{ self:incSoul(1) if self:attr("extra_soul_chance") and rng.percent(self:attr("extra_soul_chance")) then self:incSoul(1) - game.logPlayer(self, "%s rips more animus from its victim. (+1 more soul)", self.name:capitalize()) + game.logPlayer(self, "%s rips more animus from its victim. (+1 more soul)", self:getName():capitalize()) end self.changed = true return self:getSoul() - nb @@ -96,7 +96,7 @@ newTalent{ return ([[Emits a necrotic aura, sustaining your undead minions in a radius of %d. Minions outside the radius will lose %d%% life per turn. Any creature you or your minions kill within your aura will be absorbed as a soul that can be used to raise minions. Retch from your ghouls will also heal you, even if you are not undead.]]): - format(radius, decay) + tformat(radius, decay) end, } @@ -409,7 +409,7 @@ local minions_list = { see_invisible = 5, undead = 1, name = "vampire", color=colors.SLATE, image = "npc/vampire.png", - desc=[[It is a humanoid with an aura of power. You notice a sharp set of front teeth.]], + desc=_t[[It is a humanoid with an aura of power. You notice a sharp set of front teeth.]], max_life = resolvers.rngavg(70,80), combat_armor = 9, combat_def = 6, resolvers.talents{ T_STUN={base=1, every=7, max=5}, T_BLUR_SIGHT={base=1, every=7, max=5}, T_ROTTING_DISEASE={base=1, every=7, max=5}, }, @@ -437,7 +437,7 @@ local minions_list = { undead = 1, name = "master vampire", color=colors.GREEN, image = "npc/master_vampire.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/master_vampire.png", display_h=2, display_y=-1}}}, - desc=[[It is a humanoid form dressed in robes. Power emanates from its chilling frame.]], + desc=_t[[It is a humanoid form dressed in robes. Power emanates from its chilling frame.]], max_life = resolvers.rngavg(80,90), combat_armor = 10, combat_def = 8, ai = "dumb_talented_simple", ai_state = { talent_in=1, }, @@ -463,7 +463,7 @@ local minions_list = { see_invisible = 7, undead = 1, name = "grave wight", color=colors.SLATE, image="npc/grave_wight.png", - desc=[[It is a ghostly form with eyes that haunt you.]], + desc=_t[[It is a ghostly form with eyes that haunt you.]], max_life = resolvers.rngavg(70,80), combat_armor = 9, combat_def = 6, resolvers.talents{ T_FLAMESHOCK={base=2, every=5, max=6}, T_LIGHTNING={base=2, every=5, max=6}, T_GLACIAL_VAPOUR={base=2, every=5, max=6}, @@ -491,7 +491,7 @@ local minions_list = { undead = 1, name = "barrow wight", color=colors.LIGHT_RED, image="npc/barrow_wight.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/barrow_wight.png", display_h=2, display_y=-1}}}, - desc=[[It is a ghostly nightmare of an entity.]], + desc=_t[[It is a ghostly nightmare of an entity.]], max_life = resolvers.rngavg(80,90), combat_armor = 10, combat_def = 8, resolvers.talents{ T_FLAMESHOCK={base=3, every=5, max=7}, T_LIGHTNING={base=3, every=5, max=7}, T_GLACIAL_VAPOUR={base=3, every=5, max=7}, @@ -525,7 +525,7 @@ local minions_list = { undead = 1, resolvers.sustains_at_birth(), name = "dread", color=colors.ORANGE, image="npc/dread.png", - desc = [[It is a form that screams its presence against the eye. Death incarnate, its hideous black body seems to struggle against reality as the universe itself strives to banish it.]], + desc=_t[[It is a form that screams its presence against the eye. Death incarnate, its hideous black body seems to struggle against reality as the universe itself strives to banish it.]], level_range = {1, nil}, exp_worth = 0, max_life = resolvers.rngavg(90,100), combat_armor = 0, combat_def = resolvers.mbonus(10, 50), @@ -575,7 +575,7 @@ local minions_list = { combat_spellcrit = resolvers.mbonus(5, 5), resolvers.sustains_at_birth(), name = "lich", color=colors.DARK_BLUE, - desc=[[Having thought to discover life eternal, these beings have allowed undeath to rob them of the joys of life. Now they seek to destroy it as well.]], + desc=_t[[Having thought to discover life eternal, these beings have allowed undeath to rob them of the joys of life. Now they seek to destroy it as well.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_lich_lich.png", display_h=2, display_y=-1}}}, level_range = {1, nil}, exp_worth = 0, rarity = 20, @@ -770,7 +770,7 @@ newTalent{ local c = getMinionChances(self) local chancelist = tstring({}) for i, k in ipairs(minion_order) do - if c[k] then chancelist:add(true,minions_list[k].name:capitalize(),(": %d%%"):format(c[k])) end + if c[k] then chancelist:add(true,_t(minions_list[k].name):capitalize(),(": %d%%"):tformat(c[k])) end end return chancelist:toString() end, @@ -810,11 +810,11 @@ newTalent{ info = function(self, t) local nb = t.getMax(self, t) local lev = t.getLevel(self, t) - local mm = self:knowTalent(self.T_MINION_MASTERY) and " (Minion Mastery effects included)" or "" + local mm = self:knowTalent(self.T_MINION_MASTERY) and _t" (Minion Mastery effects included)" or "" return ([[Fires powerful undead energies through your necrotic aura. For each recent death that happened inside your aura, you will raise an undead minion (up to %d minions). These minions will be raised within a cone that extends to the edge of your necrotic aura. The minions level is your level %+d. Each minion has a chance to be%s:%s]]): - format(nb, lev, mm, t.MinionChancesDesc(self, t)) + tformat(nb, lev, mm, t.MinionChancesDesc(self, t)) end, } @@ -836,7 +836,7 @@ newTalent{ info = function(self, t) return ([[Your dark power radiates further as you grow stronger. Increases the radius of your necrotic aura by %d, and reduces the decay rate of your minions outside the aura by %d%%. At level 3, necrotic minions inside your aura have a 25%% chance to refund their soul on death. If a minion turns into a will o' the wisp then the wisp will have that chance instead.]]): - format(math.floor(t.getbonusRadius(self, t)), math.min(7, self:getTalentLevelRaw(t))) + tformat(math.floor(t.getbonusRadius(self, t)), math.min(7, self:getTalentLevelRaw(t))) end, } @@ -872,7 +872,7 @@ newTalent{ info = function(self, t) return ([[A surge of power radiates to all your minions, increasing their Physical Power, Spellpower and Accuracy by %d, their Armour penetration by %d and their critical hit chance by %d for 6 turns. The effects will increase with your Spellpower.]]): - format(t.getPower(self, t), t.getAPR(self, t), t.getCrit(self, t)) + tformat(t.getPower(self, t), t.getAPR(self, t), t.getCrit(self, t)) end, } @@ -887,6 +887,6 @@ newTalent{ return ([[You share your powers with your minions, granting them %d%% of your resistances and saves. In addition all damage done by your minions to you or your other minions is reduced by %d%%. The effect will increase with your Spellpower.]]): - format(t.getPerc(self, t), self:getTalentLevelRaw(t) * 20) + tformat(t.getPerc(self, t), self:getTalentLevelRaw(t) * 20) end, } diff --git a/game/modules/tome/data/talents/spells/nightfall.lua b/game/modules/tome/data/talents/spells/nightfall.lua index 092061b52498ca68a6ed5e0ef98fe162d8d94d76..e59c7546cd632237593794e510d232c25d2c0809 100644 --- a/game/modules/tome/data/talents/spells/nightfall.lua +++ b/game/modules/tome/data/talents/spells/nightfall.lua @@ -72,7 +72,7 @@ newTalent{ At level 3, it will create a beam of shadows. At level 5, none of your Nightfall spells will hurt your minions. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.DARKNESS, damage)) + tformat(damDesc(self, DamageType.DARKNESS, damage)) end, } @@ -119,7 +119,7 @@ newTalent{ Only one bane can affect a creature. Banes last for %d turns, and also deal %0.2f darkness damage. The damage will increase with your Spellpower.]]): - format(t.getBaneDur(self,t), damDesc(self, DamageType.DARKNESS, damage)) + tformat(t.getBaneDur(self,t), damDesc(self, DamageType.DARKNESS, damage)) end, } @@ -152,7 +152,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Invoke a cone dealing %0.2f darkness damage in a radius of %d. Any creatures caught inside must make check against their Mental Save or be knocked back 4 grids away. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.DARKNESS, damage), self:getTalentRadius(t)) + tformat(damDesc(self, DamageType.DARKNESS, damage), self:getTalentRadius(t)) end, } @@ -190,6 +190,6 @@ newTalent{ Necrotic minions' damage against those creatures is increased by %d%%. The effects last for %d turns. The damage done and the minions' damage increase will increase with your Spellpower.]]): - format(damDesc(self, DamageType.DARKNESS, damage), self:getTalentRadius(t), speed, minion, dur) + tformat(damDesc(self, DamageType.DARKNESS, damage), self:getTalentRadius(t), speed, minion, dur) end, } diff --git a/game/modules/tome/data/talents/spells/phantasm.lua b/game/modules/tome/data/talents/spells/phantasm.lua index a9698d249bda38afb245226111d5bac8cf9ee0b5..f51b915ae72e2d6341bdf1c4b8f194661da6fc48 100644 --- a/game/modules/tome/data/talents/spells/phantasm.lua +++ b/game/modules/tome/data/talents/spells/phantasm.lua @@ -65,7 +65,7 @@ newTalent{ return ([[Creates a globe of pure light within a radius of %d that illuminates the area. At level 3, it also blinds all who see it (except the caster) for %d turns. At level 4, it also deals %0.2f light damage.]]): - format(radius, turn, damDesc(self, DamageType.LIGHT, dam)) + tformat(radius, turn, damDesc(self, DamageType.LIGHT, dam)) end, } @@ -95,7 +95,7 @@ newTalent{ local defence = t.getDefense(self, t) return ([[The caster's image blurs, granting a %d bonus to Defense. The bonus will increase with your Spellpower.]]): - format(defence) + tformat(defence) end, } @@ -129,7 +129,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[The caster is surrounded by a phantasmal shield granting 10%% chance to evade weapon attacks. If hit in melee, the shield will deal %d light damage to the attacker. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.LIGHT, damage)) + tformat(damDesc(self, DamageType.LIGHT, damage)) end, } @@ -178,6 +178,6 @@ newTalent{ As you become invisible, you fade out of phase with reality. All your damage is reduced by 70%%. This powerful spell constantly drains your mana (2 per turn) while active. The invisibility bonus will increase with your Spellpower.]]): - format(invisi) + tformat(invisi) end, } diff --git a/game/modules/tome/data/talents/spells/shades.lua b/game/modules/tome/data/talents/spells/shades.lua index 886971ad3db2cf07b53e854126dc9ab79c19206c..724d7aef4f0ab4572234478d17834b0d74f5f5c3 100644 --- a/game/modules/tome/data/talents/spells/shades.lua +++ b/game/modules/tome/data/talents/spells/shades.lua @@ -66,7 +66,7 @@ newTalent{ local chance = t.getChance(self, t) return ([[Surround your minions in a veil of darkness. The darkness will teleport them to you, and grant them %d%% evasion for 5 turns. The evasion chance will increase with your Spellpower.]]): - format(chance) + tformat(chance) end, } @@ -114,29 +114,29 @@ newTalent{ m.level = 1 local race = 5 -- rng.range(1, 5) if race == 1 then - m.name = "human farmer" + m.name = _t"human farmer" m.subtype = "human" m.image = "npc/humanoid_human_human_farmer.png" - m.desc = [[A weather-worn human farmer, looking at a loss as to what's going on.]] + m.desc=_t[[A weather-worn human farmer, looking at a loss as to what's going on.]] elseif race == 2 then - m.name = "halfling gardener" + m.name = _t"halfling gardener" m.subtype = "halfling" - m.desc = [[A rugged halfling gardener, looking quite confused as to what he's doing here.]] + m.desc=_t[[A rugged halfling gardener, looking quite confused as to what he's doing here.]] m.image = "npc/humanoid_halfling_halfling_gardener.png" elseif race == 3 then - m.name = "shalore scribe" + m.name = _t"shalore scribe" m.subtype = "shalore" - m.desc = [[A scrawny elven scribe, looking bewildered at his surroundings.]] + m.desc=_t[[A scrawny elven scribe, looking bewildered at his surroundings.]] m.image = "npc/humanoid_shalore_shalore_rune_master.png" elseif race == 4 then - m.name = "dwarven lumberjack" + m.name = _t"dwarven lumberjack" m.subtype = "dwarf" - m.desc = [[A brawny dwarven lumberjack, looking a bit upset at his current situation.]] + m.desc=_t[[A brawny dwarven lumberjack, looking a bit upset at his current situation.]] m.image = "npc/humanoid_dwarf_lumberjack.png" elseif race == 5 then - m.name = "cute bunny" + m.name = _t"cute bunny" m.type = "vermin" m.subtype = "rodent" - m.desc = [[It is so cute!]] + m.desc=_t[[It is so cute!]] m.image = "npc/vermin_rodent_cute_little_bunny.png" end m.faction = self.faction @@ -163,7 +163,7 @@ newTalent{ return ([[Reaches through the shadows into quieter places, summoning %d harmless creatures. Those creatures are then cursed with a Curse of Hate, making all hostile foes try to kill them. If the summoned creatures are killed by hostile foes, you have 70%% chance to gain a soul.]]): - format(math.ceil(self:getTalentLevel(t))) + tformat(math.ceil(self:getTalentLevel(t))) end, } @@ -199,8 +199,8 @@ newTalent{ ai_target = {actor=table.NIL_MERGE}, ai = "summoned", ai_real = "tactical", - name = "Forgery of Haze ("..self.name..")", - desc = ([[A dark shadowy shape whose form resembles %s.]]):format(self.name), + name = ("Forgery of Haze (%s)"):tformat(self:getName()), + desc = ([[A dark shadowy shape whose form resembles %s.]]):tformat(self:getName()), }) m:removeTimedEffectsOnClone() @@ -215,7 +215,7 @@ newTalent{ game.party:addMember(m, { control="no", type="minion", - title="Forgery of Haze", + title=_t"Forgery of Haze", orders = {target=true}, }) end @@ -226,7 +226,7 @@ newTalent{ info = function(self, t) return ([[Through the shadows, you forge a temporary copy of yourself, existing for %d turns. The copy possesses your exact talents and stats, has %d%% life and deals %d%% damage.]]): - format(t.getDuration(self, t), t.getHealth(self, t) * 100, t.getDam(self, t) * 100) + tformat(t.getDuration(self, t), t.getHealth(self, t) * 100, t.getDam(self, t) * 100) end, } @@ -273,6 +273,6 @@ newTalent{ local affinity = t.getAffinity(self, t) return ([[Surround yourself with Frostdusk, increasing all your darkness and cold damage by %0.1f%%, and ignoring %d%% of the darkness resistance of your targets. In addition, all darkness damage you take heals you for %d%% of the damage.]]) - :format(damageinc, ressistpen, affinity) + :tformat(damageinc, ressistpen, affinity) end, } diff --git a/game/modules/tome/data/talents/spells/spells.lua b/game/modules/tome/data/talents/spells/spells.lua index 1d1d678df1f669fa14303ba4fb5b21dec9fb34d3..bbec94e3702e27b65c22104e74856b41f00623ce 100644 --- a/game/modules/tome/data/talents/spells/spells.lua +++ b/game/modules/tome/data/talents/spells/spells.lua @@ -18,59 +18,59 @@ -- darkgod@te4.org -- Archmage spells -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/arcane", name = "arcane", description = "Arcane studies manipulate the raw magic energies to shape them into both offensive and defensive spells." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/aether", name = "aether", description = "Tap on the core arcane forces of the aether, unleashing devastating effects on your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/arcane", name = _t"arcane", description = _t"Arcane studies manipulate the raw magic energies to shape them into both offensive and defensive spells." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/aether", name = _t"aether", description = _t"Tap on the core arcane forces of the aether, unleashing devastating effects on your foes." } -- Elemental spells -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/fire", name = "fire", description = "Harness the power of fire to burn your foes to ashes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/wildfire", name = "wildfire", min_lev = 10, description = "Harness the power of wildfire to burn your foes to ashes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/earth", name = "earth", description = "Harness the power of the earth to protect and destroy." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/stone", name = "stone", min_lev = 10, description = "Harness the power of the stone to protect and destroy." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/water", name = "water", description = "Harness the power of water to drown your foes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/ice", name = "ice", min_lev = 10, description = "Harness the power of ice to freeze and shatter your foes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/air", name = "air", description = "Harness the power of the air to fry your foes." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/storm", name = "storm", min_lev = 10, description = "Harness the power of the storm to incinerate your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/fire", name = _t"fire", description = _t"Harness the power of fire to burn your foes to ashes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/wildfire", name = _t"wildfire", min_lev = 10, description = _t"Harness the power of wildfire to burn your foes to ashes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/earth", name = _t"earth", description = _t"Harness the power of the earth to protect and destroy." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/stone", name = _t"stone", min_lev = 10, description = _t"Harness the power of the stone to protect and destroy." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/water", name = _t"water", description = _t"Harness the power of water to drown your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/ice", name = _t"ice", min_lev = 10, description = _t"Harness the power of ice to freeze and shatter your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/air", name = _t"air", description = _t"Harness the power of the air to fry your foes." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/storm", name = _t"storm", min_lev = 10, description = _t"Harness the power of the storm to incinerate your foes." } -- Various other magic schools -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/meta", name = "meta", description = "Meta spells alter the working of magic itself." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/temporal", name = "temporal", description = "The school of time manipulation." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/phantasm", name = "phantasm", description = "Control the power of tricks and illusions." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/enhancement", name = "enhancement", description = "Magical enhancement of your body." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/conveyance", name = "conveyance", generic = true, description = "Conveyance is the school of travel. It allows you to travel faster and to track others." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/divination", name = "divination", generic = true, description = "Divination allows the caster to sense its surroundings, and find hidden things." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/aegis", name = "aegis", generic = true, description = "Command the arcane forces into healing and protection." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/meta", name = _t"meta", description = _t"Meta spells alter the working of magic itself." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/temporal", name = _t"temporal", description = _t"The school of time manipulation." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/phantasm", name = _t"phantasm", description = _t"Control the power of tricks and illusions." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/enhancement", name = _t"enhancement", description = _t"Magical enhancement of your body." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/conveyance", name = _t"conveyance", generic = true, description = _t"Conveyance is the school of travel. It allows you to travel faster and to track others." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/divination", name = _t"divination", generic = true, description = _t"Divination allows the caster to sense its surroundings, and find hidden things." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/aegis", name = _t"aegis", generic = true, description = _t"Command the arcane forces into healing and protection." } -- Alchemist spells -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/explosives", name = "explosive admixtures", description = "Manipulate gems to turn them into explosive magical bombs." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/infusion", name = "infusion", description = "Infusion your gem bombs with the powers of the elements." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/golemancy-base", name = "golemancy", hide = true, description = "Learn to craft and upgrade your golem." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/golemancy", name = "golemancy", description = "Learn to craft and upgrade your golem." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/advanced-golemancy", name = "advanced-golemancy", min_lev = 10, description = "Advanced golem operations." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/war-alchemy", name = "fire alchemy", description = "Alchemical spells designed to wage war." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/fire-alchemy", name = "fire alchemy", description = "Alchemical control over fire." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/acid-alchemy", name = "acid alchemy", description = "Alchemical control over acid." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/frost-alchemy", name = "frost alchemy", description = "Alchemical control over frost." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/energy-alchemy", name = "energy alchemy", min_lev = 10, description = "Alchemical control over lightning energies." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/stone-alchemy-base", name = "stone alchemy", hide = true, description = "Manipulate gems, and imbue their powers into other objects." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/stone-alchemy", name = "stone alchemy", generic = true, description = "Alchemical control over stone and gems." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/staff-combat", name = "staff combat", generic = true, description = "Harness the power of magical staves." } -newTalentType{ type="golem/fighting", name = "fighting", description = "Golem melee capacity." } -newTalentType{ type="golem/arcane", no_silence=true, is_spell=true, name = "arcane", description = "Golem arcane capacity." } -newTalentType{ type="golem/golem", name = "golem", description = "Golem basic capacity." } -newTalentType{ type="golem/drolem", name = "drolem", description = "Drolem basic capacity." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/explosives", name = _t"explosive admixtures", description = _t"Manipulate gems to turn them into explosive magical bombs." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/infusion", name = _t"infusion", description = _t"Infusion your gem bombs with the powers of the elements." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/golemancy-base", name = _t"golemancy", hide = true, description = _t"Learn to craft and upgrade your golem." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/golemancy", name = _t"golemancy", description = _t"Learn to craft and upgrade your golem." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/advanced-golemancy", name = _t"advanced-golemancy", min_lev = 10, description = _t"Advanced golem operations." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/war-alchemy", name = _t"fire alchemy", description = _t"Alchemical spells designed to wage war." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/fire-alchemy", name = _t"fire alchemy", description = _t"Alchemical control over fire." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/acid-alchemy", name = _t"acid alchemy", description = _t"Alchemical control over acid." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/frost-alchemy", name = _t"frost alchemy", description = _t"Alchemical control over frost." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, mana_regen=true, type="spell/energy-alchemy", name = _t"energy alchemy", min_lev = 10, description = _t"Alchemical control over lightning energies." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/stone-alchemy-base", name = _t"stone alchemy", hide = true, description = _t"Manipulate gems, and imbue their powers into other objects." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/stone-alchemy", name = _t"stone alchemy", generic = true, description = _t"Alchemical control over stone and gems." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/staff-combat", name = _t"staff combat", generic = true, description = _t"Harness the power of magical staves." } +newTalentType{ type="golem/fighting", name = _t"fighting", description = _t"Golem melee capacity." } +newTalentType{ type="golem/arcane", no_silence=true, is_spell=true, name = _t"arcane", description = _t"Golem arcane capacity." } +newTalentType{ type="golem/golem", name = _t"golem", description = _t"Golem basic capacity." } +newTalentType{ type="golem/drolem", name = _t"drolem", description = _t"Drolem basic capacity." } -- Necromancer spells -newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/necrotic-minions", name = "necrotic minions", description = "Create and empower dumb undead minions." } -newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/advanced-necrotic-minions", name = "advanced necrotic minions", min_lev = 10, description = "Create and empower powerful undead minions." } -newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/nightfall", name = "nightfall", description = "Manipulate darkness itself to slaughter your foes." } -newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/shades", name = "shades", min_lev = 10, description = "Invoke and control shades." } -newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/necrosis", name = "necrosis", description = "Gain control over death, eventually turning into a lich." } -newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/grave", name = "grave", description = "Use the rotting cold doom of the tomb to fell your foes." } -newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/animus", name = "animus", description = "Crush the souls of your foes to improve yourself." } +newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/necrotic-minions", name = _t"necrotic minions", description = _t"Create and empower dumb undead minions." } +newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/advanced-necrotic-minions", name = _t"advanced necrotic minions", min_lev = 10, description = _t"Create and empower powerful undead minions." } +newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/nightfall", name = _t"nightfall", description = _t"Manipulate darkness itself to slaughter your foes." } +newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/shades", name = _t"shades", min_lev = 10, description = _t"Invoke and control shades." } +newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/necrosis", name = _t"necrosis", description = _t"Gain control over death, eventually turning into a lich." } +newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/grave", name = _t"grave", description = _t"Use the rotting cold doom of the tomb to fell your foes." } +newTalentType{ allow_random=true, no_silence=true, is_necromancy=true, is_spell=true, mana_regen=true, type="spell/animus", name = _t"animus", description = _t"Crush the souls of your foes to improve yourself." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/eldritch-shield", name = "eldritch shield", description = "Infuse arcane forces into your shield." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/eldritch-stone", name = "eldritch stone", description = "Summon stony spikes imbued with various powers." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/deeprock", name = "deeprock", description = "Harness the power of the world to turn into a Deeprock Form." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/eldritch-shield", name = _t"eldritch shield", description = _t"Infuse arcane forces into your shield." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/eldritch-stone", name = _t"eldritch stone", description = _t"Summon stony spikes imbued with various powers." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/deeprock", name = _t"deeprock", description = _t"Harness the power of the world to turn into a Deeprock Form." } -- Generic requires for spells based on talent level spells_req1 = { @@ -188,7 +188,7 @@ function necroSetupSummon(self, m, x, y, level, no_control, no_decay) game.party:addMember(m, { control=can_control and "full" or "no", type="minion", - title="Necrotic Minion", + title=_t"Necrotic Minion", orders = {target=true}, }) end @@ -208,7 +208,7 @@ function necroSetupSummon(self, m, x, y, level, no_control, no_decay) self.life = self.life - self.max_life * (self.necrotic_aura_decaying or 10) / 100 self.changed = true if self.life <= 0 then - game.logSeen(self, "#{bold}#%s decays into a pile of ash!#{normal}#", self.name:capitalize()) + game.logSeen(self, "#{bold}#%s decays into a pile of ash!#{normal}#", self:getName():capitalize()) if src then local t = src:getTalentFromId(src.T_NECROTIC_AURA) t.die_speach(self, t) @@ -232,7 +232,7 @@ function necroSetupSummon(self, m, x, y, level, no_control, no_decay) if src:getTalentLevel(src.T_AURA_MASTERY) >= 3 and rng.percent(25) then src:incSoul(1) src.changed = true - game.logPlayer(src, "A soul returns to %s.", src.name) + game.logPlayer(src, "A soul returns to %s.", src:getName()) end end diff --git a/game/modules/tome/data/talents/spells/staff-combat.lua b/game/modules/tome/data/talents/spells/staff-combat.lua index 7ab19fb763683c631b254ad4741133169036b9fe..5f7966056f71f8fce315318649d11e36e2cd96e2 100644 --- a/game/modules/tome/data/talents/spells/staff-combat.lua +++ b/game/modules/tome/data/talents/spells/staff-combat.lua @@ -86,7 +86,7 @@ newTalent{ The bolt will only hurt hostile targets, and pass safely through friendly ones. This attack always has a 100%% chance to hit, and ignores the target's Armour. When projecting a bolt with your staff its damage modifier is increased by 20%%.]]): - format(damagemod * 100) + tformat(damagemod * 100) end, } @@ -102,7 +102,7 @@ newTalent{ local damage = t.getDamage(self, t) local inc = t.getPercentInc(self, t) return ([[Increases weapon damage by %d%% and physical power by 30 when using staves.]]): - format(100 * inc) + tformat(100 * inc) end, } @@ -134,7 +134,7 @@ newTalent{ info = function(self, t) local defense = t.getDefense(self, t) return ([[Adopt a defensive posture, increasing your Defense and Armour by %d.]]): - format(defense) + tformat(defense) end, } @@ -174,7 +174,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getDazeDuration(self, t), {apply_power=self:combatSpellpower()}) else - game.logSeen(target, "%s resists the stunning blow!", target.name:capitalize()) + game.logSeen(target, "%s resists the stunning blow!", target:getName():capitalize()) end end @@ -186,6 +186,6 @@ newTalent{ return ([[Hit a target for %d%% melee damage and stun it for %d turns. Stun chance will improve with Spellpower. At level 5, this attack cannot miss.]]): - format(100 * damage, dazedur) + tformat(100 * damage, dazedur) end, } diff --git a/game/modules/tome/data/talents/spells/stone-alchemy.lua b/game/modules/tome/data/talents/spells/stone-alchemy.lua index 75788777ffe2f504926826c00d07722f998d1f31..c3b0dea566e25cdc828e054f22f6030fb7fa9e62 100644 --- a/game/modules/tome/data/talents/spells/stone-alchemy.lua +++ b/game/modules/tome/data/talents/spells/stone-alchemy.lua @@ -40,7 +40,7 @@ newTalent{ return gem end, action = function(self, t) - local ret = self:talentDialog(self:showEquipInven("Use which gem?", function(o) return not o.unique and o.type == "gem" and not o.__tagged end, function(o, inven, item) + local ret = self:talentDialog(self:showEquipInven(_t"Use which gem?", function(o) return not o.unique and o.type == "gem" and not o.__tagged end, function(o, inven, item) if not o then return end local gem = t.make_gem(self, t, o.define_as) if not gem then return end @@ -58,7 +58,7 @@ newTalent{ end, info = function(self, t) return ([[Carve 40 to 80 alchemist gems out of a natural gemstone. - Alchemist gems are used for many other spells, and each gem type creates a different effect.]]):format() + Alchemist gems are used for many other spells, and each gem type creates a different effect.]]):tformat() end, } @@ -98,18 +98,18 @@ newTalent{ return true end, action = function(self, t) - if not self:talentDialog(self:showEquipInven("Try to extract gems from which metallic item?", function(o) return t.filterGem(self, t, o) end, function(o, inven, item) return t.extractGem(self, t, o, inven, item, d) end)) then return nil end + if not self:talentDialog(self:showEquipInven(_t"Try to extract gems from which metallic item?", function(o) return t.filterGem(self, t, o) end, function(o, inven, item) return t.extractGem(self, t, o, inven, item, d) end)) then return nil end return true end, info = function(self, t) local material = "" - if self:getTalentLevelRaw(t) >=1 then material=material.." -Iron\n" end - if self:getTalentLevelRaw(t) >=2 then material=material.." -Steel\n" end - if self:getTalentLevelRaw(t) >=3 then material=material.." -Dwarven-steel\n" end - if self:getTalentLevelRaw(t) >=4 then material=material.." -Stralite\n" end - if self:getTalentLevelRaw(t) >=5 then material=material.." -Voratun" end + if self:getTalentLevelRaw(t) >=1 then material=material.._t" -Iron\n" end + if self:getTalentLevelRaw(t) >=2 then material=material.._t" -Steel\n" end + if self:getTalentLevelRaw(t) >=3 then material=material.._t" -Dwarven-steel\n" end + if self:getTalentLevelRaw(t) >=4 then material=material.._t" -Stralite\n" end + if self:getTalentLevelRaw(t) >=5 then material=material.._t" -Voratun" end return ([[Extract magical gems from metal weapons and armours. At this skill level you can work with: - %s]]):format(material) + %s]]):tformat(material) end, } @@ -123,14 +123,14 @@ newTalent{ no_npc_use = true, no_unlearn_last = true, action = function(self, t) - local ret = self:talentDialog(self:showInventory("Use which gem?", self:getInven("INVEN"), function(gem) return gem.type == "gem" and gem.imbue_powers and gem.material_level and gem.material_level <= self:getTalentLevelRaw(t) end, function(gem, gem_item) - local nd = self:showInventory("Imbue which armour?", self:getInven("INVEN"), function(o) return o.type == "armor" and (o.slot == "BODY" or (self:knowTalent(self.T_CRAFTY_HANDS) and (o.slot == "HEAD" or o.slot == "BELT"))) and not o.been_imbued end, function(o, item) + local ret = self:talentDialog(self:showInventory(_t"Use which gem?", self:getInven("INVEN"), function(gem) return gem.type == "gem" and gem.imbue_powers and gem.material_level and gem.material_level <= self:getTalentLevelRaw(t) end, function(gem, gem_item) + local nd = self:showInventory(_t"Imbue which armour?", self:getInven("INVEN"), function(o) return o.type == "armor" and (o.slot == "BODY" or (self:knowTalent(self.T_CRAFTY_HANDS) and (o.slot == "HEAD" or o.slot == "BELT"))) and not o.been_imbued end, function(o, item) self:removeObject(self:getInven("INVEN"), gem_item) -- create an ego local Entity = require("engine.Entity") local ego = Entity.new{ - name = "imbue "..gem.name, - display_string = " <"..gem.name..">", + name = ("imbue %s"):tformat(gem:getName()), + display_string = " <"..gem:getName()..">", been_imbued = true, wielder = table.clone(gem.imbue_powers), talent_on_spell = gem.talent_on_spell, @@ -150,7 +150,7 @@ newTalent{ end, info = function(self, t) return ([[Imbue %s with a gem (up to tier %d), granting it additional powers. - You can only imbue items once, and it is permanent.]]):format(self:knowTalent(self.T_CRAFTY_HANDS) and "body armour, a belt, or a head piece" or "a body armour", self:getTalentLevelRaw(t)) + You can only imbue items once, and it is permanent.]]):tformat(self:knowTalent(self.T_CRAFTY_HANDS) and _t"body armour, a belt, or a head piece" or _t"a body armour", self:getTalentLevelRaw(t)) end, } newTalent{ @@ -191,7 +191,7 @@ newTalent{ info = function(self, t) local range = t.getRange(self, t) return ([[Crush 5 alchemist gems into dust to mark impassable terrain next to you. You immediately enter it and appear on the other side of the obstacle, up to %d grids away.]]): - format(range) + tformat(range) end, } @@ -238,6 +238,6 @@ newTalent{ Stoned creatures are highly resistant to fire and lightning, and somewhat resistant to physical attacks. At level 3 the touch will become a beam. This spell may fail against creatures resistant to being stunned, that are specifically immune to stoning, or certain bosses.]]): - format(duration) + tformat(duration) end, } diff --git a/game/modules/tome/data/talents/spells/stone.lua b/game/modules/tome/data/talents/spells/stone.lua index 57d55a30517752bd2c43fb4e2643b32db0a60a13..18be9e54e8f5779c691d6601e7052b125698b8b9 100644 --- a/game/modules/tome/data/talents/spells/stone.lua +++ b/game/modules/tome/data/talents/spells/stone.lua @@ -66,7 +66,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Conjures %d missile-shaped rocks that you target individually at any target or targets in range. Each missile deals %0.2f physical damage, and an additional %0.2f bleeding damage every turn for 5 turns. At talent level 5, you can conjure one additional missile. - The damage will increase with your Spellpower.]]):format(count,damDesc(self, DamageType.PHYSICAL, damage/2), damDesc(self, DamageType.PHYSICAL, damage/12)) + The damage will increase with your Spellpower.]]):tformat(count,damDesc(self, DamageType.PHYSICAL, damage/2), damDesc(self, DamageType.PHYSICAL, damage/12)) end, } @@ -130,7 +130,7 @@ newTalent{ * Reduces the cooldown of Earthen Missiles, Pulverizing Auger, Earthquake, and Mudslide by %d%%. * Grants %d%% Fire Resistance, %d%% Lightning Resistance, %d%% Acid Resistance, and %d%% Stun Resistance. Resistances scale with your Spellpower.]]) - :format(cooldownred, fireres, lightningres, acidres, stunres*100) + :tformat(cooldownred, fireres, lightningres, acidres, stunres*100) end, } @@ -177,7 +177,7 @@ newTalent{ local duration = t.getDuration(self, t) return ([[Causes a violent earthquake that deals %0.2f physical damage in a radius of %d each turn for %d turns, and potentially stuns any and all creatures it affects. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.PHYSICAL, damage), radius, duration) + tformat(damDesc(self, DamageType.PHYSICAL, damage), radius, duration) end, } @@ -223,6 +223,6 @@ newTalent{ local saves = t.getSaves(self, t) return ([[Concentrate on maintaining a Crystalline Focus, increasing all your physical damage by %0.1f%% and ignoring %d%% physical resistance of your targets. Also raises your physical and magical saves by %d.]]) - :format(damageinc, ressistpen, saves) + :tformat(damageinc, ressistpen, saves) end, } diff --git a/game/modules/tome/data/talents/spells/storm.lua b/game/modules/tome/data/talents/spells/storm.lua index 8b6ce50ba656d823000d223253a5d3438df8a496..b19388fbb9465fc33681763946a533c500b76c3c 100644 --- a/game/modules/tome/data/talents/spells/storm.lua +++ b/game/modules/tome/data/talents/spells/storm.lua @@ -61,7 +61,7 @@ newTalent{ local damage = t.getDamage(self, t) local radius = self:getTalentRadius(t) return ([[Lightning emanates from you in a circular wave with radius %d, doing %0.2f to %0.2f lightning damage (%0.2f average) and possibly dazing anyone affected (75%% chance). - The damage will increase with your Spellpower.]]):format(radius, + The damage will increase with your Spellpower.]]):tformat(radius, damDesc(self, DamageType.LIGHTNING, damage / 3), damDesc(self, DamageType.LIGHTNING, damage), damDesc(self, DamageType.LIGHTNING, (damage + damage / 3) / 2)) @@ -94,7 +94,7 @@ newTalent{ return ([[Conjures up a bolt of lightning, doing %0.2f to %0.2f damage (%0.2f average) and dazing the target for 3 turns. If the target resists the daze effect it is instead shocked, which halves stun/daze/pin resistance, for 5 turns. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.LIGHTNING, damage / 3), + tformat(damDesc(self, DamageType.LIGHTNING, damage / 3), damDesc(self, DamageType.LIGHTNING, damage), damDesc(self, DamageType.LIGHTNING, (damage + damage / 3) / 2)) end, @@ -138,7 +138,7 @@ newTalent{ local radius = t.getRadius(self, t) return ([[Each time one of your lightning spells dazes a target, it has a %d%% chance to creates a chain reaction that summons a mighty Hurricane that lasts for 10 turns around the target with a radius of %d. Each turn, the afflicted creature and all creatures around it will take %0.2f to %0.2f lightning damage (%0.2f average). - The damage will increase with your Spellpower.]]):format(chance, radius, + The damage will increase with your Spellpower.]]):tformat(chance, radius, damDesc(self, DamageType.LIGHTNING, damage / 3), damDesc(self, DamageType.LIGHTNING, damage), damDesc(self, DamageType.LIGHTNING, (damage + damage / 3) / 2)) @@ -185,6 +185,6 @@ newTalent{ local daze = t.getDaze(self, t) return ([[Surround yourself with a Tempest, increasing all your lightning damage by %d%% and ignoring %d%% lightning resistance of your targets. Your Lightning and Chain Lightning spells also gain a %d%% chance to daze, and your Thunderstorm spell gains a %d%% chance to daze.]]) - :format(damageinc, ressistpen, daze, daze / 2) + :tformat(damageinc, ressistpen, daze, daze / 2) end, } diff --git a/game/modules/tome/data/talents/spells/temporal.lua b/game/modules/tome/data/talents/spells/temporal.lua index ea4cc7379b4bb94d560fb5e436f69b10da53d052..4feca14a809fa6c4e31e35d1d7e3fe06fb9f8cbc 100644 --- a/game/modules/tome/data/talents/spells/temporal.lua +++ b/game/modules/tome/data/talents/spells/temporal.lua @@ -48,7 +48,7 @@ newTalent{ local slow = t.getSlow(self, t) local proj = t.getProj(self, t) return ([[Project a bolt of time distortion, decreasing the target's global speed by %d%% and all projectiles it fires by %d%% for 7 turns.]]): - format(100 * slow, proj) + tformat(100 * slow, proj) end, } @@ -80,7 +80,7 @@ newTalent{ Once either the maximum damage (%d) is absorbed, or the time runs out (%d turns), the stored damage will return as a temporal restoration field over time (5 turns). Each turn the restoration field is active, you get healed for 10%% of the absorbed damage (Aegis Shielding talent affects the percentage). The shield's max absorption will increase with your Spellpower.]]): - format(maxabsorb, duration) + tformat(maxabsorb, duration) end, } @@ -112,7 +112,7 @@ newTalent{ return ([[Removes the target from the flow of time for %d turns. In this state, the target can neither act nor be harmed. Time does not pass at all for the target, no talents will cooldown, no resources will regen, and so forth. The duration will increase with your Spellpower.]]): - format(duration) + tformat(duration) end, } @@ -141,6 +141,6 @@ newTalent{ info = function(self, t) local haste = t.getHaste(self, t) return ([[Increases the caster's global speed by %d%%.]]): - format(100 * haste) + tformat(100 * haste) end, } diff --git a/game/modules/tome/data/talents/spells/war-alchemy.lua b/game/modules/tome/data/talents/spells/war-alchemy.lua index 6a4923acade6c2e48c12c7f5e97ab7e02338d80e..32597ed0332c552cd6aa7281a5e7c4637975e109 100644 --- a/game/modules/tome/data/talents/spells/war-alchemy.lua +++ b/game/modules/tome/data/talents/spells/war-alchemy.lua @@ -43,6 +43,6 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) return ([[Turn part of your target into fire, burning the rest for %0.2f fire damage over 8 turns. - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.FIRE, damage)) + The damage will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.FIRE, damage)) end, } diff --git a/game/modules/tome/data/talents/spells/water.lua b/game/modules/tome/data/talents/spells/water.lua index c4ae5eea00b3db22f30887bb03c15ad25d484bc5..96cb506b583e2c8453980f663871cee058822dfc 100644 --- a/game/modules/tome/data/talents/spells/water.lua +++ b/game/modules/tome/data/talents/spells/water.lua @@ -63,7 +63,7 @@ newTalent{ If the target is wet the damage increases by 30%% and the ice freeze chance increases to 50%%. This spell will never hit the caster. The damage will increase with your Spellpower.]]): - format(necroEssenceDead(self, true) and "affects all foes on its path" or "travels slowly", damDesc(self, DamageType.COLD, damage)) + tformat(necroEssenceDead(self, true) and _t"affects all foes on its path" or _t"travels slowly", damDesc(self, DamageType.COLD, damage)) end, } @@ -107,7 +107,7 @@ newTalent{ return ([[Glacial fumes rise from the ground, doing %0.2f cold damage in a radius of 3 each turn for %d turns. Creatures that are wet will take 30%% more damage and have 15%% chance to get frozen. The damage will increase with your Spellpower.]]): - format(damDesc(self, DamageType.COLD, damage), duration) + tformat(damDesc(self, DamageType.COLD, damage), duration) end, } @@ -157,7 +157,7 @@ newTalent{ The tidal wave lasts for %d turns. All creatures hit gain the wet effect, which reduces their stun/freeze immunity by half and interacts with other cold spells. The damage and duration will increase with your Spellpower.]]): - format(radius, damDesc(self, DamageType.COLD, damage/2), damDesc(self, DamageType.PHYSICAL, damage/2), duration) + tformat(radius, damDesc(self, DamageType.COLD, damage/2), damDesc(self, DamageType.PHYSICAL, damage/2), duration) end, } @@ -200,7 +200,7 @@ newTalent{ #AQUAMARINE#Ice storm:#LAST# %s]]): - format(dur, self:getTalentLevelRaw(t), power * 100, power * 100 / 2, 50 + power * 100, tostring(icestorm or "")) + tformat(dur, self:getTalentLevelRaw(t), power * 100, power * 100 / 2, 50 + power * 100, tostring(icestorm or "")) end, } @@ -245,6 +245,6 @@ newTalent{ return ([[A furious ice storm rages around the caster, doing %0.2f cold damage in a radius of 3 each turn for %d turns. It has a 25%% chance to freeze damaged targets. If the target is wet the damage increases by 30%% and the freeze chance increases to 50%%. - The damage and duration will increase with your Spellpower.]]):format(damDesc(self, DamageType.COLD, damage), duration) + The damage and duration will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.COLD, damage), duration) end, } diff --git a/game/modules/tome/data/talents/spells/wildfire.lua b/game/modules/tome/data/talents/spells/wildfire.lua index 6450a41ea9925c20ff2a32a2a79b30dbef1b14cd..b91626a01843bb491b9dc347fc33d284b9be107a 100644 --- a/game/modules/tome/data/talents/spells/wildfire.lua +++ b/game/modules/tome/data/talents/spells/wildfire.lua @@ -59,7 +59,7 @@ newTalent{ local damage = t.getDamage(self, t) local radius = self:getTalentRadius(t) return ([[A wave of fire emanates from you with a radius of %d, knocking back anything caught inside and setting them ablaze, doing %0.2f fire damage over 3 turns. - The damage will increase with your Spellpower.]]):format(radius, damDesc(self, DamageType.FIRE, damage)) + The damage will increase with your Spellpower.]]):tformat(radius, damDesc(self, DamageType.FIRE, damage)) end, } @@ -91,7 +91,7 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) return ([[Your Flame, Flameshock, Fireflash and Blastwave spells leave a burning wake on the ground, burning all within for %0.2f fire damage for 4 turns. - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.FIRE, damage)) + The damage will increase with your Spellpower.]]):tformat(damDesc(self, DamageType.FIRE, damage)) end, } @@ -105,7 +105,7 @@ newTalent{ info = function(self, t) return ([[When your Burning Wake talent is active, your Inferno and Burning Wake effects have a %d%% chance, each turn, to remove a status effect (physical or magical) from the targets. If the target is hostile, it will remove a beneficial effect. - If the target is friendly, it will remove a detrimental effect (but still burn).]]):format(t.getChance(self, t)) + If the target is friendly, it will remove a detrimental effect (but still burn).]]):tformat(t.getChance(self, t)) end, } @@ -150,6 +150,6 @@ newTalent{ local ressistpen = t.getResistPenalty(self, t) local selfres = t.getResistSelf(self, t) return ([[Surround yourself with Wildfire, increasing all your fire damage by %0.1f%%, ignoring %d%% fire resistance of your targets and reducing self-inflicted fire damage by %d%%.]]) - :format(damageinc, ressistpen, selfres) + :tformat(damageinc, ressistpen, selfres) end, } diff --git a/game/modules/tome/data/talents/techniques/2h-assault.lua b/game/modules/tome/data/talents/techniques/2h-assault.lua index 30c18c42c6abf2fd4523c4eda07702aef7e54668..a58ebb05a078ffbfefbeb686257e3a44f3fab23e 100644 --- a/game/modules/tome/data/talents/techniques/2h-assault.lua +++ b/game/modules/tome/data/talents/techniques/2h-assault.lua @@ -47,7 +47,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the stunning blow!", target.name:capitalize()) + game.logSeen(target, "%s resists the stunning blow!", target:getName():capitalize()) end end end @@ -57,7 +57,7 @@ newTalent{ info = function(self, t) return ([[Hit the target twice with your two-handed weapon, doing %d%% damage. Each hit will try to stun the target for %d turns. The stun chance increases with your Physical Power.]]) - :format(100 * self:combatTalentWeaponDamage(t, 0.5, 0.7), t.getDuration(self, t)) + :tformat(100 * self:combatTalentWeaponDamage(t, 0.5, 0.7), t.getDuration(self, t)) end, } @@ -106,7 +106,7 @@ newTalent{ info = function(self, t) local damage = t.getDamage(self, t) * 100 return ([[Take a step toward your foes then use the momentum to cleave all creatures adjacent to you for %d%% weapon damage.]]) - :format(damage) + :tformat(damage) end, } @@ -157,7 +157,7 @@ newTalent{ end, info = function(self, t) return ([[Spin around, extending your weapon in radius %d and damaging all targets around you for %d%% weapon damage. - At level 3 all damage done will also make the targets bleed for an additional %d%% damage over 5 turns]]):format(self:getTalentRadius(t), 100 * self:combatTalentWeaponDamage(t, 1.4, 2.1), t.getBleed(self, t) * 100) + At level 3 all damage done will also make the targets bleed for an additional %d%% damage over 5 turns]]):tformat(self:getTalentRadius(t), 100 * self:combatTalentWeaponDamage(t, 1.4, 2.1), t.getBleed(self, t) * 100) end, } @@ -199,6 +199,6 @@ newTalent{ return ([[Takes advantage of a wounded foe to perform a killing strike. This attack is an automatic critical hit that does %0.1f%% extra weapon damage for each %% of life the target is below maximum. (A victim with 30%% remaining life (70%% damaged) would take %0.1f%% weapon damage.) If an enemy dies from this attack then two of your talent cooldowns are reduced by 2 turns and Execution's cooldown is reset.]]): - format(t.getPower(self, t), 100 + t.getPower(self, t) * 70) + tformat(t.getPower(self, t), 100 + t.getPower(self, t) * 70) end, } diff --git a/game/modules/tome/data/talents/techniques/2hweapon.lua b/game/modules/tome/data/talents/techniques/2hweapon.lua index f056f7890359acf74511493041e43b59baad5ce5..f7aaaaf0cd3f28519e59ad69b9367b229ed81f08 100644 --- a/game/modules/tome/data/talents/techniques/2hweapon.lua +++ b/game/modules/tome/data/talents/techniques/2hweapon.lua @@ -55,7 +55,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Spin around, extending your weapon and damaging all targets around you for %d%% weapon damage.]]):format(100 * self:combatTalentWeaponDamage(t, 1.4, 2.1)) + return ([[Spin around, extending your weapon and damaging all targets around you for %d%% weapon damage.]]):tformat(100 * self:combatTalentWeaponDamage(t, 1.4, 2.1)) end, } @@ -102,7 +102,7 @@ newTalent{ return ([[You enter an aggressive battle stance, increasing Accuracy by %d and Physical Power by %d, at the cost of -10 Defense and -10 Armour. While berserking, you are nearly unstoppable, granting you %d%% stun and pinning resistance. The Accuracy bonus increases with your Dexterity, and the Physical Power bonus with your Strength.]]): - format( t.getAtk(self, t), t.getDam(self, t), t.getImmune(self, t)*100) + tformat( t.getAtk(self, t), t.getDam(self, t), t.getImmune(self, t)*100) end, } @@ -112,7 +112,7 @@ newTalent{ require = techs_req3, points = 5, random_ego = "attack", - message = function(self) if self.subtype == "rodent" then return "@Source@ uses Warsqueak." else return "@Source@ uses Warshout." end end , + message = function(self) if self.subtype == "rodent" then return _t"@Source@ uses Warsqueak." else return _t"@Source@ uses Warshout." end end , stamina = 30, cooldown = 18, tactical = { ATTACKAREA = { confusion = 1 }, DISABLE = { confusion = 3 } }, @@ -146,7 +146,7 @@ newTalent{ end, info = function(self, t) return ([[Shout your warcry in a frontal cone of radius %d. Any targets caught inside will be confused (power %d%%) for %d turns.]]): - format(self:getTalentRadius(t),t.getConfusion(self, t), t.getDuration(self, t)) + tformat(self:getTalentRadius(t),t.getConfusion(self, t), t.getDuration(self, t)) end, } @@ -192,10 +192,10 @@ newTalent{ if hit then if target:checkHit(self:combatPhysicalpower(), target:combatPhysicalResist(), 0, 95, 5 - self:getTalentLevel(t) / 2) and target:canBe("instakill") and target.life > 0 and target.life < target.max_life * 0.2 then -- KILL IT ! - game.logSeen(target, "%s feels the pain of the death blow!", target.name:capitalize()) + game.logSeen(target, "%s feels the pain of the death blow!", target:getName():capitalize()) target:die(self) elseif target.life > 0 and target.life < target.max_life * 0.2 then - game.logSeen(target, "%s resists the death blow!", target.name:capitalize()) + game.logSeen(target, "%s resists the death blow!", target:getName():capitalize()) end end return true @@ -203,7 +203,7 @@ newTalent{ info = function(self, t) return ([[Tries to perform a killing blow, doing %d%% weapon damage and dealing an automatic critical hit. If the target ends up with low enough life (<20%%), it might be instantly killed. At level 4, it drains half your remaining stamina, and uses it to increase the blow damage by 100%% of it. - The chance to instantly kill will increase with your Physical Power.]]):format(100 * self:combatTalentWeaponDamage(t, 0.8, 1.3)) + The chance to instantly kill will increase with your Physical Power.]]):tformat(100 * self:combatTalentWeaponDamage(t, 0.8, 1.3)) end, } @@ -242,7 +242,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the stunning blow!", target.name:capitalize()) + game.logSeen(target, "%s resists the stunning blow!", target:getName():capitalize()) end end @@ -251,7 +251,7 @@ newTalent{ info = function(self, t) return ([[Hits the target with your weapon, doing %d%% damage. If the attack hits, the target is stunned for %d turns. The stun chance increases with your Physical Power.]]) - :format(100 * self:combatTalentWeaponDamage(t, 1, 1.5), t.getDuration(self, t)) + :tformat(100 * self:combatTalentWeaponDamage(t, 1, 1.5), t.getDuration(self, t)) end, } @@ -304,7 +304,7 @@ newTalent{ local eff = rng.tableRemove(effs) if eff[1] == "effect" then - game.logSeen(self, "#CRIMSON#%s shatters %s shield!", self.name:capitalize(), target.name) + game.logSeen(self, "#CRIMSON#%s shatters %s shield!", self:getName():capitalize(), target:getName()) target:removeEffect(eff[2]) end end @@ -317,7 +317,7 @@ newTalent{ return ([[Hits the target with your weapon, doing %d%% damage. If the attack hits, the target's armour and saves are reduced by %d for %d turns. Also if the target is protected by a temporary damage shield there is %d%% chance to shatter it. Armor reduction chance increases with your Physical Power.]]) - :format(100 * self:combatTalentWeaponDamage(t, 1, 1.5),t.getArmorReduc(self, t), t.getDuration(self, t), t.getShatter(self, t)) + :tformat(100 * self:combatTalentWeaponDamage(t, 1, 1.5),t.getArmorReduc(self, t), t.getDuration(self, t), t.getShatter(self, t)) end, } @@ -358,7 +358,7 @@ newTalent{ info = function(self, t) return ([[Hits the target with your weapon, doing %d%% damage. If the attack hits, the target's Accuracy is reduced by %d for %d turns. Accuracy reduction chance increases with your Physical Power.]]) - :format( + :tformat( 100 * self:combatTalentWeaponDamage(t, 1, 1.5), 3 * self:getTalentLevel(t), t.getDuration(self, t)) end, } @@ -399,6 +399,6 @@ newTalent{ info = function(self, t) return ([[Enter a blood frenzy, draining stamina quickly (-2 stamina/turn). Each time you kill a foe while in the blood frenzy, you gain a cumulative bonus to Physical Power of %d. Each turn, this bonus decreases by 2.]]): - format(t.bonuspower(self,t)) + tformat(t.bonuspower(self,t)) end, } diff --git a/game/modules/tome/data/talents/techniques/acrobatics.lua b/game/modules/tome/data/talents/techniques/acrobatics.lua index c4b85f48d3ee2ba38ab824bdfe97aa1db93e100c..00c50a1b65da6d66b0417c4887c4d7a52708a7b4 100644 --- a/game/modules/tome/data/talents/techniques/acrobatics.lua +++ b/game/modules/tome/data/talents/techniques/acrobatics.lua @@ -120,7 +120,7 @@ newTalent { return ([[Use an adjacent friend or foe as a springboard, vaulting over them to another tile within range. This maneuver grants you a burst of speed from your momentum, allowing you run %d%% faster (movement speed bonus) in the same direction you vaulted for 3 turns. The increased speed ends if you change directions or stop moving. - ]]):format(t.speed_bonus(self, t) * 100) + ]]):tformat(t.speed_bonus(self, t) * 100) end, } @@ -133,7 +133,7 @@ newTalent { random_ego = "attack", cooldown = function(self, t) return 20 - cooldown_bonus(self) end, no_energy = true, - message = function(self, t) return "@Source@ tumbles to a better position!" end, + message = function(self, t) return _t"@Source@ tumbles to a better position!" end, stamina = function(self, t) return math.max(0, 20 - stamina_bonus(self)) end, @@ -183,7 +183,7 @@ newTalent { end, info = function(self, t) return ([[Move to a spot within range, bounding around, over, or through any enemies in the way. - This maneuver can surprise your foes and improves your tactical position, improving your physical critical chance by %d%% for 1 turn.]]):format(t.combat_physcrit(self, t)) + This maneuver can surprise your foes and improves your tactical position, improving your physical critical chance by %d%% for 1 turn.]]):tformat(t.combat_physcrit(self, t)) end } @@ -248,7 +248,7 @@ newTalent { Any time you would lose more than %d%% of your maximum life in a single hit, you instead duck out of the way and assume a defensive posture. This reduces the triggering damage and all further damage in the same turn by %d%%. You need %0.1f Stamina and an adjacent open tile to perform this feat (though it does not cause you to move).]]) - :format(trigger, reduce, cost) + :tformat(trigger, reduce, cost) end, } @@ -269,6 +269,6 @@ newTalent { info = function(self, t) return ([[You gain greater facility with your acrobatic moves, lowering the cooldowns of Vault, Tumble, and Trained Reactions by %d, and their stamina costs by %0.1f. At Rank 3 you also gain 10%% global speed for 1 turn after Trained Reactions activates. At rank 5 this speed bonus improves to 20%% and lasts for 2 turns.]]) - :format(t.cooldown_bonus(self, t), t.stamina_bonus(self, t)) + :tformat(t.cooldown_bonus(self, t), t.stamina_bonus(self, t)) end, } diff --git a/game/modules/tome/data/talents/techniques/agility.lua b/game/modules/tome/data/talents/techniques/agility.lua index 38f25b692fcaeeb1b9395ca2351a6f157bc9a47c..109ea2345a766b9343910ee12ea1858e2ef373b8 100644 --- a/game/modules/tome/data/talents/techniques/agility.lua +++ b/game/modules/tome/data/talents/techniques/agility.lua @@ -68,14 +68,14 @@ newTalent{ dam = math.max(dam - reduce, 0) print("[PROJECTOR] after static reduction dam", dam) - game:delayedLogDamage(src or self, self, 0, ("%s(%d deflected)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam - dam), false) + game:delayedLogDamage(src or self, self, 0, ("%s(%d deflected)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", lastdam - dam), false) return {dam=dam} end, info = function(self, t) local chance = t.getChance(self, t) return ([[You are trained in an agile, mobile fighting technique combining sling and shield. This allows shields to be equipped, using Dexterity instead of Strength as a requirement. While you have a shield equip and your Block talent is not on cooldown, you have a %d%% chance to deflect any incoming damage, reducing it by 50%% of your shield’s block value.]]) - :format(chance) + :tformat(chance) end, } @@ -136,7 +136,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_DAZED, 2, {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the daze!", target.name:capitalize()) + game.logSeen(target, "%s resists the daze!", target:getName():capitalize()) end end @@ -160,7 +160,7 @@ newTalent{ return ([[Leap onto an adjacent target with your shield, striking them for %d%% damage and dazing them for 2 turns, then using them as a springboard to leap to a tile within range %d. The shield bash will use Dexterity instead of Strength for the shield's bonus damage. At talent level 5, you will immediately enter a blocking stance on landing.]]) - :format(dam, range) + :tformat(dam, range) end, } @@ -235,7 +235,7 @@ newTalent{ The shot does %d%% weapon damage and knocks back your target by %d. The cooldown of this talent is reduced by 1 each time you move. This requires a sling to use.]]): - format(t.getDamage(self,t)*100, t.getDist(self, t)) + tformat(t.getDamage(self,t)*100, t.getDist(self, t)) end, } @@ -297,6 +297,6 @@ newTalent{ return ([[Enter a fluid, mobile shooting stance that excels at close combat. Your ranged attack speed is increased by %d%% and each time you shoot you gain %d%% increased movement speed for 2 turns. Ranged attacks against targets will also grant you up to %d%% of a turn. This is 100%% effective against targets within 3 tiles, and decreases by 20%% for each tile beyond that (to 0%% at 8 tiles). This cannot occur more than once per turn. Requires a sling to use.]]): - format(atk, move, turn) + tformat(atk, move, turn) end, } diff --git a/game/modules/tome/data/talents/techniques/archery.lua b/game/modules/tome/data/talents/techniques/archery.lua index cec234fe91feaf44796bc8ba143129f2e6387901..7a965659a4ccb2d2095d8ca236826b95a69d1ca0 100644 --- a/game/modules/tome/data/talents/techniques/archery.lua +++ b/game/modules/tome/data/talents/techniques/archery.lua @@ -41,7 +41,7 @@ newTalent{ return b.shot_stamina(self, b) end, range = archery_range, - message = "@Source@ shoots!", + message = _t"@Source@ shoots!", requires_target = true, tactical = { ATTACK = { weapon = 1 } }, on_pre_use = function(self, t, silent) return wardenPreUse(self, t, silent) end, @@ -133,7 +133,7 @@ newTalent{ return count > 0 end, info = function(self, t) - return ([[Shoot your bow, sling or other missile launcher!]]) + return ([[Shoot your bow, sling or other missile launcher!]]):tformat() end, } @@ -213,7 +213,7 @@ newTalent{ local chance = t.getChance(self,t) return ([[Fire a steady shot, doing %d%% damage with a %d%% chance to mark the target. If Steady Shot is not on cooldown, this talent will automatically replace your normal attacks (and trigger the cooldown).]]): - format(dam, chance) + tformat(dam, chance) end, } @@ -266,7 +266,7 @@ newTalent{ return ([[You fire a shot for %d%% damage that attempts to pin your target to the ground for %d turns, as well as giving your next Steady Shot or Shoot 100%% increased chance to critically hit and mark (regardless of whether the pin succeeds). This shot has a 20%% chance to mark the target. The chance to pin increases with your Accuracy.]]): - format(dam, dur, mark, chance) + tformat(dam, dur, mark, chance) end, } @@ -321,7 +321,7 @@ newTalent{ return ([[Fires a shot that explodes into a radius %d ball of razor sharp fragments on impact, dealing %d%% weapon damage and leaving targets crippled for %d turns, reducing their attack, spell and mind speed by %d%%. Each target struck has a %d%% chance to be marked. The status chance increases with your Accuracy.]]) - :format(rad, dam, dur, speed, chance) + :tformat(rad, dam, dur, speed, chance) end, } @@ -359,7 +359,7 @@ newTalent{ if target:canBe("knockback") and dist > 0 then target:knockback(self.x, self.y, dist) end if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getDuration(self, t), {}) end else - game.logSeen(target, "%s resists the scattershot!", target.name:capitalize()) + game.logSeen(target, "%s resists the scattershot!", target:getName():capitalize()) end local chance = t.getChance(self,t) if rng.percent(chance) then target:setEffect(target.EFF_MARKED, 5, {src=self}) end @@ -409,7 +409,7 @@ newTalent{ return ([[Fires a wave of projectiles in a radius %d cone, dealing %d%% weapon damage. All targets struck by this will be knocked back to the maximum range of the cone and stunned for %d turns. Each target struck has a %d%% chance to be marked. The chance to knockback and stun increases with your Accuracy.]]) - :format(rad, dam, dur, chance) + :tformat(rad, dam, dur, chance) end, } @@ -484,7 +484,7 @@ newTalent{ local dam = t.getDamage(self,t)*100 return ([[Fire a precise shot dealing %d%% weapon damage, with 100 increased accuracy. This shot will bypass other enemies between you and your target. Only usable against marked targets, and consumes the mark on hit.]]): - format(dam) + tformat(dam) end, } @@ -574,7 +574,7 @@ newTalent{ local dam = t.getDamage(self,t)*100 return ([[You fire countless shots into the sky to rain down around your target, inflicting %d%% weapon damage to all within radius %d. If the primary target is marked, you consume the mark to fire a second volley of arrows for %d%% damage at no ammo cost.]]) - :format(dam, rad, dam*0.75) + :tformat(dam, rad, dam*0.75) end, } @@ -609,21 +609,21 @@ newTalent{ if target:canBe("silence") then target:setEffect(target.EFF_SILENCED, t.getDuration(self, t), {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists the silence!", target.name:capitalize()) + game.logSeen(target, "%s resists the silence!", target:getName():capitalize()) end elseif not target.turn_procs.called_shot_disarm then target.turn_procs.called_shot_disarm = true if target:canBe("disarm") then target:setEffect(target.EFF_DISARMED, t.getDuration(self, t), {apply_power=self:combatAttack(), no_ct_effect=true}) else - game.logSeen(target, "%s resists the disarm!", target.name:capitalize()) + game.logSeen(target, "%s resists the disarm!", target:getName():capitalize()) end elseif not target.turn_procs.called_shot_slow then target.turn_procs.called_shot_slow = true if target:canBe("slow") then target:setEffect(target.EFF_SLOW_MOVE, t.getDuration(self, t), {power=0.5, apply_power=self:combatAttack(), no_ct_effect=true}) else - game.logSeen(target, "%s resists the slow!", target.name:capitalize()) + game.logSeen(target, "%s resists the slow!", target:getName():capitalize()) end end end, @@ -657,7 +657,7 @@ newTalent{ return ([[You fire a disabling shot at a target's throat (or equivalent), dealing %d%% weapon damage and silencing them for %d turns. If the target is marked, you consume the mark to fire two secondary shots at their arms and legs (or other appendages) dealing %d%% damage, reducing their movement speed by 50%% and disarming them for the duration. The status chance increases with your Accuracy.]]): - format(dam, dur, dam*0.25) + tformat(dam, dur, dam*0.25) end, } @@ -703,7 +703,7 @@ newTalent{ local nb = t.getTalentCount(self,t) local cd = t.getCooldown(self,t) return ([[Each time you consume a mark, you gain %d%% increased attack speed for 2 turns and the cooldown of %d random techniques are reduced by %d turns.]]): - format(speed, nb, cd) + tformat(speed, nb, cd) end, } @@ -732,7 +732,7 @@ newTalent{ end, info = function(self, t) return ([[You fire a shot without putting much strength into it, doing %d%% damage. - That brief moment of relief allows you to regain %d stamina.]]):format(self:combatTalentWeaponDamage(t, 0.5, 1.1) * 100, 12 + self:getTalentLevel(t) * 8) + That brief moment of relief allows you to regain %d stamina.]]):tformat(self:combatTalentWeaponDamage(t, 0.5, 1.1) * 100, 12 + self:getTalentLevel(t) * 8) end, } @@ -761,7 +761,7 @@ newTalent{ end, info = function(self, t) return ([[You fire a crippling shot, doing %d%% damage and reducing your target's speed by %d%% for 7 turns. - The status power and status hit chance improve with your Accuracy.]]):format(self:combatTalentWeaponDamage(t, 1, 1.5) * 100, util.bound((self:combatAttack() * 0.15 * self:getTalentLevel(t)) / 100, 0.1, 0.4) * 100) + The status power and status hit chance improve with your Accuracy.]]):tformat(self:combatTalentWeaponDamage(t, 1, 1.5) * 100, util.bound((self:combatAttack() * 0.15 * self:getTalentLevel(t)) / 100, 0.1, 0.4) * 100) end, } @@ -784,7 +784,7 @@ newTalent{ if target:canBe("pin") then target:setEffect(target.EFF_PINNED, t.getDur(self, t), {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end, action = function(self, t) @@ -796,7 +796,7 @@ newTalent{ info = function(self, t) return ([[You fire a pinning shot, doing %d%% damage and pinning your target to the ground for %d turns. The pinning chance increases with your Dexterity.]]) - :format(self:combatTalentWeaponDamage(t, 1, 1.4) * 100, + :tformat(self:combatTalentWeaponDamage(t, 1, 1.4) * 100, t.getDur(self, t)) end, } diff --git a/game/modules/tome/data/talents/techniques/assassination.lua b/game/modules/tome/data/talents/techniques/assassination.lua index f3bf0f50ee42b9bc655659089af215ef5b3544c2..8c263b752fce21901cc86e98726cae98db0e5fa6 100644 --- a/game/modules/tome/data/talents/techniques/assassination.lua +++ b/game/modules/tome/data/talents/techniques/assassination.lua @@ -60,7 +60,7 @@ newTalent{ self:logCombat(target, "#Source# delivers a Coup de Grace against #Target#!") target:die(self) elseif target.life > 0 and target.life < target.max_life * 0.2 then - game.logSeen(target, "%s resists the Coup de Grace!", target.name:capitalize()) + game.logSeen(target, "%s resists the Coup de Grace!", target:getName():capitalize()) end end @@ -69,7 +69,7 @@ newTalent{ if not self:isTalentActive(self.T_STEALTH) then self.hide_chance = 1000 self.talents_cd["T_STEALTH"] = 0 - game.logSeen(self, "#GREY#%s slips into shadow.", self.name:capitalize()) + game.logSeen(self, "#GREY#%s slips into shadow.", self:getName():capitalize()) self:forceUseTalent(self.T_STEALTH, {ignore_energy=true, silent = true}) self.hide_chance = nil end @@ -82,7 +82,7 @@ newTalent{ perc = t.getPercent(self,t)*100 return ([[Attempt to finish off a wounded enemy, striking them with both weapons for %d%% increased by 50%% if their life is below 30%%. A target brought below 20%% of its maximum life must make a physical save against your Accuracy or be instantly slain. You may take advantage of finishing your foe this way to activate stealth (if known).]]): - format(dam, perc) + tformat(dam, perc) end, } @@ -108,7 +108,7 @@ newTalent{ return ([[When you exit stealth, you reveal yourself dramatically, intimidating foes around you. All foes within radius %d that witness you leaving stealth will be stricken with terror, which randomly inflicts stun, slow (40%% power), or confusion (50%% power) for %d turns. The chance to terrorize improves with your combat accuracy.]]) - :format(radius, duration) + :tformat(radius, duration) end, } @@ -148,7 +148,7 @@ newTalent{ return ([[When attacking from stealth, you slip a garrote over the target’s neck (or other vulnerable part). This strangles for %d turns and silences for %d turns. Strangled targets are pinned and suffer an automatic unarmed attack for %d%% damage each turn. Your chance to apply the garrote increases with your Accuracy and you must stay adjacent to your target to maintain it. This talent has a cooldown.]]) - :format(dur, sdur, damage) + :tformat(dur, sdur, damage) end, } @@ -190,6 +190,6 @@ newTalent{ If a target dies while marked, the cooldown of this ability is reset and the cost refunded. This ability can be used without breaking stealth. The base damage dealt will increase with your Dexterity.]]): - format(power, damDesc(self, DamageType.PHYSICAL, dam), perc) + tformat(power, damDesc(self, DamageType.PHYSICAL, dam), perc) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/techniques/battle-tactics.lua b/game/modules/tome/data/talents/techniques/battle-tactics.lua index 065b06f2ae184d07b80a42a82763e901114cddeb..f31e8e925d9390bf0450f549a9e96b4a873146fb 100644 --- a/game/modules/tome/data/talents/techniques/battle-tactics.lua +++ b/game/modules/tome/data/talents/techniques/battle-tactics.lua @@ -36,7 +36,7 @@ newTalent{ info = function(self, t) return ([[Concentrate on your blows; for %d turns, each strike you land on your target in melee range has a %d%% chance to trigger another, similar strike. This works for all blows, even those from other talents and from shield bashes, but you can gain no more than one extra blow with each weapon during a turn. - The chance increases with your Dexterity.]]):format(t.getdur(self, t), t.getchance(self, t)) + The chance increases with your Dexterity.]]):tformat(t.getdur(self, t), t.getchance(self, t)) end, } @@ -49,7 +49,7 @@ newTalent{ -- Doesn't scale past level 5, could use some bonus for higher talent info = function(self, t) return ([[After killing a foe, you have a %d%% chance to gain a 1000%% movement speed bonus for 1 game turn. The bonus disappears as soon as any action other than moving is done. - Note: since you will be moving very fast, game turns will pass very slowly.]]):format(math.min(100, self:getTalentLevelRaw(t) * 20)) + Note: since you will be moving very fast, game turns will pass very slowly.]]):tformat(math.min(100, self:getTalentLevelRaw(t) * 20)) end, } @@ -93,7 +93,7 @@ newTalent{ local heal = t.healloss(self,t) return ([[Lashes at the target, doing %d%% weapon damage. If the attack hits, the target will bleed for %d%% weapon damage over 7 turns, and all healing will be reduced by %d%%.]]): - format(100 * self:combatTalentWeaponDamage(t, 1, 1.7), 100 * self:combatTalentWeaponDamage(t, 2, 3.2), heal) + tformat(100 * self:combatTalentWeaponDamage(t, 1, 1.7), 100 * self:combatTalentWeaponDamage(t, 2, 3.2), heal) end, } @@ -171,6 +171,6 @@ newTalent{ In addition, your all damage resistance cap increases %0.1f%% closer to 100%%. This consumes stamina rapidly the longer it is sustained (%0.1f stamina/turn, increasing by 0.3/turn). The resist is recalculated each time you take damage.]]): - format(resistC, resistC*0.7, t.getCapApproach(self, t)*100, drain) + tformat(resistC, resistC*0.7, t.getCapApproach(self, t)*100, drain) end, } diff --git a/game/modules/tome/data/talents/techniques/bloodthirst.lua b/game/modules/tome/data/talents/techniques/bloodthirst.lua index f731bd8d5c154a74fc4a9c97f87fce474aa5d4d3..e744cd97ef3a6f83df41dd3ce8468df12122413c 100644 --- a/game/modules/tome/data/talents/techniques/bloodthirst.lua +++ b/game/modules/tome/data/talents/techniques/bloodthirst.lua @@ -37,7 +37,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_DAZED, 5, {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the terror!", target.name:capitalize()) + game.logSeen(target, "%s resists the terror!", target:getName():capitalize()) end end, passives = function(self, t, p) @@ -47,7 +47,7 @@ newTalent{ return ([[Your mighty blows inspire utter terror on your foes. Any melee strike you do that deals more than %d%% of the target's total life puts them in a mortal terror, dazing them for 5 turns. Your critical strike chance also increase by %d%%. The daze chance increase with your Physical Power.]]): - format(t.threshold(self, t), self:getTalentLevelRaw(t) * 2.8) + tformat(t.threshold(self, t), self:getTalentLevelRaw(t) * 2.8) end, } @@ -71,7 +71,7 @@ newTalent{ local max_health = t.getHealth(self,t) return ([[Delight in spilling the blood of your foes. After scoring a critical hit, your maximum hit points will be increased by %d%%, your life regeneration by %0.2f per turn, and your stamina regeneration by %0.2f per turn for %d turns. The life and stamina regeneration will stack up to five times, for a maximum of %0.2f and %0.2f each turn, respectively.]]): - format(t.getHealth(self, t), regen, regen/5, t.getDuration(self, t),max_regen, max_regen/5) + tformat(t.getHealth(self, t), regen, regen/5, t.getDuration(self, t),max_regen, max_regen/5) end, } @@ -87,7 +87,7 @@ newTalent{ return ([[You delight in the inflicting of wounds, providing %d physical power. In addition when you make a creature bleed its physical damage resistance is reduced by %d%% (but never below 0%%). Physical power depends on your Strength stat.]]): - format(t.getDam(self, t), t.getResist(self, t)) + tformat(t.getDam(self, t), t.getResist(self, t)) end, } @@ -121,6 +121,6 @@ newTalent{ return ([[You enter a battle frenzy for %d turns. During that time, you can not use items, healing has no effect, and your health cannot drop below 1. At the end of the frenzy, you regain %d%% of your health per foe slain during the frenzy. While Unstoppable is active, Berserker Rage critical bonus is disabled as you lose the thrill of the risk of death.]]): - format(t.getDuration(self, t), t.getHealPercent(self,t)) + tformat(t.getDuration(self, t), t.getHealPercent(self,t)) end, } diff --git a/game/modules/tome/data/talents/techniques/bow.lua b/game/modules/tome/data/talents/techniques/bow.lua index 627d73a25e64211dfecdb23ed6cbf2ed6ad58fdd..ae02b4110efa5e19c02fee49750bc72a25ed7870 100644 --- a/game/modules/tome/data/talents/techniques/bow.lua +++ b/game/modules/tome/data/talents/techniques/bow.lua @@ -36,7 +36,7 @@ newTalent{ local inc = t.getPercentInc(self, t) local reloads = t.ammo_mastery_reload(self, t) return ([[Increases weapon damage by %d%% and physical power by 30 when using bows. - Also, increases your reload rate by %d.]]):format(inc * 100, reloads) + Also, increases your reload rate by %d.]]):tformat(inc * 100, reloads) end, } @@ -61,7 +61,7 @@ newTalent{ return true end, info = function(self, t) - return ([[You fire an arrow that cuts right through anything, piercing multiple targets if possible with nigh infinite armor penetration, doing %d%% damage.]]):format(100 * self:combatTalentWeaponDamage(t, 1, 1.5)) + return ([[You fire an arrow that cuts right through anything, piercing multiple targets if possible with nigh infinite armor penetration, doing %d%% damage.]]):tformat(100 * self:combatTalentWeaponDamage(t, 1, 1.5)) end, } @@ -91,7 +91,7 @@ newTalent{ end, info = function(self, t) return ([[You fire two arrows at your target, hitting it and a nearby foe if possible, doing %d%% damage - This talent does not use any stamina.]]):format(100 * self:combatTalentWeaponDamage(t, 1.2, 1.9)) + This talent does not use any stamina.]]):tformat(100 * self:combatTalentWeaponDamage(t, 1.2, 1.9)) end, } @@ -123,6 +123,6 @@ newTalent{ end, info = function(self, t) return ([[You fire multiple arrows at an area of %d radius, doing %d%% damage with each arrow.]]) - :format(self:getTalentRadius(t), 100 * self:combatTalentWeaponDamage(t, 0.6, 1.3)) + :tformat(self:getTalentRadius(t), 100 * self:combatTalentWeaponDamage(t, 0.6, 1.3)) end, } diff --git a/game/modules/tome/data/talents/techniques/buckler-training.lua b/game/modules/tome/data/talents/techniques/buckler-training.lua index 748d2ec084ec399cd4eef07b9a77a7947d53af09..342802e5959075170573c8a72035b93a07b941f4 100644 --- a/game/modules/tome/data/talents/techniques/buckler-training.lua +++ b/game/modules/tome/data/talents/techniques/buckler-training.lua @@ -65,7 +65,7 @@ newTalent { When you are attacked in melee, you have a %d%% chance to deflect the attack with your shield, completely evading it. In addition, as long as you are wearing armour no heavier than leather, you gain %d Armour and %d%% Armour hardiness. The chance to deflect increases with your Cunning.]]) - :format(block, armour, hardiness) + :tformat(block, armour, hardiness) end, } @@ -147,14 +147,14 @@ newTalent { local dist = t.getDist(self, t) target:knockback(self.x, self.y, dist) else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end -- Ranged attack local targets = self:archeryAcquireTargets(nil, {one_shot=true, x=target.x, y=target.y, no_energy = true}) if targets then - --game.logSeen(self, "%s follows up with a shot from %s!", self.name:capitalize(), sling:getName()) + --game.logSeen(self, "%s follows up with a shot from %s!", self:getName():capitalize(), sling:getName()) self:archeryShoot(targets, t, nil, {mult=t.getSlingMult(self, t)}) end @@ -165,7 +165,7 @@ newTalent { local tiles = t.getDist(self, t) local slingMult = t.getSlingMult(self, t) * 100 return ([[Bash an enemy in melee range with your shield (twice for talent level 5 or more), doing %d%% damage and knocking them back %d squares. You may then follow with a deadly short-range sling attack, dealing %d%% damage. The shield bash will use Dexterity instead of Strength for the shield's bonus damage.]]) - :format(shieldMult, tiles, slingMult) + :tformat(shieldMult, tiles, slingMult) end, } @@ -189,13 +189,13 @@ newTalent { local t2 = self:getTalentFromId(self.T_SKIRMISHER_BASH_AND_SMASH) if t2 then if self:getTalentLevelRaw(t2) >= 5 then - crit = " At talent level 5, your Bash and Smash shield hits are guaranteed criticals." + crit = _t" At talent level 5, your Bash and Smash shield hits are guaranteed criticals." else - crit = " At talent level 5, your Bash and Smash shield hit is a guaranteed critical." + crit = _t" At talent level 5, your Bash and Smash shield hit is a guaranteed critical." end end return ([[When you are hit by a projectile, physical or otherwise, you have a %d%% chance to deflect it up to %d squares away.%s]]) - :format(chance, range, crit) + :tformat(chance, range, crit) end, } @@ -251,6 +251,6 @@ newTalent { --local stamina = t.getStaminaPerShot(self, t) return ([[Any time you block an attack with Buckler Expertise or Buckler Mastery you instantly counterattack with your sling for %d%% damage This can only occur up to %d time(s) per turn. ]]) - :format(mult, blocks) + :tformat(mult, blocks) end, } diff --git a/game/modules/tome/data/talents/techniques/combat-techniques.lua b/game/modules/tome/data/talents/techniques/combat-techniques.lua index 803d5d5e3f388982ac2c1a6c4859357771b622d6..34228098e1e3bdef6d5d953c1907873cee2179b7 100644 --- a/game/modules/tome/data/talents/techniques/combat-techniques.lua +++ b/game/modules/tome/data/talents/techniques/combat-techniques.lua @@ -23,7 +23,7 @@ newTalent{ name = "Rush", type = {"technique/combat-techniques-active", 1}, - message = "@Source@ rushes out!", + message = _t"@Source@ rushes out!", require = techs_strdex_req1, points = 5, random_ego = "attack", @@ -83,8 +83,8 @@ newTalent{ return true end, info = function(self, t) - return ([[Rush toward a target enemy with incredible speed and perform a melee attack for 120% weapon damage that can daze the target for 3 turns if it hits. - You must rush from at least 2 tiles away.]]) + return ([[Rush toward a target enemy with incredible speed and perform a melee attack for 120%% weapon damage that can daze the target for 3 turns if it hits. + You must rush from at least 2 tiles away.]]):tformat() end, } @@ -118,7 +118,7 @@ newTalent{ info = function(self, t) return ([[You focus your strikes, reducing your attack speed by %d%% and increasing your Accuracy by %d and critical chance by %d%%. The effects will increase with your Dexterity.]]): - format(10, t.getAtk(self, t), t.getCrit(self, t)) + tformat(10, t.getAtk(self, t), t.getCrit(self, t)) end, } @@ -139,7 +139,7 @@ newTalent{ return true end, info = function(self, t) - return ([[You have learned to focus your blows to hit your target, granting +%d accuracy and allowing you to attack creatures you cannot see without penalty for the next %d turns.]]):format(t.getAtk(self, t), t.getDuration(self, t)) + return ([[You have learned to focus your blows to hit your target, granting +%d accuracy and allowing you to attack creatures you cannot see without penalty for the next %d turns.]]):tformat(t.getAtk(self, t), t.getDuration(self, t)) end, } @@ -164,7 +164,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Through rigorous training, you have learned to focus your actions for a short while, increasing your speed by %d%% for 5 turns.]]):format(100*t.getSpeed(self, t)) + return ([[Through rigorous training, you have learned to focus your actions for a short while, increasing your speed by %d%% for 5 turns.]]):tformat(100*t.getSpeed(self, t)) end, } @@ -182,7 +182,7 @@ newTalent{ self:talentTemporaryValue(p, "stamina_regen", t.getStamRecover(self, t)) end, info = function(self, t) - return ([[Your combat focus allows you to regenerate stamina faster (+%0.1f stamina/turn).]]):format(t.getStamRecover(self, t)) + return ([[Your combat focus allows you to regenerate stamina faster (+%0.1f stamina/turn).]]):tformat(t.getStamRecover(self, t)) end, } @@ -197,7 +197,7 @@ newTalent{ self:talentTemporaryValue(p, "life_regen", t.getRegen(self, t)) end, info = function(self, t) - return ([[Your combat focus allows you to regenerate life faster (+%0.1f life/turn).]]):format(t.getRegen(self, t)) + return ([[Your combat focus allows you to regenerate life faster (+%0.1f life/turn).]]):tformat(t.getRegen(self, t)) end, } @@ -212,7 +212,7 @@ newTalent{ self:talentTemporaryValue(p, "combat_spellresist", t.getSaves(self,t)) end, info = function(self, t) - return ([[Rigorous training allows you to be more resistant to some spell effects (+%d spell save).]]):format(t.getSaves(self,t)) + return ([[Rigorous training allows you to be more resistant to some spell effects (+%d spell save).]]):tformat(t.getSaves(self,t)) end, } @@ -225,6 +225,6 @@ newTalent{ getStamRecover = function(self, t) return self:combatTalentScale(t, 5, 20, 0.5) end, -- Lower scaling than other recovery talents because it effectively scales with character speed and can trigger more than once a turn points = 5, info = function(self, t) - return ([[You revel in the death of your foes, regaining %0.1f stamina with each death you cause.]]):format(t.getStamRecover(self, t)) + return ([[You revel in the death of your foes, regaining %0.1f stamina with each death you cause.]]):tformat(t.getStamRecover(self, t)) end, } diff --git a/game/modules/tome/data/talents/techniques/combat-training.lua b/game/modules/tome/data/talents/techniques/combat-training.lua index b6e8e2ea62bdadaedb3a4380ccaf82451fd90921..d327234285dc8749d09b353102d29fbf4460dd94 100644 --- a/game/modules/tome/data/talents/techniques/combat-training.lua +++ b/game/modules/tome/data/talents/techniques/combat-training.lua @@ -31,7 +31,7 @@ newTalent{ info = function(self, t) local res = t.getRes(self, t) return ([[Your skin becomes more resilient to damage. Increases resistance to all damage by %0.1f%%.]]): - format(res) + tformat(res) end, } @@ -80,7 +80,7 @@ newTalent{ for i = #inven, 1, -1 do local o = inven[i] local ok, err = self:canWearObject(o) - if not ok and err == "missing dependency" then + if not ok then game.logPlayer(self, "You cannot use your %s anymore.", o:getName{do_color=true}) local o = self:removeObject(inven, i, true) self:addObject(self.INVEN_INVEN, o) @@ -98,17 +98,17 @@ newTalent{ local criticalreduction = t.getCriticalChanceReduction(self, t) local classrestriction = "" if self.descriptor and self.descriptor.subclass == "Brawler" then - classrestriction = "(Note that brawlers will be unable to perform many of their talents in massive armour.)" + classrestriction = _t"(Note that brawlers will be unable to perform many of their talents in massive armour.)" end if self:knowTalent(self.T_STEALTH) then - classrestriction = "(Note that wearing mail or plate armour will interfere with stealth.)" + classrestriction = _t"(Note that wearing mail or plate armour will interfere with stealth.)" end return ([[You become better at using your armour to deflect blows and protect your vital areas. Increases Armour value by %d, Armour hardiness by %d%%, and reduces the chance melee or ranged attacks critically hit you by %d%% with your current body armour. (This talent only provides bonuses for heavy mail or massive plate armour.) At level 1, it allows you to wear heavy mail armour, gauntlets, helms, and heavy boots. At level 2, it allows you to wear shields. At level 3, it allows you to wear massive plate armour. - %s]]):format(armor, hardiness, criticalreduction, classrestriction) + %s]]):tformat(armor, hardiness, criticalreduction, classrestriction) end, } @@ -154,7 +154,7 @@ newTalent{ return ([[You learn to maintain your agility and manage your combat posture while wearing light armour. When wearing armour no heavier than leather in your main body slot, you gain %d Defense, %d%% Armour hardiness, and %d%% reduced Fatigue. In addition, when you step adjacent to a (visible) enemy, you use the juxtaposition to increase your total Defense by %d for 2 turns. The Defense bonus scales with your Dexterity.]]): - format(defense, t.getArmorHardiness(self,t), t.getFatigue(self, t, true), defense/2) + tformat(defense, t.getArmorHardiness(self,t), t.getFatigue(self, t, true), defense/2) end, } @@ -169,7 +169,7 @@ newTalent{ info = function(self, t) local attack = t.getAttack(self, t) return ([[Increases the accuracy of unarmed, melee and ranged weapons by %d.]]): - format(attack) + tformat(attack) end, } @@ -186,7 +186,7 @@ newTalent{ local damage = t.getDamage(self, t) local inc = t.getPercentInc(self, t) return ([[Increases weapon damage by %d%% and physical power by 30 when using swords, axes or maces.]]): - format(100*inc) + tformat(100*inc) end, } @@ -204,7 +204,7 @@ newTalent{ local damage = t.getDamage(self, t) local inc = t.getPercentInc(self, t) return ([[Increases weapon damage by %d%% and physical power by 30 when using daggers.]]): - format(100*inc) + tformat(100*inc) end, } @@ -222,6 +222,6 @@ newTalent{ local damage = t.getDamage(self, t) local inc = t.getPercentInc(self, t) return ([[Increases weapon damage by %d%% and physical power by 30 when using exotic weapons.]]): - format(100*inc) + tformat(100*inc) end, } diff --git a/game/modules/tome/data/talents/techniques/conditioning.lua b/game/modules/tome/data/talents/techniques/conditioning.lua index 9b671770627cfb7d13845770e524ecdda3d7e496..e38a432521ce1b3415fe576ff60a6a4a51ebc20b 100644 --- a/game/modules/tome/data/talents/techniques/conditioning.lua +++ b/game/modules/tome/data/talents/techniques/conditioning.lua @@ -43,7 +43,7 @@ newTalent{ return ([[You recover faster from poisons, diseases and wounds, reducing the duration of all such effects by %d%%. Whenever your life falls below 50%%, your life regeneration increases by %0.1f for %d turns (%d total). This effect can only happen once every %d turns. The regeneration scales with your Constitution.]]): - format(wounds, baseheal, duration, baseheal*duration, self:getTalentCooldown(t)) + tformat(wounds, baseheal, duration, baseheal*duration, self:getTalentCooldown(t)) end, } @@ -82,7 +82,7 @@ newTalent{ local eff = effs[1] if eff[1] == "effect" and rng.percent(t.getChance(self, t)) then self:removeEffect(eff[2]) - game.logSeen(self, "#ORCHID#%s has recovered!#LAST#", self.name:capitalize()) + game.logSeen(self, "#ORCHID#%s has recovered!#LAST#", self:getName():capitalize()) end end end, @@ -92,7 +92,7 @@ newTalent{ At talent level 2 you may also recover from Blindness, at level 3 Confusion and Pins, and level 4 Disarms and Slows. Effects will be cleansed with the priority order Stun > Blind > Confusion > Pin > Disarm > Slow. Only one effect may be recovered from each turn, and the chance to recover from an effect scales with your Constitution.]]): - format(chance) + tformat(chance) end, } @@ -136,7 +136,7 @@ newTalent{ return ([[Enemies are intimidated by your very presence. Enemies within radius %d have their Physical Power, Mindpower, and Spellpower reduced by %d. The power of the intimidation effect improves with your Physical power]]): - format(radius, penalty) + tformat(radius, penalty) end, } @@ -165,6 +165,6 @@ newTalent{ You may continue to use stamina based talents while at zero stamina at the cost of life. The Physical Power increase will scale with your Constitution. Using this talent does not take a turn.]]): - format(attack_power, duration) + tformat(attack_power, duration) end, } diff --git a/game/modules/tome/data/talents/techniques/dualweapon.lua b/game/modules/tome/data/talents/techniques/dualweapon.lua index 78ef396f666bc5eaeda4806a99598e35b99b93df..53af6e9d252f5e1a142d7e44e97e0ed6beeba2ae 100644 --- a/game/modules/tome/data/talents/techniques/dualweapon.lua +++ b/game/modules/tome/data/talents/techniques/dualweapon.lua @@ -32,7 +32,7 @@ newTalent{ return self:combatTalentLimit(t, 1, 0.65, 0.85)-- limit <100% end, info = function(self, t) - return ([[Increases the damage of your off-hand weapon to %d%%.]]):format(100 * t.getoffmult(self,t)) + return ([[Increases the damage of your off-hand weapon to %d%%.]]):tformat(100 * t.getoffmult(self,t)) end, } @@ -85,7 +85,7 @@ newTalent{ -- Note: classes: Temporal Warden, Rogue, Shadowblade, Marauder When dual wielding, your defense is increased by %d. Up to %0.1f times a turn, you have a %d%% chance to parry up to %d damage (based on your your offhand weapon damage) from a melee attack. A successful parry reduces damage like armour (before any attack multipliers) and prevents critical strikes. Partial parries have a proportionally reduced chance to succeed. It is difficult to parry attacks from unseen attackers and you cannot parry with a mindstar. - The defense and chance to parry improve with Dexterity. The number of parries increases with Cunning.]]):format(t.getDefense(self, t), t.getDeflects(self, t, true), t.getDeflectChance(self,t), t.getDamageChange(self, t, true)) + The defense and chance to parry improve with Dexterity. The number of parries increases with Cunning.]]):tformat(t.getDefense(self, t), t.getDeflects(self, t, true), t.getDeflectChance(self,t), t.getDamageChange(self, t, true)) end, } @@ -147,7 +147,7 @@ newTalent{ return ([[You have learned how to carefully manage contact between you and your opponent. When striking in melee with your dual wielded weapons, you automatically avoid up to %d damage dealt to you from each of your target's on hit effects. This improves with your Dexterity, but is not possible with mindstars. In addition, while this talent is active, you redirect %d%% of the damage you avoid this way back to your target.]]): - format(t.getReflectArmour(self, t), t.getPercent(self, t)) + tformat(t.getReflectArmour(self, t), t.getPercent(self, t)) end, } @@ -195,7 +195,7 @@ newTalent{ if target:canBe("confusion") then target:setEffect(target.EFF_CONFUSED, t.getConfuseDuration(self, t), {apply_power=self:combatAttack(), power=t.getConfusePower(self, t)}) else - game.logSeen(target, "%s resists the surprise strike!", target.name:capitalize()) + game.logSeen(target, "%s resists the surprise strike!", target:getName():capitalize()) end end return true @@ -205,7 +205,7 @@ newTalent{ return ([[With a quick shift of your momentum, you execute a surprise unarmed strike in place of your normal offhand attack. This allows you to attack with your mainhand weapon for %d%% damage and unarmed for %d%% damage. If the unarmed attack hits, the target is confused (%d%% power) for %d turns. The chance to confuse increases with your Accuracy.]]) - :format(dam, dam*1.25, t.getConfusePower(self, t), t.getConfuseDuration(self, t)) + :tformat(dam, dam*1.25, t.getConfusePower(self, t), t.getConfuseDuration(self, t)) end, } @@ -245,7 +245,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getStunDuration(self, t), {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists the stunning strike!", target.name:capitalize()) + game.logSeen(target, "%s resists the stunning strike!", target:getName():capitalize()) end -- Attack after the stun, to benefit from backstabs @@ -257,7 +257,7 @@ newTalent{ info = function(self, t) return ([[Attack with your offhand weapon for %d%% damage. If the attack hits, the target is stunned for %d turns, and you hit it with your mainhand weapon doing %d%% damage. The stun chance increases with your Accuracy.]]) - :format(100 * self:combatTalentWeaponDamage(t, 0.7, 1.5), t.getStunDuration(self, t), 100 * self:combatTalentWeaponDamage(t, 0.7, 1.5)) + :tformat(100 * self:combatTalentWeaponDamage(t, 0.7, 1.5), t.getStunDuration(self, t), 100 * self:combatTalentWeaponDamage(t, 0.7, 1.5)) end, } @@ -291,7 +291,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Lashes out with a flurry of blows, hitting your target three times with each weapon for %d%% damage.]]):format(100 * self:combatTalentWeaponDamage(t, 0.4, 1.0)) + return ([[Lashes out with a flurry of blows, hitting your target three times with each weapon for %d%% damage.]]):tformat(100 * self:combatTalentWeaponDamage(t, 0.4, 1.0)) end, } @@ -359,7 +359,7 @@ newTalent{ dam = t.getDamage(self,t)*100 crit = t.getCrit(self,t) return ([[Swiftly leap to your target and strike at their vital points with both weapons, dealing %d%% weapon damage. This attack deals %d%% increased critical strike damage.]]): - format(dam, crit) + tformat(dam, crit) end, } @@ -421,7 +421,7 @@ newTalent{ return nil end - game.logSeen(self, "%s becomes a whirlwind of weapons!", self.name:capitalize()) + game.logSeen(self, "%s becomes a whirlwind of weapons!", self:getName():capitalize()) local seen_targets = {} for px, py in core.fov.lineIterator(self.x, self.y, mx, my, "block_NOTHINGLOL") do @@ -451,7 +451,7 @@ newTalent{ local damage = t.getDamage(self, t) local range = self:getTalentRange(t) return ([[You quickly move up to %d tiles to arrive adjacent to a target location you can see, leaping around or over anyone in your way. During your movement, you attack all foes within one grid of your path with both weapons for %d%% weapon damage, causing those struck to bleed for 50%% of the damage dealt over 5 turns.]]): - format(range, damage*100) + tformat(range, damage*100) end, } diff --git a/game/modules/tome/data/talents/techniques/duelist.lua b/game/modules/tome/data/talents/techniques/duelist.lua index d58fd59412cd7c9467c48e5dbf5396d0864e90c0..1826245235f34e0d2ce2850e9ea1be97bf26daf8 100644 --- a/game/modules/tome/data/talents/techniques/duelist.lua +++ b/game/modules/tome/data/talents/techniques/duelist.lua @@ -72,7 +72,7 @@ newTalent{ return ([[Your offhand weapon damage penalty is reduced to %d%%. Up to %0.1f times a turn, you have a %d%% chance to parry up to %d damage (based on your offhand weapon damage) from a melee or ranged attack. The number of parries increases with your Cunning. (A fractional parry has a reduced chance to succeed.) A successful parry reduces damage like armour (before any attack multipliers) and prevents critical strikes. It is difficult to parry attacks from unseen attackers and you cannot parry with a mindstar.]]): - format(100 - mult, t.getDeflects(self, t, true), chance, block) + tformat(100 - mult, t.getDeflects(self, t, true), chance, block) end, } @@ -115,7 +115,7 @@ newTalent{ return ([[The flow of battle invigorates you, allowing you to press your advantage as the fight progresses. Up to once each per turn, while dual wielding, you may: Riposte -- If a melee or archery attack misses you or you parry it, you instantly restore %0.1f stamina and gain %d%% of a turn. - Recover -- On performing a critical strike with your offhand weapon, you instantly restore %0.1f stamina.]]):format(sta, speed, sta) + Recover -- On performing a critical strike with your offhand weapon, you instantly restore %0.1f stamina.]]):tformat(sta, speed, sta) end, } @@ -153,7 +153,7 @@ newTalent{ if not self.dead and tx == target.x and ty == target.y then if target:attr("never_move") then - game.logPlayer(self, "%s cannot move!", target.name:capitalize()) + game.logPlayer(self, "%s cannot move!", target:getName():capitalize()) return false elseif not self:canMove(tx,ty,true) or not target:canMove(sx,sy,true) then self:logCombat(target, "Terrain prevents #Source# from switching places with #Target#.") @@ -179,7 +179,7 @@ newTalent{ return ([[Make a cunning feint that tricks your target into swapping places with you. While moving, you take the opportunity to trip them, pinning and dazing them for 2 turns. Switching places distracts your foes and allows you to improve your defenses: For %d turns, Dual Weapon Mastery yields one extra parry each turn and you are %d%% less likely to miss your parry opportunities. The chance to pin and to daze increases with your Accuracy]]): - format(t.getDuration(self, t), t.getParryEfficiency(self, t)) + tformat(t.getDuration(self, t), t.getParryEfficiency(self, t)) end, } @@ -222,7 +222,7 @@ newTalent{ if hitted and target:canBe("disarm") then target:setEffect(target.EFF_DISARMED, t.getDuration(self, t), {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists the blow!", target.name:capitalize()) + game.logSeen(target, "%s resists the blow!", target:getName():capitalize()) end return true end, @@ -232,6 +232,6 @@ newTalent{ return ([[Exploiting a gap in your target's defenses, you make a lethal strike with your offhand weapon for %d%% damage that causes them to drop their weapon, disarming them for %d turns. Tempo will reduce the cooldown of this talent by 1 turn each time it is triggered defensively. The chance to disarm increases with your Accuracy.]]): - format(dam*100, dur) + tformat(dam*100, dur) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/techniques/excellence.lua b/game/modules/tome/data/talents/techniques/excellence.lua index cc9cf588bc0e6b9be09153981d46b8987c998348..bb5e891b28f83ae98f9a0581e6a54b005dbe2a41 100644 --- a/game/modules/tome/data/talents/techniques/excellence.lua +++ b/game/modules/tome/data/talents/techniques/excellence.lua @@ -63,7 +63,7 @@ newTalent{ info = function(self, t) return ([[Your reflexes are lightning-fast, if you spot a projectile (arrow, shot, spell, ...) you can instantly shoot at it without taking a turn to take it down. You can shoot down up to %d projectiles.]]): - format(t.getNb(self, t)) + tformat(t.getNb(self, t)) end, } @@ -127,7 +127,7 @@ newTalent{ info = function(self, t) return ([[You rush toward your foe, readying your shot. If you reach the enemy, you release the shot, imbuing it with great power. The shot does %d%% weapon damage and knocks back your target by %d.]]): - format(self:combatTalentWeaponDamage(t, 1.5, 2.8) * 100, t.getDist(self, t)) + tformat(self:combatTalentWeaponDamage(t, 1.5, 2.8) * 100, t.getDist(self, t)) end, } @@ -162,7 +162,7 @@ newTalent{ if not self:checkHit(self:combatAttackRanged(weapon, ammo), target:combatDefenseRanged()) or target:checkEvasion(self) then xatk, ret = -1e6, false end - game.logSeen(self, "%s %s the attack!", self.name:capitalize(), ret and "intercepts" or "fails to intercept") + game.logSeen(self, "%s %s the attack!", self:getName():capitalize(), ret and _t"intercepts" or _t"fails to intercept") self:archeryShoot(targets, t, nil, {atk = xatk, mult=self:combatTalentWeaponDamage(t, 0.4, 0.9)}) return ret end, @@ -176,7 +176,7 @@ newTalent{ info = function(self, t) return ([[Activating this talent enhances your reflexes to incredible levels. Each time you are attacked in melee, you have a %d%% chance get a defensive shot off in time to intercept the attack, fully disrupting it (including extra blows from certain talents), dealing %d%% archery damage, and knocking the attacker back %d tiles. Activating this talent will not interrupt reloading.]]) - :format(t.getChance(self, t), self:combatTalentWeaponDamage(t, 0.4, 0.9) * 100, t.getDist(self, t)) + :tformat(t.getChance(self, t), self:combatTalentWeaponDamage(t, 0.4, 0.9) * 100, t.getDist(self, t)) end, } @@ -202,7 +202,7 @@ newTalent{ if target:canBe("silence") then target:setEffect(target.EFF_SILENCED, t.getDur(self, t), {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists the strangling shot!", target.name:capitalize()) + game.logSeen(target, "%s resists the strangling shot!", target:getName():capitalize()) end end, action = function(self, t) @@ -215,6 +215,6 @@ newTalent{ info = function(self, t) return ([[You fire a shot at your target's throat, mouth, or equivalent body part, doing %d%% damage and silencing it for %d turns. The silence chance increases with your Accuracy.]]) - :format(self:combatTalentWeaponDamage(t, 0.9, 1.7) * 100, t.getDur(self,t)) + :tformat(self:combatTalentWeaponDamage(t, 0.9, 1.7) * 100, t.getDur(self,t)) end, } diff --git a/game/modules/tome/data/talents/techniques/field-control.lua b/game/modules/tome/data/talents/techniques/field-control.lua index a2b0de7983c5506e6f45048f07c3e805d3d92a1b..153ba4075b8401809f61e7c642dbc34099a9756c 100644 --- a/game/modules/tome/data/talents/techniques/field-control.lua +++ b/game/modules/tome/data/talents/techniques/field-control.lua @@ -44,7 +44,7 @@ -- return true -- end, -- info = function(self, t) --- return ([[Jump away %d grids from your target.]]):format(t.getDist(self, t)) +-- return ([[Jump away %d grids from your target.]]):tformat(t.getDist(self, t)) -- end, --} -- @@ -69,7 +69,7 @@ -- info = function(self, t) -- local rad = self:getTalentRadius(t) -- return ([[Sense foes around you in a radius of %d for %d turns. --- The radius will increase with your Cunning.]]):format(rad, 3 + self:getTalentLevel(t)) +-- The radius will increase with your Cunning.]]):tformat(rad, 3 + self:getTalentLevel(t)) -- end, --} @@ -96,7 +96,7 @@ newTalent{ if target:checkHit(math.max(self:combatAttack(), self:combatPhysicalpower()), target:combatPhysicalResist(), 0, 95) and target:canBe("knockback") then -- Deprecated Checkhit call return true else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end @@ -111,7 +111,7 @@ newTalent{ return ([[A mighty kick that pushes your target away %d grids. If another creature is in the way, it will also be pushed away. The Knockback chance increases with your Accuracy or your Physical Power, whichever is greater.]]) - :format(t.getDist(self, t)) + :tformat(t.getDist(self, t)) end, } @@ -137,6 +137,6 @@ newTalent{ end, info = function(self, t) return ([[Your great dexterity allows you to see incoming projectiles (spells, arrows, ...), effectively slowing them down by %d%%.]]): - format(math.min(90, 15 + self:getDex(10, true) * self:getTalentLevel(t))) + tformat(math.min(90, 15 + self:getDex(10, true) * self:getTalentLevel(t))) end, } diff --git a/game/modules/tome/data/talents/techniques/finishing-moves.lua b/game/modules/tome/data/talents/techniques/finishing-moves.lua index 2c7c06ad6be6a934b866688aff41ca83ef543f12..b66e7a99118ff21b96b6631a22946e456e8b5512 100644 --- a/game/modules/tome/data/talents/techniques/finishing-moves.lua +++ b/game/modules/tome/data/talents/techniques/finishing-moves.lua @@ -25,7 +25,7 @@ newTalent{ random_ego = "attack", cooldown = 10, stamina = 12, - message = "@Source@ throws a finishing uppercut.", + message = _t"@Source@ throws a finishing uppercut.", tactical = { ATTACK = { weapon = 2 }, DISABLE = { stun = 2 } }, requires_target = true, target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end, @@ -50,7 +50,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getDuration(self, t, self:getCombo(combo)), {apply_power=self:combatPhysicalpower()}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end local a = util.dirToAngle(util.getDir(target.x, self.y, self.x, target.y)) @@ -68,7 +68,7 @@ newTalent{ return ([[A finishing uppercut that deals %d%% damage, and attempts to stun your target for %d to %d turns, depending on the amount of combo points you've accumulated. The stun chance will improve with your Physical Power. Using this talent removes your combo points.]]) - :format(damage, stun, stunmax) + :tformat(damage, stun, stunmax) end, } @@ -82,7 +82,7 @@ newTalent{ random_ego = "attack", cooldown = 4, stamina = 12, - message = "@Source@ throws a concussive punch.", + message = _t"@Source@ throws a concussive punch.", tactical = { ATTACK = { weapon = 2 }, }, requires_target = true, target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end, @@ -125,7 +125,7 @@ newTalent{ return ([[A powerful concussive punch that deals %d%% weapon damage to your target. If the punch hits, all targets in a radius of %d will take %0.2f to %0.2f damage, depending on the amount of combo points you've accumulated. The area damage will scale with your Strength, and the radius will increase by 1 per combo point. Using this talent removes your combo points.]]) - :format(damage, radius, damDesc(self, DamageType.PHYSICAL, area), damDesc(self, DamageType.PHYSICAL, areamax)) + :tformat(damage, radius, damDesc(self, DamageType.PHYSICAL, area), damDesc(self, DamageType.PHYSICAL, areamax)) end, } @@ -193,7 +193,7 @@ newTalent{ end, info = function(self, t) return ([[You spin into a flying leap and deliver a powerful kick dealing %d%% weapon damage to all enemies in a radius of 1 as you land. The range will increase by 1 per combo point and total damage will increase by 10%% per combo point. - Using this talent removes your combo points and you must have at least 1 combo point to use it.]]):format(t.getDamage(self, t)*100) + Using this talent removes your combo points and you must have at least 1 combo point to use it.]]):tformat(t.getDamage(self, t)*100) end, } @@ -205,7 +205,7 @@ newTalent{ random_ego = "attack", cooldown = 8, stamina = 12, - message = "@Source@ throws a wild haymaker!", + message = _t"@Source@ throws a wild haymaker!", tactical = { ATTACK = { weapon = 2 } }, requires_target = true, range = 1, @@ -235,10 +235,10 @@ newTalent{ if hit then if target:checkHit(self:combatPhysicalpower(), target:combatPhysicalResist(), 0, 95, 5 - self:getTalentLevel(t) / 2) and target:canBe("instakill") and target.life > target.die_at and target.life < target.max_life * 0.2 then -- KILL IT ! - game.logSeen(target, "%s feels the pain of the death blow!", target.name:capitalize()) + game.logSeen(target, "%s feels the pain of the death blow!", target:getName():capitalize()) target:die(self) elseif target.life > 0 and target.life < target.max_life * 0.2 then - game.logSeen(target, "%s resists the death blow!", target.name:capitalize()) + game.logSeen(target, "%s resists the death blow!", target:getName():capitalize()) end local a = util.dirToAngle(util.getDir(target.x, self.y, self.x, target.y)) @@ -262,6 +262,6 @@ newTalent{ return ([[A vicious finishing strike that deals %d%% damage increased by 20%% per combo point you have up to a max of %d%%. If the target ends up with low enough life (<20%%), it might be instantly killed. Killing a target with Haymaker will instantly restore %d%% to %d%% of your maximum stamina, depending on the amount of combo points you've accumulated. Using this talent removes your combo points.]]) - :format(damage, maxDamage, stamina, staminamax) + :tformat(damage, maxDamage, stamina, staminamax) end, } diff --git a/game/modules/tome/data/talents/techniques/grappling.lua b/game/modules/tome/data/talents/techniques/grappling.lua index f478f5c21027f84a71c8443905a558a439aaf17a..4f9ebcb6277e77fd3603ac27de8c7bb4b9da0c61 100644 --- a/game/modules/tome/data/talents/techniques/grappling.lua +++ b/game/modules/tome/data/talents/techniques/grappling.lua @@ -49,7 +49,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Increases your Physical Save by %d and your Physical Power by %d. The bonuses will scale with your Strength.]]) - :format(save, damage) + :tformat(save, damage) end, } @@ -104,7 +104,7 @@ newTalent{ return ([[Make a melee attack for %d%% damage and then attempt to grapple a target up to one size category larger than yourself for %d turns. A grappled opponent will be unable to move, take %d damage each turn, and %d%% of the damage you receive from any source will be redirected to them as physical damage. Any movement from the target or you will break the grapple. Maintaining a grapple drains %d stamina per turn. You may only grapple a single target at a time, and using any targeted unarmed talent on a target that you're not grappling will break the grapple.]]) - :format(damage, duration, power, share, drain) + :tformat(damage, duration, power, share, drain) end, } @@ -145,7 +145,7 @@ newTalent{ #RED#Talent Level 1: Reduces physical power by %d Talent Level 3: Silences Talent Level 5: Reduces global action speed by %d%%]]) - :format(reduction, slow*100) + :tformat(reduction, slow*100) end, } @@ -238,7 +238,7 @@ newTalent{ local slam = t.getSlam(self, t) return ([[Rushes forward and attempts to take the target to the ground, making a melee attack for %d%% damage then attempting to grapple them. If you're already grappling the target you'll instead slam them into the ground creating a radius 5 shockwave for %d physical damage and breaking your grapple. The grapple effects and duration will be based off your grapple talent, if you have it, and the damage will scale with your Physical Power.]]) - :format(damDesc(self, DamageType.PHYSICAL, (takedown)), damDesc(self, DamageType.PHYSICAL, (slam))) + :tformat(damDesc(self, DamageType.PHYSICAL, (takedown)), damDesc(self, DamageType.PHYSICAL, (slam))) end, } @@ -333,6 +333,6 @@ newTalent{ info = function(self, t) return ([[In a mighty show of strength you whirl your grappled victim around and throw them into the air causing %d%% damage to them and enemies in radius %d on landing. If at least 1 other enemy is hit the thrown enemy will be shaken by the impact losing a full turn. - You can only throw enemies that could move normally.]]):format(t.getDamage(self, t)*100, self:getTalentRadius(t)) + You can only throw enemies that could move normally.]]):tformat(t.getDamage(self, t)*100, self:getTalentRadius(t)) end, } diff --git a/game/modules/tome/data/talents/techniques/magical-combat.lua b/game/modules/tome/data/talents/techniques/magical-combat.lua index 8daef56a2854d07f1e76901705bcb8e5bec75085..330a52edb42153ea6b2d100ead5dc5e810cfdc12 100644 --- a/game/modules/tome/data/talents/techniques/magical-combat.lua +++ b/game/modules/tome/data/talents/techniques/magical-combat.lua @@ -143,11 +143,11 @@ newTalent{ if self:isTalentActive(t.id) then local talent = self:getTalentFromId(self:isTalentActive(t.id).talent) if talent and talent.name then - talent_selected = [[ + talent_selected = ([[ - Currently selected spell: ]] .. talent.name + Currently selected spell: %s]]):tformat(talent.name) else - talent_selected = [[ + talent_selected = _t[[ Currently selected spell: Random]] end @@ -159,7 +159,7 @@ newTalent{ The chance increases with your Cunning. Allowed spells: %s %s]]): - format(t.getChance(self, t), talent_list, talent_selected) + tformat(t.getChance(self, t), talent_list, talent_selected) end, } @@ -175,7 +175,7 @@ newTalent{ local spellpower = t.getSpellpower(self, t) local bonus = self:getCun()*spellpower/100 return ([[The user gains a bonus to Spellpower equal to %d%% of your Cunning (Current bonus: %d).]]): - format(spellpower, bonus) + tformat(spellpower, bonus) end, } @@ -207,7 +207,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Regenerates %0.2f mana per turn, and increases physical and spell critical chance by %d%% while active.]]):format(t.getManaRegen(self, t), t.getCritChance(self, t)) + return ([[Regenerates %0.2f mana per turn, and increases physical and spell critical chance by %d%% while active.]]):tformat(t.getManaRegen(self, t), t.getCritChance(self, t)) end, } @@ -228,6 +228,6 @@ newTalent{ If you are dual wielding this will only occur 50%% of the time. At level 5 the ball becomes radius 2. ]]): - format(t.getSPMult(self, t)*100, self:getMag() * t.getSPMult(self, t), self:getTalentRadius(t), damDesc(self, DamageType.ARCANE, t.getDamage(self, t)) ) + tformat(t.getSPMult(self, t)*100, self:getMag() * t.getSPMult(self, t), self:getTalentRadius(t), damDesc(self, DamageType.ARCANE, t.getDamage(self, t)) ) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/techniques/marksmanship.lua b/game/modules/tome/data/talents/techniques/marksmanship.lua index 383d91e809d81bce66c9cfffdfaa23dc5551d01c..5ac663065a7666219b45d7500a3c2d04709af00c 100644 --- a/game/modules/tome/data/talents/techniques/marksmanship.lua +++ b/game/modules/tome/data/talents/techniques/marksmanship.lua @@ -49,7 +49,7 @@ newTalent{ return ([[Increases weapon damage by %d%% and physical power by 30 when using bows or slings, as well as your reload rate by %d. In addition, your Shoot has a %d%% chance to mark targets on hit. The mark lasts for 5 turns, grants you visibility of the target (even through walls and other concealment), and causes them to become vulnerable to Headshot, Volley and Called Shots.]]): -format(inc * 100, reload, chance) +tformat(inc * 100, reload, chance) end, } @@ -66,7 +66,7 @@ newTalent{ local sta = t.getStamina(self,t) return ([[You take advantage of unwary foes (those at or above 90%% life). Against these targets, Shoot, Steady Shot and Headshot bleed targets for %d%% additional damage over 5 turns and have a 50%% increased chance to mark (if capable of marking). In addition, your Steady Shot, Shoot and Headshot now restore %0.1f stamina on hit.]]) - :format(bleed, sta) + :tformat(bleed, sta) end, } @@ -115,7 +115,7 @@ newTalent{ local def = t.getDefensePenalty(self,t) return ([[Fire a shot at the target tile that blinds enemies for %d turns, marks them for 2 turns and illuminates the area within radius %d for %d turns. Enemies within the illuminated area lose %d defence and stealth power and cannot benefit from concealment. The status chance increases with your Accuracy, and the defense reduction with your Dexterity.]]) - :format(blind, rad, dur, def) + :tformat(blind, rad, dur, def) end, } @@ -143,6 +143,6 @@ newTalent{ local speed = t.getSpeed(self,t)*100 local mark = t.getMarkChance(self,t) return ([[Enter a state of heightened focus for %d turns. While in this state your ranged attack speed is increased by %d%%, your shots do not consume ammo, and all shots capable of marking have their chance to mark increased by %d%%.]]): - format(dur, speed, mark) + tformat(dur, speed, mark) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/techniques/mobility.lua b/game/modules/tome/data/talents/techniques/mobility.lua index 15ed7a3f834343cc048fbe8f695f0d660c68d650..740ce2af31d5cd6ac0100c4c01c225db725731a0 100644 --- a/game/modules/tome/data/talents/techniques/mobility.lua +++ b/game/modules/tome/data/talents/techniques/mobility.lua @@ -197,7 +197,7 @@ newTalent{ You must disengage in a nearly straight line directly away from your target (which you must be able to see). After moving, you gain %d%% increased movement speed for 3 turns (which ends if you take any actions other than movement), and you may reload your ammo (if any). The extra speed and maximum distance you can move are reduced by your Fatigue level.]]): - format(t.getDist(self, t), t.getSpeed(self,t), t.getNb(self,t)) + tformat(t.getDist(self, t), t.getSpeed(self,t), t.getNb(self,t)) end, } @@ -230,7 +230,7 @@ newTalent{ local chance, def = t.getChanceDef(self,t) return ([[Your quick wit and reflexes allow you to anticipate attacks against you, granting you a %d%% chance to evade melee and ranged attacks and %d increased defense for %d turns. The chance to evade and defense bonus increase with your Dexterity.]]): - format(chance, def,t.getDur(self,t)) + tformat(chance, def,t.getDur(self,t)) end, } @@ -277,7 +277,7 @@ newTalent { end, info = function(self, t) return ([[In an extreme feat of agility, you move to a spot you can see within range, bounding around, over, or through any enemies in the way. - This talent cannot be used while wearing heavy armor, and leaves you exhausted. The exhaustion increases the cost of your activated Mobility talents by %d%% (stacking), but fades over %d turns.]]):format(t.getExhaustion(self, t), t.getDuration(self, t)) + This talent cannot be used while wearing heavy armor, and leaves you exhausted. The exhaustion increases the cost of your activated Mobility talents by %d%% (stacking), but fades over %d turns.]]):tformat(t.getExhaustion(self, t), t.getDuration(self, t)) end } @@ -330,17 +330,17 @@ newTalent { stam, stam_cost = self:getStamina(), stam_cost or t.getStamina(self, t) local lt = t.getLifeTrigger(self, t)/100 if stam_cost == 0 or dam > self.max_life*lt then - --print(("[PROJECTOR: Trained Reactions] PASSED life/stam test for %s: %s %s damage (%s) (%0.1f/%0.1f stam) from %s (state:%s)"):format(self.name, dam, type, is_attk, stam_cost, stam, src.name, state)) -- debugging + --print(("[PROJECTOR: Trained Reactions] PASSED life/stam test for %s: %s %s damage (%s) (%0.1f/%0.1f stam) from %s (state:%s)"):tformat(self.name, dam, type, is_attk, stam_cost, stam, src.name, state)) -- debugging self.turn_procs[t.id] = state self:incStamina(-stam_cost) -- Note: force_talent_ignore_ressources has no effect on this local reduce = t.getReduction(self, t)*dam - if src.logCombat then src:logCombat(self, "#FIREBRICK##Target# reacts to %s from #Source#, mitigating the blow!#LAST#.", is_attk and "an attack" or "damage") end + if src.logCombat then src:logCombat(self, "#FIREBRICK##Target# reacts to %s from #Source#, mitigating the blow!#LAST#.", is_attk and _t"an attack" or _t"damage") end dam = dam - reduce print("[PROJECTOR] dam after callbackOnTakeDamage", t.id, dam) local d_color = DamageType:get(type).text_color or "#FIREBRICK#" - local stam_txt = stam_cost > 0 and (" #ffcc80#, -%d stam#LAST#"):format(stam_cost) or "" - game:delayedLogDamage(src, self, 0, ("%s(%d reacted#LAST#%s%s)#LAST#"):format(d_color, reduce, stam_txt, d_color), false) + local stam_txt = stam_cost > 0 and (" #ffcc80#, -%d stam#LAST#"):tformat(stam_cost) or "" + game:delayedLogDamage(src, self, 0, ("%s(%d reacted#LAST#%s%s)#LAST#"):tformat(d_color, reduce, stam_txt, d_color), false) if not is_attk then self.turn_procs.gen_trained_reactions = true end return {dam = dam} end @@ -363,7 +363,7 @@ newTalent { This requires %0.1f stamina and reduces the damage by %d%%. Your reactions are too slow for this if you are wearing heavy armour. The damage reduction improves with your Defense.]]) - :format(trigger, stam, reduce) + :tformat(trigger, stam, reduce) end, } diff --git a/game/modules/tome/data/talents/techniques/munitions.lua b/game/modules/tome/data/talents/techniques/munitions.lua index 9575a17ceeed4cc33b728f1cbaff3523fbb982aa..b8810ffe7eecf5a471b781d6bbe8d45f01899fea 100644 --- a/game/modules/tome/data/talents/techniques/munitions.lua +++ b/game/modules/tome/data/talents/techniques/munitions.lua @@ -67,7 +67,7 @@ Venomous - Shots deal %0.2f nature damage and inflict numbing poison, dealing a Piercing - Shots reduce armor and saves by %d for 3 turns, and your physical penetration is increased by %d%%. You can only have 1 type of ammunition loaded at a time. The poison damage dealt, armor penetration and save reduction will increase with your Physical Power.]]): - format(t.getIncendiaryDamage(self, t)*100, t.getIncendiaryRadius(self,t), damDesc(self, DamageType.NATURE, t.getPoisonDamage(self, t)/5), damDesc(self, DamageType.NATURE, t.getPoisonDamage(self, t)), t.getNumb(self, t), t.getArmorSaveReduction(self, t), t.getResistPenalty(self,t)) + tformat(t.getIncendiaryDamage(self, t)*100, t.getIncendiaryRadius(self,t), damDesc(self, DamageType.NATURE, t.getPoisonDamage(self, t)/5), damDesc(self, DamageType.NATURE, t.getPoisonDamage(self, t)), t.getNumb(self, t), t.getArmorSaveReduction(self, t), t.getResistPenalty(self,t)) end, } @@ -153,7 +153,7 @@ newTalent{ local radius = self:getTalentRadius(t) return ([[Load incendiary ammunition, causing attacks to deal an additional %d%% weapon damage as fire in a radius %d ball around your target. This cannot trigger more than once per turn. - The damage will scale with your Physical Power.]]):format(damage, radius) + The damage will scale with your Physical Power.]]):tformat(damage, radius) end, } @@ -217,7 +217,7 @@ newTalent{ local damage = t.getPoisonDamage(self, t) local numb = t.getNumb(self,t) return ([[Load venomous ammunition, causing ranged attacks to deal %0.2f nature damage and inflict numbing poison, dealing %0.2f nature damage over 5 turns and reducing all damage dealt by %d%%. - The damage will scale with your Physical Power.]]):format(damDesc(self, DamageType.NATURE, damage/5), damDesc(self, DamageType.NATURE, damage), numb) + The damage will scale with your Physical Power.]]):tformat(damDesc(self, DamageType.NATURE, damage/5), damDesc(self, DamageType.NATURE, damage), numb) end, } @@ -268,7 +268,7 @@ newTalent{ local reduce = t.getArmorSaveReduction(self, t) local resist = t.getResistPenalty(self,t) return ([[Load piercing ammunition, causing attacks to reduce the target's armor and saves by %d for 3 turns, and increasing your physical penetration by %d%%. - The armor and save reduction will scale with your Physical Power.]]):format(reduce, resist) + The armor and save reduction will scale with your Physical Power.]]):tformat(reduce, resist) end, } @@ -390,7 +390,7 @@ Incendiary - Fire a shot that deals %d%% weapon damage as fire and covers target Venomous - Fire a shot that deals %d%% weapon damage as nature and explodes into a radius %d cloud of crippling poison for %d turns, dealing %0.2f nature damage each turn and giving affected targets a %d%% chance to fail talent usage. Piercing - Fire a shot that explodes into a radius %d burst of shredding shrapnel, dealing %d%% weapon damage as physical and removing %d beneficial physical effects or sustains. The poison damage dealt increases with your Physical Power, and status chance increases with your Accuracy.]]): - format(dam, radius, dur, slow, fire, dam, radius, dur, damDesc(self, DamageType.NATURE, poison), fail, radius, dam, nb) + tformat(dam, radius, dur, slow, fire, dam, radius, dur, damDesc(self, DamageType.NATURE, poison), fail, radius, dam, nb) end, } @@ -415,7 +415,7 @@ Venomous - Inflicts leeching poison, dealing %0.2f nature damage over 3 turns an Piercing - Punctures the target’s armor, increasing all damage they take by %d%% for 3 turns. You only have a limited amount of this ammo, causing this talent to have a cooldown. The damage dealt will increase with your Physical Power, and status chance increases with your Accuracy.]]): - format(damDesc(self, DamageType.FIRE, fire), damDesc(self, DamageType.NATURE, poison), resist) + tformat(damDesc(self, DamageType.FIRE, fire), damDesc(self, DamageType.NATURE, poison), resist) end, } @@ -443,6 +443,6 @@ Incendiary - Targets struck by the explosion have their armor and saves reduced Venomous - Shots deal an additional %d%% weapon damage as nature in a radius %d ball, which applies numbing poison as per Exotic Munitions. This cannot occur more than once per turn. Piercing - Shots deal %0.2f physical damage and maim the target, bleeding them for a further %0.2f physical damage over 5 turns and reducing all damage dealt by %d%%. The physical damage dealt, armor penetration and save reduction will increase with your Physical Power.]]): - format(armor, resist, poison, radius, bleed/5, bleed, numb) + tformat(armor, resist, poison, radius, bleed/5, bleed, numb) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/techniques/pugilism.lua b/game/modules/tome/data/talents/techniques/pugilism.lua index 9d3aafd6f7b1d5e26afa2b26981713ad092a2f3b..fe6e245d2be46e8fa975a7412496020a24e25a1b 100644 --- a/game/modules/tome/data/talents/techniques/pugilism.lua +++ b/game/modules/tome/data/talents/techniques/pugilism.lua @@ -65,7 +65,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Increases your Accuracy by %d, the damage multiplier of your striking talents (Pugilism and Finishing Moves) by %d%%, and reduces all damage taken by %d. The offensive bonuses scale with your Dexterity and the damage reduction with your Strength.]]): - format(attack, damage, t.getFlatReduction(self, t)) + tformat(attack, damage, t.getFlatReduction(self, t)) end, } @@ -77,7 +77,7 @@ newTalent{ random_ego = "attack", --cooldown = function(self, t) return math.ceil(3 * getRelentless(self, cd)) end, cooldown = 3, - message = "@Source@ throws two quick punches.", + message = _t"@Source@ throws two quick punches.", tactical = { ATTACK = { weapon = 2 } }, requires_target = true, is_melee = true, @@ -147,7 +147,7 @@ newTalent{ local damage = t.getDamage(self, t) * 100 return ([[Deliver two quick punches that deal %d%% damage each, and switch your stance to Striking Stance. If you already have Striking Stance active and Double Strike isn't on cooldown, this talent will automatically replace your normal attacks (and trigger the cooldown). If either jab connects, you earn one combo point. At talent level 4 or greater, if both jabs connect, you'll earn two combo points.]]) - :format(damage) + :tformat(damage) end, } @@ -166,7 +166,7 @@ newTalent{ target = function(self, t) return {type="bolt", range=self:getTalentRange(t)} end, range = function(self, t) return math.ceil(2 + self:combatTalentScale(t, 2.2, 4.3)) end, -- being able to use this over rush without massive investment is much more fun chargeBonus = function(self, t, dist) return self:combatScale(dist, 0.15, 1, 0.50, 5) end, - message = "@Source@ lashes out with a spinning backhand.", + message = _t"@Source@ lashes out with a spinning backhand.", tactical = { ATTACKAREA = { weapon = 2 }, CLOSEIN = 1 }, requires_target = true, getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 1.0, 1.7) + getStrikingStyle(self, dam) end, @@ -259,7 +259,7 @@ newTalent{ local charge =t.chargeBonus(self, t, t.range(self, t)-1)*100 return ([[Attack your foes in a frontal arc with a spinning backhand, doing %d%% damage. If you're not adjacent to the target, you'll step forward as you spin, gaining up to %d%% bonus damage, which increases the farther you move. This attack will remove any grapples you're maintaining, and earn one combo point (or one combo point per attack that connects, if the talent level is 4 or greater).]]) - :format(damage, charge) + :tformat(damage, charge) end, } @@ -279,7 +279,7 @@ newTalent{ is_melee = true, target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end, range = 1, - message = "@Source@ raises their leg and snaps it downward in a devastating axe kick.", + message = _t"@Source@ raises their leg and snaps it downward in a devastating axe kick.", tactical = { ATTACK = { weapon = 2 } }, requires_target = true, getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 0.8, 2) + getStrikingStyle(self, dam) end, -- low damage scaling, investment gets the extra CP @@ -316,7 +316,7 @@ newTalent{ local damage = t.getDamage(self, t) * 100 return ([[Deliver a devastating axe kick dealing %d%% damage. If the blow connects your target is brain damaged, causing all talents to fail for %d turns and earning 2 combo points. This effect cannot be saved against, though it can be dodged and checks confusion immunity.]]) - :format(damage, t.getDuration(self, t)) + :tformat(damage, t.getDuration(self, t)) end, } @@ -328,7 +328,7 @@ newTalent{ random_ego = "attack", cooldown = 16, stamina = 15, - message = "@Source@ lashes out with a flurry of fists.", + message = _t"@Source@ lashes out with a flurry of fists.", tactical = { ATTACK = { weapon = 2 } }, requires_target = true, is_melee = true, @@ -380,6 +380,6 @@ newTalent{ local damage = t.getDamage(self, t) * 100 return ([[Lashes out at the target with three quick punches that each deal %d%% damage. Earns one combo point. If your talent level is 4 or greater, this instead earns one combo point per blow that connects.]]) - :format(damage) + :tformat(damage) end, } diff --git a/game/modules/tome/data/talents/techniques/reflexes.lua b/game/modules/tome/data/talents/techniques/reflexes.lua index cfe680530139aeefbf4af99ec8dc3aef74b92ff3..ce1ac1c92bc34f72df1b78aa487d363870e77b51 100644 --- a/game/modules/tome/data/talents/techniques/reflexes.lua +++ b/game/modules/tome/data/talents/techniques/reflexes.lua @@ -74,7 +74,7 @@ newTalent{ return ([[Your reflexes are lightning-fast, if you spot a projectile (arrow, shot, spell, ...) you can instantly shoot at it without taking a turn to take it down. You can shoot down up to %d projectiles. In addition, your heightened senses also reduce the speed of incoming projectiles by %d%%, and prevents your own projectiles from striking you.]]): - format(t.getNb(self, t), t.getSlow(self,t)) + tformat(t.getNb(self, t), t.getSlow(self,t)) end, } @@ -117,7 +117,7 @@ newTalent{ local dam = t.getDamage(self,t)*100 return ([[Activating this talent enhances your reflexes to incredible levels. Each time you are attacked in melee, you have a %d%% chance to fire off a defensive shot off in time to intercept the attack, evading it and dealing %d%% archery damage. This cannot damage the same target more than once per turn.]]) - :format(chance, dam) + :tformat(chance, dam) end, } @@ -149,7 +149,7 @@ newTalent{ local t = rng.tableRemove(tids) if not t then break end target.talents_cd[t.id] = cdr - game.logSeen(target, "%s's %s is disrupted by the shot!", target.name:capitalize(), t.name) + game.logSeen(target, "%s's %s is disrupted by the shot!", target:getName():capitalize(), t.name) end end, doShoot = function(self, t, eff) @@ -173,7 +173,7 @@ newTalent{ local cd = t.getCooldown(self,t) return ([[You take close notice of the target for the next 5 turns. If they attempt to use a non-instant talent you react with incredible speed, firing a shot dealing 25%% damage that causes the talent to fail and go on cooldown. This shot is instant, cannot miss, and puts %d other talents on cooldown for %d turns.]]): - format(nb, cd) + tformat(nb, cd) end, } @@ -202,6 +202,6 @@ newTalent{ local speed = t.getSpeed(self,t) return ([[You put all your focus into escaping combat for 4 turns. While under this effect you gain %d%% increased resistance to all damage, %0.1f increased stamina regeneration, immunity to stun, pin, daze and slowing effects and %d%% increased movement speed. Any action other than movement will cancel this effect.]]): - format(power, sta, speed) + tformat(power, sta, speed) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/techniques/skirmisher-slings.lua b/game/modules/tome/data/talents/techniques/skirmisher-slings.lua index 812c5ee876dcc77dfa1923a640a4fdd8b02ac131..ec921b6a9d257aeee8125d78af2fdb1e5f7ed04e 100644 --- a/game/modules/tome/data/talents/techniques/skirmisher-slings.lua +++ b/game/modules/tome/data/talents/techniques/skirmisher-slings.lua @@ -35,7 +35,7 @@ newTalent { local inc = t.getPercentInc(self, t) local reloads = t.ammo_mastery_reload(self, t) return ([[Increases weapon damage by %d%% and physical power by 30 when using slings. - Also, increases your reload rate by %d.]]):format(inc * 100, reloads) + Also, increases your reload rate by %d.]]):tformat(inc * 100, reloads) end, } @@ -67,7 +67,7 @@ newTalent { getAttackSpeed = function(self,t) return self:combatTalentLimit(t, 40, 10, 25) end, display_speed = function(self, t) return ("Double Archery (#LIGHT_GREEN#%d%%#LAST# of a turn)"): - format(self:getSpeed('archery') * 50) + tformat(self:getSpeed('archery') * 50) end, action = function(self, t) local targets = self:archeryAcquireTargets(nil, {one_shot=true, add_speed=self.combat_physspeed}) @@ -89,7 +89,7 @@ newTalent { info = function(self, t) return ([[Fire off a quick sling bullet for %d%% damage at double your normal attack speed, as well as increasing your attack speed by %d%% for 5 turns. Each time you move, the cooldown of this talent is reduced by 1.]]) - :format(t.getDamage(self, t) * 100, t.getAttackSpeed(self,t)) + :tformat(t.getDamage(self, t) * 100, t.getAttackSpeed(self,t)) end, } @@ -167,7 +167,7 @@ newTalent { return fired end, info = function(self, t) - return ([[Take aim and unload up to %d shots for %d%% weapon damage each against random enemies inside a cone. Each enemy can only be hit once (twice for talent level 3 and higher). Using Swift Shot lowers the cooldown by 1.]]):format(t.limit_shots(self, t), t.damage_multiplier(self, t) * 100) + return ([[Take aim and unload up to %d shots for %d%% weapon damage each against random enemies inside a cone. Each enemy can only be hit once (twice for talent level 3 and higher). Using Swift Shot lowers the cooldown by 1.]]):tformat(t.limit_shots(self, t), t.damage_multiplier(self, t) * 100) end, } @@ -197,6 +197,6 @@ newTalent { deactivate = function(self, t, p) return true end, info = function(self, t) return ([[Your Shoot talent now costs %d stamina but fires %d times for %d%% damage per shot.]]) - :format(t.shot_stamina(self, t), t.bullet_count(self, t), t.damage_multiplier(self, t) * 100 ) + :tformat(t.shot_stamina(self, t), t.bullet_count(self, t), t.damage_multiplier(self, t) * 100 ) end, } diff --git a/game/modules/tome/data/talents/techniques/sling.lua b/game/modules/tome/data/talents/techniques/sling.lua index d8fcf5c6da9d5d8117586c507729ae5ac7b02744..a013c24a941a4a1eb559badc41b5972e6c18bbcf 100644 --- a/game/modules/tome/data/talents/techniques/sling.lua +++ b/game/modules/tome/data/talents/techniques/sling.lua @@ -36,7 +36,7 @@ newTalent{ local inc = t.getPercentInc(self, t) local reloads = t.ammo_mastery_reload(self, t) return ([[Increases weapon damage by %d%% and physical power by 30 when using slings. - Also, increases your reload rate by %d.]]):format(inc * 100, reloads) + Also, increases your reload rate by %d.]]):tformat(inc * 100, reloads) end, } @@ -57,7 +57,7 @@ newTalent{ if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, t.getBlindDur(self, t), {apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists!", target.name:capitalize()) + game.logSeen(target, "%s resists!", target:getName():capitalize()) end end, action = function(self, t) @@ -71,7 +71,7 @@ newTalent{ info = function(self, t) return ([[You fire a shot into your target's eyes, blinding it for %d turns and doing %d%% damage. The blind chance increases with your Accuracy.]]) - :format(t.getBlindDur(self, t), 100 * self:combatTalentWeaponDamage(t, 1, 1.5)) + :tformat(t.getBlindDur(self, t), 100 * self:combatTalentWeaponDamage(t, 1, 1.5)) end, } @@ -91,9 +91,9 @@ newTalent{ if target:checkHit(self:combatAttack(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then target:knockback(self.x, self.y, 4) target:crossTierEffect(target.EFF_OFFBALANCE, self:combatAttack()) - game.logSeen(target, "%s is knocked back!", target.name:capitalize()) + game.logSeen(target, "%s is knocked back!", target:getName():capitalize()) else - game.logSeen(target, "%s stands firm!", target.name:capitalize()) + game.logSeen(target, "%s stands firm!", target:getName():capitalize()) end end, action = function(self, t) @@ -106,7 +106,7 @@ newTalent{ end, info = function(self, t) return ([[You fire a mighty shot at your target, doing %d%% damage and knocking it back. - The knockback chance increases with your Accuracy.]]):format(100 * self:combatTalentWeaponDamage(t, 1, 1.5)) + The knockback chance increases with your Accuracy.]]):tformat(100 * self:combatTalentWeaponDamage(t, 1, 1.5)) end, } @@ -135,6 +135,6 @@ newTalent{ return true end, info = function(self, t) - return ([[You fire an average of %0.1f shots at your target, doing %d%% damage with each shot.]]):format(t.getShots(self, t, true), 100 * self:combatTalentWeaponDamage(t, 0.3, 0.7)) + return ([[You fire an average of %0.1f shots at your target, doing %d%% damage with each shot.]]):tformat(t.getShots(self, t, true), 100 * self:combatTalentWeaponDamage(t, 0.3, 0.7)) end, } diff --git a/game/modules/tome/data/talents/techniques/sniper.lua b/game/modules/tome/data/talents/techniques/sniper.lua index b0856a1a748b6049df10be386c1fae3d146377fb..257ada624530334a72732837489c7c32adf250b0 100644 --- a/game/modules/tome/data/talents/techniques/sniper.lua +++ b/game/modules/tome/data/talents/techniques/sniper.lua @@ -93,7 +93,7 @@ newTalent{ return ([[Enter a concealed sniping stance, increasing your weapon's attack range and vision range by %d, giving all incoming damage a %d%% chance to miss you, and causing your Headshot, Volley and Called Shots to behave as if the target was marked. Any non-instant, non-movement action will break concealment, but the increased range and vision and damage avoidance will persist for 3 turns, with the damage avoidance decreasing in power by 33%% each turn. This requires a bow to use, and cannot be used if there are foes in sight within range %d.]]): - format(range, avoid, radius) + tformat(range, avoid, radius) end, } @@ -146,7 +146,7 @@ newTalent{ return ([[Fire an arrow tipped with a smoke bomb inflicting %d%% damage and creating a radius %d cloud of thick, disorientating smoke. Those caught within will have their vision range reduced by %d for 5 turns. The distraction caused by this effect reduces the cooldown of your Concealment by %d turns. If the cooldown is reduced to 0, you instantly activate Concealment regardless of whether foes are too close. The chance for the smoke bomb to affect your targets increases with your Accuracy. This requires a bow to use.]]): - format(dam, radius, sight, cooldown) + tformat(dam, radius, sight, cooldown) end, } @@ -194,7 +194,7 @@ newTalent{ return ([[Enter a calm, focused stance, increasing physical power and accuracy by %d, projectile speed by %d%% and the chance to mark targets by an additional %d%%. This makes your shots more effective at range, increasing all damage dealt by %0.1f%% per tile travelled beyond 3, to a maximum of %0.1f%% damage at range 8. The physical power and accuracy increase with your Dexterity. This requires a bow to use.]]): - format(power, speed, mark, dam, dam*5) + tformat(power, speed, mark, dam, dam*5) end, } @@ -228,7 +228,7 @@ newTalent{ return ([[Take aim for 1 turn, preparing a deadly shot. During the next turn, this talent will be replaced with the ability to fire a lethal shot dealing %d%% damage and marking the target. While aiming, your intense focus causes you to shrug off %d%% incoming damage and all negative effects. This requires a bow to use.]]): - format(dam, reduction) + tformat(dam, reduction) end, } @@ -269,6 +269,6 @@ newTalent{ end, info = function(self, t) return ([[Fire a lethal shot. This shot will bypass other enemies between you and your target, and gains 100 increased accuracy.]]): - format(dam, reduction) + tformat(dam, reduction) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/techniques/strength-of-the-berserker.lua b/game/modules/tome/data/talents/techniques/strength-of-the-berserker.lua index 2c80b3559641829a831393dfd1110ae215492780..fed0aedacf17ec8b956e155b994e38f6b2f769de 100644 --- a/game/modules/tome/data/talents/techniques/strength-of-the-berserker.lua +++ b/game/modules/tome/data/talents/techniques/strength-of-the-berserker.lua @@ -22,7 +22,7 @@ newTalent{ type = {"technique/strength-of-the-berserker",1}, require = techs_req1, points = 5, - message = function(self) if self.subtype == "rodent" then return "@Source@ uses Warsqueak." else return "@Source@ uses Warshout." end end , + message = function(self) if self.subtype == "rodent" then return _t"@Source@ uses Warsqueak." else return _t"@Source@ uses Warshout." end end , stamina = 30, cooldown = 18, tactical = { ATTACKAREA = { confusion = 1 }, DISABLE = { confusion = 3 } }, @@ -53,7 +53,7 @@ newTalent{ end, info = function(self, t) return ([[Shout your warcry in a frontal cone of radius %d. Any targets caught inside will be confused (50%% confusion power) for %d turns.]]): - format(self:getTalentRadius(t), t.getDuration(self, t)) + tformat(self:getTalentRadius(t), t.getDuration(self, t)) end, } @@ -139,7 +139,7 @@ newTalent{ Sustaining this rage takes its toll on your body, decreasing your life by 2%% each turn, but for every 1%% of life missing you gain 0.5%% critical hit chance. Even when sustained, this talent is only active when foes are in sight. The Accuracy bonus increases with your Dexterity, and the Physical Power bonus with your Strength.]]): - format( t.getAtk(self, t), t.getDam(self, t), t.getImmune(self, t)*100) + tformat( t.getAtk(self, t), t.getDam(self, t), t.getImmune(self, t)*100) end, } @@ -154,7 +154,7 @@ newTalent{ tactical = { ATTACK = { weapon = 2 }, DISABLE = 2 }, range = 1, is_melee = true, - target = function(self ,t) return {type="hit", range=self:getTalentRange(t)} end, + target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end, on_pre_use = function(self, t, silent) if not self:hasTwoHandedWeapon() then if not silent then game.logPlayer(self, "You require a two handed weapon to use this talent.") end return false end return true end, getShatter = function(self, t) return self:combatTalentLimit(t, 100, 10, 85) end, getDuration = function(self, t) return math.floor(self:combatTalentScale(t, 5, 9)) end, @@ -188,7 +188,7 @@ newTalent{ local eff = rng.tableRemove(effs) if eff[1] == "effect" then - game.logSeen(self, "#CRIMSON#%s shatters %s shield!", self.name:capitalize(), target.name) + game.logSeen(self, "#CRIMSON#%s shatters %s shield!", self:getName():capitalize(), target:getName()) target:removeEffect(eff[2]) end end @@ -201,7 +201,7 @@ newTalent{ return ([[Hits the target with your weapon, doing %d%% damage. If the attack hits, the target's armour and saves are reduced by %d for %d turns. Also if the target is protected by a temporary damage shield there is %d%% chance to shatter it. Armor reduction chance increases with your Physical Power.]]) - :format(100 * self:combatTalentWeaponDamage(t, 0.8, 1.5), t.getArmorReduc(self, t), t.getDuration(self, t), t.getShatter(self, t)) + :tformat(100 * self:combatTalentWeaponDamage(t, 0.8, 1.5), t.getArmorReduc(self, t), t.getDuration(self, t), t.getShatter(self, t)) end, } @@ -235,6 +235,6 @@ newTalent{ For %d turns you gain %d stamina per turn and %d%% movement and attack speed. Only usable at 30%% or lower stamina. Stamina regeneration is based on your Constitution stat.]]): - format(t.getDur(self, t), t.getStamina(self, t), t.getSpeed(self, t)) + tformat(t.getDur(self, t), t.getStamina(self, t), t.getSpeed(self, t)) end, } diff --git a/game/modules/tome/data/talents/techniques/superiority.lua b/game/modules/tome/data/talents/techniques/superiority.lua index d2f58817bf26e78e5a7733dec6620339fc1b5838..84318c48803268025f8a5dbb02d3164a7859e323 100644 --- a/game/modules/tome/data/talents/techniques/superiority.lua +++ b/game/modules/tome/data/talents/techniques/superiority.lua @@ -37,7 +37,7 @@ newTalent{ info = function(self, t) return ([[Concentrate on the battle, ignoring some of the damage you take. Improves physical damage reduction by %d%% and provides a %d%% chance to shrug off critical damage for 20 turns.]]): - format(t.getResist(self,t), t.critResist(self, t)) + tformat(t.getResist(self,t), t.critResist(self, t)) end, } @@ -67,7 +67,7 @@ newTalent{ info = function(self, t) return ([[Take an offensive stance. As you attack your foes, you knock your target and foes adjacent to them in a frontal arc back (up to %d grids). This consumes stamina rapidly (-1 stamina/turn).]]): - format(t.range(self, t)) + tformat(t.range(self, t)) end, } @@ -96,13 +96,13 @@ newTalent{ local tx, ty = util.findFreeGrid(self.x, self.y, 5, true, {[Map.ACTOR]=true}) if tx and ty and target:canBe("teleport") then target:move(tx, ty, true) - game.logSeen(target, "%s is called to battle!", target.name:capitalize()) + game.logSeen(target, "%s is called to battle!", target:getName():capitalize()) end end) return true end, info = function(self, t) - return ([[Call all foes in a radius of %d around you into battle, getting them into melee range in an instant.]]):format(t.radius(self,t)) + return ([[Call all foes in a radius of %d around you into battle, getting them into melee range in an instant.]]):tformat(t.radius(self,t)) end, } @@ -129,6 +129,6 @@ newTalent{ info = function(self, t) return ([[Put all of your strength into your weapon blows, creating shockwaves that deal %d%% Physical weapon damage to all nearby targets. Only one shockwave will be created per action, and the primary target does not take extra damage. Each shattering impact will drain 8 stamina.]]): - format(100*t.weaponDam(self, t)) + tformat(100*t.weaponDam(self, t)) end, } diff --git a/game/modules/tome/data/talents/techniques/techniques.lua b/game/modules/tome/data/talents/techniques/techniques.lua index b7179ef727bdbebf0d4bd2ac9b2e99bbee2c917e..6409af294f510bb35bfc643042b79166fd61bea9 100644 --- a/game/modules/tome/data/talents/techniques/techniques.lua +++ b/game/modules/tome/data/talents/techniques/techniques.lua @@ -18,79 +18,79 @@ -- darkgod@te4.org -- Physical combat -newTalentType{ allow_random=true, type="technique/2hweapon-assault", name = "two-handed assault", description = "Specialized two-handed techniques." } -newTalentType{ allow_random=true, type="technique/strength-of-the-berserker", name = "berserker's strength", description = "Fear nothing!" } -newTalentType{ allow_random=true, type="technique/2hweapon-offense", name = "two-handed weapons", description = "Specialized two-handed techniques." } -newTalentType{ allow_random=true, type="technique/2hweapon-cripple", name = "two-handed maiming", description = "Specialized two-handed techniques." } -newTalentType{ allow_random=true, type="technique/shield-offense", name = "shield offense", speed = "shield", description = "Specialized weapon and shield techniques." } -newTalentType{ allow_random=true, type="technique/shield-defense", name = "shield defense", speed = "shield", description = "Specialized weapon and shield techniques." } -newTalentType{ allow_random=true, type="technique/dualweapon-training", name = "dual weapons", description = "Specialized dual wielding techniques." } -newTalentType{ allow_random=true, type="technique/dualweapon-attack", name = "dual techniques", description = "Specialized dual wielding techniques." } -newTalentType{ allow_random=true, type="technique/archery-base", name = "archery - base", description = "Ability to shoot." } -newTalentType{ allow_random=true, type="technique/archery-bow", name = "archery - bows", description = "Specialized bow techniques." } -newTalentType{ allow_random=true, type="technique/archery-sling", name = "archery - slings", description = "Specialized sling techniques." } -newTalentType{ allow_random=true, type="technique/archery-training", name = "archery training", description = "Generic archery techniques." } -newTalentType{ allow_random=true, type="technique/archery-utility", name = "archery prowess", description = "Specialized archery techniques to maim your targets." } -newTalentType{ allow_random=true, type="technique/archery-excellence", name = "archery excellence", min_lev = 10, description = "Specialized archery techniques that result from honed training." } -newTalentType{ allow_random=true, type="technique/superiority", name = "superiority", min_lev = 10, description = "Advanced combat techniques." } -newTalentType{ allow_random=true, type="technique/battle-tactics", name = "battle tactics", min_lev = 10, description = "Advanced combat tactics." } -newTalentType{ allow_random=true, type="technique/warcries", name = "warcries", no_silence = true, min_lev = 10, description = "Master the warcries to improve yourself and weaken others." } -newTalentType{ allow_random=true, type="technique/bloodthirst", name = "bloodthirst", min_lev = 10, description = "Delight in the act of battle and the spilling of blood." } -newTalentType{ allow_random=true, type="technique/field-control", name = "field control", generic = true, description = "Control the battlefield using various techniques." } -newTalentType{ allow_random=true, type="technique/combat-techniques-active", name = "combat techniques", description = "Generic combat oriented techniques." } -newTalentType{ allow_random=true, type="technique/combat-techniques-passive", name = "combat veteran", description = "Generic combat oriented techniques." } -newTalentType{ allow_random=true, type="technique/combat-training", name = "combat training", generic = true, description = "Teaches to use various armours, weapons and improves health." } -newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="technique/magical-combat", name = "magical combat", description = "The blending together of magic and melee prowess." } -newTalentType{ allow_random=true, type="technique/mobility", name = "mobility", generic = true, description = "Training and techniques to improve mobility and evade your enemies. On the battlefield, positioning is paramount." } -newTalentType{ allow_random=true, type="technique/thuggery", name = "thuggery", generic = true, description = "Whatever wins the day, wins the day." } -newTalentType{ allow_random=true, type="technique/assassination", name = "assassination", min_lev=10, description = "Bring death from the shadows." } -newTalentType{ allow_random=true, type="technique/throwing-knives", name = "throwing knives", description = "Master the art of throwing knives to fight from a distance." } -newTalentType{ allow_random=true, type="technique/duelist", name = "duelist", description = "Use your dual weapons to parry and counter." } -newTalentType{ allow_random=true, type="technique/marksmanship", name = "marksmanship", description = "Training in the use of bows and slings." } -newTalentType{ allow_random=true, type="technique/reflexes", name = "reflexes", description = "Use your reflexes to evade and counter." } -newTalentType{ allow_random=true, type="technique/munitions", min_lev = 10, name = "munitions", description = "Equip specialised ammunition." } -newTalentType{ allow_random=true, type="technique/agility", min_lev = 10, name = "agility", description = "Take advantage of speed and shield to fight in close quarters." } -newTalentType{ allow_random=true, type="technique/sniper", min_lev = 10, name = "sniper", description = "Stealth and specialised long range archery techniques." } +newTalentType{ allow_random=true, type="technique/2hweapon-assault", name = _t"two-handed assault", description = _t"Specialized two-handed techniques." } +newTalentType{ allow_random=true, type="technique/strength-of-the-berserker", name = _t"berserker's strength", description = _t"Fear nothing!" } +newTalentType{ allow_random=true, type="technique/2hweapon-offense", name = _t"two-handed weapons", description = _t"Specialized two-handed techniques." } +newTalentType{ allow_random=true, type="technique/2hweapon-cripple", name = _t"two-handed maiming", description = _t"Specialized two-handed techniques." } +newTalentType{ allow_random=true, type="technique/shield-offense", name = _t"shield offense", speed = "shield", description = _t"Specialized weapon and shield techniques." } +newTalentType{ allow_random=true, type="technique/shield-defense", name = _t"shield defense", speed = "shield", description = _t"Specialized weapon and shield techniques." } +newTalentType{ allow_random=true, type="technique/dualweapon-training", name = _t"dual weapons", description = _t"Specialized dual wielding techniques." } +newTalentType{ allow_random=true, type="technique/dualweapon-attack", name = _t"dual techniques", description = _t"Specialized dual wielding techniques." } +newTalentType{ allow_random=true, type="technique/archery-base", name = _t"archery - base", description = _t"Ability to shoot." } +newTalentType{ allow_random=true, type="technique/archery-bow", name = _t"archery - bows", description = _t"Specialized bow techniques." } +newTalentType{ allow_random=true, type="technique/archery-sling", name = _t"archery - slings", description = _t"Specialized sling techniques." } +newTalentType{ allow_random=true, type="technique/archery-training", name = _t"archery training", description = _t"Generic archery techniques." } +newTalentType{ allow_random=true, type="technique/archery-utility", name = _t"archery prowess", description = _t"Specialized archery techniques to maim your targets." } +newTalentType{ allow_random=true, type="technique/archery-excellence", name = _t"archery excellence", min_lev = 10, description = _t"Specialized archery techniques that result from honed training." } +newTalentType{ allow_random=true, type="technique/superiority", name = _t"superiority", min_lev = 10, description = _t"Advanced combat techniques." } +newTalentType{ allow_random=true, type="technique/battle-tactics", name = _t"battle tactics", min_lev = 10, description = _t"Advanced combat tactics." } +newTalentType{ allow_random=true, type="technique/warcries", name = _t"warcries", no_silence = true, min_lev = 10, description = _t"Master the warcries to improve yourself and weaken others." } +newTalentType{ allow_random=true, type="technique/bloodthirst", name = _t"bloodthirst", min_lev = 10, description = _t"Delight in the act of battle and the spilling of blood." } +newTalentType{ allow_random=true, type="technique/field-control", name = _t"field control", generic = true, description = _t"Control the battlefield using various techniques." } +newTalentType{ allow_random=true, type="technique/combat-techniques-active", name = _t"combat techniques", description = _t"Generic combat oriented techniques." } +newTalentType{ allow_random=true, type="technique/combat-techniques-passive", name = _t"combat veteran", description = _t"Generic combat oriented techniques." } +newTalentType{ allow_random=true, type="technique/combat-training", name = _t"combat training", generic = true, description = _t"Teaches to use various armours, weapons and improves health." } +newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="technique/magical-combat", name = _t"magical combat", description = _t"The blending together of magic and melee prowess." } +newTalentType{ allow_random=true, type="technique/mobility", name = _t"mobility", generic = true, description = _t"Training and techniques to improve mobility and evade your enemies. On the battlefield, positioning is paramount." } +newTalentType{ allow_random=true, type="technique/thuggery", name = _t"thuggery", generic = true, description = _t"Whatever wins the day, wins the day." } +newTalentType{ allow_random=true, type="technique/assassination", name = _t"assassination", min_lev=10, description = _t"Bring death from the shadows." } +newTalentType{ allow_random=true, type="technique/throwing-knives", name = _t"throwing knives", description = _t"Master the art of throwing knives to fight from a distance." } +newTalentType{ allow_random=true, type="technique/duelist", name = _t"duelist", description = _t"Use your dual weapons to parry and counter." } +newTalentType{ allow_random=true, type="technique/marksmanship", name = _t"marksmanship", description = _t"Training in the use of bows and slings." } +newTalentType{ allow_random=true, type="technique/reflexes", name = _t"reflexes", description = _t"Use your reflexes to evade and counter." } +newTalentType{ allow_random=true, type="technique/munitions", min_lev = 10, name = _t"munitions", description = _t"Equip specialised ammunition." } +newTalentType{ allow_random=true, type="technique/agility", min_lev = 10, name = _t"agility", description = _t"Take advantage of speed and shield to fight in close quarters." } +newTalentType{ allow_random=true, type="technique/sniper", min_lev = 10, name = _t"sniper", description = _t"Stealth and specialised long range archery techniques." } -- Skirmisher newTalentType { type = "technique/acrobatics", - name = "Acrobatics", + name = _t"Acrobatics", generic = true, allow_random = true, - description = "For light footed Rogues who prefer flight to fighting fair!", + description = _t"For light footed Rogues who prefer flight to fighting fair!", } newTalentType { type = "technique/buckler-training", - name = "Buckler Training", + name = _t"Buckler Training", allow_random = true, - description = "Mastery over their shields separates Skirmishers from Archers, and gives them an edge.", + description = _t"Mastery over their shields separates Skirmishers from Archers, and gives them an edge.", } newTalentType { type = "technique/skirmisher-slings", - name = "Skirmisher - Slings", + name = _t"Skirmisher - Slings", allow_random = true, - description = "Slings! Pow Pow!", + description = _t"Slings! Pow Pow!", } newTalentType { type = "technique/tireless-combatant", - name = "Tireless Combatant", + name = _t"Tireless Combatant", allow_random = true, - description = "Your will carries you through the most difficult struggles, allowing you to fight on when others would have collapsed from exhaustion.", + description = _t"Your will carries you through the most difficult struggles, allowing you to fight on when others would have collapsed from exhaustion.", } -- Unarmed Combat -newTalentType{ is_unarmed=true, allow_random=true, type="technique/pugilism", name = "pugilism", description = "Unarmed Boxing techniques that may not be practiced in massive armor or while a weapon or shield is equipped." } -newTalentType{ is_unarmed=true, allow_random=true, type="technique/finishing-moves", name = "finishing moves", description = "Finishing moves that use combo points and may not be practiced in massive armor or while a weapon or shield is equipped." } -newTalentType{ is_unarmed=true, allow_random=true, type="technique/grappling", name = "grappling", description = "Grappling techniques that may not be practiced in massive armor or while a weapon or shield is equipped." } -newTalentType{ is_unarmed=true, allow_random=true, type="technique/unarmed-discipline", name = "unarmed discipline", description = "Advanced unarmed techniques including kicks and blocks that may not be practiced in massive armor or while a weapon or shield is equipped." } -newTalentType{ is_unarmed=true, allow_random=true, generic = true, type="technique/unarmed-training", name = "unarmed training", description = "Teaches various martial arts techniques that may not be practiced in massive armor or while a weapon or shield is equipped." } -newTalentType{ allow_random=true, type="technique/conditioning", name = "conditioning", generic = true, description = "Physical conditioning." } +newTalentType{ is_unarmed=true, allow_random=true, type="technique/pugilism", name = _t"pugilism", description = _t"Unarmed Boxing techniques that may not be practiced in massive armor or while a weapon or shield is equipped." } +newTalentType{ is_unarmed=true, allow_random=true, type="technique/finishing-moves", name = _t"finishing moves", description = _t"Finishing moves that use combo points and may not be practiced in massive armor or while a weapon or shield is equipped." } +newTalentType{ is_unarmed=true, allow_random=true, type="technique/grappling", name = _t"grappling", description = _t"Grappling techniques that may not be practiced in massive armor or while a weapon or shield is equipped." } +newTalentType{ is_unarmed=true, allow_random=true, type="technique/unarmed-discipline", name = _t"unarmed discipline", description = _t"Advanced unarmed techniques including kicks and blocks that may not be practiced in massive armor or while a weapon or shield is equipped." } +newTalentType{ is_unarmed=true, allow_random=true, generic = true, type="technique/unarmed-training", name = _t"unarmed training", description = _t"Teaches various martial arts techniques that may not be practiced in massive armor or while a weapon or shield is equipped." } +newTalentType{ allow_random=true, type="technique/conditioning", name = _t"conditioning", generic = true, description = _t"Physical conditioning." } -newTalentType{ is_unarmed=true, type="technique/unarmed-other", name = "unarmed other", generic = true, description = "Base martial arts attack and stances." } +newTalentType{ is_unarmed=true, type="technique/unarmed-other", name = _t"unarmed other", generic = true, description = _t"Base martial arts attack and stances." } @@ -326,13 +326,13 @@ archeryWeaponCheck = function(self, weapon, ammo, silent, weapon_type) if not silent then -- ammo contains error message game.logPlayer(self, ({ - ["disarmed"] = "You are currently disarmed and cannot use this talent.", - ["no shooter"] = ("You require a %s to use this talent."):format(weapon_type or "missile launcher"), - ["no ammo"] = "You require ammo to use this talent.", - ["bad ammo"] = "Your ammo cannot be used.", - ["incompatible ammo"] = "Your ammo is incompatible with your missile launcher.", - ["incompatible missile launcher"] = ("You require a %s to use this talent."):format(weapon_type or "bow"), - })[ammo] or "You require a missile launcher and ammo for this talent.") + ["disarmed"] = _t"You are currently disarmed and cannot use this talent.", + ["no shooter"] = ("You require a %s to use this talent."):tformat(weapon_type or _t"missile launcher"), + ["no ammo"] = _t"You require ammo to use this talent.", + ["bad ammo"] = _t"Your ammo cannot be used.", + ["incompatible ammo"] = _t"Your ammo is incompatible with your missile launcher.", + ["incompatible missile launcher"] = ("You require a %s to use this talent."):tformat(weapon_type or _t"bow"), + })[ammo] or _t"You require a missile launcher and ammo for this talent.") end return false else diff --git a/game/modules/tome/data/talents/techniques/throwing-knives.lua b/game/modules/tome/data/talents/techniques/throwing-knives.lua index 8d08f34dc3b993c9c304739452da47ca2213c65c..8d711c8fe126061e0b173a1854a2820077e19dfb 100644 --- a/game/modules/tome/data/talents/techniques/throwing-knives.lua +++ b/game/modules/tome/data/talents/techniques/throwing-knives.lua @@ -162,7 +162,7 @@ newTalent{ local _ _, x, y = self:canProject(tg, x, y) local proj = throw(self, tg.range, 1, x, y, nil, nil, nil) - proj.name = "Throwing Knife" + proj.name = _t"Throwing Knife" return true end, @@ -178,15 +178,11 @@ newTalent{ if self:knowTalent(self.T_PRECISE_AIM) then crit_mult = crit_mult + self:callTalent(self.T_PRECISE_AIM, "getCritPower") end local stat_desc = {} - for stat, i in pairs(combat.dammod or {}) do - local name = engine.interface.ActorStats.stats_def[stat].short_name:capitalize() - if self:knowTalent(self.T_STRENGTH_OF_PURPOSE) then - if name == "Str" then name = "Mag" end - end - if talented == "knife" and self:knowTalent(self.T_LETHALITY) then - if name == "Str" then name = "Cun" end - end - stat_desc[#stat_desc+1] = ("%d%% %s"):format(i * 100, name) + -- I18N Stats using display_short_name + local dammod = self:getDammod(combat.dammod or {}) + for stat, i in pairs(dammod) do + local name = engine.interface.ActorStats.stats_def[stat].display_short_name:capitalize() + stat_desc[#stat_desc+1] = ("%d%% %s"):tformat(i * 100, name) end stat_desc = table.concat(stat_desc, ", ") return ([[Range: %d @@ -196,7 +192,7 @@ APR: %d Crit Chance: %+d%% Crit mult: %d%% Uses Stats: %s -]]):format(t.range(self, t), dmg, dmg*damrange, atk, talented, apr, crit, crit_mult, stat_desc) +]]):tformat(t.range(self, t), dmg, dmg*damrange, atk, _t(talented), apr, crit, crit_mult, stat_desc) end, info = function(self, t) local nb = t.getNb(self,t) @@ -212,7 +208,7 @@ Uses Stats: %s Throwing Knives count as melee attacks for the purpose of on-hit effects. Effective Throwing Knife Stats: -%s]]):format(nb, reload, t.knivesInfo(self, t)) +%s]]):tformat(nb, reload, t.knivesInfo(self, t)) end, } @@ -258,7 +254,7 @@ newTalent{ local tgt, id = rng.table(tgts) if tgt then local proj = throw(self, self:getTalentRadius(t), t.getDamage(self,t), tgt.act.x, tgt.act.y, nil, nil, 1) - proj.name = "Fan of Knives" + proj.name = _t"Fan of Knives" tgt.cnt = tgt.cnt + 1 print(("Fan of Knives #%d: target:%s (%s, %s) = %d"):format(count, tgt.act.name, tgt.act.x, tgt.act.y, tgt.cnt)) count = count - 1 @@ -273,7 +269,7 @@ newTalent{ info = function(self, t) return ([[You keep a special stash of %d throwing knives in your bandolier, which you can throw all at once at enemies within a radius %d cone, for %d%% damage each. Each target can be hit up to 5 times, if the number of knives exceeds the number of enemies. Creatures block knives from hitting targets behind them.]]): - format(t.getNb(self,t), self:getTalentRadius(t), t.getDamage(self, t)*100) + tformat(t.getNb(self,t), self:getTalentRadius(t), t.getDamage(self, t)*100) end, } @@ -293,7 +289,7 @@ newTalent{ local chance = t.getChance(self,t) return ([[You are able to target your throwing knives with pinpoint accuracy, increasing their critical strike chance by %d%% and critical strike damage by %d%%. In addition, your critical strikes with throwing knives have a %d%% chance to randomly disable your target, possibly disarming, silencing or pinning them for 2 turns.]]) - :format(crit, power, chance) + :tformat(crit, power, chance) end, } @@ -336,7 +332,7 @@ newTalent{ if #tgts <= 0 then return nil end local a, id = rng.table(tgts) local proj = throw(self, self:getTalentRange(t), 1, a.x, a.y, nil, nil, nil) - proj.name = "Quickdraw Knife" + proj.name = _t"Quickdraw Knife" self.turn_procs.quickdraw = true end, info = function(self, t) @@ -344,7 +340,7 @@ newTalent{ local chance = t.getChance(self, t) return ([[You can throw knives with lightning speed, increasing your attack speed with them by %d%% and giving you a %d%% chance when striking a target in melee to throw a knife at a random foe within 7 tiles for 100%% damage. This bonus attack can only trigger once per turn, and does not trigger from throwing knife attacks.]]): - format(speed, chance) + tformat(speed, chance) end, } @@ -381,7 +377,7 @@ newTalent{ local dam = t2.getDamage(self,t2) local proj = throw(self, self:getTalentRange(t), dam, x, y, DamageType.NATURE, 1, nil) - proj.name = "Venomous Throw" + proj.name = _t"Venomous Throw" self.talents_cd[self.T_VENOMOUS_STRIKE] = 8 return true @@ -394,6 +390,6 @@ newTalent{ %s Using this talent puts your Venomous Strike talent on cooldown.]]): - format(dam, desc) + tformat(dam, desc) end, } \ No newline at end of file diff --git a/game/modules/tome/data/talents/techniques/thuggery.lua b/game/modules/tome/data/talents/techniques/thuggery.lua index 314a375358f8aa168beb0b3d66f3f59b8802f3e1..3597d3165373ac26ff6c4895f32a85e2ec34960e 100644 --- a/game/modules/tome/data/talents/techniques/thuggery.lua +++ b/game/modules/tome/data/talents/techniques/thuggery.lua @@ -44,7 +44,7 @@ newTalent{ local talented_mod = math.sqrt((self:getTalentLevel(t) + (o and o.material_level or 1)) / 10) + 1 local power = math.max(self.combat_dam + add, 1) power = (math.sqrt(power / 10) - 1) * 0.8 + 1 --- print(("[COMBAT HEAD DAMAGE] power(%f) totstat(%f) talent_mod(%f)"):format(power, totstat, talented_mod)) +-- print(("[COMBAT HEAD DAMAGE] power(%f) totstat(%f) talent_mod(%f)"):tformat(power, totstat, talented_mod)) return self:rescaleDamage(totstat / 1.5 * power * talented_mod) end, action = function(self, t) @@ -60,7 +60,7 @@ newTalent{ if target:canBe("confusion") then target:setEffect(target.EFF_CONFUSED, t.getDuration(self, t), {power=t.getConfusion(self, t), apply_power=self:combatAttack()}) else - game.logSeen(target, "%s resists the headblow!", target.name:capitalize()) + game.logSeen(target, "%s resists the headblow!", target:getName():capitalize()) end if target:attr("dead") then world:gainAchievement("HEADBANG", self, target) @@ -75,7 +75,7 @@ newTalent{ If the attack hits, the target is confused (%d%% effect) for %d turns. Damage done increases with the quality of your headgear, your Strength, and your physical damage bonuses. Confusion power increases with your Dexterity, and chance increases with Accuracy.]]): - format(dam, t.getConfusion(self, t), duration) + tformat(dam, t.getConfusion(self, t), duration) end, } @@ -93,7 +93,7 @@ newTalent{ end, info = function(self, t) return ([[Your attunement to violence has given you %d%% resistance to stuns and confusion arising in battle.]]): - format(t.getImmune(self, t)*100) + tformat(t.getImmune(self, t)*100) end, } newTalent{ @@ -110,7 +110,7 @@ newTalent{ end, info = function(self, t) return ([[You know how to hit the right places, gaining +%d%% critical damage modifier and %d armour penetration.]]): - format(t.critpower(self, t), t.getAPR(self, t)) + tformat(t.critpower(self, t), t.getAPR(self, t)) end, } @@ -162,6 +162,6 @@ newTalent{ You gain +%d%% attack speed, +%d%% critical chance and +%d%% physical resistance penetration, but this talent drains 6 stamina each turn. This effect is disabled automatically on rest or run. ]]): - format(t.getSpeed(self,t)*100, t.getCrit(self, t), t.getPen(self, t)) + tformat(t.getSpeed(self,t)*100, t.getCrit(self, t), t.getPen(self, t)) end, } diff --git a/game/modules/tome/data/talents/techniques/tireless-combatant.lua b/game/modules/tome/data/talents/techniques/tireless-combatant.lua index f9d1e98262996d71dffe0372c64ed2357be877d6..bec5b29cf122a904fdbdfd2e79a1d140ffa319d1 100644 --- a/game/modules/tome/data/talents/techniques/tireless-combatant.lua +++ b/game/modules/tome/data/talents/techniques/tireless-combatant.lua @@ -68,7 +68,7 @@ newTalent { info = function(self, t) local stamina = t.getRestoreRate(self, t) return ([[Any time you do not have an opponent in a square adjacent to you, you gain %0.1f Stamina regeneration. With the third talent point, you also gain an equal amount of life regen when Breathing Room is active.]]) - :format(stamina) + :tformat(stamina) end, } @@ -105,7 +105,7 @@ newTalent { local slow = t.getSlow(self, t) * 100 local reduction = t.getReduction(self, t) return ([[Control your movements to conserve your energy. While this talent is activated, you are globally slowed by %0.1f%%, and your fatigue is decreased by %d%% (to a minimum of 0%%).]]) - :format(slow, reduction) + :tformat(slow, reduction) end, } @@ -163,7 +163,7 @@ newTalent { local stamina = t.getStaminaRate(self, t) local health = t.getLifeRate(self, t) return ([[When the going gets tough, you get tougher. You gain %0.1f Stamina regen per enemy in sight, and beginning with the third talent point, you also gain %0.1f life regen per enemy. The bonuses cap at 4 enemies.]]) - :format(stamina, health) + :tformat(stamina, health) end, } @@ -215,6 +215,6 @@ newTalent { local mult = (t.getMult(self, t, true) - 1) * 100 return ([[For each turn you spend stamina, you gain %0.1f%% resist all and %0.1f%% all resistances cap for %d turns. The buff stacks up to %d times, and each new application refreshes the duration. Additionally, at the fifth talent point, Breathing Room and Dauntless Challenger are %d%% more effective.]]) - :format(resist, cap, duration, max, mult) + :tformat(resist, cap, duration, max, mult) end, } diff --git a/game/modules/tome/data/talents/techniques/unarmed-discipline.lua b/game/modules/tome/data/talents/techniques/unarmed-discipline.lua index 78cf55307365911d26ba4345e01ed7e29d2f5c46..bd496bed43d4ea59394e2e0023941bc6aeb2afba 100644 --- a/game/modules/tome/data/talents/techniques/unarmed-discipline.lua +++ b/game/modules/tome/data/talents/techniques/unarmed-discipline.lua @@ -28,7 +28,7 @@ newTalent{ random_ego = "attack", cooldown = 20, stamina = 40, - message = "@Source@ unleashes a flurry of disrupting kicks.", + message = _t"@Source@ unleashes a flurry of disrupting kicks.", tactical = { ATTACK = { weapon = 2 }, }, is_melee = true, range = 1, @@ -103,7 +103,7 @@ newTalent{ At talent level 3 #DARK_ORCHID#Magical#LAST# sustains will also be effected. At talent level 5 #YELLOW#Mental#LAST# sustains will also be effected. Using this talent removes your combo points.]]) - :format(damage) + :tformat(damage) end, } @@ -119,7 +119,7 @@ newTalent{ local stamina = t.getStamina(self, t) local chance = t.getChance(self, t) return ([[When gaining a combo point, you have a %d%% chance to gain an extra combo point. Additionally, every time you earn a combo point, you will regain %0.2f stamina, or %0.2f stamina if you would exceed 5 combo points.]]) - :format(chance, stamina, stamina*2) + :tformat(chance, stamina, stamina*2) end, } @@ -132,7 +132,7 @@ newTalent{ random_ego = "attack", cooldown = 6, stamina = 5, - message = "@Source@ prepares to block incoming attacks.", + message = _t"@Source@ prepares to block incoming attacks.", tactical = { ATTACK = 3, DEFEND = 3 }, requires_target = true, getBlock = function(self, t) return self:combatTalentPhysicalDamage(t, 30, 200) end, @@ -151,7 +151,7 @@ newTalent{ Current block value: %d Using this talent removes your combo points. The damage absorbed scales with your Physical Power.]]) - :format(block, block * 5, block * self:getCombo()) + :tformat(block, block * 5, block * self:getCombo()) end, } @@ -167,7 +167,7 @@ newTalent{ is_melee = true, target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end, range = 1, - message = "@Source@ strikes a deadly pressure point on the target.", + message = _t"@Source@ strikes a deadly pressure point on the target.", tactical = { DISABLE = 3, ATTACK = { weapon = 3 } }, requires_target = true, radius = function(self,t) return self:combatTalentScale(t, 1, 3) end, @@ -214,7 +214,7 @@ newTalent{ return ([[Using your deep knowledge of anatomy, you strike a target in a vital pressure point for %d%% weapon damage, bypassing their defense and evasion. This strike inflicts terrible wounds inside the target's body, causing them to take physical damage equal to 100%% of any damage dealt during the attack each turn for 4 turns, increasing by %d%% each turn (so after 4 turns, they would have taken a total of %d%% damage). If the target dies while under or from this effect their body will explode in a radius %d shower of bone and gore, inflicting physical damage equal to the current tick to all enemies and granting you 4 combo points.]]) - :format(damage, mult, finaldam, radius, life) + :tformat(damage, mult, finaldam, radius, life) end, } diff --git a/game/modules/tome/data/talents/techniques/unarmed-training.lua b/game/modules/tome/data/talents/techniques/unarmed-training.lua index d54419792fa55587e792d8a1de999aae63698795..8a97a71ec67eda7b7e88092b3fb8ddd2f43fc82f 100644 --- a/game/modules/tome/data/talents/techniques/unarmed-training.lua +++ b/game/modules/tome/data/talents/techniques/unarmed-training.lua @@ -49,7 +49,7 @@ newTalent{ local damage = t.getDamage(self, t) return ([[Grants %d Physical Power when fighting unarmed (or with gloves or gauntlets). This talent's effects will scale with your level.]]): - format(damage) + tformat(damage) end, } @@ -66,7 +66,7 @@ newTalent{ local inc = t.getPercentInc(self, t) return ([[Increases all unarmed damage by %d%% and physical power by 30 (including grapples and kicks). Note that brawlers naturally gain 0.5 Physical Power per character level while unarmed (current brawler physical power bonus: %0.1f) and attack 20%% faster while unarmed.]]): - format(100*inc, self.level * 0.5) + tformat(100*inc, self.level * 0.5) end, } @@ -88,7 +88,7 @@ newTalent{ end end, info = function(self, t) - return ([[Your mastery of unarmed combat unifies your body. Increases your Strength by %d based on Cunning and your Constitution by %d based on Dexterity.]]):format(t.getStr(self, t), t.getCon(self, t)) + return ([[Your mastery of unarmed combat unifies your body. Increases your Strength by %d based on Cunning and your Constitution by %d based on Dexterity.]]):tformat(t.getStr(self, t), t.getCon(self, t)) end } @@ -105,7 +105,7 @@ newTalent{ info = function(self, t) local power = t.getPower(self, t) return ([[When you're targeted by a projectile, your global speed is increased by %d%% for 1 turn. Taking any action other than movement will break the effect.]]): - format(power * 100) + tformat(power * 100) end, } @@ -122,7 +122,7 @@ newTalent{ end, info = function(self, t) return ([[Your understanding of physiology allows you to apply your reflexes in new ways, increasing the flat damage reduction granted by Striking Stance by %d%% and causing direct critical hits (physical, mental, spells) against you to have a %d%% lower Critical multiplier (but always do at least normal damage).]]): - format(t.getFlatReduction(self,t), t.critResist(self,t) ) + tformat(t.getFlatReduction(self,t), t.critResist(self,t) ) end } diff --git a/game/modules/tome/data/talents/techniques/warcries.lua b/game/modules/tome/data/talents/techniques/warcries.lua index f05f4a64b2acae117cbc04f999de3631a8968f67..0296a9f48f9190ea184253eb51814430152c4016 100644 --- a/game/modules/tome/data/talents/techniques/warcries.lua +++ b/game/modules/tome/data/talents/techniques/warcries.lua @@ -55,7 +55,7 @@ newTalent{ return ([[Release a powerful shout, doing %0.2f physical damage in a radius %d cone in front of you. At level 5 the shout is so strong it shatters all incomming projectiles caught inside. The damage increases with your Strength.]]) - :format(damDesc(self, DamageType.PHYSICAL, t.getDamage(self,t)), t.radius(self,t)) + :tformat(damDesc(self, DamageType.PHYSICAL, t.getdamage(self,t)), t.radius(self,t)) end, } @@ -74,7 +74,7 @@ newTalent{ end, info = function(self, t) return ([[Take a deep breath to recover %d stamina. The stamina recovery improves with your Strength and Willpower.]]): - format(t.getStamina(self, t)) + tformat(t.getStamina(self, t)) end, } @@ -95,7 +95,7 @@ newTalent{ info = function(self, t) return ([[Boost your life and stamina by %0.1f%% for %d turns by bellowing your battle shout. When the effect ends, the additional life and stamina will be lost.]]): - format(t.getPower(self, t), t.getdur(self, t)) + tformat(t.getPower(self, t), t.getdur(self, t)) end, } @@ -129,6 +129,6 @@ newTalent{ return ([[Your battle cry shatters the will of your foes within a radius of %d, lowering their Defense by %d for 7 turns, making them easier to hit. All evasion and concealment bonuses are also disabled. The chance to hit increases with your Physical Power.]]): - format(self:getTalentRadius(t), 7 * self:getTalentLevel(t)) + tformat(self:getTalentRadius(t), 7 * self:getTalentLevel(t)) end, } diff --git a/game/modules/tome/data/talents/techniques/weaponshield.lua b/game/modules/tome/data/talents/techniques/weaponshield.lua index c6c2ef93f7c6b486ecdd5bc7aabef70a90e27de1..668027b02b8d0aa448a52c42397545e09f445253 100644 --- a/game/modules/tome/data/talents/techniques/weaponshield.lua +++ b/game/modules/tome/data/talents/techniques/weaponshield.lua @@ -55,7 +55,7 @@ newTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, t.getStunDuration(self, t), {apply_power=self:combatAttackStr()}) else - game.logSeen(target, "%s resists the shield bash!", target.name:capitalize()) + game.logSeen(target, "%s resists the shield bash!", target:getName():capitalize()) end end @@ -64,7 +64,7 @@ newTalent{ info = function(self, t) return ([[Hits the target with two shield strikes, doing %d%% and %d%% shield damage. If it hits a second time, it stuns the target for %d turns. The stun chance increases with your Accuracy and your Strength.]]) - :format(100 * self:combatTalentWeaponDamage(t, 1, 1.7, self:getTalentLevel(self.T_SHIELD_EXPERTISE)), + :tformat(100 * self:combatTalentWeaponDamage(t, 1, 1.7, self:getTalentLevel(self.T_SHIELD_EXPERTISE)), 100 * self:combatTalentWeaponDamage(t, 1.2, 2.1, self:getTalentLevel(self.T_SHIELD_EXPERTISE)), t.getStunDuration(self, t)) end, @@ -89,9 +89,9 @@ newTalent{ local inc = t.getDurInc(self, t) return ([[Improves your ability to perform counterstrikes after blocks in the following ways: Allows counterstrikes after incomplete blocks. - Increases the duration of the counterstrike debuff on attackers by %d turn%s. + Increases the duration of the counterstrike debuff on attackers by %d %s. Increases the number of counterstrikes you can perform on a target while they're vulnerable by %d. - Increases the crit chance of counterstrikes by %d%%. This increase scales with your Dexterity.]]):format(inc, (inc > 1 and "s" or ""), inc, t.getCritInc(self, t)) + Increases the crit chance of counterstrikes by %d%%. This increase scales with your Dexterity.]]):tformat(inc, (inc > 1 and _t"turns" or _t"turn"), inc, t.getCritInc(self, t)) end, } @@ -134,7 +134,7 @@ newTalent{ info = function(self, t) local damage = t.getShieldDamage(self, t)*100 return ([[Hit your target with your shield 3 times for %d%% damage then quickly return to a blocking position. The bonus block will not check or trigger Block cooldown.]]) - :format(damage) + :tformat(damage) end, } @@ -180,7 +180,7 @@ newTalent{ end, info = function(self, t) return ([[Hits the target with your shield, doing %d%% damage. If it hits, you follow up with two automatic critical hits with your weapon, doing %d%% base damage each.]]): - format(100 * self:combatTalentWeaponDamage(t, 0.8, 1.3, self:getTalentLevel(self.T_SHIELD_EXPERTISE)), 100 * self:combatTalentWeaponDamage(t, 0.8, 1.3)) + tformat(100 * self:combatTalentWeaponDamage(t, 0.8, 1.3, self:getTalentLevel(self.T_SHIELD_EXPERTISE)), 100 * self:combatTalentWeaponDamage(t, 0.8, 1.3)) end, } @@ -233,7 +233,7 @@ newTalent{ Increases Armour by %d, Block value by %d, and reduces Block cooldown by 2. Increases stun and knockback resistance by %d%%. The Armor and Block bonuses increase equally with your Dexterity and Strength.]]): - format(t.getArmor(self, t), t.getBlock(self, t), 100*t.stunKBresist(self, t)) + tformat(t.getArmor(self, t), t.getBlock(self, t), 100*t.stunKBresist(self, t)) end, } @@ -274,7 +274,7 @@ newTalent{ target:knockback(self.x, self.y, t.getDist(self, t)) if target:canBe("stun") then target:setEffect(target.EFF_DAZED, t.getDuration(self, t), {}) end else - game.logSeen(target, "%s resists the knockback!", target.name:capitalize()) + game.logSeen(target, "%s resists the knockback!", target:getName():capitalize()) end end end) @@ -285,7 +285,7 @@ newTalent{ return ([[Smash your shield into the face of all adjacent foes dealing %d%% shield damage and knocking them back %d grids. In addition, all creatures knocked back will also be dazed for %d turns. If known, activating this talent will refresh your Rush cooldown if the attack hits. - The distance increases with your talent level, and the Daze duration with your Strength.]]):format(t.getShieldDamage(self, t)*100, t.getDist(self, t), t.getDuration(self, t)) + The distance increases with your talent level, and the Daze duration with your Strength.]]):tformat(t.getShieldDamage(self, t)*100, t.getDist(self, t), t.getDuration(self, t)) end, } @@ -302,7 +302,7 @@ newTalent{ self:talentTemporaryValue(p, "combat_spellresist", t.getSpell(self, t)) end, info = function(self, t) - return ([[Improves your damage with shield-based skills, and increases your Spell (+%d) and Physical (+%d) Saves.]]):format(t.getSpell(self, t), t.getPhysical(self, t)) + return ([[Improves your damage with shield-based skills, and increases your Spell (+%d) and Physical (+%d) Saves.]]):tformat(t.getSpell(self, t), t.getPhysical(self, t)) end, } @@ -363,6 +363,6 @@ newTalent{ Your stand lets you concentrate on every blow, allowing you to avoid death from normally fatal wounds. You can only die when reaching -%d life. If your life is below 0 when Last Stand ends it will be set to 1. The increase in Defense and Armor is based on your Dexterity, and the increase in life is based on your Constitution and normal maximum life.]]): - format(t.getDefense(self, t), hp, hp) + tformat(t.getDefense(self, t), hp, hp) end, } diff --git a/game/modules/tome/data/talents/uber/const.lua b/game/modules/tome/data/talents/uber/const.lua index 85493aa03149a635d1e5992fea3ca768fd4745d3..3ce4e782f7b595b75b55060c820d095b336048ed 100644 --- a/game/modules/tome/data/talents/uber/const.lua +++ b/game/modules/tome/data/talents/uber/const.lua @@ -21,17 +21,17 @@ uberTalent{ name = "Draconic Body", mode = "passive", cooldown = 15, - require = { special={desc="Be close to the draconic world", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:attr("drake_touched") and self:attr("drake_touched") >= 2) end} }, + require = { special={desc=_t"Be close to the draconic world", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:attr("drake_touched") and self:attr("drake_touched") >= 2) end} }, trigger = function(self, t, value) if self.life - value < self.max_life * 0.3 and not self:isTalentCoolingDown(t) then self:heal(self.max_life * 0.4, t) self:startTalentCooldown(t) - game.logSeen(self,"%s's draconic body hardens and heals!",self.name) + game.logSeen(self,"%s's draconic body hardens and heals!",self:getName()) end end, info = function(self, t) return ([[Your body hardens and recovers quickly. When pushed below 30%% life, you instantly restore 40%% of your total life.]]) - :format() + :tformat() end, } @@ -39,7 +39,7 @@ uberTalent{ name = "Bloodspring", mode = "passive", cooldown = 12, - require = { special={desc="Have let Melinda be sacrificed", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:hasQuest("kryl-feijan-escape") and self:hasQuest("kryl-feijan-escape"):isStatus(engine.Quest.FAILED)) end} }, + require = { special={desc=_t"Have let Melinda be sacrificed", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:hasQuest("kryl-feijan-escape") and self:hasQuest("kryl-feijan-escape"):isStatus(engine.Quest.FAILED)) end} }, trigger = function(self, t) -- Add a lasting map effect game.level.map:addEffect(self, @@ -60,17 +60,17 @@ uberTalent{ info = function(self, t) return ([[When a single blow deals more than 15%% of your total life, a torrent of blood gushes from your body, creating a bloody tidal wave for 4 turns that deals %0.2f blight damage, heals you for 50%% of the damage done, and knocks foes back. The damage increases with your Constitution.]]) - :format(100 + self:getCon() * 3) + :tformat(100 + self:getCon() * 3) end, } uberTalent{ name = "Eternal Guard", mode = "passive", - require = { special={desc="Know the Block talent", fct=function(self) return self:knowTalent(self.T_BLOCK) end} }, + require = { special={desc=_t"Know the Block talent", fct=function(self) return self:knowTalent(self.T_BLOCK) end} }, info = function(self, t) return ([[Your Block talent now lasts for 2 game turns and you can apply Counterstrike to any number of enemies.]]) - :format() + :tformat() end, } @@ -81,7 +81,7 @@ uberTalent{ sustain_stamina = 10, tactical = { CLOSEIN = 0.5, ESCAPE = 0.5, STAMINA = -0.5, SPECIAL = -0.5}, -- values small for instant use no_energy = true, - require = { special={desc="Know at least 20 levels of stamina-using talents", fct=function(self) return knowRessource(self, "stamina", 20) end} }, + require = { special={desc=_t"Know at least 20 levels of stamina-using talents", fct=function(self) return knowRessource(self, "stamina", 20) end} }, activate = function(self, t) local ret = {} self:talentTemporaryValue(ret, "move_stamina_instead_of_energy", 12) @@ -91,14 +91,14 @@ uberTalent{ return true end, info = function(self, t) - return ([[While this talent is active, you dig deep into your stamina reserves, allowing you to move without taking a turn. However, this costs 12 stamina for each tile that you cross.]]):format() + return ([[While this talent is active, you dig deep into your stamina reserves, allowing you to move without taking a turn. However, this costs 12 stamina for each tile that you cross.]]):tformat() end, } uberTalent{ name = "Armour of Shadows", mode = "passive", - require = { special={desc="Have dealt over 50000 darkness damage", fct=function(self) return + require = { special={desc=_t"Have dealt over 50000 darkness damage", fct=function(self) return self.damage_log and ( (self.damage_log[DamageType.DARKNESS] and self.damage_log[DamageType.DARKNESS] >= 50000) ) @@ -115,7 +115,7 @@ uberTalent{ Any time you deal darkness damage, you will unlight both the target tile and yours. Passively increases your stealth rating by %d. The armor bonus scales with your Constitution.]]) - :format(t.ArmourBonus(self,t), t.getStealth(self, t)) + :tformat(t.ArmourBonus(self,t), t.getStealth(self, t)) end, } @@ -128,13 +128,13 @@ uberTalent{ end, info = function(self, t) return ([[Your back is as hard as stone. Each time that you are affected by a physical effect, your body hardens, making you immune to all other physical effects for 5 turns.]]) - :format() + :tformat() end, } uberTalent{ name = "Fungal Blood", - require = { special={desc="Be able to use infusions", fct=function(self) + require = { special={desc=_t"Be able to use infusions", fct=function(self) return (not self.inscription_restrictions or self.inscription_restrictions['inscriptions/infusions']) and (not self.inscription_forbids or not self.inscription_forbids['inscriptions/infusions']) @@ -168,14 +168,14 @@ uberTalent{ You may use this prodigy to release the power as a heal (never more than %d life) and remove up to 10 detrimental magical effects. Fungal power lasts for up to 6 turns, losing the greater of 10 potency or 10%% of its power each turn. The amount of fungal power produced and the maximum heal possible increase with your Constitution and maximum life.]]) - :format(t.fungalPower(self, t), t.healmax(self,t)) + :tformat(t.fungalPower(self, t), t.healmax(self,t)) end, } uberTalent{ name = "Corrupted Shell", mode = "passive", - require = { special={desc="Have received at least 3500 blight damage and destroyed Zigur with the Grand Corruptor.", fct=function(self) return + require = { special={desc=_t"Have received at least 3500 blight damage and destroyed Zigur with the Grand Corruptor.", fct=function(self) return (self.damage_intake_log and self.damage_intake_log[DamageType.BLIGHT] and self.damage_intake_log[DamageType.BLIGHT] >= 3500) and (game.state.birth.ignore_prodigies_special_reqs or ( self:hasQuest("anti-antimagic") and @@ -195,6 +195,6 @@ uberTalent{ return ([[Thanks to your newfound knowledge of corruption, you've learned some tricks for toughening your body... but only if you are healthy enough to withstand the strain from the changes. Improves your life by 500, your defense by %d, your armour by %d, your armour hardiness by 20%% and your saves by %d as your natural toughness and reflexes are pushed beyond their normal limits. Your saves armour and defense will improve with your Constitution.]]) - :format(self:getCon() / 3, self:getCon() / 3.5, self:getCon() / 3) + :tformat(self:getCon() / 3, self:getCon() / 3.5, self:getCon() / 3) end, } diff --git a/game/modules/tome/data/talents/uber/cun.lua b/game/modules/tome/data/talents/uber/cun.lua index 379207c6a99acd5439da60c7142212ac0d4145c4..7ec1585c70f55d35699d08b3cf8a842e942bc1b8 100644 --- a/game/modules/tome/data/talents/uber/cun.lua +++ b/game/modules/tome/data/talents/uber/cun.lua @@ -46,14 +46,14 @@ uberTalent{ self:setEffect(self.EFF_FAST_AS_LIGHTNING, 1, {}) eff = self:hasEffect(self.EFF_FAST_AS_LIGHTNING) eff.dir = dir eff.nb = 0 - game.logSeen(self, "#LIGHT_BLUE#%s slows from critical velocity!", self.name:capitalize()) + game.logSeen(self, "#LIGHT_BLUE#%s slows from critical velocity!", self:getName():capitalize()) end eff.nb = eff.nb + 1 if eff.nb >= 3 and not eff.blink then self:effectTemporaryValue(eff, "prob_travel", 5) - game.logSeen(self, "#LIGHT_BLUE#%s reaches critical velocity!", self.name:capitalize()) + game.logSeen(self, "#LIGHT_BLUE#%s reaches critical velocity!", self:getName():capitalize()) local sx, sy = game.level.map:getTileToScreen(self.x, self.y, true) game.flyers:add(sx, sy, 30, rng.float(-3, -2), (rng.range(0,2)-1) * 0.5, "CRITICAL VELOCITY!", {0,128,255}) eff.particle = self:addParticles(Particles.new("megaspeed", 1, {angle=util.dirToAngle((dir == 4 and 6) or (dir == 6 and 4 or dir))})) @@ -65,27 +65,27 @@ uberTalent{ return ([[When moving over 800%% speed for at least 3 steps in the same direction, you become so fast you can blink through obstacles as if they were not there. While moving this fast you have 50%% chances to fully ignore an attack by displacing yourself (this may only happen once per turn). Changing direction will break the effect.]]) - :format() + :tformat() end, } uberTalent{ name = "Tricky Defenses", mode = "passive", - require = { special={desc="Antimagic", fct=function(self) return self:knowTalentType("wild-gift/antimagic") end} }, + require = { special={desc=_t"Antimagic", fct=function(self) return self:knowTalentType("wild-gift/antimagic") end} }, -- called by getMax function in Antimagic shield talent definition mod.data.talents.gifts.antimagic.lua shieldmult = function(self) return self:combatStatScale("cun", 0.1, 0.5) end, info = function(self, t) return ([[You are full of tricks and surprises; your Antimagic Shield can absorb %d%% more damage. The increase scales with your Cunning.]]) - :format(t.shieldmult(self)*100) + :tformat(t.shieldmult(self)*100) end, } uberTalent{ name = "Endless Woes", mode = "passive", - require = { special={desc="Have dealt over 10000 acid, blight, darkness, mind or temporal damage", fct=function(self) return + require = { special={desc=_t"Have dealt over 10000 acid, blight, darkness, mind or temporal damage", fct=function(self) return self.damage_log and ( (self.damage_log[DamageType.ACID] and self.damage_log[DamageType.ACID] >= 10000) or (self.damage_log[DamageType.BLIGHT] and self.damage_log[DamageType.BLIGHT] >= 10000) or @@ -150,29 +150,29 @@ uberTalent{ self.endless_woes[damtype] = 0 if damtype == DamageType.TEMPORAL and not self:hasProc("endless_woes_temporal") then self:setProc("endless_woes_temporal", true, 10) - game.logSeen(self, "You unleash a blast of #LIGHT_STEEL_BLUE#temporal#LAST# energy!", self.name:capitalize()) + game.logSeen(self, "You unleash a blast of #LIGHT_STEEL_BLUE#temporal#LAST# energy!", self:getName():capitalize()) t.doProject(self, t, damtype, {id="EFF_SLOW", dur=5, params={power=0.3}, canbe="slow"}, "ball_temporal") elseif damtype == DamageType.BLIGHT and not self:hasProc("endless_woes_blight") then self:setProc("endless_woes_blight", true, 10) - game.logSeen(self, "You unleash a blast of #DARK_GREEN#virulent blight!#LAST#!", self.name:capitalize()) + game.logSeen(self, "You unleash a blast of #DARK_GREEN#virulent blight!#LAST#!", self:getName():capitalize()) local dam, stat = t.getBlight(self, t) t.doProject(self, t, damtype, {id="EFF_WOEFUL_DISEASE", dur=5, params = {src=self, dam=dam, str=stat, con=stat, dex=stat}, canbe="disease"}, "ball_blight") elseif damtype == DamageType.ACID and not self:hasProc("endless_woes_acid") then self:setProc("endless_woes_acid", true, 10) local dam = t.getAcid(self, t) - game.logSeen(self, "You unleash a blast of #GREEN#acid#LAST#!", self.name:capitalize()) + game.logSeen(self, "You unleash a blast of #GREEN#acid#LAST#!", self:getName():capitalize()) t.doProject(self, t, damtype, {id="EFF_WOEFUL_CORROSION", dur=5, params={src=self, dam=dam}}, "ball_acid") elseif damtype == DamageType.DARKNESS and not self:hasProc("endless_woes_darkness") then self:setProc("endless_woes_darkness", true, 10) - game.logSeen(self, "You unleash a blast of numbing #GREY#darkness#LAST#!", self.name:capitalize()) + game.logSeen(self, "You unleash a blast of numbing #GREY#darkness#LAST#!", self:getName():capitalize()) t.doProject(self, t, damtype, {id="EFF_WOEFUL_DARKNESS", dur=5, params={reduce=t.getDarkness(self, t)}}, "shadow_flash") elseif damtype == DamageType.MIND and not self:hasProc("endless_woes_mind") then self:setProc("endless_woes_mind", true, 10) - game.logSeen(self, "You unleash a confusing blast of #YELLOW#mental#LAST# energy!", self.name:capitalize()) + game.logSeen(self, "You unleash a confusing blast of #YELLOW#mental#LAST# energy!", self:getName():capitalize()) t.doProject(self, t, damtype, {id="EFF_CONFUSED", dur=5, params={power=t.getMind(self, t)}, canbe="confusion"}, "starfall") elseif damtype == DamageType.PHYSICAL and not self:hasProc("endless_woes_physical") then self:setProc("endless_woes_physical", true, 10) - game.logSeen(self, "You unleash a crippling blast of earthen energy!", self.name:capitalize()) + game.logSeen(self, "You unleash a crippling blast of earthen energy!", self:getName():capitalize()) t.doProject(self, t, damtype, {id="EFF_WOEFUL_CRIPPLE", dur=5, params={power=0.2}}, "ball_earth") end end @@ -185,9 +185,9 @@ uberTalent{ if self:knowTalent(self.T_ENDLESS_WOES) then for dt, _ in pairs(t.dts) do local proc = self:hasProc("endless_woes_"..dt:lower()) - if proc then cooldowns[#cooldowns+1] = (dt:lower()):capitalize()..": "..proc.turns end + if proc then cooldowns[#cooldowns+1] = DamageType:get(DamageType[dt]).name:capitalize()..": "..proc.turns end end - str = "(Cooldowns)".."\n"..table.concat(cooldowns, "\n") + str = _t"(Cooldowns)".."\n"..table.concat(cooldowns, "\n") end return ([[Surround yourself with a malevolent aura that stores damage you deal. Whenever you have stored %d damage of one type you unleash a powerful blast at a random enemy dealing %d damage of that type in radius %d and applying one of the following effects: @@ -202,7 +202,7 @@ uberTalent{ Each effect can only happen once per 10 player turns. This does not count as a typical cooldown. The damage and effect power increase with your Cunning, the threshold with your level, and the apply power is the highest of your mind or spell power. %s]]) - :format(t.getThreshold(self, t), t.getDamage(self, t), self:getTalentRadius(t), damDesc(self, DamageType.ACID, t.getAcid(self, t)), damDesc(self, DamageType.ACID, t.getAcid(self, t)*5), blight_dam, blight_disease, t.getDarkness(self, t), t.getTemporal(self, t), t.getMind(self, t), str) + :tformat(t.getThreshold(self, t), t.getDamage(self, t), self:getTalentRadius(t), damDesc(self, DamageType.ACID, t.getAcid(self, t)), damDesc(self, DamageType.ACID, t.getAcid(self, t)*5), blight_dam, blight_disease, t.getDarkness(self, t), t.getTemporal(self, t), t.getMind(self, t), str) end, } @@ -210,7 +210,7 @@ uberTalent{ uberTalent{ name = "Secrets of Telos", mode = "passive", - require = { special={desc="Possess Telos Top Half, Telos Bottom Half, and Telos Staff Crystal", fct=function(self) + require = { special={desc=_t"Possess Telos Top Half, Telos Bottom Half, and Telos Staff Crystal", fct=function(self) local o1 = self:findInAllInventoriesBy("define_as", "GEM_TELOS") local o2 = self:findInAllInventoriesBy("define_as", "TELOS_TOP_HALF") local o3 = self:findInAllInventoriesBy("define_as", "TELOS_BOTTOM_HALF") @@ -235,19 +235,19 @@ uberTalent{ self:sortInven() - game.logSeen(self, "#VIOLET#%s assembles %s!", self.name:capitalize(), o:getName{do_colour=true, no_count=true}) + game.logSeen(self, "#VIOLET#%s assembles %s!", self:getName():capitalize(), o:getName{do_colour=true, no_count=true}) end end, info = function(self, t) return ([[You have obtained the three parts of the Staff of Telos and studied them carefully. You believe that you can merge them back into a single highly potent staff.]]) - :format() + :tformat() end, } uberTalent{ name = "Elemental Surge", mode = "passive", - require = { special={desc="Have dealt over 10000 arcane, fire, cold, lightning, light or nature damage", fct=function(self) return + require = { special={desc=_t"Have dealt over 10000 arcane, fire, cold, lightning, light or nature damage", fct=function(self) return self.damage_log and ( (self.damage_log[DamageType.ARCANE] and self.damage_log[DamageType.ARCANE] >= 10000) or (self.damage_log[DamageType.FIRE] and self.damage_log[DamageType.FIRE] >= 10000) or @@ -301,38 +301,38 @@ uberTalent{ self.elemental_surge[damtype] = 0 if damtype == DamageType.PHYSICAL and not self:hasProc("elemental_surge_physical") then self:setProc("elemental_surge_physical", true, 10) - game.logSeen(self, "%s surges with earthen power!", self.name:capitalize()) + game.logSeen(self, "%s surges with earthen power!", self:getName():capitalize()) self:removeEffectsFilter({status="detrimental", type="physical", ignore_crosstier=true}, 1) self:setEffect(self.EFF_ELEMENTAL_SURGE_PHYSICAL, 2, {}) t.doProject(self, t, damtype, "ball_earth") elseif damtype == DamageType.ARCANE and not self:hasProc("elemental_surge_arcane") then self:setProc("elemental_surge_arcane", true, 10) - game.logSeen(self, "%s surges with #PURPLE#arcane#LAST# power!", self.name:capitalize()) + game.logSeen(self, "%s surges with #PURPLE#arcane#LAST# power!", self:getName():capitalize()) self:setEffect(self.EFF_ELEMENTAL_SURGE_ARCANE, 3, {}) t.doProject(self, t, damtype, "ball_arcane") elseif damtype == DamageType.FIRE and not self:hasProc("elemental_surge_fire") then self:setProc("elemental_surge_fire", true, 10) - game.logSeen(self, "%s surges with #LIGHT_RED#fiery#LAST# power!", self.name:capitalize()) + game.logSeen(self, "%s surges with #LIGHT_RED#fiery#LAST# power!", self:getName():capitalize()) self:setEffect(self.EFF_ELEMENTAL_SURGE_FIRE, 3, {damage = t.getFire(self, t)}) t.doProject(self, t, damtype, "ball_fire") elseif damtype == DamageType.COLD and not self:hasProc("elemental_surge_cold") then self:setProc("elemental_surge_cold", true, 10) - game.logSeen(self, "%s surges with #1133F3#icy#LAST# power!", self.name:capitalize()) + game.logSeen(self, "%s surges with #1133F3#icy#LAST# power!", self:getName():capitalize()) self:setEffect(self.EFF_ELEMENTAL_SURGE_COLD, 3, t.getCold(self, t) ) t.doProject(self, t, damtype, "ball_ice") elseif damtype == DamageType.LIGHTNING and not self:hasProc("elemental_surge_lightning") then self:setProc("elemental_surge_lightning", true, 10) - game.logSeen(self, "%s surges with #ROYAL_BLUE#lightning#LAST# power!", self.name:capitalize()) + game.logSeen(self, "%s surges with #ROYAL_BLUE#lightning#LAST# power!", self:getName():capitalize()) self:setEffect(self.EFF_ELEMENTAL_SURGE_LIGHTNING, 2, {move = t.getLightning(self, t)}) t.doProject(self, t, damtype, "ball_lightning") elseif damtype == DamageType.LIGHT and not self:hasProc("elemental_surge_light") then self:setProc("elemental_surge_light", true, 10) - game.logSeen(self, "%s surges with #YELLOW#light#LAST# power!", self.name:capitalize()) + game.logSeen(self, "%s surges with #YELLOW#light#LAST# power!", self:getName():capitalize()) self:setEffect(self.EFF_ELEMENTAL_SURGE_LIGHT, 3, {cooldown = t.getLight(self, t)}) t.doProject(self, t, damtype, "ball_light") elseif damtype == DamageType.NATURE and not self:hasProc("elemental_surge_nature") then self:setProc("elemental_surge_nature", true, 10) - game.logSeen(self, "%s surges with #LIGHT_GREEN#natural#LAST# power!", self.name:capitalize()) + game.logSeen(self, "%s surges with #LIGHT_GREEN#natural#LAST# power!", self:getName():capitalize()) self:removeEffectsFilter({status="detrimental", type="magical", ignore_crosstier=true}, 1) self:setEffect(self.EFF_ELEMENTAL_SURGE_NATURE, 2, {}) t.doProject(self, t, damtype, "slime") @@ -347,9 +347,9 @@ uberTalent{ if self:knowTalent(self.T_ELEMENTAL_SURGE) then for dt, _ in pairs(t.dts) do local proc = self:hasProc("elemental_surge_"..dt:lower()) - if proc then cooldowns[#cooldowns+1] = (dt:lower()):capitalize()..": "..proc.turns end + if proc then cooldowns[#cooldowns+1] = DamageType:get(DamageType[dt]).name:capitalize()..": "..proc.turns end end - str = "(Cooldowns)".."\n"..table.concat(cooldowns, "\n") + str = _t"(Cooldowns)".."\n"..table.concat(cooldowns, "\n") end return ([[Surround yourself with an elemental aura that stores damage you deal. Whenever you have stored %d damage of one type you unleash a powerful blast at a random enemy dealing %d damage of that type in radius %d and granting you one of the following effects: @@ -365,23 +365,23 @@ uberTalent{ Each effect can only happen once per 10 player turns. This does not count as a typical cooldown. The damage and some effect powers increase with your Cunning and the threshold with your level. %s]]) - :format(t.getThreshold(self, t), t.getDamage(self, t), self:getTalentRadius(t), t.getFire(self, t), cold.armor, cold.dam, t.getLightning(self, t), str) + :tformat(t.getThreshold(self, t), t.getDamage(self, t), self:getTalentRadius(t), t.getFire(self, t), cold.armor, cold.dam, t.getLightning(self, t), str) end, } eye_of_the_tiger_data = { physical = { - desc = "All physical criticals reduce the remaining cooldown of a random technique or cunning talent by 2.", + desc = _t"All physical criticals reduce the remaining cooldown of a random technique or cunning talent by 2.", types = { "^technique/", "^cunning/" }, reduce = 2, }, spell = { - desc = "All spell criticals reduce the remaining cooldown of a random spell/corruption/celestial/chronomancy talent by 2.", + desc = _t"All spell criticals reduce the remaining cooldown of a random spell/corruption/celestial/chronomancy talent by 2.", types = { "^spell/", "^corruption/", "^celestial/", "^chronomancy/" }, reduce = 2, }, mind = { - desc = "All mind criticals reduce the remaining cooldown of a random wild gift/psionic/afflicted talent by 2.", + desc = _t"All mind criticals reduce the remaining cooldown of a random wild gift/psionic/afflicted talent by 2.", types = { "^wild%-gift/", "^cursed/", "^psionic/" }, reduce = 2, }, @@ -422,7 +422,7 @@ uberTalent{ for _, d in pairs(eye_of_the_tiger_data) do list[#list+1] = d.desc end return ([[%s This can only happen once per turn per type, and cannot affect the talent that triggers it.]]) - :format(table.concat(list, "\n")) + :tformat(table.concat(list, "\n")) end, } @@ -434,7 +434,7 @@ uberTalent{ on_learn = function(self, t, kind) if not game.party:hasMember(self) then return end local Chat = require "engine.Chat" - local chat = Chat.new("worldly-knowledge", {name="Worldly Knowledge"}, self) + local chat = Chat.new("worldly-knowledge", {name=_t"Worldly Knowledge"}, self) chat:invoke() end, passives = function(self, t, tmptable) @@ -461,7 +461,7 @@ uberTalent{ - Corruption / Curses - Celestial / Chants - Chronomancy / Chronomancy]]) - :format() + :tformat() end, } @@ -472,7 +472,7 @@ uberTalent{ cant_steal = true, info = function(self, t) return ([[Your talent masteries are increased by 0.3. Note that many talents will not benefit from this increase.]]) - :format() + :tformat() end, passives = function(self, t, tmptable) self:talentTemporaryValue(tmptable, "talents_mastery_bonus", {all = 0.3}) @@ -489,7 +489,7 @@ uberTalent{ name = "Tricks of the Trade", mode = "passive", cant_steal = true, - require = { special={desc="Have sided with the Assassin Lord", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:isQuestStatus("lost-merchant", engine.Quest.COMPLETED, "evil")) end} }, + require = { special={desc=_t"Have sided with the Assassin Lord", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:isQuestStatus("lost-merchant", engine.Quest.COMPLETED, "evil")) end} }, on_learn = function(self, t) if self:knowTalentType("cunning/stealth") then self:setTalentTypeMastery("cunning/stealth", self:getTalentTypeMastery("cunning/stealth") + 0.2) @@ -508,6 +508,6 @@ uberTalent{ return ([[You have friends in low places and have learned some underhanded tricks. Gain 0.2 Category Mastery to the Cunning/Stealth Category (or unlock it, if you have the tree and it is locked), and either gain +0.1 to the Cunning/Scoundrel category or learn and unlock the category at 0.9 if you lack it. Additionally, all of your damage penalties from invisibility are permanently halved.]]): - format() + tformat() end, } diff --git a/game/modules/tome/data/talents/uber/dex.lua b/game/modules/tome/data/talents/uber/dex.lua index b4399e7a2adb6e1254dd561cd8250a2085b0f10b..cbe294fd577f654c3b71dec0d967791060bb865b 100644 --- a/game/modules/tome/data/talents/uber/dex.lua +++ b/game/modules/tome/data/talents/uber/dex.lua @@ -30,13 +30,13 @@ uberTalent{ end, info = function(self, t) return ([[Each time that you make a melee attack you have a 50%% chance to execute an additional unarmed strike.]]) - :format() + :tformat() end, } uberTalent{ name = "Through The Crowd", - require = { special={desc="Have had at least 6 party members at the same time", fct=function(self) + require = { special={desc=_t"Have had at least 6 party members at the same time", fct=function(self) return self:attr("huge_party") end} }, mode = "sustained", @@ -84,7 +84,7 @@ uberTalent{ - you can never damage your friends or neutral creatures while this talent is active. - you love being surrounded by friends; for each friendly creature in sight you gain +10 to all saves and +3%% to global speed (max 15%%) - every party member is also automatically granted Through The Crowd]]) - :format() + :tformat() end, } @@ -105,14 +105,14 @@ uberTalent{ return ([[You have very agile hands; swapping equipment sets (default q key) takes no time, nor does equipping/unequipping items. The free item switch may only happen once per turn. The cooldown for equipping activatable equipment is removed.]]) - :format() + :tformat() end, } uberTalent{ name = "Windblade", mode = "activated", - require = { special={desc="Have dealt over 50000 damage with dual wielded weapons", fct=function(self) return self.damage_log and self.damage_log.weapon.dualwield and self.damage_log.weapon.dualwield >= 50000 end} }, + require = { special={desc=_t"Have dealt over 50000 damage with dual wielded weapons", fct=function(self) return self.damage_log and self.damage_log.weapon.dualwield and self.damage_log.weapon.dualwield >= 50000 end} }, cooldown = 12, radius = 4, range = 0, @@ -139,14 +139,14 @@ uberTalent{ end, info = function(self, t) return ([[You spin madly, generating a sharp gust of wind with your weapons that deals 320%% weapon damage to all targets within radius 4 and disarms them for 4 turns.]]) - :format() + :tformat() end, } uberTalent{ name = "Windtouched Speed", mode = "passive", - require = { special={desc="Know at least 10 talent levels of equilibrium-using talents", fct=function(self) return knowRessource(self, "equilibrium", 10) end} }, + require = { special={desc=_t"Know at least 10 talent levels of equilibrium-using talents", fct=function(self) return knowRessource(self, "equilibrium", 10) end} }, on_learn = function(self, t) self:attr("global_speed_add", 0.2) self:attr("avoid_pressure_traps", 1) @@ -162,7 +162,7 @@ uberTalent{ info = function(self, t) return ([[You are attuned with Nature, and she helps you in your fight against the arcane forces. You gain 20%% permanent global speed, 10%% cooldowns reduction and do not trigger pressure traps.]]) - :format() + :tformat() end, } @@ -171,12 +171,12 @@ uberTalent{ mode = "passive", no_npc_use = true, cant_steal = true, - require = { special={desc="Know Imbue Item to level 5", fct=function(self) + require = { special={desc=_t"Know Imbue Item to level 5", fct=function(self) return self:getTalentLevelRaw(self.T_IMBUE_ITEM) >= 5 end} }, info = function(self, t) return ([[You are very crafty. You can now also embed gems into helms and belts.]]) - :format() + :tformat() end, } @@ -189,7 +189,7 @@ uberTalent{ else return {ESCAPE = 2, DEFEND = 2} end end, - require = { special={desc="Have been knocked around at least 50 times", fct=function(self) return self:attr("knockback_times") and self:attr("knockback_times") >= 50 end} }, + require = { special={desc=_t"Have been knocked around at least 50 times", fct=function(self) return self:attr("knockback_times") and self:attr("knockback_times") >= 50 end} }, -- Called by default projector in mod.data.damage_types.lua getMult = function(self, t) return self:combatLimit(self:getDex(), 0.7, 0.9, 50, 0.85, 100) end, -- Limit > 70% damage taken activate = function(self, t) @@ -206,7 +206,7 @@ uberTalent{ So long as you can move, you find a way to dodge, evade, deflect or otherwise reduce physical damage against you by %d%%. Once per turn, when you get hit by a melee or archery attack you move back one tile for free and gain 200%% movement speed for a turn. The damage avoidance scales with your Dexterity and applies after resistances.]]) - :format(100*(1-t.getMult(self, t))) + :tformat(100*(1-t.getMult(self, t))) end, } @@ -215,7 +215,7 @@ uberTalent{ no_energy = "fake", cooldown = 10, range = archery_range, - require = { special={desc="Have dealt over 50000 damage with ranged weapons", fct=function(self) return self.damage_log and self.damage_log.weapon.archery and self.damage_log.weapon.archery >= 50000 end} }, + require = { special={desc=_t"Have dealt over 50000 damage with ranged weapons", fct=function(self) return self.damage_log and self.damage_log.weapon.archery and self.damage_log.weapon.archery >= 50000 end} }, tactical = { ATTACK = { weapon = 3 }, DISABLE = {2, stun = 2}}, requires_target = true, on_pre_use = function(self, t, silent) return archerPreUse(self, t, silent) end, @@ -234,6 +234,6 @@ uberTalent{ info = function(self, t) return ([[You fire a shot straight at your enemy's vital areas, wounding them terribly. Enemies hit by this shot will take 450%% weapon damage and will be stunned and crippled (losing 50%% physical, magical and mental attack speeds) for five turns due to the devastating impact of the shot. - The stun and cripple chances increase with your Accuracy.]]):format() + The stun and cripple chances increase with your Accuracy.]]):tformat() end, } diff --git a/game/modules/tome/data/talents/uber/mag.lua b/game/modules/tome/data/talents/uber/mag.lua index 23ffd1c9da0498f183202006546c1a8d780547ad..2cc6efef81f2d083460a8966481e9bba78b3a498 100644 --- a/game/modules/tome/data/talents/uber/mag.lua +++ b/game/modules/tome/data/talents/uber/mag.lua @@ -21,7 +21,7 @@ uberTalent{ name = "Spectral Shield", not_listed = true, -- Functionality was baselined on shields mode = "passive", - require = { special={desc="Know the Block talent, have cast 100 spells, and have a block value over 200", fct=function(self) + require = { special={desc=_t"Know the Block talent, have cast 100 spells, and have a block value over 200", fct=function(self) return self:knowTalent(self.T_BLOCK) and self:getTalentFromId(self.T_BLOCK).getBlockValue(self) >= 200 and self.talent_kind_log and self.talent_kind_log.spell and self.talent_kind_log.spell >= 100 end} }, on_learn = function(self, t) @@ -32,7 +32,7 @@ uberTalent{ end, info = function(self, t) return ([[By infusing your shield with raw magic, your block can now block any damage type.]]) - :format() + :tformat() end, } @@ -40,7 +40,7 @@ uberTalent{ uberTalent{ name = "Ethereal Form", image = "talents/displace_damage.png", mode = "passive", - require = { special={desc="Have an effective defense of at least 40", fct=function(self) + require = { special={desc=_t"Have an effective defense of at least 40", fct=function(self) if self:combatDefense() >= 40 then return true end end} }, passives = function(self, t, tmptable) @@ -62,14 +62,14 @@ uberTalent{ info = function(self, t) return ([[You gain 25%% absolute damage resistance and 25%% all damage penetration. Each time you are struck by a weapon these bonuses are reduced by 5%% but fully recovered after 8 turns. Additionally, you gain 70%% of the highest of your Magic or Dexterity stat as defense (%d)]]) - :format(math.max(self:getMag(), self:getDex()) * 0.7) + :tformat(math.max(self:getMag(), self:getDex()) * 0.7) end, } uberTalent{ name = "Aether Permeation", mode = "passive", - require = { special={desc="Have at least 25% arcane damage reduction and have been exposed to the void of space", fct=function(self) + require = { special={desc=_t"Have at least 25% arcane damage reduction and have been exposed to the void of space", fct=function(self) return (game.state.birth.ignore_prodigies_special_reqs or self:attr("planetary_orbit")) and self:combatGetResist(DamageType.ARCANE) >= 25 end} }, cant_steal = true, @@ -86,14 +86,14 @@ uberTalent{ info = function(self, t) return ([[You manifest a thin layer of aether all around you. Any attack passing through it will check arcane resistance instead of the incoming damage resistance. In effect, all of your resistances are equal to 66%% of your arcane resistance, which is increased by 20%% (and cap increased by 10%%).]]) - :format() + :tformat() end, } uberTalent{ name = "Mystical Cunning", image = "talents/vulnerability_poison.png", mode = "passive", - require = { special={desc="Know how to either prepare traps or apply poisons", fct=function(self) + require = { special={desc=_t"Know how to either prepare traps or apply poisons", fct=function(self) return self:knowTalent(self.T_APPLY_POISON) or self:knowTalent(self.T_TRAP_MASTERY) end} }, autolearn_talent = {Talents.T_VULNERABILITY_POISON, Talents.T_GRAVITIC_TRAP}, -- requires uber.lua loaded last @@ -108,7 +108,7 @@ uberTalent{ for i, tid in pairs(t.autolearn_talent) do local bonus_t = self:getTalentFromId(tid) if bonus_t then - descs = ("%s\n#YELLOW#%s#LAST#\n%s\n"):format(descs, bonus_t.name, self:callTalent(bonus_t.id, "info")) + descs = ("%s\n#YELLOW#%s#LAST#\n%s\n"):tformat(descs, bonus_t.name, self:callTalent(bonus_t.id, "info")) end end return ([[Your study of arcane forces has let you develop a new way of applying your aptitude for trapping and poisons. @@ -119,7 +119,7 @@ uberTalent{ You learn the following talents: %s]]) - :format(descs) + :tformat(descs) end, } @@ -132,14 +132,14 @@ uberTalent{ Equipped weapons are treated as having an additional 50%% Magic modifier; Your raw Physical Power is increased by 100%% of your raw Spellpower; Your physical critical chance is increased by 25%% of your bonus spell critical chance.]]) - :format() + :tformat() end, } uberTalent{ name = "Temporal Form", cooldown = 30, - require = { special={desc="Have cast over 1000 spells and visited a zone outside of time", fct=function(self) return + require = { special={desc=_t"Have cast over 1000 spells and visited a zone outside of time", fct=function(self) return self.talent_kind_log and self.talent_kind_log.spell and self.talent_kind_log.spell >= 1000 and (game.state.birth.ignore_prodigies_special_reqs or self:attr("temporal_touched")) end} }, no_energy = true, @@ -155,14 +155,14 @@ uberTalent{ return ([[You can wrap temporal threads around you, assuming the form of a telugoroth for 10 turns. While in this form you gain pinning, bleeding, blindness and stun immunity, 30%% temporal resistance, your temporal damage bonus is set to your current highest damage bonus + 30%%, 50%% of the damage you deal becomes temporal, and you gain 20%% temporal resistance penetration. You also are able to cast anomalies: Anomaly Rearrange, Anomaly Temporal Storm, Anomaly Flawed Design, Anomaly Gravity Pull and Anomaly Wormhole.]]) - :format() + :tformat() end, } uberTalent{ name = "Blighted Summoning", mode = "passive", - require = { special={desc="Have summoned at least 100 creatures. More permanent summons may count as more than 1.", fct=function(self) + require = { special={desc=_t"Have summoned at least 100 creatures. More permanent summons may count as more than 1.", fct=function(self) return self:attr("summoned_times") and self:attr("summoned_times") >= 100 end} }, cant_steal = true, @@ -219,6 +219,7 @@ uberTalent{ who:learnTalent(who.T_BLOOD_SPRAY, true, 3, {no_unlearn=true}) elseif who.subtype == "plants" then who:learnTalent(who.T_POISON_STORM, true, 3, {no_unlearn=true}) + -- I18N this line of code should be fixed. elseif who.name == "fire drake" or who.name == "fire drake (wild summon)" then who:learnTalent(who.T_FLAME_OF_URH_ROK, true, 3, {no_unlearn=true}) who:forceUseTalent(who.T_FLAME_OF_URH_ROK, {ignore_energy=true}) elseif who.subtype == "turtle" then @@ -260,7 +261,7 @@ uberTalent{ - Ghouls: Virulent Disease - Vampires / Liches: Blood Grasp and Blood Boil - Ghosts / Wights: Blood Fury and Curse of Death - ]]):format() + ]]):tformat() end, } @@ -270,7 +271,7 @@ uberTalent{ no_energy = true, is_spell = true, no_npc_use = true, - require = { special={desc="Have time-travelled at least once", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:attr("time_travel_times") and self:attr("time_travel_times") >= 1) end} }, + require = { special={desc=_t"Have time-travelled at least once", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:attr("time_travel_times") and self:attr("time_travel_times") >= 1) end} }, action = function(self, t) if game._chronoworlds and game._chronoworlds.revisionist_history then self:hasEffect(self.EFF_REVISIONIST_HISTORY).back_in_time = true @@ -290,7 +291,7 @@ uberTalent{ return ([[You can now control the recent past. Upon using this prodigy you gain a temporal effect for 20 turns. While this effect holds you can use the prodigy again to rewrite history. This prodigy splits the timeline. Attempting to use another spell that also splits the timeline while this effect is active will be unsuccessful.]]) - :format() + :tformat() end, } newTalent{ @@ -310,7 +311,7 @@ newTalent{ end, info = function(self, t) return ([[Rewrite the recent past to go back to when you cast Revisionist History.]]) - :format() + :tformat() end, } @@ -318,7 +319,7 @@ uberTalent{ name = "Cauterize", mode = "passive", cooldown = 12, - require = { special={desc="Have received at least 3500 fire damage and have cast at least 1000 spells", fct=function(self) return + require = { special={desc=_t"Have received at least 3500 fire damage and have cast at least 1000 spells", fct=function(self) return self.talent_kind_log and self.talent_kind_log.spell and self.talent_kind_log.spell >= 1000 and self.damage_intake_log and self.damage_intake_log[DamageType.FIRE] and self.damage_intake_log[DamageType.FIRE] >= 3500 end} }, trigger = function(self, t, value) @@ -331,7 +332,7 @@ uberTalent{ info = function(self, t) return ([[Your inner flame is strong. Each time that you receive a blow that would kill you, your body is wreathed in flames. The flames will cauterize the wound, fully absorbing all damage done this turn, but they will continue to burn for 8 turns. - Each turn 10% of the damage absorbed will be dealt by the flames. This will bypass resistance and affinity. - Warning: this has a cooldown.]]) + Each turn 10%% of the damage absorbed will be dealt by the flames. This will bypass resistance and affinity. + Warning: this has a cooldown.]]):tformat() end, } diff --git a/game/modules/tome/data/talents/uber/str.lua b/game/modules/tome/data/talents/uber/str.lua index 0f5699498f94e16f833aab5ee18c390804c0412c..c38985c1184328c435d303986c1ccee71c73fd14 100644 --- a/game/modules/tome/data/talents/uber/str.lua +++ b/game/modules/tome/data/talents/uber/str.lua @@ -20,7 +20,7 @@ uberTalent{ name = "Giant Leap", mode = "activated", - require = { special={desc="Have dealt over 50000 damage with any weapon or unarmed", fct=function(self) return + require = { special={desc=_t"Have dealt over 50000 damage with any weapon or unarmed", fct=function(self) return self.damage_log and ( (self.damage_log.weapon.twohanded and self.damage_log.weapon.twohanded >= 50000) or (self.damage_log.weapon.shield and self.damage_log.weapon.shield >= 50000) or @@ -75,14 +75,14 @@ uberTalent{ info = function(self, t) return ([[You accurately jump to the target and deal 200%% weapon damage to all foes within radius 1 on impact as well as dazing them for 3 turns. When you jump you free yourself from any stun, daze and pinning effects.]]) - :format() + :tformat() end, } uberTalent{ name = "You Shall Be My Weapon!", short_name="TITAN_S_SMASH", image = "talents/titan_s_smash.png", mode = "activated", - require = { special={desc="Be of size category 'big' or larger. This is also required to use it.", fct=function(self) return self.size_category and self.size_category >= 4 end} }, + require = { special={desc=_t"Be of size category 'big' or larger. This is also required to use it.", fct=function(self) return self.size_category and self.size_category >= 4 end} }, requires_target = true, tactical = { ATTACK = 3, DISABLE = {stun = 1}, ESCAPE = {knockback = 1} }, on_pre_use = function(self, t) return self.size_category and self.size_category >= 4 end, @@ -119,14 +119,14 @@ uberTalent{ return ([[You deal a massive blow to your foe, smashing it for 350%% weapon damage, knocking it back 5 tiles, and knocking aside all foes in its path. All targets affected are stunned for 3 turns. For each size category over 'big' you gain an additional +80%% weapon damage.]]) - :format() + :tformat() end, } uberTalent{ name = "Massive Blow", mode = "activated", - require = { special={desc="Have dug at least 30 walls/trees/etc. and have dealt over 50000 damage with two-handed weapons", fct=function(self) return + require = { special={desc=_t"Have dug at least 30 walls/trees/etc. and have dealt over 50000 damage with two-handed weapons", fct=function(self) return self.dug_times and self.dug_times >= 30 and self.damage_log and self.damage_log.weapon.twohanded and self.damage_log.weapon.twohanded >= 50000 end} }, @@ -157,19 +157,19 @@ uberTalent{ info = function(self, t) return ([[You deal a massive blow to your foe, smashing it for 150%% weapon damage and knocking it back 4 tiles (ignoring knockback resistance or physical save). If the knockback makes it hit a wall, it will smash down the wall, deal an additional 350%% weapon damage and apply the Counterstrike effect.]]) - :format() + :tformat() end, } uberTalent{ name = "Steamroller", mode = "passive", - require = { special={desc="Know the Rush talent", fct=function(self) return self:knowTalent(self.T_RUSH) end} }, + require = { special={desc=_t"Know the Rush talent", fct=function(self) return self:knowTalent(self.T_RUSH) end} }, info = function(self, t) return ([[When you rush, the creature you rush to is marked. If you kill it in the next two turns then your rush cooldown is reset. Each time that this effect triggers you gain a stacking +20%% damage buff, up to 100%%. Rush now only costs 2 stamina.]]) - :format() + :tformat() end, } @@ -180,7 +180,7 @@ uberTalent{ range = 5, tactical = { ATTACKAREA = {LIGHT = 2, FIRE = 2, PHYSICAL = 2}, CLOSEIN = 2 }, target = {type="ball", range=0, friendlyfire=false, radius=5}, - require = { special={desc="Have dealt over 50000 light or fire damage", fct=function(self) return + require = { special={desc=_t"Have dealt over 50000 light or fire damage", fct=function(self) return self.damage_log and ( (self.damage_log[DamageType.FIRE] and self.damage_log[DamageType.FIRE] >= 50000) or (self.damage_log[DamageType.LIGHT] and self.damage_log[DamageType.LIGHT] >= 50000) @@ -195,14 +195,14 @@ uberTalent{ return ([[For 8 turns you gain the mass and power of a star, drawing all creatures within radius 5 toward you and dealing %0.2f fire, %0.2f light and %0.2f physical damage to all foes and reducing their damage dealt by 30%%. Foes closer to you take up to 150%% damage. The damage will increase with your Strength.]]) - :format(damDesc(self, DamageType.FIRE, dam), damDesc(self, DamageType.LIGHT, dam), damDesc(self, DamageType.PHYSICAL, dam)) + :tformat(damDesc(self, DamageType.FIRE, dam), damDesc(self, DamageType.LIGHT, dam), damDesc(self, DamageType.PHYSICAL, dam)) end, } uberTalent{ name = "I Can Carry The World!", short_name = "NO_FATIGUE", mode = "passive", - require = { special={desc="Be able to use massive armours", fct=function(self) return self:getTalentLevelRaw(self.T_ARMOUR_TRAINING) >= 3 end} }, + require = { special={desc=_t"Be able to use massive armours", fct=function(self) return self:getTalentLevelRaw(self.T_ARMOUR_TRAINING) >= 3 end} }, on_learn = function(self, t) self:attr("size_category", 1) self:attr("max_encumber", 500) @@ -216,14 +216,14 @@ uberTalent{ info = function(self, t) return ([[Your strength is legendary; fatigue and physical exertion mean nothing to you. Your fatigue is permanently set to 0, carrying capacity increased by 500, and strength increased by 50 and you gain a size category.]]) - :format() + :tformat() end, } uberTalent{ name = "Legacy of the Naloren", mode = "passive", - require = { special={desc="Have sided with Slasul and killed Ukllmswwik", fct=function(self) + require = { special={desc=_t"Have sided with Slasul and killed Ukllmswwik", fct=function(self) if game.state.birth.ignore_prodigies_special_reqs then return true end local q = self:hasQuest("temple-of-creation") return q and not q:isCompleted("kill-slasul") and q:isCompleted("kill-drake") @@ -255,14 +255,14 @@ uberTalent{ t.callbackOnLevelup(self, t) end, on_learn = function(self, t) - require("engine.ui.Dialog"):simplePopup("Legacy of the Naloren", "Slasul will be happy to know your faith in his cause. You should return to speak to him.") + require("engine.ui.Dialog"):simplePopup(_t"Legacy of the Naloren", _t"Slasul will be happy to know your faith in his cause. You should return to speak to him.") end, info = function(self, t) local level = t.bonusLevel(self,t) return ([[You have sided with Slasul and helped him vanquish Ukllmswwik. You are now able to breathe underwater with ease. You have also learned to use tridents and other exotic weapons easily (talent level %d of Exotic Weapon Mastery), and can Spit Poison (talent level %d) as nagas do. These are bonus talent levels that increase with your character level. In addition, should Slasul still live, he may have a further reward for you as thanks...]]) - :format(level, level) + :tformat(level, level) end, } @@ -273,6 +273,6 @@ uberTalent{ return ([[A strong body is key to a strong mind, and a strong mind can be powerful enough to make a strong body. This prodigy grants a Mindpower bonus equal to 60%% of your Strength. Additionally, you treat all weapons as having an additional 40%% Willpower modifier.]]) - :format() + :tformat() end, } diff --git a/game/modules/tome/data/talents/uber/uber.lua b/game/modules/tome/data/talents/uber/uber.lua index f929115f212581c7663e229929e376ea5270fc57..021716c35c60b797b11dd2f3f279b45b20e33fcc 100644 --- a/game/modules/tome/data/talents/uber/uber.lua +++ b/game/modules/tome/data/talents/uber/uber.lua @@ -17,13 +17,13 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -newTalentType{ hide = true, type="uber/strength", name = "strength", description = "Ultimate talents you may only know one." } -newTalentType{ hide = true, type="uber/dexterity", name = "dexterity", description = "Ultimate talents you may only know one." } -newTalentType{ hide = true, type="uber/constitution", name = "constitution", description = "Ultimate talents you may only know one." } -newTalentType{ hide = true, type="uber/magic", name = "magic", description = "Ultimate talents you may only know one." } -newTalentType{ hide = true, type="uber/willpower", name = "willpower", description = "Ultimate talents you may only know one." } -newTalentType{ hide = true, type="uber/cunning", name = "cunning", description = "Ultimate talents you may only know one." } -newTalentType{ hide = true, type="uber/other", name = "other", description = "Ultimate talents you may only know one." } +newTalentType{ hide = true, type="uber/strength", name = _t"strength", description = _t"Ultimate talents you may only know one." } +newTalentType{ hide = true, type="uber/dexterity", name = _t"dexterity", description = _t"Ultimate talents you may only know one." } +newTalentType{ hide = true, type="uber/constitution", name = _t"constitution", description = _t"Ultimate talents you may only know one." } +newTalentType{ hide = true, type="uber/magic", name = _t"magic", description = _t"Ultimate talents you may only know one." } +newTalentType{ hide = true, type="uber/willpower", name = _t"willpower", description = _t"Ultimate talents you may only know one." } +newTalentType{ hide = true, type="uber/cunning", name = _t"cunning", description = _t"Ultimate talents you may only know one." } +newTalentType{ hide = true, type="uber/other", name = _t"other", description = _t"Ultimate talents you may only know one." } knowRessource = function(self, r, v) diff --git a/game/modules/tome/data/talents/uber/wil.lua b/game/modules/tome/data/talents/uber/wil.lua index 436d8d636c6b61728500d876d98335380cb065ed..310c3bfe7619b93e798c865394d0b3064c85d2e5 100644 --- a/game/modules/tome/data/talents/uber/wil.lua +++ b/game/modules/tome/data/talents/uber/wil.lua @@ -28,11 +28,11 @@ uberTalent{ self:setEffect(self.EFF_DRACONIC_WILL, 5, {}) return true end, - require = { special={desc="Be close to the draconic world", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:attr("drake_touched") and self:attr("drake_touched") >= 2) end} }, + require = { special={desc=_t"Be close to the draconic world", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:attr("drake_touched") and self:attr("drake_touched") >= 2) end} }, info = function(self, t) return ([[Your body is like that of a drake, easily resisting detrimental effects. For 5 turns, no detrimental effects may target you.]]) - :format() + :tformat() end, } @@ -42,7 +42,7 @@ uberTalent{ cooldown = 15, getDamage = function(self, t) return math.max(50 + self:combatSpellpower() * 5, 50 + self:combatMindpower() * 5) end, getLava = function(self, t) return math.max(self:combatSpellpower() + 30, self:combatMindpower() + 30) end, - require = { special={desc="Have witnessed a meteoric crash", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or self:attr("meteoric_crash") end} }, + require = { special={desc=_t"Have witnessed a meteoric crash", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or self:attr("meteoric_crash") end} }, passives = function(self, t, tmptable) self:talentTemporaryValue(tmptable, "auto_highest_inc_damage", {[DamageType.FIRE] = 1}) self:talentTemporaryValue(tmptable, "auto_highest_resists_pen", {[DamageType.FIRE] = 1}) @@ -115,7 +115,7 @@ uberTalent{ if target:canBe("stun") then target:setEffect(target.EFF_STUNNED, 3, {apply_power=math.max(src:combatSpellpower(), src:combatMindpower())}) else - game.logSeen(target, "%s resists the stun!", target.name:capitalize()) + game.logSeen(target, "%s resists the stun!", target:getName():capitalize()) end end end) @@ -140,7 +140,7 @@ uberTalent{ Additionally, your fire damage bonus and resistance penetration is set to your current highest damage bonus and resistance penetration. This applies to all fire damage you deal. The damage scales with your Spellpower or Mindpower.]]) - :format(damDesc(self, DamageType.FIRE, dam), damDesc(self, DamageType.PHYSICAL, dam), damDesc(self, DamageType.FIRE, t.getLava(self, t))) + :tformat(damDesc(self, DamageType.FIRE, dam), damDesc(self, DamageType.PHYSICAL, dam), damDesc(self, DamageType.FIRE, t.getLava(self, t))) end, } @@ -158,7 +158,7 @@ uberTalent{ self.inc_damage_actor_type.humanoid = (self.inc_damage_actor_type.humanoid or 0) - 20 self.inc_damage_actor_type.humanoid = (self.inc_damage_actor_type.giant or 0) - 20 end, - require = { special={desc="Possess and wear two of Garkul's artifacts and know all about Garkul's life", fct=function(self) + require = { special={desc=_t"Possess and wear two of Garkul's artifacts and know all about Garkul's life", fct=function(self) local o1 = self:findInAllInventoriesBy("define_as", "SET_GARKUL_TEETH") local o2 = self:findInAllInventoriesBy("define_as", "HELM_OF_GARKUL") return o1 and o2 and o1.wielded and o2.wielded and (game.state.birth.ignore_prodigies_special_reqs or ( @@ -171,7 +171,7 @@ uberTalent{ end} }, info = function(self, t) return ([[Garkul's spirit is with you. You now deal 1000%% more damage to constructs and 20%% more damage to humanoids and giants.]]) - :format() + :tformat() end, } @@ -191,18 +191,18 @@ uberTalent{ self:setEffect(self.EFF_HIDDEN_RESOURCES, 5, {}) return true end, - require = { special={desc="Have been close to death(killed a foe while below 1 HP)", fct=function(self) return self:attr("barely_survived") end} }, + require = { special={desc=_t"Have been close to death(killed a foe while below 1 HP)", fct=function(self) return self:attr("barely_survived") end} }, info = function(self, t) return ([[You focus your mind on the task at hand, regardless of how dire the situation is. For 5 turns, none of your talents use any resources.]]) - :format() + :tformat() end, } uberTalent{ name = "Lucky Day", mode = "passive", - require = { special={desc="Be lucky already (at least +5 luck)", fct=function(self) return self:getLck() >= 55 end} }, + require = { special={desc=_t"Be lucky already (at least +5 luck)", fct=function(self) return self:getLck() >= 55 end} }, on_learn = function(self, t) self.inc_stats[self.STAT_LCK] = (self.inc_stats[self.STAT_LCK] or 0) + 40 self:onStatChange(self.STAT_LCK, 40) @@ -215,7 +215,7 @@ uberTalent{ end, info = function(self, t) return ([[Every day is your lucky day! You gain a permanent +40 luck bonus and 10%% to move out of the way of every attack.]]) - :format() + :tformat() end, } @@ -225,13 +225,13 @@ uberTalent{ cooldown = 5, trigger = function(self, t) self:startTalentCooldown(t) - game.logSeen(self, "#LIGHT_BLUE#%s's unbreakable will shrugs off the effect!", self.name:capitalize()) + game.logSeen(self, "#LIGHT_BLUE#%s's unbreakable will shrugs off the effect!", self:getName():capitalize()) return true end, info = function(self, t) return ([[Your will is so strong that you simply ignore mental effects used against you. This effect can only occur once every 5 turns.]]) - :format() + :tformat() end, } @@ -239,10 +239,10 @@ uberTalent{ name = "Spell Feedback", mode = "passive", cooldown = 9, - require = { special={desc="Antimagic", fct=function(self) return self:knowTalentType("wild-gift/antimagic") end} }, + require = { special={desc=_t"Antimagic", fct=function(self) return self:knowTalentType("wild-gift/antimagic") end} }, trigger = function(self, t, target, source_t) self:startTalentCooldown(t) - self:logCombat(target, "#LIGHT_BLUE##Source# punishes #Target# for casting a spell!", self.name:capitalize(), target.name) + self:logCombat(target, "#LIGHT_BLUE##Source# punishes #Target# for casting a spell!", self:getName():capitalize(), target:getName()) DamageType:get(DamageType.MIND).projector(self, target.x, target.y, DamageType.MIND, 20 + self:getWil() * 2) local dur = target:getTalentCooldown(source_t) @@ -256,7 +256,7 @@ uberTalent{ Each time that you take damage from a spell, you punish the spellcaster with %0.2f mind damage. Also, they will suffer a 35%% spell failure chance (with duration equal to the cooldown of the spell they used on you). Note: this talent has a cooldown.]]) - :format(damDesc(self, DamageType.MIND, 20 + self:getWil() * 2)) + :tformat(damDesc(self, DamageType.MIND, 20 + self:getWil() * 2)) end, } @@ -266,7 +266,7 @@ uberTalent{ require = { }, cooldown = 20, tactical = { BUFF = 3 }, - require = { special={desc="Have dealt over 50000 mind damage", fct=function(self) return + require = { special={desc=_t"Have dealt over 50000 mind damage", fct=function(self) return self.damage_log and ( (self.damage_log[DamageType.MIND] and self.damage_log[DamageType.MIND] >= 50000) ) @@ -291,6 +291,6 @@ uberTalent{ return ([[Transcend the physical and rule over all with an iron will! While this sustain is active, 33%% of your damage is converted into mind damage. Additionally, you gain +30%% mind resistance penetration, and +10%% mind damage.]]): - format() + tformat() end, } diff --git a/game/modules/tome/data/talents/undeads/ghoul.lua b/game/modules/tome/data/talents/undeads/ghoul.lua index 0ff33c26436522da389b0204e38ec199f6af3fd9..80adc5fbb24fab2e8bc9ad14639d164d77adc0cb 100644 --- a/game/modules/tome/data/talents/undeads/ghoul.lua +++ b/game/modules/tome/data/talents/undeads/ghoul.lua @@ -33,7 +33,7 @@ newTalent{ info = function(self, t) return ([[Improves your ghoulish body, increasing Strength and Constitution by %d. Your body also becomes incredibly resilient to damage; you can never take a blow that deals more than %d%% of your maximum life.]]) - :format(t.statBonus(self, t), t.getMaxDamage(self, t)) + :tformat(t.statBonus(self, t), t.getMaxDamage(self, t)) end, } @@ -85,7 +85,7 @@ newTalent{ end, info = function(self, t) return ([[Leap toward your target. - When you land your global speed is increased by %d%% for 4 turns.]]):format(t.getSpeed(self, t)) + When you land your global speed is increased by %d%% for 4 turns.]]):tformat(t.getSpeed(self, t)) end, } @@ -124,7 +124,7 @@ newTalent{ MapEffect.new{color_br=30, color_bg=180, color_bb=60, effect_shader="shader_images/retch_effect.png"}, nil ) - game.logSeen(self, "%s #YELLOW_GREEN#VOMITS#LAST# on the ground!", self.name:capitalize()) + game.logSeen(self, "%s #YELLOW_GREEN#VOMITS#LAST# on the ground!", self:getName():capitalize()) game:playSoundNear(self, "talents/cloud") return true end, @@ -133,7 +133,7 @@ newTalent{ return ([[Vomit on the ground around you, healing any undead in the area and damaging anyone else. Lasts %d turns and deals %d blight damage or heals %d life. Creatures standing in the retch also have %d%% chance to remove a physical effect each turn; undeads will be stripped from a detrimental effect while others will be stripped from a beneficial effect. - When you stand in your own retch your racial -20%% global speed is cancelled.]]):format(t.getduration(self, t), damDesc(self, DamageType.BLIGHT, dam), dam * 1.5, t.getPurgeChance(self, t)) + When you stand in your own retch your racial -20%% global speed is cancelled.]]):tformat(t.getduration(self, t), damDesc(self, DamageType.BLIGHT, dam), dam * 1.5, t.getPurgeChance(self, t)) end, } @@ -159,9 +159,9 @@ newTalent{ local ghoul = NPC.new{ type = "undead", subtype = "ghoul", display = "z", - name = "Risen Ghoul", color=colors.TAN, + name = _t"Risen Ghoul", color=colors.TAN, image="npc/undead_ghoul_ghoul.png", - desc = [[Flesh is falling off in chunks from this decaying abomination.]], + desc = _t[[Flesh is falling off in chunks from this decaying abomination.]], faction = self.faction, level_range = {1, nil}, exp_worth = 0, life_rating = 10, @@ -218,7 +218,7 @@ newTalent{ game.party:addMember(ghoul, { control="no", type="minion", - title="Ghoulish Minion", + title=_t"Ghoulish Minion", orders = {target=true}, }) end @@ -237,7 +237,7 @@ newTalent{ target:setEffect(target.EFF_GHOUL_ROT, t.getDuration(self,t), {src=self, apply_power=self:combatPhysicalpower(), dam=t.getDiseaseDamage(self, t), make_ghoul=1}) end else - game.logSeen(target, "%s resists the disease!", target.name:capitalize()) + game.logSeen(target, "%s resists the disease!", target:getName():capitalize()) end end @@ -253,6 +253,6 @@ newTalent{ Targets suffering from Ghoul Rot rise as friendly ghouls when slain. Ghouls last for %d turns and can use Gnaw, Ghoulish Leap, Stun, and Rotting Disease. The blight damage scales with your Constitution.]]): - format(100 * damage, duration, damDesc(self, DamageType.BLIGHT, disease_damage), ghoul_duration) + tformat(100 * damage, duration, damDesc(self, DamageType.BLIGHT, disease_damage), ghoul_duration) end, } diff --git a/game/modules/tome/data/talents/undeads/skeleton.lua b/game/modules/tome/data/talents/undeads/skeleton.lua index 8f7dbae72d0e5ba4510d3f9e086153120e7a6b19..2ece882bddbd9fafb73c2cd55c09659fd8fdfba8 100644 --- a/game/modules/tome/data/talents/undeads/skeleton.lua +++ b/game/modules/tome/data/talents/undeads/skeleton.lua @@ -30,7 +30,7 @@ newTalent{ end, info = function(self, t) return ([[Improves your skeletal condition, increasing Strength and Dexterity by %d.]]): - format(t.statBonus(self, t)) + tformat(t.statBonus(self, t)) end, } @@ -52,7 +52,7 @@ newTalent{ info = function(self, t) return ([[Creates a shield of bones, absorbing %d damage. Lasts for 10 turns. The total damage the shield can absorb increases with your Dexterity.]]): - format(t.getShield(self, t) * (100 + (self:attr("shield_factor") or 0)) / 100) + tformat(t.getShield(self, t) * (100 + (self:attr("shield_factor") or 0)) / 100) end, } @@ -67,7 +67,7 @@ newTalent{ durresist = function(self, t) return self:combatTalentLimit(t, 1, 0.1, 5/12) end, -- Limit < 100% info = function(self, t) return ([[Your undead bones are very resilient, reducing the duration of all detrimental effects on you by up to %d%%.]]): - format(100 * t.durresist(self, t)) + tformat(100 * t.durresist(self, t)) end, } @@ -97,6 +97,6 @@ newTalent{ short_name = "SKELETON_REASSEMBLE", info = function(self, t) return ([[Reposition some of your bones, healing yourself for %d. At level 5, you will gain the ability to completely re-assemble your body should it be destroyed (can only be used once).]]): - format(t.getHeal(self, t)) + tformat(t.getHeal(self, t)) end, } diff --git a/game/modules/tome/data/talents/undeads/undeads.lua b/game/modules/tome/data/talents/undeads/undeads.lua index e7a99a3d480e805ae0174c4c88910ddc0a8337f1..0d9df4766138ea6174003e184716ddb940d1647a 100644 --- a/game/modules/tome/data/talents/undeads/undeads.lua +++ b/game/modules/tome/data/talents/undeads/undeads.lua @@ -18,11 +18,11 @@ -- darkgod@te4.org -- Undead talents -newTalentType{ type="undead/base", name = "base", generic = true, description = "Undead's innate abilities." } -newTalentType{ type="undead/ghoul", name = "ghoul", generic = true, description = "Ghoul's innate abilities." } -newTalentType{ type="undead/skeleton", name = "skeleton", generic = true, description = "Skeleton's innate abilities." } -newTalentType{ type="undead/vampire", name = "vampire", generic = true, description = "Vampire's innate abilities." } -newTalentType{ type="undead/lich", name = "lich", generic = true, description = "Liches innate abilities." } +newTalentType{ type="undead/base", name = _t"base", generic = true, description = _t"Undead's innate abilities." } +newTalentType{ type="undead/ghoul", name = _t"ghoul", generic = true, description = _t"Ghoul's innate abilities." } +newTalentType{ type="undead/skeleton", name = _t"skeleton", generic = true, description = _t"Skeleton's innate abilities." } +newTalentType{ type="undead/vampire", name = _t"vampire", generic = true, description = _t"Vampire's innate abilities." } +newTalentType{ type="undead/lich", name = _t"lich", generic = true, description = _t"Liches innate abilities." } -- Generic requires for undeads based on talent level undeads_req1 = { @@ -55,6 +55,6 @@ newTalent{ no_unlearn_last = true, on_learn = function(self, t) self.auto_id = 100 end, info = function(self) - return ([[You concentrate for a moment to recall some of your memories as a living being and look for knowledge to identify rare objects.]]) + return ([[You concentrate for a moment to recall some of your memories as a living being and look for knowledge to identify rare objects.]]):tformat() end, } diff --git a/game/modules/tome/data/texts/intro-archmage.lua b/game/modules/tome/data/texts/intro-archmage.lua index 5f58c6e3994f3291abfa32912c4ffa501503fdca..2c43a809ca69d0c8845465ed5d746c5466c5fae3 100644 --- a/game/modules/tome/data/texts/intro-archmage.lua +++ b/game/modules/tome/data/texts/intro-archmage.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are an archmage in a world that still fears magic. The people of Angolwen have been trying to mend the world for well over two thousand years now, but they do so in secret. You have lived and trained most of your life in Angolwen, calling many people there your friends, but you have grown restless as of late. diff --git a/game/modules/tome/data/texts/intro-arena.lua b/game/modules/tome/data/texts/intro-arena.lua index 96cbb90b2978dc0fd05d59c0518068c27ac12f71..7aa3689af871cf14c86f86385607102439a3353e 100644 --- a/game/modules/tome/data/texts/intro-arena.lua +++ b/game/modules/tome/data/texts/intro-arena.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. As you walk forward, you hear the increasingly loud cheers coming from outside. As you step into the arena, the scorching sun blinds your eyes temporarily. You look up, and meet your target eye to eye: The Master of the Arena, carefully examining diff --git a/game/modules/tome/data/texts/intro-chronomancer.lua b/game/modules/tome/data/texts/intro-chronomancer.lua index 868a6564d8042d77916c1c7030c38b709bd4354f..8d1c9c8afce1423a14d9c3aa54a448e72b5c2bf6 100644 --- a/game/modules/tome/data/texts/intro-chronomancer.lua +++ b/game/modules/tome/data/texts/intro-chronomancer.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are a chronomancer, a Keeper of Reality. The Keepers of Reality are a group of chronomancers who took upon the self-assigned task of preserving the timelines around Eyal. diff --git a/game/modules/tome/data/texts/intro-cornac.lua b/game/modules/tome/data/texts/intro-cornac.lua index e0d8b77dc7a7c423cfdf67f27e4bbff528356158..fe0ec23a5a71fe7b4f8092d09174a33ef6f2e93a 100644 --- a/game/modules/tome/data/texts/intro-cornac.lua +++ b/game/modules/tome/data/texts/intro-cornac.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are a native of the northern region of the Allied Kingdoms, a peaceful land that both Humans and Halflings call home. You hail from the small town called Derth. Humans are the most common race of the land, and you are one of them. In an attempt to prove your worth, you have decided to venture into the old and wild places of the world, looking for ancient treasures and glory. diff --git a/game/modules/tome/data/texts/intro-dwarf.lua b/game/modules/tome/data/texts/intro-dwarf.lua index 43fb30d618424e5f108f57661c08211dd83212a8..f7d8ff4d4d7756cd1d3188553f9218783665c064 100644 --- a/game/modules/tome/data/texts/intro-dwarf.lua +++ b/game/modules/tome/data/texts/intro-dwarf.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are a member of the proud, but secretive, race of the Dwarves. Hailing from the Dwarven Empire of the Iron Throne, you have been sent to investigate the old fortress of Reknor which has been overrun by orcs. diff --git a/game/modules/tome/data/texts/intro-ghoul.lua b/game/modules/tome/data/texts/intro-ghoul.lua index 42ac793bad1914f3f116374385687c7ed8d749f1..99eda13c8099e51e822caa9d26fe77e3a941205d 100644 --- a/game/modules/tome/data/texts/intro-ghoul.lua +++ b/game/modules/tome/data/texts/intro-ghoul.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You died ages ago, but that did not stop you. You were raised as an undead ghoul. Your Necromancer master has plans for you, but something is wrong: you seem to have kept your free will. diff --git a/game/modules/tome/data/texts/intro-halfling.lua b/game/modules/tome/data/texts/intro-halfling.lua index 1f8054e0e145f7ce79ad7c1b63678127092119be..37eefda7765b420e9709273fd71d4e779c2c175b 100644 --- a/game/modules/tome/data/texts/intro-halfling.lua +++ b/game/modules/tome/data/texts/intro-halfling.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are a Halfling of Derth. Most people take Halflings for peaceful crop-growers that never leave the borders of their gardens. Yet history has taught that Halflings are a force to be reckoned with. They still maintain a powerful army. You have chosen a rare path for yourself: the path of adventuring, whose loneliness does not usually fit your people. diff --git a/game/modules/tome/data/texts/intro-higher.lua b/game/modules/tome/data/texts/intro-higher.lua index 913881a7431e7f02ef49506114b3f27aa9b23a35..a20448c8d96f9c40395f034e14875a02088c31b7 100644 --- a/game/modules/tome/data/texts/intro-higher.lua +++ b/game/modules/tome/data/texts/intro-higher.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are one of the Higher, the most powerful and respected lineage of men. Many of your kind serve as high counsellors in various Allied Kingdoms cities. Not you. You want more; you need to prove your worth and make your own place in the world. You have decided to venture into the old and wild places of the world, looking for ancient treasures and glory. diff --git a/game/modules/tome/data/texts/intro-infinite-dungeon.lua b/game/modules/tome/data/texts/intro-infinite-dungeon.lua index 561c486c3656a833245f67499d4ca13dc69de481..84db1f73db3c5748b946eaa195a45af71b757ce7 100644 --- a/game/modules/tome/data/texts/intro-infinite-dungeon.lua +++ b/game/modules/tome/data/texts/intro-infinite-dungeon.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You have arrived in the Infinite Dungeon. Your life outside did not satisfy you, so you came here looking for adventure. While you know this is a one way trip, you hope to go in a blaze of glory! diff --git a/game/modules/tome/data/texts/intro-ogre.lua b/game/modules/tome/data/texts/intro-ogre.lua index 186626464aea802410970f20dd75bf049ff005b1..ccf31d348ede25bac79f6836ce864fafd6b7a089 100644 --- a/game/modules/tome/data/texts/intro-ogre.lua +++ b/game/modules/tome/data/texts/intro-ogre.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are an Ogre, hailing from Elvala. You face contempt and fear from a world your kind have never wronged, and the Spellhunt would have eradicated your race entirely, had the Shalore not shown sympathy and granted your ancestors refuge in Elvala. diff --git a/game/modules/tome/data/texts/intro-orc.lua b/game/modules/tome/data/texts/intro-orc.lua index ac33896a95f90ce4cff390377e9ebf9e95ca8e53..968d6434257c9aa96bce74ae7fa9a6d6599f3209 100644 --- a/game/modules/tome/data/texts/intro-orc.lua +++ b/game/modules/tome/data/texts/intro-orc.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are a member of the feared race of the Orcs. BLAH BLAH BLAH diff --git a/game/modules/tome/data/texts/intro-shalore.lua b/game/modules/tome/data/texts/intro-shalore.lua index 527d4fffd1ac61504c3988c0fda45d3f6fef46b7..358fe5257c971b360944851dcde354110f641231 100644 --- a/game/modules/tome/data/texts/intro-shalore.lua +++ b/game/modules/tome/data/texts/intro-shalore.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are of the Shaloren, the Elven race with the closest ties to magic, and you are despised. While your people are at peace with the other kingdoms, many have not forgotten it was your race that created the terrible Spellblaze, thousands of years ago. diff --git a/game/modules/tome/data/texts/intro-skeleton.lua b/game/modules/tome/data/texts/intro-skeleton.lua index 0a103b8571b8a7d2e6ee4347bc6f331fd6ed9727..5ecff4e7c203dcd49910d1f2dc01c425556ee581 100644 --- a/game/modules/tome/data/texts/intro-skeleton.lua +++ b/game/modules/tome/data/texts/intro-skeleton.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You died ages ago, but that did not stop you. You were raised as an undead skeleton. Your Necromancer master has plans for you, but something is wrong: you seem to have kept your free will. diff --git a/game/modules/tome/data/texts/intro-sunwall.lua b/game/modules/tome/data/texts/intro-sunwall.lua index a5c685883ae2c69ad7f0ca9b27b5fad5432012a7..68f425b7b23c12a6fae04b6c569b10515ef4bb94 100644 --- a/game/modules/tome/data/texts/intro-sunwall.lua +++ b/game/modules/tome/data/texts/intro-sunwall.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are a citizen of the Sunwall, and like many of your age you have been trained in combat and magic. It can be a harsh life, and though you dream at times of venturing to distant lands you know your duty is to help defend the outpost against the vicious onslaught from the Orc Prides. But now High Sun Paladin Aeryn has advised you of a new threat. Nagas have been sighted in the Slazish Fens on the other side of the Sunwall Mountains. Their objective is unclear, but an assault from both sides would be truly devastating at such a pivotal time for your people. Though there are few forces to spare on the front line against the Prides, you have volunteered to investigate the naga threat and stop them if need be. diff --git a/game/modules/tome/data/texts/intro-thalore.lua b/game/modules/tome/data/texts/intro-thalore.lua index 1d7baa336522a6770b2f9000381af9b5e1586c4e..5e808562b97f597427bc23b67cc7c873cd14ea7c 100644 --- a/game/modules/tome/data/texts/intro-thalore.lua +++ b/game/modules/tome/data/texts/intro-thalore.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are of the Thaloren, the Elven race closest to nature. Your people have lived for thousands of years in their forest, rarely taking part in the events of the outside world. Yet when their home is threatened, the Thaloren Elves can prove to be fearsome combatants. You lived a peaceful life deep in the forest for many years, but lately you have grown restless and have decided to step into the world. diff --git a/game/modules/tome/data/texts/intro-tutorial-combat-stats.lua b/game/modules/tome/data/texts/intro-tutorial-combat-stats.lua index b4b7aa55845b6ad586166f9a1c64771b919b1fe8..9f7f8df7e598f7037749418fbcc7acbad98ea795 100644 --- a/game/modules/tome/data/texts/intro-tutorial-combat-stats.lua +++ b/game/modules/tome/data/texts/intro-tutorial-combat-stats.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ #LIGHT_GREEN#Welcome to ToME 4#LAST# The #GOLD#Dungeon of Adventurer Enlightenment#WHITE# awaits you ahead! diff --git a/game/modules/tome/data/texts/intro-tutorial.lua b/game/modules/tome/data/texts/intro-tutorial.lua index c1ee189bb25839192a8ec9c92d5779fdd5c5fd81..0d2ca84ab1f910cf8cb2bc6eec0fe69e2788fbf1 100644 --- a/game/modules/tome/data/texts/intro-tutorial.lua +++ b/game/modules/tome/data/texts/intro-tutorial.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[#LIGHT_GREEN#Welcome to Tales of Maj'Eyal!#LAST# +return _t[[#LIGHT_GREEN#Welcome to Tales of Maj'Eyal!#LAST# This tutorial will present you with a short quest to familiarise yourself with the game. You are a Human adventurer sent into the forest by the local village to dispose of the "Lone Wolf". diff --git a/game/modules/tome/data/texts/intro-yeek.lua b/game/modules/tome/data/texts/intro-yeek.lua index 011f154fe6703587d62d6f4e1b1f28ad3ad7ccc9..ef728dcb0d5c1d7a0ed0ea2605e95e501a1184b6 100644 --- a/game/modules/tome/data/texts/intro-yeek.lua +++ b/game/modules/tome/data/texts/intro-yeek.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Welcome #LIGHT_GREEN#@name@#WHITE#. +return _t[[Welcome #LIGHT_GREEN#@name@#WHITE#. You are a Yeek Wayist of Irkkk. All Yeeks follow the Way, which is both a global psionic link that unifies the whole Yeek race, and a way of life. Your whole life is dedicated to serving the Yeek race. You feel compelled by the Way to protect your race at all costs - even your own life. diff --git a/game/modules/tome/data/texts/message-last-hope.lua b/game/modules/tome/data/texts/message-last-hope.lua index cf04bdd77199e7b688716810b0902d8510342d86..06b0de5feca331dc1b77b5f60dcf2abd1d0fc9fb 100644 --- a/game/modules/tome/data/texts/message-last-hope.lua +++ b/game/modules/tome/data/texts/message-last-hope.lua @@ -20,7 +20,7 @@ local delivered_staff = game.player:resolveSource():isQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk") if delivered_staff then -return [[@playername@, this message is of utmost importance. +return _t[[@playername@, this message is of utmost importance. The staff you left at Last Hope is gone. A raid of orcs ambushed the guards that were transporting it to a secret vault. Our troops managed to capture one of the orcs and made him talk. @@ -33,7 +33,7 @@ This calls for urgency; should you find this Golbug or the portal, please invest else -return [[@playername@, this message is of utmost importance. +return _t[[@playername@, this message is of utmost importance. Our elders searched the old texts looking for clues about the staff of which you spoke. It turns out to be a powerful object indeed, able to absorb the power of places, and beings. diff --git a/game/modules/tome/data/texts/tutorial/combat-stats-intro.lua b/game/modules/tome/data/texts/tutorial/combat-stats-intro.lua index 644469132a3bad7bbe17c502bf0ddd6fb2ba0b14..feb23d08031443a3a5d7d0f4032228aedafc8351 100644 --- a/game/modules/tome/data/texts/tutorial/combat-stats-intro.lua +++ b/game/modules/tome/data/texts/tutorial/combat-stats-intro.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Onward! The #GOLD#Dungeon of Adventurer Enlightenment#WHITE# awaits you! ]] diff --git a/game/modules/tome/data/texts/tutorial/done.lua b/game/modules/tome/data/texts/tutorial/done.lua index 68680a15d8ada4f77609dfe0015013ee08d9ff09..213bd8cf75d4d27a01b48c3998a211b4e27b77ef 100644 --- a/game/modules/tome/data/texts/tutorial/done.lua +++ b/game/modules/tome/data/texts/tutorial/done.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[#GOLD#Congratulations !#WHITE# +return _t[[#GOLD#Congratulations !#WHITE# You have completed this small tutorial, and should now know the basics of ToME4. You are ready to step forward into the world to find glory, treasures and be mercilessly slaughtered by hordes of creatures you thought you could handle! During this tutorial some creatures were adjusted to the need of the teachings, beware, in the real world trolls are not usually this nice! diff --git a/game/modules/tome/data/texts/tutorial/levelup.lua b/game/modules/tome/data/texts/tutorial/levelup.lua index 924f7cec09b48f8605a96eb26c634e2698cc74b1..5726a3f4abb90d4c9ce9d4e0d518786979f3c712 100644 --- a/game/modules/tome/data/texts/tutorial/levelup.lua +++ b/game/modules/tome/data/texts/tutorial/levelup.lua @@ -19,7 +19,7 @@ game.player:forceLevelup(2) -return [[In ToME4 a character's power depends on her/his level: players can get up to level 50. +return _t[[In ToME4 a character's power depends on her/his level: players can get up to level 50. Each level brings more life and resources (like stamina, mana, etc.) and different kinds of points that can improve your character: * #GOLD#Stat points#WHITE#: They allow you to raise the six main stats: Strength, Dexterity, Magic, Willpower, Cunning and Constitution. You get 3 points per level. diff --git a/game/modules/tome/data/texts/tutorial/melee.lua b/game/modules/tome/data/texts/tutorial/melee.lua index 0bd0e31f69a0158c9990efe2fca85710bd71b278..a5ef8a6ce78c1f2d0a4e24cf5b18d1c57be1a6e6 100644 --- a/game/modules/tome/data/texts/tutorial/melee.lua +++ b/game/modules/tome/data/texts/tutorial/melee.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Melee attacks work like movement. Just move in your foe's direction, or click it, to attack it. +return _t[[Melee attacks work like movement. Just move in your foe's direction, or click it, to attack it. If it is not hostile you will talk to it, or switch places with it. Melee combat mainly uses five stats: diff --git a/game/modules/tome/data/texts/tutorial/move.lua b/game/modules/tome/data/texts/tutorial/move.lua index 29cf67e7706b58bee9f8955ec28aaa85f9ff4d4e..74765a5f3c9e38a7bb16c90c0f9f6a0f20baa8d7 100644 --- a/game/modules/tome/data/texts/tutorial/move.lua +++ b/game/modules/tome/data/texts/tutorial/move.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[Movement is simple. You can use the keyboard, the mouse, or both. +return _t[[Movement is simple. You can use the keyboard, the mouse, or both. #GOLD#Keyboard:#WHITE# - Press the arrow keys or keypad to move in the given direction. diff --git a/game/modules/tome/data/texts/tutorial/objects.lua b/game/modules/tome/data/texts/tutorial/objects.lua index e8b76e1f8a5d9a7b0ef040eb3e1bfda02efbedef..18a9bbb37b2826bda62c1cfc1ed0497a0e2206f7 100644 --- a/game/modules/tome/data/texts/tutorial/objects.lua +++ b/game/modules/tome/data/texts/tutorial/objects.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[During your adventures you will find items. +return _t[[During your adventures you will find items. Each item has a weight. How much you can carry depends on your Strength: this is your maximum encumbrance. To pickup an item, press 'g' or right click on yourself and choose 'Pickup item' while standing over it. To view your inventory, press 'i' or right-click on yourself and choose 'Inventory'. diff --git a/game/modules/tome/data/texts/tutorial/quests.lua b/game/modules/tome/data/texts/tutorial/quests.lua index 730b06f9caf4bedcf699503fa5d0cec9f0c252ad..24d740d0832cb603b02085d549d41029a199e66d 100644 --- a/game/modules/tome/data/texts/tutorial/quests.lua +++ b/game/modules/tome/data/texts/tutorial/quests.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[During your adventures you will find quests. +return _t[[During your adventures you will find quests. A quest can come from performing an action, finding an item, speaking to somebody, and more. You can view your current quests by pressing 'j' or right-clicking yourself. diff --git a/game/modules/tome/data/texts/tutorial/ranged.lua b/game/modules/tome/data/texts/tutorial/ranged.lua index d90489e0fbcb244c0a0be4b8824af7ef41b55ca4..fac66f046319ae4b7a79d83b50296c394e37bc62 100644 --- a/game/modules/tome/data/texts/tutorial/ranged.lua +++ b/game/modules/tome/data/texts/tutorial/ranged.lua @@ -22,7 +22,7 @@ if not game.player.tutored_levels2 then game.player.tutored_levels2 = true end -return [[Ranged combat typically revolves around firing arrows, slinging stones, or casting spells. +return _t[[Ranged combat typically revolves around firing arrows, slinging stones, or casting spells. You have been given a bow, which you wield with both hands. Arrows are infinite but need reloading from time to time, by waiting, resting or walking around. You can add special arrows to your quiver for extra damage and/or effects. To fire an arrow, use the Shoot talent. The target interface will pop-up, just like for other talents. diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc0.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc0.lua index 41990db8db77a84d45bfa2f85d058531013145bf..c581b991c5053de907fb200dea4d2423183b6fee 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc0.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc0.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ It's finally time to stab something. There's an orc up ahead; make sure you're wearing your #GOLD#Helmet of Accuracy (+6)#WHITE# from earlier, and go attack him! diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc1.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc1.lua index 71aa2f66a34353d0fa1af5dab4d95c489fe7d2c8..52ab7d02f2ab7ada034e421cb60fccdceeb48262 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc1.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc1.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Sucker can dodge some. As you know by now, the game was comparing your #LIGHT_GREEN#Accuracy#WHITE# to the orc's #LIGHT_GREEN#Defense#WHITE# to determine whether your blows landed. Evidently, the comparison did not go well for you. diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc10.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc10.lua index 93779d055a8bab4e809d32fb52d8c18856c3bfca..4ba0f0c33c43557c22e24dcfe0aebd04d31bab01 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc10.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc10.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Congratulations! Hopefully this series of obstacles has led you to some conclusions: 1) When comparing #GOLD#combat stat#WHITE# scores, a difference of ten is the magic number that maximizes success. diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc11.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc11.lua index b078f7b307335334b04b5f19db0183cd3418e4b2..42ad1cf0654fbf6d6d09cb19323e8f84b17c041d 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc11.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc11.lua @@ -17,6 +17,6 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Descend to the penultimate level of the #GOLD#Dungeon of Adventurer Enlightenment#WHITE# to learn all about detrimental #GOLD#timed effects.#WHITE# ]] diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc2.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc2.lua index f23071626e095b30d90fe43cdc0a47f441a9be52..b343109baf5801fdebf036e382d36f878aa4df9c 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc2.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc2.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ If you were wearing your #GOLD#Helmet of Accuracy (+6)#WHITE#, then you should have #LIGHT_GREEN#38 Accuracy#WHITE#, while the orc has #LIGHT_GREEN#48 Defense#WHITE#. The difference is ten in the orc's favor, which is apparently too much for you to be able to hit him. There's another orc ahead with slightly lower defense. Go get him! diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc3.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc3.lua index f0ca349ef8f01b17c358c757fc315ec457762434..8949bcb1df0481e5c2169894ba730d7acbe6490a 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc3.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc3.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ That one you should have been able to occasionally hit, and-- if you were persistent-- kill. I hope you took note of its #LIGHT_GREEN#Defense#WHITE# score before it died. diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc4.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc4.lua index 62e0de3d4aebf40f63574be5d5d940ccdc05aa33..ff6f57dfe8b2da3b6b2045e8fdc907b731f29695 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc4.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc4.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ They were more successful at hitting you, though their damage wasn't enough to be threatening. Compare their #LIGHT_GREEN#Accuracy#WHITE#, 14, to your #LIGHT_GREEN#Defense#WHITE#. diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc5.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc5.lua index 2bb8babff922860277b506d8d299ecc59ebc7371..8beb8b2595d41c409d136c3f624ac470788dd924 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc5.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc5.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ There's an orc ahead with some prodigous health regeneration. Compare your #LIGHT_GREEN#Accuracy#WHITE# and #LIGHT_GREEN#Defense#WHITE# to its #LIGHT_GREEN#Defense#WHITE# and #LIGHT_GREEN#Accuracy#WHITE#. diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc6.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc6.lua index 844c011338c56eade100c34b1678aa00a173e9f1..b70b340aa05b9de352b6079b5cb17804cefef615 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc6.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc6.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ You've learned Shove, a weak knockback effect. Which #GOLD#combat stats#WHITE# will get compared when you attempt to Shove somebody? diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc7.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc7.lua index 016c3a4f1d664eaa22b9da8424af627ccacd4742..2128c21aea44aea11a49ea3f54cdff5a2cfba213 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc7.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc7.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Did you try shoving both the enemies blocking passage into this room? Can you say now which #GOLD#combat stats#WHITE# get compared when you Shove somebody? diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc8.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc8.lua index 32634e325dedfdf8e6332348ea73d78ec23b21eb..040138f9d1028bd3043c69f5ca55d82b3caf0800 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc8.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc8.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ There's another pesky orc plugging the tunnel to the west, and some new tools in the cave to the north. Find a means to push that orc out of the way! diff --git a/game/modules/tome/data/texts/tutorial/stats-calc/calc9.lua b/game/modules/tome/data/texts/tutorial/stats-calc/calc9.lua index b0c4e15a4dfac81566fe94d6ca0bd90a7802c66e..8fb79312caeba2b59d6aa2fc658d3e98a0913826 100644 --- a/game/modules/tome/data/texts/tutorial/stats-calc/calc9.lua +++ b/game/modules/tome/data/texts/tutorial/stats-calc/calc9.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Once again, the route ahead is blocked. Find a way through! ]] diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/informed1.lua b/game/modules/tome/data/texts/tutorial/stats-scale/informed1.lua index 598635a791c65dfedde198537df587bfb2e78eb5..31c0eb56664780f66301fce5b8fa12d1a41eda59 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/informed1.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/informed1.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Armed with the knowledge of how important #GOLD#combat stats#WHITE# are, we now go in search of them. Yours are displayed in your character sheet. Once you've closed this window, you can open it and move your mouse cursor over them to see a brief description of what they do. The tooltip mentions some stuff we haven't covered yet, but we'll get there. So what about seeing a monster's #GOLD#combat stats#WHITE#? This would hardly be a dungeon without creepy denizens; there's an orc ahead you can examine. Use the mouse or the 'l'ook command to examine that orc. diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale1.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale1.lua index fed38e811919978a978fa84898ac759306346c9f..317521dcaada6c164af6cb86864b55b7dbc81f3d 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale1.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale1.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ As you can see, the #GOLD#combat stat#WHITE# scores are displayed in two columns with offensive #GOLD#combat stats#WHITE# to the left and defensive #GOLD#combat stats#WHITE# to the right. The displayed numbers are color coded according to their value. diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale10.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale10.lua index 1550c1606b732a185941ce139ed00401e39f63dc..37a3866262799fa3387babff520163812612ee03 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale10.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale10.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ How did you do this time? Your #LIGHT_GREEN#Mental Save#WHITE# score is #00FF80#tier 3#WHITE#, and an item that granted you +6 #LIGHT_GREEN#Mental Save#WHITE# only increased this score by 2. Can you explain what's going on? diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale11.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale11.lua index 19afb997ac1c899d31f2d6dac474f2100dbb112a..717dbe95fd372b26169900eefe11f69539bf86dd 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale11.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale11.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ It simply costs more to increase scores that are in higher tiers. For each tier, here's the cost of increasing your score by one: diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale12.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale12.lua index b6184d2fd295b5644e99a48d821d34668434c577..7be5fdc18b0b2c78f2cf89b2c2e777c30dde02f6 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale12.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale12.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ This gets expensive! It's entirely possible-- even likely-- for a game-winning character to never have any #8d55ff#Tier 5#WHITE# scores. There are stairs ahead. Descend further into the #GOLD#Dungeon of Adventurer Enlightenment#WHITE# to learn how exactly #GOLD#combat stat#WHITE# scores affect gameplay. diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale2.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale2.lua index 8e6a43c4fb437c1a897d60d937fe5ddb33d20569..adad9e8d00c3b39891b2bfac000470fff9fa60d7 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale2.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale2.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Some clues: 1) #LIGHT_GREEN#Defense#WHITE# is 20 and #LIGHT_GREEN#Physical Save#WHITE# is 21, yet they have different colors and positions. diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale3.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale3.lua index 412259e11ed06b8bc002e412d15828b8c57d3b7a..69d5020f36c269aaf3a90f3c4263146c8ac5fe55 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale3.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale3.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ #GOLD#Combat stat#WHITE# scores are between one and one-hundred, with special color coding applied for each interval of twenty. The colors are the same hues as those used in inventory text to indicate gear quality. These subintervals of twenty we'll call #GOLD#tiers#WHITE# from now on. diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale4.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale4.lua index 321d2291d6ac733f74af83698ddcdc1cf75d5e80..da3657e0b80d344ee9ee50ab4933b3ae16d2eb91 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale4.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale4.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ A summary of the #GOLD#combat stat#WHITE# tiers: #B4B4B4#Tier 1#WHITE# scores, those from one to twenty, are displayed in #B4B4B4#grey#WHITE#. diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale5.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale5.lua index 18f287a2dd817d36fb64b3624fb275598ba017f5..9d9940a2328eb9645806d047251ed9b02a4c6832 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale5.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale5.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ These tiers are not just for show. Let's see if you can discover a way in which they're NOT purely cosmetic. Go plunder the room ahead! diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale6.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale6.lua index 5bb2975c2eb53476ff1c92e08fd87c6285a9c0d8..2793790b975f3b7f81d09807e48c01b4406a25f6 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale6.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale6.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ By how much did the amulet increase your #B4B4B4#tier 1#WHITE# #LIGHT_GREEN#Mindpower#WHITE# score? By how much did the boots increase your #FFFFFF#tier 2#WHITE# #LIGHT_GREEN#Physical save#WHITE# score? diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale7.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale7.lua index a94e6051613d4508d4a7df9783330b7b71aedc93..a25c21b448a361885521394d450dd4fed15feb0e 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale7.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale7.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Those boots appear to have only increased your #LIGHT_GREEN#Physical save#WHITE# by 5. What do you suppose would be the effects of putting on a helmet with +6 #LIGHT_GREEN#Accuracy#WHITE#? diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale8.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale8.lua index e1376f2f387cc019c38cc158c882a242a036b1c5..73ace0968473dd71a940731a65c378665ce20fa1 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale8.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale8.lua @@ -17,6 +17,6 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Test your hypothesis! ]] diff --git a/game/modules/tome/data/texts/tutorial/stats-scale/scale9.lua b/game/modules/tome/data/texts/tutorial/stats-scale/scale9.lua index 9ec932ca17f309f353e5ea852f7f7f541d7d3c8f..00df52df3a35ef7330aafe3c7e4017b5672f9219 100644 --- a/game/modules/tome/data/texts/tutorial/stats-scale/scale9.lua +++ b/game/modules/tome/data/texts/tutorial/stats-scale/scale9.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Did you accurately predict that +6 to a #FFFFFF#tier 2#WHITE# #GOLD#combat stat#WHITE# score would result in an increase of only 3? Let's try again in the next room. What do you suppose will happen when you put on an item that grants you +6 #LIGHT_GREEN#Mental save#WHITE#? diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier0.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier0.lua index 211a8c7b7557a2684ccc2b0049f46fb79beb0a23..79d71b029131c47f679f89212d534d1ef146115d 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier0.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier0.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Until now, a certain game mechanic has been disabled. Go learn a new talent at the nearby Rune of Enlightenment and use it to blast each of the enemies in the next room. Can you identify the new mechanic? diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier1.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier1.lua index b3e698853e1a1cf2fa2c98ff1d96e5fd7b9c9acc..b89fdf2c679e1742a7743709e4a8ff49d844c75b 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier1.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier1.lua @@ -17,6 +17,6 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ If you don't notice anything, try examining each monster's tooltip immediately after using Mana Gale on it. ]] diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier10.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier10.lua index fb8a255200fcb0be4615f80101eed81dd38427ab..14ffd4e04e139513cf16354caaf804a3e6d45a3b 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier10.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier10.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Basic attacks, ones that compare #LIGHT_GREEN#Accuracy#WHITE# to #LIGHT_GREEN#Defense#WHITE#, only apply #GOLD#cross-tier afflictions#WHITE# on critical hits. Still, it's a good reason to not neglect your #LIGHT_GREEN#Defense#WHITE# stat, even if it's not central to your class. diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier11.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier11.lua index 5f085a63dc44a2615ca4cd3940518a296edc1931..05c0b4764ac646b0429e749fbfcfbe1e907b456a 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier11.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier11.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ #GOLD#Congratulations!#WHITE# You have completed the combat stats tutorial. Hopefully it has been of some use to you. ]] diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier12.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier12.lua index 58fcbdf3a88069f9e5cdeed4f6c9558b7edd4d63..acc4d51eb2159f6ad194ae4aa00a69b43cffe018 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier12.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier12.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ #LIGHT_GREEN#For those who want to join the discussion on these new mechanics, please first read the document "Transparency.rtf" found here:#WHITE# tome/data/texts/Transparency.rtf diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier2.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier2.lua index f6747fd4c57cec07efcca42311522b128fc670e2..44a9fb030d9d95aa28056447b3cbaa49737c5800 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier2.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier2.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Can you explain the difference in the durations for that "Off-balance" timed effect you're inflicting? Why is one of the spiders unaffected? diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier3.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier3.lua index 67082c7004301d9ea58573c9e2ee1d9099345020..bab741d5439957047f3399451d2d1bd109dfa466 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier3.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier3.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Have you determined what's causing those new timed effects? If not, then consider the following questions: diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier4.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier4.lua index e09802124253453c73608e678891534fa9e577c3..365b3d7ca911e0d0c45e37a503692b7dfcc9bb7c 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier4.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier4.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Let's take a closer look at these new timed effects. The easiest way to do that is to have them inflicted on you. Ahead are a series of bored elves who will happily blast you with whatever spell they have handy. Examine the tooltip of each effect they inflict on you. diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier5.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier5.lua index 9ce81a1f6f0a5c40569939d668582353a6e2e06c..3da0e31dff519264bdcded472dfb111e233bed48 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier5.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier5.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Note that all three elves were casting using a #8d55ff#Tier 5#WHITE# #GOLD#combat stat#WHITE#, though they produced effects that varied in duration. If you hadn't already deduced the rules governing these new status effects, hopefully this helped. diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier6.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier6.lua index 7df8f93a6b5e9f4448f6a4c854c1a6f41a70c1ca..2969f56696694e7c643ad79f9b832fe5c2d36b63 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier6.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier6.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ These new effects are #GOLD#cross-tier effects#WHITE#. They occur when a talent calls for comparing #GOLD#combat stats#WHITE# that aren't in the same tier. Physical effects cause the "Off-balance" effect. diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier7.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier7.lua index 36b0b0856c3a52f63a29008eff67654d5d4f25e4..cc85e4f61c5f7b51d19750673360e07b74cb767c 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier7.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier7.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Be very careful about neglecting your defensive #GOLD#combat stats#WHITE#. A long-lasting #GOLD#cross-tier effect#WHITE# is dangerous! At the same time, be on the lookout for enemies a very low defensive #GOLD#combat stat#WHITE#, and consider hitting them with something appropriate to inflict a #GOLD#cross-tier effect#WHITE#! diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier8.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier8.lua index 846f34caf099a061db25b350e69bb73e100bb4e4..50a094b9677e3d85469763e50ffff580cb15337a 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier8.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier8.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ What about #LIGHT_GREEN#Defense?#WHITE# Is it safe to neglect that? Go see how your #B4B4B4#Tier 1#WHITE# #LIGHT_GREEN#Defense#WHITE# holds up against the orcs in the next room. diff --git a/game/modules/tome/data/texts/tutorial/stats-tier/tier9.lua b/game/modules/tome/data/texts/tutorial/stats-tier/tier9.lua index b768903b2ec6011e2e865f7172dddd56e80378c3..6b122cec4da05969ba0904a420f7011735ff4e6c 100644 --- a/game/modules/tome/data/texts/tutorial/stats-tier/tier9.lua +++ b/game/modules/tome/data/texts/tutorial/stats-tier/tier9.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Their melee attacks seem to sometimes apply the "Off-balance" effect, but not always. Can you figure out when it gets applied and when it doesn't? diff --git a/game/modules/tome/data/texts/tutorial/stats-timed/timed0.lua b/game/modules/tome/data/texts/tutorial/stats-timed/timed0.lua index f83bdb2829362040c9c78b8487c914ba63395518..ae79a5d89d1bb8a497985a8b79dc8b07850c6244 100644 --- a/game/modules/tome/data/texts/tutorial/stats-timed/timed0.lua +++ b/game/modules/tome/data/texts/tutorial/stats-timed/timed0.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Detrimental #GOLD#timed effects#WHITE# are conditions which cause various short-term problems, such as blindness, confusion, stunning, poisoning, slowing, and much more. Much of what we've seen so far applies to them; the type of effect determines what defensive #GOLD#combat stat#WHITE# the defender uses, and the source of the effect determines what offensive #GOLD#combat stat#WHITE# the attacker uses. Let's experiment to find out more. Move on to learn a new talent. Be sure to read its description! diff --git a/game/modules/tome/data/texts/tutorial/stats-timed/timed1.lua b/game/modules/tome/data/texts/tutorial/stats-timed/timed1.lua index ee9cd972956d5ed0de90de2b8eea013d6f00ec77..54cee801dda7654f81511f6963fd116824ff8590 100644 --- a/game/modules/tome/data/texts/tutorial/stats-timed/timed1.lua +++ b/game/modules/tome/data/texts/tutorial/stats-timed/timed1.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Try the new spell on each of the enemies in the next room. Note that it's a spell, so it uses your #LIGHT_GREEN#Spellpower#WHITE#, and it causes a physical effect (bleeding), so the target will defend with its #LIGHT_GREEN#Physical save#WHITE#. Note in particular the duration of the effect on each enemy. You can check their tooltip to see detrimental effects and their remaining duration. diff --git a/game/modules/tome/data/texts/tutorial/stats-timed/timed2.lua b/game/modules/tome/data/texts/tutorial/stats-timed/timed2.lua index 40a4d3cad866fc794eb6ee5bdd251083a34c42dc..f662aed872be8d314b0a6a54c3c4759959640928 100644 --- a/game/modules/tome/data/texts/tutorial/stats-timed/timed2.lua +++ b/game/modules/tome/data/texts/tutorial/stats-timed/timed2.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Under what circumstances do you appear to inflict the full-duration bleed effect? For those targets that didn't receive the full duration, how did their applicable #GOLD#combat stat#WHITE# compare to yours? diff --git a/game/modules/tome/data/texts/tutorial/stats-timed/timed3.lua b/game/modules/tome/data/texts/tutorial/stats-timed/timed3.lua index 6641ea1215338c54e32d58938c2e6c866c961ff7..6481141a68f759b84e58ecbf9fe823f77c186b89 100644 --- a/game/modules/tome/data/texts/tutorial/stats-timed/timed3.lua +++ b/game/modules/tome/data/texts/tutorial/stats-timed/timed3.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ If you think you can predict how #GOLD#combat stats#WHITE# affect timed effect durations, test your hypothesis on the enemies in the next room. If you don't know yet, see if this sequence of enemies gets you any closer. diff --git a/game/modules/tome/data/texts/tutorial/stats-timed/timed4.lua b/game/modules/tome/data/texts/tutorial/stats-timed/timed4.lua index 6f9b03e8e3d47910a53793e2509f2786e78cc833..527c8ac0d30a7810744ef70c9650b48c8d8fc350 100644 --- a/game/modules/tome/data/texts/tutorial/stats-timed/timed4.lua +++ b/game/modules/tome/data/texts/tutorial/stats-timed/timed4.lua @@ -17,6 +17,6 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ See what the rune in the next room has to teach you! Hopefully you can use it to get past the troublesome elves ahead. ]] diff --git a/game/modules/tome/data/texts/tutorial/stats-timed/timed5.lua b/game/modules/tome/data/texts/tutorial/stats-timed/timed5.lua index 56c68d4f2ffff75a207c664a36f1b82f14dd648b..4b830ab61a849125d27276a1816a554651396a5c 100644 --- a/game/modules/tome/data/texts/tutorial/stats-timed/timed5.lua +++ b/game/modules/tome/data/texts/tutorial/stats-timed/timed5.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Ideally, you thought your way through that challenge instead of just using trial-and-error. Every five points of #LIGHT_GREEN#Physical Save#WHITE#, #LIGHT_GREEN#Spell Save#WHITE#, and #LIGHT_GREEN#Mental Save#WHITE# knocks a turn off the duration of appropriate timed effects. diff --git a/game/modules/tome/data/texts/tutorial/stats-timed/timed6.lua b/game/modules/tome/data/texts/tutorial/stats-timed/timed6.lua index bb2fbe9b3da5a1203a7a6f6a51cd040f4ffad14e..52157c9d23b638000c791180391ba6f81c29883d 100644 --- a/game/modules/tome/data/texts/tutorial/stats-timed/timed6.lua +++ b/game/modules/tome/data/texts/tutorial/stats-timed/timed6.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ This is fairly close to saying that you knock a turn off the duration of timed effects for every five points that your defensive #GOLD#combat stat#WHITE# score beats the attacker's offensive #GOLD#combat stat#WHITE#. There are some subtle differences, however. diff --git a/game/modules/tome/data/texts/tutorial/stats-timed/timed7.lua b/game/modules/tome/data/texts/tutorial/stats-timed/timed7.lua index c01182d36d04486434c36279bf322fe433041a8e..780879785d2ebc84ff8073895fbc42f20a2e482f 100644 --- a/game/modules/tome/data/texts/tutorial/stats-timed/timed7.lua +++ b/game/modules/tome/data/texts/tutorial/stats-timed/timed7.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ In general, greatly reducing the durations of timed effects requires rather high defensive #GOLD#combat stat#WHITE# scores. The all-important #GOLD#combat stat#WHITE# score difference of ten that we saw earlier usually results in a mere two-turn reduction of timed effect durations. If you want to negate timed effects completely, you're going to have to work hard at finding sources of #LIGHT_GREEN#Physical save#WHITE#, #LIGHT_GREEN#Spell save#WHITE#, and diff --git a/game/modules/tome/data/texts/tutorial/stats-timed/timed8.lua b/game/modules/tome/data/texts/tutorial/stats-timed/timed8.lua index 89f09367952bc794eb079accb4e0bdacd47c6c08..32a8847ef110b82098211e8bfb0313bd7cfeea46 100644 --- a/game/modules/tome/data/texts/tutorial/stats-timed/timed8.lua +++ b/game/modules/tome/data/texts/tutorial/stats-timed/timed8.lua @@ -17,6 +17,6 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Descend to the final level of the #GOLD#Dungeon of Adventurer Enlightenment#WHITE# to discover more about #GOLD#combat stat#WHITE# tiers, and how they're not just cosmetic. ]] diff --git a/game/modules/tome/data/texts/tutorial/stats/mechintro.lua b/game/modules/tome/data/texts/tutorial/stats/mechintro.lua index 5bfaece17ab84fabaeda83ea9ef1825b130005ab..01145735b706af67230f2e5f7ec05ab267c65a5b 100644 --- a/game/modules/tome/data/texts/tutorial/stats/mechintro.lua +++ b/game/modules/tome/data/texts/tutorial/stats/mechintro.lua @@ -17,6 +17,6 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ ToME 4 is a large, complex game. Despite this, the most important mechanics-- the ones that directly influence the decisions you need to make as a player-- are governed by relatively simple rules. This mechanics guide will provide a brief introduction to these rules. ]] diff --git a/game/modules/tome/data/texts/tutorial/stats/stats1.lua b/game/modules/tome/data/texts/tutorial/stats/stats1.lua index 6ed08fbce6156fa1ef87ef8b4a146d0067118ddb..d7dfcff6a795b30fc1b43273aeaabe45dac55012 100644 --- a/game/modules/tome/data/texts/tutorial/stats/stats1.lua +++ b/game/modules/tome/data/texts/tutorial/stats/stats1.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Basic character attributes such as strength and willpower are important, but their importance lies in how they affect your #GOLD#combat stats#WHITE#, the subject of this entire tutorial. The first two of these #GOLD#combat stats#WHITE# are: diff --git a/game/modules/tome/data/texts/tutorial/stats/stats2.lua b/game/modules/tome/data/texts/tutorial/stats/stats2.lua index d5fcf36224a869ff42a113191333eedc181451fe..44f4a34889f5e04b7b8426e09ecbe3353e01076f 100644 --- a/game/modules/tome/data/texts/tutorial/stats/stats2.lua +++ b/game/modules/tome/data/texts/tutorial/stats/stats2.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ The next three important #GOLD#combat stats#WHITE#: #LIGHT_GREEN#Physical save: #WHITE#Your ability to shrug off physical effects. diff --git a/game/modules/tome/data/texts/tutorial/stats/stats3.lua b/game/modules/tome/data/texts/tutorial/stats/stats3.lua index 3ea76014fe98500a8fbe91d5e9c141bfdaab58be..8ffd8de226f7ae7485d387e3b5c5ec5b153bc13c 100644 --- a/game/modules/tome/data/texts/tutorial/stats/stats3.lua +++ b/game/modules/tome/data/texts/tutorial/stats/stats3.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ The final three important #GOLD#combat stats#WHITE# of your character are these: #LIGHT_GREEN#Physical power: #WHITE#Your ability to inflict damage and effects with weapons (including fists). diff --git a/game/modules/tome/data/texts/tutorial/stats/stats4.lua b/game/modules/tome/data/texts/tutorial/stats/stats4.lua index d9f3515b022dac258e01b72399327152fd8960bb..acdbc5cc57bed1a354b1f796617adac02a1627c5 100644 --- a/game/modules/tome/data/texts/tutorial/stats/stats4.lua +++ b/game/modules/tome/data/texts/tutorial/stats/stats4.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ To summarize the information thus far: Every being in ToME has eight important #GOLD#combat stats#WHITE# that determine combat success. diff --git a/game/modules/tome/data/texts/tutorial/stats/stats5.lua b/game/modules/tome/data/texts/tutorial/stats/stats5.lua index 26bb53697d0919993e8db9533fd7386dee308657..45f863a3baea0329168d6fbddd0d6c2e29b77727 100644 --- a/game/modules/tome/data/texts/tutorial/stats/stats5.lua +++ b/game/modules/tome/data/texts/tutorial/stats/stats5.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Many times when you perform an attack, or suffer one, the success of the attack is determined by comparing #GOLD#combat stat#WHITE# scores of the attacker and defender. We saw already that physical attacks, such as melee blows or an archer's loosed arrow, involve comparing the attacker's #LIGHT_GREEN#Accuracy#WHITE# and the defender's #LIGHT_GREEN#Defense#WHITE#. What about the other #GOLD#combat stats#WHITE#? diff --git a/game/modules/tome/data/texts/tutorial/stats/stats6.lua b/game/modules/tome/data/texts/tutorial/stats/stats6.lua index 16adf7d559a1b9cf402c5c9fe131c649f7af4232..f436fbf833370cde6d1162f1b62cf56070fe66d7 100644 --- a/game/modules/tome/data/texts/tutorial/stats/stats6.lua +++ b/game/modules/tome/data/texts/tutorial/stats/stats6.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Suppose you're a berserker, and you attempt to stun an enemy. If you're to succeed, two things must happen: First, your attack needs to hit! That means comparing your #LIGHT_GREEN#Accuracy#WHITE# to the target's #LIGHT_GREEN#Defense#WHITE#. diff --git a/game/modules/tome/data/texts/tutorial/stats/stats7.1.lua b/game/modules/tome/data/texts/tutorial/stats/stats7.1.lua index 5c54bb1bddc77e712e6f024810370d70d98d4766..15a93f5b5973f33b34e5a32b042ab150eae00620 100644 --- a/game/modules/tome/data/texts/tutorial/stats/stats7.1.lua +++ b/game/modules/tome/data/texts/tutorial/stats/stats7.1.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Finally, suppose you're a rogue, and you use Dual Strike to attempt to knock somebody senseless. As with the berserker example, first you must hit, so you compare your #LIGHT_GREEN#Accuracy#WHITE# to the target's #LIGHT_GREEN#Defense#WHITE#. diff --git a/game/modules/tome/data/texts/tutorial/stats/stats7.lua b/game/modules/tome/data/texts/tutorial/stats/stats7.lua index 4e1bd8b7ca79887f2429462ea16271d4267ad9cf..98984b239f794634ab7b95c3d3f8f2672bafb2df 100644 --- a/game/modules/tome/data/texts/tutorial/stats/stats7.lua +++ b/game/modules/tome/data/texts/tutorial/stats/stats7.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Suppose you're an archmage, and you blast somebody with the Flameshock spell. This spell does fire damage, which is determined by your #LIGHT_GREEN#Spellpower#WHITE#. #GOLD#Combat stats#WHITE# are not used to mitigate damage, so the defender is going to take the full force of the spell, barring fire resistance (which is a subject for another tutorial). diff --git a/game/modules/tome/data/texts/tutorial/stats/stats8.lua b/game/modules/tome/data/texts/tutorial/stats/stats8.lua index 44fafe4af6c42a178dbeb08c628cf13774e1d810..1d9486565d578c217b4cca6d802c200c5fb240d5 100644 --- a/game/modules/tome/data/texts/tutorial/stats/stats8.lua +++ b/game/modules/tome/data/texts/tutorial/stats/stats8.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ It looks like there are quite a few ways to match up the offensive #GOLD#combat stats#WHITE#... #LIGHT_GREEN#Accuracy#WHITE# #LIGHT_GREEN#Physical power#WHITE# diff --git a/game/modules/tome/data/texts/tutorial/stats/stats9.lua b/game/modules/tome/data/texts/tutorial/stats/stats9.lua index 9598d99713a655465ba9ccaa7fb194d0e6e8425f..d66ccb342f9dbed653768ba90a49db9a06d0ca9f 100644 --- a/game/modules/tome/data/texts/tutorial/stats/stats9.lua +++ b/game/modules/tome/data/texts/tutorial/stats/stats9.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[ +return _t[[ Now you know the basics: what these eight #GOLD#combat stats#WHITE# mean and when they're used. It's time to look at some numbers. Head north to the stairs, and descend into the #GOLD#Dungeon of Adventurer Enlightenment.#WHITE# diff --git a/game/modules/tome/data/texts/tutorial/tactics1.lua b/game/modules/tome/data/texts/tutorial/tactics1.lua index 4f48cbfff5d05822422bca4296751e983a50825c..9a742fb19453e9a40c498ab4e2591fbc7b812870 100644 --- a/game/modules/tome/data/texts/tutorial/tactics1.lua +++ b/game/modules/tome/data/texts/tutorial/tactics1.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[You have found a nest of snakes! If you let them surround you, you might be in trouble! +return _t[[You have found a nest of snakes! If you let them surround you, you might be in trouble! A basic tactic is to never get surrounded, do not hesitate to backtrack a bit to a safer spot. #GOLD#Always control the fight.#WHITE# diff --git a/game/modules/tome/data/texts/tutorial/tactics2.lua b/game/modules/tome/data/texts/tutorial/tactics2.lua index ec76f679f67edbbc1ea19dd8d008a256b6607bf5..184f33c7ea71ea05b8bbdb958e59a5a3f37643a5 100644 --- a/game/modules/tome/data/texts/tutorial/tactics2.lua +++ b/game/modules/tome/data/texts/tutorial/tactics2.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[A skeleton mage just fired a spell at you. +return _t[[A skeleton mage just fired a spell at you. While the fireworks look nice, you don't want to get hit too much. When under the fire of archers or spell casters always try to break line of sight with them, they will be forced to come to you (unless they are smart). #GOLD#Take cover: Never let them get a clean shot!#WHITE# diff --git a/game/modules/tome/data/texts/tutorial/talents.lua b/game/modules/tome/data/texts/tutorial/talents.lua index f0478717c47883ec0c499ce79df50aa989ce4a2d..89a97a1dfbfad6df5fd3545fbbd0a0501311d8b0 100644 --- a/game/modules/tome/data/texts/tutorial/talents.lua +++ b/game/modules/tome/data/texts/tutorial/talents.lua @@ -23,7 +23,7 @@ if not game.player.tutored_levels then game.player.tutored_levels = true end -return [[You now possess the Shield Pummel and Shield Wall talents. +return _t[[You now possess the Shield Pummel and Shield Wall talents. Talents show up in the lower left part of the screen with their assigned hotkey. You can right-click on a talent to remove it from the list, or you can add talents by pressing 'M' to get the talents list and then pressing a hotkey. Hotkeys by default are the 1 to 0 keys, and can also be assigned to items. diff --git a/game/modules/tome/data/texts/tutorial/terrain.lua b/game/modules/tome/data/texts/tutorial/terrain.lua index 1be6c4915a9a5c00672644bfb07cb88a26ef612b..8fcedf03782709d93423d3aab8755160ad6a4798 100644 --- a/game/modules/tome/data/texts/tutorial/terrain.lua +++ b/game/modules/tome/data/texts/tutorial/terrain.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return [[During your adventures you will encounter a variety of terrains you can pass on: grass, sand, water, lava, ... +return _t[[During your adventures you will encounter a variety of terrains you can pass on: grass, sand, water, lava, ... Some of those terrains have innate penalties or tricks. You will have to learn them and how to deal with them. diff --git a/game/modules/tome/data/texts/unlock-adventurer.lua b/game/modules/tome/data/texts/unlock-adventurer.lua index 294b2e3ada81271bdb7a0e5126b8ec24113f8e92..0059ebe224b01701edc4ceebaffe6ba37923b9ba 100644 --- a/game/modules/tome/data/texts/unlock-adventurer.lua +++ b/game/modules/tome/data/texts/unlock-adventurer.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Adventurer", -[[Congratulations, you have won the game! +return _t"New Class: #LIGHT_GREEN#Adventurer", +_t[[Congratulations, you have won the game! You can now create new characters with the #LIGHT_GREEN#Adventurer class#WHITE#. Adventurers start the game with 7 talent category points and all possible class and generic trees in the game. diff --git a/game/modules/tome/data/texts/unlock-afflicted_cursed.lua b/game/modules/tome/data/texts/unlock-afflicted_cursed.lua index d1b281e508625e7737fd0e9ce84f70868fca3215..c476fe8242e01616eec9ee81e83585b10ca505dc 100644 --- a/game/modules/tome/data/texts/unlock-afflicted_cursed.lua +++ b/game/modules/tome/data/texts/unlock-afflicted_cursed.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Cursed (Afflicted)", -[[Through ignorance, greed or folly, the Cursed served some dark design and are now doomed to pay for their sins. +return _t"New Class: #LIGHT_GREEN#Cursed (Afflicted)", +_t[[Through ignorance, greed or folly, the Cursed served some dark design and are now doomed to pay for their sins. Their only master now is the hatred they carry for every living thing. Drawing strength from the death of all they encounter, the Cursed become terrifying combatants. Worse, any who approach the Cursed can be driven mad by their terrible aura. diff --git a/game/modules/tome/data/texts/unlock-afflicted_doomed.lua b/game/modules/tome/data/texts/unlock-afflicted_doomed.lua index 97de9dd5fe19b4f572d983043e798296cb891f30..143f982c36c6e38e4bc162560bcb5e979f23bd38 100644 --- a/game/modules/tome/data/texts/unlock-afflicted_doomed.lua +++ b/game/modules/tome/data/texts/unlock-afflicted_doomed.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Doomed (Afflicted)", -[[Through ignorance, greed or folly, the Doomed served some dark design and must now pay for their sins. +return _t"New Class: #LIGHT_GREEN#Doomed (Afflicted)", +_t[[Through ignorance, greed or folly, the Doomed served some dark design and must now pay for their sins. Their only master now is the hatred they carry for every living thing. Drawing strength from the death of all they encounter, the Doomed become terrifying foes. Their mere presence engulfs the area in darkness. diff --git a/game/modules/tome/data/texts/unlock-birth_transmo_chest.lua b/game/modules/tome/data/texts/unlock-birth_transmo_chest.lua index 8b1f9d6b31f661b3888c34a3c08b49d360f20a96..e33ac71e9d57ec6ca92cdf8b4d72f0999341bc29 100644 --- a/game/modules/tome/data/texts/unlock-birth_transmo_chest.lua +++ b/game/modules/tome/data/texts/unlock-birth_transmo_chest.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New birth equipment: #LIGHT_GREEN#Transmogrification Chest", -[[You have discovered an old Fortress belonging to the mysterious Sher'tul race. +return _t"New birth equipment: #LIGHT_GREEN#Transmogrification Chest", +_t[[You have discovered an old Fortress belonging to the mysterious Sher'tul race. The Fortress shadow gave you a transmogrification chest which shall make your dealing with storage and gold much easier. All your new characters will now start with a transmogrification chest at birth. All items transmogrified before you find the Fortress with them will only yield gold. diff --git a/game/modules/tome/data/texts/unlock-birth_zigur_sacrifice.lua b/game/modules/tome/data/texts/unlock-birth_zigur_sacrifice.lua index a88f2c264d048a8508f0d40cb608dad933598c94..c8f4e503b2e653932666c26cce492e1a2920c746 100644 --- a/game/modules/tome/data/texts/unlock-birth_zigur_sacrifice.lua +++ b/game/modules/tome/data/texts/unlock-birth_zigur_sacrifice.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New birth power: #LIGHT_GREEN#Ziguranth Sacrifice", -[[You have discovered Zigur, the bastion of Nature fighting against all arcane magics. +return _t"New birth power: #LIGHT_GREEN#Ziguranth Sacrifice", +_t[[You have discovered Zigur, the bastion of Nature fighting against all arcane magics. Magic has caused so much pain and suffering on the world, it needs to stop. All your new characters will now be able to betray arcane escort quests to send them to Zigur, granting new, different, rewards. diff --git a/game/modules/tome/data/texts/unlock-campaign_arena.lua b/game/modules/tome/data/texts/unlock-campaign_arena.lua index 0012c61412236a3b22d5b278a1b1d443a509b27b..d480b2f13fae6999f9621904f783c52352c085a5 100644 --- a/game/modules/tome/data/texts/unlock-campaign_arena.lua +++ b/game/modules/tome/data/texts/unlock-campaign_arena.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New game campaign: #LIGHT_GREEN#The Arena: Challenge of the Master", -[[ +return _t"New game campaign: #LIGHT_GREEN#The Arena: Challenge of the Master", +_t[[ The arena, a way of violent entertainment. A delight for the audience, a source of wealth and glory. A place where aspiring fighters, former adventurers and those cursed to fight eternally gather to hack away at each other. diff --git a/game/modules/tome/data/texts/unlock-campaign_infinite_dungeon.lua b/game/modules/tome/data/texts/unlock-campaign_infinite_dungeon.lua index 5aafa8a211b08611e2325cc8f1d5a820a036ca39..d642c3e04475af9c39722bb75980f0f5059921fb 100644 --- a/game/modules/tome/data/texts/unlock-campaign_infinite_dungeon.lua +++ b/game/modules/tome/data/texts/unlock-campaign_infinite_dungeon.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New game campaign: #LIGHT_GREEN#Infinite Dungeon: The Neverending Descent", -[[ +return _t"New game campaign: #LIGHT_GREEN#Infinite Dungeon: The Neverending Descent", +_t[[ During the Age of Haze, the nine Godslayers set out to destroy the gods. The god Ralkur, while trying to escape one of the Godslayers, created the Infinite Dungeon. He retreated there, but the Godslayer followed, and each time he would reach the god, Ralkur would create a new level. diff --git a/game/modules/tome/data/texts/unlock-chronomancer_paradox_mage.lua b/game/modules/tome/data/texts/unlock-chronomancer_paradox_mage.lua index d9245d209c73203265ac3806db665a4dab1e5814..a326d550edc8f24d7686ca758b9316af34fd56ce 100644 --- a/game/modules/tome/data/texts/unlock-chronomancer_paradox_mage.lua +++ b/game/modules/tome/data/texts/unlock-chronomancer_paradox_mage.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Paradox Mage (Chronomancer)", -[[Time isn't a linear thing; it only appears to be. In truth it's a fabric, the very fabric that holds the universe together. +return _t"New Class: #LIGHT_GREEN#Paradox Mage (Chronomancer)", +_t[[Time isn't a linear thing; it only appears to be. In truth it's a fabric, the very fabric that holds the universe together. Some seek to weave this fabric, to bend it and shape it to their own will. Only the truly dedicated or the truly mad manage to unlock the secrets of time and space. You have learned such secrets and can now create new characters with the #LIGHT_GREEN#Paradox Mage class#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-chronomancer_temporal_warden.lua b/game/modules/tome/data/texts/unlock-chronomancer_temporal_warden.lua index 8e11fb81eaf6d2a5f22216b925426e0293d740de..ec2f0aad88ab0de196eaa4c655898423adacc033 100644 --- a/game/modules/tome/data/texts/unlock-chronomancer_temporal_warden.lua +++ b/game/modules/tome/data/texts/unlock-chronomancer_temporal_warden.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Temporal Warden (Chronomancer)", -[[Time isn't a linear thing; it only appears to be. In truth it's a fabric, the very fabric that holds the universe together. +return _t"New Class: #LIGHT_GREEN#Temporal Warden (Chronomancer)", +_t[[Time isn't a linear thing; it only appears to be. In truth it's a fabric, the very fabric that holds the universe together. As with all great powers, there are those who seek to manipulate it and pervert it, but there are also those who seek to uphold rather than destroy. Those who have learned to bend, rather than break, the fabric can keep the balance against dark or power-hungry forces. diff --git a/game/modules/tome/data/texts/unlock-corrupter_corruptor.lua b/game/modules/tome/data/texts/unlock-corrupter_corruptor.lua index 41c15bd4961c34866760f136b64083ca96f3f7f8..e134a991a4234de7cb4688cfe0283e2b6886fb1e 100644 --- a/game/modules/tome/data/texts/unlock-corrupter_corruptor.lua +++ b/game/modules/tome/data/texts/unlock-corrupter_corruptor.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Corruptor (Defiler)", -[[Every power has a dark side, including the arcane forces. +return _t"New Class: #LIGHT_GREEN#Corruptor (Defiler)", +_t[[Every power has a dark side, including the arcane forces. Corruptors are mages that deal in dark, blighted, demonic magic to attain their goals. Not all of them are evil, though; some are simply selfish and concerned only with their own power. diff --git a/game/modules/tome/data/texts/unlock-corrupter_reaver.lua b/game/modules/tome/data/texts/unlock-corrupter_reaver.lua index 03327ae510aeb8401ae7dd87ad61e1d69bab3fcb..45080064eaacd9ef0bd5803a11baaedb1be47c57 100644 --- a/game/modules/tome/data/texts/unlock-corrupter_reaver.lua +++ b/game/modules/tome/data/texts/unlock-corrupter_reaver.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Reaver (Defiler)", -[[Under a veil of darkness and blight come the Reavers. +return _t"New Class: #LIGHT_GREEN#Reaver (Defiler)", +_t[[Under a veil of darkness and blight come the Reavers. The foot soldiers of evil forces, Reavers are found everywhere. Very rarely a Reaver will realise the wrongness of her way and use her powers to atone for her crimes. diff --git a/game/modules/tome/data/texts/unlock-cosmetic_bikini.lua b/game/modules/tome/data/texts/unlock-cosmetic_bikini.lua index c6662fa2d54f4c6202a1c95c42793df71077f8bb..16ec90ea75efaae6f505ba1910f72313da12cb32 100644 --- a/game/modules/tome/data/texts/unlock-cosmetic_bikini.lua +++ b/game/modules/tome/data/texts/unlock-cosmetic_bikini.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Cosmetic Option: #LIGHT_GREEN#Bikini and Mankini", -[[You have saved Melinda again at the beach. +return _t"New Cosmetic Option: #LIGHT_GREEN#Bikini and Mankini", +_t[[You have saved Melinda again at the beach. You may now create characters that start equiped with either bikini or mankini. This has no effect on gameplay at all but it is fun! diff --git a/game/modules/tome/data/texts/unlock-cosmetic_class_alchemist_drolem.lua b/game/modules/tome/data/texts/unlock-cosmetic_class_alchemist_drolem.lua index 8b2f5974a12ab4b482c13165281e3705f2c7f89a..be3fe6e778d434eea311fc87b0a11da8257dabff 100644 --- a/game/modules/tome/data/texts/unlock-cosmetic_class_alchemist_drolem.lua +++ b/game/modules/tome/data/texts/unlock-cosmetic_class_alchemist_drolem.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class Option: #LIGHT_GREEN#Drolem", -[[You have defeated Tannen with your Alchemist and took some time to figure how he built a mighty Drolem. +return _t"New Class Option: #LIGHT_GREEN#Drolem", +_t[[You have defeated Tannen with your Alchemist and took some time to figure how he built a mighty Drolem. Drolems are dragon-shaped golems able to breath powerful poison at their foes. You may now create alchemist characters with a drolem instead of a golem. diff --git a/game/modules/tome/data/texts/unlock-cosmetic_race_dwarf_female_beard.lua b/game/modules/tome/data/texts/unlock-cosmetic_race_dwarf_female_beard.lua index b37ec7c1f91b555917aa1fdd93a4423db2cb7cb1..04d1e8ac8377eaee325138f2823687d08a9aa5dc 100644 --- a/game/modules/tome/data/texts/unlock-cosmetic_race_dwarf_female_beard.lua +++ b/game/modules/tome/data/texts/unlock-cosmetic_race_dwarf_female_beard.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Cosmetic Race Option: #LIGHT_GREEN#Facial Pilosity for Female Dwarves", -[[You have saved the Iron Council from untold horrors from the deep. +return _t"New Cosmetic Race Option: #LIGHT_GREEN#Facial Pilosity for Female Dwarves", +_t[[You have saved the Iron Council from untold horrors from the deep. You may now create female dwarf characters sporting proudly facial pilosity as is the norm in the upper classes of dwarven society. This has no effect on gameplay at all but it is fun! diff --git a/game/modules/tome/data/texts/unlock-cosmetic_race_human_redhead.lua b/game/modules/tome/data/texts/unlock-cosmetic_race_human_redhead.lua index 395cd2162ccb533a74170222bd0dc1dd82c274ab..6b58ed1ff1747de6b21f9ec4b5d3c76cbf081425 100644 --- a/game/modules/tome/data/texts/unlock-cosmetic_race_human_redhead.lua +++ b/game/modules/tome/data/texts/unlock-cosmetic_race_human_redhead.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Cosmetic Race Option: #LIGHT_GREEN#Redhead Characters", -[[You have saved Melinda from untold horrors and torments. +return _t"New Cosmetic Race Option: #LIGHT_GREEN#Redhead Characters", +_t[[You have saved Melinda from untold horrors and torments. You may now create human, elf, halfling and dwarf characters with red hair. This has no effect on gameplay at all but it is fun! diff --git a/game/modules/tome/data/texts/unlock-difficulty_insane.lua b/game/modules/tome/data/texts/unlock-difficulty_insane.lua index e812d12ce1a7dacf02c696d23e052ec7ab97361a..030ee5191be6a4b4434dca9c21f1eeba85852b82 100644 --- a/game/modules/tome/data/texts/unlock-difficulty_insane.lua +++ b/game/modules/tome/data/texts/unlock-difficulty_insane.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New game difficulty mode: #LIGHT_GREEN#Insane", -[[You won the game on Nightmare mode. You are a big tough player! +return _t"New game difficulty mode: #LIGHT_GREEN#Insane", +_t[[You won the game on Nightmare mode. You are a big tough player! You thought you had seen it all, done it all... But no! If nightmare mode couldn't bring you down, Insane mode will! diff --git a/game/modules/tome/data/texts/unlock-difficulty_madness.lua b/game/modules/tome/data/texts/unlock-difficulty_madness.lua index be924c01ef66e30fee911c5408534cbd41dab8e0..c11103e115bcf8bef65ad7e84c583851b22f1c0d 100644 --- a/game/modules/tome/data/texts/unlock-difficulty_madness.lua +++ b/game/modules/tome/data/texts/unlock-difficulty_madness.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New game difficulty mode: #LIGHT_GREEN#Madness", -[[You won the game on Insane mode. You are one of the best players! +return _t"New game difficulty mode: #LIGHT_GREEN#Madness", +_t[[You won the game on Insane mode. You are one of the best players! But fear not because the game is just about to get even more unfair on you! Welcome to Madness! diff --git a/game/modules/tome/data/texts/unlock-divine_anorithil.lua b/game/modules/tome/data/texts/unlock-divine_anorithil.lua index 4ec76a0256ad4d02dfef4d30ebe41cb82b6f4564..6c7d327def84b6292cb784c0ea549c8cbbb340b3 100644 --- a/game/modules/tome/data/texts/unlock-divine_anorithil.lua +++ b/game/modules/tome/data/texts/unlock-divine_anorithil.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Anorithil (Celestial)", -[[ +return _t"New Class: #LIGHT_GREEN#Anorithil (Celestial)", +_t[[ In the uttermost east, on the continent known only as the Far East, dwell the last remnants of Elves and Humans, fighting the Orc Pride and the many perils of the Far East. Anorithil are mages who are trained in special magic to focus the powers of the Sun and Moons. diff --git a/game/modules/tome/data/texts/unlock-divine_sun_paladin.lua b/game/modules/tome/data/texts/unlock-divine_sun_paladin.lua index 0ab2ecde99d4bae3514eb2e4203ba91a66e03afd..578780589bb796e8373c427ec60a945867c9c6fe 100644 --- a/game/modules/tome/data/texts/unlock-divine_sun_paladin.lua +++ b/game/modules/tome/data/texts/unlock-divine_sun_paladin.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Sun Paladin (Celestial)", -[[ +return _t"New Class: #LIGHT_GREEN#Sun Paladin (Celestial)", +_t[[ In the uttermost east, on the continent known only as the Far East, dwell the last remnants of Elves and Humans, fighting the Orc Pride and the many perils of the Far East. Sun Paladins are warriors who are trained in special magic to focus the powers of the Sun. diff --git a/game/modules/tome/data/texts/unlock-mage.lua b/game/modules/tome/data/texts/unlock-mage.lua index 3aa628ccef905a98d0b194cf3a474c152439ed47..aa335e02e8c73fc85242362914a19befa0cbce51 100644 --- a/game/modules/tome/data/texts/unlock-mage.lua +++ b/game/modules/tome/data/texts/unlock-mage.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Archmage", -[[ +return _t"New Class: #LIGHT_GREEN#Archmage", +_t[[ Magic has not disappeared from Maj'Eyal with the end of the Spellhunt. During the Age of Dusk, as the Spellhunt was nearing its end, a powerful mage of the Kar'Krul, Linaniil, created a safe haven for the few remaining mages of all races. diff --git a/game/modules/tome/data/texts/unlock-mage_cryomancer.lua b/game/modules/tome/data/texts/unlock-mage_cryomancer.lua index c60c11670d4e6bfda1a7928593530a6bc6590de4..63293dd298f0a7b0c5c4956a36bc06e246065707 100644 --- a/game/modules/tome/data/texts/unlock-mage_cryomancer.lua +++ b/game/modules/tome/data/texts/unlock-mage_cryomancer.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Talent Category: #LIGHT_GREEN#Ice", -[[Since the dawn of time mages have experimented with the elements. +return _t"New Talent Category: #LIGHT_GREEN#Ice", +_t[[Since the dawn of time mages have experimented with the elements. While most mages are content using the Water school, a few of them took their research deeper and created Ice magic. At its core lies the Uttercold, a cold so cold it can even damage creatures normally immune. diff --git a/game/modules/tome/data/texts/unlock-mage_geomancer.lua b/game/modules/tome/data/texts/unlock-mage_geomancer.lua index 0baebb756f848f37556f53b1a2cd34674ce52433..3afbfd9f29bbb83c3977f81c1abe7e68da338045 100644 --- a/game/modules/tome/data/texts/unlock-mage_geomancer.lua +++ b/game/modules/tome/data/texts/unlock-mage_geomancer.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Talent Category: #LIGHT_GREEN#Stone", -[[Since the dawn of time mages have experimented with the elements. +return _t"New Talent Category: #LIGHT_GREEN#Stone", +_t[[Since the dawn of time mages have experimented with the elements. While most mages are content using the Earth school, a few of them took their research deeper and created Stone magic. At its core lies the Crystalline Focus, which can create attacks so sharp they can cut through physical immunity. diff --git a/game/modules/tome/data/texts/unlock-mage_necromancer.lua b/game/modules/tome/data/texts/unlock-mage_necromancer.lua index a16833bfb613cf6a5858e23c5541e0d2746b1a8a..4d0d5d850d3449989b3c9171fb003187db6f0861 100644 --- a/game/modules/tome/data/texts/unlock-mage_necromancer.lua +++ b/game/modules/tome/data/texts/unlock-mage_necromancer.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Necromancer", -[[ +return _t"New Class: #LIGHT_GREEN#Necromancer", +_t[[ Necromancy, the forbidden art. Necromancy, the black art. diff --git a/game/modules/tome/data/texts/unlock-mage_pyromancer.lua b/game/modules/tome/data/texts/unlock-mage_pyromancer.lua index d400e91f4c3fdf239f7031ac312ea0a5f3b8ff70..2fc0a90c8452cca080bdafe608adccd96c336ae3 100644 --- a/game/modules/tome/data/texts/unlock-mage_pyromancer.lua +++ b/game/modules/tome/data/texts/unlock-mage_pyromancer.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Talent Category: #LIGHT_GREEN#Wildfire", -[[Since the dawn of time mages have experimented with the elements. +return _t"New Talent Category: #LIGHT_GREEN#Wildfire", +_t[[Since the dawn of time mages have experimented with the elements. While most mages are content using the Fire school, a few of them took their research deeper and created Wildfire magic. At its core lies the Wildfire, a fire so hot it can even damage creatures normally immune. diff --git a/game/modules/tome/data/texts/unlock-mage_tempest.lua b/game/modules/tome/data/texts/unlock-mage_tempest.lua index f748144b3455848df589c1a61d17bcf03d1ff976..a7ab82f1a8defc5f680e55a6ae5720e38a59fdb4 100644 --- a/game/modules/tome/data/texts/unlock-mage_tempest.lua +++ b/game/modules/tome/data/texts/unlock-mage_tempest.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Talent Category: #LIGHT_GREEN#Storm", -[[Since the dawn of time mages have experimented with the elements. +return _t"New Talent Category: #LIGHT_GREEN#Storm", +_t[[Since the dawn of time mages have experimented with the elements. While most mages are content using the Air school, a few of them took their research deeper and created Storm magic. At its core lies the Tempest, a storm so powerful it can even damage creatures normally immune. diff --git a/game/modules/tome/data/texts/unlock-psionic_mindslayer.lua b/game/modules/tome/data/texts/unlock-psionic_mindslayer.lua index 695345c17ab978aa816fb15cf7adb700b3e3465f..97c825c744b5a260ed3e2898e644acb6c90d3fcd 100644 --- a/game/modules/tome/data/texts/unlock-psionic_mindslayer.lua +++ b/game/modules/tome/data/texts/unlock-psionic_mindslayer.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Mindslayer (Psionic)", -[[Mindslayers are the frontline fighters of the Yeeks' Way. Absolutely devoted to serving the Way, and thus all Yeeks, they dive into battle with nothing but their own mind. +return _t"New Class: #LIGHT_GREEN#Mindslayer (Psionic)", +_t[[Mindslayers are the frontline fighters of the Yeeks' Way. Absolutely devoted to serving the Way, and thus all Yeeks, they dive into battle with nothing but their own mind. Yeeks are natively psionic and thus most Mindslayers are Yeeks, but psionic powers do happen - rarely - in other races too. You have saved a fellow Yeek Mindslayer and can now create characters with the #LIGHT_GREEN#Mindslayer class#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-psionic_solipsist.lua b/game/modules/tome/data/texts/unlock-psionic_solipsist.lua index 2f4cf1695f0208b4031eae674b032d203f3df3fd..55867970fd4bb50cf1e1edf7f2a2d678ee692381 100644 --- a/game/modules/tome/data/texts/unlock-psionic_solipsist.lua +++ b/game/modules/tome/data/texts/unlock-psionic_solipsist.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Solipsist (Psionic)", -[[Solipsists are powerful psionicists that believe that the world is made up of nothing more than the thoughts and dreams of those that live in it. +return _t"New Class: #LIGHT_GREEN#Solipsist (Psionic)", +_t[[Solipsists are powerful psionicists that believe that the world is made up of nothing more than the thoughts and dreams of those that live in it. This power does not come without a price, however. The Solipsist must constantly fight with their own ego in order to keep a clear view of reality, lest they fall into a state of solipsism, the belief that the world and those that live in it are nothing more than figments of their own mind. You've experienced the power of dreams first hand and may now create characters with the #LIGHT_GREEN#Solipsist class#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-race_ogre.lua b/game/modules/tome/data/texts/unlock-race_ogre.lua index 62c87e426e04938094e7d9435e5481d7f1159fd6..b5cc82856605fe11245d3c108edfb4c02e6d8cc7 100644 --- a/game/modules/tome/data/texts/unlock-race_ogre.lua +++ b/game/modules/tome/data/texts/unlock-race_ogre.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Race: #LIGHT_GREEN#Ogre", -[[ +return _t"New Race: #LIGHT_GREEN#Ogre", +_t[[ Ogres are magically-altered Humans, taking refuge in Elvala among the Shalore. Their enormous bodies, bolstered by (and dependent on) an intricate web of glowing runes covering their skin, make them an intimidating sight that belies their conscientious and modest nature. Ogres were created (and subsequently abandoned) by the Conclave during the Allure Wars, to serve as their warriors and workers. Their massive size and glowing runes made it impossible for them to hide during the Spellhunt, and only those who fled to Shalore lands survived extermination. diff --git a/game/modules/tome/data/texts/unlock-rogue_marauder.lua b/game/modules/tome/data/texts/unlock-rogue_marauder.lua index 505f7760c50c17d0554c55a983eeccc2a7a4cb79..6d547f89eba52ab8bffc5d9c6fd73fa5013be54e 100644 --- a/game/modules/tome/data/texts/unlock-rogue_marauder.lua +++ b/game/modules/tome/data/texts/unlock-rogue_marauder.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Marauder (Rogue)", -[[Some rogues live by strength rather than cunning, relying on vicious attacks instead of stealth and subterfuge. These bandits maraud the land, lightly armoured and wielding dual weapons, taking what they can by force. +return _t"New Class: #LIGHT_GREEN#Marauder (Rogue)", +_t[[Some rogues live by strength rather than cunning, relying on vicious attacks instead of stealth and subterfuge. These bandits maraud the land, lightly armoured and wielding dual weapons, taking what they can by force. You have learned the value in causing sheer damage in combat and can now create characters with the #LIGHT_GREEN#Marauder class#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-rogue_poisons.lua b/game/modules/tome/data/texts/unlock-rogue_poisons.lua index 2b3df3ab7401d191b4066faec623767f23cc2355..621f5763b47821ad7d65cec8c19994a720f84b82 100644 --- a/game/modules/tome/data/texts/unlock-rogue_poisons.lua +++ b/game/modules/tome/data/texts/unlock-rogue_poisons.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Talent Category: #LIGHT_GREEN#Poisons", -[[Extracted from plants, wildlife or more exotic locations, poisons have always existed. +return _t"New Talent Category: #LIGHT_GREEN#Poisons", +_t[[Extracted from plants, wildlife or more exotic locations, poisons have always existed. Many creatures use them, along with some shady people. You have made a deal with such a person and can now create new Rogue or Archer characters that can learn the #LIGHT_GREEN#Poisons talents#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-rogue_skirmisher.lua b/game/modules/tome/data/texts/unlock-rogue_skirmisher.lua index 0c593d90bf498a89ebdf6340c8ded14a82870834..61bd52403796c16317e7222a92a98cbf01a27ffa 100644 --- a/game/modules/tome/data/texts/unlock-rogue_skirmisher.lua +++ b/game/modules/tome/data/texts/unlock-rogue_skirmisher.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Skirmisher (Rogue)", -[[In Maj'Eyal threats are everywhere when you walk the wildlands, some rogues prefer to forgo the use of stealth instead using their cunning skills to kill silently from afar with a sling well protected with a buckler. +return _t"New Class: #LIGHT_GREEN#Skirmisher (Rogue)", +_t[[In Maj'Eyal threats are everywhere when you walk the wildlands, some rogues prefer to forgo the use of stealth instead using their cunning skills to kill silently from afar with a sling well protected with a buckler. You have learned the power of counterstriking from afar and can now create characters with the #LIGHT_GREEN#Skirmisher class#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-undead_ghoul.lua b/game/modules/tome/data/texts/unlock-undead_ghoul.lua index 351b531e2a9712b3d016aff6a5e25f74147d9328..fe78e404c0d66f579944a2a7727173a2e49b48ba 100644 --- a/game/modules/tome/data/texts/unlock-undead_ghoul.lua +++ b/game/modules/tome/data/texts/unlock-undead_ghoul.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Race: #LIGHT_GREEN#Ghoul (Undead)", -[[ +return _t"New Race: #LIGHT_GREEN#Ghoul (Undead)", +_t[[ Ghouls are evil undead creatures. Usually raised by Necromancers to serve as mindless servants, some manage to keep their sentience and roam the world in a blazing path of destruction. You have killed the Master, a malevolent undead creature. You can now create a new character with the #LIGHT_GREEN#Ghoul race#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-undead_skeleton.lua b/game/modules/tome/data/texts/unlock-undead_skeleton.lua index 1f9059a7bb7e29873fdc4106b009c30a298bb4cd..ff42830fb105724610d0f2b666ebd2ac2aecf143 100644 --- a/game/modules/tome/data/texts/unlock-undead_skeleton.lua +++ b/game/modules/tome/data/texts/unlock-undead_skeleton.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Race: #LIGHT_GREEN#Skeleton (Undead)", -[[ +return _t"New Race: #LIGHT_GREEN#Skeleton (Undead)", +_t[[ Skeletons are evil undead creatures. Usually raised by Necromancers to serve as mindless servants, some manage to keep their sentience and roam the world in a blazing path of destruction. You have killed the Master, a malevolent undead creature. You can now create a new character with the #LIGHT_GREEN#Skeleton race#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-warrior_brawler.lua b/game/modules/tome/data/texts/unlock-warrior_brawler.lua index 572e4eded7204d34449748ec09f524870bd5f6f4..b5b5b6ce8825522deb241e4da6772e7156298f31 100644 --- a/game/modules/tome/data/texts/unlock-warrior_brawler.lua +++ b/game/modules/tome/data/texts/unlock-warrior_brawler.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Brawler (Warrior)", -[[The ravages of the Spellblaze stretched armies thin and left many unprotected. Not everyone could afford the luxury of a weapon. +return _t"New Class: #LIGHT_GREEN#Brawler (Warrior)", +_t[[The ravages of the Spellblaze stretched armies thin and left many unprotected. Not everyone could afford the luxury of a weapon. Without steel or iron, poor communities of all races turned to the strength of their own bodies for defense against the darkness. These unarmed techniques still exist today. diff --git a/game/modules/tome/data/texts/unlock-wilder_oozemancer.lua b/game/modules/tome/data/texts/unlock-wilder_oozemancer.lua index f6a5e8235639f01b23d921c3097f200a064b3f9d..07d14f54948589cbb8dd2e8abc5510f4e349796a 100644 --- a/game/modules/tome/data/texts/unlock-wilder_oozemancer.lua +++ b/game/modules/tome/data/texts/unlock-wilder_oozemancer.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Oozemancer (Wilder)", -[[ +return _t"New Class: #LIGHT_GREEN#Oozemancer (Wilder)", +_t[[ The long Nature's hatred of all arcane forces has managed to create Oozemancers as the ultimate answer to archmagi. You have met and destroyed a corrupted one and can now create new characters with the #LIGHT_GREEN#Oozemancer class#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-wilder_stone_warden.lua b/game/modules/tome/data/texts/unlock-wilder_stone_warden.lua index 4c2ff22018857be4e58920b0fc927082958e9f37..538b8bd9b2b8f3287628628f58f268b1d728a8e6 100644 --- a/game/modules/tome/data/texts/unlock-wilder_stone_warden.lua +++ b/game/modules/tome/data/texts/unlock-wilder_stone_warden.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Stone Warden (Wilder)", -[[While most races of Eyal firmly believe that arcane and nature forces are opposites, Dwarves have found a way to bind them together and meld them into a power to be reckoned with. +return _t"New Class: #LIGHT_GREEN#Stone Warden (Wilder)", +_t[[While most races of Eyal firmly believe that arcane and nature forces are opposites, Dwarves have found a way to bind them together and meld them into a power to be reckoned with. You have mastered some arcane and wild talents at a crude level can now create new dwarf characters with the #LIGHT_GREEN#Stone Warden class#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-wilder_summoner.lua b/game/modules/tome/data/texts/unlock-wilder_summoner.lua index 3908d8f30f5a39f6ef91185ff8758d10538fad3a..109a2d7eac8fc81be7a1947a65f317961bc861f4 100644 --- a/game/modules/tome/data/texts/unlock-wilder_summoner.lua +++ b/game/modules/tome/data/texts/unlock-wilder_summoner.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Summoner (Wilder)", -[[ +return _t"New Class: #LIGHT_GREEN#Summoner (Wilder)", +_t[[ In the wilds, some people and creatures are able, by the sole force of their will, to call upon allies to help them in combat. You have witnessed such an act and can now create new characters with the #LIGHT_GREEN#Summoner class#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-wilder_wyrmic.lua b/game/modules/tome/data/texts/unlock-wilder_wyrmic.lua index 520eec2fb9691dcd294502c2290826ca0cb6090d..c9b61b354588c30a822ea106d888671eb1064cfc 100644 --- a/game/modules/tome/data/texts/unlock-wilder_wyrmic.lua +++ b/game/modules/tome/data/texts/unlock-wilder_wyrmic.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Class: #LIGHT_GREEN#Wyrmic (Wilder)", -[[ +return _t"New Class: #LIGHT_GREEN#Wyrmic (Wilder)", +_t[[ Some people, either through training or magic, can take on the defining aspects of the dragon-kin themselves. You have consumed a magic that allows you to gain such a power. You can now also create new characters with the #LIGHT_GREEN#Wyrmic class#WHITE#. diff --git a/game/modules/tome/data/texts/unlock-yeek.lua b/game/modules/tome/data/texts/unlock-yeek.lua index ee0858cb539ca8f1f48e9d1b34dd639486ab8d70..7ee27852cdbb89f2b588fd5470f9d602b5026695 100644 --- a/game/modules/tome/data/texts/unlock-yeek.lua +++ b/game/modules/tome/data/texts/unlock-yeek.lua @@ -17,8 +17,8 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -return "New Race: #LIGHT_GREEN#Yeek", -[[ +return _t"New Race: #LIGHT_GREEN#Yeek", +_t[[ Yeeks are a mysterious race of small humanoids native to the tropical island of Rel. Their body is covered with white fur and their disproportionate heads give them a ridiculous look, yet they are a cunning and willful race. Although they are now nearly unheard of in Maj'Eyal, they spent many centuries as secret slaves to the Halfling nation of Nargol. diff --git a/game/modules/tome/data/timed_effects.lua b/game/modules/tome/data/timed_effects.lua index 4cfa5e6168be5f1b456909bb2b37e34b9be0d7b1..8cfff037a87cd667adda63b232a59174d601dc93 100644 --- a/game/modules/tome/data/timed_effects.lua +++ b/game/modules/tome/data/timed_effects.lua @@ -46,7 +46,7 @@ end local getName = function(self) local name = self.effect_id and mod.class.Actor.tempeffect_def[self.effect_id].desc or "effect" if self.src and self.src.name then - return name .." from "..self.src.name:capitalize() + return ("%s from %s"):tformat(name, self.src:getName():capitalize()) else return name end diff --git a/game/modules/tome/data/timed_effects/floor.lua b/game/modules/tome/data/timed_effects/floor.lua index b3e6b0b22e5845f9cd0e4d4a46098cb2230c0c4e..359919c07d8eb58da9651eb273777b4f01bd6d62 100644 --- a/game/modules/tome/data/timed_effects/floor.lua +++ b/game/modules/tome/data/timed_effects/floor.lua @@ -24,9 +24,11 @@ local Chat = require "engine.Chat" local Map = require "engine.Map" local Level = require "engine.Level" +--I18N-TODO Need some clean up local function floorEffect(t) t.name = t.name or t.desc t.name = t.name:upper():gsub("[ ']", "_") + t.desc = _t(t.desc) local d = t.long_desc if type(t.long_desc) == "string" then t.long_desc = function() return d end end t.type = "other" @@ -40,7 +42,7 @@ end floorEffect{ desc = "Icy Floor", image = "talents/ice_storm.png", - long_desc = "The target is walking on an icy floor. Increasing movement speed by 20%, providing +20% cold damage piercing and -30% stun immunity.", + long_desc = _t"The target is walking on an icy floor. Increasing movement speed by 20%, providing +20% cold damage piercing and -30% stun immunity.", activate = function(self, eff) self:effectTemporaryValue(eff, "resists_pen", {[DamageType.COLD] = 20}) self:effectTemporaryValue(eff, "movement_speed", 0.2) @@ -50,7 +52,7 @@ floorEffect{ floorEffect{ desc = "Font of Life", image = "talents/grand_arrival.png", - long_desc = function(self, eff) return ("The target is near a font of life, granting %+0.2f life regeneration, %+0.2f equilibrium regeneration, %+0.2f stamina regeneration and %+0.2f psi regeneration. (Only living creatures benefit.)"):format(eff.power, eff.equilibrium, eff.stamina, eff.psi) end, + long_desc = function(self, eff) return ("The target is near a font of life, granting %+0.2f life regeneration, %+0.2f equilibrium regeneration, %+0.2f stamina regeneration and %+0.2f psi regeneration. (Only living creatures benefit.)"):tformat(eff.power, eff.equilibrium, eff.stamina, eff.psi) end, parameters = {power=1, equilibrium=0, stamina=0, psi=0}, activate = function(self, eff) if not self:checkClassification("living") then eff.power = 0 return end @@ -67,7 +69,7 @@ floorEffect{ floorEffect{ desc = "Spellblaze Scar", image = "talents/blood_boil.png", - long_desc = "The target is near a spellblaze scar, granting +25% spell critical chance, +10% fire and blight damage but critical spells will drain arcane forces.", + long_desc = _t"The target is near a spellblaze scar, granting +25% spell critical chance, +10% fire and blight damage but critical spells will drain arcane forces.", activate = function(self, eff) self:effectTemporaryValue(eff, "combat_spellcrit", 25) self:effectTemporaryValue(eff, "inc_damage", {[DamageType.FIRE]=10,[DamageType.BLIGHT]=10}) @@ -81,7 +83,7 @@ floorEffect{ floorEffect{ desc = "Blighted Soil", image = "talents/blightzone.png", - long_desc = "The target is walking on blighted soil, reducing diseases resistance by 60% and giving all attacks a 40% chance to infect the target with a random disease (can only happen once per turn).", + long_desc = _t"The target is walking on blighted soil, reducing diseases resistance by 60% and giving all attacks a 40% chance to infect the target with a random disease (can only happen once per turn).", activate = function(self, eff) self:effectTemporaryValue(eff, "disease_immune", -0.6) self:effectTemporaryValue(eff, "blighted_soil", 40) @@ -90,14 +92,14 @@ floorEffect{ floorEffect{ desc = "Glimmerstone", image = "effects/dazed.png", name = "DAZING_DAMAGE", - long_desc = "The target is affected by a glimmerstone, its next attack will try to daze.", + long_desc = _t"The target is affected by a glimmerstone, its next attack will try to daze.", activate = function(self, eff) end, } floorEffect{ desc = "Protective Aura", image = "talents/barrier.png", - long_desc = function(self, eff) return ("The target is near a protective aura, granting +%d armour and +%d physical save."):format(eff.armor, eff.power) end, + long_desc = function(self, eff) return ("The target is near a protective aura, granting +%d armour and +%d physical save."):tformat(eff.armor, eff.power) end, parameters = {power=1, armor=1}, activate = function(self, eff) local power = 3 + game.zone:level_adjust_level(game.level, game.zone, "object") / 2 @@ -110,7 +112,7 @@ floorEffect{ floorEffect{ desc = "Antimagic Bush", image = "talents/fungal_growth.png", - long_desc = function(self, eff) return ("The target is near an antimagic bush, granting +20%% nature damage, +20%% nature resistance penetration and -%d spellpower."):format(eff.power) end, + long_desc = function(self, eff) return ("The target is near an antimagic bush, granting +20%% nature damage, +20%% nature resistance penetration and -%d spellpower."):tformat(eff.power) end, activate = function(self, eff) eff.power = 10 + game.zone:level_adjust_level(game.level, game.zone, "object") / 1.5 self:effectTemporaryValue(eff, "combat_spellpower", -eff.power) @@ -121,7 +123,7 @@ floorEffect{ floorEffect{ desc = "Necrotic Air", image = "talents/repression.png", - long_desc = "The target is in a zone of necrotic air, granting -40% healing mod. Undead creatures also get +15% to all resistances.", + long_desc = _t"The target is in a zone of necrotic air, granting -40% healing mod. Undead creatures also get +15% to all resistances.", activate = function(self, eff) self:effectTemporaryValue(eff, "healing_factor", -0.4) if self:attr("undead") then self:effectTemporaryValue(eff, "resists", {all=15}) end @@ -130,7 +132,7 @@ floorEffect{ floorEffect{ desc = "Whistling Vortex", image = "talents/shadow_blast.png", - long_desc = function(self, eff) return ("The target is in a whistling vortex, granting +%d ranged defense, -%d ranged accuracy and incoming projectiles are 30%% slower."):format(eff.power, eff.power) end, + long_desc = function(self, eff) return ("The target is in a whistling vortex, granting +%d ranged defense, -%d ranged accuracy and incoming projectiles are 30%% slower."):tformat(eff.power, eff.power) end, activate = function(self, eff) eff.power = 10 + game.zone:level_adjust_level(game.level, game.zone, "object") / 2 self:effectTemporaryValue(eff, "combat_def_ranged", eff.power) @@ -141,7 +143,7 @@ floorEffect{ floorEffect{ desc = "Fell Aura", image = "talents/shadow_mages.png", - long_desc = "The target is surrounded by a fell aura, granting 40% critical damage bonus but -20% to all resistances.", + long_desc = _t"The target is surrounded by a fell aura, granting 40% critical damage bonus but -20% to all resistances.", activate = function(self, eff) self:effectTemporaryValue(eff, "combat_critical_power", 40) self:effectTemporaryValue(eff, "resists", {all=-20}) @@ -150,7 +152,7 @@ floorEffect{ floorEffect{ desc = "Slimey Pool", image = "talents/acidic_skin.png", - long_desc = "The target is walking on slime. Decreasing movement speed by 20% and dealing 20 slime damage to any creatures attacking it.", + long_desc = _t"The target is walking on slime. Decreasing movement speed by 20% and dealing 20 slime damage to any creatures attacking it.", activate = function(self, eff) self:effectTemporaryValue(eff, "on_melee_hit", {[DamageType.SLIME] = 20}) self:effectTemporaryValue(eff, "movement_speed", -0.2) diff --git a/game/modules/tome/data/timed_effects/magical.lua b/game/modules/tome/data/timed_effects/magical.lua index 5d75ac34c0de9a29127639b2e99f9b8f1242f95c..df9a8322b38fffb3e41642863e15b6a7c5cc35de 100644 --- a/game/modules/tome/data/timed_effects/magical.lua +++ b/game/modules/tome/data/timed_effects/magical.lua @@ -32,15 +32,15 @@ local Level = require "engine.Level" -- Add dummy power/dam parameters to try to stay in line with other diseases for subtype checks newEffect{ name = "ITEM_BLIGHT_ILLNESS", image = "talents/decrepitude_disease.png", - desc = "Illness", - long_desc = function(self, eff) return ("The target is infected by a disease, reducing its dexterity, strength, and constitution by %d."):format(eff.reduce) end, + desc = _t"Illness", + long_desc = function(self, eff) return ("The target is infected by a disease, reducing its dexterity, strength, and constitution by %d."):tformat(eff.reduce) end, charges = function(self, eff) return (tostring(math.floor(eff.reduce))) end, type = "magical", subtype = {disease=true, blight=true}, status = "detrimental", parameters = {reduce = 1, dam = 0, power = 0}, - on_gain = function(self, err) return "#Target# is afflicted by a crippling illness!" end, - on_lose = function(self, err) return "#Target# is free from the illness." end, + on_gain = function(self, err) return _t"#Target# is afflicted by a crippling illness!" end, + on_lose = function(self, err) return _t"#Target# is free from the illness." end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("inc_stats", { [Stats.STAT_DEX] = -eff.reduce, @@ -56,15 +56,15 @@ newEffect{ newEffect{ name = "ITEM_ACID_CORRODE", image = "talents/acidic_skin.png", - desc = "Armor Corroded", - long_desc = function(self, eff) return ("The target has been splashed with acid, reducing armour by %d%% (#RED#%d#LAST#)."):format(eff.pct*100 or 0, eff.reduce or 0) end, + desc = _t"Armor Corroded", + long_desc = function(self, eff) return ("The target has been splashed with acid, reducing armour by %d%% (#RED#%d#LAST#)."):tformat(eff.pct*100 or 0, eff.reduce or 0) end, charges = function(self, eff) return (tostring(math.floor(eff.reduce))) end, type = "magical", subtype = { acid=true, sunder=true }, status = "detrimental", parameters = {pct = 0.3}, - on_gain = function(self, err) return "#Target#'s armor corrodes!" end, - on_lose = function(self, err) return "#Target# is fully armored again." end, + on_gain = function(self, err) return _t"#Target#'s armor corrodes!" end, + on_lose = function(self, err) return _t"#Target# is fully armored again." end, on_timeout = function(self, eff) end, activate = function(self, eff) @@ -79,14 +79,14 @@ newEffect{ newEffect{ name = "MANASURGE", image = "talents/rune__manasurge.png", - desc = "Surging mana", - long_desc = function(self, eff) return ("The mana surge engulfs the target, regenerating %0.2f mana per turn."):format(eff.power) end, + desc = _t"Surging mana", + long_desc = function(self, eff) return ("The mana surge engulfs the target, regenerating %0.2f mana per turn."):tformat(eff.power) end, type = "magical", subtype = { arcane=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# starts to surge mana.", "+Manasurge" end, - on_lose = function(self, err) return "#Target# stops surging mana.", "-Manasurge" end, + on_gain = function(self, err) return _t"#Target# starts to surge mana.", _t"+Manasurge" end, + on_lose = function(self, err) return _t"#Target# stops surging mana.", _t"-Manasurge" end, on_merge = function(self, old_eff, new_eff) -- Merge the mana local olddam = old_eff.power * old_eff.dur @@ -109,14 +109,14 @@ newEffect{ newEffect{ name = "MANA_OVERFLOW", image = "talents/aegis.png", - desc = "Mana Overflow", - long_desc = function(self, eff) return ("The mana is overflowing, increasing your max mana by %d%%."):format(eff.power) end, + desc = _t"Mana Overflow", + long_desc = function(self, eff) return ("The mana is overflowing, increasing your max mana by %d%%."):tformat(eff.power) end, type = "magical", subtype = { arcane=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# starts to overflow mana.", "+Mana Overflow" end, - on_lose = function(self, err) return "#Target# stops overflowing mana.", "-Mana Overflow" end, + on_gain = function(self, err) return _t"#Target# starts to overflow mana.", _t"+Mana Overflow" end, + on_lose = function(self, err) return _t"#Target# stops overflowing mana.", _t"-Mana Overflow" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("max_mana", eff.power * self:getMaxMana() / 100) end, @@ -127,14 +127,14 @@ newEffect{ newEffect{ name = "STONED", image = "talents/stone_touch.png", - desc = "Stoned", - long_desc = function(self, eff) return "The target has been turned to stone: it is rooted in place, unable to act, and may be shattered by a single blow dealing more than 30% of its maximum life. It's new form makes it immune to being poisoned or cut, and grants improved physical(+20%), fire(+80%) and lightning(+50%) resistances." end, + desc = _t"Stoned", + long_desc = function(self, eff) return _t"The target has been turned to stone: it is rooted in place, unable to act, and may be shattered by a single blow dealing more than 30% of its maximum life. It's new form makes it immune to being poisoned or cut, and grants improved physical(+20%), fire(+80%) and lightning(+50%) resistances." end, type = "magical", subtype = { earth=true, stone=true, stun = true}, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# turns to #GREY#STONE#LAST#!", "+Stoned" end, - on_lose = function(self, err) return "#Target# is no longer a #GREY#statue#LAST#.", "-Stoned" end, + on_gain = function(self, err) return _t"#Target# turns to #GREY#STONE#LAST#!", _t"+Stoned" end, + on_lose = function(self, err) return _t"#Target# is no longer a #GREY#statue#LAST#.", _t"-Stoned" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("stoned", 1) eff.poison = self:addTemporaryValue("poison_immune", 1) @@ -159,8 +159,8 @@ newEffect{ newEffect{ name = "ARCANE_STORM", image = "talents/disruption_shield.png", - desc = "Arcane Storm", - long_desc = function(self, eff) return ("The target is the epicenter of a terrible arcane storm, providing +%d%% arcane resistance."):format(eff.power) end, + desc = _t"Arcane Storm", + long_desc = function(self, eff) return ("The target is the epicenter of a terrible arcane storm, providing +%d%% arcane resistance."):tformat(eff.power) end, type = "magical", subtype = { arcane=true}, status = "beneficial", @@ -177,14 +177,14 @@ newEffect{ newEffect{ name = "EARTHEN_BARRIER", image = "talents/earthen_barrier.png", - desc = "Earthen Barrier", - long_desc = function(self, eff) return ("Reduces physical damage received by %d%%."):format(eff.power) end, + desc = _t"Earthen Barrier", + long_desc = function(self, eff) return ("Reduces physical damage received by %d%%."):tformat(eff.power) end, type = "magical", subtype = { earth=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# hardens its skin.", "+Earthen barrier" end, - on_lose = function(self, err) return "#Target#'s skin returns to normal.", "-Earthen barrier" end, + on_gain = function(self, err) return _t"#Target# hardens its skin.", _t"+Earthen barrier" end, + on_lose = function(self, err) return _t"#Target#'s skin returns to normal.", _t"-Earthen barrier" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("stone_skin", 1, {density=4})) eff.tmpid = self:addTemporaryValue("resists", {[DamageType.PHYSICAL]=eff.power}) @@ -197,14 +197,14 @@ newEffect{ newEffect{ name = "MOLTEN_SKIN", image = "talents/golem_molten_skin.png", - desc = "Molten Skin", - long_desc = function(self, eff) return ("Reduces fire damage received by %d%%."):format(eff.power) end, + desc = _t"Molten Skin", + long_desc = function(self, eff) return ("Reduces fire damage received by %d%%."):tformat(eff.power) end, type = "magical", subtype = { fire=true, earth=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target#'s skin turns into molten lava.", "+Molten Skin" end, - on_lose = function(self, err) return "#Target#'s skin returns to normal.", "-Molten Skin" end, + on_gain = function(self, err) return _t"#Target#'s skin turns into molten lava.", _t"+Molten Skin" end, + on_lose = function(self, err) return _t"#Target#'s skin returns to normal.", _t"-Molten Skin" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("wildfire", 1)) eff.tmpid = self:addTemporaryValue("resists", {[DamageType.FIRE]=eff.power}) @@ -217,14 +217,14 @@ newEffect{ newEffect{ name = "REFLECTIVE_SKIN", image = "talents/golem_reflective_skin.png", - desc = "Reflective Skin", - long_desc = function(self, eff) return ("Magically returns %d%% of any damage done to the attacker."):format(eff.power) end, + desc = _t"Reflective Skin", + long_desc = function(self, eff) return ("Magically returns %d%% of any damage done to the attacker."):tformat(eff.power) end, type = "magical", subtype = { arcane=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target#'s skin starts to shimmer.", "+Reflective Skin" end, - on_lose = function(self, err) return "#Target#'s skin returns to normal.", "-Reflective Skin" end, + on_gain = function(self, err) return _t"#Target#'s skin starts to shimmer.", _t"+Reflective Skin" end, + on_lose = function(self, err) return _t"#Target#'s skin returns to normal.", _t"-Reflective Skin" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("reflect_damage", eff.power) self:addShaderAura("reflective_skin", "awesomeaura", {time_factor=5500, alpha=0.6, flame_scale=0.6}, "particles_images/arcaneshockwave.png") @@ -237,8 +237,8 @@ newEffect{ newEffect{ name = "VIMSENSE", image = "talents/vimsense.png", - desc = "Vimsense", - long_desc = function(self, eff) return ("Reduces blight resistance by %d%% and all saves by %d."):format(eff.power, eff.saves) end, + desc = _t"Vimsense", + long_desc = function(self, eff) return ("Reduces blight resistance by %d%% and all saves by %d."):tformat(eff.power, eff.saves) end, type = "magical", subtype = { blight=true }, status = "detrimental", @@ -255,14 +255,14 @@ newEffect{ newEffect{ name = "INVISIBILITY", image = "effects/invisibility.png", - desc = "Invisibility", - long_desc = function(self, eff) return ("Improves/gives invisibility (power %d), reducing damage dealt by %d%%%s."):format(eff.power, eff.penalty*100, eff.regen and " and preventing healing and life regeneration" or "") end, + desc = _t"Invisibility", + long_desc = function(self, eff) return ("Improves/gives invisibility (power %d), reducing damage dealt by %d%%%s."):tformat(eff.power, eff.penalty*100, eff.regen and _t" and preventing healing and life regeneration" or "") end, type = "magical", subtype = { phantasm=true }, status = "beneficial", parameters = { power=10, penalty=0, regen=false }, - on_gain = function(self, err) return "#Target# vanishes from sight.", "+Invis" end, - on_lose = function(self, err) return "#Target# is no longer invisible.", "-Invis" end, + on_gain = function(self, err) return _t"#Target# vanishes from sight.", _t"+Invis" end, + on_lose = function(self, err) return _t"#Target# is no longer invisible.", _t"-Invis" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("invisible", eff.power) eff.penaltyid = self:addTemporaryValue("invisible_damage_penalty", eff.penalty) @@ -295,15 +295,15 @@ newEffect{ newEffect{ name = "ETHEREAL", image = "effects/invisibility.png", - desc = "Ethereal", + desc = _t"Ethereal", long_desc = function(self, eff) return ("Invisible (power %d), damage dealt reduced by %d%%, all resistances increased by %d%%, movement speed increased by %d%%."): - format(eff.power, eff.reduction * 100, eff.resist, eff.move) end, + tformat(eff.power, eff.reduction * 100, eff.resist, eff.move) end, type = "magical", subtype = { phantasm=true }, status = "beneficial", parameters = { power=10, resist=0, reduction=0, move=0}, - on_gain = function(self, err) return "#Target# becomes ethereal.", "+Ethereal" end, - on_lose = function(self, err) return "#Target# is no longer ethereal.", "-Ethereal" end, + on_gain = function(self, err) return _t"#Target# becomes ethereal.", _t"+Ethereal" end, + on_lose = function(self, err) return _t"#Target# is no longer ethereal.", _t"-Ethereal" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("invisible", eff.power) eff.penaltyid = self:addTemporaryValue("invisible_damage_penalty", eff.reduction) @@ -333,16 +333,16 @@ newEffect{ newEffect{ name = "STORMSHIELD", image = "talents/rune__lightning.png", - desc = "Stormshield", + desc = _t"Stormshield", long_desc = function(self, eff) return ("The target is protected a raging storm deflecting up to %d instances of damage over %d."): - format(eff.blocks, eff.threshold) end, + tformat(eff.blocks, eff.threshold) end, type = "magical", subtype = { lightning=true, shield=true }, status = "beneficial", charges = function(self, eff) return math.floor(eff.blocks) end, parameters = {threshold = 1, blocks = 1,}, - on_gain = function(self, err) return "#Target# summons a storm to protect them!", "+Stormshield" end, - on_lose = function(self, err) return "#Target#'s storm dissipates.", "-Stormshield" end, + on_gain = function(self, err) return _t"#Target# summons a storm to protect them!", _t"+Stormshield" end, + on_lose = function(self, err) return _t"#Target#'s storm dissipates.", _t"-Stormshield" end, activate = function(self, eff) if core.shader.active(4) then self:effectParticles(eff, {type="shader_ring_rotating", args={rotation=0, radius=1.0, img="lightningshield"}, shader={type="lightningshield"}}) @@ -355,7 +355,7 @@ newEffect{ callbackOnTakeDamage = function(self, eff, src, x, y, type, dam, state) if dam < eff.threshold then return end local d_color = DamageType:get(type).text_color or "#ORCHID#" - game:delayedLogDamage(src, self, 0, ("%s(%d stormshielded#LAST#%s)#LAST#"):format(d_color, dam, d_color), false) + game:delayedLogDamage(src, self, 0, ("%s(%d stormshielded#LAST#%s)#LAST#"):tformat(d_color, dam, d_color), false) eff.blocks = eff.blocks - 1 if eff.blocks <= 0 then src:logCombat(self, "#BLUE##Target#'s stormshield is out of charges and disspitates!#LAST#.") @@ -367,21 +367,21 @@ newEffect{ newEffect{ name = "PRISMATIC_SHIELD", image = "talents/ward.png", - desc = "Prismatic Shield", + desc = _t"Prismatic Shield", long_desc = function(self, eff) local str = "" for k,v in pairs(eff.wards) do - str = str .. ", " .. v .. " " .. k:lower() + str = str .. ", " .. v .. " " .. _t(k:lower()) end str = string.sub(str, 2) - return ("The target is protected by a prismatic shield blocking many instances of damage. Remaining: %s"):format(str) -- add tooltip + return ("The target is protected by a prismatic shield blocking many instances of damage. Remaining: %s"):tformat(str) -- add tooltip end, type = "magical", subtype = { ward=true, }, status = "beneficial", parameters = { wards = {} }, - on_gain = function(self, err) return "#Target# summons a prismatic shield to protect him!", "+Prismatic" end, - on_lose = function(self, err) return "#Target#'s prismatic shield fades.", "-Prismatic" end, + on_gain = function(self, err) return _t"#Target# summons a prismatic shield to protect him!", _t"+Prismatic" end, + on_lose = function(self, err) return _t"#Target#'s prismatic shield fades.", _t"-Prismatic" end, activate = function(self, eff) end, deactivate = function(self, eff) @@ -391,7 +391,7 @@ newEffect{ for k,v in pairs(eff.wards) do if k == type then local d_color = DamageType:get(type).text_color or "#ORCHID#" -- fix display - game:delayedLogDamage(src, self, 0, ("%s(%d to prism#LAST#%s)#LAST#"):format(d_color, dam, d_color), false) + game:delayedLogDamage(src, self, 0, ("%s(%d to prism#LAST#%s)#LAST#"):tformat(d_color, dam, d_color), false) eff.wards[k] = eff.wards[k] - 1 if eff.wards[k] <= 0 then eff.wards[k] = nil end return {dam = 0} @@ -403,15 +403,15 @@ newEffect{ newEffect{ name = "PURGING", image = "talents/willful_tormenter.png", -- re-used icon - desc = "PURGING", + desc = _t"PURGING", long_desc = function(self, eff) return ("The target is being purged of 1 physical ailment each turn."): - format() end, + tformat() end, type = "magical", subtype = { arcane=true, }, status = "beneficial", parameters = {}, - on_gain = function(self, err) return "#Target# is being purged of his physical ailments!", "+Purging" end, - on_lose = function(self, err) return "#Target#'s is no longer being purged.", "-Purging" end, + on_gain = function(self, err) return _t"#Target# is being purged of his physical ailments!", _t"+Purging" end, + on_lose = function(self, err) return _t"#Target#'s is no longer being purged.", _t"-Purging" end, activate = function(self, eff) end, deactivate = function(self, eff) @@ -424,8 +424,8 @@ newEffect{ newEffect{ name = "VIMSENSE_DETECT", image = "talents/vimsense.png", - desc = "Sensing (Vim)", - long_desc = function(self, eff) return "Improves senses, allowing the detection of unseen things." end, + desc = _t"Sensing (Vim)", + long_desc = function(self, eff) return _t"Improves senses, allowing the detection of unseen things." end, type = "magical", subtype = { sense=true, corruption=true }, status = "beneficial", @@ -453,14 +453,14 @@ newEffect{ newEffect{ name = "SENSE_HIDDEN", image = "talents/keen_senses.png", - desc = "Sense Hidden", - long_desc = function(self, eff) return ("Improves/gives the ability to see invisible and stealthed creatures (power %d)."):format(eff.power) end, + desc = _t"Sense Hidden", + long_desc = function(self, eff) return ("Improves/gives the ability to see invisible and stealthed creatures (power %d)."):tformat(eff.power) end, type = "magical", subtype = { sense=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target#'s eyes tingle." end, - on_lose = function(self, err) return "#Target#'s eyes tingle no more." end, + on_gain = function(self, err) return _t"#Target#'s eyes tingle." end, + on_lose = function(self, err) return _t"#Target#'s eyes tingle no more." end, activate = function(self, eff) eff.invisid = self:addTemporaryValue("see_invisible", eff.power) eff.stealthid = self:addTemporaryValue("see_stealth", eff.power) @@ -473,14 +473,14 @@ newEffect{ newEffect{ name = "BANE_BLINDED", image = "effects/bane_blinded.png", - desc = "Bane of Blindness", - long_desc = function(self, eff) return ("The target is blinded, unable to see anything and takes %0.2f darkness damage per turn."):format(eff.dam) end, + desc = _t"Bane of Blindness", + long_desc = function(self, eff) return ("The target is blinded, unable to see anything and takes %0.2f darkness damage per turn."):tformat(eff.dam) end, type = "magical", subtype = { bane=true, blind=true }, status = "detrimental", parameters = { dam=10}, - on_gain = function(self, err) return "#Target# loses sight!", "+Blind" end, - on_lose = function(self, err) return "#Target# recovers sight.", "-Blind" end, + on_gain = function(self, err) return _t"#Target# loses sight!", _t"+Blind" end, + on_lose = function(self, err) return _t"#Target# recovers sight.", _t"-Blind" end, on_timeout = function(self, eff) DamageType:get(DamageType.DARKNESS).projector(eff.src, self.x, self.y, DamageType.DARKNESS, eff.dam) end, @@ -502,15 +502,15 @@ newEffect{ newEffect{ name = "BANE_CONFUSED", image = "effects/bane_confused.png", - desc = "Bane of Confusion", - long_desc = function(self, eff) return ("The target is confused, acting randomly (chance %d%%), unable to perform complex actions and takes %0.2f darkness damage per turn."):format(eff.power, eff.dam) end, + desc = _t"Bane of Confusion", + long_desc = function(self, eff) return ("The target is confused, acting randomly (chance %d%%), unable to perform complex actions and takes %0.2f darkness damage per turn."):tformat(eff.power, eff.dam) end, charges = function(self, eff) return (tostring(math.floor(eff.power)).."%") end, type = "magical", subtype = { bane=true, confusion=true }, status = "detrimental", parameters = { power=50, dam=10 }, - on_gain = function(self, err) return "#Target# wanders around!.", "+Confused" end, - on_lose = function(self, err) return "#Target# seems more focused.", "-Confused" end, + on_gain = function(self, err) return _t"#Target# wanders around!.", _t"+Confused" end, + on_lose = function(self, err) return _t"#Target# seems more focused.", _t"-Confused" end, on_timeout = function(self, eff) DamageType:get(DamageType.DARKNESS).projector(eff.src, self.x, self.y, DamageType.DARKNESS, eff.dam) end, @@ -526,14 +526,14 @@ newEffect{ newEffect{ name = "SUPERCHARGE_GOLEM", image = "talents/supercharge_golem.png", - desc = "Supercharge Golem", - long_desc = function(self, eff) return ("The target is supercharged, increasing life regen by %0.2f and damage done by 20%%."):format(eff.regen) end, + desc = _t"Supercharge Golem", + long_desc = function(self, eff) return ("The target is supercharged, increasing life regen by %0.2f and damage done by 20%%."):tformat(eff.regen) end, type = "magical", subtype = { arcane=true }, status = "beneficial", parameters = { regen=10 }, - on_gain = function(self, err) return "#Target# is overloaded with power.", "+Supercharge" end, - on_lose = function(self, err) return "#Target# seems less dangerous.", "-Supercharge" end, + on_gain = function(self, err) return _t"#Target# is overloaded with power.", _t"+Supercharge" end, + on_lose = function(self, err) return _t"#Target# seems less dangerous.", _t"-Supercharge" end, activate = function(self, eff) eff.pid = self:addTemporaryValue("inc_damage", {all=25}) eff.lid = self:addTemporaryValue("life_regen", eff.regen) @@ -552,14 +552,14 @@ newEffect{ newEffect{ name = "POWER_OVERLOAD", - desc = "Power Overload", - long_desc = function(self, eff) return ("The target radiates incredible power, increasing all damage done by %d%%."):format(eff.power) end, + desc = _t"Power Overload", + long_desc = function(self, eff) return ("The target radiates incredible power, increasing all damage done by %d%%."):tformat(eff.power) end, type = "magical", subtype = { arcane=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is overloaded with power.", "+Overload" end, - on_lose = function(self, err) return "#Target# seems less dangerous.", "-Overload" end, + on_gain = function(self, err) return _t"#Target# is overloaded with power.", _t"+Overload" end, + on_lose = function(self, err) return _t"#Target# seems less dangerous.", _t"-Overload" end, activate = function(self, eff) eff.pid = self:addTemporaryValue("inc_damage", {all=eff.power}) end, @@ -570,14 +570,14 @@ newEffect{ newEffect{ name = "LIFE_TAP", image = "talents/life_tap.png", - desc = "Life Tap", - long_desc = function(self, eff) return ("The target taps its blood's hidden power, healing for %d%% of all damage they deal."):format(eff.power) end, + desc = _t"Life Tap", + long_desc = function(self, eff) return ("The target taps its blood's hidden power, healing for %d%% of all damage they deal."):tformat(eff.power) end, type = "magical", subtype = { blight=true }, status = "beneficial", parameters = { power=0 }, - on_gain = function(self, err) return "#Target# looks healthier as he deals damage.", "+Life Tap" end, - on_lose = function(self, err) return "#Target# stops leeching life.", "-Life Tap" end, + on_gain = function(self, err) return _t"#Target# looks healthier as he deals damage.", _t"+Life Tap" end, + on_lose = function(self, err) return _t"#Target# stops leeching life.", _t"-Life Tap" end, activate = function(self, eff) end, deactivate = function(self, eff) @@ -594,8 +594,8 @@ newEffect{ newEffect{ name = "ARCANE_EYE", image = "talents/arcane_eye.png", - desc = "Arcane Eye", - long_desc = function(self, eff) return ("You have an arcane eye observing for you in a radius of %d."):format(eff.radius) end, + desc = _t"Arcane Eye", + long_desc = function(self, eff) return ("You have an arcane eye observing for you in a radius of %d."):tformat(eff.radius) end, type = "magical", subtype = { sense=true }, status = "beneficial", @@ -627,8 +627,8 @@ newEffect{ newEffect{ name = "ARCANE_EYE_SEEN", image = "talents/arcane_eye.png", - desc = "Seen by Arcane Eye", - long_desc = function(self, eff) return "An Arcane Eye has seen this creature." end, + desc = _t"Seen by Arcane Eye", + long_desc = function(self, eff) return _t"An Arcane Eye has seen this creature." end, type = "magical", subtype = { sense=true }, no_ct_effect = true, @@ -648,8 +648,8 @@ newEffect{ newEffect{ name = "ALL_STAT", image = "effects/all_stat.png", - desc = "All stats increase", - long_desc = function(self, eff) return ("All primary stats of the target are increased by %d."):format(eff.power) end, + desc = _t"All stats increase", + long_desc = function(self, eff) return ("All primary stats of the target are increased by %d."):tformat(eff.power) end, type = "magical", subtype = { arcane=true }, status = "beneficial", @@ -672,14 +672,14 @@ newEffect{ newEffect{ name = "DISPLACEMENT_SHIELD", image = "talents/displacement_shield.png", - desc = "Displacement Shield", - long_desc = function(self, eff) return ("The target is surrounded by a space distortion that randomly sends (%d%% chance) incoming damage to another target (%s). Absorbs %d/%d damage before it crumbles."):format(eff.chance, eff.target and eff.target.name or "unknown", self.displacement_shield, eff.power) end, + desc = _t"Displacement Shield", + long_desc = function(self, eff) return ("The target is surrounded by a space distortion that randomly sends (%d%% chance) incoming damage to another target (%s). Absorbs %d/%d damage before it crumbles."):tformat(eff.chance, eff.target and eff.target:getName() or "unknown", self.displacement_shield, eff.power) end, type = "magical", subtype = { teleport=true, shield=true }, status = "beneficial", parameters = { power=10, target=nil, chance=25 }, - on_gain = function(self, err) return "The very fabric of space alters around #target#.", "+Displacement Shield" end, - on_lose = function(self, err) return "The fabric of space around #target# stabilizes to normal.", "-Displacement Shield" end, + on_gain = function(self, err) return _t"The very fabric of space alters around #target#.", _t"+Displacement Shield" end, + on_lose = function(self, err) return _t"The fabric of space around #target# stabilizes to normal.", _t"-Displacement Shield" end, on_aegis = function(self, eff, aegis) self.displacement_shield = self.displacement_shield + eff.power * aegis / 100 if core.shader.active(4) then @@ -726,15 +726,15 @@ newEffect{ newEffect{ name = "DAMAGE_SHIELD", image = "talents/barrier.png", - desc = "Damage Shield", - long_desc = function(self, eff) return ("The target is surrounded by a magical shield, absorbing %d/%d damage %s before it crumbles."):format(self.damage_shield_absorb, eff.power, ((self.damage_shield_reflect and self.damage_shield_reflect > 0) and ("(reflecting %d%% back to the attacker)"):format(self.damage_shield_reflect) or "")) end, + desc = _t"Damage Shield", + long_desc = function(self, eff) return ("The target is surrounded by a magical shield, absorbing %d/%d damage %s before it crumbles."):tformat(self.damage_shield_absorb, eff.power, ((self.damage_shield_reflect and self.damage_shield_reflect > 0) and ("(reflecting %d%% back to the attacker)"):tformat(self.damage_shield_reflect) or "")) end, type = "magical", subtype = { arcane=true, shield=true }, status = "beneficial", parameters = { power=100 }, charges = function(self, eff) return math.ceil(self.damage_shield_absorb) end, - on_gain = function(self, err) return "A shield forms around #target#.", "+Shield" end, - on_lose = function(self, err) return "The shield around #target# crumbles.", "-Shield" end, + on_gain = function(self, err) return _t"A shield forms around #target#.", _t"+Shield" end, + on_lose = function(self, err) return _t"The shield around #target# crumbles.", _t"-Shield" end, on_merge = function(self, old_eff, new_eff) local new_eff_adj = {} -- Adjust for shield modifiers if self:attr("shield_factor") then @@ -826,14 +826,14 @@ newEffect{ newEffect{ name = "MARTYRDOM", image = "talents/martyrdom.png", - desc = "Martyrdom", - long_desc = function(self, eff) return ("All damage done by the target will also hurt it for %d%%."):format(eff.power) end, + desc = _t"Martyrdom", + long_desc = function(self, eff) return ("All damage done by the target will also hurt it for %d%%."):tformat(eff.power) end, type = "magical", subtype = { light=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is a martyr.", "+Martyr" end, - on_lose = function(self, err) return "#Target# is no longer influenced by martyrdom.", "-Martyr" end, + on_gain = function(self, err) return _t"#Target# is a martyr.", _t"+Martyr" end, + on_lose = function(self, err) return _t"#Target# is no longer influenced by martyrdom.", _t"-Martyr" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("martyrdom", eff.power) end, @@ -845,13 +845,13 @@ newEffect{ -- This only exists to mark a timer for Radiance being consumed newEffect{ name = "RADIANCE_DIM", image = "talents/curse_of_vulnerability.png", - desc = "Radiance Lost", - long_desc = function(self, eff) return ("You have expended the power of your Radiance temporarily reducing its radius to 1."):format() end, + desc = _t"Radiance Lost", + long_desc = function(self, eff) return ("You have expended the power of your Radiance temporarily reducing its radius to 1."):tformat() end, type = "other", subtype = { radiance=true }, parameters = { }, - on_gain = function(self, err) return "#Target#'s aura dims.", "+Dim" end, - on_lose = function(self, err) return "#Target# shines with renewed light.", "-Dim" end, + on_gain = function(self, err) return _t"#Target#'s aura dims.", _t"+Dim" end, + on_lose = function(self, err) return _t"#Target# shines with renewed light.", _t"-Dim" end, activate = function(self, eff) self:callTalent(self.T_SEARING_SIGHT, "updateParticle") end, @@ -862,14 +862,14 @@ newEffect{ newEffect{ name = "CURSE_VULNERABILITY", image = "talents/curse_of_vulnerability.png", - desc = "Curse of Vulnerability", - long_desc = function(self, eff) return ("The target is cursed, reducing all resistances by %d%%."):format(eff.power) end, + desc = _t"Curse of Vulnerability", + long_desc = function(self, eff) return ("The target is cursed, reducing all resistances by %d%%."):tformat(eff.power) end, type = "magical", subtype = { curse=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is cursed.", "+Curse" end, - on_lose = function(self, err) return "#Target# is no longer cursed.", "-Curse" end, + on_gain = function(self, err) return _t"#Target# is cursed.", _t"+Curse" end, + on_lose = function(self, err) return _t"#Target# is no longer cursed.", _t"-Curse" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("resists", { all = -eff.power, @@ -882,14 +882,14 @@ newEffect{ newEffect{ name = "CURSE_IMPOTENCE", image = "talents/curse_of_impotence.png", - desc = "Curse of Impotence", - long_desc = function(self, eff) return ("The target is cursed, reducing all damage done by %d%%."):format(eff.power) end, + desc = _t"Curse of Impotence", + long_desc = function(self, eff) return ("The target is cursed, reducing all damage done by %d%%."):tformat(eff.power) end, type = "magical", subtype = { curse=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is cursed.", "+Curse" end, - on_lose = function(self, err) return "#Target# is no longer cursed.", "-Curse" end, + on_gain = function(self, err) return _t"#Target# is cursed.", _t"+Curse" end, + on_lose = function(self, err) return _t"#Target# is no longer cursed.", _t"-Curse" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("inc_damage", { all = -eff.power, @@ -902,14 +902,14 @@ newEffect{ newEffect{ name = "CURSE_DEFENSELESSNESS", image = "talents/curse_of_defenselessness.png", - desc = "Curse of Defenselessness", - long_desc = function(self, eff) return ("The target is cursed, reducing defence and all saves by %d."):format(eff.power) end, + desc = _t"Curse of Defenselessness", + long_desc = function(self, eff) return ("The target is cursed, reducing defence and all saves by %d."):tformat(eff.power) end, type = "magical", subtype = { curse=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is cursed.", "+Curse" end, - on_lose = function(self, err) return "#Target# is no longer cursed.", "-Curse" end, + on_gain = function(self, err) return _t"#Target# is cursed.", _t"+Curse" end, + on_lose = function(self, err) return _t"#Target# is no longer cursed.", _t"-Curse" end, activate = function(self, eff) eff.def = self:addTemporaryValue("combat_def", -eff.power) eff.mental = self:addTemporaryValue("combat_mentalresist", -eff.power) @@ -926,14 +926,14 @@ newEffect{ newEffect{ name = "CURSE_DEATH", image = "talents/curse_of_death.png", - desc = "Curse of Death", - long_desc = function(self, eff) return ("The target is cursed, taking %0.2f darkness damage per turn and preventing natural life regeneration."):format(eff.dam) end, + desc = _t"Curse of Death", + long_desc = function(self, eff) return ("The target is cursed, taking %0.2f darkness damage per turn and preventing natural life regeneration."):tformat(eff.dam) end, type = "magical", subtype = { curse=true, darkness=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is cursed.", "+Curse" end, - on_lose = function(self, err) return "#Target# is no longer cursed.", "-Curse" end, + on_gain = function(self, err) return _t"#Target# is cursed.", _t"+Curse" end, + on_lose = function(self, err) return _t"#Target# is no longer cursed.", _t"-Curse" end, -- Damage each turn on_timeout = function(self, eff) DamageType:get(DamageType.DARKNESS).projector(eff.src, self.x, self.y, DamageType.DARKNESS, eff.dam) @@ -948,14 +948,14 @@ newEffect{ newEffect{ name = "CURSE_HATE", image = "talents/curse_of_the_meek.png", - desc = "Curse of Hate", - long_desc = function(self, eff) return ("The target is cursed, force all foes in a radius of 5 to attack it.") end, + desc = _t"Curse of Hate", + long_desc = function(self, eff) return (_t"The target is cursed, force all foes in a radius of 5 to attack it.") end, type = "magical", subtype = { curse=true }, status = "detrimental", parameters = { }, - on_gain = function(self, err) return "#Target# is cursed.", "+Curse" end, - on_lose = function(self, err) return "#Target# is no longer cursed.", "-Curse" end, + on_gain = function(self, err) return _t"#Target# is cursed.", _t"+Curse" end, + on_lose = function(self, err) return _t"#Target# is no longer cursed.", _t"-Curse" end, on_timeout = function(self, eff) if self.dead or not self.x then return end local tg = {type="ball", range=0, radius=5, friendlyfire=false} @@ -972,14 +972,14 @@ newEffect{ newEffect{ name = "CORRUPTING_STRIKE", image = "talents/dark_surprise.png", - desc = "Corrupting Strike", - long_desc = function(self, eff) return ("The targets natural essence in corrupted reducing disease resistance by 100%%."):format() end, + desc = _t"Corrupting Strike", + long_desc = function(self, eff) return ("The targets natural essence in corrupted reducing disease resistance by 100%%."):tformat() end, type = "magical", subtype = {blight=true}, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is completely vulnerable to disease!" end, - on_lose = function(self, err) return "#Target# no longer vulnerable to disease." end, + on_gain = function(self, err) return _t"#Target# is completely vulnerable to disease!" end, + on_lose = function(self, err) return _t"#Target# no longer vulnerable to disease." end, activate = function(self, eff) self:effectTemporaryValue(eff, "disease_immune", -1) end, @@ -989,8 +989,8 @@ newEffect{ newEffect{ name = "BLOODLUST", image = "talents/bloodlust.png", - desc = "Bloodlust", - long_desc = function(self, eff) return ("The target is in a magical frenzy, improving spellpower by %d."):format(eff.spellpower * eff.stacks) end, + desc = _t"Bloodlust", + long_desc = function(self, eff) return ("The target is in a magical frenzy, improving spellpower by %d."):tformat(eff.spellpower * eff.stacks) end, type = "magical", subtype = { frenzy=true }, status = "beneficial", @@ -1012,14 +1012,14 @@ newEffect{ newEffect{ name = "ACID_SPLASH", image = "talents/acidic_skin.png", - desc = "Acid Splash", - long_desc = function(self, eff) return ("The target has been splashed with acid, taking %0.2f acid damage per turn, reducing armour by %d and attack by %d."):format(eff.dam, eff.armor or 0, eff.atk) end, + desc = _t"Acid Splash", + long_desc = function(self, eff) return ("The target has been splashed with acid, taking %0.2f acid damage per turn, reducing armour by %d and attack by %d."):tformat(eff.dam, eff.armor or 0, eff.atk) end, type = "magical", subtype = { acid=true, sunder=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is covered in acid!" end, - on_lose = function(self, err) return "#Target# is free from the acid." end, + on_gain = function(self, err) return _t"#Target# is covered in acid!" end, + on_lose = function(self, err) return _t"#Target# is free from the acid." end, -- Damage each turn on_timeout = function(self, eff) DamageType:get(DamageType.ACID).projector(eff.src, self.x, self.y, DamageType.ACID, eff.dam) @@ -1036,8 +1036,8 @@ newEffect{ newEffect{ name = "BLOOD_FURY", image = "talents/blood_fury.png", - desc = "Bloodfury", - long_desc = function(self, eff) return ("The target's blight and acid damage is increased by %d%%."):format(eff.power) end, + desc = _t"Bloodfury", + long_desc = function(self, eff) return ("The target's blight and acid damage is increased by %d%%."):tformat(eff.power) end, type = "magical", subtype = { frenzy=true }, status = "beneficial", @@ -1053,14 +1053,14 @@ newEffect{ newEffect{ name = "PHOENIX_EGG", image = "effects/phoenix_egg.png", - desc = "Reviving Phoenix", - long_desc = function(self, eff) return "Target is being brought back to life." end, + desc = _t"Reviving Phoenix", + long_desc = function(self, eff) return _t"Target is being brought back to life." end, type = "magical", subtype = { fire=true }, status = "beneficial", parameters = { life_regen = 25, mana_regen = -9.75, never_move = 1, silence = 1 }, - on_gain = function(self, err) return "#Target# is consumed in a burst of flame. All that remains is a fiery egg.", "+Phoenix" end, - on_lose = function(self, err) return "#Target# bursts out from the egg.", "-Phoenix" end, + on_gain = function(self, err) return _t"#Target# is consumed in a burst of flame. All that remains is a fiery egg.", _t"+Phoenix" end, + on_lose = function(self, err) return _t"#Target# bursts out from the egg.", _t"-Phoenix" end, activate = function(self, eff) self.display = "O" -- change the display of the phoenix to an egg, maybe later make it a fiery orb image eff.old_image = self.image @@ -1093,14 +1093,14 @@ newEffect{ newEffect{ name = "HURRICANE", image = "effects/hurricane.png", - desc = "Hurricane", - long_desc = function(self, eff) return ("The target is in the center of a lightning hurricane, doing %0.2f to %0.2f lightning damage to itself and others around every turn."):format(eff.dam / 3, eff.dam) end, + desc = _t"Hurricane", + long_desc = function(self, eff) return ("The target is in the center of a lightning hurricane, doing %0.2f to %0.2f lightning damage to itself and others around every turn."):tformat(eff.dam / 3, eff.dam) end, type = "magical", subtype = { lightning=true }, status = "detrimental", parameters = { dam=10, radius=2 }, - on_gain = function(self, err) return "#Target# is caught inside a Hurricane.", "+Hurricane" end, - on_lose = function(self, err) return "The Hurricane around #Target# dissipates.", "-Hurricane" end, + on_gain = function(self, err) return _t"#Target# is caught inside a Hurricane.", _t"+Hurricane" end, + on_lose = function(self, err) return _t"The Hurricane around #Target# dissipates.", _t"-Hurricane" end, on_timeout = function(self, eff) local tg = {type="ball", x=self.x, y=self.y, radius=eff.radius, selffire=false} local dam = eff.dam @@ -1115,8 +1115,8 @@ newEffect{ newEffect{ name = "TELEPORT_ANGOLWEN", image = "talents/teleport_angolwen.png", - desc = "Teleport: Angolwen", - long_desc = function(self, eff) return "The target is waiting to be recalled back to Angolwen." end, + desc = _t"Teleport: Angolwen", + long_desc = function(self, eff) return _t"The target is waiting to be recalled back to Angolwen." end, type = "magical", subtype = { teleport=true }, status = "beneficial", @@ -1153,8 +1153,8 @@ newEffect{ newEffect{ name = "TELEPORT_POINT_ZERO", image = "talents/teleport_point_zero.png", - desc = "Timeport: Point Zero", - long_desc = function(self, eff) return "The target is waiting to be recalled back to Point Zero." end, + desc = _t"Timeport: Point Zero", + long_desc = function(self, eff) return _t"The target is waiting to be recalled back to Point Zero." end, type = "magical", subtype = { timeport=true }, status = "beneficial", @@ -1197,14 +1197,14 @@ newEffect{ newEffect{ name = "PREMONITION_SHIELD", image = "talents/premonition.png", - desc = "Premonition Shield", - long_desc = function(self, eff) return ("Reduces %s damage received by %d%%."):format(DamageType:get(eff.damtype).name, eff.resist) end, + desc = _t"Premonition Shield", + long_desc = function(self, eff) return ("Reduces %s damage received by %d%%."):tformat(DamageType:get(eff.damtype).name, eff.resist) end, type = "magical", subtype = { sense=true }, status = "beneficial", parameters = { }, - on_gain = function(self, err) return "#Target# casts a protective shield just in time!", "+Premonition Shield" end, - on_lose = function(self, err) return "The protective shield of #Target# disappears.", "-Premonition Shield" end, + on_gain = function(self, err) return _t"#Target# casts a protective shield just in time!", _t"+Premonition Shield" end, + on_lose = function(self, err) return _t"The protective shield of #Target# disappears.", _t"-Premonition Shield" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("resists", {[eff.damtype]=eff.resist}) end, @@ -1215,14 +1215,14 @@ newEffect{ newEffect{ name = "CORROSIVE_WORM", image = "talents/corrosive_worm.png", - desc = "Corrosive Worm", - long_desc = function(self, eff) return ("The target is infected with a corrosive worm, reducing blight and acid resistance by %d%%. When the effect ends, the worm will explode, dealing %d acid damage in a 4 radius ball. This damage will increase by %d%% of all damage taken while under torment"):format(eff.power, eff.finaldam, eff.rate*100) end, + desc = _t"Corrosive Worm", + long_desc = function(self, eff) return ("The target is infected with a corrosive worm, reducing blight and acid resistance by %d%%. When the effect ends, the worm will explode, dealing %d acid damage in a 4 radius ball. This damage will increase by %d%% of all damage taken while under torment"):tformat(eff.power, eff.finaldam, eff.rate*100) end, type = "magical", subtype = { acid=true }, status = "detrimental", parameters = { power=20, rate=10, finaldam=50, }, - on_gain = function(self, err) return "#Target# is infected by a corrosive worm.", "+Corrosive Worm" end, - on_lose = function(self, err) return "#Target# is free from the corrosive worm.", "-Corrosive Worm" end, + on_gain = function(self, err) return _t"#Target# is infected by a corrosive worm.", _t"+Corrosive Worm" end, + on_lose = function(self, err) return _t"#Target# is free from the corrosive worm.", _t"-Corrosive Worm" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("circle", 1, {base_rot=0, oversize=0.7, a=255, appear=8, speed=0, img="blight_worms", radius=0})) self:effectTemporaryValue(eff, "resists", {[DamageType.BLIGHT]=-eff.power, [DamageType.ACID]=-eff.power}) @@ -1245,14 +1245,14 @@ newEffect{ newEffect{ name = "WRAITHFORM", image = "talents/wraithform.png", - desc = "Wraithform", - long_desc = function(self, eff) return ("Turn into a wraith, passing through walls (but not natural obstacles), granting %d defense and %d armour."):format(eff.def, eff.armor) end, + desc = _t"Wraithform", + long_desc = function(self, eff) return ("Turn into a wraith, passing through walls (but not natural obstacles), granting %d defense and %d armour."):tformat(eff.def, eff.armor) end, type = "magical", subtype = { darkness=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# turns into a wraith.", "+Wraithform" end, - on_lose = function(self, err) return "#Target# returns to normal.", "-Wraithform" end, + on_gain = function(self, err) return _t"#Target# turns into a wraith.", _t"+Wraithform" end, + on_lose = function(self, err) return _t"#Target# returns to normal.", _t"-Wraithform" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("can_pass", {pass_wall=20}) eff.defid = self:addTemporaryValue("combat_def", eff.def) @@ -1284,8 +1284,8 @@ newEffect{ newEffect{ name = "EMPOWERED_HEALING", image = "effects/empowered_healing.png", - desc = "Empowered Healing", - long_desc = function(self, eff) return ("Increases the effectiveness of all healing the target receives by %d%%."):format(eff.power * 100) end, + desc = _t"Empowered Healing", + long_desc = function(self, eff) return ("Increases the effectiveness of all healing the target receives by %d%%."):tformat(eff.power * 100) end, type = "magical", subtype = { light=true }, status = "beneficial", @@ -1300,8 +1300,8 @@ newEffect{ newEffect{ name = "PROVIDENCE", image = "talents/providence.png", - desc = "Providence", - long_desc = function(self, eff) return ("The target is under protection, removing one negative effect per turn."):format() end, + desc = _t"Providence", + long_desc = function(self, eff) return ("The target is under protection, removing one negative effect per turn."):tformat() end, type = "magical", subtype = { light=true, shield=true }, status = "beneficial", @@ -1337,8 +1337,8 @@ newEffect{ newEffect{ name = "SOLAR_INFUSION", image = "talents/sun_flare.png", - desc = "Solar Infusion", - long_desc = function(self, eff) return ("The target's light, darkness, and fire resistance has been increased by %d%%."):format(eff.resist) end, + desc = _t"Solar Infusion", + long_desc = function(self, eff) return ("The target's light, darkness, and fire resistance has been increased by %d%%."):tformat(eff.resist) end, type = "magical", subtype = { }, status = "beneficial", @@ -1357,8 +1357,8 @@ newEffect{ newEffect{ name = "TOTALITY", image = "talents/totality.png", - desc = "Totality", - long_desc = function(self, eff) return ("The target's light and darkness spell penetration has been increased by %d%%."):format(eff.power) end, + desc = _t"Totality", + long_desc = function(self, eff) return ("The target's light and darkness spell penetration has been increased by %d%%."):tformat(eff.power) end, type = "magical", subtype = { darkness=true, light=true }, status = "beneficial", @@ -1376,9 +1376,9 @@ newEffect{ newEffect{ name = "DIVINE_GLYPHS", image = "talents/glyph_of_explosion.png", - desc = "Empowered Glyphs", + desc = _t"Empowered Glyphs", long_desc = function(self, eff) - return ("A divine glyph recently triggered, providing %d%% light and darkness affinity and resistence."):format(eff.power) + return ("A divine glyph recently triggered, providing %d%% light and darkness affinity and resistence."):tformat(eff.power) end, type = "magical", subtype = {light=true, darkness=true}, @@ -1407,9 +1407,9 @@ newEffect{ newEffect{ name = "STARLIGHT_FATIGUE", image = "talents/glyph_of_fatigue.png", - desc = "Fatiguing Starlight", + desc = _t"Fatiguing Starlight", long_desc = function(self, eff) - return ("Inflicted with a fatiguing starlight, taking %d darkness damage and increasing the cooldown of a cooling-down talent by 1 whenever they act"):format(eff.src.summoner:damDesc(DamageType.DARKNESS, eff.dam)) + return ("Inflicted with a fatiguing starlight, taking %d darkness damage and increasing the cooldown of a cooling-down talent by 1 whenever they act"):tformat(eff.src.summoner:damDesc(DamageType.DARKNESS, eff.dam)) end, type = "magical", subtype = {darkness = true}, @@ -1429,9 +1429,9 @@ newEffect{ newEffect{ name = "SUNBURST", image = "talents/sunburst.png", - desc = "Sunburst", + desc = _t"Sunburst", long_desc = function(self, eff) - return ("Light damage has been increased by %d%% to +%d%%."):format(eff.damInc, self.inc_damage.LIGHT) + return ("Light damage has been increased by %d%% to +%d%%."):tformat(eff.damInc, self.inc_damage.LIGHT) end, type = "magical", subtype = {light=true, darkness=true}, @@ -1444,9 +1444,9 @@ newEffect{ newEffect{ name = "DARKLIGHT", image = "talents/darkest_light.png", - desc = "Shrouded in Darklight", + desc = _t"Shrouded in Darklight", long_desc = function(self, eff) - return ("%d%% of the targets damage is being split between light and darkness and they are taking %d light and %d darkness damage each turn."):format(eff.conversion * 100, eff.src:damDesc(DamageType.LIGHT, eff.dotDam), eff.src:damDesc(DamageType.DARKNESS, eff.dotDam)) + return ("%d%% of the targets damage is being split between light and darkness and they are taking %d light and %d darkness damage each turn."):tformat(eff.conversion * 100, eff.src:damDesc(DamageType.LIGHT, eff.dotDam), eff.src:damDesc(DamageType.DARKNESS, eff.dotDam)) end, type = "magical", subtype = {light=true, darkness=true}, @@ -1472,8 +1472,8 @@ newEffect{ -- Circles newEffect{ name = "SANCTITY", image = "talents/circle_of_sanctity.png", - desc = "Sanctity", - long_desc = function(self, eff) return ("The target is protected from silence effects.") end, + desc = _t"Sanctity", + long_desc = function(self, eff) return (_t"The target is protected from silence effects.") end, type = "magical", subtype = { circle=true }, status = "beneficial", @@ -1491,8 +1491,8 @@ newEffect{ newEffect{ name = "SHIFTING_SHADOWS", image = "talents/circle_of_shifting_shadows.png", - desc = "Shifting Shadows", - long_desc = function(self, eff) return ("The target's defense is increased by %d."):format(eff.power) end, + desc = _t"Shifting Shadows", + long_desc = function(self, eff) return ("The target's defense is increased by %d."):tformat(eff.power) end, type = "magical", subtype = { circle=true, darkness=true }, status = "beneficial", @@ -1516,8 +1516,8 @@ newEffect{ newEffect{ name = "BLAZING_LIGHT", image = "talents/circle_of_blazing_light.png", - desc = "Blazing Light", - long_desc = function(self, eff) return ("The target is gaining %d positive energy each turn."):format(eff.power) end, + desc = _t"Blazing Light", + long_desc = function(self, eff) return ("The target is gaining %d positive energy each turn."):tformat(eff.power) end, type = "magical", subtype = { circle=true, light=true }, status = "beneficial", @@ -1532,8 +1532,8 @@ newEffect{ newEffect{ name = "WARDING", image = "talents/circle_of_warding.png", - desc = "Warding", - long_desc = function(self, eff) return ("Projectiles aimed at the target are slowed by %d%%."):format (eff.power) end, + desc = _t"Warding", + long_desc = function(self, eff) return ("Projectiles aimed at the target are slowed by %d%%."):tformat (eff.power) end, type = "magical", subtype = { circle=true, light=true, darkness=true }, status = "beneficial", @@ -1551,14 +1551,14 @@ newEffect{ newEffect{ name = "TURN_BACK_THE_CLOCK", image = "talents/turn_back_the_clock.png", - desc = "Turn Back the Clock", - long_desc = function(self, eff) return ("The target has been returned to a much younger state, reducing all its stats by %d."):format(eff.power) end, + desc = _t"Turn Back the Clock", + long_desc = function(self, eff) return ("The target has been returned to a much younger state, reducing all its stats by %d."):tformat(eff.power) end, type = "magical", subtype = { temporal=true }, status = "detrimental", parameters = { }, - on_gain = function(self, err) return "#Target# is returned to a much younger state!", "+Turn Back the Clock" end, - on_lose = function(self, err) return "#Target# has regained its natural age.", "-Turn Back the Clock" end, + on_gain = function(self, err) return _t"#Target# is returned to a much younger state!", _t"+Turn Back the Clock" end, + on_lose = function(self, err) return _t"#Target# has regained its natural age.", _t"-Turn Back the Clock" end, activate = function(self, eff) eff.stat = self:addTemporaryValue("inc_stats", { [Stats.STAT_STR] = -eff.power, @@ -1580,14 +1580,14 @@ newEffect{ newEffect{ name = "WASTING", image = "talents/ashes_to_ashes.png", - desc = "Wasting", - long_desc = function(self, eff) return ("The target is wasting away, taking %0.2f temporal damage per turn."):format(eff.power) end, + desc = _t"Wasting", + long_desc = function(self, eff) return ("The target is wasting away, taking %0.2f temporal damage per turn."):tformat(eff.power) end, type = "magical", subtype = { temporal=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is wasting away!", "+Wasting" end, - on_lose = function(self, err) return "#Target# stops wasting away.", "-Wasting" end, + on_gain = function(self, err) return _t"#Target# is wasting away!", _t"+Wasting" end, + on_lose = function(self, err) return _t"#Target# stops wasting away.", _t"-Wasting" end, on_merge = function(self, old_eff, new_eff) -- Merge the flames! local olddam = old_eff.power * old_eff.dur @@ -1604,14 +1604,14 @@ newEffect{ newEffect{ name = "PRESCIENCE", image = "talents/moment_of_prescience.png", - desc = "Prescience", - long_desc = function(self, eff) return ("The target's awareness is fully in the present, increasing stealth detection, see invisibility, defense, and accuracy by %d."):format(eff.power) end, + desc = _t"Prescience", + long_desc = function(self, eff) return ("The target's awareness is fully in the present, increasing stealth detection, see invisibility, defense, and accuracy by %d."):tformat(eff.power) end, type = "magical", subtype = { sense=true, temporal=true }, status = "beneficial", parameters = { power = 1 }, - on_gain = function(self, err) return "#Target# has found the present moment!", "+Prescience" end, - on_lose = function(self, err) return "#Target#'s awareness returns to normal.", "-Prescience" end, + on_gain = function(self, err) return _t"#Target# has found the present moment!", _t"+Prescience" end, + on_lose = function(self, err) return _t"#Target#'s awareness returns to normal.", _t"-Prescience" end, activate = function(self, eff) eff.defid = self:addTemporaryValue("combat_def", eff.power) eff.atkid = self:addTemporaryValue("combat_atk", eff.power) @@ -1628,14 +1628,14 @@ newEffect{ newEffect{ name = "INVIGORATE", image = "talents/invigorate.png", - desc = "Invigorate", - long_desc = function(self, eff) return ("The target is regaining %d life per turn and refreshing talents at twice the normal rate."):format(eff.power) end, + desc = _t"Invigorate", + long_desc = function(self, eff) return ("The target is regaining %d life per turn and refreshing talents at twice the normal rate."):tformat(eff.power) end, type = "magical", subtype = { temporal=true, regeneration=true }, status = "beneficial", parameters = {power = 10}, - on_gain = function(self, err) return "#Target# is invigorated.", "+Invigorate" end, - on_lose = function(self, err) return "#Target# is no longer invigorated.", "-Invigorate" end, + on_gain = function(self, err) return _t"#Target# is invigorated.", _t"+Invigorate" end, + on_lose = function(self, err) return _t"#Target# is no longer invigorated.", _t"-Invigorate" end, on_timeout = function(self, eff) if not self:attr("no_talents_cooldown") then for tid, _ in pairs(self.talents_cd) do @@ -1662,15 +1662,15 @@ newEffect{ newEffect{ name = "GATHER_THE_THREADS", image = "talents/gather_the_threads.png", - desc = "Gather the Threads", + desc = _t"Gather the Threads", long_desc = function(self, eff) return ("The target's spellpower has been increased by %d and will continue to increase by %d each turn."): - format(eff.cur_power or eff.power, eff.power/5) end, + tformat(eff.cur_power or eff.power, eff.power/5) end, type = "magical", subtype = { temporal=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is gathering energy from other timelines.", "+Gather the Threads" end, - on_lose = function(self, err) return "#Target# is no longer manipulating the timestream.", "-Gather the Threads" end, + on_gain = function(self, err) return _t"#Target# is gathering energy from other timelines.", _t"+Gather the Threads" end, + on_lose = function(self, err) return _t"#Target# is no longer manipulating the timestream.", _t"-Gather the Threads" end, on_merge = function(self, old_eff, new_eff) self:removeTemporaryValue("combat_spellpower", old_eff.tmpid) old_eff.cur_power = (old_eff.cur_power + new_eff.power) @@ -1697,14 +1697,14 @@ newEffect{ newEffect{ name = "FLAWED_DESIGN", image = "talents/flawed_design.png", - desc = "Flawed Design", - long_desc = function(self, eff) return ("The target's resistances have been reduced by %d%%."):format(eff.power) end, + desc = _t"Flawed Design", + long_desc = function(self, eff) return ("The target's resistances have been reduced by %d%%."):tformat(eff.power) end, type = "magical", subtype = { temporal=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is flawed.", "+Flawed" end, - on_lose = function(self, err) return "#Target# is no longer flawed.", "-Flawed" end, + on_gain = function(self, err) return _t"#Target# is flawed.", _t"+Flawed" end, + on_lose = function(self, err) return _t"#Target# is no longer flawed.", _t"-Flawed" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("resists", { all = -eff.power, @@ -1717,14 +1717,14 @@ newEffect{ newEffect{ name = "MANAWORM", image = "effects/manaworm.png", - desc = "Manaworm", - long_desc = function(self, eff) return ("The target is infected by a manaworm, draining %0.2f mana per turn and releasing it as arcane damage to the target."):format(eff.power) end, + desc = _t"Manaworm", + long_desc = function(self, eff) return ("The target is infected by a manaworm, draining %0.2f mana per turn and releasing it as arcane damage to the target."):tformat(eff.power) end, type = "magical", subtype = { arcane=true }, status = "detrimental", parameters = {power=10}, - on_gain = function(self, err) return "#Target# is infected by a manaworm!", "+Manaworm" end, - on_lose = function(self, err) return "#Target# is no longer infected.", "-Manaworm" end, + on_gain = function(self, err) return _t"#Target# is infected by a manaworm!", _t"+Manaworm" end, + on_lose = function(self, err) return _t"#Target# is no longer infected.", _t"-Manaworm" end, on_timeout = function(self, eff) local dam = eff.power if dam > self:getMana() then dam = self:getMana() end @@ -1735,14 +1735,14 @@ newEffect{ newEffect{ name = "SURGE_OF_UNDEATH", image = "talents/surge_of_undeath.png", - desc = "Surge of Undeath", - long_desc = function(self, eff) return ("Increases the target combat power, spellpower, accuracy by %d, armour penetration by %d and critical chances by %d."):format(eff.power, eff.apr, eff.crit) end, + desc = _t"Surge of Undeath", + long_desc = function(self, eff) return ("Increases the target combat power, spellpower, accuracy by %d, armour penetration by %d and critical chances by %d."):tformat(eff.power, eff.apr, eff.crit) end, type = "magical", subtype = { frenzy=true }, status = "beneficial", parameters = { power=10, crit=10, apr=10 }, - on_gain = function(self, err) return "#Target# is engulfed in dark energies.", "+Undeath Surge" end, - on_lose = function(self, err) return "#Target# seems less powerful.", "-Undeath Surge" end, + on_gain = function(self, err) return _t"#Target# is engulfed in dark energies.", _t"+Undeath Surge" end, + on_lose = function(self, err) return _t"#Target# seems less powerful.", _t"-Undeath Surge" end, activate = function(self, eff) eff.damid = self:addTemporaryValue("combat_dam", eff.power) eff.spellid = self:addTemporaryValue("combat_spellpower", eff.power) @@ -1763,14 +1763,14 @@ newEffect{ newEffect{ name = "BONE_SHIELD", image = "talents/bone_shield.png", - desc = "Bone Shield", - long_desc = function(self, eff) return ("Any attacks doing more than %d%% of your life is reduced to %d%%."):format(eff.power, eff.power) end, + desc = _t"Bone Shield", + long_desc = function(self, eff) return ("Any attacks doing more than %d%% of your life is reduced to %d%%."):tformat(eff.power, eff.power) end, type = "magical", subtype = { arcane=true, shield=true }, status = "beneficial", parameters = { power=30 }, - on_gain = function(self, err) return "#Target# protected by flying bones.", "+Bone Shield" end, - on_lose = function(self, err) return "#Target# flying bones crumble.", "-Bone Shield" end, + on_gain = function(self, err) return _t"#Target# protected by flying bones.", _t"+Bone Shield" end, + on_lose = function(self, err) return _t"#Target# flying bones crumble.", _t"-Bone Shield" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("flat_damage_cap", {all=eff.power}) if core.shader.active(4) then @@ -1787,8 +1787,8 @@ newEffect{ newEffect{ name = "REDUX", image = "talents/redux.png", - desc = "Redux", - long_desc = function(self, eff) return ("Chronomancy spells with cooldown less than %d will not go on cooldown when cast."):format(eff.max_cd) end, + desc = _t"Redux", + long_desc = function(self, eff) return ("Chronomancy spells with cooldown less than %d will not go on cooldown when cast."):tformat(eff.max_cd) end, type = "magical", subtype = { temporal=true }, status = "beneficial", @@ -1806,14 +1806,14 @@ newEffect{ newEffect{ name = "TEMPORAL_DESTABILIZATION_START", image = "talents/destabilize.png", - desc = "Temporal Destabilization", - long_desc = function(self, eff) return ("Target is destabilized and in %d turns will start suffering %0.2f temporal damage per turn. If it dies with this effect active after the damage starts it will explode."):format(eff.dur, eff.dam) end, + desc = _t"Temporal Destabilization", + long_desc = function(self, eff) return ("Target is destabilized and in %d turns will start suffering %0.2f temporal damage per turn. If it dies with this effect active after the damage starts it will explode."):tformat(eff.dur, eff.dam) end, type = "magical", subtype = { temporal=true }, status = "detrimental", parameters = { dam=1, explosion=10 }, - on_gain = function(self, err) return "#Target# is unstable.", "+Temporal Destabilization" end, - on_lose = function(self, err) return "#Target# has regained stability.", "-Temporal Destabilization" end, + on_gain = function(self, err) return _t"#Target# is unstable.", _t"+Temporal Destabilization" end, + on_lose = function(self, err) return _t"#Target# has regained stability.", _t"-Temporal Destabilization" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("destabilized", 1)) end, @@ -1825,14 +1825,14 @@ newEffect{ newEffect{ name = "TEMPORAL_DESTABILIZATION", image = "talents/destabilize.png", - desc = "Temporal Destabilization", - long_desc = function(self, eff) return ("Target is destabilized and suffering %0.2f temporal damage per turn. If it dies with this effect active it will explode."):format(eff.dam) end, + desc = _t"Temporal Destabilization", + long_desc = function(self, eff) return ("Target is destabilized and suffering %0.2f temporal damage per turn. If it dies with this effect active it will explode."):tformat(eff.dam) end, type = "magical", subtype = { temporal=true }, status = "detrimental", parameters = { dam=1, explosion=10 }, - on_gain = function(self, err) return "#Target# is unstable.", "+Temporal Destabilization" end, - on_lose = function(self, err) return "#Target# has regained stability.", "-Temporal Destabilization" end, + on_gain = function(self, err) return _t"#Target# is unstable.", _t"+Temporal Destabilization" end, + on_lose = function(self, err) return _t"#Target# has regained stability.", _t"-Temporal Destabilization" end, on_timeout = function(self, eff) DamageType:get(DamageType.TEMPORAL).projector(eff.src or self, self.x, self.y, DamageType.TEMPORAL, eff.dam) end, @@ -1846,10 +1846,10 @@ newEffect{ newEffect{ name = "CELERITY", image = "talents/celerity.png", - desc = "Celerity", - long_desc = function(self, eff) return ("The target is moving is %d%% faster."):format(eff.speed * 100 * eff.charges) end, + desc = _t"Celerity", + long_desc = function(self, eff) return ("The target is moving is %d%% faster."):tformat(eff.speed * 100 * eff.charges) end, type = "magical", - display_desc = function(self, eff) return eff.charges.." Celerity" end, + display_desc = function(self, eff) return ("%d Celerity"):tformat(eff.charges) end, charges = function(self, eff) return eff.charges end, subtype = { speed=true, temporal=true }, status = "beneficial", @@ -1877,10 +1877,10 @@ newEffect{ newEffect{ name = "TIME_DILATION", image = "talents/time_dilation.png", - desc = "Time Dilation", - long_desc = function(self, eff) return ("Increases attack, spell, and mind speed by %d%%."):format(eff.speed * 100 * eff.charges) end, + desc = _t"Time Dilation", + long_desc = function(self, eff) return ("Increases attack, spell, and mind speed by %d%%."):tformat(eff.speed * 100 * eff.charges) end, type = "magical", - display_desc = function(self, eff) return eff.charges.." Time Dilation" end, + display_desc = function(self, eff) return ("%d Time Dilation"):tformat(eff.charges) end, charges = function(self, eff) return eff.charges end, subtype = { speed=true, temporal=true }, status = "beneficial", @@ -1916,14 +1916,14 @@ newEffect{ newEffect{ name = "HASTE", image = "talents/haste.png", - desc = "Haste", - long_desc = function(self, eff) return ("Increases global action speed by %d%%."):format(eff.power * 100) end, + desc = _t"Haste", + long_desc = function(self, eff) return ("Increases global action speed by %d%%."):tformat(eff.power * 100) end, type = "magical", subtype = { temporal=true, speed=true }, status = "beneficial", parameters = { move=0.1, speed=0.1 }, - on_gain = function(self, err) return "#Target# speeds up.", "+Haste" end, - on_lose = function(self, err) return "#Target# slows down.", "-Haste" end, + on_gain = function(self, err) return _t"#Target# speeds up.", _t"+Haste" end, + on_lose = function(self, err) return _t"#Target# slows down.", _t"-Haste" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("global_speed_add", eff.power) if not self.shader then @@ -1948,13 +1948,13 @@ newEffect{ newEffect{ name = "CEASE_TO_EXIST", image = "talents/cease_to_exist.png", - desc = "Cease to Exist", - long_desc = function(self, eff) return ("The target is being removed from the timeline, its resistance to physical and temporal damage have been reduced by %d%%."):format(eff.power) end, + desc = _t"Cease to Exist", + long_desc = function(self, eff) return ("The target is being removed from the timeline, its resistance to physical and temporal damage have been reduced by %d%%."):tformat(eff.power) end, type = "magical", subtype = { temporal=true }, status = "detrimental", parameters = { power = 1, damage=1 }, - on_gain = function(self, err) return "#Target# is being removed from the timeline.", "+Cease to Exist" end, + on_gain = function(self, err) return _t"#Target# is being removed from the timeline.", _t"+Cease to Exist" end, activate = function(self, eff) eff.phys = self:addTemporaryValue("resists", { [DamageType.PHYSICAL] = -eff.power}) eff.temp = self:addTemporaryValue("resists", { [DamageType.TEMPORAL] = -eff.power}) @@ -1970,14 +1970,14 @@ newEffect{ newEffect{ name = "IMPENDING_DOOM", image = "talents/impending_doom.png", - desc = "Impending Doom", - long_desc = function(self, eff) return ("The target's final doom is drawing near, reducing healing factor by 80%% and dealing %0.2f arcane damage per turn. The effect will stop if the caster dies."):format(eff.dam) end, + desc = _t"Impending Doom", + long_desc = function(self, eff) return ("The target's final doom is drawing near, reducing healing factor by 80%% and dealing %0.2f arcane damage per turn. The effect will stop if the caster dies."):tformat(eff.dam) end, type = "magical", subtype = { arcane=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is doomed!", "+Doomed" end, - on_lose = function(self, err) return "#Target# is freed from the impending doom.", "-Doomed" end, + on_gain = function(self, err) return _t"#Target# is doomed!", _t"+Doomed" end, + on_lose = function(self, err) return _t"#Target# is freed from the impending doom.", _t"-Doomed" end, activate = function(self, eff) eff.healid = self:addTemporaryValue("healing_factor", -0.8) end, @@ -1992,14 +1992,14 @@ newEffect{ newEffect{ name = "RIGOR_MORTIS", image = "talents/rigor_mortis.png", - desc = "Rigor Mortis", - long_desc = function(self, eff) return ("The target takes %d%% more damage from necrotic minions."):format(eff.power) end, + desc = _t"Rigor Mortis", + long_desc = function(self, eff) return ("The target takes %d%% more damage from necrotic minions."):tformat(eff.power) end, type = "magical", subtype = { arcane=true }, status = "detrimental", parameters = {power=20}, - on_gain = function(self, err) return "#Target# feels death coming!", "+Rigor Mortis" end, - on_lose = function(self, err) return "#Target# is freed from the rigor mortis.", "-Rigor Mortis" end, + on_gain = function(self, err) return _t"#Target# feels death coming!", _t"+Rigor Mortis" end, + on_lose = function(self, err) return _t"#Target# is freed from the rigor mortis.", _t"-Rigor Mortis" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("inc_necrotic_minions", eff.power) end, @@ -2010,14 +2010,14 @@ newEffect{ newEffect{ name = "ABYSSAL_SHROUD", image = "talents/abyssal_shroud.png", - desc = "Abyssal Shroud", - long_desc = function(self, eff) return ("The target's lite radius has been reduced by %d, and its darkness resistance by %d%%."):format(eff.lite, eff.power) end, + desc = _t"Abyssal Shroud", + long_desc = function(self, eff) return ("The target's lite radius has been reduced by %d, and its darkness resistance by %d%%."):tformat(eff.lite, eff.power) end, type = "magical", subtype = { darkness=true }, status = "detrimental", parameters = {power=20}, - on_gain = function(self, err) return "#Target# feels closer to the abyss!", "+Abyssal Shroud" end, - on_lose = function(self, err) return "#Target# is free from the abyss.", "-Abyssal Shroud" end, + on_gain = function(self, err) return _t"#Target# feels closer to the abyss!", _t"+Abyssal Shroud" end, + on_lose = function(self, err) return _t"#Target# is free from the abyss.", _t"-Abyssal Shroud" end, activate = function(self, eff) eff.liteid = self:addTemporaryValue("lite", -eff.lite) eff.darkid = self:addTemporaryValue("resists", { [DamageType.DARKNESS] = -eff.power }) @@ -2030,16 +2030,16 @@ newEffect{ newEffect{ name = "SPIN_FATE", image = "talents/spin_fate.png", - desc = "Spin Fate", - long_desc = function(self, eff) return ("The target's defense and saves have been increased by %d."):format(eff.save_bonus * eff.spin) end, - display_desc = function(self, eff) return eff.spin.." Spin" end, + desc = _t"Spin Fate", + long_desc = function(self, eff) return ("The target's defense and saves have been increased by %d."):tformat(eff.save_bonus * eff.spin) end, + display_desc = function(self, eff) return ("%d Spin"):tformat(eff.spin) end, charges = function(self, eff) return eff.spin end, type = "magical", subtype = { temporal=true }, status = "beneficial", parameters = { save_bonus=0, spin=0, max_spin=3}, - on_gain = function(self, err) return "#Target# spins fate.", "+Spin Fate" end, - on_lose = function(self, err) return "#Target# stops spinning fate.", "-Spin Fate" end, + on_gain = function(self, err) return _t"#Target# spins fate.", _t"+Spin Fate" end, + on_lose = function(self, err) return _t"#Target# stops spinning fate.", _t"-Spin Fate" end, on_merge = function(self, old_eff, new_eff) -- remove the four old values self:removeTemporaryValue("combat_def", old_eff.defid) @@ -2085,14 +2085,14 @@ newEffect{ newEffect{ name = "SPELLSHOCKED", - desc = "Spellshocked", - long_desc = function(self, eff) return string.format("Overwhelming magic has temporarily interfered with all damage resistances, lowering them by %d%%.", eff.power) end, + desc = _t"Spellshocked", + long_desc = function(self, eff) return ("Overwhelming magic has temporarily interfered with all damage resistances, lowering them by %d%%."):tformat(eff.power) end, type = "magical", subtype = { ["cross tier"]=true }, status = "detrimental", parameters = { power=20 }, - on_gain = function(self, err) return nil, "+Spellshocked" end, - on_lose = function(self, err) return nil, "-Spellshocked" end, + on_gain = function(self, err) return nil, _t"+Spellshocked" end, + on_lose = function(self, err) return nil, _t"-Spellshocked" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("resists", { all = -eff.power, @@ -2105,14 +2105,14 @@ newEffect{ newEffect{ name = "ROTTING_DISEASE", image = "talents/rotting_disease.png", - desc = "Rotting Disease", - long_desc = function(self, eff) return ("The target is infected by a disease, reducing its constitution by %d and doing %0.2f blight damage per turn."):format(eff.con, eff.dam) end, + desc = _t"Rotting Disease", + long_desc = function(self, eff) return ("The target is infected by a disease, reducing its constitution by %d and doing %0.2f blight damage per turn."):tformat(eff.con, eff.dam) end, type = "magical", subtype = {disease=true, blight=true}, status = "detrimental", parameters = {con = 1, dam = 0}, - on_gain = function(self, err) return "#Target# is afflicted by a rotting disease!" end, - on_lose = function(self, err) return "#Target# is free from the rotting disease." end, + on_gain = function(self, err) return _t"#Target# is afflicted by a rotting disease!" end, + on_lose = function(self, err) return _t"#Target# is free from the rotting disease." end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_disease") then self:heal(eff.dam, eff.src) @@ -2130,14 +2130,14 @@ newEffect{ newEffect{ name = "DECREPITUDE_DISEASE", image = "talents/decrepitude_disease.png", - desc = "Decrepitude Disease", - long_desc = function(self, eff) return ("The target is infected by a disease, reducing its dexterity by %d and doing %0.2f blight damage per turn."):format(eff.dex, eff.dam) end, + desc = _t"Decrepitude Disease", + long_desc = function(self, eff) return ("The target is infected by a disease, reducing its dexterity by %d and doing %0.2f blight damage per turn."):tformat(eff.dex, eff.dam) end, type = "magical", subtype = {disease=true, blight=true}, status = "detrimental", parameters = {dex = 1, dam = 0}, - on_gain = function(self, err) return "#Target# is afflicted by a decrepitude disease!" end, - on_lose = function(self, err) return "#Target# is free from the decrepitude disease." end, + on_gain = function(self, err) return _t"#Target# is afflicted by a decrepitude disease!" end, + on_lose = function(self, err) return _t"#Target# is free from the decrepitude disease." end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_disease") then self:heal(eff.dam, eff.src) @@ -2155,14 +2155,14 @@ newEffect{ newEffect{ name = "WEAKNESS_DISEASE", image = "talents/weakness_disease.png", - desc = "Weakness Disease", - long_desc = function(self, eff) return ("The target is infected by a disease, reducing its strength by %d and doing %0.2f blight damage per turn."):format(eff.str, eff.dam) end, + desc = _t"Weakness Disease", + long_desc = function(self, eff) return ("The target is infected by a disease, reducing its strength by %d and doing %0.2f blight damage per turn."):tformat(eff.str, eff.dam) end, type = "magical", subtype = {disease=true, blight=true}, status = "detrimental", parameters = {str = 1, dam = 0}, - on_gain = function(self, err) return "#Target# is afflicted by a weakness disease!" end, - on_lose = function(self, err) return "#Target# is free from the weakness disease." end, + on_gain = function(self, err) return _t"#Target# is afflicted by a weakness disease!" end, + on_lose = function(self, err) return _t"#Target# is free from the weakness disease." end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_disease") then self:heal(eff.dam, eff.src) @@ -2181,15 +2181,15 @@ newEffect{ -- Endless Woes prodigy effects newEffect{ name = "WOEFUL_DISEASE", image = "talents/weakness_disease.png", - desc = "Woeful Disease", + desc = _t"Woeful Disease", long_desc = function(self, eff) return ("The target is infected by a disease, reducing its strength, constitution, dexterity by %d and doing %0.2f blight damage per turn."): - format(eff.str, eff.con, eff.dex, eff.dam) end, + tformat(eff.str, eff.con, eff.dex, eff.dam) end, type = "magical", subtype = {disease=true, blight=true}, status = "detrimental", parameters = {str = 1, con = 1, dex = 1, dam = 0}, - on_gain = function(self, err) return "#Target# is afflicted by a woeful disease!" end, - on_lose = function(self, err) return "#Target# is free from the woeful disease." end, + on_gain = function(self, err) return _t"#Target# is afflicted by a woeful disease!" end, + on_lose = function(self, err) return _t"#Target# is free from the woeful disease." end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_disease") then self:heal(eff.dam, eff.src) @@ -2209,14 +2209,14 @@ newEffect{ newEffect{ name = "WOEFUL_DARKNESS", image = "effects/bane_blinded.png", - desc = "Woeful Darkness", - long_desc = function(self, eff) return ("The target is weakened and lost, all damage it does is reduced by %d%%."):format(eff.reduce) end, + desc = _t"Woeful Darkness", + long_desc = function(self, eff) return ("The target is weakened and lost, all damage it does is reduced by %d%%."):tformat(eff.reduce) end, type = "magical", subtype = { darkness=true,}, status = "detrimental", parameters = {power=10, reduce=5}, - on_gain = function(self, err) return "#Target# is weakened by the darkness!", "+Woeful Darkness" end, - on_lose = function(self, err) return "#Target# looks more determined.", "-Woeful Darkness" end, + on_gain = function(self, err) return _t"#Target# is weakened by the darkness!", _t"+Woeful Darkness" end, + on_lose = function(self, err) return _t"#Target# looks more determined.", _t"-Woeful Darkness" end, on_timeout = function(self, eff) end, @@ -2230,14 +2230,14 @@ newEffect{ newEffect{ name = "WOEFUL_CORROSION", image = "talents/acidic_skin.png", - desc = "Woeful Corrosion", - long_desc = function(self, eff) return ("The target has been splashed with acid, taking %0.2f acid damage per turn."):format(eff.dam) end, + desc = _t"Woeful Corrosion", + long_desc = function(self, eff) return ("The target has been splashed with acid, taking %0.2f acid damage per turn."):tformat(eff.dam) end, type = "magical", subtype = { acid=true,}, status = "detrimental", parameters = {dam = 0}, - on_gain = function(self, err) return "#Target# is covered in acid!" end, - on_lose = function(self, err) return "#Target# is free from the acid." end, + on_gain = function(self, err) return _t"#Target# is covered in acid!" end, + on_lose = function(self, err) return _t"#Target# is free from the acid." end, -- Damage each turn on_timeout = function(self, eff) DamageType:get(DamageType.ACID).projector(eff.src, self.x, self.y, DamageType.ACID, eff.dam) @@ -2250,14 +2250,14 @@ newEffect{ newEffect{ name = "WOEFUL_CRIPPLE", image = "talents/cripple.png", - desc = "Woeful Cripple", - long_desc = function(self, eff) return ("The target is crippled, reducing melee, spellcasting and mind speed by %d%%."):format(eff.speed*100) end, + desc = _t"Woeful Cripple", + long_desc = function(self, eff) return ("The target is crippled, reducing melee, spellcasting and mind speed by %d%%."):tformat(eff.speed*100) end, type = "magical", subtype = { slow=true }, status = "detrimental", parameters = { speed=0.2 }, - on_gain = function(self, err) return "#Target# is crippled." end, - on_lose = function(self, err) return "#Target# is not crippled anymore." end, + on_gain = function(self, err) return _t"#Target# is crippled." end, + on_lose = function(self, err) return _t"#Target# is not crippled anymore." end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_physspeed", -eff.speed) self:effectTemporaryValue(eff, "combat_spellspeed", -eff.speed) @@ -2267,14 +2267,14 @@ newEffect{ newEffect{ name = "EPIDEMIC", image = "talents/epidemic.png", - desc = "Epidemic", - long_desc = function(self, eff) return ("The target is infected by a disease, doing %0.2f blight damage per turn and reducing healing received by %d%%.\nEach non-disease blight damage done to it will spread the disease."):format(eff.dam, eff.heal_factor) end, + desc = _t"Epidemic", + long_desc = function(self, eff) return ("The target is infected by a disease, doing %0.2f blight damage per turn and reducing healing received by %d%%.\nEach non-disease blight damage done to it will spread the disease."):tformat(eff.dam, eff.heal_factor) end, type = "magical", subtype = {disease=true, blight=true}, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is afflicted by an epidemic!" end, - on_lose = function(self, err) return "#Target# is free from the epidemic." end, + on_gain = function(self, err) return _t"#Target# is afflicted by an epidemic!" end, + on_lose = function(self, err) return _t"#Target# is free from the epidemic." end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_disease") then self:heal(eff.dam, eff.src) @@ -2295,14 +2295,14 @@ newEffect{ newEffect{ name = "WORM_ROT", image = "talents/worm_rot.png", - desc = "Worm Rot", - long_desc = function(self, eff) return ("The target is infected with carrion worm larvae. Each turn it will lose one beneficial physical effect and %0.2f blight and acid damage will be inflicted.\nAfter five turns the disease will inflict %0.2f blight damage and spawn a carrion worm mass."):format(eff.dam, eff.burst) end, + desc = _t"Worm Rot", + long_desc = function(self, eff) return ("The target is infected with carrion worm larvae. Each turn it will lose one beneficial physical effect and %0.2f blight and acid damage will be inflicted.\nAfter five turns the disease will inflict %0.2f blight damage and spawn a carrion worm mass."):tformat(eff.dam, eff.burst) end, type = "magical", subtype = {disease=true, blight=true, acid=true}, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is afflicted by a terrible worm rot!" end, - on_lose = function(self, err) return "#Target# is free from the worm rot." end, + on_gain = function(self, err) return _t"#Target# is afflicted by a terrible worm rot!" end, + on_lose = function(self, err) return _t"#Target# is free from the worm rot." end, -- Damage each turn on_timeout = function(self, eff) eff.rot_timer = eff.rot_timer - 1 @@ -2337,7 +2337,7 @@ newEffect{ if eff.rot_timer == 0 then DamageType:get(DamageType.BLIGHT).projector(eff.src, self.x, self.y, DamageType.BLIGHT, eff.burst, {from_disease=true}) t.spawn_carrion_worm(eff.src, self, t) - game.logSeen(self, "#LIGHT_RED#A carrion worm mass bursts out of %s!", self.name:capitalize()) + game.logSeen(self, "#LIGHT_RED#A carrion worm mass bursts out of %s!", self:getName():capitalize()) self:removeEffect(self.EFF_WORM_ROT) end end, @@ -2346,7 +2346,7 @@ newEffect{ if rng.percent(t.getChance(eff.src,t)) then DamageType:get(DamageType.BLIGHT).projector(eff.src, self.x, self.y, DamageType.BLIGHT, eff.burst, {from_disease=true}) t.spawn_carrion_worm(eff.src, self, t) - game.logSeen(self, "#LIGHT_RED#A carrion worm mass bursts out of %s!", self.name:capitalize()) + game.logSeen(self, "#LIGHT_RED#A carrion worm mass bursts out of %s!", self:getName():capitalize()) self:removeEffect(self.EFF_WORM_ROT) end end, @@ -2354,18 +2354,18 @@ newEffect{ newEffect{ name = "GHOUL_ROT", image = "talents/gnaw.png", - desc = "Ghoul Rot", + desc = _t"Ghoul Rot", long_desc = function(self, eff) local ghoulify = "" - if eff.make_ghoul > 0 then ghoulify = " If the target dies while ghoul rot is active it will rise as a ghoul." end - return ("The target is infected by a disease doing %0.2f blight damage per turn.%s"):format(eff.dam, ghoulify) + if eff.make_ghoul > 0 then ghoulify = _t" If the target dies while ghoul rot is active it will rise as a ghoul." end + return ("The target is infected by a disease doing %0.2f blight damage per turn.%s"):tformat(eff.dam, ghoulify) end, type = "magical", subtype = {disease=true, blight=true}, status = "detrimental", parameters = {str = 0, con = 0, dex = 0, make_ghoul = 0}, - on_gain = function(self, err) return "#Target# is afflicted by ghoul rot!" end, - on_lose = function(self, err) return "#Target# is free from the ghoul rot." end, + on_gain = function(self, err) return _t"#Target# is afflicted by ghoul rot!" end, + on_lose = function(self, err) return _t"#Target# is free from the ghoul rot." end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_disease") then self:heal(eff.dam, eff.src) @@ -2380,8 +2380,8 @@ newEffect{ newEffect{ name = "BLOODCASTING", image = "talents/bloodcasting.png", - desc = "Bloodcasting", - long_desc = function(self, eff) return ("Corruptions consume health instead of vim.") end, + desc = _t"Bloodcasting", + long_desc = function(self, eff) return (_t"Corruptions consume health instead of vim.") end, type = "magical", subtype = {corruption=true}, status = "beneficial", @@ -2397,9 +2397,9 @@ newEffect{ newEffect{ name = "BLOOD_GRASP", image = "talents/blood_grasp.png", - desc = "Sanguine Infusion", + desc = _t"Sanguine Infusion", charges = function(self, eff) return math.floor(eff.life) end, - long_desc = function(self, eff) return ("Maximum life increased by %d."):format(eff.life) end, + long_desc = function(self, eff) return ("Maximum life increased by %d."):tformat(eff.life) end, type = "magical", subtype = {corruption=true}, status = "beneficial", @@ -2422,14 +2422,14 @@ newEffect{ newEffect{ name = "ARCANE_SUPREMACY", image = "talents/arcane_supremacy.png", - desc = "Arcane Supremacy", - long_desc = function(self, eff) return ("The target's spellpower and spell save has been increased by %d"): format(eff.power) end, + desc = _t"Arcane Supremacy", + long_desc = function(self, eff) return ("The target's spellpower and spell save has been increased by %d"):tformat(eff.power) end, type = "magical", subtype = { arcane=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is surging with arcane energy.", "+Arcane Supremacy" end, - on_lose = function(self, err) return "#The arcane energy around Target# has dissipated.", "-Arcane Supremacy" end, + on_gain = function(self, err) return _t"#Target# is surging with arcane energy.", _t"+Arcane Supremacy" end, + on_lose = function(self, err) return _t"The arcane energy around #target# has dissipated.", _t"-Arcane Supremacy" end, activate = function(self, eff) eff.spell_save = self:addTemporaryValue("combat_spellresist", eff.power) eff.spell_power = self:addTemporaryValue("combat_spellpower", eff.power) @@ -2444,14 +2444,14 @@ newEffect{ newEffect{ name = "WARD", image = "talents/ward.png", - desc = "Ward", - long_desc = function(self, eff) return ("Fully absorbs %d %s attack%s."):format(#eff.particles, DamageType.dam_def[eff.d_type].name, #eff.particles > 1 and "s" or "") end, + desc = _t"Ward", + long_desc = function(self, eff) return ("Fully absorbs %d %s %s."):tformat(#eff.particles, DamageType.dam_def[eff.d_type].name, #eff.particles > 1 and _t"attacks" or _t"attack") end, type = "magical", subtype = { arcane=true }, status = "beneficial", parameters = { nb=3 }, - on_gain = function(self, eff) return ("#Target# warded against %s!"):format(DamageType.dam_def[eff.d_type].name), "+Ward" end, - on_lose = function(self, eff) return ("#Target#'s %s ward fades"):format(DamageType.dam_def[eff.d_type].name), "-Ward" end, + on_gain = function(self, eff) return ("#Target# warded against %s!"):tformat(DamageType.dam_def[eff.d_type].name), _t"+Ward" end, + on_lose = function(self, eff) return ("#Target#'s %s ward fades"):tformat(DamageType.dam_def[eff.d_type].name), _t"-Ward" end, absorb = function(type, dam, eff, self, src) if eff.d_type ~= type then return dam end game.logPlayer(self, "Your %s ward absorbs the damage!", DamageType.dam_def[eff.d_type].name) @@ -2476,15 +2476,15 @@ newEffect{ newEffect{ name = "SPELLSURGE", image = "talents/gather_the_threads.png", - desc = "Spellsurge", - long_desc = function(self, eff) return ("The target's spellpower has been increased by %d."):format(eff.cur_power or eff.power) end, + desc = _t"Spellsurge", + long_desc = function(self, eff) return ("The target's spellpower has been increased by %d."):tformat(eff.cur_power or eff.power) end, charges = function(self, eff) return math.floor(eff.cur_power or eff.power) end, type = "magical", subtype = { arcane=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is surging arcane power.", "+Spellsurge" end, - on_lose = function(self, err) return "#Target# is no longer surging arcane power.", "-Spellsurge" end, + on_gain = function(self, err) return _t"#Target# is surging arcane power.", _t"+Spellsurge" end, + on_lose = function(self, err) return _t"#Target# is no longer surging arcane power.", _t"-Spellsurge" end, on_merge = function(self, old_eff, new_eff) self:removeTemporaryValue("combat_spellpower", old_eff.tmpid) old_eff.cur_power = math.min(old_eff.cur_power + new_eff.power, new_eff.max) @@ -2506,14 +2506,14 @@ newEffect{ newEffect{ name = "OUT_OF_PHASE", image = "talents/phase_door.png", - desc = "Out of Phase", - long_desc = function(self, eff) return ("The target is out of phase with reality, increasing defense by %d, resist all by %d%%, and reducing the duration of detrimental timed effects by %d%%.\nThese effects cap at 40%%."):format(eff.defense or 0, eff.resists or 0, eff.effect_reduction or 0) end, + desc = _t"Out of Phase", + long_desc = function(self, eff) return ("The target is out of phase with reality, increasing defense by %d, resist all by %d%%, and reducing the duration of detrimental timed effects by %d%%.\nThese effects cap at 40%%."):tformat(eff.defense or 0, eff.resists or 0, eff.effect_reduction or 0) end, type = "magical", subtype = { teleport=true }, status = "beneficial", parameters = { defense=0, resists=0, effect_reduction=0 }, - on_gain = function(self, err) return "#Target# is out of phase.", "+Phased" end, - on_lose = function(self, err) return "#Target# is no longer out of phase.", "-Phased" end, + on_gain = function(self, err) return _t"#Target# is out of phase.", _t"+Phased" end, + on_lose = function(self, err) return _t"#Target# is no longer out of phase.", _t"-Phased" end, activate = function(self, eff) eff.defense = math.min(40, eff.defense + (self:attr("defense_on_teleport") or 0)) eff.resists = math.min(40, eff.resists + (self:attr("resist_all_on_teleport") or 0)) @@ -2549,14 +2549,14 @@ newEffect{ newEffect{ name = "BLOOD_LOCK", image = "talents/blood_lock.png", - desc = "Blood Lock", - long_desc = function(self, eff) return ("Cannot heal higher than %d life."):format(eff.power) end, + desc = _t"Blood Lock", + long_desc = function(self, eff) return ("Cannot heal higher than %d life."):tformat(eff.power) end, type = "magical", subtype = { blood=true }, status = "detrimental", parameters = { }, - on_gain = function(self, err) return "#Target# is blood locked.", "+Blood Lock" end, - on_lose = function(self, err) return "#Target# is no longer blood locked.", "-Blood Lock" end, + on_gain = function(self, err) return _t"#Target# is blood locked.", _t"+Blood Lock" end, + on_lose = function(self, err) return _t"#Target# is no longer blood locked.", _t"-Blood Lock" end, activate = function(self, eff) eff.power = self.life eff.tmpid = self:addTemporaryValue("blood_lock", eff.power) @@ -2569,14 +2569,14 @@ newEffect{ newEffect{ name = "CONGEAL_TIME", image = "talents/congeal_time.png", - desc = "Congeal Time", - long_desc = function(self, eff) return ("Reduces global action speed by %d%% and all outgoing projectiles speed by %d%%."):format(eff.slow * 100, eff.proj) end, + desc = _t"Congeal Time", + long_desc = function(self, eff) return ("Reduces global action speed by %d%% and all outgoing projectiles speed by %d%%."):tformat(eff.slow * 100, eff.proj) end, type = "magical", subtype = { temporal=true, slow=true }, status = "detrimental", parameters = { slow=0.1, proj=15 }, - on_gain = function(self, err) return "#Target# slows down.", "+Congeal Time" end, - on_lose = function(self, err) return "#Target# speeds up.", "-Congeal Time" end, + on_gain = function(self, err) return _t"#Target# slows down.", _t"+Congeal Time" end, + on_lose = function(self, err) return _t"#Target# speeds up.", _t"-Congeal Time" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("global_speed_add", -eff.slow) eff.prjid = self:addTemporaryValue("slow_projectiles_outgoing", eff.proj) @@ -2594,14 +2594,14 @@ newEffect{ newEffect{ name = "ARCANE_VORTEX", image = "talents/arcane_vortex.png", - desc = "Arcane Vortex", - long_desc = function(self, eff) return ("An arcane vortex follows the target. Each turn a manathrust fires from it to a random foe in sight doing %0.2f arcane damage to all. If no foes are found the main target takes 50%% more arcane damage this turn. If the target dies the remaining damage is dealt as a radius 2 ball of arcane."):format(eff.dam) end, + desc = _t"Arcane Vortex", + long_desc = function(self, eff) return ("An arcane vortex follows the target. Each turn a manathrust fires from it to a random foe in sight doing %0.2f arcane damage to all. If no foes are found the main target takes 50%% more arcane damage this turn. If the target dies the remaining damage is dealt as a radius 2 ball of arcane."):tformat(eff.dam) end, type = "magical", subtype = { arcane=true }, status = "detrimental", parameters = { dam=10 }, - on_gain = function(self, err) return "#Target# is focused by an arcane vortex!.", "+Arcane Vortex" end, - on_lose = function(self, err) return "#Target# is free from the arcane vortex.", "-Arcane Vortex" end, + on_gain = function(self, err) return _t"#Target# is focused by an arcane vortex!.", _t"+Arcane Vortex" end, + on_lose = function(self, err) return _t"#Target# is free from the arcane vortex.", _t"-Arcane Vortex" end, on_timeout = function(self, eff) if not self.x then return end local l = {} @@ -2640,14 +2640,14 @@ newEffect{ newEffect{ name = "AETHER_BREACH", image = "talents/aether_breach.png", - desc = "Aether Breach", - long_desc = function(self, eff) return ("Fires an arcane explosion each turn doing %0.2f arcane damage in radius 2."):format(eff.dam) end, + desc = _t"Aether Breach", + long_desc = function(self, eff) return ("Fires an arcane explosion each turn doing %0.2f arcane damage in radius 2."):tformat(eff.dam) end, type = "magical", subtype = { arcane=true }, status = "beneficial", parameters = { dam=10 }, - on_gain = function(self, err) return "#Target# begins channeling arcane through a breach in reality!", "+Aether Breach" end, - on_lose = function(self, err) return "The aetheric breach around #Target# seals itself.", "-Aether Breach" end, + on_gain = function(self, err) return _t"#Target# begins channeling arcane through a breach in reality!", _t"+Aether Breach" end, + on_lose = function(self, err) return _t"The aetheric breach around #Target# seals itself.", _t"-Aether Breach" end, on_timeout = function(self, eff) if game.zone.short_name.."-"..game.level.level ~= eff.level then return end @@ -2679,8 +2679,8 @@ newEffect{ newEffect{ name = "AETHER_AVATAR", image = "talents/aether_avatar.png", - desc = "Aether Avatar", - long_desc = function(self, eff) return ("Filled with pure aether forces!") end, + desc = _t"Aether Avatar", + long_desc = function(self, eff) return (_t"Filled with pure aether forces!") end, type = "magical", subtype = { arcane=true }, status = "beneficial", @@ -2713,18 +2713,18 @@ newEffect{ newEffect{ name = "VULNERABILITY_POISON", image = "talents/vulnerability_poison.png", - desc = "Vulnerability Poison", + desc = _t"Vulnerability Poison", long_desc = function(self, eff) local poison_id = eff.__tmpvals and eff.__tmpvals[2] and eff.__tmpvals[2][2] local poison_effect = self:getTemporaryValue(poison_id) - return ("The target is afflicted with a magical poison and is suffering %0.2f arcane damage per turn. All resistances are reduced by 10%%%s."):format(eff.src:damDesc("ARCANE", eff.power) , poison_effect and (" and poison resistance is reduced by %s%%"):format(-100*poison_effect) or "") + return ("The target is afflicted with a magical poison and is suffering %0.2f arcane damage per turn. All resistances are reduced by 10%%%s."):tformat(eff.src:damDesc("ARCANE", eff.power) , poison_effect and (" and poison resistance is reduced by %s%%"):tformat(-100*poison_effect) or "") end, type = "magical", subtype = { poison=true, arcane=true }, status = "detrimental", parameters = {power=10, unresistable=true}, - on_gain = function(self, err) return "#Target# is magically poisoned!", "+Vulnerability Poison" end, - on_lose = function(self, err) return "#Target# is no longer magically poisoned.", "-Vulnerability Poison" end, + on_gain = function(self, err) return _t"#Target# is magically poisoned!", _t"+Vulnerability Poison" end, + on_lose = function(self, err) return _t"#Target# is no longer magically poisoned.", _t"-Vulnerability Poison" end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_poison") then self:heal(eff.power, eff.src) @@ -2743,14 +2743,14 @@ newEffect{ newEffect{ name = "IRRESISTIBLE_SUN", image = "talents/irresistible_sun.png", - desc = "Irresistible Sun", - long_desc = function(self, eff) return ("The target is attracting all toward it, also dealing fire, light and physical damage each turn.."):format() end, + desc = _t"Irresistible Sun", + long_desc = function(self, eff) return ("The target is attracting all toward it, also dealing fire, light and physical damage each turn.."):tformat() end, type = "magical", subtype = { sun=true }, status = "beneficial", parameters = {dam=100}, - on_gain = function(self, err) return "#Target# starts to attract all creatures around!", "+Irresistible Sun" end, - on_lose = function(self, err) return "#Target# is no longer attracting creatures.", "-Irresistible Sun" end, + on_gain = function(self, err) return _t"#Target# starts to attract all creatures around!", _t"+Irresistible Sun" end, + on_lose = function(self, err) return _t"#Target# is no longer attracting creatures.", _t"-Irresistible Sun" end, activate = function(self, eff) local particle = Particles.new("generic_vortex", 5, {rm=230, rM=230, gm=20, gM=250, bm=250, bM=80, am=80, aM=150, radius=5, density=50}) if core.shader.allow("distort") then particle:setSub("vortex_distort", 5, {radius=5}) end @@ -2770,7 +2770,7 @@ newEffect{ local ox, oy = target.x, target.y target:pull(self.x, self.y, 1) if target.x ~= ox or target.y ~= oy then - game.logSeen(target, "%s is pulled in!", target.name:capitalize()) + game.logSeen(target, "%s is pulled in!", target:getName():capitalize()) end if self:reactionToward(target) < 0 then @@ -2788,14 +2788,14 @@ newEffect{ newEffect{ name = "WEIGHT_OF_THE_SUN", image = "talents/irresistible_sun.png", - desc = "Weight of the Sun", - long_desc = function(self, eff) return ("The target is struggling against immense gravity, all damage it does is reduced by %d%%."):format(eff.reduce) end, + desc = _t"Weight of the Sun", + long_desc = function(self, eff) return ("The target is struggling against immense gravity, all damage it does is reduced by %d%%."):tformat(eff.reduce) end, type = "magical", subtype = { sun=true,}, status = "detrimental", parameters = {reduce=5}, - on_gain = function(self, err) return "#Target# can barely stand!", "+Weight of the Sun" end, - on_lose = function(self, err) return "#Target# can move freely once more.", "-Weight of the Sun" end, + on_gain = function(self, err) return _t"#Target# can barely stand!", _t"+Weight of the Sun" end, + on_lose = function(self, err) return _t"#Target# can move freely once more.", _t"-Weight of the Sun" end, activate = function(self, eff) self:effectTemporaryValue(eff, "numbed", eff.reduce) end, @@ -2803,14 +2803,14 @@ newEffect{ newEffect{ name = "TEMPORAL_FORM", image = "talents/temporal_form.png", - desc = "Temporal Form", - long_desc = function(self, eff) return ("The target assumes the form of a telugoroth."):format() end, + desc = _t"Temporal Form", + long_desc = function(self, eff) return ("The target assumes the form of a telugoroth."):tformat() end, type = "magical", subtype = { temporal=true }, status = "beneficial", parameters = {}, - on_gain = function(self, err) return "#Target# threads time as a shell!", "+Temporal Form" end, - on_lose = function(self, err) return "#Target# is no longer embeded in time.", "-Temporal Form" end, + on_gain = function(self, err) return _t"#Target# threads time as a shell!", _t"+Temporal Form" end, + on_lose = function(self, err) return _t"#Target# is no longer embeded in time.", _t"-Temporal Form" end, activate = function(self, eff) self:effectTemporaryValue(eff, "all_damage_convert", DamageType.TEMPORAL) self:effectTemporaryValue(eff, "all_damage_convert_percent", 50) @@ -2860,14 +2860,14 @@ newEffect{ newEffect{ name = "CORRUPT_LOSGOROTH_FORM", image = "shockbolt/npc/elemental_void_losgoroth_corrupted.png", - desc = "Corrupted Losgoroth Form", - long_desc = function(self, eff) return ("The target has assumed the form of a corrupted losgoroth, gaining immunity to poison, disease, bleeding, and confusion. It does not need to breathe, and converts half of all damage to life draining blight."):format() end, + desc = _t"Corrupted Losgoroth Form", + long_desc = function(self, eff) return ("The target has assumed the form of a corrupted losgoroth, gaining immunity to poison, disease, bleeding, and confusion. It does not need to breathe, and converts half of all damage to life draining blight."):tformat() end, type = "magical", subtype = { blight=true, arcane=true }, status = "beneficial", parameters = {}, - on_gain = function(self, err) return "#Target# turns into a losgoroth!", "+Corrupted Losgoroth Form" end, - on_lose = function(self, err) return "#Target# is no longer transformed.", "-Corrupted Losgoroth Form" end, + on_gain = function(self, err) return _t"#Target# turns into a losgoroth!", _t"+Corrupted Losgoroth Form" end, + on_lose = function(self, err) return _t"#Target# is no longer transformed.", _t"-Corrupted Losgoroth Form" end, activate = function(self, eff) self:effectTemporaryValue(eff, "all_damage_convert", DamageType.DRAINLIFE) self:effectTemporaryValue(eff, "all_damage_convert_percent", 50) @@ -2895,14 +2895,14 @@ newEffect{ newEffect{ name = "SHIVGOROTH_FORM", image = "talents/shivgoroth_form.png", - desc = "Shivgoroth Form", - long_desc = function(self, eff) return ("The target assumes the form of a shivgoroth."):format() end, + desc = _t"Shivgoroth Form", + long_desc = function(self, eff) return ("The target assumes the form of a shivgoroth."):tformat() end, type = "magical", subtype = { ice=true }, status = "beneficial", parameters = {}, - on_gain = function(self, err) return "#Target# turns into a shivgoroth!", "+Shivgoroth Form" end, - on_lose = function(self, err) return "#Target# is no longer transformed.", "-Shivgoroth Form" end, + on_gain = function(self, err) return _t"#Target# turns into a shivgoroth!", _t"+Shivgoroth Form" end, + on_lose = function(self, err) return _t"#Target# is no longer transformed.", _t"-Shivgoroth Form" end, activate = function(self, eff) self:effectTemporaryValue(eff, "damage_affinity", {[DamageType.COLD]=50 + 100 * eff.power}) self:effectTemporaryValue(eff, "resists", {[DamageType.COLD]=100 * eff.power / 2}) @@ -2947,14 +2947,14 @@ newEffect{ --Duplicate for Frost Lord's Chain newEffect{ name = "SHIVGOROTH_FORM_LORD", image = "talents/shivgoroth_form.png", - desc = "Shivgoroth Form", - long_desc = function(self, eff) return ("The target assumes the form of a shivgoroth."):format() end, + desc = _t"Shivgoroth Form", + long_desc = function(self, eff) return ("The target assumes the form of a shivgoroth."):tformat() end, type = "magical", subtype = { ice=true }, status = "beneficial", parameters = {}, - on_gain = function(self, err) return "#Target# turns into a shivgoroth!", "+Shivgoroth Form" end, - on_lose = function(self, err) return "#Target# is no longer transformed.", "-Shivgoroth Form" end, + on_gain = function(self, err) return _t"#Target# turns into a shivgoroth!", _t"+Shivgoroth Form" end, + on_lose = function(self, err) return _t"#Target# is no longer transformed.", _t"-Shivgoroth Form" end, activate = function(self, eff) self:effectTemporaryValue(eff, "damage_affinity", {[DamageType.COLD]=50 + 100 * eff.power}) self:effectTemporaryValue(eff, "resists", {[DamageType.COLD]=100 * eff.power / 2}) @@ -2998,8 +2998,8 @@ newEffect{ newEffect{ name = "KEEPER_OF_REALITY", image = "effects/continuum_destabilization.png", - desc = "Keepers of Reality Rally Call", - long_desc = function(self, eff) return "The keepers of reality have called upon all to defend Point Zero. Life increased by 5000, damage by 300%." end, + desc = _t"Keepers of Reality Rally Call", + long_desc = function(self, eff) return _t"The keepers of reality have called upon all to defend Point Zero. Life increased by 5000, damage by 300%." end, type = "magical", decrease = 0, subtype = { temporal=true }, @@ -3018,8 +3018,8 @@ newEffect{ newEffect{ name = "RECEPTIVE_MIND", image = "talents/rune__vision.png", - desc = "Receptive Mind", - long_desc = function(self, eff) return ("You can sense the presence of all %s around you."):format(eff.what) end, + desc = _t"Receptive Mind", + long_desc = function(self, eff) return ("You can sense the presence of all %s around you."):tformat(eff.what) end, type = "magical", subtype = { rune=true }, status = "beneficial", @@ -3033,8 +3033,8 @@ newEffect{ newEffect{ name = "BORN_INTO_MAGIC", image = "talents/born_into_magic.png", - desc = "Born into Magic", - long_desc = function(self, eff) return ("%s damage increased by 20%%."):format(DamageType:get(eff.damtype).name:capitalize()) end, + desc = _t"Born into Magic", + long_desc = function(self, eff) return ("%s damage increased by 20%%."):tformat(DamageType:get(eff.damtype).name:capitalize()) end, type = "magical", subtype = { race=true }, status = "beneficial", @@ -3048,8 +3048,8 @@ newEffect{ newEffect{ name = "ESSENCE_OF_THE_DEAD", image = "talents/essence_of_the_dead.png", - desc = "Essence of the Dead", - long_desc = function(self, eff) return ("The target consumed souls to gain new powers. %d spells affected."):format(eff.nb) end, + desc = _t"Essence of the Dead", + long_desc = function(self, eff) return ("The target consumed souls to gain new powers. %d spells affected."):tformat(eff.nb) end, type = "magical", decrease = 0, subtype = { necrotic=true }, @@ -3066,14 +3066,14 @@ newEffect{ newEffect{ name = "ICE_ARMOUR", image = "talents/ice_armour.png", - desc = "Ice Armour", - long_desc = function(self, eff) return ("The target is covered in a layer of ice. Its armour is increased by %d, it deals %0.1f Cold damage to attackers that hit in melee, and 50%% of its damage is converted to cold."):format(eff.armor, self:damDesc(DamageType.COLD, eff.dam)) end, + desc = _t"Ice Armour", + long_desc = function(self, eff) return ("The target is covered in a layer of ice. Its armour is increased by %d, it deals %0.1f Cold damage to attackers that hit in melee, and 50%% of its damage is converted to cold."):tformat(eff.armor, self:damDesc(DamageType.COLD, eff.dam)) end, type = "magical", subtype = { cold=true, armour=true, }, status = "beneficial", parameters = {armor=10, dam=10}, - on_gain = function(self, err) return "#Target# is covered in icy armor!" end, - on_lose = function(self, err) return "#Target#'s ice coating crumbles away." end, + on_gain = function(self, err) return _t"#Target# is covered in icy armor!" end, + on_lose = function(self, err) return _t"#Target#'s ice coating crumbles away." end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_armor", eff.armor) self:effectTemporaryValue(eff, "on_melee_hit", {[DamageType.COLD]=eff.dam}) @@ -3090,14 +3090,14 @@ newEffect{ newEffect{ name = "CAUSTIC_GOLEM", image = "talents/caustic_golem.png", - desc = "Caustic Golem", - long_desc = function(self, eff) return ("The target is coated with acid. When struck in melee, it has a %d%% chance to spray a cone of acid towards the attacker doing %0.1f damage."):format(eff.chance, self:damDesc(DamageType.ACID, eff.dam)) end, + desc = _t"Caustic Golem", + long_desc = function(self, eff) return ("The target is coated with acid. When struck in melee, it has a %d%% chance to spray a cone of acid towards the attacker doing %0.1f damage."):tformat(eff.chance, self:damDesc(DamageType.ACID, eff.dam)) end, type = "magical", subtype = { acid=true, coating=true, }, status = "beneficial", parameters = {chance=10, dam=10}, - on_gain = function(self, err) return "#Target# is coated in acid!" end, - on_lose = function(self, err) return "#Target#'s acid coating is diluted." end, + on_gain = function(self, err) return _t"#Target# is coated in acid!" end, + on_lose = function(self, err) return _t"#Target#'s acid coating is diluted." end, callbackOnMeleeHit = function(self, eff, src) if self.turn_procs.caustic_golem then return end if not rng.percent(eff.chance) then return end @@ -3118,14 +3118,14 @@ newEffect{ newEffect{ name = "SUN_VENGEANCE", image = "talents/sun_vengeance.png", - desc = "Sun's Vengeance", - long_desc = function(self, eff) return ("The target is filled with the Sun's fury, next Sun Beam will be instant cast."):format() end, + desc = _t"Sun's Vengeance", + long_desc = function(self, eff) return ("The target is filled with the Sun's fury, next Sun Beam will be instant cast."):tformat() end, type = "magical", subtype = { sun=true, }, status = "beneficial", parameters = {}, - on_gain = function(self, err) return "#Target# is filled with the Sun's fury!", "+Sun's Vengeance" end, - on_lose = function(self, err) return "#Target#'s solar fury subsides.", "-Sun's Vengeance" end, + on_gain = function(self, err) return _t"#Target# is filled with the Sun's fury!", _t"+Sun's Vengeance" end, + on_lose = function(self, err) return _t"#Target#'s solar fury subsides.", _t"-Sun's Vengeance" end, activate = function(self, eff) self:effectTemporaryValue(eff, "amplify_sun_beam", 25) end @@ -3133,15 +3133,15 @@ newEffect{ newEffect{ name = "SUNCLOAK", image = "talents/suncloak.png", - desc = "Suncloak", + desc = _t"Suncloak", long_desc = function(self, eff) return ("The target is protected by the sun, increasing their spell casting speed by %d%%, reducing spell cooldowns by %d%%, and preventing damage over %d%% of your maximum life from a single hit."): - format(eff.haste*100, eff.cd*100, eff.cap) end, + tformat(eff.haste*100, eff.cd*100, eff.cap) end, type = "magical", subtype = { light=true, }, status = "beneficial", parameters = {cap = 1, haste = 0.1, cd = 0.1}, - on_gain = function(self, err) return "#Target# is energized and protected by the Sun!", "+Suncloak" end, - on_lose = function(self, err) return "#Target#'s solar fury subsides.", "-Suncloak" end, + on_gain = function(self, err) return _t"#Target# is energized and protected by the Sun!", _t"+Suncloak" end, + on_lose = function(self, err) return _t"#Target#'s solar fury subsides.", _t"-Suncloak" end, activate = function(self, eff) self:effectTemporaryValue(eff, "flat_damage_cap", {all=eff.cap}) self:effectTemporaryValue(eff, "combat_spellspeed", eff.haste) @@ -3155,14 +3155,14 @@ newEffect{ newEffect{ name = "MARK_OF_LIGHT", image = "talents/mark_of_light.png", - desc = "Mark of Light", - long_desc = function(self, eff) return ("The creature that marked the target with light will be healed for all melee attacks against it by %d%%."):format(eff.power) end, + desc = _t"Mark of Light", + long_desc = function(self, eff) return ("The creature that marked the target with light will be healed for all melee attacks against it by %d%%."):tformat(eff.power) end, type = "magical", subtype = { light=true, }, status = "detrimental", parameters = { power = 10 }, - on_gain = function(self, err) return "#Target# is marked by light!", "+Mark of Light" end, - on_lose = function(self, err) return "#Target#'s mark disappears.", "-Mark of Light" end, + on_gain = function(self, err) return _t"#Target# is marked by light!", _t"+Mark of Light" end, + on_lose = function(self, err) return _t"#Target#'s mark disappears.", _t"-Mark of Light" end, callbackOnMeleeHit = function(self, eff, src, dam) if eff.src == src then src:heal(dam * eff.power / 100, self) @@ -3176,14 +3176,14 @@ newEffect{ newEffect{ name = "RIGHTEOUS_STRENGTH", image = "talents/righteous_strength.png", - desc = "Righteous Strength", - long_desc = function(self, eff) return ("Increase light and physical damage by %d%%."):format(eff.power) end, + desc = _t"Righteous Strength", + long_desc = function(self, eff) return ("Increase light and physical damage by %d%%."):tformat(eff.power) end, type = "magical", subtype = { sun=true, }, status = "beneficial", parameters = { power = 10 }, - on_gain = function(self, err) return "#Target# shines with light!", "+Righteous Strength" end, - on_lose = function(self, err) return "#Target# stops shining.", "-Righteous Strength" end, + on_gain = function(self, err) return _t"#Target# shines with light!", _t"+Righteous Strength" end, + on_lose = function(self, err) return _t"#Target# stops shining.", _t"-Righteous Strength" end, charges = function(self, eff) return eff.charges end, on_merge = function(self, old_eff, new_eff) new_eff.charges = math.min(old_eff.charges + 1, 3) @@ -3203,14 +3203,14 @@ newEffect{ newEffect{ name = "LIGHTBURN", image = "talents/righteous_strength.png", - desc = "Lightburn", - long_desc = function(self, eff) return ("The creature is burnt by light, dealing %0.2f light damage each turn and reducing armour by %d."):format(eff.dam, eff.armor) end, + desc = _t"Lightburn", + long_desc = function(self, eff) return ("The creature is burnt by light, dealing %0.2f light damage each turn and reducing armour by %d."):tformat(eff.dam, eff.armor) end, type = "magical", subtype = { sun=true, }, status = "detrimental", parameters = { armor = 10, dam = 10 }, - on_gain = function(self, err) return "#Target# burns with light!", "+Lightburn" end, - on_lose = function(self, err) return "#Target# stops burning.", "-Lightburn" end, + on_gain = function(self, err) return _t"#Target# burns with light!", _t"+Lightburn" end, + on_lose = function(self, err) return _t"#Target# stops burning.", _t"-Lightburn" end, on_merge = function(self, old_eff, new_eff) -- Merge the flames! local olddam = old_eff.dam * old_eff.dur @@ -3230,14 +3230,14 @@ newEffect{ newEffect{ name = "ILLUMINATION", - desc = "Illumination ", image = "talents/illumination.png", - long_desc = function(self, eff) return ("The target glows in the light, reducing its stealth and invisibility power by %d, defense by %d and looses all evasion bonus from being unseen."):format(eff.power, eff.def) end, + desc = _t"Illumination ", image = "talents/illumination.png", + long_desc = function(self, eff) return ("The target glows in the light, reducing its stealth and invisibility power by %d, defense by %d and looses all evasion bonus from being unseen."):tformat(eff.power, eff.def) end, type = "magical", subtype = { sun=true }, status = "detrimental", parameters = { power=20, def=20 }, - on_gain = function(self, err) return nil, "+Illumination" end, - on_lose = function(self, err) return nil, "-Illumination" end, + on_gain = function(self, err) return nil, _t"+Illumination" end, + on_lose = function(self, err) return nil, _t"-Illumination" end, activate = function(self, eff) self:effectTemporaryValue(eff, "inc_stealth", -eff.power) if self:attr("invisible") then self:effectTemporaryValue(eff, "invisible", -eff.power) end @@ -3248,27 +3248,27 @@ newEffect{ newEffect{ name = "LIGHT_BURST", - desc = "Light Burst ", image = "talents/light_burst.png", - long_desc = function(self, eff) return ("The is invigorated when dealing damage with Searing Sight."):format() end, + desc = _t"Light Burst ", image = "talents/light_burst.png", + long_desc = function(self, eff) return ("The is invigorated when dealing damage with Searing Sight."):tformat() end, type = "magical", subtype = { sun=true }, status = "beneficial", parameters = { max=1 }, - on_gain = function(self, err) return nil, "+Light Burst" end, - on_lose = function(self, err) return nil, "-Light Burst" end, + on_gain = function(self, err) return nil, _t"+Light Burst" end, + on_lose = function(self, err) return nil, _t"-Light Burst" end, } newEffect{ name = "LIGHT_BURST_SPEED", - desc = "Light Burst Speed", image = "effects/light_burst_speed.png", - long_desc = function(self, eff) return ("The target is invigorated from Searing Sight, increasing movement speed by %d%%."):format(eff.charges * 10) end, + desc = _t"Light Burst Speed", image = "effects/light_burst_speed.png", + long_desc = function(self, eff) return ("The target is invigorated from Searing Sight, increasing movement speed by %d%%."):tformat(eff.charges * 10) end, type = "magical", subtype = { sun=true }, status = "beneficial", parameters = {}, charges = function(self, eff) return eff.charges end, - on_gain = function(self, err) return nil, "+Light Burst Speed" end, - on_lose = function(self, err) return nil, "-Light Burst Speed" end, + on_gain = function(self, err) return nil, _t"+Light Burst Speed" end, + on_lose = function(self, err) return nil, _t"-Light Burst Speed" end, on_merge = function(self, old_eff, new_eff) local p = self:hasEffect(self.EFF_LIGHT_BURST) if not p then p = {max=1} end @@ -3289,14 +3289,14 @@ newEffect{ newEffect{ name = "HEALING_INVERSION", - desc = "Healing Inversion", image = "talents/healing_inversion.png", - long_desc = function(self, eff) return ("All healing done to the target will instead turn into %d%% blight damage."):format(eff.power) end, + desc = _t"Healing Inversion", image = "talents/healing_inversion.png", + long_desc = function(self, eff) return ("All healing done to the target will instead turn into %d%% blight damage."):tformat(eff.power) end, type = "magical", subtype = { heal=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return nil, "+Healing Inversion" end, - on_lose = function(self, err) return nil, "-Healing Inversion" end, + on_gain = function(self, err) return nil, _t"+Healing Inversion" end, + on_lose = function(self, err) return nil, _t"-Healing Inversion" end, callbackPriorities={callbackOnHeal = 1}, -- trigger after (most) other healing callbacks callbackOnHeal = function(self, eff, value, src, raw_value) if raw_value > 0 and not eff.projecting then -- avoid feedback; it's bad to lose out on dmg but it's worse to break the game @@ -3319,13 +3319,13 @@ newEffect{ newEffect{ name = "SHOCKED", - desc = "Shocked", - long_desc = function(self, eff) return ("Target is reeling from an lightning shock, halving its stun and pinning resistance."):format() end, + desc = _t"Shocked", + long_desc = function(self, eff) return ("Target is reeling from an lightning shock, halving its stun and pinning resistance."):tformat() end, type = "magical", subtype = { lightning=true }, status = "detrimental", - on_gain = function(self, err) return nil, "+Shocked" end, - on_lose = function(self, err) return nil, "-Shocked" end, + on_gain = function(self, err) return nil, _t"+Shocked" end, + on_lose = function(self, err) return nil, _t"-Shocked" end, activate = function(self, eff) if self:attr("stun_immune") then self:effectTemporaryValue(eff, "stun_immune", -self:attr("stun_immune") / 2) @@ -3340,13 +3340,13 @@ newEffect{ newEffect{ name = "WET", - desc = "Wet", - long_desc = function(self, eff) return ("Target is drenched with magical water, halving its stun resistance."):format() end, + desc = _t"Wet", + long_desc = function(self, eff) return ("Target is drenched with magical water, halving its stun resistance."):tformat() end, type = "magical", subtype = { water=true, ice=true }, status = "detrimental", - on_gain = function(self, err) return nil, "+Wet" end, - on_lose = function(self, err) return nil, "-Wet" end, + on_gain = function(self, err) return nil, _t"+Wet" end, + on_lose = function(self, err) return nil, _t"-Wet" end, on_merge = function(self, old_eff, new_eff) old_eff.dur = new_eff.dur return old_eff @@ -3364,14 +3364,14 @@ newEffect{ newEffect{ name = "PROBABILITY_TRAVEL", image = "talents/anomaly_probability_travel.png", - desc = "Probability Travel", - long_desc = function(self, eff) return ("Target is out of phase and may move through walls."):format() end, + desc = _t"Probability Travel", + long_desc = function(self, eff) return ("Target is out of phase and may move through walls."):tformat() end, type = "magical", subtype = { teleport=true }, status = "beneficial", parameters = { power=0 }, - on_gain = function(self, err) return nil, "+Probability Travel" end, - on_lose = function(self, err) return nil, "-Probability Travel" end, + on_gain = function(self, err) return nil, _t"+Probability Travel" end, + on_lose = function(self, err) return nil, _t"-Probability Travel" end, activate = function(self, eff) self:effectTemporaryValue(eff, "prob_travel", eff.power) self:effectTemporaryValue(eff, "prob_travel_penalty", eff.power) @@ -3382,13 +3382,13 @@ newEffect{ newEffect{ name = "BLINK", image = "talents/anomaly_blink.png", - desc = "Blink", - long_desc = function(self, eff) return ("Target is randomly teleporting every turn."):format() end, + desc = _t"Blink", + long_desc = function(self, eff) return ("Target is randomly teleporting every turn."):tformat() end, type = "magical", subtype = { teleport=true }, status = "detrimental", - on_gain = function(self, err) return nil, "+Blink" end, - on_lose = function(self, err) return nil, "-Blink" end, + on_gain = function(self, err) return nil, _t"+Blink" end, + on_lose = function(self, err) return nil, _t"-Blink" end, on_timeout = function(self, eff) if self:teleportRandom(self.x, self.y, eff.power) then game.level.map:particleEmitter(self.x, self.y, 1, "temporal_teleport") @@ -3398,14 +3398,14 @@ newEffect{ newEffect{ name = "DIMENSIONAL_ANCHOR", image = "talents/dimensional_anchor.png", - desc = "Dimensional Anchor", - long_desc = function(self, eff) return ("The target is unable to teleport and takes %0.2f temporal and %0.2f physical damage if they try."):format(eff.damage, eff.damage) end, + desc = _t"Dimensional Anchor", + long_desc = function(self, eff) return ("The target is unable to teleport and takes %0.2f temporal and %0.2f physical damage if they try."):tformat(eff.damage, eff.damage) end, type = "magical", subtype = { temporal=true, slow=true }, status = "detrimental", parameters = { damage=0 }, - on_gain = function(self, err) return "#Target# is anchored.", "+Anchor" end, - on_lose = function(self, err) return "#Target# is no longer anchored.", "-Anchor" end, + on_gain = function(self, err) return _t"#Target# is anchored.", _t"+Anchor" end, + on_lose = function(self, err) return _t"#Target# is no longer anchored.", _t"-Anchor" end, onTeleport = function(self, eff) DamageType:get(DamageType.WARP).projector(eff.src or self, self.x, self.y, DamageType.WARP, eff.damage) end, @@ -3420,13 +3420,13 @@ newEffect{ newEffect{ name = "BREACH", image = "talents/breach.png", - desc = "Breach", - long_desc = function(self, eff) return ("The target's defenses have been breached, reducing armor hardiness, stun, pin, blindness, and confusion immunity by 50%%."):format() end, + desc = _t"Breach", + long_desc = function(self, eff) return ("The target's defenses have been breached, reducing armor hardiness, stun, pin, blindness, and confusion immunity by 50%%."):tformat() end, type = "magical", subtype = { temporal=true }, status = "detrimental", - on_gain = function(self, err) return nil, "+Breach" end, - on_lose = function(self, err) return nil, "-Breach" end, + on_gain = function(self, err) return nil, _t"+Breach" end, + on_lose = function(self, err) return nil, _t"-Breach" end, on_merge = function(self, old_eff, new_eff) old_eff.dur = new_eff.dur return old_eff @@ -3451,21 +3451,21 @@ newEffect{ newEffect{ name = "BRAIDED", image = "talents/braid_lifelines.png", - desc = "Braided", - long_desc = function(self, eff) return ("The target is taking %d%% of all damage dealt to other braided targets."):format(eff.power) end, + desc = _t"Braided", + long_desc = function(self, eff) return ("The target is taking %d%% of all damage dealt to other braided targets."):tformat(eff.power) end, type = "magical", subtype = { temporal=true }, status = "detrimental", parameters = { power=0 }, - on_gain = function(self, err) return "#Target#'s lifeline has been braided.", "+Braided" end, - on_lose = function(self, err) return "#Target#'s lifeline is no longer braided.", "-Braided" end, + on_gain = function(self, err) return _t"#Target#'s lifeline has been braided.", _t"+Braided" end, + on_lose = function(self, err) return _t"#Target#'s lifeline is no longer braided.", _t"-Braided" end, doBraid = function(self, eff, dam) local braid_damage = dam * eff.power/ 100 for i = 1, #eff.targets do local target = eff.targets[i] if target ~= self and not target.dead then game:delayedLogMessage(eff.src, target, "braided", "#CRIMSON##Source# damages #Target# through the Braid!") - game:delayedLogDamage(eff.src, target, braid_damage, ("#PINK#%d braided #LAST#"):format(braid_damage), false) + game:delayedLogDamage(eff.src, target, braid_damage, ("#PINK#%d braided #LAST#"):tformat(braid_damage), false) target:takeHit(braid_damage, eff.src) end end @@ -3487,8 +3487,8 @@ newEffect{ newEffect{ name = "PRECOGNITION", image = "talents/precognition.png", - desc = "Precognition", - long_desc = function(self, eff) return ("Peer into the future, detecting enemies, increasing defense by %d, and granting a %d%% chance to ignore critical hits."):format(eff.defense, eff.crits) end, + desc = _t"Precognition", + long_desc = function(self, eff) return ("Peer into the future, detecting enemies, increasing defense by %d, and granting a %d%% chance to ignore critical hits."):tformat(eff.defense, eff.crits) end, type = "magical", subtype = { sense=true }, status = "beneficial", @@ -3509,13 +3509,13 @@ newEffect{ newEffect{ name = "WEBS_OF_FATE", image = "talents/webs_of_fate.png", - desc = "Webs of Fate", - long_desc = function(self, eff) return ("Displacing %d%% of all damage on to a random enemy."):format(eff.power*100) end, + desc = _t"Webs of Fate", + long_desc = function(self, eff) return ("Displacing %d%% of all damage on to a random enemy."):tformat(eff.power*100) end, type = "magical", subtype = { temporal=true }, status = "beneficial", - on_gain = function(self, err) return nil, "+Webs of Fate" end, - on_lose = function(self, err) return nil, "-Webs of Fate" end, + on_gain = function(self, err) return nil, _t"+Webs of Fate" end, + on_lose = function(self, err) return nil, _t"-Webs of Fate" end, parameters = { power=0.1 }, callbackOnTakeDamage = function(self, eff, src, x, y, type, dam, state) -- Displace Damage? @@ -3546,7 +3546,7 @@ newEffect{ DamageType.defaultProjector(self, a.x, a.y, type, displace, state) state.no_reflect = nil dam = dam - displace - game:delayedLogDamage(src, self, 0, ("%s(%d webs of fate)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", displace), false) + game:delayedLogDamage(src, self, 0, ("%s(%d webs of fate)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", displace), false) end end @@ -3565,21 +3565,21 @@ newEffect{ newEffect{ name = "SEAL_FATE", image = "talents/seal_fate.png", - desc = "Seal Fate", + desc = _t"Seal Fate", long_desc = function(self, eff) local chance = eff.chance local spin = self:hasEffect(self.EFF_SPIN_FATE) if spin then chance = chance * (1 + spin.spin/3) end - return ("The target has a %d%% chance of increasing the duration of one detrimental status effects on targets it damages by one."):format(chance) + return ("The target has a %d%% chance of increasing the duration of one detrimental status effects on targets it damages by one."):tformat(chance) end, type = "magical", subtype = { focus=true }, status = "beneficial", parameters = { procs=1 }, - on_gain = function(self, err) return nil, "+Seal Fate" end, - on_lose = function(self, err) return nil, "-Seal Fate" end, + on_gain = function(self, err) return nil, _t"+Seal Fate" end, + on_lose = function(self, err) return nil, _t"-Seal Fate" end, callbackOnDealDamage = function(self, eff, dam, target) if dam <=0 then return end @@ -3625,11 +3625,11 @@ newEffect{ newEffect{ name = "UNRAVEL", image = "talents/temporal_vigour.png", - desc = "Unravel", + desc = _t"Unravel", long_desc = function(self, eff) - return ("The target is immune to further damage but is dealing %d%% less damage."):format(eff.power) + return ("The target is immune to further damage but is dealing %d%% less damage."):tformat(eff.power) end, - on_gain = function(self, err) return "#Target# has started to unravel.", "+Unraveling" end, + on_gain = function(self, err) return _t"#Target# has started to unravel.", _t"+Unraveling" end, type = "magical", subtype = {time=true}, status = "beneficial", @@ -3648,8 +3648,8 @@ newEffect{ -- check negative life first incase the creature has healing if self.life <= (self.die_at or 0) then local sx, sy = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, rng.float(-2.5, -1.5), "Unravels!", {255,0,255}) - game.logSeen(self, "%s has unraveled!", self.name:capitalize()) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, rng.float(-2.5, -1.5), _t"Unravels!", {255,0,255}) + game.logSeen(self, "%s has unraveled!", self:getName():capitalize()) self:die(self) end end, @@ -3657,10 +3657,10 @@ newEffect{ newEffect{ name = "ENTROPY", image = "talents/entropy.png", - desc = "Entropy", - long_desc = function(self, eff) return "The target is losing one sustain per turn." end, - on_gain = function(self, err) return "#Target# is caught in an entropic field!", "+Entropy" end, - on_lose = function(self, err) return "#Target# is free from the entropy.", "-Entropy" end, + desc = _t"Entropy", + long_desc = function(self, eff) return _t"The target is losing one sustain per turn." end, + on_gain = function(self, err) return _t"#Target# is caught in an entropic field!", _t"+Entropy" end, + on_lose = function(self, err) return _t"#Target# is free from the entropy.", _t"-Entropy" end, type = "magical", subtype = { temporal=true }, status = "detrimental", @@ -3681,10 +3681,10 @@ newEffect{ newEffect{ name = "REGRESSION", image = "talents/turn_back_the_clock.png", - desc = "Regression", - long_desc = function(self, eff) return ("Reduces your three highest stats by %d."):format(eff.power) end, - on_gain = function(self, err) return "#Target# has regressed.", "+Regression" end, - on_lose = function(self, err) return "#Target# has returned to its natural state.", "-Regression" end, + desc = _t"Regression", + long_desc = function(self, eff) return ("Reduces your three highest stats by %d."):tformat(eff.power) end, + on_gain = function(self, err) return _t"#Target# has regressed.", _t"+Regression" end, + on_lose = function(self, err) return _t"#Target# has returned to its natural state.", _t"-Regression" end, type = "physical", subtype = { temporal=true }, status = "detrimental", @@ -3700,14 +3700,14 @@ newEffect{ newEffect{ name = "ATTENUATE_DET", image = "talents/attenuate.png", - desc = "Attenuate", - long_desc = function(self, eff) return ("The target is being removed from the timeline and is taking %0.2f temporal damage per turn."):format(eff.power) end, + desc = _t"Attenuate", + long_desc = function(self, eff) return ("The target is being removed from the timeline and is taking %0.2f temporal damage per turn."):tformat(eff.power) end, type = "magical", subtype = { temporal=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is being being removed from the timeline!", "+Attenuate" end, - on_lose = function(self, err) return "#Target# survived the attenuation.", "-Attenuate" end, + on_gain = function(self, err) return _t"#Target# is being being removed from the timeline!", _t"+Attenuate" end, + on_lose = function(self, err) return _t"#Target# survived the attenuation.", _t"-Attenuate" end, on_merge = function(self, old_eff, new_eff) -- Merge the flames! local olddam = old_eff.power * old_eff.dur @@ -3722,7 +3722,7 @@ newEffect{ -- Kill it!! if not self.dead and not self:isTalentActive(self.T_REALITY_SMEARING) and self:canBe("instakill") and self.life > 0 and self.life < self.max_life * 0.2 then - game.logSeen(self, "%s has been removed from the timeline!", self.name:capitalize()) + game.logSeen(self, "%s has been removed from the timeline!", self:getName():capitalize()) self:die(src) end @@ -3739,14 +3739,14 @@ newEffect{ newEffect{ name = "ATTENUATE_BEN", image = "talents/attenuate.png", - desc = "Attenuate", - long_desc = function(self, eff) return ("The target is being grounded in the timeline and is healing %0.2f life per turn."):format(eff.power) end, + desc = _t"Attenuate", + long_desc = function(self, eff) return ("The target is being grounded in the timeline and is healing %0.2f life per turn."):tformat(eff.power) end, type = "magical", subtype = { temporal=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is being being grounded in the timeline!", "+Attenuate" end, - on_lose = function(self, err) return "#Target# is no longer being grounded.", "-Attenuate" end, + on_gain = function(self, err) return _t"#Target# is being being grounded in the timeline!", _t"+Attenuate" end, + on_lose = function(self, err) return _t"#Target# is no longer being grounded.", _t"-Attenuate" end, on_merge = function(self, old_eff, new_eff) -- Merge the flames! local olddam = old_eff.power * old_eff.dur @@ -3763,14 +3763,14 @@ newEffect{ newEffect{ name = "OGRIC_WRATH", image = "talents/ogre_wrath.png", - desc = "Ogric Wrath", - long_desc = function(self, eff) return ("Do not try to resist it!"):format() end, + desc = _t"Ogric Wrath", + long_desc = function(self, eff) return ("Do not try to resist it!"):tformat() end, type = "magical", subtype = { runic=true }, status = "beneficial", parameters = { power=1 }, - on_gain = function(self, err) return "#Target# enters an ogric frenzy.", "+Ogric Wrath" end, - on_lose = function(self, err) return "#Target# calms down.", "-Ogric Wrath" end, + on_gain = function(self, err) return _t"#Target# enters an ogric frenzy.", _t"+Ogric Wrath" end, + on_lose = function(self, err) return _t"#Target# calms down.", _t"-Ogric Wrath" end, callbackOnDealDamage = function(self, eff, val, target, dead, death_note) if not death_note or not death_note.initial_dam then return end if val >= death_note.initial_dam then return end @@ -3813,8 +3813,8 @@ newEffect{ newEffect{ name = "OGRE_FURY", image = "effects/ogre_fury.png", - desc = "Ogre Fury", - long_desc = function(self, eff) return ("Increases crit chance by %d%% and critical power by %d%%. %d charge(s)."):format(eff.stacks * 5, eff.stacks * 20, eff.stacks) end, + desc = _t"Ogre Fury", + long_desc = function(self, eff) return ("Increases crit chance by %d%% and critical power by %d%%. %d charge(s)."):tformat(eff.stacks * 5, eff.stacks * 20, eff.stacks) end, type = "magical", subtype = { runic=true }, status = "beneficial", @@ -3860,14 +3860,14 @@ newEffect{ newEffect{ name = "WRIT_LARGE", image = "talents/writ_large.png", - desc = "Writ Large", - long_desc = function(self, eff) return ("Inscriptions cooldown twice as fast."):format(eff.power) end, + desc = _t"Writ Large", + long_desc = function(self, eff) return ("Inscriptions cooldown twice as fast."):tformat(eff.power) end, type = "magical", subtype = { runic=true }, status = "beneficial", parameters = { power=1 }, - on_gain = function(self, err) return nil, "+Writ Large" end, - on_lose = function(self, err) return nil, "-Writ Large" end, + on_gain = function(self, err) return nil, _t"+Writ Large" end, + on_lose = function(self, err) return nil, _t"-Writ Large" end, callbackOnActBase = function(self, eff) if not self:attr("no_talents_cooldown") then for tid, c in pairs(self.talents_cd) do @@ -3888,14 +3888,14 @@ newEffect{ newEffect{ name = "STATIC_HISTORY", image = "talents/static_history.png", - desc = "Static History", - long_desc = function(self, eff) return ("Chronomancy spells cast by the target will not produce minor anomalies."):format() end, + desc = _t"Static History", + long_desc = function(self, eff) return ("Chronomancy spells cast by the target will not produce minor anomalies."):tformat() end, type = "magical", subtype = { time=true }, status = "beneficial", parameters = { power=0.1 }, - on_gain = function(self, err) return "Spacetime has stabilized around #Target#.", "+Static History" end, - on_lose = function(self, err) return "The fabric of spacetime around #Target# has returned to normal.", "-Static History" end, + on_gain = function(self, err) return _t"Spacetime has stabilized around #Target#.", _t"+Static History" end, + on_lose = function(self, err) return _t"The fabric of spacetime around #Target# has returned to normal.", _t"-Static History" end, activate = function(self, eff) self:effectTemporaryValue(eff, "no_minor_anomalies", 1) end, @@ -3905,14 +3905,14 @@ newEffect{ newEffect{ name = "ARROW_ECHOES", image = "talents/arrow_echoes.png", - desc = "Arrow Echoes", - long_desc = function(self, eff) return ("Each turn will fire an arrow at %s."):format(eff.target.name) end, + desc = _t"Arrow Echoes", + long_desc = function(self, eff) return ("Each turn will fire an arrow at %s."):tformat(eff.target:getName()) end, type = "magical", subtype = { time=true }, status = "beneficial", remove_on_clone = true, - on_gain = function(self, err) return nil, "+Arrow Echoes" end, - on_lose = function(self, err) return nil, "-Arrow Echoes" end, + on_gain = function(self, err) return nil, _t"+Arrow Echoes" end, + on_lose = function(self, err) return nil, _t"-Arrow Echoes" end, parameters = { shots = 1 }, on_timeout = function(self, eff) if eff.shots <= 0 or eff.target.dead or not game.level:hasEntity(self) or not game.level:hasEntity(eff.target) or core.fov.distance(self.x, self.y, eff.target.x, eff.target.y) > 10 then @@ -3929,15 +3929,15 @@ newEffect{ newEffect{ name = "WARDEN_S_FOCUS", image = "talents/warden_s_focus.png", - desc = "Warden's Focus", + desc = _t"Warden's Focus", long_desc = function(self, eff) - return ("Focused on %s, +%d%% critical damage and +%d%% critical hit chance against this target."):format(eff.target.name, eff.power, eff.power) + return ("Focused on %s, +%d%% critical damage and +%d%% critical hit chance against this target."):tformat(eff.target:getName(), eff.power, eff.power) end, type = "magical", subtype = { tactic=true }, status = "beneficial", - on_gain = function(self, err) return nil, "+Warden's Focus" end, - on_lose = function(self, err) return nil, "-Warden's Focus" end, + on_gain = function(self, err) return nil, _t"+Warden's Focus" end, + on_lose = function(self, err) return nil, _t"-Warden's Focus" end, parameters = { power=0}, callbackOnTakeDamage = function(self, eff, src, x, y, type, dam, tmp) local eff = self:hasEffect(self.EFF_WARDEN_S_FOCUS) @@ -3945,7 +3945,7 @@ newEffect{ -- Reduce damage local reduction = dam * eff.power/100 dam = dam - reduction - game:delayedLogDamage(src, self, 0, ("%s(%d focus)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", reduction), false) + game:delayedLogDamage(src, self, 0, ("%s(%d focus)#LAST#"):tformat(DamageType:get(type).text_color or "#aaaaaa#", reduction), false) end return {dam=dam} end, @@ -3962,16 +3962,16 @@ newEffect{ newEffect{ name = "FATEWEAVER", image = "talents/fateweaver.png", - desc = "Fateweaver", - long_desc = function(self, eff) return ("The target's accuracy and power have been increased by %d."):format(eff.power_bonus * eff.spin) end, - display_desc = function(self, eff) return eff.spin.." Fateweaver" end, + desc = _t"Fateweaver", + long_desc = function(self, eff) return ("The target's accuracy and power have been increased by %d."):tformat(eff.power_bonus * eff.spin) end, + display_desc = function(self, eff) return ("%d Fateweaver"):tformat(eff.spin) end, charges = function(self, eff) return eff.spin end, type = "magical", subtype = { temporal=true }, status = "beneficial", parameters = { power_bonus=0, spin=0, max_spin=3}, - on_gain = function(self, err) return "#Target# weaves fate.", "+Fateweaver" end, - on_lose = function(self, err) return "#Target# stops weaving fate.", "-Fateweaver" end, + on_gain = function(self, err) return _t"#Target# weaves fate.", _t"+Fateweaver" end, + on_lose = function(self, err) return _t"#Target# stops weaving fate.", _t"-Fateweaver" end, on_merge = function(self, old_eff, new_eff) -- remove the four old values self:removeTemporaryValue("combat_atk", old_eff.atkid) @@ -4009,13 +4009,13 @@ newEffect{ newEffect{ name = "FOLD_FATE", image = "talents/fold_fate.png", - desc = "Fold Fate", - long_desc = function(self, eff) return ("The target is nearing the end, its resistance to physical and temporal damage have been reduced by %d%%."):format(eff.power) end, + desc = _t"Fold Fate", + long_desc = function(self, eff) return ("The target is nearing the end, its resistance to physical and temporal damage have been reduced by %d%%."):tformat(eff.power) end, type = "magical", subtype = { temporal=true }, status = "detrimental", parameters = { power = 1 }, - on_gain = function(self, err) return "#Target# is nearing the end.", "+Fold Fate" end, + on_gain = function(self, err) return _t"#Target# is nearing the end.", _t"+Fold Fate" end, activate = function(self, eff) eff.phys = self:addTemporaryValue("resists", { [DamageType.PHYSICAL] = -eff.power}) eff.temp = self:addTemporaryValue("resists", { [DamageType.TEMPORAL] = -eff.power}) @@ -4029,17 +4029,17 @@ newEffect{ -- These are cosmetic so they can be cleared or clicked off newEffect{ name = "BEN_TETHER", image = "talents/spatial_tether.png", - desc = "Spatial Tether", + desc = _t"Spatial Tether", long_desc = function(self, eff) local chance = eff.chance * core.fov.distance(self.x, self.y, eff.x, eff.y) - return ("The target has been tethered to the location and has a %d%% chance of being teleported back, creating an explosion for %0.2f physical and %0.2f temporal warp damage at both ends of the teleport."):format(chance, eff.dam/2, eff.dam/2) + return ("The target has been tethered to the location and has a %d%% chance of being teleported back, creating an explosion for %0.2f physical and %0.2f temporal warp damage at both ends of the teleport."):tformat(chance, eff.dam/2, eff.dam/2) end, type = "magical", subtype = { teleport=true, temporal=true }, status = "beneficial", parameters = { chance = 1 }, - on_gain = function(self, err) return "#Target# has been tethered!", "+Tether" end, - on_lose = function(self, err) return "#Target# is no longer tethered.", "-Tether" end, + on_gain = function(self, err) return _t"#Target# has been tethered!", _t"+Tether" end, + on_lose = function(self, err) return _t"#Target# is no longer tethered.", _t"-Tether" end, activate = function(self, eff) end, deactivate = function(self, eff) @@ -4048,17 +4048,17 @@ newEffect{ newEffect{ name = "DET_TETHER", image = "talents/spatial_tether.png", - desc = "Spatial Tether", + desc = _t"Spatial Tether", long_desc = function(self, eff) local chance = eff.chance * core.fov.distance(self.x, self.y, eff.x, eff.y) - return ("The target has been tethered to the location and has a %d%% chance of being teleported back, creating an explosion for %0.2f physical and %0.2f temporal warp damage at both ends of the teleport."):format(chance, eff.dam/2, eff.dam/2) + return ("The target has been tethered to the location and has a %d%% chance of being teleported back, creating an explosion for %0.2f physical and %0.2f temporal warp damage at both ends of the teleport."):tformat(chance, eff.dam/2, eff.dam/2) end, type = "magical", subtype = { teleport=true, temporal=true }, status = "detrimental", parameters = { chance = 1 }, - on_gain = function(self, err) return "#Target# has been tethered!", "+Tether" end, - on_lose = function(self, err) return "#Target# is no longer tethered.", "-Tether" end, + on_gain = function(self, err) return _t"#Target# has been tethered!", _t"+Tether" end, + on_lose = function(self, err) return _t"#Target# is no longer tethered.", _t"-Tether" end, activate = function(self, eff) end, deactivate = function(self, eff) @@ -4067,15 +4067,15 @@ newEffect{ newEffect{ name = "BLIGHT_POISON", image = "effects/poisoned.png", - desc = "Blight Poison", - long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f blight damage per turn."):format(eff.power) end, + desc = _t"Blight Poison", + long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f blight damage per turn."):tformat(eff.power) end, charges = function(self, eff) return math.floor(eff.power) end, type = "magical", subtype = { poison=true, blight=true }, no_ct_effect = true, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is poisoned with blight!", "+Blight Poison" end, - on_lose = function(self, err) return "#Target# is free from the blighted poison.", "-Blight Poison" end, + on_gain = function(self, err) return _t"#Target# is poisoned with blight!", _t"+Blight Poison" end, + on_lose = function(self, err) return _t"#Target# is free from the blighted poison.", _t"-Blight Poison" end, on_merge = function(self, old_eff, new_eff) -- Merge the poison local olddam = old_eff.power * old_eff.dur @@ -4095,14 +4095,14 @@ newEffect{ newEffect{ name = "INSIDIOUS_BLIGHT", image = "effects/insidious_poison.png", - desc = "Insidious Blight", - long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f blight damage per turn and decreasing all heals received by %d%%."):format(eff.power, eff.heal_factor) end, + desc = _t"Insidious Blight", + long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f blight damage per turn and decreasing all heals received by %d%%."):tformat(eff.power, eff.heal_factor) end, type = "magical", subtype = { poison=true, blight=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10, heal_factor=30}, - on_gain = function(self, err) return "#Target# is poisoned with insidious blight!!", "+Insidious Blight" end, - on_lose = function(self, err) return "#Target# is free from the insidious blight.", "-Insidious Blight" end, + on_gain = function(self, err) return _t"#Target# is poisoned with insidious blight!!", _t"+Insidious Blight" end, + on_lose = function(self, err) return _t"#Target# is free from the insidious blight.", _t"-Insidious Blight" end, activate = function(self, eff) eff.healid = self:addTemporaryValue("healing_factor", -eff.heal_factor / 100) end, @@ -4123,14 +4123,14 @@ newEffect{ newEffect{ name = "CRIPPLING_BLIGHT", image = "talents/crippling_poison.png", - desc = "Crippling Blight", - long_desc = function(self, eff) return ("The target is poisoned and sick, doing %0.2f blight damage per turn. Each time it tries to use a talent there is %d%% chance of failure."):format(eff.power, eff.fail) end, + desc = _t"Crippling Blight", + long_desc = function(self, eff) return ("The target is poisoned and sick, doing %0.2f blight damage per turn. Each time it tries to use a talent there is %d%% chance of failure."):tformat(eff.power, eff.fail) end, type = "magical", subtype = { poison=true, blight=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10, fail=5}, - on_gain = function(self, err) return "#Target# is poisoned with crippling blight!", "+Crippling Blight" end, - on_lose = function(self, err) return "#Target# is free from the crippling blight.", "-Crippling Blight" end, + on_gain = function(self, err) return _t"#Target# is poisoned with crippling blight!", _t"+Crippling Blight" end, + on_lose = function(self, err) return _t"#Target# is free from the crippling blight.", _t"-Crippling Blight" end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_poison") then self:heal(eff.power, eff.src) @@ -4152,14 +4152,14 @@ newEffect{ newEffect{ name = "NUMBING_BLIGHT", image = "effects/numbing_poison.png", - desc = "Numbing Blight", - long_desc = function(self, eff) return ("The target is poisoned and sick, doing %0.2f blight damage per turn. All damage it does is reduced by %d%%."):format(eff.power, eff.reduce) end, + desc = _t"Numbing Blight", + long_desc = function(self, eff) return ("The target is poisoned and sick, doing %0.2f blight damage per turn. All damage it does is reduced by %d%%."):tformat(eff.power, eff.reduce) end, type = "magical", subtype = { poison=true, blight=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10, reduce=5}, - on_gain = function(self, err) return "#Target# is poisoned numbing blight!", "+Numbing Blight" end, - on_lose = function(self, err) return "#Target# is free from the numbing blight.", "-Numbing Blight" end, + on_gain = function(self, err) return _t"#Target# is poisoned numbing blight!", _t"+Numbing Blight" end, + on_lose = function(self, err) return _t"#Target# is free from the numbing blight.", _t"-Numbing Blight" end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_poison") then self:heal(eff.power, eff.src) @@ -4181,18 +4181,18 @@ newEffect{ newEffect{ name = "ELDRITCH_STONE", image = "talents/eldritch_stone.png", - desc = "Eldritch Stone Shield", + desc = _t"Eldritch Stone Shield", long_desc = function(self, eff) return ("The target is surrounded by a stone shield absorbing %d/%d damage. When the shield is removed, it will explode for up to %d (currently %d) Arcane damage in a radius %d."): - format(eff.power, eff.max, eff.maxdam, math.min(eff.maxdam, self:getEquilibrium() - self:getMinEquilibrium()), eff.radius) + tformat(eff.power, eff.max, eff.maxdam, math.min(eff.maxdam, self:getEquilibrium() - self:getMinEquilibrium()), eff.radius) end, type = "magical", subtype = { earth=true, shield=true }, status = "beneficial", parameters = { power=100, radius=3 , maxdam=500}, - on_gain = function(self, err) return "#Target# is encased in a stone shield." end, + on_gain = function(self, err) return _t"#Target# is encased in a stone shield." end, on_lose = function(self, err) - return ("The stone shield around #Target# %s"):format(self:getEquilibrium() - self:getMinEquilibrium() > 0 and "explodes!" or "crumbles.") + return ("The stone shield around #Target# %s"):tformat(self:getEquilibrium() - self:getMinEquilibrium() > 0 and _t"explodes!" or _t"crumbles.") end, on_aegis = function(self, eff, aegis) eff.power = eff.power + eff.max * aegis / 100 @@ -4235,26 +4235,26 @@ newEffect{ newEffect{ name = "DEEPROCK_FORM", image = "talents/deeprock_form.png", - desc = "Deeprock Form", + desc = _t"Deeprock Form", long_desc = function(self, eff) local xs = "" if eff.arcaneDam and eff.arcanePen then - xs = xs..(", +%d%% Arcane damage and +%d%% Arcane damage penetration,"):format(eff.arcaneDam, eff.arcanePen) + xs = xs..(", +%d%% Arcane damage and +%d%% Arcane damage penetration,"):tformat(eff.arcaneDam, eff.arcanePen) end if eff.natureDam and eff.naturePen then - xs = (", +%d%% Nature damage and +%d%% Nature damage penetration"):format(eff.natureDam, eff.naturePen)..xs + xs = (", +%d%% Nature damage and +%d%% Nature damage penetration"):tformat(eff.natureDam, eff.naturePen)..xs end if eff.immune then - xs = (", %d%% bleeding, poison, disease, and stun immunity"):format(eff.immune*100)..xs + xs = (", %d%% bleeding, poison, disease, and stun immunity"):tformat(eff.immune*100)..xs end - return ("The target has turned into a huge deeprock elemental. It gains 2 size categories%s and +%d%% Physical damage and +%d%% Physical damage penetration.%s"):format(xs, eff.dam, eff.pen, eff.useResist and " In addition, it uses its physical resistance against all damage." or "") + return ("The target has turned into a huge deeprock elemental. It gains 2 size categories%s and +%d%% Physical damage and +%d%% Physical damage penetration.%s"):tformat(xs, eff.dam, eff.pen, eff.useResist and _t" In addition, it uses its physical resistance against all damage." or "") end, type = "magical", subtype = { earth=true, elemental=true }, status = "beneficial", parameters = { dam = 10, pen = 5, armor = 5}, - on_gain = function(self, err) return "#Target# is imbued by the power of the Stone.", "+Deeprock Form" end, - on_lose = function(self, err) return "#Target# is abandoned by the Stone's power.", "-Deeprock Form" end, + on_gain = function(self, err) return _t"#Target# is imbued by the power of the Stone.", _t"+Deeprock Form" end, + on_lose = function(self, err) return _t"#Target# is abandoned by the Stone's power.", _t"-Deeprock Form" end, activate = function(self, eff) if self:knowTalent(self.T_VOLCANIC_ROCK) then self:learnTalent(self.T_VOLCANO, true, self:getTalentLevelRaw(self.T_VOLCANIC_ROCK) * 2, {no_unlearn=true}) @@ -4316,15 +4316,15 @@ newEffect{ newEffect{ name = "BATHE_IN_LIGHT", image = "talents/bathe_in_light.png", - desc = "Bathe in Light", - long_desc = function(self, eff) return ("Fire and Light damage increased by %d%%."):format(eff.power) + desc = _t"Bathe in Light", + long_desc = function(self, eff) return ("Fire and Light damage increased by %d%%."):tformat(eff.power) end, type = "magical", subtype = { celestial=true, light=true }, status = "beneficial", parameters = { power = 10 }, - on_gain = function(self, err) return "#Target# glows intensely!", true end, - on_lose = function(self, err) return "#Target# is no longer glowing .", true end, + on_gain = function(self, err) return _t"#Target# glows intensely!", true end, + on_lose = function(self, err) return _t"#Target# is no longer glowing .", true end, activate = function(self, eff) self:effectTemporaryValue(eff, "inc_damage", {[DamageType.FIRE]=eff.power, [DamageType.LIGHT]=eff.power}) end, @@ -4334,8 +4334,8 @@ newEffect{ newEffect{ name = "OVERSEER_OF_NATIONS", image = "talents/overseer_of_nations.png", - desc = "Overseer of Nations", - long_desc = function(self, eff) return ("Detects creatures of type %s/%s in radius 15."):format(eff.type, eff.subtype) end, + desc = _t"Overseer of Nations", + long_desc = function(self, eff) return ("Detects creatures of type %s/%s in radius 15."):tformat(eff.type, eff.subtype) end, type = "magical", subtype = { higher=true }, status = "beneficial", @@ -4351,14 +4351,14 @@ newEffect{ newEffect{ name = "PACIFICATION_HEX", image = "talents/pacification_hex.png", - desc = "Pacification Hex", - long_desc = function(self, eff) return ("The target is hexed, granting it %d%% chance each turn to be dazed for 3 turns."):format(eff.chance) end, + desc = _t"Pacification Hex", + long_desc = function(self, eff) return ("The target is hexed, granting it %d%% chance each turn to be dazed for 3 turns."):tformat(eff.chance) end, type = "magical", subtype = { hex=true, dominate=true }, status = "detrimental", parameters = {chance=10, power=10}, - on_gain = function(self, err) return "#Target# is hexed!", "+Pacification Hex" end, - on_lose = function(self, err) return "#Target# is free from the hex.", "-Pacification Hex" end, + on_gain = function(self, err) return _t"#Target# is hexed!", _t"+Pacification Hex" end, + on_lose = function(self, err) return _t"#Target# is free from the hex.", _t"-Pacification Hex" end, -- Damage each turn on_timeout = function(self, eff) if not self:hasEffect(self.EFF_DAZED) and rng.percent(eff.chance) and self:canBe("stun") then @@ -4381,9 +4381,9 @@ newEffect{ newEffect{ name = "BURNING_HEX", image = "talents/burning_hex.png", - desc = "Burning Hex", + desc = _t"Burning Hex", long_desc = function(self, eff) return ("The target is hexed. Each time it uses an ability it takes %0.2f fire damage, and talent cooldowns are increased by %s plus 1 turn."): - format(eff.dam, eff.power and ("%d%%"):format((eff.power-1)*100) or "") + tformat(eff.dam, eff.power and ("%d%%"):tformat((eff.power-1)*100) or "") end, charges = function(self, eff) return (tostring(math.floor((eff.power-1)*100)).."%") end, type = "magical", @@ -4391,21 +4391,21 @@ newEffect{ status = "detrimental", -- _M:getTalentCooldown(t) in mod.class.Actor.lua references this table to compute cooldowns parameters = {dam=10, power = 1}, - on_gain = function(self, err) return "#Target# is hexed!", "+Burning Hex" end, - on_lose = function(self, err) return "#Target# is free from the hex.", "-Burning Hex" end, + on_gain = function(self, err) return _t"#Target# is hexed!", _t"+Burning Hex" end, + on_lose = function(self, err) return _t"#Target# is free from the hex.", _t"-Burning Hex" end, } newEffect{ name = "EMPATHIC_HEX", image = "talents/empathic_hex.png", - desc = "Empathic Hex", - long_desc = function(self, eff) return ("The target is hexed, creating an empathic bond with its victims. It takes %d%% feedback damage from all damage done."):format(eff.power) end, + desc = _t"Empathic Hex", + long_desc = function(self, eff) return ("The target is hexed, creating an empathic bond with its victims. It takes %d%% feedback damage from all damage done."):tformat(eff.power) end, charges = function(self, eff) return (tostring(math.floor(eff.power)).."%") end, type = "magical", subtype = { hex=true, dominate=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is hexed.", "+Empathic Hex" end, - on_lose = function(self, err) return "#Target# is free from the hex.", "-Empathic hex" end, + on_gain = function(self, err) return _t"#Target# is hexed.", _t"+Empathic Hex" end, + on_lose = function(self, err) return _t"#Target# is free from the hex.", _t"-Empathic hex" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("martyrdom", eff.power) if core.shader.active() then @@ -4420,14 +4420,14 @@ newEffect{ newEffect{ name = "DOMINATION_HEX", image = "talents/domination_hex.png", - desc = "Domination Hex", - long_desc = function(self, eff) return ("The target is hexed, temporarily changing its faction to %s."):format(engine.Faction.factions[eff.faction].name) end, + desc = _t"Domination Hex", + long_desc = function(self, eff) return ("The target is hexed, temporarily changing its faction to %s."):tformat(engine.Faction.factions[eff.faction].name) end, type = "magical", subtype = { hex=true, dominate=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is hexed.", "+Domination Hex" end, - on_lose = function(self, err) return "#Target# is free from the hex.", "-Domination hex" end, + on_gain = function(self, err) return _t"#Target# is hexed.", _t"+Domination Hex" end, + on_lose = function(self, err) return _t"#Target# is free from the hex.", _t"-Domination hex" end, activate = function(self, eff) self:setTarget() -- clear ai target eff.olf_faction = self.faction @@ -4445,13 +4445,13 @@ newEffect{ newEffect{ name = "SHADOWGUARD_IMMUNITY", image = "talents/shadowguard.png", - desc = "Shadowguard Immunity", - long_desc = function(self, eff) return "The target is immune to all detrimental effects." end, + desc = _t"Shadowguard Immunity", + long_desc = function(self, eff) return _t"The target is immune to all detrimental effects." end, type = "other", subtype = { shadow=true }, status = "beneficial", - on_gain = function(self, err) return "#Target#'s fades into the shadows.", "+Shadowguard" end, - on_lose = function(self, err) return "#Target#'s can be afflicted again.", "-Shadowguard" end, + on_gain = function(self, err) return _t"#Target#'s fades into the shadows.", _t"+Shadowguard" end, + on_lose = function(self, err) return _t"#Target#'s can be afflicted again.", _t"-Shadowguard" end, parameters = { }, activate = function(self, eff) self:effectTemporaryValue(eff, "negative_status_effect_immune", 1) @@ -4460,13 +4460,13 @@ newEffect{ newEffect{ name = "SHADOWGUARD_BUFF", image = "talents/shadowguard.png", - desc = "Shadowguard", - long_desc = function(self, eff) return ("The target is enveloped in shadows gaining %d spellpower and defense."):format(eff.spellpower) end, + desc = _t"Shadowguard", + long_desc = function(self, eff) return ("The target is enveloped in shadows gaining %d spellpower and defense."):tformat(eff.spellpower) end, type = "magical", subtype = { shadow=true }, status = "beneficial", - --on_gain = function(self, err) return "#Target#'s fades into the shadows.", "+Shadowguard" end, - on_lose = function(self, err) return "#Target#'s fully exits the shadows.", "-Shadowguard" end, + --on_gain = function(self, err) return _t"#Target#'s fades into the shadows.", _t"+Shadowguard" end, + on_lose = function(self, err) return _t"#Target#'s fully exits the shadows.", _t"-Shadowguard" end, parameters = { spellpower=0}, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_spellpower", eff.spellpower) @@ -4476,13 +4476,13 @@ newEffect{ newEffect{ name = "RETCHED", image = "talents/retch.png", - desc = "Retched", - long_desc = function(self, eff) return ("The target is walking in its own retch, negating the natural ghoul's speed penalty."):format() end, + desc = _t"Retched", + long_desc = function(self, eff) return ("The target is walking in its own retch, negating the natural ghoul's speed penalty."):tformat() end, type = "magical", subtype = { undead=true, speed=true }, status = "beneficial", - on_gain = function(self, err) return "#Target# speeds up in the retch.", "+Retched" end, - on_lose = function(self, err) return "#Target# speeds down outside of the retch.", "-Retched" end, + on_gain = function(self, err) return _t"#Target# speeds up in the retch.", _t"+Retched" end, + on_lose = function(self, err) return _t"#Target# speeds down outside of the retch.", _t"-Retched" end, parameters = { spellpower=0}, activate = function(self, eff) self:effectTemporaryValue(eff, "global_speed_add", 0.2) @@ -4491,14 +4491,14 @@ newEffect{ newEffect{ name = "SHADOW_CUT", image = "", - desc = "Shadow Cut", - long_desc = function(self, eff) return ("Huge shadow cut that bleeds, doing %0.2f darkness damage per turn. Anytime you hit it you get healed for %d."):format(eff.dam/5, eff.heal) end, + desc = _t"Shadow Cut", + long_desc = function(self, eff) return ("Huge shadow cut that bleeds, doing %0.2f darkness damage per turn. Anytime you hit it you get healed for %d."):tformat(eff.dam/5, eff.heal) end, type = "magical", subtype = { wound=true, cut=true, bleed=true, darkness=true }, status = "detrimental", parameters = { dam=1, heal=1 }, - on_gain = function(self, err) return "#Target# starts to bleed darkness.", "+Shadow Cut" end, - on_lose = function(self, err) return "#Target# stops bleeding darkness.", "-Shadow Cut" end, + on_gain = function(self, err) return _t"#Target# starts to bleed darkness.", _t"+Shadow Cut" end, + on_lose = function(self, err) return _t"#Target# stops bleeding darkness.", _t"-Shadow Cut" end, callbackOnMeleeHit = function(self, eff, src, dam) if not dam or dam <= 0 or src ~= eff.src then return end @@ -4523,14 +4523,14 @@ newEffect{ newEffect{ name = "GLYPH_OF_MOONLIGHT", image = "trap/trap_glyph_fatigue_01_64.png", - desc = "Draining Moonlight", - long_desc = function(self, eff) return ("The target has been drained by a glyph, all damage it does is reduced by %d%%."):format(eff.reduce) end, + desc = _t"Draining Moonlight", + long_desc = function(self, eff) return ("The target has been drained by a glyph, all damage it does is reduced by %d%%."):tformat(eff.reduce) end, type = "magical", subtype = { darkness=true,}, status = "detrimental", parameters = {reduce=5}, - on_gain = function(self, err) return "#Target# is weakened by the glyph of moonlight!", "+Draining Moonlight" end, - on_lose = function(self, err) return "#Target# looks shakes off the effect of the glyph of moonlight.", "-Draining Moonlight" end, + on_gain = function(self, err) return _t"#Target# is weakened by the glyph of moonlight!", _t"+Draining Moonlight" end, + on_lose = function(self, err) return _t"#Target# looks shakes off the effect of the glyph of moonlight.", _t"-Draining Moonlight" end, activate = function(self, eff) self:effectTemporaryValue(eff, "numbed", eff.reduce) end, @@ -4540,8 +4540,8 @@ newEffect{ newEffect{ name = "AUGER_OF_DESTRUCTION", image = "talents/dig.png", - desc = "Auger of Destruction", - long_desc = function(self, eff) return ("Physical damage increased by %d%%."):format(eff.power) end, + desc = _t"Auger of Destruction", + long_desc = function(self, eff) return ("Physical damage increased by %d%%."):tformat(eff.power) end, type = "magical", subtype = { physical=true,}, status = "beneficial", diff --git a/game/modules/tome/data/timed_effects/mental.lua b/game/modules/tome/data/timed_effects/mental.lua index 91bcb24d93514815e8012e09c650f704ce5fcdba..d5833c77297c81fc4f6cca92fb0f1225260b3ce4 100644 --- a/game/modules/tome/data/timed_effects/mental.lua +++ b/game/modules/tome/data/timed_effects/mental.lua @@ -28,15 +28,15 @@ local Astar = require "engine.Astar" -- Item specific newEffect{ name = "ITEM_EXPOSED", image = "talents/curse_of_the_meek.png", -- Re-used icon - desc = "Exposed", - long_desc = function(self, eff) return ("Mind and body exposed to effects and attacks, reducing all saves and defense by %d."):format(eff.reduce) end, + desc = _t"Exposed", + long_desc = function(self, eff) return ("Mind and body exposed to effects and attacks, reducing all saves and defense by %d."):tformat(eff.reduce) end, charges = function(self, eff) return (tostring(math.floor(eff.reduce))) end, type = "mental", subtype = { }, status = "detrimental", parameters = {reduce=0}, - on_gain = function(self, err) return "#Target#'s is vulnerable to attacks and effects!" end, - on_lose = function(self, err) return "#Target# is less vulnerable." end, + on_gain = function(self, err) return _t"#Target#'s is vulnerable to attacks and effects!" end, + on_lose = function(self, err) return _t"#Target# is less vulnerable." end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_physresist", -eff.reduce) self:effectTemporaryValue(eff, "combat_spellresist", -eff.reduce) @@ -50,15 +50,15 @@ newEffect{ newEffect{ name = "ITEM_NUMBING_DARKNESS", image = "effects/bane_blinded.png", - desc = "Numbing Darkness", - long_desc = function(self, eff) return ("The target is losing hope, all damage it does is reduced by %d%%."):format(eff.reduce) end, + desc = _t"Numbing Darkness", + long_desc = function(self, eff) return ("The target is losing hope, all damage it does is reduced by %d%%."):tformat(eff.reduce) end, charges = function(self, eff) return (tostring(math.floor(eff.reduce))) end, type = "mental", subtype = { darkness=true,}, no_ct_effect = true, status = "detrimental", parameters = {power=10, reduce=5}, - on_gain = function(self, err) return "#Target# is weakened by the darkness!", "+Numbing Darkness" end, - on_lose = function(self, err) return "#Target# regains their energy.", "-Numbing Darkness" end, + on_gain = function(self, err) return _t"#Target# is weakened by the darkness!", _t"+Numbing Darkness" end, + on_lose = function(self, err) return _t"#Target# regains their energy.", _t"-Numbing Darkness" end, on_timeout = function(self, eff) end, @@ -72,14 +72,14 @@ newEffect{ newEffect{ name = "SILENCED", image = "effects/silenced.png", - desc = "Silenced", - long_desc = function(self, eff) return "The target is silenced, preventing it from casting spells and using some vocal talents." end, + desc = _t"Silenced", + long_desc = function(self, eff) return _t"The target is silenced, preventing it from casting spells and using some vocal talents." end, type = "mental", subtype = { silence=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is silenced!", "+Silenced" end, - on_lose = function(self, err) return "#Target# is not silenced anymore.", "-Silenced" end, + on_gain = function(self, err) return _t"#Target# is silenced!", _t"+Silenced" end, + on_lose = function(self, err) return _t"#Target# is not silenced anymore.", _t"-Silenced" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("silence", 1) end, @@ -90,14 +90,14 @@ newEffect{ newEffect{ name = "SUMMON_CONTROL", image = "talents/summon_control.png", --Backwards compatibility - desc = "Pheromones", - long_desc = function(self, eff) return ("The target has been marked as the focus for all nature summons within %d radius, receiving %d%% increased damage from nature summons."):format(eff.range, eff.power) end, + desc = _t"Pheromones", + long_desc = function(self, eff) return ("The target has been marked as the focus for all nature summons within %d radius, receiving %d%% increased damage from nature summons."):tformat(eff.range, eff.power) end, type = "mental", subtype = { focus=true }, status = "detrimental", parameters = { power = 10 }, - on_gain = function(self, err) return "Summons flock towards #Target#.", true end, - on_lose = function(self, err) return "#Target# is no longer being targeted by summons.", true end, + on_gain = function(self, err) return _t"Summons flock towards #Target#.", true end, + on_lose = function(self, err) return _t"#Target# is no longer being targeted by summons.", true end, on_timeout = function(self, eff) self:project({type="ball", range=0, friendlyfire=false, radius=eff.range}, self.x, self.y, function(px, py) local target = game.level.map(px, py, Map.ACTOR) @@ -124,15 +124,15 @@ newEffect{ newEffect{ name = "CONFUSED", image = "effects/confused.png", - desc = "Confused", - long_desc = function(self, eff) return ("The target is confused, acting randomly (chance %d%%) and unable to perform complex actions."):format(eff.power) end, + desc = _t"Confused", + long_desc = function(self, eff) return ("The target is confused, acting randomly (chance %d%%) and unable to perform complex actions."):tformat(eff.power) end, charges = function(self, eff) return (tostring(math.floor(eff.power)).."%") end, type = "mental", subtype = { confusion=true }, status = "detrimental", parameters = { power=30 }, - on_gain = function(self, err) return "#Target# wanders around!.", "+Confused" end, - on_lose = function(self, err) return "#Target# seems more focused.", "-Confused" end, + on_gain = function(self, err) return _t"#Target# wanders around!.", _t"+Confused" end, + on_lose = function(self, err) return _t"#Target# seems more focused.", _t"-Confused" end, activate = function(self, eff) eff.power = math.floor(util.bound(eff.power, 0, 50)) eff.tmpid = self:addTemporaryValue("confused", eff.power) @@ -146,13 +146,13 @@ newEffect{ newEffect{ name = "DOMINANT_WILL", image = "talents/yeek_will.png", - desc = "Mental Domination", - long_desc = function(self, eff) return ("The target's mind has been shattered. Its body remains as a thrall to %s."):format(eff.src.name:capitalize()) end, + desc = _t"Mental Domination", + long_desc = function(self, eff) return ("The target's mind has been shattered. Its body remains as a thrall to %s."):tformat(eff.src:getName():capitalize()) end, type = "mental", subtype = { dominate=true }, status = "detrimental", parameters = { }, - on_gain = function(self, err) return "#Target#'s mind is shattered." end, + on_gain = function(self, err) return _t"#Target#'s mind is shattered." end, activate = function(self, eff) eff.pid = self:addTemporaryValue("inc_damage", {all=-15}) self.ai_state = self.ai_state or {} @@ -179,7 +179,7 @@ newEffect{ game.party:addMember(self, { control="full", type="thrall", - title="Thrall", + title=_t"Thrall", orders = {leash=true, follow=true}, on_control = function(self) self:hotkeyAutoTalents() @@ -209,9 +209,9 @@ newEffect{ end, deactivate = function(self, eff) if eff.survive_domination then - game.logSeen(self, "%s's mind recovers from the domination.",self.name:capitalize()) + game.logSeen(self, "%s's mind recovers from the domination.",self:getName():capitalize()) else - game.logSeen(self, "%s collapses.",self.name:capitalize()) + game.logSeen(self, "%s collapses.",self:getName():capitalize()) self:die(eff.src) end end, @@ -219,14 +219,14 @@ newEffect{ newEffect{ name = "DOMINANT_WILL_BOSS", image = "talents/yeek_will.png", - desc = "Mental Domination", - long_desc = function(self, eff) return ("The target's mind has been shaken. It is temporarily aligned with %s and immune to all damage."):format(eff.src.name:capitalize()) end, + desc = _t"Mental Domination", + long_desc = function(self, eff) return ("The target's mind has been shaken. It is temporarily aligned with %s and immune to all damage."):tformat(eff.src:getName():capitalize()) end, type = "mental", subtype = { dominate=true }, status = "detrimental", parameters = { }, - on_gain = function(self, err) return "#Target#'s mind is dominated.", "+Dominant Will" end, - on_lose = function(self, err) return "#Target# is free from the domination.", "-Dominant Will" end, + on_gain = function(self, err) return _t"#Target#'s mind is dominated.", _t"+Dominant Will" end, + on_lose = function(self, err) return _t"#Target# is free from the domination.", "-Dominant Will" end, activate = function(self, eff) self:setTarget() -- clear ai target eff.old_faction = self.faction @@ -244,8 +244,8 @@ newEffect{ newEffect{ name = "BATTLE_SHOUT", image = "talents/battle_shout.png", - desc = "Battle Shout", - long_desc = function(self, eff) return ("Increases maximum life and stamina by %d%%. When the effect ends, the extra life and stamina will be lost."):format(eff.power) end, + desc = _t"Battle Shout", + long_desc = function(self, eff) return ("Increases maximum life and stamina by %d%%. When the effect ends, the extra life and stamina will be lost."):tformat(eff.power) end, type = "mental", subtype = { morale=true }, status = "beneficial", @@ -269,14 +269,14 @@ newEffect{ newEffect{ name = "BATTLE_CRY", image = "talents/battle_cry.png", - desc = "Battle Cry", - long_desc = function(self, eff) return ("The target's will to defend itself is shattered by the powerful battle cry, reducing defense by %d."):format(eff.power) end, + desc = _t"Battle Cry", + long_desc = function(self, eff) return ("The target's will to defend itself is shattered by the powerful battle cry, reducing defense by %d."):tformat(eff.power) end, type = "mental", subtype = { morale=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target#'s will is shattered.", "+Battle Cry" end, - on_lose = function(self, err) return "#Target# regains some of its will.", "-Battle Cry" end, + on_gain = function(self, err) return _t"#Target#'s will is shattered.", _t"+Battle Cry" end, + on_lose = function(self, err) return _t"#Target# regains some of its will.", _t"-Battle Cry" end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_def", -eff.power) self:effectTemporaryValue(eff, "no_evasion", 1) @@ -286,14 +286,14 @@ newEffect{ newEffect{ name = "WILLFUL_COMBAT", image = "talents/willful_combat.png", - desc = "Willful Combat", - long_desc = function(self, eff) return ("The target puts all its willpower into its blows, improving physical power by %d."):format(eff.power) end, + desc = _t"Willful Combat", + long_desc = function(self, eff) return ("The target puts all its willpower into its blows, improving physical power by %d."):tformat(eff.power) end, type = "mental", subtype = { focus=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# lashes out with pure willpower." end, - on_lose = function(self, err) return "#Target#'s willpower rush ends." end, + on_gain = function(self, err) return _t"#Target# lashes out with pure willpower." end, + on_lose = function(self, err) return _t"#Target#'s willpower rush ends." end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("combat_dam", eff.power) end, @@ -304,14 +304,14 @@ newEffect{ newEffect{ name = "GLOOM_WEAKNESS", image = "effects/gloom_weakness.png", - desc = "Gloom Weakness", - long_desc = function(self, eff) return ("The gloom reduces damage the target inflicts by %d%%."):format(eff.incDamageChange) end, + desc = _t"Gloom Weakness", + long_desc = function(self, eff) return ("The gloom reduces damage the target inflicts by %d%%."):tformat(eff.incDamageChange) end, type = "mental", subtype = { gloom=true }, status = "detrimental", parameters = { atk=10, dam=10 }, - on_gain = function(self, err) return "#F53CBE##Target# is weakened by the gloom." end, - on_lose = function(self, err) return "#F53CBE##Target# is no longer weakened." end, + on_gain = function(self, err) return _t"#F53CBE##Target# is weakened by the gloom." end, + on_lose = function(self, err) return _t"#F53CBE##Target# is no longer weakened." end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("gloom_weakness", 1)) eff.incDamageId = self:addTemporaryValue("inc_damage", {all = -eff.incDamageChange}) @@ -324,14 +324,14 @@ newEffect{ newEffect{ name = "GLOOM_SLOW", image = "effects/gloom_slow.png", - desc = "Slowed by the gloom", - long_desc = function(self, eff) return ("The gloom reduces the target's global speed by %d%%."):format(eff.power * 100) end, + desc = _t"Slowed by the gloom", + long_desc = function(self, eff) return ("The gloom reduces the target's global speed by %d%%."):tformat(eff.power * 100) end, type = "mental", subtype = { gloom=true, slow=true }, status = "detrimental", parameters = { power=0.1 }, - on_gain = function(self, err) return "#F53CBE##Target# moves reluctantly!", "+Slow" end, - on_lose = function(self, err) return "#Target# overcomes the gloom.", "-Slow" end, + on_gain = function(self, err) return _t"#F53CBE##Target# moves reluctantly!", _t"+Slow" end, + on_lose = function(self, err) return _t"#Target# overcomes the gloom.", _t"-Slow" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("gloom_slow", 1)) eff.tmpid = self:addTemporaryValue("global_speed_add", -eff.power) @@ -344,14 +344,14 @@ newEffect{ newEffect{ name = "GLOOM_STUNNED", image = "effects/gloom_stunned.png", - desc = "Stunned by the gloom", - long_desc = function(self, eff) return ("The gloom has stunned the target, reducing damage by 50%%, putting 4 random talents on cooldown and reducing movement speed by 50%%. While stunned talents cooldown twice as slow."):format() end, + desc = _t"Stunned by the gloom", + long_desc = function(self, eff) return ("The gloom has stunned the target, reducing damage by 50%%, putting 4 random talents on cooldown and reducing movement speed by 50%%. While stunned talents cooldown twice as slow."):tformat() end, type = "mental", subtype = { gloom=true, stun=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#F53CBE##Target# is stunned with fear!", "+Stunned" end, - on_lose = function(self, err) return "#Target# overcomes the gloom", "-Stunned" end, + on_gain = function(self, err) return _t"#F53CBE##Target# is stunned with fear!", _t"+Stunned" end, + on_lose = function(self, err) return _t"#Target# overcomes the gloom", _t"-Stunned" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("gloom_stunned", 1)) eff.tmpid = self:addTemporaryValue("stunned", 1) @@ -378,15 +378,15 @@ newEffect{ newEffect{ name = "GLOOM_CONFUSED", image = "effects/gloom_confused.png", - desc = "Confused by the gloom", - long_desc = function(self, eff) return ("The gloom has confused the target, making it act randomly (%d%% chance) and unable to perform complex actions."):format(eff.power) end, + desc = _t"Confused by the gloom", + long_desc = function(self, eff) return ("The gloom has confused the target, making it act randomly (%d%% chance) and unable to perform complex actions."):tformat(eff.power) end, type = "mental", charges = function(self, eff) return (tostring(eff.power).."%") end, subtype = { gloom=true, confusion=true }, status = "detrimental", parameters = { power = 10 }, - on_gain = function(self, err) return "#F53CBE##Target# is lost in despair!", "+Confused" end, - on_lose = function(self, err) return "#Target# overcomes the gloom", "-Confused" end, + on_gain = function(self, err) return _t"#F53CBE##Target# is lost in despair!", _t"+Confused" end, + on_lose = function(self, err) return _t"#Target# overcomes the gloom", _t"-Confused" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("gloom_confused", 1)) eff.power = math.floor(util.bound(eff.power, 0, 50)) @@ -402,14 +402,14 @@ newEffect{ newEffect{ name = "DISMAYED", image = "talents/dismay.png", - desc = "Dismayed", - long_desc = function(self, eff) return ("The target is dismayed. The next melee attack against the target will be a guaranteed critical hit.") end, + desc = _t"Dismayed", + long_desc = function(self, eff) return (_t"The target is dismayed. The next melee attack against the target will be a guaranteed critical hit.") end, type = "mental", subtype = { gloom=true, confusion=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#F53CBE##Target# is dismayed!", "+Dismayed" end, - on_lose = function(self, err) return "#Target# overcomes the dismay", "-Dismayed" end, + on_gain = function(self, err) return _t"#F53CBE##Target# is dismayed!", _t"+Dismayed" end, + on_lose = function(self, err) return _t"#Target# overcomes the dismay", _t"-Dismayed" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("dismayed", 1)) end, @@ -420,17 +420,17 @@ newEffect{ newEffect{ name = "STALKER", image = "talents/stalk.png", - desc = "Stalking", + desc = _t"Stalking", display_desc = function(self, eff) - return ([[Stalking %d/%d +%d ]]):format(eff.target.life, eff.target.max_life, eff.bonus) + return ([[Stalking %d/%d +%d ]]):tformat(eff.target.life, eff.target.max_life, eff.bonus) end, long_desc = function(self, eff) local t = self:getTalentFromId(self.T_STALK) local effStalked = eff.target:hasEffect(eff.target.EFF_STALKED) - local desc = ([[Stalking %s. Bonus level %d: +%d accuracy, +%d%% melee damage, +%0.2f hate/turn prey was hit.]]):format( + local desc = ([[Stalking %s. Bonus level %d: +%d accuracy, +%d%% melee damage, +%0.2f hate/turn prey was hit.]]):tformat( eff.target.name, eff.bonus, t.getAttackChange(self, t, eff.bonus), t.getStalkedDamageMultiplier(self, t, eff.bonus) * 100 - 100, t.getHitHateChange(self, t, eff.bonus)) if effStalked and effStalked.damageChange and effStalked.damageChange > 0 then - desc = desc..("Prey damage modifier: %d%%."):format(effStalked.damageChange) + desc = desc..("Prey damage modifier: %d%%."):tformat(effStalked.damageChange) end return desc end, @@ -453,15 +453,15 @@ newEffect{ newEffect{ name = "STALKED", image = "effects/stalked.png", - desc = "Stalked", + desc = _t"Stalked", long_desc = function(self, eff) local effStalker = eff.src:hasEffect(eff.src.EFF_STALKER) - if not effStalker then return "Being stalked." end + if not effStalker then return _t"Being stalked." end local t = self:getTalentFromId(eff.src.T_STALK) - local desc = ([[Being stalked by %s. Stalker bonus level %d: +%d accuracy, +%d%% melee damage, +%0.2f hate/turn prey was hit.]]):format( - eff.src.name, effStalker.bonus, t.getAttackChange(eff.src, t, effStalker.bonus), t.getStalkedDamageMultiplier(eff.src, t, effStalker.bonus) * 100 - 100, t.getHitHateChange(eff.src, t, effStalker.bonus)) + local desc = ([[Being stalked by %s. Stalker bonus level %d: +%d accuracy, +%d%% melee damage, +%0.2f hate/turn prey was hit.]]):tformat( + eff.src:getName(), effStalker.bonus, t.getAttackChange(eff.src, t, effStalker.bonus), t.getStalkedDamageMultiplier(eff.src, t, effStalker.bonus) * 100 - 100, t.getHitHateChange(eff.src, t, effStalker.bonus)) if eff.damageChange and eff.damageChange > 0 then - desc = desc..(" Prey damage modifier: %d%%."):format(eff.damageChange) + desc = desc..(" Prey damage modifier: %d%%."):tformat(eff.damageChange) end return desc end, @@ -504,11 +504,11 @@ newEffect{ newEffect{ name = "BECKONED", image = "talents/beckon.png", - desc = "Beckoned", + desc = _t"Beckoned", long_desc = function(self, eff) - local message = ("The target has been beckoned by %s and is heeding the call. There is a %d%% chance of moving towards the beckoner each turn."):format(eff.src.name, eff.chance) + local message = ("The target has been beckoned by %s and is heeding the call. There is a %d%% chance of moving towards the beckoner each turn."):tformat(eff.src:getName(), eff.chance) if eff.spellpowerChangeId and eff.mindpowerChangeId then - message = message..(" (spellpower: %d, mindpower: %d"):format(eff.spellpowerChange, eff.mindpowerChange) + message = message..(" (spellpower: %d, mindpower: %d"):tformat(eff.spellpowerChange, eff.mindpowerChange) end return message end, @@ -516,8 +516,8 @@ newEffect{ subtype = { dominate=true }, status = "detrimental", parameters = { speedChange=0.5 }, - on_gain = function(self, err) return "#Target# has been beckoned.", "+Beckoned" end, - on_lose = function(self, err) return "#Target# is no longer beckoned.", "-Beckoned" end, + on_gain = function(self, err) return _t"#Target# has been beckoned.", _t"+Beckoned" end, + on_lose = function(self, err) return _t"#Target# is no longer beckoned.", _t"-Beckoned" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("beckoned", 1)) @@ -551,7 +551,7 @@ newEffect{ end if not self:checkHit(eff.src:combatMindpower(), self:combatMentalResist(), 0, 95, 5) then eff.timer = eff.timer + eff.chance * 0.5 - game.logSeen(self, "#F53CBE#%s struggles against the beckoning.", self.name:capitalize()) + game.logSeen(self, "#F53CBE#%s struggles against the beckoning.", self:getName():capitalize()) else eff.timer = eff.timer + eff.chance end @@ -609,7 +609,7 @@ newEffect{ do_onTakeHit = function(self, eff, dam) eff.resistChance = (eff.resistChance or 0) + math.min(100, math.max(0, dam / self.max_life * 100)) if rng.percent(eff.resistChance) then - game.logSeen(self, "#F53CBE#%s is jolted to attention by the damage and is no longer being beckoned.", self.name:capitalize()) + game.logSeen(self, "#F53CBE#%s is jolted to attention by the damage and is no longer being beckoned.", self:getName():capitalize()) self:removeEffect(self.EFF_BECKONED) end @@ -619,14 +619,14 @@ newEffect{ newEffect{ name = "OVERWHELMED", image = "talents/frenzy.png", - desc = "Overwhelmed", - long_desc = function(self, eff) return ("The target has been overwhemed by a furious assault, reducing defence by %d."):format( -eff.defenseChange) end, + desc = _t"Overwhelmed", + long_desc = function(self, eff) return ("The target has been overwhemed by a furious assault, reducing defence by %d."):tformat( -eff.defenseChange) end, type = "mental", subtype = { fear=true }, status = "detrimental", parameters = { damageChange=0.1 }, - on_gain = function(self, err) return "#Target# has been overwhelmed.", "+Overwhelmed" end, - on_lose = function(self, err) return "#Target# is no longer overwhelmed.", "-Overwhelmed" end, + on_gain = function(self, err) return _t"#Target# has been overwhelmed.", _t"+Overwhelmed" end, + on_lose = function(self, err) return _t"#Target# is no longer overwhelmed.", _t"-Overwhelmed" end, parameters = { chance=5 }, activate = function(self, eff) eff.defenseChangeId = self:addTemporaryValue("combat_def", -eff.defenseChange) @@ -641,14 +641,14 @@ newEffect{ newEffect{ name = "CURSED_MIASMA", image = "talents/savage_hunter.png", - desc = "Cursed Miasma", - long_desc = function(self, eff) return ("The target is enveloped in a cursed miasma."):format(eff.sight) end, + desc = _t"Cursed Miasma", + long_desc = function(self, eff) return ("The target is enveloped in a cursed miasma."):tformat(eff.sight) end, type = "mental", subtype = { fear=true }, status = "detrimental", parameters = { chance=5 }, - on_gain = function(self, err) return "#Target# is surrounded by a cursed miasma.", "+Cursed Miasma" end, - on_lose = function(self, err) return "The cursed miasma around #target# dissipates.", "-Cursed Miasma" end, + on_gain = function(self, err) return _t"#Target# is surrounded by a cursed miasma.", _t"+Cursed Miasma" end, + on_lose = function(self, err) return _t"The cursed miasma around #target# dissipates.", _t"-Cursed Miasma" end, activate = function(self, eff) self:setTarget(nil) -- Reset target to grab a random new one self:effectTemporaryValue(eff, "hates_everybody", 1) @@ -662,14 +662,14 @@ newEffect{ newEffect{ name = "HARASSED", image = "talents/harass_prey.png", - desc = "Harassed", - long_desc = function(self, eff) return ("The target has been harassed by its stalker, reducing damage by %d%%."):format( -eff.damageChange) end, + desc = _t"Harassed", + long_desc = function(self, eff) return ("The target has been harassed by its stalker, reducing damage by %d%%."):tformat( -eff.damageChange) end, type = "mental", subtype = { fear=true }, status = "detrimental", parameters = { damageChange=0.1 }, - on_gain = function(self, err) return "#Target# has been harassed.", "+Harassed" end, - on_lose = function(self, err) return "#Target# is no longer harassed.", "-Harassed" end, + on_gain = function(self, err) return _t"#Target# has been harassed.", _t"+Harassed" end, + on_lose = function(self, err) return _t"#Target# is no longer harassed.", _t"-Harassed" end, activate = function(self, eff) eff.damageChangeId = self:addTemporaryValue("inc_damage", {all=eff.damageChange}) eff.particle = self:addParticles(Particles.new("harassed", 1)) @@ -682,13 +682,13 @@ newEffect{ newEffect{ name = "DOMINATED", image = "talents/dominate.png", - desc = "Dominated", - long_desc = function(self, eff) return ("The target has been dominated. It is unable to move and has lost %d armor and %d defense. Attacks from %s gain %d%% damage penetration."):format(-eff.armorChange, -eff.defenseChange, eff.src.name:capitalize(), eff.resistPenetration) end, + desc = _t"Dominated", + long_desc = function(self, eff) return ("The target has been dominated. It is unable to move and has lost %d armor and %d defense. Attacks from %s gain %d%% damage penetration."):tformat(-eff.armorChange, -eff.defenseChange, eff.src:getName():capitalize(), eff.resistPenetration) end, type = "mental", subtype = { dominate=true }, status = "detrimental", - on_gain = function(self, err) return "#F53CBE##Target# has been dominated!", "+Dominated" end, - on_lose = function(self, err) return "#F53CBE##Target# is no longer dominated.", "-Dominated" end, + on_gain = function(self, err) return _t"#F53CBE##Target# has been dominated!", _t"+Dominated" end, + on_lose = function(self, err) return _t"#F53CBE##Target# is no longer dominated.", _t"-Dominated" end, parameters = { armorChange = -3, defenseChange = -3, physicalResistChange = -0.1 }, activate = function(self, eff) eff.neverMoveId = self:addTemporaryValue("never_move", 1) @@ -708,14 +708,14 @@ newEffect{ newEffect{ name = "AGONY", image = "talents/agony.png", - desc = "Agony", - long_desc = function(self, eff) return ("%s is writhing in agony, suffering from %d to %d damage over %d turns."):format(self.name:capitalize(), eff.damage / eff.duration, eff.damage, eff.duration) end, + desc = _t"Agony", + long_desc = function(self, eff) return ("%s is writhing in agony, suffering from %d to %d damage over %d turns."):tformat(self:getName():capitalize(), eff.damage / eff.duration, eff.damage, eff.duration) end, type = "mental", subtype = { pain=true, psionic=true }, status = "detrimental", parameters = { damage=10, mindpower=10, range=10, minPercent=10 }, - on_gain = function(self, err) return "#Target# is writhing in agony!", "+Agony" end, - on_lose = function(self, err) return "#Target# is no longer writhing in agony.", "-Agony" end, + on_gain = function(self, err) return _t"#Target# is writhing in agony!", _t"+Agony" end, + on_lose = function(self, err) return _t"#Target# is no longer writhing in agony.", _t"-Agony" end, activate = function(self, eff) eff.power = 0 end, @@ -744,14 +744,14 @@ newEffect{ newEffect{ name = "HATEFUL_WHISPER", image = "talents/hateful_whisper.png", - desc = "Hateful Whisper", - long_desc = function(self, eff) return ("%s has heard the hateful whisper."):format(self.name:capitalize()) end, + desc = _t"Hateful Whisper", + long_desc = function(self, eff) return ("%s has heard the hateful whisper."):tformat(self:getName():capitalize()) end, type = "mental", subtype = { madness=true, psionic=true }, status = "detrimental", parameters = { }, - on_gain = function(self, err) return "#Target# has heard the hateful whisper!", "+Hateful Whisper" end, - on_lose = function(self, err) return "#Target# no longer hears the hateful whisper.", "-Hateful Whisper" end, + on_gain = function(self, err) return _t"#Target# has heard the hateful whisper!", _t"+Hateful Whisper" end, + on_lose = function(self, err) return _t"#Target# no longer hears the hateful whisper.", _t"-Hateful Whisper" end, activate = function(self, eff) if not eff.src.dead and eff.src:knowTalent(eff.src.T_HATE_POOL) then eff.src:incHate(eff.hateGain) @@ -830,14 +830,14 @@ newEffect{ newEffect{ name = "MADNESS_SLOW", image = "effects/madness_slowed.png", - desc = "Slowed by madness", - long_desc = function(self, eff) return ("Madness reduces the target's global speed by %d%% and lowers mind resistance by %d%%."):format(eff.power * 100, -eff.mindResistChange) end, + desc = _t"Slowed by madness", + long_desc = function(self, eff) return ("Madness reduces the target's global speed by %d%% and lowers mind resistance by %d%%."):tformat(eff.power * 100, -eff.mindResistChange) end, type = "mental", subtype = { madness=true, slow=true }, status = "detrimental", parameters = { power=0.1 }, - on_gain = function(self, err) return "#F53CBE##Target# slows in the grip of madness!", "+Slow" end, - on_lose = function(self, err) return "#Target# overcomes the madness.", "-Slow" end, + on_gain = function(self, err) return _t"#F53CBE##Target# slows in the grip of madness!", _t"+Slow" end, + on_lose = function(self, err) return _t"#Target# overcomes the madness.", _t"-Slow" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("gloom_slow", 1)) eff.mindResistChangeId = self:addTemporaryValue("resists", { [DamageType.MIND]=eff.mindResistChange }) @@ -852,14 +852,14 @@ newEffect{ newEffect{ name = "MADNESS_STUNNED", image = "effects/madness_stunned.png", - desc = "Stunned by madness", - long_desc = function(self, eff) return ("Madness has stunned the target, reducing damage by 50%%, lowering mind resistance by %d%%, putting 4 random talents on cooldown and reducing movement speed by 50%%. While stunned talents cooldown twice as slow."):format(eff.mindResistChange) end, + desc = _t"Stunned by madness", + long_desc = function(self, eff) return ("Madness has stunned the target, reducing damage by 50%%, lowering mind resistance by %d%%, putting 4 random talents on cooldown and reducing movement speed by 50%%. While stunned talents cooldown twice as slow."):tformat(eff.mindResistChange) end, type = "mental", subtype = { madness=true, stun=true }, status = "detrimental", parameters = {mindResistChange = -10}, - on_gain = function(self, err) return "#F53CBE##Target# is stunned by madness!", "+Stunned" end, - on_lose = function(self, err) return "#Target# overcomes the madness", "-Stunned" end, + on_gain = function(self, err) return _t"#F53CBE##Target# is stunned by madness!", _t"+Stunned" end, + on_lose = function(self, err) return _t"#Target# overcomes the madness", _t"-Stunned" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("gloom_stunned", 1)) @@ -891,15 +891,15 @@ newEffect{ newEffect{ name = "MADNESS_CONFUSED", image = "effects/madness_confused.png", - desc = "Confused by madness", - long_desc = function(self, eff) return ("Madness has confused the target, lowering mind resistance by %d%% and making it act randomly (%d%% chance)"):format(eff.mindResistChange, eff.power) end, + desc = _t"Confused by madness", + long_desc = function(self, eff) return ("Madness has confused the target, lowering mind resistance by %d%% and making it act randomly (%d%% chance)"):tformat(eff.mindResistChange, eff.power) end, type = "mental", subtype = { madness=true, confusion=true, power=50 }, status = "detrimental", charges = function(self, eff) return (tostring(eff.power).."%") end, parameters = { power=10 }, - on_gain = function(self, err) return "#F53CBE##Target# is lost in madness!", "+Confused" end, - on_lose = function(self, err) return "#Target# overcomes the madness", "-Confused" end, + on_gain = function(self, err) return _t"#F53CBE##Target# is lost in madness!", _t"+Confused" end, + on_lose = function(self, err) return _t"#Target# overcomes the madness", _t"-Confused" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("gloom_confused", 1)) eff.mindResistChangeId = self:addTemporaryValue("resists", { [DamageType.MIND]=eff.mindResistChange }) @@ -916,14 +916,14 @@ newEffect{ newEffect{ name = "MALIGNED", image = "talents/getsture_of_malice.png", - desc = "Maligned", - long_desc = function(self, eff) return ("The target is under a malign influence. All resists have been lowered by %d%%."):format(-eff.resistAllChange) end, + desc = _t"Maligned", + long_desc = function(self, eff) return ("The target is under a malign influence. All resists have been lowered by %d%%."):tformat(-eff.resistAllChange) end, type = "mental", subtype = { curse=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#F53CBE##Target# has been maligned!", "+Maligned" end, - on_lose = function(self, err) return "#Target# is no longer maligned", "-Maligned" end, + on_gain = function(self, err) return _t"#F53CBE##Target# has been maligned!", _t"+Maligned" end, + on_lose = function(self, err) return _t"#Target# is no longer maligned", _t"-Maligned" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("maligned", 1)) eff.resistAllChangeId = self:addTemporaryValue("resists", { all=eff.resistAllChange }) @@ -957,11 +957,11 @@ end newEffect{ name = "HEIGHTEN_FEAR", image = "talents/heighten_fear.png", - desc = "Heighten Fear", + desc = _t"Heighten Fear", long_desc = function(self, eff) return ("The target is in a state of growing fear. If they spend %d more turns within range %d and in sight of the source of this fear (%s), they will take %d mind and darkness damage and be subjected to a new fear."): - format(eff.turns_left, eff.range, eff.src.name, eff.damage) end, + tformat(eff.turns_left, eff.range, eff.src:getName(), eff.damage) end, type = "other", - charges = function(self, eff) return "#ORANGE#"..eff.turns_left.."#LAST#" end, + charges = function(self, eff) return _t"#ORANGE#"..eff.turns_left.."#LAST#" end, subtype = { }, status = "detrimental", cancel_on_level_change = true, @@ -975,12 +975,12 @@ newEffect{ if eff.turns_left <= 0 then eff.turns_left = eff.turns if rng.percent(eff.chance or 100) then - game.logSeen(self, "%s succumbs to heightening fears!", self.name:capitalize()) + game.logSeen(self, "%s succumbs to heightening fears!", self:getName():capitalize()) DamageType:get(DamageType.MIND).projector(eff.src, self.x, self.y, DamageType.MIND, { dam=eff.damage, crossTierChance=25 }) DamageType:get(DamageType.DARKNESS).projector(eff.src, self.x, self.y, DamageType.DARKNESS, eff.damage) tInstillFear.applyEffect(eff.src, tInstillFear, self, true) else - game.logSeen(self, "%s feels a little less afraid!", self.name:capitalize()) + game.logSeen(self, "%s feels a little less afraid!", self:getName():capitalize()) end end end, @@ -992,7 +992,7 @@ newEffect{ newEffect{ name = "Tyrant", image = "talents/tyrant.png", - desc = "Tyrant", + desc = _t"Tyrant", long_desc = function(self, eff) return ("Your tyranny is increasing your Mindpower and Physicalpower by 2 for each fear applied, for a total of %d"): format(eff.tyrantPower * eff.stacks) end, type = "mental", subtype = { }, @@ -1019,14 +1019,14 @@ newEffect{ newEffect{ name = "PARANOID", image = "effects/paranoid.png", - desc = "Paranoid", - long_desc = function(self, eff) return ("Paranoia has gripped the target, causing a %d%% chance they will physically attack anyone nearby, friend or foe. Targets of the attack may become paranoid themselves."):format(eff.attackChance) end, + desc = _t"Paranoid", + long_desc = function(self, eff) return ("Paranoia has gripped the target, causing a %d%% chance they will physically attack anyone nearby, friend or foe. Targets of the attack may become paranoid themselves."):tformat(eff.attackChance) end, type = "mental", subtype = { fear=true }, status = "detrimental", parameters = { tyrantDur=5, tyrantPower=2, maxStacks=7 }, - on_gain = function(self, err) return "#F53CBE##Target# becomes paranoid!", "+Paranoid" end, - on_lose = function(self, err) return "#Target# is no longer paranoid", "-Paranoid" end, + on_gain = function(self, err) return _t"#F53CBE##Target# becomes paranoid!", _t"+Paranoid" end, + on_lose = function(self, err) return _t"#Target# is no longer paranoid", _t"-Paranoid" end, activate = function(self, eff) --fear effect for each fear effect in mental.lua to give caster a buff if eff.src and eff.src.knowTalent and eff.src:knowTalent(eff.src.T_TYRANT) then @@ -1046,7 +1046,7 @@ newEffect{ end if not self:checkHit(eff.src:combatMindpower(), self:combatMentalResist(), 0, 95, 5) then eff.timer = eff.timer + eff.attackChance * 0.5 - game.logSeen(self, "#F53CBE#%s struggles against the paranoia.", self.name:capitalize()) + game.logSeen(self, "#F53CBE#%s struggles against the paranoia.", self:getName():capitalize()) else eff.timer = eff.timer + eff.attackChance end @@ -1063,9 +1063,9 @@ newEffect{ self:logCombat(target, "#F53CBE##Source# attacks #Target# in a fit of paranoia.") if self:attackTarget(target, nil, 1, false) and target ~= eff.src then if not target:canBe("fear") then - game.logSeen(target, "#F53CBE#%s ignores the fear!", target.name:capitalize()) + game.logSeen(target, "#F53CBE#%s ignores the fear!", target:getName():capitalize()) elseif not target:checkHit(eff.mindpower, target:combatMentalResist()) then - game.logSeen(target, "%s resists the fear!", target.name:capitalize()) + game.logSeen(target, "%s resists the fear!", target:getName():capitalize()) else target:setEffect(target.EFF_PARANOID, eff.duration, {src=eff.src, attackChance=eff.attackChance, mindpower=eff.mindpower, duration=eff.duration, tyrantDur = eff.tyrantDur, tyrantPower = eff.tyrantPower, maxStacks = eff.maxStacks }) end @@ -1080,15 +1080,15 @@ newEffect{ newEffect{ name = "DISPAIR", image = "effects/despair.png", - desc = "Despair", - long_desc = function(self, eff) return ("The target is in despair, reducing their armour, defence, mindsave and mind resist by %d."):format(-eff.statChange) end, + desc = _t"Despair", + long_desc = function(self, eff) return ("The target is in despair, reducing their armour, defence, mindsave and mind resist by %d."):tformat(-eff.statChange) end, charges = function(self, eff) return math.floor(-eff.statChange) end, type = "mental", subtype = { fear=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#F53CBE##Target# is in despair!", "+Despair" end, - on_lose = function(self, err) return "#Target# is no longer in despair", "-Despair" end, + on_gain = function(self, err) return _t"#F53CBE##Target# is in despair!", _t"+Despair" end, + on_lose = function(self, err) return _t"#Target# is no longer in despair", _t"-Despair" end, activate = function(self, eff) --fear effect for each fear effect in mental.lua to give caster a buff if eff.src and eff.src.knowTalent and eff.src:knowTalent(eff.src.T_TYRANT) then @@ -1111,15 +1111,15 @@ newEffect{ newEffect{ name = "TERRIFIED", image = "effects/terrified.png", - desc = "Terrified", - long_desc = function(self, eff) return ("The target is terrified taking %d mind and darkness damage per turn and increasing all their cooldowns by %d%%."):format(eff.damage, eff.cooldownPower * 100) end, + desc = _t"Terrified", + long_desc = function(self, eff) return ("The target is terrified taking %d mind and darkness damage per turn and increasing all their cooldowns by %d%%."):tformat(eff.damage, eff.cooldownPower * 100) end, type = "mental", subtype = { fear=true }, status = "detrimental", parameters = {}, charges = function(self, eff) return (tostring(math.floor(eff.cooldownPower * 100)).."%") end, - on_gain = function(self, err) return "#F53CBE##Target# becomes terrified!", "+Terrified" end, - on_lose = function(self, err) return "#Target# is no longer terrified", "-Terrified" end, + on_gain = function(self, err) return _t"#F53CBE##Target# becomes terrified!", _t"+Terrified" end, + on_lose = function(self, err) return _t"#Target# is no longer terrified", _t"-Terrified" end, activate = function(self, eff) --cooldown increase handled in class.actor.lua --fear effect for each fear effect in mental.lua to give caster a buff if eff.src and eff.src.knowTalent and eff.src:knowTalent(eff.src.T_TYRANT) then @@ -1140,14 +1140,14 @@ newEffect{ --[[ newEffect{ name = "DISTRESSED", image = "effects/distressed.png", - desc = "Distressed", - long_desc = function(self, eff) return ("The target is distressed, reducing all saves by %d."):format(-eff.saveChange) end, + desc = _t"Distressed", + long_desc = function(self, eff) return ("The target is distressed, reducing all saves by %d."):tformat(-eff.saveChange) end, type = "mental", subtype = { fear=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#F53CBE##Target# becomes distressed!", "+Distressed" end, - on_lose = function(self, err) return "#Target# is no longer distressed", "-Distressed" end, + on_gain = function(self, err) return _t"#F53CBE##Target# becomes distressed!", _t"+Distressed" end, + on_lose = function(self, err) return _t"#Target# is no longer distressed", _t"-Distressed" end, activate = function(self, eff) eff.physicalId = self:addTemporaryValue("combat_physresist", eff.saveChange) eff.mentalId = self:addTemporaryValue("combat_mentalresist", eff.saveChange) @@ -1168,15 +1168,15 @@ newEffect{ newEffect{ name = "HAUNTED", image = "effects/haunted.png", - desc = "Haunted", - long_desc = function(self, eff) return ("The target is haunted by a feeling of dread, causing each detrimental mental effect to inflict %d mind and darkness damage every turn."):format(eff.damage) end, --perhaps add total. + desc = _t"Haunted", + long_desc = function(self, eff) return ("The target is haunted by a feeling of dread, causing each detrimental mental effect to inflict %d mind and darkness damage every turn."):tformat(eff.damage) end, --perhaps add total. charges = function(self, eff) return (math.floor(eff.damage)) end, type = "mental", subtype = { fear=true }, status = "detrimental", parameters = {damage=10}, - on_gain = function(self, err) return "#F53CBE##Target# becomes haunted!", "+Haunted" end, - on_lose = function(self, err) return "#Target# is no longer haunted", "-Haunted" end, + on_gain = function(self, err) return _t"#F53CBE##Target# becomes haunted!", _t"+Haunted" end, + on_lose = function(self, err) return _t"#Target# is no longer haunted", _t"-Haunted" end, activate = function(self, eff) --fear effect for each fear effect in mental.lua to give caster a buff if eff.src and eff.src.knowTalent and eff.src:knowTalent(eff.src.T_TYRANT) then @@ -1210,14 +1210,14 @@ newEffect{ --[[ newEffect{ name = "TORMENTED", image = "effects/tormented.png", - desc = "Tormented", - long_desc = function(self, eff) return ("The target's mind is being tormented, causing %d apparitions to manifest and attack the target, inflicting %d mind damage each before disappearing."):format(eff.count, eff.damage) end, + desc = _t"Tormented", + long_desc = function(self, eff) return ("The target's mind is being tormented, causing %d apparitions to manifest and attack the target, inflicting %d mind damage each before disappearing."):tformat(eff.count, eff.damage) end, type = "mental", subtype = { fear=true }, status = "detrimental", parameters = {count=1, damage=10}, - on_gain = function(self, err) return "#F53CBE##Target# becomes tormented!", "+Tormented" end, - on_lose = function(self, err) return "#Target# is no longer tormented", "-Tormented" end, + on_gain = function(self, err) return _t"#F53CBE##Target# becomes tormented!", _t"+Tormented" end, + on_lose = function(self, err) return _t"#Target# is no longer tormented", _t"-Tormented" end, activate = function(self, eff) updateFearParticles(self) end, @@ -1231,7 +1231,7 @@ newEffect{ name = "tormentor", display = "h", color=colors.DARK_GREY, image="npc/horror_eldritch_nightmare_horror.png", blood_color = colors.BLACK, - desc = "A vision of terror that wracks the mind.", + desc = _t"A vision of terror that wracks the mind.", type = "horror", subtype = "eldritch", rank = 2, size_category = 2, @@ -1259,7 +1259,7 @@ newEffect{ if not target or target.dead then self:die() else - game.logSeen(self, "%s is tormented by a vision!", target.name:capitalize()) + game.logSeen(self, "%s is tormented by a vision!", target:getName():capitalize()) self:project({type="hit", x=target.x,y=target.y}, target.x, target.y, engine.DamageType.MIND, { dam=self.tormentedDamage,alwaysHit=true,crossTierChance=75 }) self:die() end @@ -1299,14 +1299,14 @@ newEffect{ newEffect{ name = "PANICKED", image = "talents/panic.png", - desc = "Panicked", - long_desc = function(self, eff) return ("The target has been panicked by %s, causing them to have a %d%% chance of fleeing in terror instead of acting."):format(eff.src.name, eff.chance) end, + desc = _t"Panicked", + long_desc = function(self, eff) return ("The target has been panicked by %s, causing them to have a %d%% chance of fleeing in terror instead of acting."):tformat(eff.src:getName(), eff.chance) end, type = "mental", subtype = { fear=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#F53CBE##Target# becomes panicked!", "+Panicked" end, - on_lose = function(self, err) return "#Target# is no longer panicked", "-Panicked" end, + on_gain = function(self, err) return _t"#F53CBE##Target# becomes panicked!", _t"+Panicked" end, + on_lose = function(self, err) return _t"#Target# is no longer panicked", _t"-Panicked" end, activate = function(self, eff) eff.particlesId = self:addParticles(Particles.new("fear_violet", 1)) end, @@ -1326,7 +1326,7 @@ newEffect{ end if not self:checkHit(eff.src:combatMindpower(), self:combatMentalResist(), 0, 95, 5) then eff.timer = eff.timer + eff.chance * 0.5 - game.logSeen(self, "#F53CBE#%s struggles against the panic.", self.name:capitalize()) + game.logSeen(self, "#F53CBE#%s struggles against the panic.", self:getName():capitalize()) else eff.timer = eff.timer + eff.chance end @@ -1361,7 +1361,7 @@ newEffect{ if bestX then self:move(bestX, bestY, false) - game.logPlayer(self, "#F53CBE#You panic and flee from %s.", eff.src.name) + game.logPlayer(self, "#F53CBE#You panic and flee from %s.", eff.src:getName()) else self:logCombat(eff.src, "#F53CBE##Source# panics but fails to flee from #Target#.") self:useEnergy(game.energy_to_act * self:combatMovementSpeed(bestX, bestY)) @@ -1374,14 +1374,14 @@ newEffect{ newEffect{ name = "QUICKNESS", image = "effects/quickness.png", - desc = "Quick", - long_desc = function(self, eff) return ("Increases global speed by %d%%."):format(eff.power * 100) end, + desc = _t"Quick", + long_desc = function(self, eff) return ("Increases global speed by %d%%."):tformat(eff.power * 100) end, type = "mental", subtype = { telekinesis=true, speed=true }, status = "beneficial", parameters = { power=0.1 }, - on_gain = function(self, err) return "#Target# speeds up.", "+Quick" end, - on_lose = function(self, err) return "#Target# slows down.", "-Quick" end, + on_gain = function(self, err) return _t"#Target# speeds up.", _t"+Quick" end, + on_lose = function(self, err) return _t"#Target# slows down.", _t"-Quick" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("global_speed_add", eff.power) end, @@ -1392,30 +1392,30 @@ newEffect{ newEffect{ name = "PSIFRENZY", image = "talents/frenzied_focus.png", - desc = "Frenzied Focus", - long_desc = function(self, eff) return ("This creatures psionic focus item is supercharged!") end, + desc = _t"Frenzied Focus", + long_desc = function(self, eff) return (_t"This creatures psionic focus item is supercharged!") end, type = "mental", subtype = { telekinesis=true, frenzy=true }, status = "beneficial", parameters = {dam=10}, - on_gain = function(self, err) return "#Target# enters a frenzy!", "+Frenzy" end, - on_lose = function(self, err) return "#Target# is no longer frenzied.", "-Frenzy" end, + on_gain = function(self, err) return _t"#Target# enters a frenzy!", _t"+Frenzy" end, + on_lose = function(self, err) return _t"#Target# is no longer frenzied.", _t"-Frenzy" end, } newEffect{ name = "KINSPIKE_SHIELD", image = "talents/kinetic_shield.png", - desc = "Spiked Kinetic Shield", + desc = _t"Spiked Kinetic Shield", long_desc = function(self, eff) local tl = self:getTalentLevel(self.T_ABSORPTION_MASTERY) - local xs = (tl>=3 and ", nature" or "")..(tl>=6 and ", temporal" or "") - return ("The target erects a powerful kinetic shield capable of absorbing %d/%d physical%s or acid damage before it crumbles."):format(self.kinspike_shield_absorb, eff.power, xs) + local xs = (tl>=3 and _t", nature" or "")..(tl>=6 and _t", temporal" or "") + return ("The target erects a powerful kinetic shield capable of absorbing %d/%d physical%s or acid damage before it crumbles."):tformat(self.kinspike_shield_absorb, eff.power, xs) end, type = "mental", subtype = { telekinesis=true, shield=true }, status = "beneficial", parameters = { power=100 }, - on_gain = function(self, err) return "A powerful kinetic shield forms around #target#.", "+Shield" end, - on_lose = function(self, err) return "The powerful kinetic shield around #target# crumbles.", "-Shield" end, + on_gain = function(self, err) return _t"A powerful kinetic shield forms around #target#.", _t"+Shield" end, + on_lose = function(self, err) return _t"The powerful kinetic shield around #target# crumbles.", _t"-Shield" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("kinspike_shield", eff.power) self.kinspike_shield_absorb = eff.power @@ -1434,18 +1434,18 @@ newEffect{ } newEffect{ name = "THERMSPIKE_SHIELD", image = "talents/thermal_shield.png", - desc = "Spiked Thermal Shield", + desc = _t"Spiked Thermal Shield", long_desc = function(self, eff) local tl = self:getTalentLevel(self.T_ABSORPTION_MASTERY) - local xs = (tl>=3 and ", light" or "")..(tl>=6 and ", arcane" or "") - return ("The target erects a powerful thermal shield capable of absorbing %d/%d fire%s or cold damage before it crumbles."):format(self.thermspike_shield_absorb, eff.power, xs) + local xs = (tl>=3 and _t", light" or "")..(tl>=6 and _t", arcane" or "") + return ("The target erects a powerful thermal shield capable of absorbing %d/%d fire%s or cold damage before it crumbles."):tformat(self.thermspike_shield_absorb, eff.power, xs) end, type = "mental", subtype = { telekinesis=true, shield=true }, status = "beneficial", parameters = { power=100 }, - on_gain = function(self, err) return "A powerful thermal shield forms around #target#.", "+Shield" end, - on_lose = function(self, err) return "The powerful thermal shield around #target# crumbles.", "-Shield" end, + on_gain = function(self, err) return _t"A powerful thermal shield forms around #target#.", _t"+Shield" end, + on_lose = function(self, err) return _t"The powerful thermal shield around #target# crumbles.", _t"-Shield" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("thermspike_shield", eff.power) self.thermspike_shield_absorb = eff.power @@ -1464,18 +1464,18 @@ newEffect{ } newEffect{ name = "CHARGESPIKE_SHIELD", image = "talents/charged_shield.png", - desc = "Spiked Charged Shield", + desc = _t"Spiked Charged Shield", long_desc = function(self, eff) local tl = self:getTalentLevel(self.T_ABSORPTION_MASTERY) - local xs = (tl>=3 and ", darkness" or "")..(tl>=6 and ", mind" or "") - return ("The target erects a powerful charged shield capable of absorbing %d/%d lightning%s or blight damage before it crumbles."):format(self.chargespike_shield_absorb, eff.power, xs) + local xs = (tl>=3 and _t", darkness" or "")..(tl>=6 and _t", mind" or "") + return ("The target erects a powerful charged shield capable of absorbing %d/%d lightning%s or blight damage before it crumbles."):tformat(self.chargespike_shield_absorb, eff.power, xs) end, type = "mental", subtype = { telekinesis=true, shield=true }, status = "beneficial", parameters = { power=100 }, - on_gain = function(self, err) return "A powerful charged shield forms around #target#.", "+Shield" end, - on_lose = function(self, err) return "The powerful charged shield around #target# crumbles.", "-Shield" end, + on_gain = function(self, err) return _t"A powerful charged shield forms around #target#.", _t"+Shield" end, + on_lose = function(self, err) return _t"The powerful charged shield around #target# crumbles.", _t"-Shield" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("chargespike_shield", eff.power) self.chargespike_shield_absorb = eff.power @@ -1495,8 +1495,8 @@ newEffect{ newEffect{ name = "CONTROL", image = "talents/perfect_control.png", - desc = "Perfect control", - long_desc = function(self, eff) return ("The target's combat attack and crit chance are improved by %d and %d%%, respectively."):format(eff.power, 0.5*eff.power) end, + desc = _t"Perfect control", + long_desc = function(self, eff) return ("The target's combat attack and crit chance are improved by %d and %d%%, respectively."):tformat(eff.power, 0.5*eff.power) end, type = "mental", subtype = { telekinesis=true, focus=true }, status = "beneficial", @@ -1513,14 +1513,14 @@ newEffect{ newEffect{ name = "PSI_REGEN", image = "talents/matter_is_energy.png", - desc = "Matter is energy", - long_desc = function(self, eff) return ("The gem's matter gradually transforms, granting %0.2f psi per turn."):format(eff.power) end, + desc = _t"Matter is energy", + long_desc = function(self, eff) return ("The gem's matter gradually transforms, granting %0.2f psi per turn."):tformat(eff.power) end, type = "mental", subtype = { psychic_drain=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "Energy starts pouring from the gem into #Target#.", "+Energy" end, - on_lose = function(self, err) return "The flow of energy from #Target#'s gem ceases.", "-Energy" end, + on_gain = function(self, err) return _t"Energy starts pouring from the gem into #Target#.", _t"+Energy" end, + on_lose = function(self, err) return _t"The flow of energy from #Target#'s gem ceases.", _t"-Energy" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("psi_regen", eff.power) end, @@ -1531,20 +1531,20 @@ newEffect{ newEffect{ name = "MASTERFUL_TELEKINETIC_ARCHERY", image = "talents/masterful_telekinetic_archery.png", - desc = "Telekinetic Archery", - long_desc = function(self, eff) return ("Your telekinetically-wielded bow automatically attacks the nearest target each turn.") end, + desc = _t"Telekinetic Archery", + long_desc = function(self, eff) return (_t"Your telekinetically-wielded bow automatically attacks the nearest target each turn.") end, type = "mental", subtype = { telekinesis=true }, status = "beneficial", parameters = {dam=10}, - on_gain = function(self, err) return "#Target# enters a telekinetic archer's trance!", "+Telekinetic archery" end, - on_lose = function(self, err) return "#Target# is no longer in a telekinetic archer's trance.", "-Telekinetic archery" end, + on_gain = function(self, err) return _t"#Target# enters a telekinetic archer's trance!", _t"+Telekinetic archery" end, + on_lose = function(self, err) return _t"#Target# is no longer in a telekinetic archer's trance.", _t"-Telekinetic archery" end, } newEffect{ name = "WEAKENED_MIND", image = "talents/taint__telepathy.png", - desc = "Receptive Mind", - long_desc = function(self, eff) return ("Decreases mind save by %d and increases mindpower by %d."):format(eff.save, eff.power) end, + desc = _t"Receptive Mind", + long_desc = function(self, eff) return ("Decreases mind save by %d and increases mindpower by %d."):tformat(eff.save, eff.power) end, type = "mental", subtype = { morale=true }, status = "detrimental", @@ -1561,14 +1561,14 @@ newEffect{ newEffect{ name = "VOID_ECHOES", image = "talents/echoes_from_the_void.png", - desc = "Void Echoes", - long_desc = function(self, eff) return ("The target is seeing echoes from the void and will take %0.2f mind damage as well as some resource damage each turn it fails a mental save."):format(eff.power) end, + desc = _t"Void Echoes", + long_desc = function(self, eff) return ("The target is seeing echoes from the void and will take %0.2f mind damage as well as some resource damage each turn it fails a mental save."):tformat(eff.power) end, type = "mental", subtype = { madness=true, psionic=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is being driven mad by the void.", "+Void Echoes" end, - on_lose = function(self, err) return "#Target# has survived the void madness.", "-Void Echoes" end, + on_gain = function(self, err) return _t"#Target# is being driven mad by the void.", _t"+Void Echoes" end, + on_lose = function(self, err) return _t"#Target# has survived the void madness.", _t"-Void Echoes" end, on_timeout = function(self, eff) local drain = DamageType:get(DamageType.MIND).projector(eff.src or self, self.x, self.y, DamageType.MIND, eff.power) / 2 self:incMana(-drain) @@ -1583,14 +1583,14 @@ newEffect{ newEffect{ name = "WAKING_NIGHTMARE", image = "talents/waking_nightmare.png", - desc = "Waking Nightmare", - long_desc = function(self, eff) return ("The target is lost in a nightmare that deals %0.2f mind damage each turn and has a %d%% chance to cause a random detrimental effect."):format(eff.dam, eff.chance) end, + desc = _t"Waking Nightmare", + long_desc = function(self, eff) return ("The target is lost in a nightmare that deals %0.2f mind damage each turn and has a %d%% chance to cause a random detrimental effect."):tformat(eff.dam, eff.chance) end, type = "mental", subtype = { nightmare=true, darkness=true }, status = "detrimental", parameters = { chance=10, dam = 10 }, - on_gain = function(self, err) return "#F53CBE##Target# is lost in a nightmare.", "+Night Terrors" end, - on_lose = function(self, err) return "#Target# is free from the nightmare.", "-Night Terrors" end, + on_gain = function(self, err) return _t"#F53CBE##Target# is lost in a nightmare.", _t"+Night Terrors" end, + on_lose = function(self, err) return _t"#Target# is free from the nightmare.", _t"-Night Terrors" end, on_timeout = function(self, eff) DamageType:get(DamageType.DARKNESS).projector(eff.src or self, self.x, self.y, DamageType.DARKNESS, eff.dam) local chance = eff.chance @@ -1611,22 +1611,22 @@ newEffect{ self:setEffect(self.EFF_CONFUSED, 3, {power=30}) end end - game.logSeen(self, "#F53CBE#%s succumbs to the nightmare!", self.name:capitalize()) + game.logSeen(self, "#F53CBE#%s succumbs to the nightmare!", self:getName():capitalize()) end end, } newEffect{ name = "INNER_DEMONS", image = "talents/inner_demons.png", - desc = "Inner Demons", - long_desc = function(self, eff) return ("The target is plagued by inner demons and each turn there's a %d%% chance that one will appear. If the caster is killed or the target resists setting his demons loose the effect will end early."):format(eff.chance) end, + desc = _t"Inner Demons", + long_desc = function(self, eff) return ("The target is plagued by inner demons and each turn there's a %d%% chance that one will appear. If the caster is killed or the target resists setting his demons loose the effect will end early."):tformat(eff.chance) end, type = "mental", subtype = { nightmare=true }, status = "detrimental", remove_on_clone = true, parameters = {chance=0}, - on_gain = function(self, err) return "#F53CBE##Target# is plagued by inner demons!", "+Inner Demons" end, - on_lose = function(self, err) return "#Target# is freed from the demons.", "-Inner Demons" end, + on_gain = function(self, err) return _t"#F53CBE##Target# is plagued by inner demons!", _t"+Inner Demons" end, + on_lose = function(self, err) return _t"#Target# is freed from the demons.", _t"-Inner Demons" end, activate = function(self, eff) if core.shader.active() then self:effectParticles(eff, {type="shader_shield", args={size_factor=1.5, img="inner_demons_tentacle_shader"}, shader={type="tentacles", wobblingType=0, appearTime=0.8, time_factor=2000, noup=0.0}}) @@ -1650,14 +1650,14 @@ newEffect{ newEffect{ name = "DOMINATE_ENTHRALL", image = "talents/yeek_will.png", - desc = "Enthralled", - long_desc = function(self, eff) return ("The target is enthralled, temporarily changing its faction.") end,-- to %s.")--:format(engine.Faction.factions[eff.faction].name) end, + desc = _t"Enthralled", + long_desc = function(self, eff) return (_t"The target is enthralled, temporarily changing its faction.") end,-- to %s.")--:tformat(engine.Faction.factions[eff.faction].name) end, type = "mental", subtype = { dominate=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is entralled.", "+Enthralled" end, - on_lose = function(self, err) return "#Target# is free from the domination.", "-Enthralled" end, + on_gain = function(self, err) return _t"#Target# is entralled.", _t"+Enthralled" end, + on_lose = function(self, err) return _t"#Target# is free from the domination.", _t"-Enthralled" end, activate = function(self, eff) eff.olf_faction = self.faction self.faction = eff.src.faction @@ -1669,14 +1669,14 @@ newEffect{ newEffect{ name = "HALFLING_LUCK", image = "talents/halfling_luck.png", - desc = "Halflings's Luck", - long_desc = function(self, eff) return ("The target's luck and cunning combine to grant it %d%% higher critical chance and %d saves."):format(eff.crit, eff.save) end, + desc = _t"Halflings's Luck", + long_desc = function(self, eff) return ("The target's luck and cunning combine to grant it %d%% higher critical chance and %d saves."):tformat(eff.crit, eff.save) end, type = "mental", subtype = { focus=true }, status = "beneficial", parameters = { crit=10, save=10 }, - on_gain = function(self, err) return "#Target# seems more aware." end, - on_lose = function(self, err) return "#Target#'s awareness returns to normal." end, + on_gain = function(self, err) return _t"#Target# seems more aware." end, + on_lose = function(self, err) return _t"#Target#'s awareness returns to normal." end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_generic_crit", eff.crit) self:effectTemporaryValue(eff, "combat_physresist", eff.save) @@ -1687,14 +1687,14 @@ newEffect{ newEffect{ name = "ATTACK", image = "talents/perfect_strike.png", - desc = "Perfect Accuracy", - long_desc = function(self, eff) return ("The target's accuracy is improved by %d."):format(eff.power) end, + desc = _t"Perfect Accuracy", + long_desc = function(self, eff) return ("The target's accuracy is improved by %d."):tformat(eff.power) end, type = "mental", subtype = { focus=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# aims carefully." end, - on_lose = function(self, err) return "#Target# aims less carefully." end, + on_gain = function(self, err) return _t"#Target# aims carefully." end, + on_lose = function(self, err) return _t"#Target# aims less carefully." end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("combat_atk", eff.power) eff.bid = self:addTemporaryValue("blind_fight", 1) @@ -1708,14 +1708,14 @@ newEffect{ newEffect{ name = "DEADLY_STRIKES", image = "talents/deadly_strikes.png", - desc = "Deadly Strikes", - long_desc = function(self, eff) return ("The target's armour penetration is increased by %d."):format(eff.power) end, + desc = _t"Deadly Strikes", + long_desc = function(self, eff) return ("The target's armour penetration is increased by %d."):tformat(eff.power) end, type = "mental", subtype = { focus=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# aims carefully." end, - on_lose = function(self, err) return "#Target# aims less carefully." end, + on_gain = function(self, err) return _t"#Target# aims carefully." end, + on_lose = function(self, err) return _t"#Target# aims less carefully." end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("combat_apr", eff.power) end, @@ -1726,14 +1726,14 @@ newEffect{ newEffect{ name = "FRENZY", image = "effects/frenzy.png", - desc = "Frenzy", - long_desc = function(self, eff) return ("Increases global action speed by %d%% and physical crit by %d%%.\nAdditionally the target will continue to fight until its Life reaches -%d%%."):format(eff.power * 100, eff.crit, eff.dieat * 100) end, + desc = _t"Frenzy", + long_desc = function(self, eff) return ("Increases global action speed by %d%% and physical crit by %d%%.\nAdditionally the target will continue to fight until its Life reaches -%d%%."):tformat(eff.power * 100, eff.crit, eff.dieat * 100) end, type = "mental", subtype = { frenzy=true, speed=true }, status = "beneficial", parameters = { power=0.1 }, - on_gain = function(self, err) return "#Target# goes into a killing frenzy.", "+Frenzy" end, - on_lose = function(self, err) return "#Target# calms down.", "-Frenzy" end, + on_gain = function(self, err) return _t"#Target# goes into a killing frenzy.", _t"+Frenzy" end, + on_lose = function(self, err) return _t"#Target# calms down.", _t"-Frenzy" end, on_merge = function(self, old_eff, new_eff) -- use on merge so reapplied frenzy doesn't kill off creatures with negative life old_eff.dur = new_eff.dur @@ -1754,8 +1754,8 @@ newEffect{ -- check negative life first incase the creature has healing if self.life <= (self.die_at or 0) then local sx, sy = game.level.map:getTileToScreen(self.x, self.y, true) - game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, rng.float(-2.5, -1.5), "Falls dead!", {255,0,255}) - game.logSeen(self, "%s dies when its frenzy ends!", self.name:capitalize()) + game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, rng.float(-2.5, -1.5), _t"Falls dead!", {255,0,255}) + game.logSeen(self, "%s dies when its frenzy ends!", self:getName():capitalize()) self:die(self) end end, @@ -1763,16 +1763,16 @@ newEffect{ newEffect{ name = "BLOODBATH", image = "talents/bloodbath.png", - desc = "Bloodbath", - long_desc = function(self, eff) return ("The thrill of combat improves the target's maximum life by %d%%, life regeneration by %0.2f, and stamina regeneration by %0.2f."):format(eff.hp, eff.cur_regen or eff.regen, eff.cur_regen/5 or eff.regen/5) end, + desc = _t"Bloodbath", + long_desc = function(self, eff) return ("The thrill of combat improves the target's maximum life by %d%%, life regeneration by %0.2f, and stamina regeneration by %0.2f."):tformat(eff.hp, eff.cur_regen or eff.regen, eff.cur_regen/5 or eff.regen/5) end, type = "mental", subtype = { frenzy=true, heal=true, regeneration=true, }, status = "beneficial", parameters = { hp=10, regen=10, max=50 }, - on_gain = function(self, err) return nil, "+Bloodbath" end, - on_lose = function(self, err) return nil, "-Bloodbath" end, + on_gain = function(self, err) return nil, _t"+Bloodbath" end, + on_lose = function(self, err) return nil, _t"-Bloodbath" end, on_merge = function(self, old_eff, new_eff) - if old_eff.cur_regen + new_eff.regen < new_eff.max then game.logSeen(self, "%s's blood frenzy intensifies!", self.name:capitalize()) end + if old_eff.cur_regen + new_eff.regen < new_eff.max then game.logSeen(self, "%s's blood frenzy intensifies!", self:getName():capitalize()) end new_eff.templife_id = old_eff.templife_id self:removeTemporaryValue("max_life", old_eff.life_id) self:removeTemporaryValue("life_regen", old_eff.life_regen_id) @@ -1795,7 +1795,7 @@ newEffect{ eff.cur_regen = eff.regen eff.life_regen_id = self:addTemporaryValue("life_regen", eff.regen) eff.stamina_regen_id = self:addTemporaryValue("stamina_regen", eff.regen /5) - game.logSeen(self, "%s revels in the spilt blood and grows stronger!",self.name:capitalize()) + game.logSeen(self, "%s revels in the spilt blood and grows stronger!",self:getName():capitalize()) if core.shader.active(4) then eff.particle1 = self:addParticles(Particles.new("shader_shield", 1, {toback=true, size_factor=1.5, y=-0.3, img="healarcane"}, {type="healing", time_factor=4000, noup=2.0, beamColor1={0xff/255, 0x22/255, 0x22/255, 1}, beamColor2={0xff/255, 0x60/255, 0x60/255, 1}, circleColor={0,0,0,0}, beamsCount=8})) @@ -1811,14 +1811,14 @@ newEffect{ self:removeTemporaryValue("stamina_regen", eff.stamina_regen_id) self:removeTemporaryValue("life",eff.templife_id) -- remove extra hps to prevent excessive heals at high level - game.logSeen(self, "%s no longer revels in blood quite so much.",self.name:capitalize()) + game.logSeen(self, "%s no longer revels in blood quite so much.",self:getName():capitalize()) end, } newEffect{ name = "BLOODRAGE", image = "talents/bloodrage.png", - desc = "Bloodrage", - long_desc = function(self, eff) return ("The target's strength is increased by %d by the thrill of combat."):format(eff.cur_inc) end, + desc = _t"Bloodrage", + long_desc = function(self, eff) return ("The target's strength is increased by %d by the thrill of combat."):tformat(eff.cur_inc) end, type = "mental", subtype = { frenzy=true }, status = "beneficial", @@ -1842,13 +1842,13 @@ newEffect{ newEffect{ name = "INCREASED_LIFE", image = "effects/increased_life.png", - desc = "Increased Life", - long_desc = function(self, eff) return ("The target's maximum life is increased by %d."):format(eff.life) end, + desc = _t"Increased Life", + long_desc = function(self, eff) return ("The target's maximum life is increased by %d."):tformat(eff.life) end, type = "mental", subtype = { frenzy=true, heal=true }, status = "beneficial", - on_gain = function(self, err) return "#Target# gains extra life.", "+Life" end, - on_lose = function(self, err) return "#Target# loses extra life.", "-Life" end, + on_gain = function(self, err) return _t"#Target# gains extra life.", _t"+Life" end, + on_lose = function(self, err) return _t"#Target# loses extra life.", _t"-Life" end, parameters = { life = 50 }, activate = function(self, eff) self.max_life = self.max_life + eff.life @@ -1862,14 +1862,14 @@ newEffect{ if self.life <= 0 then self.life = 1 self:setEffect(self.EFF_STUNNED, 3, {}) - game.logSeen(self, "%s's increased life fades, leaving it stunned by the loss.", self.name:capitalize()) + game.logSeen(self, "%s's increased life fades, leaving it stunned by the loss.", self:getName():capitalize()) end end, } newEffect{ name = "GESTURE_OF_GUARDING", image = "talents/gesture_of_guarding.png", - desc = "Guarded", + desc = _t"Guarded", long_desc = function(self, eff) local xs = "" local dam, deflects = eff.dam, eff.deflects @@ -1877,10 +1877,10 @@ newEffect{ dam = dam*math.max(0,deflects) deflects = 1 end - if self:isTalentActive(self.T_GESTURE_OF_PAIN) then xs = (" with a %d%% chance to counterattack"):format(self:callTalent(self.T_GESTURE_OF_GUARDING,"getCounterAttackChance")) end - return ("Guarding against melee damage: Will dismiss up to %d damage from the next %0.1f attack(s)%s."):format(dam, deflects, xs) + if self:isTalentActive(self.T_GESTURE_OF_PAIN) then xs = (" with a %d%% chance to counterattack"):tformat(self:callTalent(self.T_GESTURE_OF_GUARDING,"getCounterAttackChance")) end + return ("Guarding against melee damage: Will dismiss up to %d damage from the next %0.1f attack(s)%s."):tformat(dam, deflects, xs) end, - charges = function(self, eff) return "#LIGHT_GREEN#"..math.ceil(eff.deflects) end, + charges = function(self, eff) return _t"#LIGHT_GREEN#"..math.ceil(eff.deflects) end, type = "mental", subtype = { curse=true }, status = "beneficial", @@ -1898,14 +1898,14 @@ newEffect{ newEffect{ name = "RAMPAGE", image = "talents/rampage.png", - desc = "Rampaging", + desc = _t"Rampaging", long_desc = function(self, eff) - local desc = ("The target is rampaging! (+%d%% movement speed, +%d%% attack speed, +%d%% mind speed"):format(eff.movementSpeedChange * 100, eff.combatPhysSpeedChange * 100, eff.combatMindSpeedChange * 100) + local desc = ("The target is rampaging! (+%d%% movement speed, +%d%% attack speed, +%d%% mind speed"):tformat(eff.movementSpeedChange * 100, eff.combatPhysSpeedChange * 100, eff.combatMindSpeedChange * 100) if eff.physicalDamageChange > 0 then - desc = desc..(", +%d%% physical damage, +%d physical save, +%d mental save"):format(eff.physicalDamageChange, eff.combatPhysResistChange, eff.combatMentalResistChange) + desc = desc..(", +%d%% physical damage, +%d physical save, +%d mental save"):tformat(eff.physicalDamageChange, eff.combatPhysResistChange, eff.combatMentalResistChange) end if eff.damageShieldMax > 0 then - desc = desc..(", %d/%d damage shrugged off this turn"):format(math.max(0, eff.damageShieldMax - eff.damageShield), eff.damageShieldMax) + desc = desc..(", %d/%d damage shrugged off this turn"):tformat(math.max(0, eff.damageShieldMax - eff.damageShield), eff.damageShieldMax) end desc = desc..")" return desc @@ -1914,8 +1914,8 @@ newEffect{ subtype = { frenzy=true, speed=true, evade=true }, status = "beneficial", parameters = { }, - on_gain = function(self, err) return "#F53CBE##Target# begins rampaging!", "+Rampage" end, - on_lose = function(self, err) return "#F53CBE##Target# is no longer rampaging.", "-Rampage" end, + on_gain = function(self, err) return _t"#F53CBE##Target# begins rampaging!", _t"+Rampage" end, + on_lose = function(self, err) return _t"#F53CBE##Target# is no longer rampaging.", _t"-Rampage" end, activate = function(self, eff) if eff.movementSpeedChange or 0 > 0 then eff.movementSpeedId = self:addTemporaryValue("movement_speed", eff.movementSpeedChange) end if eff.combatPhysSpeedChange or 0 > 0 then eff.combatPhysSpeedId = self:addTemporaryValue("combat_physspeed", eff.combatPhysSpeedChange) end @@ -1943,7 +1943,7 @@ newEffect{ -- restore damage shield if eff.damageShieldMax and eff.damageShield ~= eff.damageShieldMax and not self.dead then eff.damageShieldUsed = (eff.damageShieldUsed or 0) + eff.damageShieldMax - eff.damageShield - game.logSeen(self, "%s has shrugged off %d damage and is ready for more.", self.name:capitalize(), eff.damageShieldMax - eff.damageShield) + game.logSeen(self, "%s has shrugged off %d damage and is ready for more.", self:getName():capitalize(), eff.damageShieldMax - eff.damageShield) eff.damageShield = eff.damageShieldMax if eff.damageShieldBonus and eff.damageShieldUsed >= eff.damageShieldBonus and eff.actualDuration < eff.maxDuration then @@ -1961,7 +1961,7 @@ newEffect{ local absorb = math.min(eff.damageShield, dam) eff.damageShield = eff.damageShield - absorb - --game.logSeen(self, "%s shrugs off %d damage.", self.name:capitalize(), absorb) + --game.logSeen(self, "%s shrugs off %d damage.", self:getName():capitalize(), absorb) return dam - absorb end, @@ -1976,14 +1976,14 @@ newEffect{ newEffect{ name = "ORC_FURY", image = "talents/orc_fury.png", - desc = "Orcish Fury", - long_desc = function(self, eff) return ("The target enters a destructive fury, increasing all damage done by %d%%."):format(eff.power) end, + desc = _t"Orcish Fury", + long_desc = function(self, eff) return ("The target enters a destructive fury, increasing all damage done by %d%%."):tformat(eff.power) end, type = "mental", subtype = { frenzy=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# enters a state of bloodlust." end, - on_lose = function(self, err) return "#Target# calms down." end, + on_gain = function(self, err) return _t"#Target# enters a state of bloodlust." end, + on_lose = function(self, err) return _t"#Target# calms down." end, activate = function(self, eff) eff.pid = self:addTemporaryValue("inc_damage", {all=eff.power}) end, @@ -1994,14 +1994,14 @@ newEffect{ newEffect{ name = "ORC_TRIUMPH", image = "talents/skirmisher.png", - desc = "Orcish Triumph", - long_desc = function(self, eff) return ("Inspired by a recent kill increasing all resistance by %d%%."):format(eff.resists) end, + desc = _t"Orcish Triumph", + long_desc = function(self, eff) return ("Inspired by a recent kill increasing all resistance by %d%%."):tformat(eff.resists) end, type = "mental", subtype = { frenzy=true }, status = "beneficial", parameters = { resists=10 }, - on_gain = function(self, err) return "#Target# roars triumphantly." end, -- Too spammy? - on_lose = function(self, err) return "#Target# is no longer inspired." end, + on_gain = function(self, err) return _t"#Target# roars triumphantly." end, -- Too spammy? + on_lose = function(self, err) return _t"#Target# is no longer inspired." end, activate = function(self, eff) eff.pid = self:addTemporaryValue("resists", {all=eff.resists}) end, @@ -2012,14 +2012,14 @@ newEffect{ newEffect{ name = "BRAINLOCKED", - desc = "Brainlocked", - long_desc = function(self, eff) return ("Renders a random talent unavailable. Talent cooldown is halved until the effect has worn off."):format() end, + desc = _t"Brainlocked", + long_desc = function(self, eff) return ("Renders a random talent unavailable. Talent cooldown is halved until the effect has worn off."):tformat() end, type = "mental", subtype = { ["cross tier"]=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return nil, "+Brainlocked" end, - on_lose = function(self, err) return nil, "-Brainlocked" end, + on_gain = function(self, err) return nil, _t"+Brainlocked" end, + on_lose = function(self, err) return nil, _t"-Brainlocked" end, activate = function(self, eff) eff.tcdid = self:addTemporaryValue("half_talents_cooldown", 1) local tids = {} @@ -2040,13 +2040,13 @@ newEffect{ newEffect{ name = "FRANTIC_SUMMONING", image = "talents/frantic_summoning.png", - desc = "Frantic Summoning", - long_desc = function(self, eff) return ("Reduces the time taken for summoning by %d%%."):format(eff.power) end, + desc = _t"Frantic Summoning", + long_desc = function(self, eff) return ("Reduces the time taken for summoning by %d%%."):tformat(eff.power) end, type = "mental", subtype = { summon=true }, status = "beneficial", - on_gain = function(self, err) return "#Target# starts summoning at high speed.", "+Frantic Summoning" end, - on_lose = function(self, err) return "#Target#'s frantic summoning ends.", "-Frantic Summoning" end, + on_gain = function(self, err) return _t"#Target# starts summoning at high speed.", _t"+Frantic Summoning" end, + on_lose = function(self, err) return _t"#Target#'s frantic summoning ends.", _t"-Frantic Summoning" end, parameters = { power=20 }, activate = function(self, eff) eff.failid = self:addTemporaryValue("no_equilibrium_summon_fail", 1) @@ -2074,8 +2074,8 @@ newEffect{ newEffect{ name = "WILD_SUMMON", image = "talents/wild_summon.png", - desc = "Wild Summon", - long_desc = function(self, eff) return ("%d%% chance to get a more powerful summon."):format(eff.chance) end, + desc = _t"Wild Summon", + long_desc = function(self, eff) return ("%d%% chance to get a more powerful summon."):tformat(eff.chance) end, type = "mental", subtype = { summon=true }, status = "beneficial", @@ -2096,14 +2096,14 @@ newEffect{ newEffect{ name = "LOBOTOMIZED", image = "talents/psychic_lobotomy.png", - desc = "Lobotomized (confused)", - long_desc = function(self, eff) return ("The target's mental faculties have been severely impaired, making it act randomly each turn (%d%% chance) and reducing its cunning by %d."):format(eff.confuse, eff.power/2) end, + desc = _t"Lobotomized (confused)", + long_desc = function(self, eff) return ("The target's mental faculties have been severely impaired, making it act randomly each turn (%d%% chance) and reducing its cunning by %d."):tformat(eff.confuse, eff.power/2) end, type = "mental", subtype = { confusion=true }, status = "detrimental", charges = function(self, eff) return (tostring(math.floor(eff.confuse)).."%") end, - on_gain = function(self, err) return "#Target# higher mental functions have been imparied.", "+Lobotomized" end, - on_lose = function(self, err) return "#Target#'s regains its senses.", "-Lobotomized" end, + on_gain = function(self, err) return _t"#Target# higher mental functions have been imparied.", _t"+Lobotomized" end, + on_lose = function(self, err) return _t"#Target#'s regains its senses.", _t"-Lobotomized" end, parameters = { power=1, confuse=10, dam=1 }, activate = function(self, eff) DamageType:get(DamageType.MIND).projector(eff.src or self, self.x, self.y, DamageType.MIND, {dam=eff.dam, alwaysHit=true}) @@ -2123,9 +2123,9 @@ newEffect{ newEffect{ name = "PSIONIC_SHIELD", image = "talents/kinetic_shield.png", - desc = "Psionic Shield", - display_desc = function(self, eff) return eff.kind:capitalize().." Psionic Shield" end, - long_desc = function(self, eff) return ("Reduces all incoming %s damage by %d."):format(eff.what, eff.power) end, + desc = _t"Psionic Shield", + display_desc = function(self, eff) return ("%s Psionic Shield"):tformat(_t(eff.kind):capitalize()) end, + long_desc = function(self, eff) return ("Reduces all incoming %s damage by %d."):tformat(eff.what, eff.power) end, type = "mental", subtype = { psionic=true, shield=true }, status = "beneficial", @@ -2138,7 +2138,7 @@ newEffect{ [DamageType.NATURE] = eff.power, [DamageType.TEMPORAL] = eff.power, }) - eff.what = "physical, nature, acid, temporal" + eff.what = _t"physical, nature, acid, temporal" elseif eff.kind == "thermal" then eff.sid = self:addTemporaryValue("flat_damage_armor", { [DamageType.FIRE] = eff.power, @@ -2146,7 +2146,7 @@ newEffect{ [DamageType.LIGHT] = eff.power, [DamageType.ARCANE] = eff.power, }) - eff.what = "fire, cold, light, arcane" + eff.what = _t"fire, cold, light, arcane" elseif eff.kind == "charged" then eff.sid = self:addTemporaryValue("flat_damage_armor", { [DamageType.LIGHTNING] = eff.power, @@ -2154,12 +2154,12 @@ newEffect{ [DamageType.MIND] = eff.power, [DamageType.DARKNESS] = eff.power, }) - eff.what = "lightning, blight, mind, darkness" + eff.what = _t"lightning, blight, mind, darkness" elseif eff.kind == "all" then eff.sid = self:addTemporaryValue("flat_damage_armor", { all = eff.power, }) - eff.what = "all" + eff.what = _t"all" end end, deactivate = function(self, eff) @@ -2171,8 +2171,8 @@ newEffect{ newEffect{ name = "CLEAR_MIND", image = "talents/mental_shielding.png", - desc = "Clear Mind", - long_desc = function(self, eff) return ("Nullifies the next %d detrimental mental effects."):format(self.clear_mind_immune) end, + desc = _t"Clear Mind", + long_desc = function(self, eff) return ("Nullifies the next %d detrimental mental effects."):tformat(self.clear_mind_immune) end, type = "mental", subtype = { psionic=true, }, status = "beneficial", @@ -2189,14 +2189,14 @@ newEffect{ newEffect{ name = "RESONANCE_FIELD", image = "talents/resonance_field.png", - desc = "Resonance Field", - long_desc = function(self, eff) return ("The target is surrounded by a psychic field, absorbing 50%% of all damage (up to %d/%d)."):format(self.resonance_field_absorb, eff.power) end, + desc = _t"Resonance Field", + long_desc = function(self, eff) return ("The target is surrounded by a psychic field, absorbing 50%% of all damage (up to %d/%d)."):tformat(self.resonance_field_absorb, eff.power) end, type = "mental", subtype = { psionic=true, shield=true }, status = "beneficial", parameters = { power=100 }, - on_gain = function(self, err) return "A psychic field forms around #target#.", "+Resonance Shield" end, - on_lose = function(self, err) return "The psychic field around #target# crumbles.", "-Resonance Shield" end, + on_gain = function(self, err) return _t"A psychic field forms around #target#.", _t"+Resonance Shield" end, + on_lose = function(self, err) return _t"The psychic field around #target# crumbles.", _t"-Resonance Shield" end, damage_feedback = function(self, eff, src, value) if eff.particle and eff.particle._shader and eff.particle._shader.shad and src and src.x and src.y then local r = -rng.float(0.2, 0.4) @@ -2224,15 +2224,15 @@ newEffect{ newEffect{ name = "MIND_LINK_TARGET", image = "talents/mind_link.png", - desc = "Mind Link", - long_desc = function(self, eff) return ("The target's mind has been invaded, increasing all mind damage it receives from %s by %d%%."):format(eff.src.name:capitalize(), eff.power) end, + desc = _t"Mind Link", + long_desc = function(self, eff) return ("The target's mind has been invaded, increasing all mind damage it receives from %s by %d%%."):tformat(eff.src:getName():capitalize(), eff.power) end, type = "mental", subtype = { psionic=true }, status = "detrimental", parameters = {power = 1, range = 5}, remove_on_clone = true, decrease = 0, - on_gain = function(self, err) return "#Target#'s mind has been invaded!", "+Mind Link" end, - on_lose = function(self, err) return "#Target# is free from the mental invasion.", "-Mind Link" end, + on_gain = function(self, err) return _t"#Target#'s mind has been invaded!", _t"+Mind Link" end, + on_lose = function(self, err) return _t"#Target# is free from the mental invasion.", _t"-Mind Link" end, on_timeout = function(self, eff) -- Remove the mind link when appropriate local p = eff.src:isTalentActive(eff.src.T_MIND_LINK) @@ -2244,14 +2244,14 @@ newEffect{ newEffect{ name = "FEEDBACK_LOOP", image = "talents/feedback_loop.png", - desc = "Feedback Loop", - long_desc = function(self, eff) return "The target is gaining feedback." end, + desc = _t"Feedback Loop", + long_desc = function(self, eff) return _t"The target is gaining feedback." end, type = "mental", subtype = { psionic=true }, status = "beneficial", parameters = { power = 1 }, - on_gain = function(self, err) return "#Target# is gaining feedback.", "+Feedback Loop" end, - on_lose = function(self, err) return "#Target# is no longer gaining feedback.", "-Feedback Loop" end, + on_gain = function(self, err) return _t"#Target# is gaining feedback.", _t"+Feedback Loop" end, + on_lose = function(self, err) return _t"#Target# is no longer gaining feedback.", _t"-Feedback Loop" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("ultrashield", 1, {rm=255, rM=255, gm=180, gM=255, bm=0, bM=0, am=35, aM=90, radius=0.2, density=15, life=28, instop=40})) end, @@ -2262,14 +2262,14 @@ newEffect{ newEffect{ name = "FOCUSED_WRATH", image = "talents/focused_wrath.png", - desc = "Focused Wrath", - long_desc = function(self, eff) return ("The target's subconscious has focused, increasing Mind resistance penetration by +%d%% and turning its attention on %s."):format(eff.pen, eff.target.name:capitalize()) end, + desc = _t"Focused Wrath", + long_desc = function(self, eff) return ("The target's subconscious has focused, increasing Mind resistance penetration by +%d%% and turning its attention on %s."):tformat(eff.pen, eff.target:getName():capitalize()) end, type = "mental", subtype = { psionic=true }, status = "beneficial", parameters = { power = 1 }, - on_gain = function(self, err) return "#Target#'s subconscious has been focused.", "+Focused Wrath" end, - on_lose = function(self, err) return "#Target#'s subconscious has returned to normal.", "-Focused Wrath" end, + on_gain = function(self, err) return _t"#Target#'s subconscious has been focused.", _t"+Focused Wrath" end, + on_lose = function(self, err) return _t"#Target#'s subconscious has returned to normal.", _t"-Focused Wrath" end, activate = function(self, eff) self:effectTemporaryValue(eff, "resists_pen", {[DamageType.MIND]=eff.pen}) end, @@ -2282,14 +2282,14 @@ newEffect{ newEffect{ name = "SLEEP", image = "talents/sleep.png", - desc = "Sleep", - long_desc = function(self, eff) return ("The target is asleep and unable to perform most actions. Every %d damage it takes will reduce the duration of the effect by one turn."):format(eff.power) end, + desc = _t"Sleep", + long_desc = function(self, eff) return ("The target is asleep and unable to perform most actions. Every %d damage it takes will reduce the duration of the effect by one turn."):tformat(eff.power) end, type = "mental", subtype = { sleep=true }, status = "detrimental", parameters = { power=1, insomnia=1, waking=0, contagious=0 }, - on_gain = function(self, err) return "#Target# has been put to sleep.", "+Sleep" end, - on_lose = function(self, err) return "#Target# is no longer sleeping.", "-Sleep" end, + on_gain = function(self, err) return _t"#Target# has been put to sleep.", _t"+Sleep" end, + on_lose = function(self, err) return _t"#Target# is no longer sleeping.", _t"-Sleep" end, on_timeout = function(self, eff) local dream_prison = false if eff.src and eff.src.isTalentActive and eff.src:isTalentActive(eff.src.T_DREAM_PRISON) then @@ -2336,14 +2336,14 @@ newEffect{ newEffect{ name = "SLUMBER", image = "talents/slumber.png", - desc = "Slumber", - long_desc = function(self, eff) return ("The target is in a deep sleep and unable to perform most actions. Every %d damage it takes will reduce the duration of the effect by one turn."):format(eff.power) end, + desc = _t"Slumber", + long_desc = function(self, eff) return ("The target is in a deep sleep and unable to perform most actions. Every %d damage it takes will reduce the duration of the effect by one turn."):tformat(eff.power) end, type = "mental", subtype = { sleep=true }, status = "detrimental", parameters = { power=1, insomnia=1, waking=0 }, - on_gain = function(self, err) return "#Target# is in a deep sleep.", "+Slumber" end, - on_lose = function(self, err) return "#Target# is no longer sleeping.", "-Slumber" end, + on_gain = function(self, err) return _t"#Target# is in a deep sleep.", _t"+Slumber" end, + on_lose = function(self, err) return _t"#Target# is no longer sleeping.", _t"-Slumber" end, on_timeout = function(self, eff) local dream_prison = false if eff.src and eff.src.isTalentActive and eff.src:isTalentActive(eff.src.T_DREAM_PRISON) then @@ -2386,14 +2386,14 @@ newEffect{ newEffect{ name = "NIGHTMARE", image = "talents/nightmare.png", - desc = "Nightmare", - long_desc = function(self, eff) return ("The target is in a nightmarish sleep, suffering %0.2f mind damage each turn and unable to to perform most actions. Every %d damage it takes will reduce the duration of the effect by one turn."):format(eff.dam, eff.power) end, + desc = _t"Nightmare", + long_desc = function(self, eff) return ("The target is in a nightmarish sleep, suffering %0.2f mind damage each turn and unable to to perform most actions. Every %d damage it takes will reduce the duration of the effect by one turn."):tformat(eff.dam, eff.power) end, type = "mental", subtype = { nightmare=true, sleep=true }, status = "detrimental", parameters = { power=1, dam=0, insomnia=1, waking=0}, - on_gain = function(self, err) return "#F53CBE##Target# is lost in a nightmare.", "+Nightmare" end, - on_lose = function(self, err) return "#Target# is free from the nightmare.", "-Nightmare" end, + on_gain = function(self, err) return _t"#F53CBE##Target# is lost in a nightmare.", _t"+Nightmare" end, + on_lose = function(self, err) return _t"#Target# is free from the nightmare.", _t"-Nightmare" end, on_timeout = function(self, eff) local dream_prison = false if eff.src and eff.src.isTalentActive and eff.src:isTalentActive(eff.src.T_DREAM_PRISON) then @@ -2445,14 +2445,14 @@ newEffect{ newEffect{ name = "RESTLESS_NIGHT", image = "talents/restless_night.png", - desc = "Restless Night", - long_desc = function(self, eff) return ("Fatigue from poor sleep, dealing %0.2f mind damage per turn."):format(eff.power) end, + desc = _t"Restless Night", + long_desc = function(self, eff) return ("Fatigue from poor sleep, dealing %0.2f mind damage per turn."):tformat(eff.power) end, type = "mental", subtype = { psionic=true}, status = "detrimental", parameters = { power=1 }, - on_gain = function(self, err) return "#Target# had a restless night.", "+Restless Night" end, - on_lose = function(self, err) return "#Target# has recovered from poor sleep.", "-Restless Night" end, + on_gain = function(self, err) return _t"#Target# had a restless night.", _t"+Restless Night" end, + on_lose = function(self, err) return _t"#Target# has recovered from poor sleep.", _t"-Restless Night" end, on_merge = function(self, old_eff, new_eff) -- Merge the flames! local olddam = old_eff.power * old_eff.dur @@ -2469,14 +2469,14 @@ newEffect{ newEffect{ name = "INSOMNIA", image = "effects/insomnia.png", - desc = "Insomnia", - long_desc = function(self, eff) return ("The target is wide awake and has %d%% resistance to sleep effects."):format(eff.cur_power) end, + desc = _t"Insomnia", + long_desc = function(self, eff) return ("The target is wide awake and has %d%% resistance to sleep effects."):tformat(eff.cur_power) end, type = "mental", subtype = { psionic=true }, status = "beneficial", parameters = { power=0 }, - on_gain = function(self, err) return "#Target# is suffering from insomnia.", "+Insomnia" end, - on_lose = function(self, err) return "#Target# is no longer suffering from insomnia.", "-Insomnia" end, + on_gain = function(self, err) return _t"#Target# is suffering from insomnia.", _t"+Insomnia" end, + on_lose = function(self, err) return _t"#Target# is no longer suffering from insomnia.", _t"-Insomnia" end, on_merge = function(self, old_eff, new_eff) -- Add the durations on merge local dur = old_eff.dur + new_eff.dur @@ -2509,13 +2509,13 @@ newEffect{ newEffect{ name = "SUNDER_MIND", image = "talents/sunder_mind.png", - desc = "Sundered Mind", - long_desc = function(self, eff) return ("The target's mental faculties have been impaired, reducing its mental save by %d."):format(eff.cur_power or eff.power) end, + desc = _t"Sundered Mind", + long_desc = function(self, eff) return ("The target's mental faculties have been impaired, reducing its mental save by %d."):tformat(eff.cur_power or eff.power) end, type = "mental", subtype = { psionic=true }, status = "detrimental", - on_gain = function(self, err) return "#Target#'s mental functions have been impaired.", "+Sundered Mind" end, - on_lose = function(self, err) return "#Target# regains its senses.", "-Sundered Mind" end, + on_gain = function(self, err) return _t"#Target#'s mental functions have been impaired.", _t"+Sundered Mind" end, + on_lose = function(self, err) return _t"#Target# regains its senses.", _t"-Sundered Mind" end, parameters = { power=10 }, on_merge = function(self, old_eff, new_eff) self:removeTemporaryValue("combat_mentalresist", old_eff.sunder) @@ -2536,13 +2536,13 @@ newEffect{ newEffect{ name = "BROKEN_DREAM", image = "effects/broken_dream.png", - desc = "Broken Dream", - long_desc = function(self, eff) return ("The target's dreams have been broken by the dreamforge, reducing its mental save by %d and reducing its chance of successfully casting a spell by %d%%."):format(eff.power, eff.fail) end, + desc = _t"Broken Dream", + long_desc = function(self, eff) return ("The target's dreams have been broken by the dreamforge, reducing its mental save by %d and reducing its chance of successfully casting a spell by %d%%."):tformat(eff.power, eff.fail) end, type = "mental", subtype = { psionic=true, morale=true }, status = "detrimental", - on_gain = function(self, err) return "#Target#'s dreams have been broken.", "+Broken Dream" end, - on_lose = function(self, err) return "#Target# regains hope.", "-Broken Dream" end, + on_gain = function(self, err) return _t"#Target#'s dreams have been broken.", _t"+Broken Dream" end, + on_lose = function(self, err) return _t"#Target# regains hope.", _t"-Broken Dream" end, parameters = { power=10, fail=10 }, activate = function(self, eff) eff.silence = self:addTemporaryValue("spell_failure", eff.fail) @@ -2556,7 +2556,7 @@ newEffect{ newEffect{ name = "FORGE_SHIELD", image = "talents/block.png", - desc = "Forge Shield", + desc = _t"Forge Shield", long_desc = function(self, eff) local e_string = "" if eff.number == 1 then @@ -2571,7 +2571,7 @@ newEffect{ local function tchelper(first, rest) return first:upper()..rest:lower() end - return ("Absorbs %d damage from the next blockable attack. Currently Blocking: %s."):format(eff.power, e_string:gsub("(%a)([%w_']*)", tchelper)) + return ("Absorbs %d damage from the next blockable attack. Currently Blocking: %s."):tformat(eff.power, e_string:gsub("(%a)([%w_']*)", tchelper)) end, type = "mental", subtype = { psionic=true }, @@ -2601,13 +2601,13 @@ newEffect{ newEffect{ name = "HIDDEN_RESOURCES", image = "talents/hidden_resources.png", - desc = "Hidden Resources", - long_desc = function(self, eff) return "The target does not consume any resources." end, + desc = _t"Hidden Resources", + long_desc = function(self, eff) return _t"The target does not consume any resources." end, type = "mental", subtype = { willpower=true }, status = "beneficial", - on_gain = function(self, err) return "#Target#'s focuses.", "+Hidden Ressources" end, - on_lose = function(self, err) return "#Target#'s loses some focus.", "-Hidden Ressources" end, + on_gain = function(self, err) return _t"#Target#'s focuses.", _t"+Hidden Ressources" end, + on_lose = function(self, err) return _t"#Target#'s loses some focus.", _t"-Hidden Ressources" end, parameters = { }, activate = function(self, eff) self:effectTemporaryValue(eff, "force_talent_ignore_ressources", 1) @@ -2616,13 +2616,13 @@ newEffect{ newEffect{ name = "SPELL_FEEDBACK", image = "talents/spell_feedback.png", - desc = "Spell Feedback", - long_desc = function(self, eff) return ("The target suffers %d%% spell failue."):format(eff.power) end, + desc = _t"Spell Feedback", + long_desc = function(self, eff) return ("The target suffers %d%% spell failue."):tformat(eff.power) end, type = "mental", subtype = { nature=true }, status = "detrimental", - on_gain = function(self, err) return "#Target# is surrounded by antimagic forces.", "+Spell Feedback" end, - on_lose = function(self, err) return "#Target#'s antimagic forces vanishes.", "-Spell Feedback" end, + on_gain = function(self, err) return _t"#Target# is surrounded by antimagic forces.", _t"+Spell Feedback" end, + on_lose = function(self, err) return _t"#Target#'s antimagic forces vanishes.", _t"-Spell Feedback" end, parameters = { power=40 }, activate = function(self, eff) self:effectTemporaryValue(eff, "spell_failure", eff.power) @@ -2631,13 +2631,13 @@ newEffect{ newEffect{ name = "MIND_PARASITE", image = "talents/mind_parasite.png", - desc = "Mind Parasite", - long_desc = function(self, eff) return ("The target is infected with a mind parasite. Each time it uses a talent it has a %d%% chance to have %d random talent(s) put on cooldown for %d turns."):format(eff.chance, eff.nb, eff.turns) end, + desc = _t"Mind Parasite", + long_desc = function(self, eff) return ("The target is infected with a mind parasite. Each time it uses a talent it has a %d%% chance to have %d random talent(s) put on cooldown for %d turns."):tformat(eff.chance, eff.nb, eff.turns) end, type = "mental", subtype = { nature=true, mind=true }, status = "detrimental", - on_gain = function(self, err) return "#Target# is infected with a mind parasite.", "+Mind Parasite" end, - on_lose = function(self, err) return "#Target# is free from the mind parasite.", "-Mind Parasite" end, + on_gain = function(self, err) return _t"#Target# is infected with a mind parasite.", _t"+Mind Parasite" end, + on_lose = function(self, err) return _t"#Target# is free from the mind parasite.", _t"-Mind Parasite" end, parameters = { chance=40, nb=1, turns=2 }, activate = function(self, eff) self:effectTemporaryValue(eff, "random_talent_cooldown_on_use", eff.chance) @@ -2648,8 +2648,8 @@ newEffect{ newEffect{ name = "MINDLASH", image = "talents/mindlash.png", - desc = "Mindlash", - long_desc = function(self, eff) return ("Repeated mindlash usage is very taxing increasing the psi cost each time (currently %d%%)"):format(eff.power * 100) end, + desc = _t"Mindlash", + long_desc = function(self, eff) return ("Repeated mindlash usage is very taxing increasing the psi cost each time (currently %d%%)"):tformat(eff.power * 100) end, type = "mental", subtype = { mind=true }, status = "detrimental", @@ -2665,8 +2665,8 @@ newEffect{ newEffect{ name = "SHADOW_EMPATHY", image = "talents/shadow_empathy.png", - desc = "Shadow Empathy", - long_desc = function(self, eff) return ("%d%% of all damage is redirected to a random shadow."):format(eff.power) end, + desc = _t"Shadow Empathy", + long_desc = function(self, eff) return ("%d%% of all damage is redirected to a random shadow."):tformat(eff.power) end, type = "mental", subtype = { mind=true, shield=true }, status = "beneficial", @@ -2682,8 +2682,8 @@ newEffect{ newEffect{ name = "SHADOW_DECOY", image = "talents/shadow_decoy.png", - desc = "Shadow Decoy", - long_desc = function(self, eff) return ("A random shadow absorbed a fatal blow for you, granting you a negative shield of %d."):format(eff.power) end, + desc = _t"Shadow Decoy", + long_desc = function(self, eff) return ("A random shadow absorbed a fatal blow for you, granting you a negative shield of %d."):tformat(eff.power) end, type = "mental", subtype = { mind=true, shield=true }, status = "beneficial", @@ -2701,15 +2701,15 @@ newEffect{ newEffect{ name = "CRYSTAL_BUFF", image = "talents/stone_touch.png", - desc = "Crystal Resonance", + desc = _t"Crystal Resonance", --Might consider adding the gem properties to this tooltip - long_desc = function(self, eff) return ("The power released by the %s resonates."):format(eff.name) end, + long_desc = function(self, eff) return ("The power released by the %s resonates."):tformat(eff.name) end, type = "mental", subtype = { psionic=true }, status = "beneficial", parameters = { }, - on_gain = function(self, err) return "#Target# glints with a crystaline aura", "+Crystal Resonance" end, - on_lose = function(self, err) return "#Target# is no longer glinting.", "-Crystal Resonance" end, + on_gain = function(self, err) return _t"#Target# glints with a crystaline aura", _t"+Crystal Resonance" end, + on_lose = function(self, err) return _t"#Target# is no longer glinting.", _t"-Crystal Resonance" end, activate = function(self, eff) for a, b in pairs(eff.effects) do self:effectTemporaryValue(eff, a, b) @@ -2722,8 +2722,8 @@ newEffect{ newEffect{ name = "WEAPON_WARDING", image = "talents/warding_weapon.png", - desc = "Weapon Warding", - long_desc = function(self, eff) return ("Target is using %s telekinetically wielded weapon defensively and will block the next melee attack and retaliate."):format(string.his_her(self)) end, + desc = _t"Weapon Warding", + long_desc = function(self, eff) return ("Target is using %s telekinetically wielded weapon defensively and will block the next melee attack and retaliate."):tformat(string.his_her(self)) end, type = "mental", subtype = { tactic=true }, status = "beneficial", @@ -2758,8 +2758,8 @@ newEffect{ newEffect{ name = "THOUGHTSENSE", image = "talents/thought_sense.png", - desc = "Thought Sense", - long_desc = function(self, eff) return ("Detect nearby thoughts, revealing creature locations in a radius of %d and boosting defense by %d."):format(eff.range, eff.def) end, + desc = _t"Thought Sense", + long_desc = function(self, eff) return ("Detect nearby thoughts, revealing creature locations in a radius of %d and boosting defense by %d."):tformat(eff.range, eff.def) end, type = "mental", subtype = { tactic=true }, status = "beneficial", @@ -2782,8 +2782,8 @@ newEffect{ newEffect{ name = "STATIC_CHARGE", image = "talents/static_net.png", - desc = "Static Charge", - long_desc = function(self, eff) return ("You have accumulated an electric charge. Your next melee hit does %d extra lightning damage."):format(eff.power) end, + desc = _t"Static Charge", + long_desc = function(self, eff) return ("You have accumulated an electric charge. Your next melee hit does %d extra lightning damage."):tformat(eff.power) end, type = "mental", subtype = { lightning=true }, status = "beneficial", @@ -2809,8 +2809,8 @@ newEffect{ newEffect{ name = "HEART_STARTED", image = "talents/heartstart.png", - desc = "Heart Started", - long_desc = function(self, eff) return ("A psionic charge is keeping your heart pumping, allowing you to survive to %+d health."):format(-eff.power) end, + desc = _t"Heart Started", + long_desc = function(self, eff) return ("A psionic charge is keeping your heart pumping, allowing you to survive to %+d health."):tformat(-eff.power) end, type = "mental", subtype = { lightning=true }, status = "beneficial", @@ -2824,8 +2824,8 @@ newEffect{ newEffect{ name = "TRANSCENDENT_TELEKINESIS", image = "talents/transcendent_telekinesis.png", - desc = "Transcendent Telekinesis", - long_desc = function(self, eff) return ("Your telekinesis transcends normal limits. +%d Physical damage and +%d%% Physical damage penetration, and improved kinetic effects."):format(eff.power, eff.penetration) end, + desc = _t"Transcendent Telekinesis", + long_desc = function(self, eff) return ("Your telekinesis transcends normal limits. +%d Physical damage and +%d%% Physical damage penetration, and improved kinetic effects."):tformat(eff.power, eff.penetration) end, type = "mental", subtype = { physical=true }, status = "beneficial", @@ -2844,8 +2844,8 @@ newEffect{ newEffect{ name = "TRANSCENDENT_PYROKINESIS", image = "talents/transcendent_pyrokinesis.png", - desc = "Transcendent Pyrokinesis", - long_desc = function(self, eff) return ("Your pyrokinesis transcends normal limits. +%d%% Fire/Cold damage and +%d%% Fire/Cold damage penetration, and improved thermal effects."):format(eff.power, eff.penetration) end, + desc = _t"Transcendent Pyrokinesis", + long_desc = function(self, eff) return ("Your pyrokinesis transcends normal limits. +%d%% Fire/Cold damage and +%d%% Fire/Cold damage penetration, and improved thermal effects."):tformat(eff.power, eff.penetration) end, type = "mental", subtype = { fire=true, cold=true }, status = "beneficial", @@ -2864,8 +2864,8 @@ newEffect{ newEffect{ name = "TRANSCENDENT_ELECTROKINESIS", image = "talents/transcendent_electrokinesis.png", - desc = "Transcendent Electrokinesis", - long_desc = function(self, eff) return ("Your electrokinesis transcends normal limits. +%d%% Lightning damage and +%d%% Lightning damage penetration, and improved charged effects."):format(eff.power, eff.penetration) end, + desc = _t"Transcendent Electrokinesis", + long_desc = function(self, eff) return ("Your electrokinesis transcends normal limits. +%d%% Lightning damage and +%d%% Lightning damage penetration, and improved charged effects."):tformat(eff.power, eff.penetration) end, type = "mental", subtype = { lightning=true }, status = "beneficial", @@ -2884,14 +2884,14 @@ newEffect{ newEffect{ name = "PSI_DAMAGE_SHIELD", image = "talents/barrier.png", - desc = "Psionic Damage Shield", - long_desc = function(self, eff) return ("The target is surrounded by a psionic shield, absorbing %d/%d damage before it crumbles."):format(self.damage_shield_absorb, eff.power) end, + desc = _t"Psionic Damage Shield", + long_desc = function(self, eff) return ("The target is surrounded by a psionic shield, absorbing %d/%d damage before it crumbles."):tformat(self.damage_shield_absorb, eff.power) end, type = "mental", subtype = { psionic=true, shield=true }, status = "beneficial", parameters = { power=100 }, - on_gain = function(self, err) return "A psionic shield forms around #target#.", "+Shield" end, - on_lose = function(self, err) return "The psionic shield around #target# crumbles.", "-Shield" end, + on_gain = function(self, err) return _t"A psionic shield forms around #target#.", _t"+Shield" end, + on_lose = function(self, err) return _t"The psionic shield around #target# crumbles.", _t"-Shield" end, damage_feedback = function(self, eff, src, value) if eff.particle and eff.particle._shader and eff.particle._shader.shad and src and src.x and src.y then local r = -rng.float(0.2, 0.4) @@ -2923,22 +2923,22 @@ newEffect{ } newEffect{ - name = "UNSEEN_FORCE", desc = "Unseen Force", + name = "UNSEEN_FORCE", desc = _t"Unseen Force", image="talents/unseen_force.png", long_desc = function(self, eff) local hits = (eff.extrahit > 0 and "from "..eff.hits.." to "..(eff.hits + 1)) or ""..eff.hits return ("An unseen force strikes %s targets in a range of %d around this creature ".. - "every turn, doing %d damage and knocking them back for %d tiles."):format(hits, eff.range, eff.damage, eff.knockback) end, + "every turn, doing %d damage and knocking them back for %d tiles."):tformat(hits, eff.range, eff.damage, eff.knockback) end, type = "mental", subtype = {psionic=true}, status = "beneficial", activate = function(self, eff) - game.logSeen(self, "An unseen force begins to swirl around %s!", self.name) + game.logSeen(self, "An unseen force begins to swirl around %s!", self:getName()) eff.particles = self:addParticles(Particles.new("force_area", 1, { radius = self:getTalentRange(self.T_UNSEEN_FORCE) })) end, deactivate = function(self, eff) self:removeParticles(eff.particles) - game.logSeen(self, "The unseen force around %s subsides.", self.name) + game.logSeen(self, "The unseen force around %s subsides.", self:getName()) end, on_timeout = function(self, eff) local targets = {} @@ -2968,8 +2968,8 @@ newEffect{ newEffect{ name = "PSIONIC_MAELSTROM", image = "talents/psionic_maelstrom.png", - desc = "Psionic Maelstrom", - long_desc = function(self, eff) return ("This creature is standing in the eye of a powerful storm of psionic forces."):format() end, + desc = _t"Psionic Maelstrom", + long_desc = function(self, eff) return ("This creature is standing in the eye of a powerful storm of psionic forces."):tformat() end, type = "mental", subtype = { psionic=true }, status = "beneficial", @@ -3018,8 +3018,8 @@ newEffect{ newEffect{ name = "CAUGHT_LIGHTNING", image = "talents/transcendent_electrokinesis.png", - desc = "Caught Lightning", - long_desc = function(self, eff) return ("Lightning Catcher has caught energy and is empowering you for +%d%% lightning damage and +%d to all stats."):format((eff.dur+1)*5, eff.dur+1) end, + desc = _t"Caught Lightning", + long_desc = function(self, eff) return ("Lightning Catcher has caught energy and is empowering you for +%d%% lightning damage and +%d to all stats."):tformat((eff.dur+1)*5, eff.dur+1) end, type = "mental", subtype = { lightning=true }, status = "beneficial", diff --git a/game/modules/tome/data/timed_effects/other.lua b/game/modules/tome/data/timed_effects/other.lua index 837f27a9c661eecc897209a2c369faf4d7399de5..48df28488ce703350ad0348785665673eba401b0 100644 --- a/game/modules/tome/data/timed_effects/other.lua +++ b/game/modules/tome/data/timed_effects/other.lua @@ -28,8 +28,8 @@ local Combat = require "mod.class.interface.Combat" -- Elemental Surge effects here to avoid interaction with duration increases since so many can be up at once newEffect{ name = "ETHEREAL_FORM", image = "talents/displace_damage.png", - desc = "Ethereal Form", - long_desc = function(self, eff) return ("Ethereal Form bonuses reduced by %d%%"):format(eff.stacks * 5) end, + desc = _t"Ethereal Form", + long_desc = function(self, eff) return ("Ethereal Form bonuses reduced by %d%%"):tformat(eff.stacks * 5) end, type = "other", subtype = { }, status = "detrimental", @@ -61,8 +61,8 @@ newEffect{ newEffect{ name = "ELEMENTAL_SURGE_ARCANE", image = "talents/elemental_surge.png", - desc = "Elemental Surge: Arcane", - long_desc = function(self, eff) return ("Spell and mind speed increased by 30%") end, + desc = _t"Elemental Surge: Arcane", + long_desc = function(self, eff) return (_t"Spell and mind speed increased by 30%") end, type = "other", subtype = {elemental = true }, status = "beneficial", @@ -75,8 +75,8 @@ newEffect{ newEffect{ name = "ELEMENTAL_SURGE_PHYSICAL", image = "talents/elemental_surge.png", - desc = "Elemental Surge: Physical", - long_desc = function(self, eff) return ("Immune to detrimental physical effects") end, + desc = _t"Elemental Surge: Physical", + long_desc = function(self, eff) return (_t"Immune to detrimental physical effects") end, type = "other", subtype = {elemental = true }, status = "beneficial", @@ -88,8 +88,8 @@ newEffect{ newEffect{ name = "ELEMENTAL_SURGE_NATURE", image = "talents/elemental_surge.png", - desc = "Elemental Surge: Nature", - long_desc = function(self, eff) return ("Immune to detrimental magical effects") end, + desc = _t"Elemental Surge: Nature", + long_desc = function(self, eff) return (_t"Immune to detrimental magical effects") end, type = "other", subtype = {elemental = true }, status = "beneficial", @@ -101,8 +101,8 @@ newEffect{ newEffect{ name = "ELEMENTAL_SURGE_FIRE", image = "talents/elemental_surge.png", - desc = "Elemental Surge: Fire", - long_desc = function(self, eff) return ("All damage increased by %d%%"):format(eff.damage) end, + desc = _t"Elemental Surge: Fire", + long_desc = function(self, eff) return ("All damage increased by %d%%"):tformat(eff.damage) end, type = "other", subtype = {elemental = true }, status = "beneficial", @@ -114,8 +114,8 @@ newEffect{ newEffect{ name = "ELEMENTAL_SURGE_COLD", image = "talents/elemental_surge.png", - desc = "Elemental Surge: Cold", - long_desc = function(self, eff) return ("Armor increased by %d, deals %d ice damage when hit in melee."):format(eff.armor, eff.dam) end, + desc = _t"Elemental Surge: Cold", + long_desc = function(self, eff) return ("Armor increased by %d, deals %d ice damage when hit in melee."):tformat(eff.armor, eff.dam) end, type = "other", subtype = {elemental = true }, status = "beneficial", @@ -128,8 +128,8 @@ newEffect{ newEffect{ name = "ELEMENTAL_SURGE_LIGHTNING", image = "talents/elemental_surge.png", - desc = "Elemental Surge: Lightning", - long_desc = function(self, eff) return ("Movement speed increased by %d%%."):format(eff.move) end, + desc = _t"Elemental Surge: Lightning", + long_desc = function(self, eff) return ("Movement speed increased by %d%%."):tformat(eff.move) end, type = "other", subtype = {elemental = true }, status = "beneficial", @@ -141,8 +141,8 @@ newEffect{ newEffect{ name = "ELEMENTAL_SURGE_LIGHT", image = "talents/elemental_surge.png", - desc = "Elemental Surge: Light", - long_desc = function(self, eff) return ("All talent cooldowns reduced by %d%%."):format(eff.cooldown) end, + desc = _t"Elemental Surge: Light", + long_desc = function(self, eff) return ("All talent cooldowns reduced by %d%%."):tformat(eff.cooldown) end, type = "other", subtype = {elemental = true }, status = "beneficial", @@ -154,8 +154,8 @@ newEffect{ newEffect{ name = "SURGING_CIRCLES", image = "talents/celestial_surge.png", - desc = "Circle Surge", - long_desc = function(self, eff) return [[Residual power from the surge is emanating from the circles. + desc = _t"Circle Surge", + long_desc = function(self, eff) return _t[[Residual power from the surge is emanating from the circles. Shifting Shadows: +1 negative. Sanctity: +1 postive. Warding: +0.5 postive and negative.]] end, @@ -167,12 +167,12 @@ newEffect{ newEffect{ name = "FLASH_SHIELD", image = "talents/flash_of_the_blade.png", - desc = "Protected by the Sun", - long_desc = function(self, eff) return "The Sun has granted a brief immunity to all damage." end, + desc = _t"Protected by the Sun", + long_desc = function(self, eff) return _t"The Sun has granted a brief immunity to all damage." end, type = "other", subtype = {}, status = "beneficial", - on_gain = function(self, err) return "#Target# whirls around and a radiant shield surrounds them!", "+Divine Shield" end, + on_gain = function(self, err) return _t"#Target# whirls around and a radiant shield surrounds them!", _t"+Divine Shield" end, parameters = {}, activate = function(self, eff) self:effectTemporaryValue(eff, "cancel_damage_chance", 100) @@ -185,14 +185,14 @@ newEffect{ -- type other because this is a core defensive mechanic in debuff form, it should not interact with saves newEffect{ name = "ABSORPTION_STRIKE", image = "talents/absorption_strike.png", - desc = "Absorption Strike", - long_desc = function(self, eff) return ("The target's light has been drained, reducing light resistance by %d%% and damage by %d%%."):format(eff.power, eff.numb) end, + desc = _t"Absorption Strike", + long_desc = function(self, eff) return ("The target's light has been drained, reducing light resistance by %d%% and damage by %d%%."):tformat(eff.power, eff.numb) end, type = "other", subtype = { sun=true, }, status = "detrimental", parameters = { power = 10, numb = 1 }, - on_gain = function(self, err) return "#Target# is drained from light!", "+Absorption Strike" end, - on_lose = function(self, err) return "#Target#'s light is back.", "-Absorption Strike" end, + on_gain = function(self, err) return _t"#Target# is drained from light!", _t"+Absorption Strike" end, + on_lose = function(self, err) return _t"#Target#'s light is back.", _t"-Absorption Strike" end, activate = function(self, eff) self:effectTemporaryValue(eff, "resists", {[DamageType.LIGHT]=-eff.power}) self:effectTemporaryValue(eff, "numbed", eff.numb) @@ -201,8 +201,8 @@ newEffect{ newEffect{ name = "ITEM_CHARM_PIERCING", image = "talents/intricate_tools.png", - desc = "Charm: Piercing", - long_desc = function(self, eff) return ("All damage penetration increased by %d%%."):format(eff.penetration) end, + desc = _t"Charm: Piercing", + long_desc = function(self, eff) return ("All damage penetration increased by %d%%."):tformat(eff.penetration) end, type = "other", subtype = { }, status = "beneficial", @@ -216,8 +216,8 @@ newEffect{ newEffect{ name = "ITEM_CHARM_POWERFUL", image = "talents/intricate_tools.png", - desc = "Charm: Damage", - long_desc = function(self, eff) return ("All damage increased by %d%%."):format(eff.damage) end, + desc = _t"Charm: Damage", + long_desc = function(self, eff) return ("All damage increased by %d%%."):tformat(eff.damage) end, type = "other", subtype = { }, status = "beneficial", @@ -231,8 +231,8 @@ newEffect{ newEffect{ name = "ITEM_CHARM_SAVIOR", image = "talents/intricate_tools.png", - desc = "Charm: Saves", - long_desc = function(self, eff) return ("All saves increased by %d."):format(eff.save) end, + desc = _t"Charm: Saves", + long_desc = function(self, eff) return ("All saves increased by %d."):tformat(eff.save) end, type = "other", subtype = { }, status = "beneficial", @@ -248,8 +248,8 @@ newEffect{ newEffect{ name = "ITEM_CHARM_EVASIVE", image = "talents/intricate_tools.png", - desc = "Charm: Evasion", - long_desc = function(self, eff) return ("%d%% chance to avoid weapon attacks"):format(eff.chance) end, + desc = _t"Charm: Evasion", + long_desc = function(self, eff) return ("%d%% chance to avoid weapon attacks"):tformat(eff.chance) end, type = "other", subtype = { }, status = "beneficial", @@ -263,8 +263,8 @@ newEffect{ newEffect{ name = "ITEM_CHARM_INNERVATING", image = "talents/intricate_tools.png", - desc = "Charm: Innervating", - long_desc = function(self, eff) return ("Fatigue reduced by %d%%."):format(eff.fatigue) end, + desc = _t"Charm: Innervating", + long_desc = function(self, eff) return ("Fatigue reduced by %d%%."):tformat(eff.fatigue) end, type = "other", subtype = { }, status = "beneficial", @@ -279,14 +279,14 @@ newEffect{ -- Design: Temporary immobility in exchange for a large stat buff. newEffect{ name = "TREE_OF_LIFE", image = "shockbolt/object/artifact/tree_of_life.png", - desc = "You have taken root!", - long_desc = function(self, eff) return "You have taken root becoming one with nature. Or at least the ground. Your health, armor, and armor hardiness are improved but you cannot move." end, + desc = _t"You have taken root!", + long_desc = function(self, eff) return _t"You have taken root becoming one with nature. Or at least the ground. Your health, armor, and armor hardiness are improved but you cannot move." end, type = "other", subtype = { nature=true }, --status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#LIGHT_BLUE##Target# takes root.", "+Pinned" end, - on_lose = function(self, err) return "#LIGHT_BLUE##Target# is no longer a badass tree.", "-Pinned" end, + on_gain = function(self, err) return _t"#LIGHT_BLUE##Target# takes root.", _t"+Pinned" end, + on_lose = function(self, err) return _t"#LIGHT_BLUE##Target# is no longer a badass tree.", _t"-Pinned" end, activate = function(self, eff) self:effectTemporaryValue(eff, "never_move", 1) self:effectTemporaryValue(eff, "max_life", 300) @@ -313,8 +313,8 @@ newEffect{ newEffect{ name = "INFUSION_COOLDOWN", image = "effects/infusion_cooldown.png", - desc = "Infusion Saturation", - long_desc = function(self, eff) return ("The more you use infusions, the longer they will take to recharge (+%d cooldowns)."):format(eff.power) end, + desc = _t"Infusion Saturation", + long_desc = function(self, eff) return ("The more you use infusions, the longer they will take to recharge (+%d cooldowns)."):tformat(eff.power) end, charges = function(self, eff) return eff.power end, type = "other", subtype = { infusion=true }, @@ -330,8 +330,8 @@ newEffect{ newEffect{ name = "RUNE_COOLDOWN", image = "effects/rune_cooldown.png", - desc = "Runic Saturation", - long_desc = function(self, eff) return ("The more you use runes, the longer they will take to recharge (+%d cooldowns)."):format(eff.power) end, + desc = _t"Runic Saturation", + long_desc = function(self, eff) return ("The more you use runes, the longer they will take to recharge (+%d cooldowns)."):tformat(eff.power) end, charges = function(self, eff) return eff.power end, type = "other", subtype = { rune=true }, @@ -347,8 +347,8 @@ newEffect{ newEffect{ name = "TAINT_COOLDOWN", image = "effects/tainted_cooldown.png", - desc = "Tainted", - long_desc = function(self, eff) return ("The more you use taints, the longer they will take to recharge (+%d cooldowns)."):format(eff.power) end, + desc = _t"Tainted", + long_desc = function(self, eff) return ("The more you use taints, the longer they will take to recharge (+%d cooldowns)."):tformat(eff.power) end, type = "other", subtype = { taint=true }, status = "detrimental", @@ -363,8 +363,8 @@ newEffect{ newEffect{ name = "PATH_OF_THE_SUN", image = "talents/path_of_the_sun.png", - desc = "Path of the Sun", - long_desc = function(self, eff) return ("The target is able to instantly travel alongside Sun Paths."):format() end, + desc = _t"Path of the Sun", + long_desc = function(self, eff) return ("The target is able to instantly travel alongside Sun Paths."):tformat() end, type = "other", subtype = { sun=true, }, status = "beneficial", @@ -376,15 +376,15 @@ newEffect{ newEffect{ name = "TIME_PRISON", image = "talents/time_prison.png", - desc = "Time Prison", - long_desc = function(self, eff) return "The target is removed from the normal time stream, unable to act but unable to take any damage. Time does not pass for this creature." end, + desc = _t"Time Prison", + long_desc = function(self, eff) return _t"The target is removed from the normal time stream, unable to act but unable to take any damage. Time does not pass for this creature." end, type = "other", subtype = { time=true }, status = "detrimental", tick_on_timeless = true, parameters = {}, - on_gain = function(self, err) return "#Target# is removed from time!", "+Out of Time" end, - on_lose = function(self, err) return "#Target# is returned to normal time.", "-Out of Time" end, + on_gain = function(self, err) return _t"#Target# is removed from time!", _t"+Out of Time" end, + on_lose = function(self, err) return _t"#Target# is returned to normal time.", _t"-Out of Time" end, activate = function(self, eff) eff.iid = self:addTemporaryValue("invulnerable", 1) eff.sid = self:addTemporaryValue("time_prison", 1) @@ -411,14 +411,14 @@ newEffect{ newEffect{ name = "TIME_SHIELD", image = "talents/time_shield.png", - desc = "Time Shield", - long_desc = function(self, eff) return ("The target is surrounded by a time distortion, absorbing %d/%d damage and sending it forward in time. While active all newly applied status effects durations are reduced by %d%%."):format(self.time_shield_absorb, eff.power, eff.time_reducer) end, + desc = _t"Time Shield", + long_desc = function(self, eff) return ("The target is surrounded by a time distortion, absorbing %d/%d damage and sending it forward in time. While active all newly applied status effects durations are reduced by %d%%."):tformat(self.time_shield_absorb, eff.power, eff.time_reducer) end, type = "other", subtype = { time=true, shield=true }, status = "beneficial", parameters = { power=10, dot_dur=5, time_reducer=20 }, - on_gain = function(self, err) return "The very fabric of time alters around #target#.", "+Time Shield" end, - on_lose = function(self, err) return "The fabric of time around #target# stabilizes to normal.", "-Time Shield" end, + on_gain = function(self, err) return _t"The very fabric of time alters around #target#.", _t"+Time Shield" end, + on_lose = function(self, err) return _t"The fabric of time around #target# stabilizes to normal.", _t"-Time Shield" end, on_aegis = function(self, eff, aegis) self.time_shield_absorb = self.time_shield_absorb + eff.power * aegis / 100 if core.shader.active(4) then @@ -468,14 +468,14 @@ newEffect{ newEffect{ name = "TIME_DOT", - desc = "Temporal Restoration Field", - long_desc = function(self, eff) return ("The time distortion has created a restoration field, healing the target for %d each turn."):format(eff.power) end, + desc = _t"Temporal Restoration Field", + long_desc = function(self, eff) return ("The time distortion has created a restoration field, healing the target for %d each turn."):tformat(eff.power) end, type = "other", subtype = { time=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "The powerful time-altering energies generate a restoration field on #target#.", "+Temporal Restoration Field" end, - on_lose = function(self, err) return "The fabric of time around #target# returns to normal.", "-Temporal Restoration Field" end, + on_gain = function(self, err) return _t"The powerful time-altering energies generate a restoration field on #target#.", _t"+Temporal Restoration Field" end, + on_lose = function(self, err) return _t"The fabric of time around #target# returns to normal.", _t"-Temporal Restoration Field" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("time_shield", 1)) end, @@ -489,13 +489,13 @@ newEffect{ newEffect{ name = "GOLEM_OFS", - desc = "Golem out of sight", - long_desc = function(self, eff) return "The golem is out of sight of the alchemist; direct control will be lost!" end, + desc = _t"Golem out of sight", + long_desc = function(self, eff) return _t"The golem is out of sight of the alchemist; direct control will be lost!" end, type = "other", subtype = { miscellaneous=true }, status = "detrimental", parameters = { }, - on_gain = function(self, err) return "#LIGHT_RED##Target# is out of sight of its master; direct control will break!.", "+Out of sight" end, + on_gain = function(self, err) return _t"#LIGHT_RED##Target# is out of sight of its master; direct control will break!.", _t"+Out of sight" end, activate = function(self, eff) end, deactivate = function(self, eff) @@ -506,8 +506,8 @@ newEffect{ if eff.dur <= 1 then game:onTickEnd(function() game.logPlayer(self, "#LIGHT_RED#You lost sight of your golem for too long; direct control is broken!") - game.player:runStop("golem out of sight") - game.player:restStop("golem out of sight") + game.player:runStop(_t"golem out of sight") + game.player:restStop(_t"golem out of sight") game.party:setPlayer(self.summoner) end) end @@ -516,13 +516,13 @@ newEffect{ newEffect{ name = "AMBUSCADE_OFS", image = "talents/ambuscade.png", - desc = "Shadow out of sight", - long_desc = function(self, eff) return "The shadow is out of sight of its host; direct control will be lost!" end, + desc = _t"Shadow out of sight", + long_desc = function(self, eff) return _t"The shadow is out of sight of its host; direct control will be lost!" end, type = "other", subtype = { miscellaneous=true }, status = "detrimental", parameters = { }, - on_gain = function(self, err) return "#LIGHT_RED##Target# is out of sight of its master; direct control will break!.", "+Out of sight" end, + on_gain = function(self, err) return _t"#LIGHT_RED##Target# is out of sight of its master; direct control will break!.", _t"+Out of sight" end, activate = function(self, eff) end, deactivate = function(self, eff) @@ -533,8 +533,8 @@ newEffect{ if eff.dur <= 1 then game:onTickEnd(function() game.logPlayer(self, "#LIGHT_RED#You lost sight of your shadow for too long; it dissipates!") - game.player:runStop("shadow out of sight") - game.player:restStop("shadow out of sight") + game.player:runStop(_t"shadow out of sight") + game.player:restStop(_t"shadow out of sight") game.party:setPlayer(self.summoner) end) end @@ -543,13 +543,13 @@ newEffect{ newEffect{ name = "HUSK_OFS", image = "talents/animus_purge.png", - desc = "Husk out of sight", - long_desc = function(self, eff) return "The husk is out of sight of its host; direct control will be lost!" end, + desc = _t"Husk out of sight", + long_desc = function(self, eff) return _t"The husk is out of sight of its host; direct control will be lost!" end, type = "other", subtype = { miscellaneous=true }, status = "detrimental", parameters = { }, - on_gain = function(self, err) return "#LIGHT_RED##Target# is out of sight of its master; direct control will break!.", "+Out of sight" end, + on_gain = function(self, err) return _t"#LIGHT_RED##Target# is out of sight of its master; direct control will break!.", _t"+Out of sight" end, activate = function(self, eff) end, deactivate = function(self, eff) @@ -560,8 +560,8 @@ newEffect{ if eff.dur <= 1 then game:onTickEnd(function() game.logPlayer(self, "#LIGHT_RED#You lost sight of your husk for too long; it disintegrates!") - game.player:runStop("husk out of sight") - game.player:restStop("husk out of sight") + game.player:runStop(_t"husk out of sight") + game.player:restStop(_t"husk out of sight") game.party:setPlayer(self.summoner) self:die(self) end) @@ -571,14 +571,14 @@ newEffect{ newEffect{ name = "CONTINUUM_DESTABILIZATION", - desc = "Continuum Destabilization", - long_desc = function(self, eff) return ("The target has been affected by space or time manipulations and is becoming more resistant to them (+%d)."):format(eff.power) end, + desc = _t"Continuum Destabilization", + long_desc = function(self, eff) return ("The target has been affected by space or time manipulations and is becoming more resistant to them (+%d)."):tformat(eff.power) end, type = "other", subtype = { time=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# looks a little pale around the edges.", "+Destabilized" end, - on_lose = function(self, err) return "#Target# is firmly planted in reality.", "-Destabilized" end, + on_gain = function(self, err) return _t"#Target# looks a little pale around the edges.", _t"+Destabilized" end, + on_lose = function(self, err) return _t"#Target# is firmly planted in reality.", _t"-Destabilized" end, on_merge = function(self, old_eff, new_eff) -- Merge the continuum_destabilization local olddam = old_eff.power * old_eff.dur @@ -601,8 +601,8 @@ newEffect{ newEffect{ name = "SUMMON_DESTABILIZATION", - desc = "Summoning Destabilization", - long_desc = function(self, eff) return ("The more the target summons creatures the longer it will take to summon more (+%d turns)."):format(eff.power) end, + desc = _t"Summoning Destabilization", + long_desc = function(self, eff) return ("The more the target summons creatures the longer it will take to summon more (+%d turns)."):tformat(eff.power) end, type = "other", -- Type "other" so that nothing can dispel it subtype = { miscellaneous=true }, status = "detrimental", @@ -627,14 +627,14 @@ newEffect{ newEffect{ name = "DAMAGE_SMEARING", image = "talents/damage_smearing.png", - desc = "Damage Smearing", - long_desc = function(self, eff) return ("Damage received in the past is returned as %0.2f temporal damage per turn."):format(eff.dam) end, + desc = _t"Damage Smearing", + long_desc = function(self, eff) return ("Damage received in the past is returned as %0.2f temporal damage per turn."):tformat(eff.dam) end, type = "other", subtype = { time=true }, status = "detrimental", parameters = { dam=10 }, - on_gain = function(self, err) return "#Target# is taking damage received in the past!", "+Smeared" end, - on_lose = function(self, err) return "#Target# stops taking damage received in the past.", "-Smeared" end, + on_gain = function(self, err) return _t"#Target# is taking damage received in the past!", _t"+Smeared" end, + on_lose = function(self, err) return _t"#Target# stops taking damage received in the past.", _t"-Smeared" end, on_merge = function(self, old_eff, new_eff) -- Merge the flames! local olddam = old_eff.dam * old_eff.dur @@ -645,14 +645,14 @@ newEffect{ on_timeout = function(self, eff) local dead, val = self:takeHit(eff.dam, self, {special_death_msg="was smeared across all space and time"}) - game:delayedLogDamage(eff, self, val, ("%s%d %s#LAST#"):format(DamageType:get(DamageType.TEMPORAL).text_color or "#aaaaaa#", math.ceil(val), DamageType:get(DamageType.TEMPORAL).name), false) + game:delayedLogDamage(eff, self, val, ("%s%d %s#LAST#"):tformat(DamageType:get(DamageType.TEMPORAL).text_color or "#aaaaaa#", math.ceil(val), DamageType:get(DamageType.TEMPORAL).name), false) end, } newEffect{ name = "SEE_THREADS", image = "talents/see_the_threads.png", - desc = "See the Threads", - long_desc = function(self, eff) return ("You walk three different timelines, choosing the one you prefer at the end (current timeline: %d)."):format(eff.thread) end, + desc = _t"See the Threads", + long_desc = function(self, eff) return ("You walk three different timelines, choosing the one you prefer at the end (current timeline: %d)."):tformat(eff.thread) end, type = "other", subtype = { time=true }, status = "beneficial", @@ -706,7 +706,7 @@ newEffect{ return else game._chronoworlds.see_threads_base = nil - local chat = Chat.new("chronomancy-see-threads", {name="See the Threads"}, self, {turns=eff.max_dur}) + local chat = Chat.new("chronomancy-see-threads", {name=_t"See the Threads"}, self, {turns=eff.max_dur}) chat:invoke() end end) @@ -715,8 +715,8 @@ newEffect{ newEffect{ name = "IMMINENT_PARADOX_CLONE", - desc = "Imminent Paradox Clone", - long_desc = function(self, eff) return "When the effect expires you'll be pulled into the past." end, + desc = _t"Imminent Paradox Clone", + long_desc = function(self, eff) return _t"When the effect expires you'll be pulled into the past." end, type = "other", subtype = { time=true }, status = "detrimental", @@ -767,8 +767,8 @@ newEffect{ newEffect{ name = "PARADOX_CLONE", image = "talents/paradox_clone.png", - desc = "Paradox Clone", - long_desc = function(self, eff) return "You've been pulled into the past." end, + desc = _t"Paradox Clone", + long_desc = function(self, eff) return _t"You've been pulled into the past." end, type = "other", subtype = { time=true }, status = "detrimental", @@ -792,8 +792,8 @@ newEffect{ newEffect{ name = "MILITANT_MIND", image = "talents/militant_mind.png", - desc = "Militant Mind", - long_desc = function(self, eff) return ("Increases physical power, physical save, spellpower, spell save, mindpower, and mental save by %d."):format(eff.power) end, + desc = _t"Militant Mind", + long_desc = function(self, eff) return ("Increases physical power, physical save, spellpower, spell save, mindpower, and mental save by %d."):tformat(eff.power) end, type = "other", subtype = { miscellaneous=true }, status = "beneficial", @@ -818,13 +818,13 @@ newEffect{ newEffect{ name = "SEVER_LIFELINE", image = "talents/sever_lifeline.png", - desc = "Sever Lifeline", - long_desc = function(self, eff) return ("The target's lifeline is being cut. When the effect ends %d temporal damage will hit the target."):format(eff.power) end, + desc = _t"Sever Lifeline", + long_desc = function(self, eff) return ("The target's lifeline is being cut. When the effect ends %d temporal damage will hit the target."):tformat(eff.power) end, type = "other", subtype = { time=true }, status = "detrimental", parameters = {power=10000}, - on_gain = function(self, err) return "#Target#'s lifeline is being severed!", "+Sever Lifeline" end, + on_gain = function(self, err) return _t"#Target#'s lifeline is being severed!", _t"+Sever Lifeline" end, deactivate = function(self, eff) if not eff.src or eff.src.dead then return end if not eff.src:hasLOS(self.x, self.y) then return end @@ -835,15 +835,15 @@ newEffect{ newEffect{ name = "FADE_FROM_TIME", image = "talents/fade_from_time.png", - desc = "Fade From Time", + desc = _t"Fade From Time", long_desc = function(self, eff) return ("The target is partially removed from the timeline, reducing all damage dealt by %d%%, all damage received by %d%%, and the duration of all detrimental effects by %d%%."): - format(math.min(20,eff.dur * 2 + 2), eff.cur_power or eff.power, eff.cur_dur or eff.durred) end, + tformat(math.min(20,eff.dur * 2 + 2), eff.cur_power or eff.power, eff.cur_dur or eff.durred) end, type = "other", subtype = { time=true }, status = "beneficial", parameters = { power=10 ,durred = 15 }, - on_gain = function(self, err) return "#Target# has partially removed itself from the timeline.", "+Fade From Time" end, - on_lose = function(self, err) return "#Target# has returned fully to the timeline.", "-Fade From Time" end, + on_gain = function(self, err) return _t"#Target# has partially removed itself from the timeline.", _t"+Fade From Time" end, + on_lose = function(self, err) return _t"#Target# has returned fully to the timeline.", _t"-Fade From Time" end, on_merge = function(self, old_eff, new_eff) self:removeTemporaryValue("inc_damage", old_eff.dmgid) self:removeTemporaryValue("resists", old_eff.rstid) @@ -876,14 +876,14 @@ newEffect{ newEffect{ name = "SHADOW_VEIL", image = "talents/shadow_veil.png", - desc = "Shadow Veil", - long_desc = function(self, eff) return ("You veil yourself in shadows and let them control you. While in the veil you become immune to status effects, and gain %d%% all damage reduction. Each turn you blink to a nearby foe within range %d, hitting it for %d%% darkness weapon damage. While this goes on you cannot be stopped unless you are killed, and you cannot control your character."):format(eff.res, eff.range, eff.dam * 100) end, + desc = _t"Shadow Veil", + long_desc = function(self, eff) return ("You veil yourself in shadows and let them control you. While in the veil you become immune to status effects, and gain %d%% all damage reduction. Each turn you blink to a nearby foe within range %d, hitting it for %d%% darkness weapon damage. While this goes on you cannot be stopped unless you are killed, and you cannot control your character."):tformat(eff.res, eff.range, eff.dam * 100) end, type = "other", subtype = { darkness=true }, status = "beneficial", parameters = { res=10, dam=1.5, range=5, x=0, y=0}, - on_gain = function(self, err) return "#Target# is covered in a veil of shadows!", "+Assail" end, - on_lose = function(self, err) return "#Target# is no longer covered by shadows.", "-Assail" end, + on_gain = function(self, err) return _t"#Target# is covered in a veil of shadows!", _t"+Assail" end, + on_lose = function(self, err) return _t"#Target# is no longer covered by shadows.", _t"-Assail" end, activate = function(self, eff) eff.sefid = self:addTemporaryValue("negative_status_effect_immune", 1) eff.resid = self:addTemporaryValue("resists", {all=eff.res}) @@ -925,9 +925,9 @@ newEffect{ newEffect{ name = "ZERO_GRAVITY", image = "effects/zero_gravity.png", - desc = "Zero Gravity", + desc = _t"Zero Gravity", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("There is no gravity here; you float in the air. Movement is three times as slow, and any melee or archery blows have a chance to knockback. Maximum encumbrance is greatly increased.") end, + long_desc = function(self, eff) return (_t"There is no gravity here; you float in the air. Movement is three times as slow, and any melee or archery blows have a chance to knockback. Maximum encumbrance is greatly increased.") end, decrease = 0, no_remove = true, type = "other", subtype = { spacetime=true }, @@ -950,8 +950,8 @@ newEffect{ newEffect{ name = "CURSE_OF_CORPSES", - desc = "Curse of Corpses", - short_desc = "Corpses", + desc = _t"Curse of Corpses", + short_desc = _t"Corpses", type = "other", subtype = { curse=true }, status = "beneficial", @@ -973,7 +973,7 @@ newEffect{ getRetchLevel = function(level) return math.max(1, level - 2) end, getRetchCD = function(level) return math.max(16, math.floor(30 - level * 2)) end, getReprieveChance = function(level) return Combat:combatLimit(level-4, 100, 35, 0, 50, 5) end, -- Limit < 100% - display_desc = function(self, eff) return ([[Curse of Corpses (power %0.1f)]]):format(eff.level) end, + display_desc = function(self, eff) return ([[Curse of Corpses (power %0.1f)]]):tformat(eff.level) end, long_desc = function(self, eff) local def, level, bonusLevel = self.tempeffect_def[self.EFF_CURSE_OF_CORPSES], eff.level, math.min(eff.unlockLevel, eff.level) return ([[An aura of death surrounds you. @@ -981,7 +981,7 @@ newEffect{ #CRIMSON#Power 1+: %sPower over Death: %+d%% damage against the undead. #CRIMSON#Power 2+: %s%+d Luck, %+d Strength, %+d Magic #CRIMSON#Power 3+: %sLiving Death: Ghoulish retch heals you. Once every %d turns, retch (level %d) when you fall below %d%% health -#CRIMSON#Power 4+: %sReprieve from Death: Humanoids you slay have a %d%% chance to rise to fight beside you as ghouls for 6 turns.]]):format( +#CRIMSON#Power 4+: %sReprieve from Death: Humanoids you slay have a %d%% chance to rise to fight beside you as ghouls for 6 turns.]]):tformat( def.getResistsUndead(eff, level), bonusLevel >= 1 and "#WHITE#" or "#GREY#", def.getIncDamageUndead(math.max(level, 1)), bonusLevel >= 2 and "#WHITE#" or "#GREY#", def.getLckChange(eff, math.max(level, 2)), def.getStrChange(math.max(level, 2)), def.getMagChange(math.max(level, 2)), @@ -1044,15 +1044,15 @@ newEffect{ local def = self.tempeffect_def[self.EFF_CURSE_OF_CORPSES] local tg = {type="ball", 10, radius=def.getCorpselightRadius(eff.level), talent=t} self:project(tg, target.x, target.y, DamageType.LITE, 1) - game.logSeen(target, "#F53CBE#%s's remains glow with a strange light.", target.name:capitalize()) + game.logSeen(target, "#F53CBE#%s's remains glow with a strange light.", target:getName():capitalize()) end end, ]] npcWalkingCorpse = { - name = "walking corpse", + name = _t"walking corpse", display = "z", color=colors.GREY, image="npc/undead_ghoul_ghoul.png", type = "undead", subtype = "ghoul", - desc = [[This corpse was recently alive but moves as though it is just learning to use its body.]], + desc=_t[[This corpse was recently alive but moves as though it is just learning to use its body.]], body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, no_drops = true, autolevel = "ghoul", @@ -1097,12 +1097,12 @@ newEffect{ -- Add to the party if self.player then m.remove_from_party_on_death = true - game.party:addMember(m, {control="no", type="summon", title="Summon"}) + game.party:addMember(m, {control="no", type="summon", title=_t"Summon"}) end game.level.map:particleEmitter(x, y, 1, "slime") - game.logSeen(m, "#F53CBE#The corpse of the %s pulls itself up to fight for you.", target.name) + game.logSeen(m, "#F53CBE#The corpse of the %s pulls itself up to fight for you.", target:getName()) game:playSoundNear(who, "talents/slime") end) return true @@ -1114,8 +1114,8 @@ newEffect{ newEffect{ name = "CURSE_OF_MADNESS", - desc = "Curse of Madness", - short_desc = "Madness", + desc = _t"Curse of Madness", + short_desc = _t"Madness", type = "other", subtype = { curse=true }, status = "beneficial", @@ -1138,7 +1138,7 @@ newEffect{ getManiaDamagePercent = function(level) return Combat:combatLimit(level - 4, 5, 15, 0, 8, 4) -- Limit > 5% end, - display_desc = function(self, eff) return ([[Curse of Madness (power %0.1f)]]):format(eff.level) end, + display_desc = function(self, eff) return ([[Curse of Madness (power %0.1f)]]):tformat(eff.level) end, long_desc = function(self, eff) local def, level, bonusLevel = self.tempeffect_def[self.EFF_CURSE_OF_MADNESS], eff.level, math.min(eff.unlockLevel, eff.level) return ([[You feel your grip on reality slipping. @@ -1146,7 +1146,7 @@ newEffect{ #CRIMSON#Power 1+: %sUnleashed: %+d%% critical damage, %+d%% off-hand weapon damage #CRIMSON#Power 2+: %s%+d Luck, %+d Dexterity #CRIMSON#Power 3+: %sConspirator: Your madness is contagious. Every time you critically damage a foe there is a %d%% chance to spread one of your current detrimental mental effect to them. -#CRIMSON#Power 4+: %sMania: Once per turn, when an attack does more than %0.1f%% of your life, the remaining cooldown of all your talents is reduced by 1.]]):format( +#CRIMSON#Power 4+: %sMania: Once per turn, when an attack does more than %0.1f%% of your life, the remaining cooldown of all your talents is reduced by 1.]]):tformat( def.getMindResistChange(eff, level), def.getConfusionImmuneChange(eff, level) * 100, bonusLevel >= 1 and "#WHITE#" or "#GREY#", def.getCombatCriticalPowerChange(math.max(level, 1)), def.getOffHandMultChange(math.max(level, 1)), bonusLevel >= 2 and "#WHITE#" or "#GREY#", def.getLckChange(eff, math.max(level, 2)), def.getDexChange(math.max(level, 2)), @@ -1206,7 +1206,7 @@ newEffect{ end end - game.logSeen(self, "#F53CBE#%s's mania hastens cooldowns.", self.name:capitalize()) + game.logSeen(self, "#F53CBE#%s's mania hastens cooldowns.", self:getName():capitalize()) self.turn_procs.CoMania = true return {dam = dam} end @@ -1324,8 +1324,8 @@ newEffect{ newEffect{ name = "CURSE_OF_SHROUDS", - desc = "Curse of Shrouds", - short_desc = "Shrouds", + desc = _t"Curse of Shrouds", + short_desc = _t"Shrouds", type = "other", subtype = { curse=true }, status = "beneficial", @@ -1344,7 +1344,7 @@ newEffect{ end, getConChange = function(level) return -1 + level * 2 end, getShroudResistsAllChange = function(level) return (level - 1) * 5 end, - display_desc = function(self, eff) return ([[Curse of Shrouds (power %0.1f)]]):format(eff.level) end, + display_desc = function(self, eff) return ([[Curse of Shrouds (power %0.1f)]]):tformat(eff.level) end, long_desc = function(self, eff) local def, level, bonusLevel = self.tempeffect_def[self.EFF_CURSE_OF_SHROUDS], eff.level, math.min(eff.unlockLevel, eff.level) return ([[A shroud of darkness seems to fall across your path. @@ -1352,7 +1352,7 @@ newEffect{ #CRIMSON#Power 1+: %sNightwalker: %+d Darkness Resistance, %+d%% Max Darkness Resistance, %+d See Invisible #CRIMSON#Power 2+: %s%+d Luck, %+d Constitution #CRIMSON#Power 3+: %sShroud of Passing: Your form seems to fade as you move, reducing all damage taken by %d%% for 1 turn after movement. -#CRIMSON#Power 4+: %sShroud of Death: The power of every kill seems to envelop you like a shroud, reducing all damage taken by %d%% for 3 turns.]]):format( +#CRIMSON#Power 4+: %sShroud of Death: The power of every kill seems to envelop you like a shroud, reducing all damage taken by %d%% for 3 turns.]]):tformat( -def.getShroudIncDamageChange(eff, level), bonusLevel >= 1 and "#WHITE#" or "#GREY#", def.getResistsDarknessChange(math.max(level, 1)), def.getResistsCapDarknessChange(math.max(level, 1)), def.getSeeInvisible(math.max(level, 1)), bonusLevel >= 2 and "#WHITE#" or "#GREY#", def.getLckChange(eff, math.max(level, 2)), def.getConChange(math.max(level, 2)), @@ -1419,8 +1419,8 @@ newEffect{ newEffect{ name = "SHROUD_OF_WEAKNESS", - desc = "Shroud of Weakness", - long_desc = function(self, eff) return ("The target is enveloped in a shroud that seems to hang upon it like a heavy burden. (Reduces damage dealt by %d%%)."):format(-eff.power) end, + desc = _t"Shroud of Weakness", + long_desc = function(self, eff) return ("The target is enveloped in a shroud that seems to hang upon it like a heavy burden. (Reduces damage dealt by %d%%)."):tformat(-eff.power) end, type = "other", subtype = { time=true }, status = "detrimental", @@ -1437,8 +1437,8 @@ newEffect{ newEffect{ name = "SHROUD_OF_PASSING", - desc = "Shroud of Passing", - long_desc = function(self, eff) return ("The target is enveloped in a shroud that seems to not only obscure it but also to fade its form (+%d%% resist all)."):format(eff.power) end, + desc = _t"Shroud of Passing", + long_desc = function(self, eff) return ("The target is enveloped in a shroud that seems to not only obscure it but also to fade its form (+%d%% resist all)."):tformat(eff.power) end, type = "other", subtype = { time=true }, status = "beneficial", @@ -1454,8 +1454,8 @@ newEffect{ newEffect{ name = "SHROUD_OF_DEATH", - desc = "Shroud of Death", - long_desc = function(self, eff) return ("The target is enveloped in a shroud that seems to not only obscure it but also to fade its form (+%d%% resist all)."):format(eff.power) end, + desc = _t"Shroud of Death", + long_desc = function(self, eff) return ("The target is enveloped in a shroud that seems to not only obscure it but also to fade its form (+%d%% resist all)."):tformat(eff.power) end, type = "other", subtype = { time=true }, status = "beneficial", @@ -1470,8 +1470,8 @@ newEffect{ newEffect{ name = "CURSE_OF_NIGHTMARES", - desc = "Curse of Nightmares", - short_desc = "Nightmares", + desc = _t"Curse of Nightmares", + short_desc = _t"Nightmares", type = "other", subtype = { curse=true }, status = "beneficial", @@ -1498,9 +1498,9 @@ newEffect{ getNightmareRadius = function(level) return 5 + (level - 4) * 2 end, display_desc = function(self, eff) if math.min(eff.unlockLevel, eff.level) >= 4 then - return ([[Curse of Nightmares (power %0.1f): %d%%]]):format(eff.level, eff.nightmareChance or 0) + return ([[Curse of Nightmares (power %0.1f): %d%%]]):tformat(eff.level, eff.nightmareChance or 0) else - return ([[Curse of Nightmares (power %0.1f)]]):format(eff.level) + return ([[Curse of Nightmares (power %0.1f)]]):tformat(eff.level) end end, long_desc = function(self, eff) @@ -1511,7 +1511,7 @@ newEffect{ #CRIMSON#Power 1+: %sRemoved from Reality: %+d Physical Resistance, %+d Maximum Physical Resistance #CRIMSON#Power 2+: %s%+d Luck, %+d Willpower #CRIMSON#Power 3+: %sHarrow: When a foe attempts to inflict a detrimental effect upon you, your harrowing aura retaliates against a random foe in range 10, dealing %d mind and %d darkness damage. -#CRIMSON#Power 4+: %sNightmare: Each time you are damaged by a foe there is a chance (currently %d%%) of triggering a radius %d nightmare (summon Terrors and chances to slow, deal %d Mind damage, and deal %d Darkness damage) for 8 turns. The chance grows each time you are struck but fades over time.]]):format( +#CRIMSON#Power 4+: %sNightmare: Each time you are damaged by a foe there is a chance (currently %d%%) of triggering a radius %d nightmare (summon Terrors and chances to slow, deal %d Mind damage, and deal %d Darkness damage) for 8 turns. The chance grows each time you are struck but fades over time.]]):tformat( def.getVisionsReduction(eff, level), bonusLevel >= 1 and "#WHITE#" or "#GREY#", def.getResistsPhysicalChange(math.max(level, 1)), def.getResistsCapPhysicalChange(math.max(level, 1)), bonusLevel >= 2 and "#WHITE#" or "#GREY#", def.getLckChange(eff, math.max(level, 2)), def.getWilChange(math.max(level, 2)), @@ -1560,8 +1560,8 @@ newEffect{ if p.src and p.src._is_actor then DamageType:get(DamageType.MIND).projector(self, p.src.x, p.src.y, DamageType.MIND, harrowDam) DamageType:get(DamageType.MIND).projector(self, p.src.x, p.src.y, DamageType.DARKNESS, harrowDam) - --game.logSeen(self, "#F53CBE#%s harrows '%s'!", self.name:capitalize(), p.src.name) - game.logSeen(self, "#F53CBE#%s harrows %s!", self.name:capitalize(), target.name) + --game.logSeen(self, "#F53CBE#%s harrows '%s'!", self:getName():capitalize(), p.src.name) + game.logSeen(self, "#F53CBE#%s harrows %s!", self:getName():capitalize(), target:getName()) self.turn_procs.curse_of_nightmare_3 = true else local tgts = {} @@ -1574,8 +1574,8 @@ newEffect{ local target = rng.table(tgts) DamageType:get(DamageType.MIND).projector(self, target.x, target.y, DamageType.MIND, harrowDam) DamageType:get(DamageType.MIND).projector(self, target.x, target.y, DamageType.DARKNESS, harrowDam) - --self:logCombat(target, "#F53CBE##Source# harrows #Target#!", self.name:capitalize(), target.name) - game.logSeen(self, "#F53CBE#%s harrows %s!", self.name:capitalize(), target.name) + --self:logCombat(target, "#F53CBE##Source# harrows #Target#!", self:getName():capitalize(), target:getName()) + game.logSeen(self, "#F53CBE#%s harrows %s!", self:getName():capitalize(), target:getName()) self.turn_procs.curse_of_nightmare_3 = true end end @@ -1589,7 +1589,7 @@ newEffect{ if target and target.rank <= 2 and target.level <= self.level - 3 and not target:attr("no_breath") and not target:attr("invulnerable") then local def = self.tempeffect_def[self.EFF_CURSE_OF_NIGHTMARES] local airLoss = def.getBaseSuffocateAirChange(eff.level) + Combat:combatTalentScale(self.level - target.level - 3, 1, 5) * def.getSuffocateAirChange(eff.level) - game.logSeen(self, "#F53CBE#%s begins to choke from a suffocating curse. (-%d air)", target.name, airLoss) + game.logSeen(self, "#F53CBE#%s begins to choke from a suffocating curse. (-%d air)", target:getName(), airLoss) target:suffocate(airLoss, self, "suffocated from a curse") end end @@ -1598,7 +1598,7 @@ newEffect{ name = "terror", display = "h", color=colors.DARK_GREY, image="npc/horror_eldritch_nightmare_horror.png", blood_color = colors.BLUE, - desc = "A formless terror that seems to cut through the air, and its victims, like a knife.", + desc = _t"A formless terror that seems to cut through the air, and its victims, like a knife.", type = "horror", subtype = "eldritch", rank = 2, size_category = 2, @@ -1685,7 +1685,7 @@ newEffect{ -- Add to the party if e.src.player then m.remove_from_party_on_death = true - game.party:addMember(m, {control="no", type="nightmare", title="Nightmare"}) + game.party:addMember(m, {control="no", type="nightmare", title=_t"Nightmare"}) end game.zone:addEntity(game.level, m, "actor", location[1], location[2]) @@ -1696,7 +1696,7 @@ newEffect{ self.turn_procs.curse_of_nightmare_4 = true - game.logSeen(self, "#F53CBE#The air around %s grows cold and terrifying shapes begin to coalesce. A nightmare has begun.", self.name:capitalize()) + game.logSeen(self, "#F53CBE#The air around %s grows cold and terrifying shapes begin to coalesce. A nightmare has begun.", self:getName():capitalize()) game:playSoundNear(self, "talents/cloud") end end @@ -1706,8 +1706,8 @@ newEffect{ newEffect{ name = "CURSE_OF_MISFORTUNE", - desc = "Curse of Misfortune", - short_desc = "Misfortune", + desc = _t"Curse of Misfortune", + short_desc = _t"Misfortune", type = "other", subtype = { curse=true }, status = "beneficial", @@ -1725,7 +1725,7 @@ newEffect{ getCunChange = function(level) return -1 + level * 2 end, getMissedOpportunities = function(level) return Combat:combatTalentLimit(math.max(1, level-2), 25, 10, 20) end, getUnfortunateEndIncrease = function(level) return Combat:combatTalentLimit(math.max(1, level-3), 100, 40, 60) end, -- Limit < 100% - display_desc = function(self, eff) return ([[Curse of Misfortune (power %0.1f)]]):format(eff.level) end, + display_desc = function(self, eff) return ([[Curse of Misfortune (power %0.1f)]]):tformat(eff.level) end, long_desc = function(self, eff) local def, level, bonusLevel = self.tempeffect_def[self.EFF_CURSE_OF_MISFORTUNE], eff.level, math.min(eff.unlockLevel, eff.level) @@ -1734,7 +1734,7 @@ newEffect{ #CRIMSON#Power 1+: %sMissplaced Endeavours: The endeavours of those around you begin to fail (+%d%% chance to avoid traps). #CRIMSON#Power 2+: %s%+d Luck, %+d Cunning #CRIMSON#Power 3+: %sMissed Opportunities: Opportunities are fleeting, and those close to you begin to miss them (+%d%% evasion). -#CRIMSON#Power 4+: %sUnfortunate End: The damage you deal will increase by %d%% if the increase would be enough to kill your opponent.]]):format( +#CRIMSON#Power 4+: %sUnfortunate End: The damage you deal will increase by %d%% if the increase would be enough to kill your opponent.]]):tformat( bonusLevel >= 1 and "#WHITE#" or "#GREY#", def.getMissplacedEndeavours(math.max(level, 1)), bonusLevel >= 2 and "#WHITE#" or "#GREY#", def.getLckChange(eff, math.max(level, 2)), def.getCunChange(math.max(level, 2)), bonusLevel >= 3 and "#WHITE#" or "#GREY#", def.getMissedOpportunities(math.max(level, 3)), @@ -1782,9 +1782,9 @@ newEffect{ -- unfortunate end! note that this does not kill if target.die_at < 0 dam = dam * multiplier if target.life - dam <= target.die_at then - game.logSeen(target, "#F53CBE#%s suffers an unfortunate end.", target.name:capitalize()) + game.logSeen(target, "#F53CBE#%s suffers an unfortunate end.", target:getName():capitalize()) else - game.logSeen(target, "#F53CBE#%s suffers an unfortunate blow.", target.name:capitalize()) + game.logSeen(target, "#F53CBE#%s suffers an unfortunate blow.", target:getName():capitalize()) end end end @@ -1796,8 +1796,8 @@ newEffect{ newEffect{ name = "PROB_TRAVEL_UNSTABLE", image = "talents/probability_travel.png", - desc = "Unstable Probabilites", - long_desc = function(self, eff) return "The target has recently blinked through a wall using probability travel." end, + desc = _t"Unstable Probabilites", + long_desc = function(self, eff) return _t"The target has recently blinked through a wall using probability travel." end, type = "other", subtype = { time=true, space=true }, status = "detrimental", @@ -1812,7 +1812,7 @@ newEffect{ newEffect{ name = "CURSED_FORM", image = "talents/seethe.png", - desc = "Cursed Form", + desc = _t"Cursed Form", type = "other", subtype = { curse=true }, status = "beneficial", @@ -1821,12 +1821,12 @@ newEffect{ cancel_on_level_change = true, parameters = {}, long_desc = function(self, eff) - local desc = "The target's unnatural body has responded to damage taken." + local desc = _t"The target's unnatural body has responded to damage taken." if (eff.incDamageChange or 0) > 0 then - desc = desc..(" All damage that the target inflicts is increased by %d%%."):format(eff.incDamageChange) + desc = desc..(" All damage that the target inflicts is increased by %d%%."):tformat(eff.incDamageChange) end if (eff.statChange or 0) > 0 then - desc = desc..(" Strength and Willpower are increased by %d. Poisons and diseases have a %d%% chance of being neutralized each turn."):format(eff.statChange, eff.neutralizeChance) + desc = desc..(" Strength and Willpower are increased by %d. Poisons and diseases have a %d%% chance of being neutralized each turn."):tformat(eff.statChange, eff.neutralizeChance) end return desc end, @@ -1912,13 +1912,13 @@ newEffect{ -- Predator is purely for the player's information newEffect{ name = "PREDATOR", image = "talents/mark_prey.png", - desc = "Marked Prey", + desc = _t"Marked Prey", no_stop_enter_worlmap = true, decrease = 0, cancel_on_level_change = true, long_desc = function(self, eff) - local desc = "Hunting:" - local desc2 = ("\n%d%% Received damage reduction against:"):format(eff.power) + local desc = _t"Hunting:" + local desc2 = ("\n%d%% Received damage reduction against:"):tformat(eff.power) if not game.level then return desc..desc2 end local preys = {} @@ -1928,12 +1928,12 @@ newEffect{ table.sort(preys, "rank") for _, p in ripairs(preys) do local mprank, mpcolour = p:TextRank() - desc = desc..("\n- %s%s#LAST#"):format(mpcolour, p.name:capitalize()) + desc = desc..("\n- %s%s#LAST#"):tformat(mpcolour, p.name:capitalize()) end local subtypes_list = table.get(self, "mark_prey2", game.level.id) for st, _ in pairs(subtypes_list or {}) do - desc2 = desc2..("\n- #ffa0ff#%s#LAST#"):format(tostring(st):capitalize()) + desc2 = desc2..("\n- #ffa0ff#%s#LAST#"):tformat(tostring(st):capitalize()) end return desc..desc2 @@ -1947,12 +1947,12 @@ newEffect{ newEffect{ name = "FADED", image = "talents/shadow_fade.png", - desc = "Faded", - long_desc = function(self, eff) return "The target has faded and is no longer taking damage." end, + desc = _t"Faded", + long_desc = function(self, eff) return _t"The target has faded and is no longer taking damage." end, type = "other", subtype = { }, status = "beneficial", - on_gain = function(self, err) return "#Target# fades!", "+Faded" end, + on_gain = function(self, err) return _t"#Target# fades!", _t"+Faded" end, parameters = {}, activate = function(self, eff) eff.iid = self:addTemporaryValue("invulnerable", 1) @@ -1971,8 +1971,8 @@ newEffect{ -- Borrowed Time and the Borrowed Time stun effect newEffect{ name = "HIGHBORN_S_BLOOM", image = "talents/highborn_s_bloom.png", - desc = "Highborn's Bloom", - long_desc = function(self, eff) return "The target is using talents without consuming resources." end, + desc = _t"Highborn's Bloom", + long_desc = function(self, eff) return _t"The target is using talents without consuming resources." end, type = "other", subtype = { arcane=true }, status = "beneficial", @@ -1987,8 +1987,8 @@ newEffect{ newEffect{ name = "VICTORY_RUSH_ZIGUR", image = "talents/arcane_destruction.png", - desc = "Victory Rush", - long_desc = function(self, eff) return "The thrill of victory makes this creature invulnerable." end, + desc = _t"Victory Rush", + long_desc = function(self, eff) return _t"The thrill of victory makes this creature invulnerable." end, type = "other", subtype = { arcane=true }, status = "beneficial", @@ -2003,8 +2003,8 @@ newEffect{ newEffect{ name = "SOLIPSISM", image = "talents/solipsism.png", - desc = "Solipsism", - long_desc = function(self, eff) return ("This creature has fallen into a solipsistic state and is caught up in its own egoic thoughts (-%d%% global speed)."):format(eff.power * 100) end, + desc = _t"Solipsism", + long_desc = function(self, eff) return ("This creature has fallen into a solipsistic state and is caught up in its own egoic thoughts (-%d%% global speed)."):tformat(eff.power * 100) end, type = "other", subtype = { psionic=true }, status = "detrimental", @@ -2021,8 +2021,8 @@ newEffect{ newEffect{ name = "CLARITY", image = "talents/clarity.png", - desc = "Clarity", - long_desc = function(self, eff) return ("The creature has found a state of clarity and sees the world for what it is (+%d%% global speed)."):format(eff.power * 100) end, + desc = _t"Clarity", + long_desc = function(self, eff) return ("The creature has found a state of clarity and sees the world for what it is (+%d%% global speed)."):tformat(eff.power * 100) end, type = "other", subtype = { psionic=true }, status = "beneficial", @@ -2039,8 +2039,8 @@ newEffect{ newEffect{ name = "DREAMSCAPE", image = "talents/dreamscape.png", - desc = "Dreamscape", - long_desc = function(self, eff) return ("This target has invaded %s's dreams and has gained a %d%% bonus to all damage."):format(eff.target.name, eff.power) end, + desc = _t"Dreamscape", + long_desc = function(self, eff) return ("This target has invaded %s's dreams and has gained a %d%% bonus to all damage."):tformat(eff.target:getName(), eff.power) end, type = "other", subtype = { psionic=true }, status = "beneficial", @@ -2071,7 +2071,7 @@ newEffect{ life = util.bound(eff.target.life, eff.target.die_at, eff.target.max_life), ai = "summoned", ai_real = "tactical", ai_state={ ai_move="move_complex", talent_in=1, ally_compassion = 10}, - name = eff.target.name.."'s dream projection", + name = ("%s's dream projection"):tformat(eff.target:getName()), }) if not eff.target:attr("lucid_dreamer") then @@ -2103,19 +2103,19 @@ newEffect{ local p = (who and who:hasEffect(who.EFF_DREAMSCAPE)) or (who and who.summoner and who.summoner:hasEffect(who.summoner.EFF_DREAMSCAPE)) if p then -- For the rare instance we die after the effect ends but before the dreamscape instance closes p.projections_killed = p.projections_killed + 1 - game.logSeen(p.target, "#LIGHT_RED#%s writhes in agony as a fragment of its mind is destroyed!", p.target.name:capitalize()) + game.logSeen(p.target, "#LIGHT_RED#%s writhes in agony as a fragment of its mind is destroyed!", p.target:getName():capitalize()) end end game.zone:addEntity(game.level, m, "actor", x, y) game.level.map:particleEmitter(x, y, 1, "generic_teleport", {rm=0, rM=0, gm=180, gM=255, bm=180, bM=255, am=35, aM=90}) - game.logSeen(eff.target, "#LIGHT_BLUE#%s has spawned a dream projection to protect its mind!", eff.target.name:capitalize()) + game.logSeen(eff.target, "#LIGHT_BLUE#%s has spawned a dream projection to protect its mind!", eff.target:getName():capitalize()) if game.party:hasMember(eff.target) then game.party:addMember(m, { control="full", type="projection", - title="Dream Self", + title=_t"Dream Self", orders = {target=true}, }) if eff.target == game.player then @@ -2134,7 +2134,7 @@ newEffect{ if eff.projections_killed/10 >= eff.target.life/eff.target.max_life then game:onTickEnd(function() eff.target:die(self) - game.logSeen(eff.target, "#LIGHT_RED#%s's mind shatters into %d tiny fragments!", eff.target.name:capitalize(), eff.target.max_life) + game.logSeen(eff.target, "#LIGHT_RED#%s's mind shatters into %d tiny fragments!", eff.target:getName():capitalize(), eff.target.max_life) eff.projections_killed = 0 -- clear this out to prevent closing messages end) end @@ -2240,9 +2240,9 @@ newEffect{ eff.target:takeHit(eff.target.max_life/10 * kills, self) eff.target:setEffect(eff.target.EFF_BRAINLOCKED, kills, {}) - local loss = "loss" - if kills >= 10 then loss = "potentially fatal loss" elseif kills >=8 then loss = "devastating loss" elseif kills >=6 then loss = "tremendous loss" elseif kills >=4 then loss = "terrible loss" end - game.logSeen(eff.target, "#LIGHT_RED#%s suffered a %s of self in the Dreamscape!", eff.target.name:capitalize(), loss) + local loss = _t"loss" + if kills >= 10 then loss = _t"potentially fatal loss" elseif kills >=8 then loss = _t"devastating loss" elseif kills >=6 then loss = _t"tremendous loss" elseif kills >=4 then loss = _t"terrible loss" end + game.logSeen(eff.target, "#LIGHT_RED#%s suffered a %s of self in the Dreamscape!", eff.target:getName():capitalize(), loss) end end) end, @@ -2250,8 +2250,8 @@ newEffect{ newEffect{ name = "REVISIONIST_HISTORY", image = "talents/revisionist_history.png", - desc = "Revisionist History", - long_desc = function(self, eff) return "While this effect holds you can decide recent history did not happen the way it did." end, + desc = _t"Revisionist History", + long_desc = function(self, eff) return _t"While this effect holds you can decide recent history did not happen the way it did." end, type = "other", subtype = { time=true }, status = "beneficial", @@ -2303,9 +2303,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_FIRE", - desc = "Oil mist", + desc = _t"Oil mist", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% fire damage, -10% fire resistance, -10% armour, -2 sight range.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% fire damage, -10% fire resistance, -10% armour, -2 sight range.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2324,9 +2324,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_COLD", - desc = "Grave chill", + desc = _t"Grave chill", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% cold damage, -10% cold resistance, -10% physical save, -20% confusion immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% cold damage, -10% cold resistance, -10% physical save, -20% confusion immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2345,9 +2345,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_LIGHTNING", - desc = "Static discharge", + desc = _t"Static discharge", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% lightning damage, -10% lightning resistance, -10% physical power, -20% stun immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% lightning damage, -10% lightning resistance, -10% physical power, -20% stun immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2366,9 +2366,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_ACID", - desc = "Noxious fumes", + desc = _t"Noxious fumes", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% acid damage, -10% acid resistance, -10% defense, -20% disarm immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% acid damage, -10% acid resistance, -10% defense, -20% disarm immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2387,9 +2387,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_DARKNESS", - desc = "Echoes of the void", + desc = _t"Echoes of the void", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% darkness damage, -10% darkness resistance, -10% mental save, -20% fear immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% darkness damage, -10% darkness resistance, -10% mental save, -20% fear immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2408,9 +2408,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_MIND", - desc = "Eerie silence", + desc = _t"Eerie silence", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% mind damage, -10% mind resistance, -10% spellpower, -20% silence immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% mind damage, -10% mind resistance, -10% spellpower, -20% silence immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2429,9 +2429,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_LIGHT", - desc = "Aura of light", + desc = _t"Aura of light", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% light damage, -10% light resistance, -10% accuracy, -20% blind immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% light damage, -10% light resistance, -10% accuracy, -20% blind immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2450,9 +2450,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_ARCANE", - desc = "Aether residue", + desc = _t"Aether residue", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% arcane damage, -10% arcane resistance, -10% armour hardiness, -20% stoning immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% arcane damage, -10% arcane resistance, -10% armour hardiness, -20% stoning immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2471,9 +2471,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_TEMPORAL", - desc = "Impossible geometries", + desc = _t"Impossible geometries", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% temporal damage, -10% temporal resistance, -10% spell save, -20% pinning immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% temporal damage, -10% temporal resistance, -10% spell save, -20% pinning immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2492,9 +2492,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_PHYSICAL", - desc = "Uncontrolled anger", + desc = _t"Uncontrolled anger", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% physical damage, -10% physical resistance, -10% mindpower, -20% knockback immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% physical damage, -10% physical resistance, -10% mindpower, -20% knockback immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2513,9 +2513,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_BLIGHT", - desc = "Miasma", + desc = _t"Miasma", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% blight damage, -10% blight resistance, -20% healing mod, -20% disease immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% blight damage, -10% blight resistance, -20% healing mod, -20% disease immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2534,9 +2534,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_NATURE", - desc = "Slimy floor", + desc = _t"Slimy floor", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% nature damage, -10% nature resistance, -10% ranged defense, -20% poison immunity.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% nature damage, -10% nature resistance, -10% ranged defense, -20% poison immunity.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -2555,8 +2555,8 @@ newEffect{ newEffect{ name = "VAULTED", image = "talents/time_prison.png", - desc = "In Vault", - long_desc = function(self, eff) return "The target is part of a vault and cannot act until it has been openend." end, + desc = _t"In Vault", + long_desc = function(self, eff) return _t"The target is part of a vault and cannot act until it has been openend." end, decrease = 0, no_remove = true, type = "other", subtype = { vault=true }, @@ -2582,14 +2582,14 @@ newEffect{ newEffect{ name = "CAUTERIZE", image = "talents/cauterize.png", - desc = "Cauterize", - long_desc = function(self, eff) return ("Your body is cauterizing, burning for %0.2f damage each turn."):format(eff.dam) end, + desc = _t"Cauterize", + long_desc = function(self, eff) return ("Your body is cauterizing, burning for %0.2f damage each turn."):tformat(eff.dam) end, type = "other", subtype = { fire=true }, status = "detrimental", parameters = { dam=10 }, - on_gain = function(self, err) return "#CRIMSON##Target# is wreathed in flames on the brink of death!", "+Cauterize" end, - on_lose = function(self, err) return "#CRIMSON#The flames around #target# vanish.", "-Cauterize" end, + on_gain = function(self, err) return _t"#CRIMSON##Target# is wreathed in flames on the brink of death!", _t"+Cauterize" end, + on_lose = function(self, err) return _t"#CRIMSON#The flames around #target# vanish.", _t"-Cauterize" end, on_merge = function(self, old_eff, new_eff) old_eff.dur = new_eff.dur old_eff.dam = old_eff.dam + new_eff.dam @@ -2612,15 +2612,15 @@ newEffect{ end local dead, val = self:takeHit(eff.dam, self, {special_death_msg="burnt to death by cauterize"}) - local srcname = self.x and self.y and game.level.map.seens(self.x, self.y) and self.name:capitalize() or "Something" - game:delayedLogDamage(eff, self, val, ("%s%d %s#LAST#"):format(DamageType:get(DamageType.FIRE).text_color or "#aaaaaa#", math.ceil(val), DamageType:get(DamageType.FIRE).name), false) + local srcname = self.x and self.y and game.level.map.seens(self.x, self.y) and self:getName():capitalize() or _t"Something" + game:delayedLogDamage(eff, self, val, ("%s%d %s#LAST#"):tformat(DamageType:get(DamageType.FIRE).text_color or "#aaaaaa#", math.ceil(val), DamageType:get(DamageType.FIRE).name), false) end, } newEffect{ name = "EIDOLON_PROTECT", image = "shockbolt/npc/unknown_unknown_the_eidolon.png", - desc = "Protected by the Eidolon", - long_desc = function(self, eff) return "The target is protected by the Eidolon, no creature may harm it (except self-harm)." end, + desc = _t"Protected by the Eidolon", + long_desc = function(self, eff) return _t"The target is protected by the Eidolon, no creature may harm it (except self-harm)." end, zone_wide_effect = true, decrease = 0, no_remove = true, type = "other", @@ -2636,15 +2636,15 @@ newEffect{ newEffect{ name = "CLOAK_OF_DECEPTION", image = "shockbolt/object/artifact/black_cloak.png", - desc = "Cloak of Deception", - long_desc = function(self, eff) return "The target is under the effect of the cloak of deception, making it look human." end, + desc = _t"Cloak of Deception", + long_desc = function(self, eff) return _t"The target is under the effect of the cloak of deception, making it look human." end, decrease = 0, no_remove = true, type = "other", subtype = { undead=true }, status = "neutral", parameters = {}, - on_gain = function(self, err) return ("#LIGHT_BLUE#An illusion appears around #Target# making %s appear human."):format(self:him_her()), "+CLOAK OF DECEPTION" end, - on_lose = function(self, err) return "#LIGHT_BLUE#The illusion covering #Target# disappears.", "-CLOAK OF DECEPTION" end, + on_gain = function(self, err) return ("#LIGHT_BLUE#An illusion appears around #Target# making %s appear human."):tformat(self:him_her()), _t"+CLOAK OF DECEPTION" end, + on_lose = function(self, err) return _t"#LIGHT_BLUE#The illusion covering #Target# disappears.", _t"-CLOAK OF DECEPTION" end, activate = function(self, eff) self.old_faction_cloak = self.faction self.faction = "allied-kingdoms" @@ -2663,15 +2663,15 @@ newEffect{ newEffect{ name = "SUFFOCATING", - desc = "Suffocating", - long_desc = function(self, eff) return ("You are suffocating! Each turn you lose an ever increasing percent of your total life (currently %d%%)"):format(eff.dam) end, + desc = _t"Suffocating", + long_desc = function(self, eff) return ("You are suffocating! Each turn you lose an ever increasing percent of your total life (currently %d%%)"):tformat(eff.dam) end, type = "other", subtype = { suffocating=true }, status = "detrimental", decrease = 0, no_remove = true, parameters = { dam=20 }, - on_gain = function(self, err) return "#Target# is suffocating.", "+SUFFOCATING" end, - on_lose = function(self, err) return "#Target# can breathe again.", "-Suffocating" end, + on_gain = function(self, err) return _t"#Target# is suffocating.", _t"+SUFFOCATING" end, + on_lose = function(self, err) return _t"#Target# can breathe again.", _t"-Suffocating" end, on_timeout = function(self, eff) if not self.is_suffocating then self:removeEffect(self.EFF_SUFFOCATING, false, true) @@ -2681,7 +2681,7 @@ newEffect{ -- Bypass all shields & such local old = self.onTakeHit self.onTakeHit = nil - mod.class.interface.ActorLife.takeHit(self, self.max_life * eff.dam / 100, self, {special_death_msg="suffocated to death"}) + mod.class.interface.ActorLife.takeHit(self, self.max_life * eff.dam / 100, self, {special_death_msg=_t"suffocated to death"}) eff.dam = util.bound(eff.dam + 5, 20, 100) self.onTakeHit = old end, @@ -2689,10 +2689,10 @@ newEffect{ newEffect{ name = "ANTIMAGIC_DISRUPTION", - desc = "Antimagic Disruption", + desc = _t"Antimagic Disruption", long_desc = function(self, eff) local chance = self:attr("spell_failure") or 0 - return ("Your arcane powers are disrupted by your antimagic equipment. Arcane talents fail %d%% of the time and arcane sustains have a %0.1f%% chance to deactivate each turn."):format(chance, chance/10) + return ("Your arcane powers are disrupted by your antimagic equipment. Arcane talents fail %d%% of the time and arcane sustains have a %0.1f%% chance to deactivate each turn."):tformat(chance, chance/10) end, type = "other", subtype = { antimagic=true }, @@ -2709,8 +2709,8 @@ newEffect{ newEffect{ name = "SWIFT_HANDS_CD", image = "talents/swift_hands.png", - desc = "Swift Hands", - long_desc = function(self, eff) return "You swaped an item without taking time this turn." end, + desc = _t"Swift Hands", + long_desc = function(self, eff) return _t"You swaped an item without taking time this turn." end, type = "other", subtype = { prodigy=true }, status = "neutral", @@ -2722,8 +2722,8 @@ newEffect{ newEffect{ name = "HUNTER_PLAYER", image = "talents/hunted_player.png", - desc = "Hunter!", - long_desc = function(self, eff) return "Knows where you are!" end, + desc = _t"Hunter!", + long_desc = function(self, eff) return _t"Knows where you are!" end, type = "other", subtype = { madness=true }, status = "beneficial", @@ -2737,8 +2737,8 @@ newEffect{ newEffect{ name = "THROUGH_THE_CROWD", image = "talents/through_the_crowd.png", - desc = "Through The Crowd", - long_desc = function(self, eff) return ("Increases physical save, spell save, and mental save by %d. Global speed increased by %d%%."):format(eff.power * 10, util.bound(eff.power, 0, 5) * 3) end, + desc = _t"Through The Crowd", + long_desc = function(self, eff) return ("Increases physical save, spell save, and mental save by %d. Global speed increased by %d%%."):tformat(eff.power * 10, util.bound(eff.power, 0, 5) * 3) end, type = "other", subtype = { miscellaneous=true }, status = "beneficial", @@ -2759,14 +2759,14 @@ newEffect{ newEffect{ name = "RELOAD_DISARMED", image = "talents/disarm.png", - desc = "Reloading", - long_desc = function(self, eff) return "The target has replenished some ammo." end, + desc = _t"Reloading", + long_desc = function(self, eff) return _t"The target has replenished some ammo." end, type = "other", subtype = { disarm=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is disarmed!", "+Disarmed" end, - on_lose = function(self, err) return "#Target# rearms.", "-Disarmed" end, + on_gain = function(self, err) return _t"#Target# is disarmed!", _t"+Disarmed" end, + on_lose = function(self, err) return _t"#Target# rearms.", _t"-Disarmed" end, activate = function(self, eff) self:removeEffect(self.EFF_COUNTER_ATTACKING) -- Cannot parry or counterattack while disarmed self:removeEffect(self.EFF_DUAL_WEAPON_DEFENSE) @@ -2779,13 +2779,13 @@ newEffect{ newEffect{ name = "SPACETIME_TUNING", image = "talents/spacetime_tuning.png", - desc = "Spacetime Tuning", - long_desc = function(self, eff) return ("Tuning Paradox at a rate of %+d per turn."):format(eff.power) end, + desc = _t"Spacetime Tuning", + long_desc = function(self, eff) return ("Tuning Paradox at a rate of %+d per turn."):tformat(eff.power) end, type = "other", subtype = { time=true }, status = "beneficial", parameters = { power=10}, - on_gain = function(self, err) return "#Target# retunes the fabric of spacetime.", "+Spacetime Tuning" end, + on_gain = function(self, err) return _t"#Target# retunes the fabric of spacetime.", _t"+Spacetime Tuning" end, on_timeout = function(self, eff) self:callTalent(self.T_SPACETIME_TUNING, "tuneParadox") -- adjusts paradox level end, @@ -2803,9 +2803,9 @@ newEffect{ newEffect{ name = "TIME_STOP", image = "talents/time_stop.png", - desc = "Time Stop", + desc = _t"Time Stop", long_desc = function(self, eff) - return ("The target has stopped time and is dealing %d%% less damage."):format(eff.power) + return ("The target has stopped time and is dealing %d%% less damage."):tformat(eff.power) end, charges = function(self, eff) local charges = math.floor(self.energy.value/1000) - 1 @@ -2843,8 +2843,8 @@ newEffect{ newEffect{ name = "TEMPORAL_REPRIEVE", image = "talents/temporal_reprieve.png", - desc = "Temporal Reprieve", - long_desc = function(self, eff) return ("This target has retreated to a safe place."):format() end, + desc = _t"Temporal Reprieve", + long_desc = function(self, eff) return ("This target has retreated to a safe place."):tformat() end, type = "other", subtype = { time=true }, status = "beneficial", @@ -2918,8 +2918,8 @@ newEffect{ newEffect{ name = "TEMPORAL_FUGUE", image = "talents/temporal_fugue.png", - desc = "Temporal Fugue", - long_desc = function(self, eff) return "This target is splitting all damage with its fugue clones." end, + desc = _t"Temporal Fugue", + long_desc = function(self, eff) return _t"This target is splitting all damage with its fugue clones." end, type = "other", subtype = { time=true }, status = "beneficial", @@ -2957,7 +2957,7 @@ newEffect{ if target ~= self then target.turn_procs.temporal_fugue_damage_target = true target:takeHit(cb.value, src) - game:delayedLogDamage(src or self, self, 0, ("#STEEL_BLUE#(%d shared)#LAST#"):format(cb.value), nil) + game:delayedLogDamage(src or self, self, 0, ("#STEEL_BLUE#(%d shared)#LAST#"):tformat(cb.value), nil) target.turn_procs.temporal_fugue_damage_target = nil end end @@ -2997,13 +2997,13 @@ newEffect{ newEffect{ name = "DRACONIC_WILL", image = "talents/draconic_will.png", - desc = "Draconic Will", - long_desc = function(self, eff) return "The target is immune to all detrimental effects." end, + desc = _t"Draconic Will", + long_desc = function(self, eff) return _t"The target is immune to all detrimental effects." end, type = "other", subtype = { nature=true }, status = "beneficial", - on_gain = function(self, err) return "#Target#'s skin hardens.", "+Draconic Will" end, - on_lose = function(self, err) return "#Target#'s skin is back to normal.", "-Draconic Will" end, + on_gain = function(self, err) return _t"#Target#'s skin hardens.", _t"+Draconic Will" end, + on_lose = function(self, err) return _t"#Target#'s skin is back to normal.", _t"-Draconic Will" end, parameters = { }, activate = function(self, eff) self:effectTemporaryValue(eff, "negative_status_effect_immune", 1) @@ -3012,14 +3012,14 @@ newEffect{ newEffect{ name = "REALITY_SMEARING", image = "talents/reality_smearing.png", - desc = "Reality Smearing", - long_desc = function(self, eff) return ("Damage received in the past is returned as %0.2f paradox damage per turn."):format(eff.paradox) end, + desc = _t"Reality Smearing", + long_desc = function(self, eff) return ("Damage received in the past is returned as %0.2f paradox damage per turn."):tformat(eff.paradox) end, type = "other", subtype = { time=true }, status = "detrimental", parameters = { paradox=10 }, - on_gain = function(self, err) return "Reality smears around #Target#.", "+Smearing" end, - on_lose = function(self, err) return "Reality around #Target# is coherent again.", "-Smearing" end, + on_gain = function(self, err) return _t"Reality smears around #Target#.", _t"+Smearing" end, + on_lose = function(self, err) return _t"Reality around #Target# is coherent again.", _t"-Smearing" end, on_merge = function(self, old_eff, new_eff) -- Merge the flames! local oldparadox = old_eff.paradox * old_eff.dur @@ -3046,12 +3046,12 @@ newEffect{ newEffect{ name = "AEONS_STASIS", - desc = "Aeons Stasis", - long_desc = function(self, eff) return "The target is in temporal stasis." end, + desc = _t"Aeons Stasis", + long_desc = function(self, eff) return _t"The target is in temporal stasis." end, type = "other", decrease = 0, no_remove = true, subtype = { temporal=true }, status = "beneficial", - on_lose = function(self, err) return "#Target#'s is back to the normal timeflow.", "-Aeons Stasis" end, + on_lose = function(self, err) return _t"#Target#'s is back to the normal timeflow.", _t"-Aeons Stasis" end, parameters = { }, activate = function(self, eff) self:effectTemporaryValue(eff, "status_effect_immune", 1) @@ -3095,8 +3095,8 @@ newEffect{ newEffect{ name = "UNSTOPPABLE", image = "talents/unstoppable.png", - desc = "Unstoppable", - long_desc = function(self, eff) return ("The target is unstoppable! It refuses to die and cannot heal. When the effect ends, it will heal %d Life (%d%% of maximum life per foe slain during the frenzy)."):format(eff.kills * eff.hp_per_kill * self.max_life / 100, eff.hp_per_kill) end, + desc = _t"Unstoppable", + long_desc = function(self, eff) return ("The target is unstoppable! It refuses to die and cannot heal. When the effect ends, it will heal %d Life (%d%% of maximum life per foe slain during the frenzy)."):tformat(eff.kills * eff.hp_per_kill * self.max_life / 100, eff.hp_per_kill) end, type = "other", subtype = { frenzy=true }, status = "beneficial", @@ -3117,8 +3117,8 @@ newEffect{ newEffect{ name = "2H_PENALTY", image = "talents/unstoppable.png", - desc = "Hit Penalty", - long_desc = function(self, eff) return ("The target is using a two handed weapon in a single hand, reducing accuracy, physical power, spellpower and mindpower by %d%% (based on size); also all damage procs from your offhand are reduced by 50%%."):format(20 - math.min(self.size_category - 4, 4) * 5) end, + desc = _t"Hit Penalty", + long_desc = function(self, eff) return ("The target is using a two handed weapon in a single hand, reducing accuracy, physical power, spellpower and mindpower by %d%% (based on size); also all damage procs from your offhand are reduced by 50%%."):tformat(20 - math.min(self.size_category - 4, 4) * 5) end, type = "other", decrease = 0, no_remove = true, subtype = { combat=true, penalty=true }, status = "detrimental", @@ -3131,20 +3131,20 @@ newEffect{ newEffect{ name = "TWIST_FATE", image = "talents/twist_fate.png", - desc = "Twist Fate", + desc = _t"Twist Fate", long_desc = function(self, eff) local t = self:getTalentFromId(eff.talent) return ([[Currently Twisted Anomlay: %s - %s]]):format(t.name or "none", t.info(self, t) or "none") + %s]]):tformat(t.name or "none", t.info(self, t) or "none") end, type = "other", subtype = { time=true }, status = "detrimental", parameters = { paradox=0, twisted=false }, - on_gain = function(self, err) return nil, "+Twist Fate" end, - on_lose = function(self, err) return nil, "-Twist Fate" end, + on_gain = function(self, err) return nil, _t"+Twist Fate" end, + on_lose = function(self, err) return nil, _t"-Twist Fate" end, activate = function(self, eff) if core.shader.allow("adv") then eff.particle1, eff.particle2 = self:addParticles3D("volumetric", {kind="fast_sphere", appear=10, radius=1.6, twist=30, density=30, growSpeed=0.004, scrollingSpeed=-0.004, img="continuum_01_3"}) @@ -3170,15 +3170,15 @@ newEffect{ -- Dummy effect for particles newEffect{ name = "WARDEN_S_TARGET", image = "talents/warden_s_focus.png", - desc = "Warden's Focus Target", - long_desc = function(self, eff) return ("%s is focusing on this target."):format(eff.src.name) end, + desc = _t"Warden's Focus Target", + long_desc = function(self, eff) return ("%s is focusing on this target."):tformat(eff.src:getName()) end, type = "other", subtype = { tactic=true }, status = "detrimental", parameters = {}, remove_on_clone = true, decrease = 0, - on_gain = function(self, err) return nil, "+Warden's Focus" end, - on_lose = function(self, err) return nil, "-Warden's Focus" end, + on_gain = function(self, err) return nil, _t"+Warden's Focus" end, + on_lose = function(self, err) return nil, _t"-Warden's Focus" end, on_timeout = function(self, eff) local p = eff.src:hasEffect(eff.src.EFF_WARDEN_S_FOCUS) if not p or p.target ~= self or eff.src.dead or not game.level:hasEntity(eff.src) or core.fov.distance(self.x, self.y, eff.src.x, eff.src.y) > 10 then @@ -3199,21 +3199,21 @@ newEffect{ newEffect{ name = "DEATH_DREAM", image = "talents/sleep.png", - desc = "Death in a Dream", + desc = _t"Death in a Dream", type = "other", subtype={mind=true}, status = "detrimental", - long_desc = function(self, eff) return ("The target had breathed in noxious sleep-induced fumes and is losing %d life per turn."):format(eff.power) end, + long_desc = function(self, eff) return ("The target had breathed in noxious sleep-induced fumes and is losing %d life per turn."):tformat(eff.power) end, on_timeout = function(self, eff) local dead, val = self:takeHit(eff.power, self, {special_death_msg="killed in a dream"}) - game:delayedLogDamage(eff, self, val, ("%s%d %s#LAST#"):format(DamageType:get(DamageType.MIND).text_color or "#aaaaaa#", math.ceil(val), "dream"), false) + game:delayedLogDamage(eff, self, val, ("%s%d %s#LAST#"):tformat(DamageType:get(DamageType.MIND).text_color or "#aaaaaa#", math.ceil(val), "dream"), false) end, } newEffect{ name = "ZONE_AURA_GORBAT", - desc = "Natural Aura", + desc = _t"Natural Aura", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +20 mindpower, +2 life regen, -1 equilibrium per turn, -20% resistance penetration.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +20 mindpower, +2 life regen, -1 equilibrium per turn, -20% resistance penetration.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3232,9 +3232,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_VOR", - desc = "Sorcerous Aura", + desc = _t"Sorcerous Aura", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +20 magic, +2 mana regen, -20 accuracy, -20 stealth power.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +20 magic, +2 mana regen, -20 accuracy, -20 stealth power.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3253,9 +3253,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_GRUSHNAK", - desc = "Disciplined Aura", + desc = _t"Disciplined Aura", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +20 defense, +20 all saves, -20 spell power.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +20 defense, +20 all saves, -20 spell power.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3275,9 +3275,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_RAKSHOR", - desc = "Sinister Aura", + desc = _t"Sinister Aura", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: +10% critical chance, +20% critical damage, -20% nature and blight resistance.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: +10% critical chance, +20% critical damage, -20% nature and blight resistance.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3297,9 +3297,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_UNDERWATER", - desc = "Underwater Zone", + desc = _t"Underwater Zone", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: Air decreases over time. If you run out of air you will start losing life. Look for bubbles to recover air. The water also reduces stun resistance by 10% and fire damage is reduced by 10%, however cold damage is increased by 10%.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: Air decreases over time. If you run out of air you will start losing life. Look for bubbles to recover air. The water also reduces stun resistance by 10% and fire damage is reduced by 10%, however cold damage is increased by 10%.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3316,9 +3316,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_FEARSCAPE", - desc = "Fearscape Zone", + desc = _t"Fearscape Zone", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: The flames of the Fearscape increase all fire and blight damage by 10%, but the weird gravity reduces knockback resistance by 20%.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: The flames of the Fearscape increase all fire and blight damage by 10%, but the weird gravity reduces knockback resistance by 20%.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3335,9 +3335,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_OUT_OF_TIME", - desc = "Out of Time Zone", + desc = _t"Out of Time Zone", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: You seem to be outside the normal spacetime continuum. +10% physical resistance, -10% temporal resistance and -20% teleport resistance.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: You seem to be outside the normal spacetime continuum. +10% physical resistance, -10% temporal resistance and -20% teleport resistance.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3354,9 +3354,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_SPELLBLAZE", - desc = "Spellblaze Aura", + desc = _t"Spellblaze Aura", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: The power of the Spellblaze still burns here. -10% resistance to fire, arcane and blight damage, but +10% cold resistance. WARNING: The powerful magic here reflects teleportation magic!") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: The power of the Spellblaze still burns here. -10% resistance to fire, arcane and blight damage, but +10% cold resistance. WARNING: The powerful magic here reflects teleportation magic!") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3372,9 +3372,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_CALDERA", - desc = "Heady Scent", + desc = _t"Heady Scent", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: Strong scents fill the air and make you feel drowsy. If the timer reaches 0 you will fall into a dreaming sleep state. -10% mind resistance, -20% sleep resistance, +10% nature damage.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: Strong scents fill the air and make you feel drowsy. If the timer reaches 0 you will fall into a dreaming sleep state. -10% mind resistance, -20% sleep resistance, +10% nature damage.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3392,9 +3392,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_THUNDERSTORM", - desc = "Thunderstorm", + desc = _t"Thunderstorm", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: A huge thunderstorm rages above you. +10 lightning damage, -10% stun resistance.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: A huge thunderstorm rages above you. +10 lightning damage, -10% stun resistance.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3411,9 +3411,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_ABASHED", - desc = "Abashed Expanse", + desc = _t"Abashed Expanse", no_stop_enter_worlmap = true, - long_desc = function(self, eff) return ("Zone-wide effect: Your Phase Door spell is super easy to use here, allowing you to target it regardless of level. Any projectiles is slowed down by 80%.") end, + long_desc = function(self, eff) return (_t"Zone-wide effect: Your Phase Door spell is super easy to use here, allowing you to target it regardless of level. Any projectiles is slowed down by 80%.") end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3430,9 +3430,9 @@ newEffect{ newEffect{ name = "ZONE_AURA_CHALLENGE", - desc = "Challenge", + desc = _t"Challenge", no_stop_enter_worlmap = true, - long_desc = function(self, eff) if not eff.id_challenge_quest or not self:hasQuest(eff.id_challenge_quest) then return "???" else return self:hasQuest(eff.id_challenge_quest).name end end, + long_desc = function(self, eff) if not eff.id_challenge_quest or not self:hasQuest(eff.id_challenge_quest) then return _t"???" else return self:hasQuest(eff.id_challenge_quest).name end end, decrease = 0, no_remove = true, type = "other", subtype = { aura=true }, @@ -3461,9 +3461,9 @@ newEffect{ newEffect{ name = "THROWING_KNIVES", image = "talents/throwing_knives.png", - desc = "Throwing Knives", decrease = 0, - display_desc = function(self, eff) return eff.stacks.." Knives" end, - long_desc = function(self, eff) return ("Has %d throwing knives prepared:\n\n%s"):format(eff.stacks, self:callTalent(self.T_THROWING_KNIVES, "knivesInfo")) end, + desc = _t"Throwing Knives", decrease = 0, + display_desc = function(self, eff) return ("%d Knives"):tformat(eff.stacks) end, + long_desc = function(self, eff) return ("Has %d throwing knives prepared:\n\n%s"):tformat(eff.stacks, self:callTalent(self.T_THROWING_KNIVES, "knivesInfo")) end, type = "other", subtype = { tactic=true }, status = "beneficial", @@ -3485,9 +3485,9 @@ newEffect{ newEffect{ name = "SCOUNDREL", image = "talents/scoundrel.png", - desc = "Scoundrel's Strategies", + desc = _t"Scoundrel's Strategies", long_desc = function(self, eff) return ("The target is suffering from disabling wounds, reducing their critical strike damage by %d%%."): - format( eff.power ) end, + tformat( eff.power ) end, type = "other", subtype = { tactic=true }, status = "detrimental", @@ -3501,9 +3501,9 @@ newEffect{ newEffect{ name = "FUMBLE", image = "talents/fumble.png", - desc = "Fumble", + desc = _t"Fumble", long_desc = function(self, eff) return ("The target is suffering from distracting wounds, and has a %d%% chance to fail to use a talent and injure itself for %d physical damage."): - format( eff.power*eff.stacks, eff.dam ) end, + tformat( eff.power*eff.stacks, eff.dam ) end, charges = function(self, eff) return eff.stacks end, type = "other", subtype = { tactic=true }, @@ -3547,14 +3547,14 @@ newEffect{ newEffect{ name = "TOUCH_OF_DEATH", image = "talents/touch_of_death.png", - desc = "Touch of Death", - long_desc = function(self, eff) return ("The target is taking %0.2f physical damage each turn. If they die while under this effect, they will explode!"):format(eff.dam) end, + desc = _t"Touch of Death", + long_desc = function(self, eff) return ("The target is taking %0.2f physical damage each turn. If they die while under this effect, they will explode!"):tformat(eff.dam) end, type = "other", --extending this would be very bad subtype = { }, status = "detrimental", parameters = { dur=4, dam=10, radius=1, combo=1 }, - on_gain = function(self, err) return "#Target# is mortally wounded!", "+Touch of Death!" end, - on_lose = function(self, err) return "#Target# overcomes the touch of death.", "-Touch of Death" end, + on_gain = function(self, err) return _t"#Target# is mortally wounded!", _t"+Touch of Death!" end, + on_lose = function(self, err) return _t"#Target# overcomes the touch of death.", _t"-Touch of Death" end, activate = function(self, eff) end, deactivate = function(self, eff) @@ -3571,20 +3571,20 @@ newEffect{ local tg = {type="ball", radius=eff.radius, selffire=false, friendlyfire=false, x=self.x, y=self.y} local dam = eff.dam eff.src:project(tg, self.x, self.y, DamageType.PHYSICAL, dam, {type="bones"}) - game.logSeen(eff.src, "#LIGHT_RED#%s explodes into a shower of gore!", self.name:capitalize()) + game.logSeen(eff.src, "#LIGHT_RED#%s explodes into a shower of gore!", self:getName():capitalize()) self:removeEffect(self.EFF_TOUCH_OF_DEATH) end, } newEffect{ name = "MARKED", image = "talents/master_marksman.png", - desc = "Marked", - long_desc = function(self, eff) return ("Target is marked, leaving them vulnerable to marked shots."):format() end, + desc = _t"Marked", + long_desc = function(self, eff) return ("Target is marked, leaving them vulnerable to marked shots."):tformat() end, type = "other", subtype = { tactic=true }, status = "detrimental", - on_gain = function(self, err) return nil, "+Marked!" end, - on_lose = function(self, err) return nil, "-Marked" end, + on_gain = function(self, err) return nil, _t"+Marked!" end, + on_lose = function(self, err) return nil, _t"-Marked" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("circle", 1, {base_rot=1, oversize=1.0, a=200, appear=8, speed=0, img="marked", radius=0})) self:effectTemporaryValue(eff, "marked", 1) @@ -3599,14 +3599,14 @@ newEffect{ newEffect{ name = "FLARE", - desc = "Flare", image = "talents/flare_raz.png", - long_desc = function(self, eff) return ("The target is lit up by a flare, reducing its stealth and invisibility power by %d, defense by %d and removing all evasion bonus from being unseen."):format(eff.power, eff.power) end, + desc = _t"Flare", image = "talents/flare_raz.png", + long_desc = function(self, eff) return ("The target is lit up by a flare, reducing its stealth and invisibility power by %d, defense by %d and removing all evasion bonus from being unseen."):tformat(eff.power, eff.power) end, type = "other", subtype = { sun=true }, status = "detrimental", parameters = { power=20 }, - on_gain = function(self, err) return nil, "+Illumination" end, - on_lose = function(self, err) return nil, "-Illumination" end, + on_gain = function(self, err) return nil, _t"+Illumination" end, + on_lose = function(self, err) return nil, _t"-Illumination" end, activate = function(self, eff) self:effectTemporaryValue(eff, "inc_stealth", -eff.power) if self:attr("invisible") then self:effectTemporaryValue(eff, "invisible", -eff.power) end @@ -3617,8 +3617,8 @@ newEffect{ newEffect{ name = "PIN_DOWN", - desc = "Pinned Down", image = "talents/pin_down.png", - long_desc = function(self, eff) return ("The next Steady Shot or Shoot has 100%% chance to be a critical hit and mark."):format() end, + desc = _t"Pinned Down", image = "talents/pin_down.png", + long_desc = function(self, eff) return ("The next Steady Shot or Shoot has 100%% chance to be a critical hit and mark."):tformat() end, type = "other", subtype = { tactic=true }, status = "detrimental", @@ -3631,8 +3631,8 @@ newEffect{ newEffect{ name = "DEMI_GODMODE", - desc = "Demigod Mode", image = "effects/darkgod.png", - long_desc = function(self, eff) return ("DEMI-GODMODE: Target has 10000 additional life and regenerates 2000 life per turn. It deals +500%% damage, and has full ESP."):format() end, + desc = _t"Demigod Mode", image = "effects/darkgod.png", + long_desc = function(self, eff) return ("DEMI-GODMODE: Target has 10000 additional life and regenerates 2000 life per turn. It deals +500%% damage, and has full ESP."):tformat() end, type = "other", subtype = { cheat=true }, status = "beneficial", @@ -3662,8 +3662,8 @@ newEffect{ newEffect{ name = "GODMODE", - desc = "God Mode", image = "effects/darkgod.png", - long_desc = function(self, eff) return ("GODMODE: Target is invulnerable to damage, immune to bad status effects, deals +10000%% damage (100%% penetration), does not need to breathe, and has full ESP."):format() end, + desc = _t"God Mode", image = "effects/darkgod.png", + long_desc = function(self, eff) return ("GODMODE: Target is invulnerable to damage, immune to bad status effects, deals +10000%% damage (100%% penetration), does not need to breathe, and has full ESP."):tformat() end, type = "other", subtype = { cheat=true }, status = "beneficial", @@ -3690,14 +3690,14 @@ newEffect{ newEffect{ name = "SLIPPERY_GROUND", image = "talents/freeze.png", - desc = "Slippery Ground", - long_desc = function(self, eff) return ("The target is having trouble keeping their balance. Each time it tries to use a talent there is %d%% chance of failure."):format(eff.fail) end, + desc = _t"Slippery Ground", + long_desc = function(self, eff) return ("The target is having trouble keeping their balance. Each time it tries to use a talent there is %d%% chance of failure."):tformat(eff.fail) end, type = "other", subtype = { nature=true }, status = "detrimental", parameters = {fail=20}, - on_gain = function(self, err) return "#Target# is struggling to keep his footing!", "+Slippery Ground" end, - on_lose = function(self, err) return "#Target# regains their balance.", "-Slippery Ground" end, + on_gain = function(self, err) return _t"#Target# is struggling to keep his footing!", _t"+Slippery Ground" end, + on_lose = function(self, err) return _t"#Target# regains their balance.", _t"-Slippery Ground" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("talent_fail_chance", eff.fail) end, @@ -3708,14 +3708,14 @@ newEffect{ newEffect{ name = "FROZEN_GROUND", image = "talents/freeze.png", - desc = "Frozen Ground", - long_desc = function(self, eff) return ("The target is energized by the cold while wearing the Frost Treads, gaining 20%% increased cold damage."):format(eff.fail) end, + desc = _t"Frozen Ground", + long_desc = function(self, eff) return ("The target is energized by the cold while wearing the Frost Treads, gaining 20%% increased cold damage."):tformat(eff.fail) end, type = "other", subtype = { nature=true }, status = "beneficial", parameters = {}, - on_gain = function(self, err) return "#Target# is energized by the cold!", "+Frozen Ground" end, - on_lose = function(self, err) return "#Target# regains balance.", "-Frozen Ground" end, + on_gain = function(self, err) return _t"#Target# is energized by the cold!", _t"+Frozen Ground" end, + on_lose = function(self, err) return _t"#Target# regains balance.", _t"-Frozen Ground" end, activate = function(self, eff) self:effectTemporaryValue(eff, "inc_damage", {[engine.DamageType.COLD] = 20}) end, @@ -3725,8 +3725,8 @@ newEffect{ newEffect{ name = "RECALL", image = "effects/recall.png", - desc = "Recalling", - long_desc = function(self, eff) return "The target is waiting to be recalled back to the worldmap." end, + desc = _t"Recalling", + long_desc = function(self, eff) return _t"The target is waiting to be recalled back to the worldmap." end, type = "magical", subtype = { unknown=true }, status = "beneficial", @@ -3751,8 +3751,8 @@ newEffect{ newEffect{ name = "STEALTH_SKEPTICAL", image = "talents/stealth.png", - desc = "Skeptical", - long_desc = function(self, eff) return "The target doesn't believe its ally truly saw anything in the shadows." end, + desc = _t"Skeptical", + long_desc = function(self, eff) return _t"The target doesn't believe its ally truly saw anything in the shadows." end, type = "other", subtype = { }, status = "neutral", @@ -3770,8 +3770,8 @@ newEffect{ newEffect{ name = "UNLIT_HEART", image = "talents/armour_of_shadows.png", - desc = "Empowered by the shadows", - long_desc = function(self, eff) return ("Gain %d%% all damage and %d%% all res."):format(eff.dam, eff.res) end, + desc = _t"Empowered by the shadows", + long_desc = function(self, eff) return ("Gain %d%% all damage and %d%% all res."):tformat(eff.dam, eff.res) end, type = "other", subtype = { darkness = true }, status = "beneficial", @@ -3784,15 +3784,15 @@ newEffect{ newEffect{ name = "INTIMIDATED", - desc = "Intimidated", - long_desc = function(self, eff) return ("The target's morale is weakened, reducing its attack power, mind power, and spellpower by %d."):format(eff.power) end, + desc = _t"Intimidated", + long_desc = function(self, eff) return ("The target's morale is weakened, reducing its attack power, mind power, and spellpower by %d."):tformat(eff.power) end, charges = function(self, eff) return math.round(eff.power) end, type = "other", subtype = { }, no_stop_enter_worlmap = true, cancel_on_level_change = true, status = "detrimental", - on_gain = function(self, err) return "#Target#'s morale has been lowered.", "+Intimidated" end, - on_lose = function(self, err) return "#Target# has regained its confidence.", "-Intimidated" end, + on_gain = function(self, err) return _t"#Target#'s morale has been lowered.", _t"+Intimidated" end, + on_lose = function(self, err) return _t"#Target# has regained its confidence.", _t"-Intimidated" end, parameters = { power=1 }, on_merge = function(self, old_eff, new_eff, e) self:removeTemporaryValue("combat_dam", old_eff.damid) @@ -3822,8 +3822,8 @@ newEffect{ newEffect{ name = "FEED", image = "talents/feed.png", - desc = "Feeding", - long_desc = function(self, eff) return ("%s is feeding from %s."):format(self.name:capitalize(), eff.target.name) end, + desc = _t"Feeding", + long_desc = function(self, eff) return ("%s is feeding from %s."):tformat(self:getName():capitalize(), eff.target:getName()) end, type = "other", subtype = { }, no_stop_enter_worlmap = true, cancel_on_level_change = true, @@ -3920,8 +3920,8 @@ newEffect{ newEffect{ name = "FED_UPON", image = "effects/fed_upon.png", - desc = "Fed Upon", - long_desc = function(self, eff) return ("%s is fed upon by %s."):format(self.name:capitalize(), eff.src.name) end, + desc = _t"Fed Upon", + long_desc = function(self, eff) return ("%s is fed upon by %s."):tformat(self:getName():capitalize(), eff.src:getName()) end, type = "other", subtype = { psychic_drain=true }, status = "detrimental", @@ -3980,8 +3980,8 @@ newEffect{ newEffect{ name = "OMNIVISION", image = "talents/track.png", - desc = "Sensing Everything", - long_desc = function(self, eff) return "Improves senses, allowing the detection of everything." end, + desc = _t"Sensing Everything", + long_desc = function(self, eff) return _t"Improves senses, allowing the detection of everything." end, type = "other", subtype = { sense=true }, status = "beneficial", @@ -3997,8 +3997,8 @@ newEffect{ newEffect{ name = "DOZING", image = "talents/sleep.png", - desc = "Dozing", - long_desc = function(self, eff) return "The target is completely asleep, unable to act." end, + desc = _t"Dozing", + long_desc = function(self, eff) return _t"The target is completely asleep, unable to act." end, type = "other", subtype = { sleep=true }, status = "detrimental", diff --git a/game/modules/tome/data/timed_effects/physical.lua b/game/modules/tome/data/timed_effects/physical.lua index 50977185f436d330ed7fec298bb9d0dcc9d0553f..f3c7bc8bfa8c7fc07b279414b2d5ee5c29051902 100644 --- a/game/modules/tome/data/timed_effects/physical.lua +++ b/game/modules/tome/data/timed_effects/physical.lua @@ -27,14 +27,14 @@ local Level = require "engine.Level" -- Item specific newEffect{ name = "ITEM_ANTIMAGIC_SCOURED", image = "talents/acidic_skin.png", - desc = "Scoured", - long_desc = function(self, eff) return ("Scoured by natural acid, reducing their offensive power ratings by %d%%."):format(eff.pct*100 or 0) end, + desc = _t"Scoured", + long_desc = function(self, eff) return ("Scoured by natural acid, reducing their offensive power ratings by %d%%."):tformat(eff.pct*100 or 0) end, type = "physical", subtype = { acid=true }, status = "detrimental", parameters = {pct = 0.3, spell = 0, mind = 0, phys = 0, power_str = ""}, - on_gain = function(self, err) return "#Target#'s power is greatly reduced!" end, - on_lose = function(self, err) return "#Target# power has recovered." end, + on_gain = function(self, err) return _t"#Target#'s power is greatly reduced!" end, + on_lose = function(self, err) return _t"#Target# power has recovered." end, on_timeout = function(self, eff) end, activate = function(self, eff) @@ -47,15 +47,15 @@ newEffect{ newEffect{ name = "RELENTLESS_TEMPO", image = "talents/sunder_mind.png", - desc = "Relentless Tempo", + desc = _t"Relentless Tempo", long_desc = function(self, eff) return ("Attuning to the flow of combat, increasing their combat stats. \nDefense: %d\nAll Damage: %d%%\nStamina Regeneration: %d\n%s"): - format( eff.cur_defense or 0, eff.cur_damage or 0, eff.cur_stamina or 0, eff.stacks >= 5 and "All Resistance: 20%" or "") end, + tformat( eff.cur_defense or 0, eff.cur_damage or 0, eff.cur_stamina or 0, eff.stacks >= 5 and _t"All Resistance: 20%" or "") end, charges = function(self, eff) return eff.stacks end, type = "physical", subtype = { tempo=true }, status = "beneficial", - on_gain = function(self, err) return "#Target# is gaining tempo.", "+Tempo" end, - on_lose = function(self, err) return "#Target# loses their tempo.", "-Tempo" end, + on_gain = function(self, err) return _t"#Target# is gaining tempo.", _t"+Tempo" end, + on_lose = function(self, err) return _t"#Target# loses their tempo.", _t"-Tempo" end, parameters = { stamina = 0, defense = 0, damage = 0, stacks = 0, resists = 0 }, on_merge = function(self, old_eff, new_eff) old_eff.dur =3 @@ -104,14 +104,14 @@ newEffect{ newEffect{ name = "DELIRIOUS_CONCUSSION", image = "talents/slippery_moss.png", - desc = "Concussion", - long_desc = function(self, eff) return ("The target can't think straight, causing their actions to fail."):format() end, + desc = _t"Concussion", + long_desc = function(self, eff) return ("The target can't think straight, causing their actions to fail."):tformat() end, type = "physical", subtype = { concussion=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target#'s brain isn't quite working right!", "+Concussion" end, - on_lose = function(self, err) return "#Target# regains their concentration.", "-Concussion" end, + on_gain = function(self, err) return _t"#Target#'s brain isn't quite working right!", _t"+Concussion" end, + on_lose = function(self, err) return _t"#Target# regains their concentration.", _t"-Concussion" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("talent_fail_chance", 100) end, @@ -122,15 +122,15 @@ newEffect{ newEffect{ name = "CUT", image = "effects/cut.png", - desc = "Bleeding", - long_desc = function(self, eff) return ("Huge cut that bleeds, doing %0.2f physical damage per turn."):format(eff.power) end, + desc = _t"Bleeding", + long_desc = function(self, eff) return ("Huge cut that bleeds, doing %0.2f physical damage per turn."):tformat(eff.power) end, charges = function(self, eff) return (math.floor(eff.power)) end, type = "physical", subtype = { wound=true, cut=true, bleed=true }, status = "detrimental", parameters = { power=1 }, - on_gain = function(self, err) return "#Target# starts to bleed.", "+Bleeds" end, - on_lose = function(self, err) return "#Target# stops bleeding.", "-Bleeds" end, + on_gain = function(self, err) return _t"#Target# starts to bleed.", _t"+Bleeds" end, + on_lose = function(self, err) return _t"#Target# stops bleeding.", _t"-Bleeds" end, on_merge = function(self, old_eff, new_eff) -- Merge the flames! local olddam = old_eff.power * old_eff.dur @@ -154,15 +154,15 @@ newEffect{ newEffect{ name = "DEEP_WOUND", image = "talents/bleeding_edge.png", - desc = "Deep Wound", - long_desc = function(self, eff) return ("Huge cut that bleeds, doing %0.2f physical damage per turn and decreasing all heals received by %d%%."):format(eff.power, eff.heal_factor) end, + desc = _t"Deep Wound", + long_desc = function(self, eff) return ("Huge cut that bleeds, doing %0.2f physical damage per turn and decreasing all heals received by %d%%."):tformat(eff.power, eff.heal_factor) end, charges = function(self, eff) return (math.floor(eff.power)) end, type = "physical", subtype = { wound=true, cut=true, bleed=true }, status = "detrimental", parameters = {power=10, heal_factor=30}, - on_gain = function(self, err) return "#Target# is cut deeply.", "+Deep Wounds" end, - on_lose = function(self, err) return "#Target#'s deep wound closes.", "-Deep Wounds" end, + on_gain = function(self, err) return _t"#Target# is cut deeply.", _t"+Deep Wounds" end, + on_lose = function(self, err) return _t"#Target#'s deep wound closes.", _t"-Deep Wounds" end, activate = function(self, eff) eff.healid = self:addTemporaryValue("healing_factor", -eff.heal_factor / 100) if eff.src and eff.src:knowTalent(self.T_BLOODY_BUTCHER) then @@ -181,14 +181,14 @@ newEffect{ newEffect{ name = "REGENERATION", image = "talents/infusion__regeneration.png", - desc = "Regeneration", - long_desc = function(self, eff) return ("A flow of life spins around the target, regenerating %0.2f life per turn."):format(eff.power) end, + desc = _t"Regeneration", + long_desc = function(self, eff) return ("A flow of life spins around the target, regenerating %0.2f life per turn."):tformat(eff.power) end, type = "physical", subtype = { nature=true, healing=true, regeneration=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# starts regenerating health quickly.", "+Regen" end, - on_lose = function(self, err) return "#Target# stops regenerating health quickly.", "-Regen" end, + on_gain = function(self, err) return _t"#Target# starts regenerating health quickly.", _t"+Regen" end, + on_lose = function(self, err) return _t"#Target# stops regenerating health quickly.", _t"-Regen" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("life_regen", eff.power) @@ -213,15 +213,15 @@ newEffect{ newEffect{ name = "POISONED", image = "effects/poisoned.png", - desc = "Poison", - long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f nature damage per turn."):format(eff.power) end, + desc = _t"Poison", + long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f nature damage per turn."):tformat(eff.power) end, charges = function(self, eff) return (math.floor(eff.power)) end, type = "physical", subtype = { poison=true, nature=true }, no_ct_effect = true, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is poisoned!", "+Poison" end, - on_lose = function(self, err) return "#Target# stops being poisoned.", "-Poison" end, + on_gain = function(self, err) return _t"#Target# is poisoned!", _t"+Poison" end, + on_lose = function(self, err) return _t"#Target# stops being poisoned.", _t"-Poison" end, on_merge = function(self, old_eff, new_eff) -- Merge the poison local olddam = old_eff.power * old_eff.dur @@ -243,14 +243,14 @@ newEffect{ newEffect{ name = "SPYDRIC_POISON", image = "effects/spydric_poison.png", - desc = "Spydric Poison", - long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f nature damage per turn and unable to move (but can otherwise act freely)."):format(eff.power) end, + desc = _t"Spydric Poison", + long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f nature damage per turn and unable to move (but can otherwise act freely)."):tformat(eff.power) end, type = "physical", subtype = { poison=true, pin=true, nature=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10}, - on_gain = function(self, err) return "#Target# is poisoned and cannot move!", "+Spydric Poison" end, - on_lose = function(self, err) return "#Target# is no longer poisoned.", "-Spydric Poison" end, + on_gain = function(self, err) return _t"#Target# is poisoned and cannot move!", _t"+Spydric Poison" end, + on_lose = function(self, err) return _t"#Target# is no longer poisoned.", _t"-Spydric Poison" end, activate = function(self, eff) self:effectTemporaryValue(eff, "never_move", 1) end, @@ -270,15 +270,15 @@ newEffect{ newEffect{ name = "INSIDIOUS_POISON", image = "effects/insidious_poison.png", - desc = "Insidious Poison", - long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f nature damage per turn and decreasing all heals received by %d%%."):format(eff.power, eff.heal_factor) end, + desc = _t"Insidious Poison", + long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f nature damage per turn and decreasing all heals received by %d%%."):tformat(eff.power, eff.heal_factor) end, charges = function(self, eff) return (math.floor(eff.heal_factor).."%") end, type = "physical", subtype = { poison=true, nature=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10, heal_factor=30}, - on_gain = function(self, err) return "#Target# is poisoned!", "+Insidious Poison" end, - on_lose = function(self, err) return "#Target# is no longer poisoned.", "-Insidious Poison" end, + on_gain = function(self, err) return _t"#Target# is poisoned!", _t"+Insidious Poison" end, + on_lose = function(self, err) return _t"#Target# is no longer poisoned.", _t"-Insidious Poison" end, activate = function(self, eff) self:effectTemporaryValue(eff, "healing_factor", -eff.heal_factor / 100) end, @@ -298,15 +298,15 @@ newEffect{ newEffect{ name = "CRIPPLING_POISON", image = "talents/crippling_poison.png", - desc = "Crippling Poison", - long_desc = function(self, eff) return ("The target is poisoned and sick, doing %0.2f nature damage per turn. Each time it tries to use a talent there is %d%% chance of failure."):format(eff.power, eff.fail) end, + desc = _t"Crippling Poison", + long_desc = function(self, eff) return ("The target is poisoned and sick, doing %0.2f nature damage per turn. Each time it tries to use a talent there is %d%% chance of failure."):tformat(eff.power, eff.fail) end, charges = function(self, eff) return (math.floor(eff.fail).."%") end, type = "physical", subtype = { poison=true, nature=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10, fail=5}, - on_gain = function(self, err) return "#Target# is poisoned!", "+Crippling Poison" end, - on_lose = function(self, err) return "#Target# is no longer poisoned.", "-Crippling Poison" end, + on_gain = function(self, err) return _t"#Target# is poisoned!", _t"+Crippling Poison" end, + on_lose = function(self, err) return _t"#Target# is no longer poisoned.", _t"-Crippling Poison" end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_poison") then self:heal(eff.power, eff.src) @@ -327,14 +327,14 @@ newEffect{ newEffect{ name = "NUMBING_POISON", image = "effects/numbing_poison.png", - desc = "Numbing Poison", - long_desc = function(self, eff) return ("The target is poisoned and sick, doing %0.2f nature damage per turn. All damage it does is reduced by %d%%."):format(eff.power, eff.reduce) end, + desc = _t"Numbing Poison", + long_desc = function(self, eff) return ("The target is poisoned and sick, doing %0.2f nature damage per turn. All damage it does is reduced by %d%%."):tformat(eff.power, eff.reduce) end, type = "physical", subtype = { poison=true, nature=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10, reduce=5}, - on_gain = function(self, err) return "#Target# is poisoned!", "+Numbing Poison" end, - on_lose = function(self, err) return "#Target# is no longer poisoned.", "-Numbing Poison" end, + on_gain = function(self, err) return _t"#Target# is poisoned!", _t"+Numbing Poison" end, + on_lose = function(self, err) return _t"#Target# is no longer poisoned.", _t"-Numbing Poison" end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_poison") then self:heal(eff.power, eff.src) @@ -355,17 +355,17 @@ newEffect{ newEffect{ name = "STONE_POISON", image = "talents/stoning_poison.png", - desc = "Stoning Poison", + desc = _t"Stoning Poison", long_desc = function(self, eff) local chance = util.bound((eff.turn_count + eff.dur)*100/eff.time_to_stone, 0, 100) - return ("The target is taking %0.2f nature damage per turn from a potent earth-based poison. In %d more turn(s), or when the poison has run its course (%d%% chance), the target will be turned to stone for %d turns."):format(eff.power, eff.time_to_stone - eff.turn_count, chance, eff.stone) + return ("The target is taking %0.2f nature damage per turn from a potent earth-based poison. In %d more turn(s), or when the poison has run its course (%d%% chance), the target will be turned to stone for %d turns."):tformat(eff.power, eff.time_to_stone - eff.turn_count, chance, eff.stone) end, type = "physical", subtype = { poison=true, earth=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10, stone=1, time_to_stone=10, turn_count=0}, - on_gain = function(self, err) return "#Target# is infused with stone poison!", "+Stoning Poison" end, - on_lose = function(self, err) return "#Target# is free of the stone poison!", "-Stoning Poison" end, + on_gain = function(self, err) return _t"#Target# is infused with stone poison!", _t"+Stoning Poison" end, + on_lose = function(self, err) return _t"#Target# is free of the stone poison!", _t"-Stoning Poison" end, on_timeout = function(self, eff) -- Damage each turn, stone after enough time if self:attr("purify_poison") then self:heal(eff.power, eff.src) else DamageType:get(DamageType.NATURE).projector(eff.src, self.x, self.y, DamageType.NATURE, eff.power) @@ -385,7 +385,7 @@ newEffect{ self:removeEffect(eff.effect_id) self:setEffect(self.EFF_STONED, math.floor(eff.stone*chance/100), {}) else - game.logSeen(self, "#GREY#%s looks stony for a moment, but resists the transformation.", self.name:capitalize()) + game.logSeen(self, "#GREY#%s looks stony for a moment, but resists the transformation.", self:getName():capitalize()) end end, -- There are situations this matters, such as copyEffect @@ -416,15 +416,15 @@ newEffect{ newEffect{ name = "BURNING", image = "talents/flame.png", - desc = "Burning", - long_desc = function(self, eff) return ("The target is on fire, taking %0.2f fire damage per turn."):format(eff.power) end, + desc = _t"Burning", + long_desc = function(self, eff) return ("The target is on fire, taking %0.2f fire damage per turn."):tformat(eff.power) end, charges = function(self, eff) return (math.floor(eff.power)) end, type = "physical", subtype = { fire=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is on fire!", "+Burn" end, - on_lose = function(self, err) return "#Target# stops burning.", "-Burn" end, + on_gain = function(self, err) return _t"#Target# is on fire!", _t"+Burn" end, + on_lose = function(self, err) return _t"#Target# stops burning.", _t"-Burn" end, on_merge = function(self, old_eff, new_eff) -- Merge the flames! local olddam = old_eff.power * old_eff.dur @@ -441,15 +441,15 @@ newEffect{ newEffect{ name = "BURNING_SHOCK", image = "talents/flameshock.png", - desc = "Burning Shock", - long_desc = function(self, eff) return ("The target is on fire, taking %0.2f fire damage per turn, reducing damage by 50%%, putting 4 random talents on cooldown and reducing movement speed by 50%%. While flameshocked talents cooldown twice as slow."):format(eff.power) end, + desc = _t"Burning Shock", + long_desc = function(self, eff) return ("The target is on fire, taking %0.2f fire damage per turn, reducing damage by 50%%, putting 4 random talents on cooldown and reducing movement speed by 50%%. While flameshocked talents cooldown twice as slow."):tformat(eff.power) end, charges = function(self, eff) return (math.floor(eff.power)) end, type = "physical", subtype = { fire=true, stun=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is stunned by the burning flame!", "+Burning Shock" end, - on_lose = function(self, err) return "#Target# is not stunned anymore.", "-Burning Shock" end, + on_gain = function(self, err) return _t"#Target# is stunned by the burning flame!", _t"+Burning Shock" end, + on_lose = function(self, err) return _t"#Target# is not stunned anymore.", _t"-Burning Shock" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("stunned", 1) eff.speedid = self:addTemporaryValue("movement_speed", -0.5) @@ -478,14 +478,14 @@ newEffect{ newEffect{ name = "STUNNED", image = "effects/stunned.png", - desc = "Stunned", - long_desc = function(self, eff) return ("The target is stunned, reducing damage by 50%%, putting 3 random talents on cooldown and reducing movement speed by 50%%. While stunned talents cooldown twice as slow."):format() end, + desc = _t"Stunned", + long_desc = function(self, eff) return ("The target is stunned, reducing damage by 50%%, putting 3 random talents on cooldown and reducing movement speed by 50%%. While stunned talents cooldown twice as slow."):tformat() end, type = "physical", subtype = { stun=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is stunned!", "+Stunned" end, - on_lose = function(self, err) return "#Target# is not stunned anymore.", "-Stunned" end, + on_gain = function(self, err) return _t"#Target# is stunned!", _t"+Stunned" end, + on_lose = function(self, err) return _t"#Target# is not stunned anymore.", _t"-Stunned" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("stunned", 1) eff.speedid = self:addTemporaryValue("movement_speed", -0.5) @@ -510,14 +510,14 @@ newEffect{ newEffect{ name = "DISARMED", image = "talents/disarm.png", - desc = "Disarmed", - long_desc = function(self, eff) return "The target is maimed, unable to correctly wield a weapon." end, + desc = _t"Disarmed", + long_desc = function(self, eff) return _t"The target is maimed, unable to correctly wield a weapon." end, type = "physical", subtype = { disarm=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is disarmed!", "+Disarmed" end, - on_lose = function(self, err) return "#Target# rearms.", "-Disarmed" end, + on_gain = function(self, err) return _t"#Target# is disarmed!", _t"+Disarmed" end, + on_lose = function(self, err) return _t"#Target# rearms.", _t"-Disarmed" end, activate = function(self, eff) self:removeEffect(self.EFF_COUNTER_ATTACKING) -- Cannot parry or counterattack while disarmed self:removeEffect(self.EFF_DUAL_WEAPON_DEFENSE) @@ -531,14 +531,14 @@ newEffect{ newEffect{ name = "CONSTRICTED", image = "talents/constrict.png", - desc = "Constricted", - long_desc = function(self, eff) return ("The target is constricted, preventing movement and making it suffocate (loses %0.2f air per turn)."):format(eff.power) end, + desc = _t"Constricted", + long_desc = function(self, eff) return ("The target is constricted, preventing movement and making it suffocate (loses %0.2f air per turn)."):tformat(eff.power) end, type = "physical", subtype = { grapple=true, pin=true }, status = "detrimental", parameters = {power=10}, - on_gain = function(self, err) return "#Target# is constricted!", "+Constricted" end, - on_lose = function(self, err) return "#Target# is free to breathe.", "-Constricted" end, + on_gain = function(self, err) return _t"#Target# is constricted!", _t"+Constricted" end, + on_lose = function(self, err) return _t"#Target# is free to breathe.", _t"-Constricted" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("never_move", 1) end, @@ -546,7 +546,7 @@ newEffect{ if core.fov.distance(self.x, self.y, eff.src.x, eff.src.y) > 1 or eff.src.dead or not game.level:hasEntity(eff.src) then return true end - self:suffocate(eff.power, eff.src, (" was constricted to death by %s."):format(eff.src.unique and eff.src.name or eff.src.name:a_an())) + self:suffocate(eff.power, eff.src, (" was constricted to death by %s."):tformat(eff.src.unique and eff.src.name or eff.src:getName():a_an())) end, deactivate = function(self, eff) self:removeTemporaryValue("never_move", eff.tmpid) @@ -555,14 +555,14 @@ newEffect{ newEffect{ name = "DAZED", image = "effects/dazed.png", - desc = "Dazed", - long_desc = function(self, eff) return "The target is dazed, rendering it unable to move, halving all damage done, defense, saves, accuracy, spell, mind and physical power. Any damage will remove the daze." end, + desc = _t"Dazed", + long_desc = function(self, eff) return _t"The target is dazed, rendering it unable to move, halving all damage done, defense, saves, accuracy, spell, mind and physical power. Any damage will remove the daze." end, type = "physical", subtype = { stun=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is dazed!", "+Dazed" end, - on_lose = function(self, err) return "#Target# is not dazed anymore.", "-Dazed" end, + on_gain = function(self, err) return _t"#Target# is dazed!", _t"+Dazed" end, + on_lose = function(self, err) return _t"#Target# is not dazed anymore.", _t"-Dazed" end, activate = function(self, eff) self:effectTemporaryValue(eff, "dazed", 1) self:effectTemporaryValue(eff, "never_move", 1) @@ -573,9 +573,9 @@ newEffect{ newEffect{ name = "EVASION", image = "talents/evasion.png", - desc = "Evasion", + desc = _t"Evasion", long_desc = function(self, eff) - return ("The target has %d%% chance to evade melee and ranged attacks"):format(eff.chance) .. ((eff.defense>0 and (" and gains %d defense"):format(eff.defense)) or "") .. "." + return ("The target has %d%% chance to evade melee and ranged attacks"):tformat(eff.chance) .. ((eff.defense>0 and (" and gains %d defense"):tformat(eff.defense)) or "") .. "." end, charges = function(self, eff) if self:attr("no_evasion") then return 0 end @@ -585,8 +585,8 @@ newEffect{ subtype = { evade=true }, status = "beneficial", parameters = { chance=10, defense=0 }, - on_gain = function(self, err) return "#Target# tries to evade attacks.", "+Evasion" end, - on_lose = function(self, err) return "#Target# is no longer evading attacks.", "-Evasion" end, + on_gain = function(self, err) return _t"#Target# tries to evade attacks.", _t"+Evasion" end, + on_lose = function(self, err) return _t"#Target# is no longer evading attacks.", _t"-Evasion" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("evasion", eff.chance) eff.pid = self:addTemporaryValue("projectile_evasion", eff.chance) @@ -604,14 +604,14 @@ newEffect{ newEffect{ name = "SPEED", image = "talents/shaloren_speed.png", - desc = "Speed", - long_desc = function(self, eff) return ("Increases global action speed by %d%%."):format(eff.power * 100) end, + desc = _t"Speed", + long_desc = function(self, eff) return ("Increases global action speed by %d%%."):tformat(eff.power * 100) end, type = "physical", subtype = { speed=true }, status = "beneficial", parameters = { power=0.1 }, - on_gain = function(self, err) return "#Target# speeds up.", "+Fast" end, - on_lose = function(self, err) return "#Target# slows down.", "-Fast" end, + on_gain = function(self, err) return _t"#Target# speeds up.", _t"+Fast" end, + on_lose = function(self, err) return _t"#Target# slows down.", _t"-Fast" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("global_speed_add", eff.power) end, @@ -622,15 +622,15 @@ newEffect{ newEffect{ name = "SLOW", image = "talents/slow.png", - desc = "Slow", - long_desc = function(self, eff) return ("Reduces global action speed by %d%%."):format(math.floor(eff.power * 100)) end, + desc = _t"Slow", + long_desc = function(self, eff) return ("Reduces global action speed by %d%%."):tformat(math.floor(eff.power * 100)) end, charges = function(self, eff) return (math.floor(eff.power * 100).."%") end, type = "physical", subtype = { slow=true }, status = "detrimental", parameters = { power=0.1 }, - on_gain = function(self, err) return "#Target# slows down.", "+Slow" end, - on_lose = function(self, err) return "#Target# speeds up.", "-Slow" end, + on_gain = function(self, err) return _t"#Target# slows down.", _t"+Slow" end, + on_lose = function(self, err) return _t"#Target# speeds up.", _t"-Slow" end, on_merge = function(self, old_eff, new_eff) if new_eff.power > old_eff.power then old_eff.power = new_eff.power @@ -648,14 +648,14 @@ newEffect{ newEffect{ name = "BLINDED", image = "effects/blinded.png", - desc = "Blinded", - long_desc = function(self, eff) return "The target is blinded, unable to see anything." end, + desc = _t"Blinded", + long_desc = function(self, eff) return _t"The target is blinded, unable to see anything." end, type = "physical", subtype = { blind=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# loses sight!", "+Blind" end, - on_lose = function(self, err) return "#Target# recovers sight.", "-Blind" end, + on_gain = function(self, err) return _t"#Target# loses sight!", _t"+Blind" end, + on_lose = function(self, err) return _t"#Target# recovers sight.", _t"-Blind" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("blind", 1) if game.level then @@ -674,14 +674,14 @@ newEffect{ newEffect{ name = "DWARVEN_RESILIENCE", image = "talents/dwarf_resilience.png", - desc = "Dwarven Resilience", - long_desc = function(self, eff) return ("The target's skin turns to stone, granting %d armour, %d physical save and %d spell save."):format(eff.armor, eff.physical, eff.spell) end, + desc = _t"Dwarven Resilience", + long_desc = function(self, eff) return ("The target's skin turns to stone, granting %d armour, %d physical save and %d spell save."):tformat(eff.armor, eff.physical, eff.spell) end, type = "physical", subtype = { earth=true }, status = "beneficial", parameters = { armor=10, spell=10, physical=10 }, - on_gain = function(self, err) return "#Target#'s skin turns to stone." end, - on_lose = function(self, err) return "#Target#'s skin returns to normal." end, + on_gain = function(self, err) return _t"#Target#'s skin turns to stone." end, + on_lose = function(self, err) return _t"#Target#'s skin returns to normal." end, activate = function(self, eff) eff.aid = self:addTemporaryValue("combat_armor", eff.armor) eff.pid = self:addTemporaryValue("combat_physresist", eff.physical) @@ -696,8 +696,8 @@ newEffect{ newEffect{ name = "STONE_SKIN", image = "talents/stoneskin.png", - desc = "Stoneskin", - long_desc = function(self, eff) return ("The target's skin reacts to damage, granting %d armour."):format(eff.power) end, + desc = _t"Stoneskin", + long_desc = function(self, eff) return ("The target's skin reacts to damage, granting %d armour."):tformat(eff.power) end, type = "physical", subtype = { earth=true }, status = "beneficial", @@ -712,14 +712,14 @@ newEffect{ newEffect{ name = "THORNY_SKIN", image = "talents/stoneskin.png", - desc = "Thorny Skin", - long_desc = function(self, eff) return ("The target's skin reacts to damage, granting %d armour and %d%% armour hardiness."):format(eff.ac, eff.hard) end, + desc = _t"Thorny Skin", + long_desc = function(self, eff) return ("The target's skin reacts to damage, granting %d armour and %d%% armour hardiness."):tformat(eff.ac, eff.hard) end, type = "physical", subtype = { nature=true }, status = "beneficial", parameters = { ac=10, hard=10 }, - on_gain = function(self, err) return "#Target#'s skin looks a bit thorny.", "+Thorny Skin" end, - on_lose = function(self, err) return "#Target# is less thorny now.", "-Thorny Skin" end, + on_gain = function(self, err) return _t"#Target#'s skin looks a bit thorny.", _t"+Thorny Skin" end, + on_lose = function(self, err) return _t"#Target# is less thorny now.", _t"-Thorny Skin" end, activate = function(self, eff) eff.aid = self:addTemporaryValue("combat_armor", eff.ac) eff.hid = self:addTemporaryValue("combat_armor_hardiness", eff.hard) @@ -732,14 +732,14 @@ newEffect{ newEffect{ name = "FROZEN_FEET", image = "talents/frozen_ground.png", - desc = "Frozen Feet", - long_desc = function(self, eff) return "The target is frozen on the ground, able to act freely but not move." end, + desc = _t"Frozen Feet", + long_desc = function(self, eff) return _t"The target is frozen on the ground, able to act freely but not move." end, type = "physical", subtype = { cold=true, pin=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is frozen to the ground!", "+Frozen" end, - on_lose = function(self, err) return "#Target# warms up.", "-Frozen" end, + on_gain = function(self, err) return _t"#Target# is frozen to the ground!", _t"+Frozen" end, + on_lose = function(self, err) return _t"#Target# warms up.", _t"-Frozen" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("never_move", 1) eff.frozid = self:addTemporaryValue("frozen", 1) @@ -752,15 +752,15 @@ newEffect{ newEffect{ name = "FROZEN", image = "talents/freeze.png", - desc = "Frozen", - long_desc = function(self, eff) return ("The target is encased in ice. All damage done to it will be split, 40%% absorbed by the ice and 60%% by the target. The target's defense is nullified while in the ice, and it may only attack the ice, but it is also immune to any new detrimental status effects (except Wet and Frozen Feet). The target cannot teleport or heal while frozen. %d HP on the iceblock remaining."):format(eff.hp) end, + desc = _t"Frozen", + long_desc = function(self, eff) return ("The target is encased in ice. All damage done to it will be split, 40%% absorbed by the ice and 60%% by the target. The target's defense is nullified while in the ice, and it may only attack the ice, but it is also immune to any new detrimental status effects (except Wet and Frozen Feet). The target cannot teleport or heal while frozen. %d HP on the iceblock remaining."):tformat(eff.hp) end, charges = function(self, eff) return math.floor(eff.hp) end, type = "physical", -- Frozen has some serious effects beyond just being frozen, no healing, no teleport, etc. But it can be applied by clearly non-magical sources i.e. Ice Breath subtype = { cold=true, stun=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is encased in ice!", "+Frozen" end, - on_lose = function(self, err) return "#Target# is free from the ice.", "-Frozen" end, + on_gain = function(self, err) return _t"#Target# is encased in ice!", _t"+Frozen" end, + on_lose = function(self, err) return _t"#Target# is free from the ice.", _t"-Frozen" end, activate = function(self, eff) -- Change color eff.old_r = self.color_r @@ -773,7 +773,7 @@ newEffect{ self.add_displays = { Entity.new{image='npc/iceblock.png', display=' ', display_on_seen=true } } eff.added_display = true end - eff.ice = mod.class.Object.new{name = "Iceblock", type = "wall", image='npc/iceblock.png', display = ' '} -- use type Object to facilitate the combat log + eff.ice = mod.class.Object.new{name = _t"Iceblock", type = "wall", image='npc/iceblock.png', display = ' '} -- use type Object to facilitate the combat log self:removeAllMOs() game.level.map:updateMap(self.x, self.y) @@ -813,14 +813,14 @@ newEffect{ newEffect{ name = "ETERNAL_WRATH", image = "talents/thaloren_wrath.png", - desc = "Wrath of the Woods", - long_desc = function(self, eff) return ("The target calls upon its inner resources, improving all damage by %d%% and reducing all damage taken by %d%%."):format(eff.power, eff.power) end, + desc = _t"Wrath of the Woods", + long_desc = function(self, eff) return ("The target calls upon its inner resources, improving all damage by %d%% and reducing all damage taken by %d%%."):tformat(eff.power, eff.power) end, type = "physical", subtype = { nature=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# radiates power." end, - on_lose = function(self, err) return "#Target#'s aura of power vanishes." end, + on_gain = function(self, err) return _t"#Target# radiates power." end, + on_lose = function(self, err) return _t"#Target#'s aura of power vanishes." end, activate = function(self, eff) eff.pid1 = self:addTemporaryValue("inc_damage", {all=eff.power}) eff.pid2 = self:addTemporaryValue("resists", {all=eff.power}) @@ -833,14 +833,14 @@ newEffect{ newEffect{ name = "HIGHBORN_WRATH", image = "talents/higher_heal.png", - desc = "Wrath of the Highborn", - long_desc = function(self, eff) return ("The target calls upon its inner resources, improving all damage by %d%% and reducing all damage taken by %d%%."):format(eff.power, eff.power) end, + desc = _t"Wrath of the Highborn", + long_desc = function(self, eff) return ("The target calls upon its inner resources, improving all damage by %d%% and reducing all damage taken by %d%%."):tformat(eff.power, eff.power) end, type = "physical", subtype = { }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# radiates power." end, - on_lose = function(self, err) return "#Target#'s aura of power vanishes." end, + on_gain = function(self, err) return _t"#Target# radiates power." end, + on_lose = function(self, err) return _t"#Target#'s aura of power vanishes." end, activate = function(self, eff) eff.pid1 = self:addTemporaryValue("inc_damage", {all=eff.power}) eff.pid2 = self:addTemporaryValue("resists", {all=eff.power}) @@ -853,14 +853,14 @@ newEffect{ newEffect{ name = "SHELL_SHIELD", image = "talents/shell_shield.png", - desc = "Shell Shield", - long_desc = function(self, eff) return ("The target takes cover in its shell, gaining %d%% all resist."):format(eff.power) end, + desc = _t"Shell Shield", + long_desc = function(self, eff) return ("The target takes cover in its shell, gaining %d%% all resist."):tformat(eff.power) end, type = "physical", subtype = { nature=true }, status = "beneficial", parameters = { power=50 }, - on_gain = function(self, err) return "#Target# takes cover under its shell.", "+Shell Shield" end, - on_lose = function(self, err) return "#Target# leaves the cover of its shell.", "-Shell Shield" end, + on_gain = function(self, err) return _t"#Target# takes cover under its shell.", _t"+Shell Shield" end, + on_lose = function(self, err) return _t"#Target# leaves the cover of its shell.", _t"-Shell Shield" end, activate = function(self, eff) eff.pid = self:addTemporaryValue("resists", {all=eff.power}) end, @@ -871,8 +871,8 @@ newEffect{ newEffect{ name = "SERPENTINE_NATURE", image = "talents/hydra.png", - desc = "Serpentine Nature", - long_desc = function(self, eff) return ("The target takes on the properties of the hydra, gaining %d%% affinity to lightning, acid, and nature damage and regenerating %d life per turn."):format(eff.power, eff.regen) end, + desc = _t"Serpentine Nature", + long_desc = function(self, eff) return ("The target takes on the properties of the hydra, gaining %d%% affinity to lightning, acid, and nature damage and regenerating %d life per turn."):tformat(eff.power, eff.regen) end, type = "physical", subtype = { nature=true }, status = "beneficial", @@ -889,14 +889,14 @@ newEffect{ newEffect{ name = "PAIN_SUPPRESSION", image = "talents/infusion__wild.png", - desc = "Pain Suppression", - long_desc = function(self, eff) return ("The target ignores pain, reducing all damage taken by %d%%."):format(eff.power) end, + desc = _t"Pain Suppression", + long_desc = function(self, eff) return ("The target ignores pain, reducing all damage taken by %d%%."):tformat(eff.power) end, type = "physical", subtype = { nature=true }, status = "beneficial", parameters = { power=20 }, - on_gain = function(self, err) return "#Target# lessens the pain.", "+Pain Suppression" end, - on_lose = function(self, err) return "#Target# feels pain again.", "-Pain Suppression" end, + on_gain = function(self, err) return _t"#Target# lessens the pain.", _t"+Pain Suppression" end, + on_lose = function(self, err) return _t"#Target# feels pain again.", _t"-Pain Suppression" end, activate = function(self, eff) eff.pid = self:addTemporaryValue("resists", {all=eff.power}) end, @@ -907,14 +907,14 @@ newEffect{ newEffect{ name = "PRIMAL_ATTUNEMENT", image = "talents/infusion__wild.png", - desc = "Primal Attunement", - long_desc = function(self, eff) return ("The target is attuned to the wild, increasing all damage affinity by %d%% and reducing a random debuff duration by %d each turn."):format(eff.power, eff.reduce) end, + desc = _t"Primal Attunement", + long_desc = function(self, eff) return ("The target is attuned to the wild, increasing all damage affinity by %d%% and reducing a random debuff duration by %d each turn."):tformat(eff.power, eff.reduce) end, type = "physical", subtype = { nature=true }, status = "beneficial", parameters = { power=20, reduce = 3 }, - on_gain = function(self, err) return "#Target# attunes to the wild.", "+Primal" end, - on_lose = function(self, err) return "#Target# is no longer one with nature.", "-Primal" end, + on_gain = function(self, err) return _t"#Target# attunes to the wild.", _t"+Primal" end, + on_lose = function(self, err) return _t"#Target# is no longer one with nature.", _t"-Primal" end, activate = function(self, eff) eff.pid = self:addTemporaryValue("damage_affinity", {all=eff.power}) end, @@ -933,14 +933,14 @@ newEffect{ newEffect{ name = "PURGE_BLIGHT", image = "talents/infusion__wild.png", - desc = "Purge Blight", - long_desc = function(self, eff) return ("The target is infused with the power of nature, reducing all blight damage taken by %d%%, increasing spell saves by %d, and granting immunity to diseases."):format(eff.power, eff.power) end, + desc = _t"Purge Blight", + long_desc = function(self, eff) return ("The target is infused with the power of nature, reducing all blight damage taken by %d%%, increasing spell saves by %d, and granting immunity to diseases."):tformat(eff.power, eff.power) end, type = "physical", subtype = { nature=true }, status = "beneficial", parameters = { power=20 }, - on_gain = function(self, err) return "#Target# rejects blight!", "+Purge" end, - on_lose = function(self, err) return "#Target# is susceptible to blight again.", "-Purge" end, + on_gain = function(self, err) return _t"#Target# rejects blight!", _t"+Purge" end, + on_lose = function(self, err) return _t"#Target# is susceptible to blight again.", _t"-Purge" end, activate = function(self, eff) eff.pid = self:addTemporaryValue("resists", {[DamageType.BLIGHT]=eff.power}) eff.spell_save = self:addTemporaryValue("combat_spellresist", eff.power) @@ -955,8 +955,8 @@ newEffect{ newEffect{ name = "SENSE", image = "talents/track.png", - desc = "Sensing", - long_desc = function(self, eff) return "Improves senses, allowing the detection of unseen things." end, + desc = _t"Sensing", + long_desc = function(self, eff) return _t"Improves senses, allowing the detection of unseen things." end, type = "physical", subtype = { sense=true }, status = "beneficial", @@ -980,9 +980,9 @@ newEffect{ newEffect{ name = "HEROISM", image = "talents/infusion__heroism.png", - desc = "Heroism", + desc = _t"Heroism", long_desc = function(self, eff) - local xs = eff.die_at > 0 and ("Keeps you from dying even if your life drops to %+d"):format(-eff.die_at) or "" + local xs = eff.die_at > 0 and ("Keeps you from dying even if your life drops to %+d"):tformat(-eff.die_at) or "" return xs end, type = "physical", @@ -997,14 +997,14 @@ newEffect{ newEffect{ name = "SUNDER_ARMOUR", image = "talents/sunder_armour.png", - desc = "Sunder Armour", - long_desc = function(self, eff) return ("The target's armour and saves are broken, reducing them by %d."):format(eff.power) end, + desc = _t"Sunder Armour", + long_desc = function(self, eff) return ("The target's armour and saves are broken, reducing them by %d."):tformat(eff.power) end, type = "physical", subtype = { sunder=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target#'s armour is damaged!", "+Sunder Armor" end, - on_lose = function(self, err) return "#Target#'s armour is more intact.", "-Sunder Armor" end, + on_gain = function(self, err) return _t"#Target#'s armour is damaged!", _t"+Sunder Armor" end, + on_lose = function(self, err) return _t"#Target#'s armour is more intact.", _t"-Sunder Armor" end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_armor", -eff.power) self:effectTemporaryValue(eff, "combat_physresist", -eff.power) @@ -1015,14 +1015,14 @@ newEffect{ newEffect{ name = "SUNDER_ARMS", image = "talents/sunder_arms.png", - desc = "Sunder Arms", - long_desc = function(self, eff) return ("The target's combat ability is reduced, reducing its attack by %d."):format(eff.power) end, + desc = _t"Sunder Arms", + long_desc = function(self, eff) return ("The target's combat ability is reduced, reducing its attack by %d."):tformat(eff.power) end, type = "physical", subtype = { sunder=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target#'s fighting ability is impaired!", "+Sunder Arms" end, - on_lose = function(self, err) return "#Target#'s ability to fight has recovered.", "-Sunder Arms" end, + on_gain = function(self, err) return _t"#Target#'s fighting ability is impaired!", _t"+Sunder Arms" end, + on_lose = function(self, err) return _t"#Target#'s ability to fight has recovered.", _t"-Sunder Arms" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("combat_atk", -eff.power) end, @@ -1033,14 +1033,14 @@ newEffect{ newEffect{ name = "PINNED", image = "effects/pinned.png", - desc = "Pinned to the ground", - long_desc = function(self, eff) return "The target is pinned to the ground, unable to move." end, + desc = _t"Pinned to the ground", + long_desc = function(self, eff) return _t"The target is pinned to the ground, unable to move." end, type = "physical", subtype = { pin=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is pinned to the ground.", "+Pinned" end, - on_lose = function(self, err) return "#Target# is no longer pinned.", "-Pinned" end, + on_gain = function(self, err) return _t"#Target# is pinned to the ground.", _t"+Pinned" end, + on_lose = function(self, err) return _t"#Target# is no longer pinned.", _t"-Pinned" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("never_move", 1) end, @@ -1051,14 +1051,14 @@ newEffect{ newEffect{ name = "BONE_GRAB", image = "talents/bone_grab.png", - desc = "Pinned to the ground", - long_desc = function(self, eff) return "The target is pinned to the ground, unable to move." end, + desc = _t"Pinned to the ground", + long_desc = function(self, eff) return _t"The target is pinned to the ground, unable to move." end, type = "physical", subtype = { pin=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is pinned to the ground.", "+Bone Grab" end, - on_lose = function(self, err) return "#Target# is no longer pinned.", "-Bone Grab" end, + on_gain = function(self, err) return _t"#Target# is pinned to the ground.", _t"+Bone Grab" end, + on_lose = function(self, err) return _t"#Target# is no longer pinned.", _t"-Bone Grab" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("never_move", 1) @@ -1080,14 +1080,14 @@ newEffect{ newEffect{ name = "MIGHTY_BLOWS", image = "effects/mighty_blows.png", - desc = "Mighty Blows", - long_desc = function(self, eff) return ("The target's combat damage is improved by %d."):format(eff.power) end, + desc = _t"Mighty Blows", + long_desc = function(self, eff) return ("The target's combat damage is improved by %d."):tformat(eff.power) end, type = "physical", subtype = { golem=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# looks menacing." end, - on_lose = function(self, err) return "#Target# looks less menacing." end, + on_gain = function(self, err) return _t"#Target# looks menacing." end, + on_lose = function(self, err) return _t"#Target# looks less menacing." end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("combat_dam", eff.power) end, @@ -1098,14 +1098,14 @@ newEffect{ newEffect{ name = "CRIPPLE", image = "talents/cripple.png", - desc = "Cripple", - long_desc = function(self, eff) return ("The target is crippled, reducing melee, spellcasting and mind speed by %d%%."):format(eff.speed*100) end, + desc = _t"Cripple", + long_desc = function(self, eff) return ("The target is crippled, reducing melee, spellcasting and mind speed by %d%%."):tformat(eff.speed*100) end, type = "physical", subtype = { wound=true, cripple=true, slow=true }, status = "detrimental", parameters = { speed=0.3 }, - on_gain = function(self, err) return "#Target# is crippled." end, - on_lose = function(self, err) return "#Target# is not crippled anymore." end, + on_gain = function(self, err) return _t"#Target# is crippled." end, + on_lose = function(self, err) return _t"#Target# is not crippled anymore." end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_physspeed", -eff.speed) self:effectTemporaryValue(eff, "combat_spellspeed", -eff.speed) @@ -1115,8 +1115,8 @@ newEffect{ newEffect{ name = "BURROW", image = "talents/burrow.png", - desc = "Burrow", - long_desc = function(self, eff) return ("The target is able to burrow into walls, and additionally has %d more APR and %d%% more physical resistance penetration."):format(eff.power, eff.power / 2) end, + desc = _t"Burrow", + long_desc = function(self, eff) return ("The target is able to burrow into walls, and additionally has %d more APR and %d%% more physical resistance penetration."):tformat(eff.power, eff.power / 2) end, type = "physical", subtype = { earth=true }, status = "beneficial", @@ -1136,14 +1136,14 @@ newEffect{ newEffect{ name = "DIM_VISION", image = "talents/sticky_smoke.png", - desc = "Reduced Vision", - long_desc = function(self, eff) return ("The target's vision range is decreased by %d."):format(eff.sight) end, + desc = _t"Reduced Vision", + long_desc = function(self, eff) return ("The target's vision range is decreased by %d."):tformat(eff.sight) end, type = "physical", subtype = { sense=true }, status = "detrimental", parameters = { sight=5 }, - on_gain = function(self, err) return "#Target# is surrounded by a thick smoke.", "+Dim Vision" end, - on_lose = function(self, err) return "The smoke around #target# dissipates.", "-Dim Vision" end, + on_gain = function(self, err) return _t"#Target# is surrounded by a thick smoke.", _t"+Dim Vision" end, + on_lose = function(self, err) return _t"The smoke around #target# dissipates.", _t"-Dim Vision" end, charges = function(self, eff) return -eff.sight end, activate = function(self, eff) if self.sight - eff.sight < 1 then eff.sight = self.sight - 1 end @@ -1159,23 +1159,23 @@ newEffect{ newEffect{ name = "RESOLVE", image = "talents/resolve.png", - desc = "Resolve", + desc = _t"Resolve", long_desc = function(self, eff) local list = table.keys(eff.types) for i = 1, #list do if DamageType.dam_def[list[i]] then list[i] = DamageType.dam_def[list[i]].name end end local type_str - if #list >= 1 then type_str = table.concatNice(list, ", ", " and ") else type_str = "" end - return ("You gain %d%% resistance against %s."):format(eff.res, type_str) + if #list >= 1 then type_str = table.concatNice(list, ", ", _t" and ") else type_str = "" end + return ("You gain %d%% resistance against %s."):tformat(eff.res, type_str) end, charges = function(self, eff) return table.count(eff.types) end, type = "physical", subtype = { antimagic=true, nature=true }, status = "beneficial", parameters = { res=10, damtype=DamageType.ARCANE, max_types = 1}, - on_gain = function(self, err) return "#Target# attunes to the damage.", "+Resolve" end, - on_lose = function(self, err) return "#Target# is no longer attuned.", "-Resolve" end, + on_gain = function(self, err) return _t"#Target# attunes to the damage.", _t"+Resolve" end, + on_lose = function(self, err) return _t"#Target# is no longer attuned.", _t"-Resolve" end, activate = function(self, eff) eff.types = {} self:effectTemporaryValue(eff, "resists", {[eff.damtype] = eff.res}) @@ -1198,15 +1198,15 @@ newEffect{ newEffect{ name = "WILD_SPEED", image = "talents/infusion__movement.png", - desc = "Wild Speed", + desc = _t"Wild Speed", long_desc = function(self, eff) return ("Moving at extreme speed (%d%% faster) and gains 100%% stun, daze and pinning immunity. Any action other than movement will cancel it.") - :format(eff.power) end, + :tformat(eff.power) end, type = "physical", subtype = { nature=true, speed=true }, status = "beneficial", parameters = {power=100, no_talents=1}, - on_gain = function(self, err) return "#Target# is moving at extreme speed!", "+Wild Speed" end, - on_lose = function(self, err) return "#Target# slows down.", "-Wild Speed" end, + on_gain = function(self, err) return _t"#Target# is moving at extreme speed!", _t"+Wild Speed" end, + on_lose = function(self, err) return _t"#Target# slows down.", _t"-Wild Speed" end, get_fractional_percent = function(self, eff) local d = game.turn - eff.start_turn return util.bound(360 - d / eff.possible_end_turns * 360, 0, 360) @@ -1238,14 +1238,14 @@ newEffect{ newEffect{ name = "HUNTER_SPEED", image = "talents/infusion__movement.png", - desc = "Hunter", - long_desc = function(self, eff) return ("Movement is %d%% faster. Any action other than movement will end this effect."):format(eff.power) end, + desc = _t"Hunter", + long_desc = function(self, eff) return ("Movement is %d%% faster. Any action other than movement will end this effect."):tformat(eff.power) end, type = "physical", subtype = { nature=true, speed=true }, status = "beneficial", parameters = {power=1000}, - on_gain = function(self, err) return ("#Target# prepares %s!"):format(not self.player and self.ai_state.tactic == "escape" and "to escape" or "for the next kill"), "+Hunter" end, - on_lose = function(self, err) return "#Target# slows down.", "-Hunter" end, + on_gain = function(self, err) return ("#Target# prepares %s!"):tformat(not self.player and self.ai_state.tactic == "escape" and _t"to escape" or _t"for the next kill"), _t"+Hunter" end, + on_lose = function(self, err) return _t"#Target# slows down.", _t"-Hunter" end, on_timeout = function(self, eff)--make sure that NPC's that catch their target (or can't get away) can fight if eff.aiid then @@ -1281,14 +1281,14 @@ newEffect{ newEffect{ name = "STEP_UP", image = "talents/step_up.png", - desc = "Step Up", - long_desc = function(self, eff) return ("Movement is %d%% faster."):format(eff.power) end, + desc = _t"Step Up", + long_desc = function(self, eff) return ("Movement is %d%% faster."):tformat(eff.power) end, type = "physical", subtype = { speed=true, tactic=true }, status = "beneficial", parameters = {power=1000}, - on_gain = function(self, err) return "#Target# prepares for the next kill!.", "+Step Up" end, - on_lose = function(self, err) return "#Target# slows down.", "-Step Up" end, + on_gain = function(self, err) return _t"#Target# prepares for the next kill!.", _t"+Step Up" end, + on_lose = function(self, err) return _t"#Target# slows down.", _t"-Step Up" end, get_fractional_percent = function(self, eff) local d = game.turn - eff.start_turn return util.bound(360 - d / eff.possible_end_turns * 360, 0, 360) @@ -1311,14 +1311,14 @@ newEffect{ newEffect{ name = "LIGHTNING_SPEED", image = "talents/lightning_speed.png", - desc = "Lightning Speed", - long_desc = function(self, eff) return ("Turn into pure lightning, moving %d%% faster. It also increases your lightning resistance by 100%% and your physical resistance by 30%%."):format(eff.power) end, + desc = _t"Lightning Speed", + long_desc = function(self, eff) return ("Turn into pure lightning, moving %d%% faster. It also increases your lightning resistance by 100%% and your physical resistance by 30%%."):tformat(eff.power) end, type = "physical", subtype = { lightning=true, speed=true }, status = "beneficial", parameters = {}, - on_gain = function(self, err) return "#Target# turns into pure lightning!.", "+Lightning Speed" end, - on_lose = function(self, err) return "#Target# is back to normal.", "-Lightning Speed" end, + on_gain = function(self, err) return _t"#Target# turns into pure lightning!.", _t"+Lightning Speed" end, + on_lose = function(self, err) return _t"#Target# is back to normal.", _t"-Lightning Speed" end, get_fractional_percent = function(self, eff) local d = game.turn - eff.start_turn return util.bound(360 - d / eff.possible_end_turns * 360, 0, 360) @@ -1351,14 +1351,14 @@ newEffect{ newEffect{ name = "DRAGONS_FIRE", image = "talents/fire_breath.png", - desc = "Dragon's Fire", - long_desc = function(self, eff) return ("Dragon blood runs through your veins. You can breathe fire (or have it improved if you already could)."):format() end, + desc = _t"Dragon's Fire", + long_desc = function(self, eff) return ("Dragon blood runs through your veins. You can breathe fire (or have it improved if you already could)."):tformat() end, type = "physical", subtype = { fire=true }, status = "beneficial", parameters = {power=1}, - on_gain = function(self, err) return "#Target#'s throat seems to be burning.", "+Dragon's fire" end, - on_lose = function(self, err) return "#Target#'s throat seems to cool down.", "-Dragon's fire" end, + on_gain = function(self, err) return _t"#Target#'s throat seems to be burning.", _t"+Dragon's fire" end, + on_lose = function(self, err) return _t"#Target#'s throat seems to cool down.", _t"-Dragon's fire" end, activate = function(self, eff) local t_id = self.T_FIRE_BREATH if not self.talents[t_id] then @@ -1391,8 +1391,8 @@ newEffect{ newEffect{ name = "GREATER_WEAPON_FOCUS", image = "talents/greater_weapon_focus.png", - desc = "Greater Weapon Focus", - long_desc = function(self, eff) return ("Each melee blow landed has a %d%% chance to trigger an additional melee blow (up to once per turn for each weapon)."):format(eff.chance) end, + desc = _t"Greater Weapon Focus", + long_desc = function(self, eff) return ("Each melee blow landed has a %d%% chance to trigger an additional melee blow (up to once per turn for each weapon)."):tformat(eff.chance) end, type = "physical", subtype = { tactic=true }, status = "beneficial", @@ -1423,14 +1423,14 @@ newEffect{ -- Grappling stuff newEffect{ name = "GRAPPLING", image = "talents/clinch.png", - desc = "Grappling", - long_desc = function(self, eff) return ("Engaged in a grapple draining %d stamina per turn and redirecting %d%% of damage taken to %s. Any movement will break the effect as will some unarmed talents."):format(eff.drain, eff.sharePct*100, eff.trgt.name or "unknown") end, + desc = _t"Grappling", + long_desc = function(self, eff) return ("Engaged in a grapple draining %d stamina per turn and redirecting %d%% of damage taken to %s. Any movement will break the effect as will some unarmed talents."):tformat(eff.drain, eff.sharePct*100, eff.trgt.name or "unknown") end, type = "physical", subtype = { grapple=true, }, status = "beneficial", parameters = {trgt, sharePct = 0.1, drain = 0}, - on_gain = function(self, err) return "#Target# is engaged in a grapple!", "+Grappling" end, - on_lose = function(self, err) return "#Target# has released the hold.", "-Grappling" end, + on_gain = function(self, err) return _t"#Target# is engaged in a grapple!", _t"+Grappling" end, + on_lose = function(self, err) return _t"#Target# has released the hold.", _t"-Grappling" end, on_timeout = function(self, eff) local p = eff.trgt:hasEffect(eff.trgt.EFF_GRAPPLED) if not p or p.src ~= self or core.fov.distance(self.x, self.y, eff.trgt.x, eff.trgt.y) > 1 or eff.trgt.dead or not game.level:hasEntity(eff.trgt) then @@ -1460,15 +1460,15 @@ newEffect{ newEffect{ name = "GRAPPLED", image = "talents/grab.png", - desc = "Grappled", - long_desc = function(self, eff) return ("The target is grappled, unable to move, and limited in its offensive capabilities.\n#RED#%sPinned\n%s\n%s\n%s#LAST#"):format(eff.silence > 0 and "Silenced\n" or "", "Physical power reduced by " .. math.ceil(eff.reduce), "Slowed by " .. math.floor(eff.slow * 100).."%", "Damage per turn " .. math.ceil(eff.power) ) end, + desc = _t"Grappled", + long_desc = function(self, eff) return ("The target is grappled, unable to move, and limited in its offensive capabilities.\n#RED#%sPinned\n%s\n%s\n%s#LAST#"):tformat(eff.silence > 0 and _t"Silenced\n" or "", ("Physical power reduced by %d"):tformat(math.ceil(eff.reduce)), ("Slowed by %d%%"):tformat(math.floor(eff.slow * 100)), ("Damage per turn %d"):tformat(math.ceil(eff.power))) end, type = "physical", subtype = { grapple=true, pin=true }, status = "detrimental", parameters = {silence = 0, slow = 0, reduce = 1, power = 1}, remove_on_clone = true, - on_gain = function(self, err) return "#Target# is grappled!", "+Grappled" end, - on_lose = function(self, err) return "#Target# is free from the grapple.", "-Grappled" end, + on_gain = function(self, err) return _t"#Target# is grappled!", _t"+Grappled" end, + on_lose = function(self, err) return _t"#Target# is free from the grapple.", _t"-Grappled" end, activate = function(self, eff) if self:attr("never_move") then self:effectTemporaryValue(eff, "never_move_before_grapple", 1) end -- Flag for Hurricane Throw self:effectTemporaryValue(eff, "never_move", 1) @@ -1497,14 +1497,14 @@ newEffect{ newEffect{ name = "CRUSHING_HOLD", image = "talents/crushing_hold.png", - desc = "Crushing Hold", - long_desc = function(self, eff) return ("The target is being crushed and suffers %d damage each turn"):format(eff.power) end, + desc = _t"Crushing Hold", + long_desc = function(self, eff) return ("The target is being crushed and suffers %d damage each turn"):tformat(eff.power) end, type = "physical", subtype = { grapple=true, pin=true }, status = "detrimental", parameters = { power=1 }, - on_gain = function(self, err) return "#Target# is being crushed.", "+Crushing Hold" end, - on_lose = function(self, err) return "#Target# has escaped the crushing hold.", "-Crushing Hold" end, + on_gain = function(self, err) return _t"#Target# is being crushed.", _t"+Crushing Hold" end, + on_lose = function(self, err) return _t"#Target# has escaped the crushing hold.", _t"-Crushing Hold" end, on_timeout = function(self, eff) if core.fov.distance(self.x, self.y, eff.src.x, eff.src.y) > 1 or eff.src.dead or not game.level:hasEntity(eff.src) then self:removeEffect(self.EFF_CRUSHING_HOLD) @@ -1522,14 +1522,14 @@ newEffect{ newEffect{ name = "STRANGLE_HOLD", image = "talents/clinch.png", - desc = "Strangle Hold", - long_desc = function(self, eff) return ("The target is being strangled and may not cast spells and suffers %d damage each turn."):format(eff.power) end, + desc = _t"Strangle Hold", + long_desc = function(self, eff) return ("The target is being strangled and may not cast spells and suffers %d damage each turn."):tformat(eff.power) end, type = "physical", subtype = { grapple=true, pin=true, silence=true }, status = "detrimental", parameters = { power=1 }, - on_gain = function(self, err) return "#Target# is being strangled.", "+Strangle Hold" end, - on_lose = function(self, err) return "#Target# has escaped the strangle hold.", "-Strangle Hold" end, + on_gain = function(self, err) return _t"#Target# is being strangled.", _t"+Strangle Hold" end, + on_lose = function(self, err) return _t"#Target# has escaped the strangle hold.", _t"-Strangle Hold" end, on_timeout = function(self, eff) if core.fov.distance(self.x, self.y, eff.src.x, eff.src.y) > 1 or eff.src.dead or not game.level:hasEntity(eff.src) then self:removeEffect(self.EFF_STRANGLE_HOLD) @@ -1550,14 +1550,14 @@ newEffect{ newEffect{ name = "MAIMED", image = "talents/maim.png", - desc = "Maimed", - long_desc = function(self, eff) return ("The target is maimed, reducing damage by %d and global speed by 30%%."):format(eff.power) end, + desc = _t"Maimed", + long_desc = function(self, eff) return ("The target is maimed, reducing damage by %d and global speed by 30%%."):tformat(eff.power) end, type = "physical", subtype = { wound=true, slow=true }, status = "detrimental", parameters = { atk=10, dam=10 }, - on_gain = function(self, err) return "#Target# is maimed.", "+Maimed" end, - on_lose = function(self, err) return "#Target# has recovered from the maiming.", "-Maimed" end, + on_gain = function(self, err) return _t"#Target# is maimed.", _t"+Maimed" end, + on_lose = function(self, err) return _t"#Target# has recovered from the maiming.", _t"-Maimed" end, activate = function(self, eff) eff.damid = self:addTemporaryValue("combat_dam", -eff.dam) eff.tmpid = self:addTemporaryValue("global_speed_add", -0.3) @@ -1570,14 +1570,14 @@ newEffect{ newEffect{ name = "EXPOSE_WEAKNESS", image = "talents/expose_weakness.png", - desc = "Expose Weakness", - long_desc = function(self, eff) return ("The target is focused on penetrating defenses, increasing armor penetration by %d, accuracy by %d, and all damage penetration by %d%%."):format(eff.apr, eff.accuracy, eff.penetration) end, + desc = _t"Expose Weakness", + long_desc = function(self, eff) return ("The target is focused on penetrating defenses, increasing armor penetration by %d, accuracy by %d, and all damage penetration by %d%%."):tformat(eff.apr, eff.accuracy, eff.penetration) end, type = "physical", subtype = { }, status = "beneficial", parameters = { accuracy=0, apr=0, penetration=0 }, - on_gain = function(self, err) return "#Target# is focusing on penetrating defenses.", "+Expose Weakness" end, - on_lose = function(self, err) return "#Target# is no longer focused on penetrating defenses.", "-Expose Weakness" end, + on_gain = function(self, err) return _t"#Target# is focusing on penetrating defenses.", _t"+Expose Weakness" end, + on_lose = function(self, err) return _t"#Target# is no longer focused on penetrating defenses.", _t"-Expose Weakness" end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_apr", eff.apr) self:effectTemporaryValue(eff, "combat_atk", eff.accuracy) @@ -1589,9 +1589,9 @@ newEffect{ newEffect{ name = "COMBO", image = "talents/combo_string.png", - desc = "Combo", - display_desc = function(self, eff) return eff.cur_power.." Combo" end, - long_desc = function(self, eff) return ("The target is in the middle of a combo chain and has earned %d combo points."):format(eff.cur_power) end, + desc = _t"Combo", + display_desc = function(self, eff) return ("%d Combo"):tformat(eff.cur_power) end, + long_desc = function(self, eff) return ("The target is in the middle of a combo chain and has earned %d combo points."):tformat(eff.cur_power) end, type = "physical", subtype = { tactic=true }, status = "beneficial", @@ -1616,14 +1616,14 @@ newEffect{ newEffect{ name = "DEFENSIVE_MANEUVER", image = "talents/set_up.png", - desc = "Defensive Maneuver", - long_desc = function(self, eff) return ("The target's defense is increased by %d."):format(eff.power) end, + desc = _t"Defensive Maneuver", + long_desc = function(self, eff) return ("The target's defense is increased by %d."):tformat(eff.power) end, type = "physical", subtype = { evade=true }, status = "beneficial", parameters = {power = 1}, - on_gain = function(self, err) return "#Target# is moving defensively!", "+Defensive Maneuver" end, - on_lose = function(self, err) return "#Target# isn't moving as defensively anymore.", "-Defensive Maneuver" end, + on_gain = function(self, err) return _t"#Target# is moving defensively!", _t"+Defensive Maneuver" end, + on_lose = function(self, err) return _t"#Target# isn't moving as defensively anymore.", _t"-Defensive Maneuver" end, activate = function(self, eff) eff.defense = self:addTemporaryValue("combat_def", eff.power) end, @@ -1634,14 +1634,14 @@ newEffect{ newEffect{ name = "SET_UP", image = "talents/set_up.png", - desc = "Set Up", - long_desc = function(self, eff) return ("The target is off balance and is %d%% more likely to be crit by the target that set it up. In addition all its saves are reduced by %d."):format(eff.power, eff.power) end, + desc = _t"Set Up", + long_desc = function(self, eff) return ("The target is off balance and is %d%% more likely to be crit by the target that set it up. In addition all its saves are reduced by %d."):tformat(eff.power, eff.power) end, type = "physical", subtype = { tactic=true }, status = "detrimental", parameters = {power = 1}, - on_gain = function(self, err) return "#Target# has been set up!", "+Set Up" end, - on_lose = function(self, err) return "#Target# has survived the set up.", "-Set Up" end, + on_gain = function(self, err) return _t"#Target# has been set up!", _t"+Set Up" end, + on_lose = function(self, err) return _t"#Target# has survived the set up.", _t"-Set Up" end, activate = function(self, eff) eff.mental = self:addTemporaryValue("combat_mentalresist", -eff.power) eff.spell = self:addTemporaryValue("combat_spellresist", -eff.power) @@ -1657,14 +1657,14 @@ newEffect{ newEffect{ name = "Recovery", - desc = "Recovery", - long_desc = function(self, eff) return ("The target has %d increased life regeneration."):format(eff.regen) end, + desc = _t"Recovery", + long_desc = function(self, eff) return ("The target has %d increased life regeneration."):tformat(eff.regen) end, type = "physical", subtype = { heal=true, regeneration=true }, status = "beneficial", parameters = { regen=10 }, - on_gain = function(self, err) return "#Target# is recovering from the damage!", "+Recovery" end, - on_lose = function(self, err) return "#Target# has finished recovering.", "-Recovery" end, + on_gain = function(self, err) return _t"#Target# is recovering from the damage!", _t"+Recovery" end, + on_lose = function(self, err) return _t"#Target# has finished recovering.", _t"-Recovery" end, activate = function(self, eff) eff.regenid = self:addTemporaryValue("life_regen", eff.regen) if core.shader.active(4) then @@ -1681,14 +1681,14 @@ newEffect{ newEffect{ name = "REFLEXIVE_DODGING", image = "talents/heightened_reflexes.png", - desc = "Reflexive Dodging", - long_desc = function(self, eff) return ("Increases global action speed by %d%%."):format(eff.power * 100) end, + desc = _t"Reflexive Dodging", + long_desc = function(self, eff) return ("Increases global action speed by %d%%."):tformat(eff.power * 100) end, type = "physical", subtype = { evade=true, speed=true }, status = "beneficial", parameters = { power=0.1 }, - on_gain = function(self, err) return "#Target# speeds up.", "+Reflexive Dodging" end, - on_lose = function(self, err) return "#Target# slows down.", "-Reflexive Dodging" end, + on_gain = function(self, err) return _t"#Target# speeds up.", _t"+Reflexive Dodging" end, + on_lose = function(self, err) return _t"#Target# slows down.", _t"-Reflexive Dodging" end, lists = 'break_with_step_up', activate = function(self, eff) eff.tmpid = self:addTemporaryValue("global_speed_add", eff.power) @@ -1700,8 +1700,8 @@ newEffect{ newEffect{ name = "WEAKENED_DEFENSES", image = "talents/exploit_weakness.png", - desc = "Weakened Defenses", - long_desc = function(self, eff) return ("The target's physical resistance has been reduced by %d%%."):format(eff.cur_inc) end, + desc = _t"Weakened Defenses", + long_desc = function(self, eff) return ("The target's physical resistance has been reduced by %d%%."):tformat(eff.cur_inc) end, type = "physical", subtype = { sunder=true }, status = "detrimental", @@ -1728,8 +1728,8 @@ newEffect{ newEffect{ name = "WATERS_OF_LIFE", image = "talents/waters_of_life.png", - desc = "Waters of Life", - long_desc = function(self, eff) return ("The target purifies all diseases and poisons, turning them into healing effects.") end, + desc = _t"Waters of Life", + long_desc = function(self, eff) return (_t"The target purifies all diseases and poisons, turning them into healing effects.") end, type = "physical", subtype = { nature=true, heal=true }, status = "beneficial", @@ -1746,13 +1746,13 @@ newEffect{ newEffect{ name = "ELEMENTAL_HARMONY", image = "effects/elemental_harmony.png", - desc = "Elemental Harmony", + desc = _t"Elemental Harmony", long_desc = function(self, eff) - if eff.type == DamageType.FIRE then return ("Increases global speed by %d%%."):format(100 * self:callTalent(self.T_ELEMENTAL_HARMONY, "fireSpeed")) - elseif eff.type == DamageType.COLD then return ("Increases armour by %d."):format(self:callTalent(self.T_ELEMENTAL_HARMONY, "coldArmor")) - elseif eff.type == DamageType.LIGHTNING then return ("Increases all stats by %d."):format(self:callTalent(self.T_ELEMENTAL_HARMONY, "lightningStats")) - elseif eff.type == DamageType.ACID then return ("Increases life regen by %0.2f."):format(self:callTalent(self.T_ELEMENTAL_HARMONY, "acidRegen")) - elseif eff.type == DamageType.NATURE then return ("Increases all resists by %d%%."):format(self:callTalent(self.T_ELEMENTAL_HARMONY, "natureRes")) + if eff.type == DamageType.FIRE then return ("Increases global speed by %d%%."):tformat(100 * self:callTalent(self.T_ELEMENTAL_HARMONY, "fireSpeed")) + elseif eff.type == DamageType.COLD then return ("Increases armour by %d."):tformat(self:callTalent(self.T_ELEMENTAL_HARMONY, "coldArmor")) + elseif eff.type == DamageType.LIGHTNING then return ("Increases all stats by %d."):tformat(self:callTalent(self.T_ELEMENTAL_HARMONY, "lightningStats")) + elseif eff.type == DamageType.ACID then return ("Increases life regen by %0.2f."):tformat(self:callTalent(self.T_ELEMENTAL_HARMONY, "acidRegen")) + elseif eff.type == DamageType.NATURE then return ("Increases all resists by %d%%."):tformat(self:callTalent(self.T_ELEMENTAL_HARMONY, "natureRes")) end end, type = "physical", @@ -1799,9 +1799,9 @@ newEffect{ newEffect{ name = "HEALING_NEXUS", image = "talents/healing_nexus.png", - desc = "Healing Nexus Redirection", + desc = _t"Healing Nexus Redirection", long_desc = function(self, eff) - return ("All direct healing done to the target fails, and is instead redirected to %s at %d%% effectiveness."):format(eff.src.name, eff.pct * 100, eff.src.name) + return ("All direct healing done to the target fails, and is instead redirected to %s at %d%% effectiveness."):tformat(eff.src:getName(), eff.pct * 100, eff.src:getName()) end, type = "physical", subtype = { nature=true, heal=true }, @@ -1829,9 +1829,9 @@ newEffect{ newEffect{ name = "HEALING_NEXUS_BUFF", image = "talents/healing_nexus.png", - desc = "Healing Nexus", + desc = _t"Healing Nexus", long_desc = function(self, eff) - return ("All direct healing done to the target is increased by %d%% and each heal restores %0.1f equilibrium."):format(eff.pct * 100, eff.eq) + return ("All direct healing done to the target is increased by %d%% and each heal restores %0.1f equilibrium."):tformat(eff.pct * 100, eff.eq) end, type = "physical", subtype = { nature=true, heal=true }, @@ -1852,14 +1852,14 @@ newEffect{ newEffect{ name = "PSIONIC_BIND", image = "effects/psionic_bind.png", - desc = "Immobilized", - long_desc = function(self, eff) return "Immobilized by telekinetic forces." end, + desc = _t"Immobilized", + long_desc = function(self, eff) return _t"Immobilized by telekinetic forces." end, type = "physical", subtype = { telekinesis=true, pin=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#F53CBE##Target# is bound by telekinetic forces!", "+Paralyzed" end, - on_lose = function(self, err) return "#Target# shakes free of the telekinetic binding", "-Paralyzed" end, + on_gain = function(self, err) return _t"#F53CBE##Target# is bound by telekinetic forces!", _t"+Paralyzed" end, + on_lose = function(self, err) return _t"#Target# shakes free of the telekinetic binding", _t"-Paralyzed" end, activate = function(self, eff) --eff.particle = self:addParticles(Particles.new("gloom_stunned", 1)) eff.tmpid = self:addTemporaryValue("never_move", 1) @@ -1872,14 +1872,14 @@ newEffect{ newEffect{ name = "IMPLODING", image = "talents/implode.png", - desc = "Imploding (slow)", - long_desc = function(self, eff) return ("Slowed by 50%% and taking %d crushing damage per turn."):format( eff.power) end, + desc = _t"Imploding (slow)", + long_desc = function(self, eff) return ("Slowed by 50%% and taking %d crushing damage per turn."):tformat( eff.power) end, type = "physical", subtype = { telekinesis=true, slow=true }, status = "detrimental", parameters = {}, - on_gain = function(self, err) return "#Target# is being crushed.", "+Imploding" end, - on_lose = function(self, err) return "#Target# shakes off the crushing forces.", "-Imploding" end, + on_gain = function(self, err) return _t"#Target# is being crushed.", _t"+Imploding" end, + on_lose = function(self, err) return _t"#Target# shakes off the crushing forces.", _t"-Imploding" end, activate = function(self, eff) if core.shader.allow("distort") then eff.particle = self:addParticles(Particles.new("gravity_well2", 1, {radius=1})) end eff.tmpid = self:addTemporaryValue("global_speed_add", -0.5) @@ -1895,14 +1895,14 @@ newEffect{ newEffect{ name = "FREE_ACTION", image = "effects/free_action.png", - desc = "Free Action", - long_desc = function(self, eff) return ("The target gains %d%% stun, daze and pinning immunity."):format(eff.power * 100) end, + desc = _t"Free Action", + long_desc = function(self, eff) return ("The target gains %d%% stun, daze and pinning immunity."):tformat(eff.power * 100) end, type = "physical", subtype = { nature=true }, status = "beneficial", parameters = { power=1 }, - on_gain = function(self, err) return "#Target# is moving freely.", "+Free Action" end, - on_lose = function(self, err) return "#Target# is moving less freely.", "-Free Action" end, + on_gain = function(self, err) return _t"#Target# is moving freely.", _t"+Free Action" end, + on_lose = function(self, err) return _t"#Target# is moving less freely.", _t"-Free Action" end, activate = function(self, eff) eff.stun = self:addTemporaryValue("stun_immune", eff.power) eff.daze = self:addTemporaryValue("daze_immune", eff.power) @@ -1917,14 +1917,14 @@ newEffect{ newEffect{ name = "ADRENALINE_SURGE", image = "talents/adrenaline_surge.png", - desc = "Adrenaline Surge", - long_desc = function(self, eff) return ("The target's combat damage is improved by %d and it an continue to fight past the point of exhaustion, supplementing life for stamina."):format(eff.power) end, + desc = _t"Adrenaline Surge", + long_desc = function(self, eff) return ("The target's combat damage is improved by %d and it an continue to fight past the point of exhaustion, supplementing life for stamina."):tformat(eff.power) end, type = "physical", subtype = { frenzy=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# feels a surge of adrenaline." end, - on_lose = function(self, err) return "#Target#'s adrenaline surge has come to an end." end, + on_gain = function(self, err) return _t"#Target# feels a surge of adrenaline." end, + on_lose = function(self, err) return _t"#Target#'s adrenaline surge has come to an end." end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("combat_dam", eff.power) end, @@ -1935,8 +1935,8 @@ newEffect{ newEffect{ name = "BLINDSIDE_BONUS", image = "talents/blindside.png", - desc = "Blindside Bonus", - long_desc = function(self, eff) return ("The target has appeared out of nowhere! It's defense is boosted by %d."):format(eff.defenseChange) end, + desc = _t"Blindside Bonus", + long_desc = function(self, eff) return ("The target has appeared out of nowhere! It's defense is boosted by %d."):tformat(eff.defenseChange) end, type = "physical", subtype = { evade=true }, status = "beneficial", @@ -1951,14 +1951,14 @@ newEffect{ newEffect{ name = "OFFBALANCE", - desc = "Off-balance", - long_desc = function(self, eff) return ("Badly off balance. Global damage is reduced by 15%.") end, + desc = _t"Off-balance", + long_desc = function(self, eff) return (_t"Badly off balance. Global damage is reduced by 15%.") end, type = "physical", subtype = { ["cross tier"]=true }, status = "detrimental", parameters = {power = 1}, - on_gain = function(self, err) return nil, "+Off-balance" end, - on_lose = function(self, err) return nil, "-Off-balance" end, + on_gain = function(self, err) return nil, _t"+Off-balance" end, + on_lose = function(self, err) return nil, _t"-Off-balance" end, activate = function(self, eff) eff.speedid = self:addTemporaryValue("numbed", 15) end, @@ -1969,14 +1969,14 @@ newEffect{ newEffect{ name = "OFFGUARD", - desc = "Off-guard", image = "talents/precise_strikes.png", - long_desc = function(self, eff) return ("Badly off guard. Attackers gain a 10% bonus to physical critical strike chance and physical critcal strike power.") end, + desc = _t"Off-guard", image = "talents/precise_strikes.png", + long_desc = function(self, eff) return (_t"Badly off guard. Attackers gain a 10% bonus to physical critical strike chance and physical critcal strike power.") end, type = "physical", subtype = { ["cross tier"]=true }, status = "detrimental", parameters = {power = 1}, - on_gain = function(self, err) return nil, "+Off-guard" end, - on_lose = function(self, err) return nil, "-Off-guard" end, + on_gain = function(self, err) return nil, _t"+Off-guard" end, + on_lose = function(self, err) return nil, _t"-Off-guard" end, activate = function(self, eff) eff.crit_vuln = self:addTemporaryValue("combat_crit_vulnerable", 10) -- increases chance to be crit end, @@ -1987,14 +1987,14 @@ newEffect{ newEffect{ name = "SLOW_MOVE", - desc = "Slow movement", image = "talents/slow.png", - long_desc = function(self, eff) return ("Movement speed is reduced by %d%%."):format(eff.power*100) end, + desc = _t"Slow movement", image = "talents/slow.png", + long_desc = function(self, eff) return ("Movement speed is reduced by %d%%."):tformat(eff.power*100) end, type = "physical", subtype = { nature=true }, status = "detrimental", parameters = {power = 1}, - on_gain = function(self, err) return nil, "+Slow movement" end, - on_lose = function(self, err) return nil, "-Slow movement" end, + on_gain = function(self, err) return nil, _t"+Slow movement" end, + on_lose = function(self, err) return nil, _t"-Slow movement" end, activate = function(self, eff) eff.speedid = self:addTemporaryValue("movement_speed", -eff.power) end, @@ -2005,15 +2005,15 @@ newEffect{ newEffect{ name = "WEAKENED", - desc = "Weakened", image = "talents/ruined_earth.png", - long_desc = function(self, eff) return ("The target has been weakened, reducing all damage inflicted by %d%%."):format(eff.power) end, + desc = _t"Weakened", image = "talents/ruined_earth.png", + long_desc = function(self, eff) return ("The target has been weakened, reducing all damage inflicted by %d%%."):tformat(eff.power) end, charges = function(self, eff) return (math.floor(eff.power)).."%" end, type = "physical", subtype = { curse=true }, status = "detrimental", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# has been weakened." end, - on_lose = function(self, err) return "#Target#'s is no longer weakened." end, + on_gain = function(self, err) return _t"#Target# has been weakened." end, + on_lose = function(self, err) return _t"#Target#'s is no longer weakened." end, activate = function(self, eff) eff.incDamageId = self:addTemporaryValue("inc_damage", {all=-eff.power}) end, @@ -2024,14 +2024,14 @@ newEffect{ newEffect{ name = "LOWER_FIRE_RESIST", - desc = "Lowered fire resistance", - long_desc = function(self, eff) return ("The target fire resistance is reduced by %d%%."):format(eff.power) end, + desc = _t"Lowered fire resistance", + long_desc = function(self, eff) return ("The target fire resistance is reduced by %d%%."):tformat(eff.power) end, type = "physical", subtype = { nature=true }, status = "detrimental", parameters = { power=20 }, - on_gain = function(self, err) return "#Target# becomes more vulnerable to fire.", "+Low. fire resist" end, - on_lose = function(self, err) return "#Target# is less vulnerable to fire.", "-Low. fire resist" end, + on_gain = function(self, err) return _t"#Target# becomes more vulnerable to fire.", _t"+Low. fire resist" end, + on_lose = function(self, err) return _t"#Target# is less vulnerable to fire.", _t"-Low. fire resist" end, activate = function(self, eff) eff.pid = self:addTemporaryValue("resists", {[DamageType.FIRE]=-eff.power}) end, @@ -2041,14 +2041,14 @@ newEffect{ } newEffect{ name = "LOWER_COLD_RESIST", - desc = "Lowered cold resistance", - long_desc = function(self, eff) return ("The target cold resistance is reduced by %d%%."):format(eff.power) end, + desc = _t"Lowered cold resistance", + long_desc = function(self, eff) return ("The target cold resistance is reduced by %d%%."):tformat(eff.power) end, type = "physical", subtype = { nature=true }, status = "detrimental", parameters = { power=20 }, - on_gain = function(self, err) return "#Target# becomes more vulnerable to cold.", "+Low. cold resist" end, - on_lose = function(self, err) return "#Target# is less vulnerable to cold.", "-Low. cold resist" end, + on_gain = function(self, err) return _t"#Target# becomes more vulnerable to cold.", _t"+Low. cold resist" end, + on_lose = function(self, err) return _t"#Target# is less vulnerable to cold.", _t"-Low. cold resist" end, activate = function(self, eff) eff.pid = self:addTemporaryValue("resists", {[DamageType.COLD]=-eff.power}) end, @@ -2058,14 +2058,14 @@ newEffect{ } newEffect{ name = "LOWER_NATURE_RESIST", - desc = "Lowered nature resistance", - long_desc = function(self, eff) return ("The target nature resistance is reduced by %d%%."):format(eff.power) end, + desc = _t"Lowered nature resistance", + long_desc = function(self, eff) return ("The target nature resistance is reduced by %d%%."):tformat(eff.power) end, type = "physical", subtype = { nature=true }, status = "detrimental", parameters = { power=20 }, - on_gain = function(self, err) return "#Target# becomes more vulnerable to nature.", "+Low. nature resist" end, - on_lose = function(self, err) return "#Target# is less vulnerable to nature.", "-Low. nature resist" end, + on_gain = function(self, err) return _t"#Target# becomes more vulnerable to nature.", _t"+Low. nature resist" end, + on_lose = function(self, err) return _t"#Target# is less vulnerable to nature.", _t"-Low. nature resist" end, activate = function(self, eff) eff.pid = self:addTemporaryValue("resists", {[DamageType.NATURE]=-eff.power}) end, @@ -2075,14 +2075,14 @@ newEffect{ } newEffect{ name = "LOWER_PHYSICAL_RESIST", - desc = "Lowered physical resistance", - long_desc = function(self, eff) return ("The target physical resistance is reduced by %d%%."):format(eff.power) end, + desc = _t"Lowered physical resistance", + long_desc = function(self, eff) return ("The target physical resistance is reduced by %d%%."):tformat(eff.power) end, type = "physical", subtype = { nature=true }, status = "detrimental", parameters = { power=20 }, - on_gain = function(self, err) return "#Target# becomes more vulnerable to physical.", "+Low. physical resist" end, - on_lose = function(self, err) return "#Target# is less vulnerable to physical.", "-Low. physical resist" end, + on_gain = function(self, err) return _t"#Target# becomes more vulnerable to physical.", _t"+Low. physical resist" end, + on_lose = function(self, err) return _t"#Target# is less vulnerable to physical.", _t"-Low. physical resist" end, activate = function(self, eff) eff.pid = self:addTemporaryValue("resists", {[DamageType.PHYSICAL]=-eff.power}) end, @@ -2093,14 +2093,14 @@ newEffect{ newEffect{ name = "CURSED_WOUND", image = "talents/slash.png", - desc = "Cursed Wound", - long_desc = function(self, eff) return ("The target's has a cursed wound, reducing healing by %d%%."):format(-eff.healFactorChange * 100) end, + desc = _t"Cursed Wound", + long_desc = function(self, eff) return ("The target's has a cursed wound, reducing healing by %d%%."):tformat(-eff.healFactorChange * 100) end, type = "physical", subtype = { wound=true }, no_ct_effect = true, status = "detrimental", parameters = { healFactorChange=-0.1 }, - on_gain = function(self, err) return "#Target# has a cursed wound!", "+Cursed Wound" end, - on_lose = function(self, err) return "#Target# no longer has a cursed wound.", "-Cursed Wound" end, + on_gain = function(self, err) return _t"#Target# has a cursed wound!", _t"+Cursed Wound" end, + on_lose = function(self, err) return _t"#Target# no longer has a cursed wound.", _t"-Cursed Wound" end, activate = function(self, eff) eff.healFactorId = self:addTemporaryValue("healing_factor", eff.healFactorChange) end, @@ -2114,7 +2114,7 @@ newEffect{ self:removeTemporaryValue("healing_factor", old_eff.healFactorId) old_eff.healFactorId = self:addTemporaryValue("healing_factor", old_eff.healFactorChange) - game.logSeen(self, "%s has re-opened a cursed wound!", self.name:capitalize()) + game.logSeen(self, "%s has re-opened a cursed wound!", self:getName():capitalize()) return old_eff end, @@ -2122,14 +2122,14 @@ newEffect{ newEffect{ name = "LUMINESCENCE", - desc = "Luminescence ", image = "talents/infusion__sun.png", - long_desc = function(self, eff) return ("The target has been revealed, reducing its stealth power by %d."):format(eff.power) end, + desc = _t"Luminescence ", image = "talents/infusion__sun.png", + long_desc = function(self, eff) return ("The target has been revealed, reducing its stealth power by %d."):tformat(eff.power) end, type = "physical", subtype = { nature=true, light=true }, status = "detrimental", parameters = { power=20 }, - on_gain = function(self, err) return "#Target# has been illuminated.", "+Luminescence" end, - on_lose = function(self, err) return "#Target# is no longer illuminated.", "-Luminescence" end, + on_gain = function(self, err) return _t"#Target# has been illuminated.", _t"+Luminescence" end, + on_lose = function(self, err) return _t"#Target# is no longer illuminated.", _t"-Luminescence" end, activate = function(self, eff) eff.stealthid = self:addTemporaryValue("inc_stealth", -eff.power) end, @@ -2140,15 +2140,15 @@ newEffect{ newEffect{ name = "SPELL_DISRUPTION", image = "talents/mana_clash.png", - desc = "Spell Disruption", - long_desc = function(self, eff) return ("The target has a %d%% chance to fail any spell it casts and a chance each turn to lose spell sustains."):format(eff.cur_power) end, + desc = _t"Spell Disruption", + long_desc = function(self, eff) return ("The target has a %d%% chance to fail any spell it casts and a chance each turn to lose spell sustains."):tformat(eff.cur_power) end, charges = function(self, eff) return eff.cur_power end, type = "physical", subtype = { antimagic=true, nature=true }, status = "detrimental", parameters = { power=10, max=50 }, - on_gain = function(self, err) return "#Target#'s magic has been disrupted." end, - on_lose = function(self, err) return "#Target#'s is no longer disrupted." end, + on_gain = function(self, err) return _t"#Target#'s magic has been disrupted." end, + on_lose = function(self, err) return _t"#Target#'s is no longer disrupted." end, on_merge = function(self, old_eff, new_eff) self:removeTemporaryValue("spell_failure", old_eff.tmpid) old_eff.cur_power = math.min(old_eff.cur_power + new_eff.power, new_eff.max) @@ -2168,14 +2168,14 @@ newEffect{ newEffect{ name = "RESONANCE", image = "talents/alchemist_protection.png", - desc = "Resonance", - long_desc = function(self, eff) return ("+%d%% %s damage."):format(eff.dam, DamageType:get(eff.damtype).name) end, + desc = _t"Resonance", + long_desc = function(self, eff) return ("+%d%% %s damage."):tformat(eff.dam, DamageType:get(eff.damtype).name) end, type = "physical", subtype = { nature=true }, status = "beneficial", parameters = { dam=10, damtype=DamageType.ARCANE }, - on_gain = function(self, err) return "#Target# resonates with the damage.", "+Resonance" end, - on_lose = function(self, err) return "#Target# is no longer resonating.", "-Resonance" end, + on_gain = function(self, err) return _t"#Target# resonates with the damage.", _t"+Resonance" end, + on_lose = function(self, err) return _t"#Target# is no longer resonating.", _t"-Resonance" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("inc_damage", {[eff.damtype]=eff.dam}) end, @@ -2186,8 +2186,8 @@ newEffect{ newEffect{ name = "THORN_GRAB", image = "talents/thorn_grab.png", - desc = "Thorn Grab", - long_desc = function(self, eff) return ("The target is encased in thorny vines, dealing %d nature damage each turn and reducing its speed by %d%%."):format(eff.dam, eff.speed*100) end, + desc = _t"Thorn Grab", + long_desc = function(self, eff) return ("The target is encased in thorny vines, dealing %d nature damage each turn and reducing its speed by %d%%."):tformat(eff.dam, eff.speed*100) end, type = "physical", subtype = { nature=true }, status = "detrimental", @@ -2205,14 +2205,14 @@ newEffect{ newEffect{ name = "LEAVES_COVER", image = "talents/leaves_tide.png", - desc = "Leaves Cover", - long_desc = function(self, eff) return ("%d%% chance to fully absorb any damaging actions."):format(eff.power) end, + desc = _t"Leaves Cover", + long_desc = function(self, eff) return ("%d%% chance to fully absorb any damaging actions."):tformat(eff.power) end, type = "physical", subtype = { nature=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# is protected by a layer of thick leaves.", "+Leaves Cover" end, - on_lose = function(self, err) return "#Target# cover of leaves falls apart.", "-Leaves Cover" end, + on_gain = function(self, err) return _t"#Target# is protected by a layer of thick leaves.", _t"+Leaves Cover" end, + on_lose = function(self, err) return _t"#Target# cover of leaves falls apart.", _t"-Leaves Cover" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("cancel_damage_chance", eff.power) end, @@ -2224,13 +2224,13 @@ newEffect{ -- left in for backwards compatibility newEffect{ -- Note: This effect is cancelled by EFF_DISARMED name = "DUAL_WEAPON_DEFENSE", image = "talents/dual_weapon_defense.png", - desc = "Parrying", + desc = _t"Parrying", deflectchance = function(self, eff) -- The last partial deflect has a reduced chance to happen if self:attr("encased_in_ice") or self:attr("disarmed") then return 0 end return util.bound(eff.deflects>=1 and eff.chance or eff.chance*math.mod(eff.deflects,1),0,100) end, long_desc = function(self, eff) - return ("Parrying melee attacks: Has a %d%% chance to deflect up to %d damage from the next %0.1f attack(s)."):format(self.tempeffect_def.EFF_DUAL_WEAPON_DEFENSE.deflectchance(self, eff),eff.dam, math.max(eff.deflects,1)) + return ("Parrying melee attacks: Has a %d%% chance to deflect up to %d damage from the next %0.1f attack(s)."):tformat(self.tempeffect_def.EFF_DUAL_WEAPON_DEFENSE.deflectchance(self, eff),eff.dam, math.max(eff.deflects,1)) end, charges = function(self, eff) return math.ceil(eff.deflects) end, type = "physical", @@ -2254,14 +2254,14 @@ newEffect{ -- Note: This effect is cancelled by EFF_DISARMED newEffect{ -- Note: This effect is cancelled by EFF_DISARMED name = "PARRY", image = "talents/dual_weapon_mastery.png", - desc = "Parrying", + desc = _t"Parrying", deflectchance = function(self, eff, adj) -- The last partial deflect has a reduced chance to happen adj = adj or 1 if self:attr("encased_in_ice") or self:attr("disarmed") then return 0 end return util.bound(adj*(eff.deflects >=1 and eff.chance or eff.chance*math.mod(eff.deflects, 1)), 0, 100) end, long_desc = function(self, eff) - return ("Parrying melee%s attacks: Has a %d%% chance to deflect up to %d damage from the next %0.1f attack(s). Parried attacks cannot crit."):format(eff.parry_ranged and " and ranged" or "", math.floor(self:callEffect(self.EFF_PARRY, "deflectchance")), eff.dam, math.max(eff.deflects, 1)) + return ("Parrying melee%s attacks: Has a %d%% chance to deflect up to %d damage from the next %0.1f attack(s). Parried attacks cannot crit."):tformat(eff.parry_ranged and _t" and ranged" or "", math.floor(self:callEffect(self.EFF_PARRY, "deflectchance")), eff.dam, math.max(eff.deflects, 1)) end, charges = function(self, eff) return math.ceil(eff.deflects) end, type = "physical", @@ -2308,8 +2308,8 @@ newEffect{ -- Note: This effect is cancelled by EFF_DISARMED newEffect{ name = "BLOCKING", image = "talents/block.png", - desc = "Blocking", - long_desc = function(self, eff) return ("Reduces all damage taken by %d."):format(eff.power) end, + desc = _t"Blocking", + long_desc = function(self, eff) return ("Reduces all damage taken by %d."):tformat(eff.power) end, type = "physical", subtype = { tactic=true }, status = "beneficial", @@ -2365,7 +2365,7 @@ newEffect{ if src:canBe("disarm") then src:setEffect(src.EFF_DISARMED, 3, {apply_power=self:combatPhysicalpower()}) else - game.logSeen(src, "%s resists the disarming attempt!", src.name:capitalize()) + game.logSeen(src, "%s resists the disarming attempt!", src:getName():capitalize()) end end if eff.properties.on_cs then @@ -2392,14 +2392,14 @@ newEffect{ newEffect{ name = "COUNTERSTRIKE", image = "effects/counterstrike.png", - desc = "Counterstrike", - long_desc = function(self, eff) return "Vulnerable to deadly counterstrikes. Next melee attack will inflict double damage." end, + desc = _t"Counterstrike", + long_desc = function(self, eff) return _t"Vulnerable to deadly counterstrikes. Next melee attack will inflict double damage." end, type = "physical", subtype = { tactic=true }, status = "detrimental", parameters = { nb=1 }, - on_gain = function(self, eff) return nil, "+Counter" end, - on_lose = function(self, eff) return nil, "-Counter" end, + on_gain = function(self, eff) return nil, _t"+Counter" end, + on_lose = function(self, eff) return nil, _t"-Counter" end, onStrike = function(self, eff, dam, src) eff.nb = eff.nb - 1 if eff.nb <= 0 then self:removeEffect(self.EFF_COUNTERSTRIKE) end @@ -2429,13 +2429,13 @@ newEffect{ newEffect{ name = "COUNTER_ATTACKING", image = "talents/counter_attack.png", - desc = "Counter Attacking", + desc = _t"Counter Attacking", counterchance = function(self, eff) --The last partial counter attack has a reduced chance to happen if self:attr("encased_in_ice") or self:attr("disarmed") then return 0 end return util.bound(eff.counterattacks>=1 and eff.chance or eff.chance*math.mod(eff.counterattacks,1),0,100) end, long_desc = function(self, eff) - return ("Countering melee attacks: Has a %d%% chance to get an automatic counter attack when avoiding a melee attack. (%0.1f counters remaining)"):format(self.tempeffect_def.EFF_COUNTER_ATTACKING.counterchance(self, eff), math.max(eff.counterattacks,1)) + return ("Countering melee attacks: Has a %d%% chance to get an automatic counter attack when avoiding a melee attack. (%0.1f counters remaining)"):tformat(self.tempeffect_def.EFF_COUNTER_ATTACKING.counterchance(self, eff), math.max(eff.counterattacks,1)) end, charges = function(self, eff) return math.ceil(eff.counterattacks) end, type = "physical", @@ -2456,10 +2456,10 @@ newEffect{ newEffect{ name = "BRAWLER_BLOCK", image = "talents/block.png", - desc = "Blocking", + desc = _t"Blocking", long_desc = function(self, eff) return ("Blocking up to %d total damage."): - format(self.brawler_block or 0) + tformat(self.brawler_block or 0) end, type = "physical", subtype = {tactic=true}, @@ -2479,7 +2479,7 @@ newEffect{ print("[PALM CALLBACK] dam start", value) local dam = value - game:delayedLogDamage(src, self, 0, ("#STEEL_BLUE#(%d blocked)#LAST#"):format(math.min(dam, self.brawler_block)), false) + game:delayedLogDamage(src, self, 0, ("#STEEL_BLUE#(%d blocked)#LAST#"):tformat(math.min(dam, self.brawler_block)), false) if dam < self.brawler_block then self.brawler_block = self.brawler_block - dam dam = 0 @@ -2502,13 +2502,13 @@ newEffect{ newEffect{ name = "DEFENSIVE_GRAPPLING", image = "talents/defensive_throw.png", - desc = "Grappling Defensively", + desc = _t"Grappling Defensively", throwchance = function(self, eff) -- the last partial defensive throw has a reduced chance to happen if not self:isUnarmed() or self:attr("encased_in_ice") then return 0 end -- Must be unarmed return util.bound(eff.throws>=1 and eff.chance or eff.chance*math.mod(eff.throws,1),0,100) end, long_desc = function(self, eff) - return ("Has a %d%% chance to counter attack with a defensive throw when avoiding a melee attack, possibly throwing the target to the ground and stunning it. (%0.1f throws remaining)"):format(self.tempeffect_def.EFF_DEFENSIVE_GRAPPLING.throwchance(self, eff), math.max(eff.throws,1)) + return ("Has a %d%% chance to counter attack with a defensive throw when avoiding a melee attack, possibly throwing the target to the ground and stunning it. (%0.1f throws remaining)"):tformat(self.tempeffect_def.EFF_DEFENSIVE_GRAPPLING.throwchance(self, eff), math.max(eff.throws,1)) end, charges = function(self, eff) return math.ceil(eff.throws) end, type = "physical", @@ -2530,18 +2530,18 @@ newEffect{ newEffect{ name = "RAVAGE", image = "talents/ravage.png", - desc = "Ravage", + desc = _t"Ravage", long_desc = function(self, eff) - local ravaged = "each turn." - if eff.ravage then ravaged = "and is losing one physical effect turn." end - return ("The target is being ravaged by distortion, taking %0.2f physical damage %s"):format(eff.dam, ravaged) + local ravaged = _t"each turn." + if eff.ravage then ravaged = _t"and is losing one physical effect turn." end + return ("The target is being ravaged by distortion, taking %0.2f physical damage %s"):tformat(eff.dam, ravaged) end, type = "physical", subtype = { distortion=true }, status = "detrimental", parameters = {dam=1, distort=0}, - on_gain = function(self, err) return nil, "+Ravage" end, - on_lose = function(self, err) return "#Target# is no longer being ravaged." or nil, "-Ravage" end, + on_gain = function(self, err) return nil, _t"+Ravage" end, + on_lose = function(self, err) return _t"#Target# is no longer being ravaged." or nil, _t"-Ravage" end, on_timeout = function(self, eff) if eff.ravage then -- Go through all physical effects @@ -2576,7 +2576,7 @@ newEffect{ activate = function(self, eff) self:setEffect(self.EFF_DISTORTION, 2, {power=eff.distort}) if eff.ravage then - game.logSeen(self, "#LIGHT_RED#%s is being ravaged by distortion!", self.name:capitalize()) + game.logSeen(self, "#LIGHT_RED#%s is being ravaged by distortion!", self:getName():capitalize()) eff.dam = eff.dam * 1.5 end local particle = Particles.new("ultrashield", 1, {rm=255, rM=255, gm=180, gM=255, bm=220, bM=255, am=35, aM=90, radius=0.2, density=15, life=28, instop=40}) @@ -2590,14 +2590,14 @@ newEffect{ newEffect{ name = "DISTORTION", image = "talents/maelstrom.png", - desc = "Distortion", - long_desc = function(self, eff) return ("The target has recently taken distortion damage, is vulnerable to distortion effects, and has its physical resistance decreased by %d%%."):format(eff.power) end, + desc = _t"Distortion", + long_desc = function(self, eff) return ("The target has recently taken distortion damage, is vulnerable to distortion effects, and has its physical resistance decreased by %d%%."):tformat(eff.power) end, type = "physical", subtype = { distortion=true }, status = "detrimental", parameters = {power=0}, - on_gain = function(self, err) return nil, "+Distortion" end, - on_lose = function(self, err) return "#Target# is no longer distorted." or nil, "-Distortion" end, + on_gain = function(self, err) return nil, _t"+Distortion" end, + on_lose = function(self, err) return _t"#Target# is no longer distorted." or nil, _t"-Distortion" end, activate = function(self, eff) self:effectTemporaryValue(eff, "resists", {[DamageType.PHYSICAL]=-eff.power}) end, @@ -2606,14 +2606,14 @@ newEffect{ newEffect{ name = "DISABLE", image = "talents/cripple.png", - desc = "Disable", - long_desc = function(self, eff) return ("The target is disabled, reducing movement speed by %d%% and accuracy by %d."):format(eff.speed * 100, eff.atk) end, + desc = _t"Disable", + long_desc = function(self, eff) return ("The target is disabled, reducing movement speed by %d%% and accuracy by %d."):tformat(eff.speed * 100, eff.atk) end, type = "physical", subtype = { wound=true }, status = "detrimental", parameters = { speed=0.15, atk=10 }, - on_gain = function(self, err) return "#Target# is disabled.", "+Disabled" end, - on_lose = function(self, err) return "#Target# is not disabled anymore.", "-Disabled" end, + on_gain = function(self, err) return _t"#Target# is disabled.", _t"+Disabled" end, + on_lose = function(self, err) return _t"#Target# is not disabled anymore.", _t"-Disabled" end, activate = function(self, eff) eff.speedid = self:addTemporaryValue("movement_speed", -eff.speed) eff.atkid = self:addTemporaryValue("combat_atk", -eff.atk) @@ -2626,14 +2626,14 @@ newEffect{ newEffect{ name = "ANGUISH", image = "talents/agony.png", - desc = "Anguish", - long_desc = function(self, eff) return ("The target is in extreme anguish, preventing them from making tactical decisions, and reducing Willpower by %d and Cunning by %d."):format(eff.will, eff.cun) end, + desc = _t"Anguish", + long_desc = function(self, eff) return ("The target is in extreme anguish, preventing them from making tactical decisions, and reducing Willpower by %d and Cunning by %d."):tformat(eff.will, eff.cun) end, type = "physical", subtype = { wound=true }, status = "detrimental", parameters = { will=5, cun=5 }, - on_gain = function(self, err) return "#Target# is in anguish.", "+Anguish" end, - on_lose = function(self, err) return "#Target# is no longer in anguish.", "-Anguish" end, + on_gain = function(self, err) return _t"#Target# is in anguish.", _t"+Anguish" end, + on_lose = function(self, err) return _t"#Target# is no longer in anguish.", _t"-Anguish" end, activate = function(self, eff) eff.sid = self:addTemporaryValue("inc_stats", {[Stats.STAT_WIL]=-eff.will, [Stats.STAT_CUN]=-eff.cun}) -- if self.ai_state then eff.ai = self:addTemporaryValue("ai_state", {forbid_tactical=1}) end @@ -2646,8 +2646,8 @@ newEffect{ newEffect{ name = "FAST_AS_LIGHTNING", image = "talents/fast_as_lightning.png", - desc = "Fast As Lightning", - long_desc = function(self, eff) return ("The target is so fast it may blink throught obstacles if moving in the same direction for over two turns."):format() end, + desc = _t"Fast As Lightning", + long_desc = function(self, eff) return ("The target is so fast it may blink throught obstacles if moving in the same direction for over two turns."):tformat() end, type = "physical", subtype = { speed=true }, status = "beneficial", @@ -2655,8 +2655,8 @@ newEffect{ on_merge = function(self, old_eff, new_eff) return old_eff end, - on_gain = function(self, err) return "#Target# is speeding up.", "+Fast As Lightning" end, - on_lose = function(self, err) return "#Target# is slowing down.", "-Fast As Lightning" end, + on_gain = function(self, err) return _t"#Target# is speeding up.", _t"+Fast As Lightning" end, + on_lose = function(self, err) return _t"#Target# is slowing down.", _t"-Fast As Lightning" end, activate = function(self, eff) self:effectTemporaryValue(eff, "phase_shift", 0.5) end, @@ -2669,8 +2669,8 @@ newEffect{ newEffect{ name = "STEAMROLLER", image = "talents/steamroller.png", - desc = "Steamroller", - long_desc = function(self, eff) return ("Resets Rush cooldown if killed.") end, + desc = _t"Steamroller", + long_desc = function(self, eff) return (_t"Resets Rush cooldown if killed.") end, type = "physical", subtype = { status=true }, status = "detrimental", @@ -2686,8 +2686,8 @@ newEffect{ newEffect{ name = "STEAMROLLER_USER", image = "talents/steamroller.png", - desc = "Steamroller", - long_desc = function(self, eff) return ("Grants a +%d%% damage bonus."):format(eff.buff) end, + desc = _t"Steamroller", + long_desc = function(self, eff) return ("Grants a +%d%% damage bonus."):tformat(eff.buff) end, type = "physical", subtype = { status=true }, status = "beneficial", @@ -2708,14 +2708,14 @@ newEffect{ newEffect{ name = "SPINE_OF_THE_WORLD", image = "talents/spine_of_the_world.png", - desc = "Spine of the World", - long_desc = function(self, eff) return ("Immune to physical effects.") end, + desc = _t"Spine of the World", + long_desc = function(self, eff) return (_t"Immune to physical effects.") end, type = "physical", subtype = { status=true }, status = "beneficial", parameters = { }, - on_gain = function(self, err) return "#Target# become impervious to physical effects.", "+Spine of the World" end, - on_lose = function(self, err) return "#Target# is less impervious to physical effects.", "-Spine of the World" end, + on_gain = function(self, err) return _t"#Target# become impervious to physical effects.", _t"+Spine of the World" end, + on_lose = function(self, err) return _t"#Target# is less impervious to physical effects.", _t"-Spine of the World" end, activate = function(self, eff) self:effectTemporaryValue(eff, "physical_negative_status_effect_immune", 1) end, @@ -2723,14 +2723,14 @@ newEffect{ newEffect{ name = "FUNGAL_BLOOD", image = "talents/fungal_blood.png", - desc = "Fungal Blood", - long_desc = function(self, eff) return ("You have %d fungal energies stored. Release them to heal by using the Fungal Blood prodigy."):format(eff.power) end, + desc = _t"Fungal Blood", + long_desc = function(self, eff) return ("You have %d fungal energies stored. Release them to heal by using the Fungal Blood prodigy."):tformat(eff.power) end, type = "physical", subtype = { heal=true }, status = "beneficial", parameters = { power = 10 }, - on_gain = function(self, err) return nil, "+Fungal Blood" end, - on_lose = function(self, err) return nil, "-Fungal Blood" end, + on_gain = function(self, err) return nil, _t"+Fungal Blood" end, + on_lose = function(self, err) return nil, _t"-Fungal Blood" end, on_merge = function(self, old_eff, new_eff) new_eff.power = new_eff.power + old_eff.power return new_eff @@ -2742,14 +2742,14 @@ newEffect{ newEffect{ name = "MUCUS", image = "talents/mucus.png", - desc = "Mucus", - long_desc = function(self, eff) return ("You lay mucus where you walk."):format() end, + desc = _t"Mucus", + long_desc = function(self, eff) return ("You lay mucus where you walk."):tformat() end, type = "physical", subtype = { mucus=true }, status = "beneficial", parameters = {}, - on_gain = function(self, err) return nil, "+Mucus" end, - on_lose = function(self, err) return nil, "-Mucus" end, + on_gain = function(self, err) return nil, _t"+Mucus" end, + on_lose = function(self, err) return nil, _t"-Mucus" end, on_timeout = function(self, eff) self:callTalent(self.T_MUCUS, nil, self.x, self.y, self:getTalentLevel(self.T_MUCUS) >=4 and 1 or 0, eff) end, @@ -2757,21 +2757,21 @@ newEffect{ newEffect{ name = "CORROSIVE_NATURE", image = "talents/corrosive_nature.png", - desc = "Corrosive Nature", - long_desc = function(self, eff) return ("Acid damage increased by %d%%."):format(eff.power) end, + desc = _t"Corrosive Nature", + long_desc = function(self, eff) return ("Acid damage increased by %d%%."):tformat(eff.power) end, type = "physical", subtype = { nature=true, acid=true }, status = "beneficial", parameters = { power=1, bonus_level=1}, charges = function(self, eff) return math.round(eff.power) end, - on_gain = function(self, err) return "#Target#'s acid damage is more potent.", "+Corrosive Nature" end, - on_lose = function(self, err) return "#Target#'s acid damage is no longer so potent.", "-Corrosive Nature" end, + on_gain = function(self, err) return _t"#Target#'s acid damage is more potent.", _t"+Corrosive Nature" end, + on_lose = function(self, err) return _t"#Target#'s acid damage is no longer so potent.", _t"-Corrosive Nature" end, on_merge = function(self, eff, new_eff) if game.turn < eff.last_update + 10 then return eff end -- update once a turn local t = self:getTalentFromId(self.T_CORROSIVE_NATURE) eff.dur = t.getDuration(self, t) if eff.bonus_level >=5 then return eff end - game.logSeen(self, "%s's corrosive nature intensifies!",self.name:capitalize()) + game.logSeen(self, "%s's corrosive nature intensifies!",self:getName():capitalize()) eff.last_update = game.turn eff.bonus_level = eff.bonus_level + 1 eff.power = t.getAcidDamage(self, t, eff.bonus_level) @@ -2791,21 +2791,21 @@ newEffect{ newEffect{ name = "NATURAL_ACID", image = "talents/natural_acid.png", - desc = "Natural Acid", - long_desc = function(self, eff) return ("Nature damage increased by %d%%."):format(eff.power) end, + desc = _t"Natural Acid", + long_desc = function(self, eff) return ("Nature damage increased by %d%%."):tformat(eff.power) end, type = "physical", subtype = { nature=true, acid=true }, status = "beneficial", parameters = { power=1, bonus_level=1}, charges = function(self, eff) return math.round(eff.power) end, - on_gain = function(self, err) return "#Target#'s nature damage is more potent.", "+Natural Acid" end, - on_lose = function(self, err) return "#Target#'s nature damage is no longer so potent.", "-Nature Acid" end, + on_gain = function(self, err) return _t"#Target#'s nature damage is more potent.", _t"+Natural Acid" end, + on_lose = function(self, err) return _t"#Target#'s nature damage is no longer so potent.", _t"-Nature Acid" end, on_merge = function(self, eff, new_eff) if game.turn < eff.last_update + 10 then return eff end -- update once a turn local t = self:getTalentFromId(self.T_NATURAL_ACID) eff.dur = t.getDuration(self, t) if eff.bonus_level >=5 then return eff end - game.logSeen(self, "%s's natural acid becomes more concentrated!",self.name:capitalize()) + game.logSeen(self, "%s's natural acid becomes more concentrated!",self:getName():capitalize()) eff.last_update = game.turn eff.bonus_level = eff.bonus_level + 1 eff.power = t.getNatureDamage(self, t, eff.bonus_level) @@ -2825,14 +2825,14 @@ newEffect{ newEffect{ name = "CORRODE", image = "talents/blightzone.png", - desc = "Corrode", - long_desc = function(self, eff) return ("The target is corroded, reducing their accuracy by %d, their armor by %d, and their defense by %d."):format(eff.atk, eff.armor, eff.defense) end, + desc = _t"Corrode", + long_desc = function(self, eff) return ("The target is corroded, reducing their accuracy by %d, their armor by %d, and their defense by %d."):tformat(eff.atk, eff.armor, eff.defense) end, type = "physical", subtype = { acid=true }, status = "detrimental", parameters = { atk=5, armor=5, defense=10 }, no_ct_effect = true, - on_gain = function(self, err) return "#Target# is corroded." end, - on_lose = function(self, err) return "#Target# has shook off the effects of their corrosion." end, + on_gain = function(self, err) return _t"#Target# is corroded." end, + on_lose = function(self, err) return _t"#Target# has shook off the effects of their corrosion." end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_atk", -eff.atk) self:effectTemporaryValue(eff, "combat_armor", -eff.armor) @@ -2842,14 +2842,14 @@ newEffect{ newEffect{ name = "SLIPPERY_MOSS", image = "talents/slippery_moss.png", - desc = "Slippery Moss", - long_desc = function(self, eff) return ("The target is covered in slippery moss. Each time it tries to use a talent there is %d%% chance of failure."):format(eff.fail) end, + desc = _t"Slippery Moss", + long_desc = function(self, eff) return ("The target is covered in slippery moss. Each time it tries to use a talent there is %d%% chance of failure."):tformat(eff.fail) end, type = "physical", subtype = { moss=true, nature=true }, status = "detrimental", parameters = {fail=5}, - on_gain = function(self, err) return "#Target# is covered in slippery moss!", "+Slippery Moss" end, - on_lose = function(self, err) return "#Target# is free from the slippery moss.", "-Slippery Moss" end, + on_gain = function(self, err) return _t"#Target# is covered in slippery moss!", _t"+Slippery Moss" end, + on_lose = function(self, err) return _t"#Target# is free from the slippery moss.", _t"-Slippery Moss" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("talent_fail_chance", eff.fail) end, @@ -2860,14 +2860,14 @@ newEffect{ newEffect{ name = "JUGGERNAUT", image = "talents/juggernaut.png", - desc = "Juggernaut", - long_desc = function(self, eff) return ("Reduces physical damage received by %d%% and provides a %d%% chance to ignore critical hits."):format(eff.power, eff.crits) end, + desc = _t"Juggernaut", + long_desc = function(self, eff) return ("Reduces physical damage received by %d%% and provides a %d%% chance to ignore critical hits."):tformat(eff.power, eff.crits) end, type = "physical", subtype = { superiority=true }, status = "beneficial", parameters = { power=10 }, - on_gain = function(self, err) return "#Target# hardens its skin.", "+Juggernaut" end, - on_lose = function(self, err) return "#Target#'s skin returns to normal.", "-Juggernaut" end, + on_gain = function(self, err) return _t"#Target# hardens its skin.", _t"+Juggernaut" end, + on_lose = function(self, err) return _t"#Target#'s skin returns to normal.", _t"-Juggernaut" end, activate = function(self, eff) eff.particle = self:addParticles(Particles.new("stone_skin", 1, {density=4})) self:effectTemporaryValue(eff, "resists", {[DamageType.PHYSICAL]=eff.power}) @@ -2880,14 +2880,14 @@ newEffect{ newEffect{ name = "NATURE_REPLENISHMENT", image = "talents/meditation.png", - desc = "Natural Replenishment", - long_desc = function(self, eff) return ("The target has been directly exposed to arcane energies and has responded by reasserting it's connection to nature, restoring %0.1f Equilibrium per turn."):format(eff.power) end, + desc = _t"Natural Replenishment", + long_desc = function(self, eff) return ("The target has been directly exposed to arcane energies and has responded by reasserting it's connection to nature, restoring %0.1f Equilibrium per turn."):tformat(eff.power) end, type = "physical", subtype = { nature=true }, status = "beneficial", parameters = {power=1}, - on_gain = function(self, err) return ("#Target# defiantly reasserts %s connection to nature!"):format(string.his_her(self)), "+Nature Replenishment" end, - on_lose = function(self, err) return "#Target# stops restoring Equilibrium.", "-Nature Replenishment" end, + on_gain = function(self, err) return ("#Target# defiantly reasserts %s connection to nature!"):tformat(string.his_her(self)), _t"+Nature Replenishment" end, + on_lose = function(self, err) return _t"#Target# stops restoring Equilibrium.", _t"-Nature Replenishment" end, on_timeout = function(self, eff) self:incEquilibrium(-eff.power) end, @@ -2896,14 +2896,14 @@ newEffect{ newEffect{ name = "BERSERKER_RAGE", image = "talents/berserker.png", - desc = "Berserker Rage", - long_desc = function(self, eff) return ("Increases critical hit chance by %d%%."):format(eff.power) end, + desc = _t"Berserker Rage", + long_desc = function(self, eff) return ("Increases critical hit chance by %d%%."):tformat(eff.power) end, type = "physical", subtype = { tactic=true }, status = "beneficial", decrease = 0, no_remove = true, parameters = {power=1}, - charges = function(self, eff) return ("%0.1f%%"):format(eff.power) end, + charges = function(self, eff) return ("%0.1f%%"):tformat(eff.power) end, on_merge = function(self, old_eff, new_eff) self:removeTemporaryValue("combat_physcrit", old_eff.tmpid) old_eff.tmpid = self:addTemporaryValue("combat_physcrit", new_eff.power) @@ -2925,8 +2925,8 @@ newEffect{ newEffect{ name = "RELENTLESS_FURY", image = "talents/relentless_fury.png", - desc = "Relentless Fury", - long_desc = function(self, eff) return ("Increases stamina regeneration by %d, movement and attack speed by %d%%."):format(eff.stamina, eff.speed) end, + desc = _t"Relentless Fury", + long_desc = function(self, eff) return ("Increases stamina regeneration by %d, movement and attack speed by %d%%."):tformat(eff.stamina, eff.speed) end, type = "physical", subtype = { tactic=true }, status = "beneficial", @@ -2952,7 +2952,7 @@ end newEffect { name = "SKIRMISHER_DIRECTED_SPEED", - desc = "Directed Speed", + desc = _t"Directed Speed", type = "physical", subtype = {speed = true}, parameters = { @@ -2964,7 +2964,7 @@ newEffect { move_speed_bonus = 1.00 }, status = "beneficial", - on_lose = function(self, eff) return "#Target# loses speed.", "-Directed Speed" end, + on_lose = function(self, eff) return _t"#Target# loses speed.", _t"-Directed Speed" end, lists = 'break_with_step_up', callbackOnMove = function(self, eff, moved, force, ox, oy) local angle_start = normalize_direction(math.atan2(self.y - eff.start_y, self.x - eff.start_x)) @@ -3002,7 +3002,7 @@ newEffect { end, long_desc = function(self, eff) return ([[Target is currently moving with %d%% additional speed in a single direction (%s). Stopping or changing directions will remove this effect.]]) - :format(eff.move_speed_bonus * 100, eff.compass or "unknown") + :tformat(eff.move_speed_bonus * 100, eff.compass or "unknown") end, } @@ -3010,7 +3010,7 @@ newEffect { -- duration. newEffect { name = "SKIRMISHER_STUN_INCREASE", - desc = "Stun Lengthen", + desc = _t"Stun Lengthen", long_desc = function(self, eff) return ([[This should not be shown, oops.]]) end, type = "physical", subtype = {stun = true}, @@ -3018,7 +3018,7 @@ newEffect { on_gain = function(self, eff) local stun = self:hasEffect(self.EFF_STUNNED) if stun and stun.dur and stun.dur > 1 then - return ("#Target# is stunned further! (now %d turns)"):format(stun.dur), "Stun Lengthened" + return ("#Target# is stunned further! (now %d turns)"):tformat(stun.dur), "Stun Lengthened" end end, activate = function(self, eff) @@ -3034,7 +3034,7 @@ newEffect { newEffect { name = "SKIRMISHER_ETERNAL_WARRIOR", - desc = "Eternal Warrior", + desc = _t"Eternal Warrior", image = "talents/skirmisher_the_eternal_warrior.png", type = "mental", subtype = { morale=true }, @@ -3047,11 +3047,11 @@ newEffect { -- Maximum stacking applications max=5 }, - on_gain = function(self, err) return nil, "+Eternal Warrior" end, - on_lose = function(self, err) return nil, "-Eternal Warrior" end, + on_gain = function(self, err) return nil, _t"+Eternal Warrior" end, + on_lose = function(self, err) return nil, _t"-Eternal Warrior" end, long_desc = function(self, eff) return ("The target stands strong, increasing all resistances by %0.1f%% and resistance caps by %0.1f%%."): - format(eff.res, eff.cap) + tformat(eff.res, eff.cap) end, activate = function(self, eff) eff.res_id = self:addTemporaryValue("resists", {all = eff.res}) @@ -3074,16 +3074,16 @@ newEffect { newEffect { name = "SKIRMISHER_TACTICAL_POSITION", - desc = "Tactical Position", + desc = _t"Tactical Position", type = "physical", subtype = {tactic = true}, status = "beneficial", parameters = {combat_physcrit = 10}, long_desc = function(self, eff) return ([[The target has relocated to a favorable position, giving them +%d%% physical critical chance.]]) - :format(eff.combat_physcrit) + :tformat(eff.combat_physcrit) end, - on_gain = function(self, eff) return "#Target# is poised to strike!" end, + on_gain = function(self, eff) return _t"#Target# is poised to strike!" end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_physcrit", eff.combat_physcrit) end, @@ -3091,7 +3091,7 @@ newEffect { newEffect { name = "SKIRMISHER_DEFENSIVE_ROLL", - desc = "Defensive Roll", + desc = _t"Defensive Roll", type = "physical", subtype = {tactic = true}, status = "beneficial", @@ -3099,32 +3099,32 @@ newEffect { -- percent of all damage to ignore reduce = 50 }, - on_gain = function(self, eff) return "#Target# assumes an extreme defensive posture, avoiding some damage!" end, + on_gain = function(self, eff) return _t"#Target# assumes an extreme defensive posture, avoiding some damage!" end, activate = function(self, eff) self:effectTemporaryValue(eff, "incoming_reduce", eff.reduce) end, long_desc = function(self, eff) return ([[The target is in an extreme defensive posture, avoiding %d%% of all incoming damage.]]) - :format(eff.reduce) + :tformat(eff.reduce) end, } newEffect { name = "SKIRMISHER_TRAINED_REACTIONS_COOLDOWN", - desc = "Trained Reactions Cooldown", + desc = _t"Trained Reactions Cooldown", type = "other", subtype = {cooldown = true}, status = "detrimental", no_stop_resting = true, - on_lose = function(self, eff) return "#LIGHT_BLUE##Target# may dodge again.", "+Trained Reactions" end, + on_lose = function(self, eff) return _t"#LIGHT_BLUE##Target# may dodge again.", _t"+Trained Reactions" end, long_desc = function(self, eff) - return "Trained Reactions may not trigger." + return _t"Trained Reactions may not trigger." end, } newEffect { name = "SKIRMISHER_SUPERB_AGILITY", - desc = "Superb Agility", + desc = _t"Superb Agility", image = "talents/skirmisher_superb_agility.png", type = "physical", subtype = {speed = true}, @@ -3132,25 +3132,25 @@ newEffect { parameters = { global_speed_add = 0.1, }, - on_gain = function(self, eff) return "#Target# has sped up!" end, + on_gain = function(self, eff) return _t"#Target# has sped up!" end, activate = function(self, eff) self:effectTemporaryValue(eff, "global_speed_add", eff.global_speed_add) end, long_desc = function(self, eff) return ([[The target's reactions have quickened, giving +%d%% global speed.]]) - :format(eff.global_speed_add * 100) + :tformat(eff.global_speed_add * 100) end, } newEffect{ name = "ANTI_GRAVITY", image = "talents/gravity_locus.png", - desc = "Anti-Gravity", - long_desc = function(self, eff) return ("Target is caught in an anti-gravity field, halving its knockback resistance."):format() end, + desc = _t"Anti-Gravity", + long_desc = function(self, eff) return ("Target is caught in an anti-gravity field, halving its knockback resistance."):tformat() end, type = "physical", subtype = { spacetime=true }, status = "detrimental", - on_gain = function(self, err) return nil, "+Anti-Gravity" end, - on_lose = function(self, err) return nil, "-Anti-Gravity" end, + on_gain = function(self, err) return nil, _t"+Anti-Gravity" end, + on_lose = function(self, err) return nil, _t"-Anti-Gravity" end, on_merge = function(self, old_eff, new_eff) old_eff.dur = new_eff.dur return old_eff @@ -3164,11 +3164,11 @@ newEffect{ newEffect{ name = "PARASITIC_LEECHES", image = "talents/blood_suckers.png", - desc = "Parasitic Leeches", - display_desc = function(self, eff) return "Parasitic Leeches: "..eff.nb.." masses" end, + desc = _t"Parasitic Leeches", + display_desc = function(self, eff) return ("Parasitic Leeches: %d masses"):tformat(eff.nb) end, long_desc = function(self, eff) local source = eff.src or self - return ("The target is being fed upon by %d masses of parasitic leeches for %0.2f physical and %0.2f acid damage each turn. After a %d turn feeding period, one mass will drop off and multiply."):format(eff.nb, + return ("The target is being fed upon by %d masses of parasitic leeches for %0.2f physical and %0.2f acid damage each turn. After a %d turn feeding period, one mass will drop off and multiply."):tformat(eff.nb, source:damDesc("PHYSICAL", eff.dam*eff.nb/2), source:damDesc("ACID", eff.dam*eff.nb/2), eff.gestation) end, type = "physical", @@ -3184,7 +3184,7 @@ newEffect{ end, charges = function(self, eff) return eff.nb end, parameters = {dam=10, nb=1, gestation=5, turns=0 }, - on_gain = function(self, err) return "#Target# is #GREEN#INFESTED#LAST# with parasitic leeches!", "+Parasitic Leeches" end, + on_gain = function(self, err) return _t"#Target# is #GREEN#INFESTED#LAST# with parasitic leeches!", _t"+Parasitic Leeches" end, on_timeout = function(self, eff) eff.turns = eff.turns + 1 -- Creepy, so the player tries to get rid of it as soon as possible... @@ -3205,7 +3205,7 @@ newEffect{ game.zone:addEntity(game.level, m, "actor", x, y) m:learnTalent(m.T_MULTIPLY, 1) - game.logSeen(self, "Some leeches drop off %s!", self.name:capitalize()) + game.logSeen(self, "Some leeches drop off %s!", self:getName():capitalize()) end eff.turns = 0 eff.nb = eff.nb - 1 @@ -3228,25 +3228,25 @@ newEffect{ game.zone:addEntity(game.level, m, "actor", x, y) end end - game.logSeen(self, "Some leeches drop off %s!", self.name:capitalize()) + game.logSeen(self, "Some leeches drop off %s!", self:getName():capitalize()) end end, } newEffect{ name = "GARROTE", image = "talents/grab.png", - desc = "Garrote", + desc = _t"Garrote", long_desc = function(self, eff) - local silence = eff.silence > 0 and eff.silenceid and (" It is silenced for the next %d turn(s), preventing it from casting spells and using some vocal talents."):format(eff.silence) or "" - return ("The target is being garrotted by %s, rendering it unable to move and subject to an automatic unarmed attack (at %d%% damage) each turn.%s"):format(eff.src and eff.src.name or "something", eff.power*100, silence) + local silence = eff.silence > 0 and eff.silenceid and (" It is silenced for the next %d turn(s), preventing it from casting spells and using some vocal talents."):tformat(eff.silence) or "" + return ("The target is being garrotted by %s, rendering it unable to move and subject to an automatic unarmed attack (at %d%% damage) each turn.%s"):tformat(eff.src and eff.src:getName() or _t"something", eff.power*100, silence) end, type = "physical", subtype = { grapple=true, pin=true }, status = "detrimental", parameters = { power = 0.6, silence=0}, remove_on_clone = true, - on_gain = function(self, eff) return ("%s has garroted #Target#!"):format(eff.src and eff.src.name or "Something"), "+Garrote" end, - on_lose = function(self, eff) return ("#Target# is free from %s's garrote."):format(eff.src and eff.src.name or "something"), "-Garrote" end, + on_gain = function(self, eff) return ("%s has garroted #Target#!"):tformat(eff.src and eff.src:getName() or _t"Something"), _t"+Garrote" end, + on_lose = function(self, eff) return ("#Target# is free from %s's garrote."):tformat(eff.src and eff.src:getName() or _t"something"), _t"-Garrote" end, activate = function(self, eff) self:effectTemporaryValue(eff, "never_move", 1) if eff.silence > 0 then eff.silenceid = self:addTemporaryValue("silence", 1) end @@ -3278,14 +3278,14 @@ newEffect{ newEffect{ name = "MARKED_FOR_DEATH", image = "talents/marked_for_death.png", - desc = "Marked for Death", - long_desc = function(self, eff) return ("The target takes %d%% increased damage from all sources. If this effect runs its full course, the target will take an additional %0.1f physical damage (increased by %d%% of all damage taken while this effect is active)."):format(eff.power, eff.dam, eff.perc*100) end, + desc = _t"Marked for Death", + long_desc = function(self, eff) return ("The target takes %d%% increased damage from all sources. If this effect runs its full course, the target will take an additional %0.1f physical damage (increased by %d%% of all damage taken while this effect is active)."):tformat(eff.power, eff.dam, eff.perc*100) end, type = "physical", subtype = { }, status = "detrimental", parameters = { power=20, perc=20, stam=0, turns = 0, max_dur=6}, - on_gain = function(self, err) return "#Target# is marked for death!", "+Marked for Death!" end, - on_lose = function(self, err) return "#Target# is free from the deathmark.", "-Marked for Death" end, + on_gain = function(self, err) return _t"#Target# is marked for death!", _t"+Marked for Death!" end, + on_lose = function(self, err) return _t"#Target# is free from the deathmark.", _t"-Marked for Death" end, activate = function(self, eff) self:effectTemporaryValue(eff, "resists", {all=-eff.power}) self:effectParticles(eff, {type="circle", args={toback=true, oversize=1.8, base_rot=180, a=255, shader=true, appear=12, img="marked_death_aura", speed=0, radius=0}}) @@ -3313,22 +3313,22 @@ newEffect{ newEffect{ name = "DEADLY_POISON", image = "talents/apply_poison.png", - desc = "Deadly Poison", + desc = _t"Deadly Poison", long_desc = function(self, eff) - local insidious = eff.insidious > 0 and (" Healing received is reduced by %d%%."):format(eff.insidious) or "" - local numbing = eff.numbing > 0 and (" Damage dealt is reduced by %d%%."):format(eff.numbing) or "" - local crippling = eff.crippling > 0 and (" %d%% chance to fail talents."):format(eff.crippling) or "" - local volatile = eff.volatile > 0 and (" Poison damage also hits adjacent targets for 50%%."):format() or "" - local leeching = eff.leeching > 0 and (" The source of this effect receives healing equal to %d%% of the damage it deals to the target."):format(eff.leeching) or "" - return ("The target is poisoned, taking %0.2f nature damage per turn.%s%s%s%s%s"):format(eff.power, insidious, numbing, crippling, volatile, leeching) + local insidious = eff.insidious > 0 and (" Healing received is reduced by %d%%."):tformat(eff.insidious) or "" + local numbing = eff.numbing > 0 and (" Damage dealt is reduced by %d%%."):tformat(eff.numbing) or "" + local crippling = eff.crippling > 0 and (" %d%% chance to fail talents."):tformat(eff.crippling) or "" + local volatile = eff.volatile > 0 and (" Poison damage also hits adjacent targets for 50%%."):tformat() or "" + local leeching = eff.leeching > 0 and (" The source of this effect receives healing equal to %d%% of the damage it deals to the target."):tformat(eff.leeching) or "" + return ("The target is poisoned, taking %0.2f nature damage per turn.%s%s%s%s%s"):tformat(eff.power, insidious, numbing, crippling, volatile, leeching) end, charges = function(self, eff) return (math.floor(eff.power)) end, type = "physical", subtype = { poison=true, nature=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10, reduce=5}, - on_gain = function(self, err) return "#Target# is poisoned!", "+Deadly Poison" end, - on_lose = function(self, err) return "#Target# is no longer poisoned.", "-Deadly Poison" end, + on_gain = function(self, err) return _t"#Target# is poisoned!", _t"+Deadly Poison" end, + on_lose = function(self, err) return _t"#Target# is no longer poisoned.", _t"-Deadly Poison" end, -- Damage each turn on_timeout = function(self, eff, p, ed) if self:attr("purify_poison") then @@ -3389,14 +3389,14 @@ newEffect{ newEffect{ name = "RAZORWIRE", image = "talents/springrazor_trap.png", - desc = "Razorwire", - long_desc = function(self, eff) return ("The target's equipment has been shredded by razorwire, reducing its accuracy by %d, armour by %d, and defense by %d."):format(eff.power, eff.power, eff.power) end, + desc = _t"Razorwire", + long_desc = function(self, eff) return ("The target's equipment has been shredded by razorwire, reducing its accuracy by %d, armour by %d, and defense by %d."):tformat(eff.power, eff.power, eff.power) end, type = "physical", subtype = { physical=true }, status = "detrimental", parameters = { power=10 }, no_ct_effect = true, - on_gain = function(self, err) return "#Target# is entangled in razorwire!" end, - on_lose = function(self, err) return "#Target# has shook off the razorwire." end, + on_gain = function(self, err) return _t"#Target# is entangled in razorwire!" end, + on_lose = function(self, err) return _t"#Target# has shook off the razorwire." end, activate = function(self, eff) self:effectTemporaryValue(eff, "combat_atk", -eff.power) self:effectTemporaryValue(eff, "combat_armor", -eff.power) @@ -3406,14 +3406,14 @@ newEffect{ newEffect{ name = "DIRTY_FIGHTING", image = "talents/dirty_fighting.png", - desc = "Dirty Fighting", - long_desc = function(self, eff) return ("The target is reeling in pain. Stun, pin, blindness, and confusion immunity are halved and physical save is reduced by %d."):format(eff.power) end, + desc = _t"Dirty Fighting", + long_desc = function(self, eff) return ("The target is reeling in pain. Stun, pin, blindness, and confusion immunity are halved and physical save is reduced by %d."):tformat(eff.power) end, type = "physical", subtype = { wound=true }, status = "detrimental", parameters = { power=5 }, - on_gain = function(self, err) return nil, "+Dirty Fighting" end, - on_lose = function(self, err) return nil, "-Dirty Fighting" end, + on_gain = function(self, err) return nil, _t"+Dirty Fighting" end, + on_lose = function(self, err) return nil, _t"-Dirty Fighting" end, on_merge = function(self, old_eff, new_eff) old_eff.dur = new_eff.dur return old_eff @@ -3439,13 +3439,13 @@ newEffect{ newEffect{ name = "SOOTHING_DARKNESS", image = "talents/soothing_darkness.png", - desc = "Soothing Darkness", + desc = _t"Soothing Darkness", long_desc = function(self, eff) - local desc = ("The target is wreathed in shadows, increasing life regeneration by %0.1f"):format(eff.life) + local desc = ("The target is wreathed in shadows, increasing life regeneration by %0.1f"):tformat(eff.life) if eff.shadowguard > 0 then - desc = desc..(", stamina regeneration by %0.1f and all damage resistance by %d%%."):format(eff.stamina, eff.shadowguard) + desc = desc..(", stamina regeneration by %0.1f and all damage resistance by %d%%."):tformat(eff.stamina, eff.shadowguard) else - desc = desc..(" and stamina regeneration by %0.1f."):format(eff.stamina) end + desc = desc..(" and stamina regeneration by %0.1f."):tformat(eff.stamina) end return desc end, type = "physical", @@ -3465,8 +3465,8 @@ newEffect{ newEffect{ name = "SHADOW_DANCE", image = "talents/shadow_dance.png", - desc = "Shadow Dance", - long_desc = function(self, eff) return ("The target is able to make actions and attacks while remaining stealthed."):format() end, + desc = _t"Shadow Dance", + long_desc = function(self, eff) return ("The target is able to make actions and attacks while remaining stealthed."):tformat() end, type = "physical", subtype = { tactical=true, darkness=true }, status = "beneficial", @@ -3484,8 +3484,8 @@ newEffect{ newEffect{ name = "SEDATED", image = "talents/dart_launcher.png", - desc = "Sedated", - long_desc = function(self, eff) return ("The target is in a deep sleep and unable to act. Every %d damage it takes will reduce the duration of the effect by one turn."):format(eff.power) end, + desc = _t"Sedated", + long_desc = function(self, eff) return ("The target is in a deep sleep and unable to act. Every %d damage it takes will reduce the duration of the effect by one turn."):tformat(eff.power) end, type = "physical", subtype = { sleep=true, poison=true }, status = "detrimental", @@ -3496,9 +3496,9 @@ newEffect{ eff.cancel = true return end - return "#Target# is in a deep sleep.", "+Sedated" + return _t"#Target# is in a deep sleep.", "+Sedated" end, - on_lose = function(self, eff) return "#Target# is no longer sleeping.", "-Sedated" end, + on_lose = function(self, eff) return _t"#Target# is no longer sleeping.", _t"-Sedated" end, on_timeout = function(self, eff) -- Increment Insomnia Duration if not self:attr("lucid_dreamer") then @@ -3525,8 +3525,8 @@ newEffect{ newEffect{ name = "ROGUE_S_BREW", image = "talents/rogue_s_brew_mastery.png", - desc = "Rogue's Brew", - long_desc = function(self, eff) return ("The target will not die until falling below -%d life."):format(eff.power) end, + desc = _t"Rogue's Brew", + long_desc = function(self, eff) return ("The target will not die until falling below -%d life."):tformat(eff.power) end, charges = function(self, eff) return math.floor(eff.power) end, type = "physical", subtype = { nature=true }, @@ -3542,20 +3542,20 @@ newEffect{ newEffect{ name = "BEAR_TRAP", image = "talents/bear_trap.png", - desc = "Bear Trap", + desc = _t"Bear Trap", long_desc = function(self, eff) local desc = {} if eff.pinid then desc[#desc+1] = "pinned" end - if eff.slowid then desc[#desc+1] = ("slowed (%d%%)"):format(eff.power*100) end - if eff.dam > 0 then desc[#desc+1] = ("taking %0.2f physical damage each turn"):format(eff.dam) end - return "Caught in a bear trap: "..table.concat(desc, ", ") + if eff.slowid then desc[#desc+1] = ("slowed (%d%%)"):tformat(eff.power*100) end + if eff.dam > 0 then desc[#desc+1] = ("taking %0.2f physical damage each turn"):tformat(eff.dam) end + return _t"Caught in a bear trap: "..table.concat(desc, ", ") end, type = "physical", subtype = { slow=true, pin=true, wound=true, cut=true, bleed=true }, status = "detrimental", parameters = { power=0.1, dam=10 }, - on_gain = function(self, err) return "A bear trap snaps onto #Target#!", "+Bear Trap" end, - on_lose = function(self, err) return "#Target# is freed from a bear trap.", "-Bear Trap" end, + on_gain = function(self, err) return _t"A bear trap snaps onto #Target#!", _t"+Bear Trap" end, + on_lose = function(self, err) return _t"#Target# is freed from a bear trap.", _t"-Bear Trap" end, activate = function(self, eff) local pin, cut = self:canBe("pin"), self:canBe("cut") if pin then @@ -3587,14 +3587,14 @@ newEffect{ newEffect{ name = "STONE_VINE", - desc = "Stone Vine", - long_desc = function(self, eff) return ("A living stone vine holds the target in place, inflicting %0.1f Nature%s damage per turn."):format(eff.dam, eff.arcanedam and (" and %0.1f Arcane"):format(eff.arcanedam) or "") end, + desc = _t"Stone Vine", + long_desc = function(self, eff) return ("A living stone vine holds the target in place, inflicting %0.1f Nature%s damage per turn."):tformat(eff.dam, eff.arcanedam and (" and %0.1f Arcane"):tformat(eff.arcanedam) or "") end, type = "physical", subtype = { earth=true, pin=true }, status = "detrimental", parameters = { dam=10 }, - on_gain = function(self, err) return "#Target# is seized by a stone vine.", "+Stone Vine" end, - on_lose = function(self, err) return "#Target# is free from the stone vine.", "-Stone Vine" end, + on_gain = function(self, err) return _t"#Target# is seized by a stone vine.", _t"+Stone Vine" end, + on_lose = function(self, err) return _t"#Target# is free from the stone vine.", _t"-Stone Vine" end, activate = function(self, eff) eff.last_x = eff.src.x eff.last_y = eff.src.y @@ -3632,20 +3632,20 @@ newEffect{ newEffect{ name = "DWARVEN_RESILIENCE", image = "talents/dwarf_resilience.png", - desc = "Dwarven Resilience", + desc = _t"Dwarven Resilience", long_desc = function(self, eff) if eff.mid_ac then - return ("The target's skin turns to stone, granting %d armour, %d physical save and %d spell save. Also applies %d armour to all non-physical damage."):format(eff.armor, eff.physical, eff.spell, eff.mid_ac) + return ("The target's skin turns to stone, granting %d armour, %d physical save and %d spell save. Also applies %d armour to all non-physical damage."):tformat(eff.armor, eff.physical, eff.spell, eff.mid_ac) else - return ("The target's skin turns to stone, granting %d armour, %d physical save and %d spell save."):format(eff.armor, eff.physical, eff.spell) + return ("The target's skin turns to stone, granting %d armour, %d physical save and %d spell save."):tformat(eff.armor, eff.physical, eff.spell) end end, type = "physical", subtype = { earth=true }, status = "beneficial", parameters = { armor=10, spell=10, physical=10 }, - on_gain = function(self, err) return "#Target#'s skin turns to stone." end, - on_lose = function(self, err) return "#Target#'s skin returns to normal." end, + on_gain = function(self, err) return _t"#Target#'s skin turns to stone." end, + on_lose = function(self, err) return _t"#Target#'s skin returns to normal." end, activate = function(self, eff) eff.aid = self:addTemporaryValue("combat_armor", eff.armor) eff.hid = self:addTemporaryValue("combat_armor_hardiness", eff.armor_hardiness) @@ -3668,14 +3668,14 @@ newEffect{ newEffect{ name = "STONE_LINK_SOURCE", image = "talents/stone_link.png", - desc = "Stone Link", - long_desc = function(self, eff) return ("The target protects all those around it in radius %d by redirecting all damage against them to itself."):format(eff.rad) end, + desc = _t"Stone Link", + long_desc = function(self, eff) return ("The target protects all those around it in radius %d by redirecting all damage against them to itself."):tformat(eff.rad) end, type = "physical", subtype = { earth=true, shield=true }, status = "beneficial", parameters = { rad=3 }, - on_gain = function(self, err) return ("#Target# begins protecting %s friends with a stone shield."):format(string.his_her(self)), "+Stone Link" end, - on_lose = function(self, err) return "#Target# is no longer protecting anyone.", "-Stone Link" end, + on_gain = function(self, err) return ("#Target# begins protecting %s friends with a stone shield."):tformat(string.his_her(self)), _t"+Stone Link" end, + on_lose = function(self, err) return _t"#Target# is no longer protecting anyone.", _t"-Stone Link" end, activate = function(self, eff) if core.shader.active() then eff.particle = self:addParticles(Particles.new("shader_shield", 1, {size_factor=eff.rad}, {type="shield", time_factor=4000, color={0.7, 0.4, 0.3}})) @@ -3697,14 +3697,14 @@ newEffect{ newEffect{ name = "STONE_LINK", image = "talents/stone_link.png", - desc = "Stone Link", - long_desc = function(self, eff) return ("The target is protected by %s, redirecting all damage to it."):format(eff.src.name) end, + desc = _t"Stone Link", + long_desc = function(self, eff) return ("The target is protected by %s, redirecting all damage to it."):tformat(eff.src:getName()) end, type = "physical", subtype = { earth=true, shield=true }, status = "beneficial", parameters = { }, - on_gain = function(self, err) return "#Target# is protected by a stone shield.", "+Stone Link" end, - on_lose = function(self, err) return "#Target# is less protected.", "-Stone Link" end, + on_gain = function(self, err) return _t"#Target# is protected by a stone shield.", _t"+Stone Link" end, + on_lose = function(self, err) return _t"#Target# is less protected.", _t"-Stone Link" end, activate = function(self, eff) end, deactivate = function(self, eff) @@ -3713,8 +3713,8 @@ newEffect{ newEffect{ name = "EXHAUSTION", image = "talents/slumber.png", - desc = "Exhaustion", - long_desc = function(self, eff) return ("The target has recently performed an extreme feat of agility and is exhausted. The stamina cost of activated Mobility talents is increased by %d%%."):format(eff.fatigue) end, + desc = _t"Exhaustion", + long_desc = function(self, eff) return ("The target has recently performed an extreme feat of agility and is exhausted. The stamina cost of activated Mobility talents is increased by %d%%."):tformat(eff.fatigue) end, type = "other", subtype = {tactic = true}, status = "detrimental", no_stop_enter_worlmap = true, @@ -3737,10 +3737,10 @@ newEffect{ newEffect{ name = "MOBILE_DEFENCE", image = "talents/light_armour_training.png", - desc = "Mobile Defense", + desc = _t"Mobile Defense", long_desc = function(self, eff) - local stam = eff.stamina > 0 and ("stamina regeneration by %0.1f and "):format(eff.stamina) or "" - return ("Increases %sdefense by %d."):format(stam, eff.power) + local stam = eff.stamina > 0 and ("stamina regeneration by %0.1f and "):tformat(eff.stamina) or "" + return ("Increases %sdefense by %d."):tformat(stam, eff.power) end, type = "physical", subtype = { tactic=true }, @@ -3754,14 +3754,14 @@ newEffect{ newEffect{ name = "GHOULISH_LEAP", image = "talents/ghoulish_leap.png", - desc = "Ghoulish Leap", - long_desc = function(self, eff) return ("The target's global speed is increased by %d%%."):format(eff.speed * 100) end, + desc = _t"Ghoulish Leap", + long_desc = function(self, eff) return ("The target's global speed is increased by %d%%."):tformat(eff.speed * 100) end, type = "physical", subtype = { speed=true }, status = "beneficial", parameters = { speed=0.1 }, - on_gain = function(self, err) return "#Target# speeds up.", "+Fast" end, - on_lose = function(self, err) return "#Target# slows down.", "-Fast" end, + on_gain = function(self, err) return _t"#Target# speeds up.", _t"+Fast" end, + on_lose = function(self, err) return _t"#Target# slows down.", _t"-Fast" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("global_speed_add", eff.speed) end, @@ -3772,8 +3772,8 @@ newEffect{ newEffect{ name = "FEINT", image = "talents/feint.png", - desc = "Feint", - long_desc = function(self, eff) return ("The target gains 1 extra parry opportunity each turn, and its chance to fail each parry is reduced by %d%%."):format(eff.parry_efficiency*100) end, + desc = _t"Feint", + long_desc = function(self, eff) return ("The target gains 1 extra parry opportunity each turn, and its chance to fail each parry is reduced by %d%%."):tformat(eff.parry_efficiency*100) end, type = "physical", subtype = { tactical=true }, status = "beneficial", @@ -3786,14 +3786,14 @@ newEffect{ newEffect{ name = "MANA_CLASH", image = "talents/mana_clash.png", - desc = "Mana Clash", - long_desc = function(self, eff) return ("All damage you do also trigget a manaburn for %d%% of the damage done."):format(eff.power * 100) end, + desc = _t"Mana Clash", + long_desc = function(self, eff) return ("All damage you do also trigget a manaburn for %d%% of the damage done."):tformat(eff.power * 100) end, type = "physical", subtype = { antimagic=true }, status = "beneficial", parameters = { power=0.15 }, - on_gain = function(self, err) return "#Target# exudes antimagic forces.", true end, - on_lose = function(self, err) return "#Target# is no longer toxic to arcane users.", true end, + on_gain = function(self, err) return _t"#Target# exudes antimagic forces.", true end, + on_lose = function(self, err) return _t"#Target# is no longer toxic to arcane users.", true end, callbackOnDealDamage = function(self, eff, val, target, dead, death_note) if self._manaclashing then return end if not target.x or dead then return end @@ -3805,8 +3805,8 @@ newEffect{ newEffect{ name = "BULLSEYE", image = "talents/bullseye.png", - desc = "Bullseye", - long_desc = function(self, eff) return ("Increases attack speed by %d%%."):format(eff.power*100) end, + desc = _t"Bullseye", + long_desc = function(self, eff) return ("Increases attack speed by %d%%."):tformat(eff.power*100) end, type = "physical", subtype = { tactic=true }, status = "beneficial", @@ -3818,8 +3818,8 @@ newEffect{ newEffect{ name = "TRUESHOT", image = "talents/trueshot.png", - desc = "Trueshot", - long_desc = function(self, eff) return ("Increases attack speed by %d%%, grants infinite ammo, and causes all marking shots to have a 100%% increased chance to mark."):format(eff.power*100) end, + desc = _t"Trueshot", + long_desc = function(self, eff) return ("Increases attack speed by %d%%, grants infinite ammo, and causes all marking shots to have a 100%% increased chance to mark."):tformat(eff.power*100) end, type = "physical", subtype = { tactic=true }, status = "beneficial", @@ -3835,14 +3835,14 @@ newEffect{ newEffect{ name = "ESCAPE", image = "talents/escape.png", - desc = "Escape", - long_desc = function(self, eff) return ("Focusing on defense and mobility, reducing all damage taken by %d%%, stamina regeneration by %0.1f and movement speed by %d%%. Melee and ranged attacks will break this effect."):format(eff.power, eff.stamina, eff.speed) end, + desc = _t"Escape", + long_desc = function(self, eff) return ("Focusing on defense and mobility, reducing all damage taken by %d%%, stamina regeneration by %0.1f and movement speed by %d%%. Melee and ranged attacks will break this effect."):tformat(eff.power, eff.stamina, eff.speed) end, type = "physical", subtype = { tactic=true, speed=true }, status = "beneficial", parameters = {power=1000}, - on_gain = function(self, err) return "#Target# enters an evasive stance!.", "+Escape!" end, - on_lose = function(self, err) return "#Target# slows down.", "-Escape" end, + on_gain = function(self, err) return _t"#Target# enters an evasive stance!.", _t"+Escape!" end, + on_lose = function(self, err) return _t"#Target# slows down.", _t"-Escape" end, get_fractional_percent = function(self, eff) local d = game.turn - eff.start_turn return util.bound(360 - d / eff.possible_end_turns * 360, 0, 360) @@ -3875,13 +3875,13 @@ newEffect{ newEffect{ name = "SENTINEL", image = "talents/sentinel.png", - desc = "Sentinel", - long_desc = function(self, eff) return ("Target is watched, causing the next talent used to fail and trigger a counterattack."):format() end, + desc = _t"Sentinel", + long_desc = function(self, eff) return ("Target is watched, causing the next talent used to fail and trigger a counterattack."):tformat() end, type = "physical", subtype = { tactic=true }, status = "detrimental", - on_gain = function(self, err) return nil, "+Sentinel!" end, - on_lose = function(self, err) return nil, "-Sentinel" end, + on_gain = function(self, err) return nil, _t"+Sentinel!" end, + on_lose = function(self, err) return nil, _t"-Sentinel" end, do_proc = function(self, eff) eff.src:callTalent(eff.src.T_SENTINEL, "doShoot", eff) end, @@ -3899,8 +3899,8 @@ newEffect{ newEffect{ name = "RAPID_MOVEMENT", image = "talents/rapid_shot.png", - desc = "Rapid Movement", - long_desc = function(self, eff) return ("Increases movement speed by %d%%."):format(eff.power*100) end, + desc = _t"Rapid Movement", + long_desc = function(self, eff) return ("Increases movement speed by %d%%."):tformat(eff.power*100) end, type = "physical", subtype = { tactic=true }, status = "beneficial", @@ -3912,14 +3912,14 @@ newEffect{ newEffect{ name = "STICKY_PITCH", image = "talents/sticky_smoke.png", - desc = "Sticky Pitch", - long_desc = function(self, eff) return ("The target's global speed is reduced by %d%% and fire resistance by %d%%."):format(eff.slow, eff.resist) end, + desc = _t"Sticky Pitch", + long_desc = function(self, eff) return ("The target's global speed is reduced by %d%% and fire resistance by %d%%."):tformat(eff.slow, eff.resist) end, type = "physical", subtype = { slow=true }, status = "detrimental", parameters = { slow=0.1, resist=10 }, - on_gain = function(self, err) return "#Target# is covered in sticky, flammable pitch.", "+Pitch" end, - on_lose = function(self, err) return "#Target# is free from the pitch.", "-Pitch" end, + on_gain = function(self, err) return _t"#Target# is covered in sticky, flammable pitch.", _t"+Pitch" end, + on_lose = function(self, err) return _t"#Target# is free from the pitch.", _t"-Pitch" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("global_speed_add", -eff.slow) eff.resid = self:addTemporaryValue("resists", {[DamageType.FIRE] = -eff.resist}) @@ -3936,14 +3936,14 @@ newEffect{ newEffect{ name = "PUNCTURED_ARMOUR", image = "talents/piercing_ammunition.png", - desc = "Punctured Armour", - long_desc = function(self, eff) return ("Armour has been punctured, increasing all damage taken by %d%%."):format(eff.power) end, + desc = _t"Punctured Armour", + long_desc = function(self, eff) return ("Armour has been punctured, increasing all damage taken by %d%%."):tformat(eff.power) end, type = "physical", subtype = { sunder=true }, status = "detrimental", parameters = { power=20, }, - on_gain = function(self, err) return "#Target#'s armour is punctured!", "+Punctured Armour!" end, - on_lose = function(self, err) return "#Target#'s armour is more intact.", "-Punctured Armour" end, + on_gain = function(self, err) return _t"#Target#'s armour is punctured!", _t"+Punctured Armour!" end, + on_lose = function(self, err) return _t"#Target#'s armour is more intact.", _t"-Punctured Armour" end, activate = function(self, eff) self:effectTemporaryValue(eff, "resists", {all=-eff.power}) self:effectParticles(eff, {type="circle", args={oversize=1, a=220, base_rot=180, shader=true, appear=12, img="pierced_armour_debuff_aura", speed=0, radius=0}}) @@ -3952,14 +3952,14 @@ newEffect{ newEffect{ name = "LEECHING_POISON", image = "talents/leeching_poison.png", - desc = "Leeching Poison", - long_desc = function(self, eff) return ("The target is poisoned, doing %0.2f nature damage per turn and restoring life to the attacker equal to the damage dealt."):format(eff.power) end, + desc = _t"Leeching Poison", + long_desc = function(self, eff) return ("The target is poisoned, doing %0.2f nature damage per turn and restoring life to the attacker equal to the damage dealt."):tformat(eff.power) end, type = "physical", subtype = { poison=true, nature=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10, heal=5}, - on_gain = function(self, err) return "#Target# is poisoned!", "+Leeching Poison" end, - on_lose = function(self, err) return "#Target# is no longer poisoned.", "-Leeching Poison" end, + on_gain = function(self, err) return _t"#Target# is poisoned!", _t"+Leeching Poison" end, + on_lose = function(self, err) return _t"#Target# is no longer poisoned.", _t"-Leeching Poison" end, -- Damage each turn on_timeout = function(self, eff) if self:attr("purify_poison") then @@ -3974,14 +3974,14 @@ newEffect{ newEffect{ name = "MAIM", image = "effects/deep_wound.png", - desc = "Maim", - long_desc = function(self, eff) return ("The target is maimed, doing %0.2f physical damage per turn. All damage it does is reduced by %d%%."):format(eff.power, eff.reduce) end, + desc = _t"Maim", + long_desc = function(self, eff) return ("The target is maimed, doing %0.2f physical damage per turn. All damage it does is reduced by %d%%."):tformat(eff.power, eff.reduce) end, type = "physical", subtype = { cut=true }, no_ct_effect = true, status = "detrimental", parameters = {power=10, reduce=5}, - on_gain = function(self, err) return "#Target# is maimed!", "+Maim" end, - on_lose = function(self, err) return "#Target# is no longer maimed.", "-Maim" end, + on_gain = function(self, err) return _t"#Target# is maimed!", _t"+Maim" end, + on_lose = function(self, err) return _t"#Target# is no longer maimed.", _t"-Maim" end, -- Damage each turn on_timeout = function(self, eff) if self:canBe("cut") then DamageType:get(DamageType.PHYSICAL).projector(eff.src, self.x, self.y, DamageType.PHYSICAL, eff.power) end @@ -4001,14 +4001,14 @@ newEffect{ newEffect{ name = "SNIPE", image = "talents/snipe.png", - desc = "Snipe", - long_desc = function(self, eff) return ("The target is preparing a deadly sniper shot."):format() end, + desc = _t"Snipe", + long_desc = function(self, eff) return ("The target is preparing a deadly sniper shot."):tformat() end, type = "physical", subtype = { tactic=true }, status = "beneficial", parameters = { power=50 }, - on_gain = function(self, err) return "#Target# takes aim...", "+Snipe" end, - on_lose = function(self, err) return "#Target# is no longer aiming.", "-Snipe" end, + on_gain = function(self, err) return _t"#Target# takes aim...", _t"+Snipe" end, + on_lose = function(self, err) return _t"#Target# is no longer aiming.", _t"-Snipe" end, activate = function(self, eff) self:effectTemporaryValue(eff, "negative_status_effect_immune", 1) self:effectTemporaryValue(eff, "incoming_reduce", eff.power) @@ -4043,8 +4043,8 @@ newEffect{ newEffect{ name = "CONCEALMENT", image = "talents/concealment.png", - desc = "Concealment", - long_desc = function(self, eff) return ("The target is concealed, increasing sight and attack range by %d and chance to avoid damage by %d%%."):format(eff.sight, eff.power*eff.charges) end, + desc = _t"Concealment", + long_desc = function(self, eff) return ("The target is concealed, increasing sight and attack range by %d and chance to avoid damage by %d%%."):tformat(eff.sight, eff.power*eff.charges) end, type = "physical", subtype = { tactic=true }, status = "beneficial", @@ -4072,14 +4072,14 @@ newEffect{ newEffect{ name = "SHADOW_SMOKE", image = "talents/shadow_shot.png", - desc = "Shadow Smoke", - long_desc = function(self, eff) return ("The target is wrapped in disorientating smoke, reducing vision range by %d."):format(eff.sight) end, + desc = _t"Shadow Smoke", + long_desc = function(self, eff) return ("The target is wrapped in disorientating smoke, reducing vision range by %d."):tformat(eff.sight) end, type = "physical", subtype = { blind=true }, status = "detrimental", parameters = { sight=5 }, - on_gain = function(self, err) return "#Target# is surrounded by a thick smoke.", "+Shadow Smoke" end, - on_lose = function(self, err) return "The smoke around #target# dissipate.", "-Shadow Smoke" end, + on_gain = function(self, err) return _t"#Target# is surrounded by a thick smoke.", _t"+Shadow Smoke" end, + on_lose = function(self, err) return _t"The smoke around #target# dissipate.", _t"-Shadow Smoke" end, charges = function(self, eff) return -eff.sight end, activate = function(self, eff) if self:canBe("blind") then @@ -4101,8 +4101,8 @@ newEffect{ newEffect{ name = "SHADOWSTRIKE", image = "talents/shadowstrike.png", - desc = "Shadowstrike", - long_desc = function(self, eff) return ("The target's critical strike damage bonus is increased by %d%%."):format(eff.power) end, + desc = _t"Shadowstrike", + long_desc = function(self, eff) return ("The target's critical strike damage bonus is increased by %d%%."):tformat(eff.power) end, type = "physical", subtype = { darkness=true }, status = "beneficial", @@ -4117,17 +4117,17 @@ newEffect{ -- Premptive Chromatic resistance newEffect{ name = "CHROMATIC_RESONANCE", image = "shockbolt/object/artifact/ureslaks_molted_scales.png", - desc = "Chromatic Resonance", + desc = _t"Chromatic Resonance", long_desc = function(self, eff) local dt_descs = table.concatNice(eff.type_descs, ", ", ", or ") - return ("Preemptively reacts to %s damage, increasing the appropriate resistance by %d for 5 turns."):format(dt_descs, eff.power) + return ("Preemptively reacts to %s damage, increasing the appropriate resistance by %d for 5 turns."):tformat(dt_descs, eff.power) end, type = "physical", subtype = { nature=true, resist=true }, status = "beneficial", parameters = {power=15, resist_types={"FIRE", "COLD", "LIGHTNING", "NATURE", "DARKNESS"} }, - on_gain = function(self, err) return "#Target##OLIVE_DRAB# shimmers in multiple hues.", true end, - on_lose = function(self, err) return "#Target#'s#OLIVE_DRAB# multi-hued shimmer fades.", true end, + on_gain = function(self, err) return _t"#Target##OLIVE_DRAB# shimmers in multiple hues.", true end, + on_lose = function(self, err) return _t"#Target#'s#OLIVE_DRAB# multi-hued shimmer fades.", true end, callbackOnTakeDamageBeforeResists = function(self, eff, src, x, y, type, dam, state) if dam > 0 and src ~= self and not self:hasEffect(self.EFF_CHROMATIC_RESISTANCE) then for i, r_type in ipairs(eff.resist_types) do @@ -4156,11 +4156,11 @@ newEffect{ newEffect{ name = "CHROMATIC_RESISTANCE", image = "shockbolt/object/artifact/ureslaks_molted_scales.png", - desc = "Chromatic Resistance", + desc = _t"Chromatic Resistance", long_desc = function(self, eff) local dt = DamageType[eff.type] and DamageType:get(eff.type) local type_desc = dt and ((dt.text_color or "#aaaaaa#")..dt.name:capitalize().."#LAST# ") or "" - return ("%sresistance increased by %d%%."):format(type_desc, eff.power) + return ("%sresistance increased by %d%%."):tformat(type_desc, eff.power) end, type = "physical", subtype = { nature=true, resist=true }, @@ -4171,13 +4171,13 @@ newEffect{ local dt = DamageType[eff.type] and DamageType:get(eff.type) if dt then eff.dtype = dt - return "#Target##OLIVE_DRAB# resonates with "..(dt.text_color or "#aaaaaa#")..dt.name:capitalize().."#LAST# damage!", true + return ("#Target##OLIVE_DRAB# resonates with %s%s#LAST# damage!"):tformat(dt.text_color or "#aaaaaa#", dt.name:capitalize() ), true else eff.type = nil end end, on_lose = function(self, eff) if eff.dtype then - return "#Target##OLIVE_DRAB# no longer resonates with "..(eff.dtype.text_color or "#aaaaaa#")..eff.dtype.name:capitalize().."#LAST# damage.", true + return ("#Target##OLIVE_DRAB# no longer resonates with %s%s#LAST# damage!"):tformat(eff.dtype.text_color or "#aaaaaa#", eff.dtype.name:capitalize() ), true end end, activate = function(self, eff) @@ -4191,8 +4191,8 @@ newEffect{ newEffect{ name = "SWIFT_SHOT", image = "talents/skirmisher_swift_shot.png", - desc = "Swift Shot", - long_desc = function(self, eff) return ("Increases attack speed by %d%%."):format(eff.speed * 100) end, + desc = _t"Swift Shot", + long_desc = function(self, eff) return ("Increases attack speed by %d%%."):tformat(eff.speed * 100) end, type = "physical", subtype = { tactic=true }, status = "beneficial", @@ -4203,8 +4203,8 @@ newEffect{ } newEffect{ name = "CROOKED", image = "shockbolt/object/artifact/weapon_crooked_club.png", - desc = "Crooked", - long_desc = function(self, eff) return ("The target becomes more and more primitive, reducing accuracy and powers by %d"):format(eff.power*eff.stacks) end, + desc = _t"Crooked", + long_desc = function(self, eff) return ("The target becomes more and more primitive, reducing accuracy and powers by %d"):tformat(eff.power*eff.stacks) end, type = "physical", subtype = { }, status = "detrimental", @@ -4242,14 +4242,14 @@ newEffect{ name = "CROOKED", image = "shockbolt/object/artifact/weapon_crooked_c newEffect{ name = "ELDORAL", image = "talents/uncanny_reload.png", - desc = "Eldoral", - long_desc = function(self, eff) return ("Firing slings does not consume shots."):format() end, + desc = _t"Eldoral", + long_desc = function(self, eff) return ("Firing slings does not consume shots."):tformat() end, type = "physical", subtype = { }, status = "beneficial", parameters = { speed = 20, fatigue = 100}, - on_gain = function(self, err) return "#Target# is focused on firing.", "+Eldoral" end, - on_lose = function(self, err) return "#Target# is less focused.", "-Eldoral" end, + on_gain = function(self, err) return _t"#Target# is focused on firing.", _t"+Eldoral" end, + on_lose = function(self, err) return _t"#Target# is less focused.", _t"-Eldoral" end, activate = function(self, eff) self:effectTemporaryValue(eff, "infinite_ammo", 1) self:effectTemporaryValue(eff, "combat_physspeed", eff.speed/100) @@ -4259,14 +4259,14 @@ newEffect{ newEffect{ name = "SILENT_STEALTH", image = "talents/stealth.png", - desc = "Stealthed", - long_desc = function(self, eff) return ("Gain %d stealth power"):format(eff.power) end, + desc = _t"Stealthed", + long_desc = function(self, eff) return ("Gain %d stealth power"):tformat(eff.power) end, type = "physical", subtype = { }, status = "beneficial", parameters = { power = 30 }, - on_gain = function(self, err) return "#Target# is more stealthy.", "+Silent stealth" end, - on_lose = function(self, err) return "#Target# is visible again.", "-Silent stealth" end, + on_gain = function(self, err) return _t"#Target# is more stealthy.", _t"+Silent stealth" end, + on_lose = function(self, err) return _t"#Target# is visible again.", _t"-Silent stealth" end, activate = function(self, eff) self:effectTemporaryValue(eff, "stealth", eff.power) end, @@ -4274,13 +4274,13 @@ newEffect{ newEffect{ name = "FORGONE_VISION", image = "effects/blinded.png", - desc = "Blinded", - long_desc = function(self, eff) return "The target is blinded, unable to see anything." end, + desc = _t"Blinded", + long_desc = function(self, eff) return _t"The target is blinded, unable to see anything." end, type = "other", subtype = {}, status = "detrimental", parameters = {power = 2}, - on_lose = function(self, err) return "#Target# recovers sight.", "-Blind" end, + on_lose = function(self, err) return _t"#Target# recovers sight.", _t"-Blind" end, activate = function(self, eff) eff.tmpid = self:addTemporaryValue("blind", 1) eff.blind = self:addTemporaryValue("blind_immune", eff.power) --Lets the player control blinds for the duration-- @@ -4306,8 +4306,8 @@ newEffect{ newEffect{ name = "GIFT_WOODS", image = "talents/thaloren_wrath.png", - desc = "Gift of the Woods", - long_desc = function(self, eff) return ("Increases the effectiveness of all healing the target receives by %d%%."):format(eff.power * 100) end, + desc = _t"Gift of the Woods", + long_desc = function(self, eff) return ("Increases the effectiveness of all healing the target receives by %d%%."):tformat(eff.power * 100) end, type = "physical", subtype = { nature=true }, status = "beneficial", diff --git a/game/modules/tome/data/wda/eyal.lua b/game/modules/tome/data/wda/eyal.lua index 497f1622f900cda702b5a7f2fa8f2d144816b282..97cd4a43e50a31584503903bf2faa9d0fb76295b 100644 --- a/game/modules/tome/data/wda/eyal.lua +++ b/game/modules/tome/data/wda/eyal.lua @@ -38,7 +38,7 @@ end --------------------------------------------------------------------- -- Maj'Eyal --------------------------------------------------------------------- -if zone == "Maj'Eyal" then +if zone == _t"Maj'Eyal" then wda.cur_patrols = wda.cur_patrols or 0 wda.cur_hostiles = wda.cur_hostiles or 0 game.state.gone_west = true @@ -91,7 +91,7 @@ if zone == "Maj'Eyal" then --------------------------------------------------------------------- -- Var'Eyal (Far East) --------------------------------------------------------------------- -elseif zone == "Far East" then +elseif zone == _t"Far East" then wda.cur_patrols = wda.cur_patrols or 0 wda.cur_orc_patrols = wda.cur_orc_patrols or 0 wda.cur_hostiles = wda.cur_hostiles or 0 diff --git a/game/modules/tome/data/zones/abashed-expanse/grids.lua b/game/modules/tome/data/zones/abashed-expanse/grids.lua index 4db19edcdaff4861fe4c769109d677cf771f1a2e..2395ed13d29818e3a0093cda394f49af2462ab2e 100644 --- a/game/modules/tome/data/zones/abashed-expanse/grids.lua +++ b/game/modules/tome/data/zones/abashed-expanse/grids.lua @@ -31,7 +31,7 @@ newEntity{ base="FLOATING_ROCKS", define_as = "WORMHOLE", nice_tiler = false, if source_talent then st = game.player:getTalentFromId(source_talent) end if st and st.is_spell and game.party:hasMember(src) and not self.change_level then self.change_level = 1 - self.name = "stable wormhole" + self.name = _t"stable wormhole" game.logSeen(src, "#VIOLET#The wormhole absorbs energies and stabilizes. You can now use it to travel.") local q = game.player:hasQuest("start-archmage") if q then q:stabilized() end diff --git a/game/modules/tome/data/zones/abashed-expanse/npcs.lua b/game/modules/tome/data/zones/abashed-expanse/npcs.lua index f01303ca28b591d5d4b572fb427a0bac3887e640..200f46ace684d0fb2703bb391d261b1f5d78b28f 100644 --- a/game/modules/tome/data/zones/abashed-expanse/npcs.lua +++ b/game/modules/tome/data/zones/abashed-expanse/npcs.lua @@ -34,8 +34,8 @@ newEntity{ base="BASE_NPC_LOSGOROTH", define_as = "SPACIAL_DISTURBANCE", color=colors.VIOLET, resolvers.nice_tile{image="invis.png"}, resolvers.generic(function(e) if engine.Map.tiles.nicer_tiles then e:addParticles(engine.Particles.new("wormhole", 1, {image="shockbolt/npc/elemental_losgoroth_space_disturbance", speed=1})) end end), - desc = [[A hole in the fabric of space, it seems to be the source of the expanse instability.]], - killer_message = "and folded out of existence", + desc = _t[[A hole in the fabric of space, it seems to be the source of the expanse instability.]], + killer_message = _t"and folded out of existence", level_range = {7, nil}, exp_worth = 2, max_life = 150, life_rating = 10, fixed_rating = true, mana_regen = 7, diff --git a/game/modules/tome/data/zones/abashed-expanse/objects.lua b/game/modules/tome/data/zones/abashed-expanse/objects.lua index 497d9617b598a29dd4679e5a4b0d93d2b096fc73..fb888805716f3673e9c68df93a94a5ff2fdc0619 100644 --- a/game/modules/tome/data/zones/abashed-expanse/objects.lua +++ b/game/modules/tome/data/zones/abashed-expanse/objects.lua @@ -25,12 +25,12 @@ newEntity{ base = "BASE_LITE", define_as = "VOID_STAR", power_source = {arcane=true}, unique = true, name = "Void Star", image="object/artifact/void_star.png", - unided_name = "tiny black star", + unided_name = _t"tiny black star", level_range = {1, 10}, color = colors.GREY, encumber = 1, rarity = false, - desc = [[It looks like a very tiny star -- deep black -- and yet it somehow shines.]], + desc = _t[[It looks like a very tiny star -- deep black -- and yet it somehow shines.]], cost = 120, material_level = 2, diff --git a/game/modules/tome/data/zones/abashed-expanse/zone.lua b/game/modules/tome/data/zones/abashed-expanse/zone.lua index 447468a26acc8d61869b7e8feab764e96f373306..74aab929c4a0a49e8c94b446181e6d38f70073a9 100644 --- a/game/modules/tome/data/zones/abashed-expanse/zone.lua +++ b/game/modules/tome/data/zones/abashed-expanse/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Abashed Expanse", + name = _t"Abashed Expanse", level_range = {1, 5}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/ancient-elven-ruins/npcs.lua b/game/modules/tome/data/zones/ancient-elven-ruins/npcs.lua index 7a982888a61cd7265d174cff220c6c2f9f4baf10..253dfacda179d1d5784395d22d878ef280b41ba3 100644 --- a/game/modules/tome/data/zones/ancient-elven-ruins/npcs.lua +++ b/game/modules/tome/data/zones/ancient-elven-ruins/npcs.lua @@ -37,8 +37,8 @@ newEntity{ define_as = "GREATER_MUMMY_LORD", type = "undead", subtype = "mummy", unique = true, name = "Greater Mummy Lord", display = "Z", color=colors.VIOLET, - desc = [[The wrappings of this mummy radiate with so much power it feels like wind is blowing from them.]], - killer_message = "and raised as a soulless shuffling mummy", + desc = _t[[The wrappings of this mummy radiate with so much power it feels like wind is blowing from them.]], + killer_message = _t"and raised as a soulless shuffling mummy", level_range = {30, nil}, exp_worth = 2, max_life = 250, life_rating = 21, fixed_rating = true, max_stamina = 200, @@ -107,7 +107,7 @@ newEntity{ define_as = "GREATER_MUMMY_LORD", newEntity{ base = "BASE_NPC_MUMMY", allow_infinite_dungeon = true, name = "ancient elven mummy", color=colors.ANTIQUE_WHITE, - desc = [[An animated corpse in mummy wrappings.]], + desc = _t[[An animated corpse in mummy wrappings.]], level_range = {7, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(120,140), @@ -130,7 +130,7 @@ newEntity{ base = "BASE_NPC_MUMMY", newEntity{ base = "BASE_NPC_MUMMY", allow_infinite_dungeon = true, name = "animated mummy wrappings", color=colors.SLATE, display='[', image="object/mummy_wrappings.png", - desc = [[An animated set of mummy wrappings, without a corpse inside; it seems like it cannot move.]], + desc = _t[[An animated set of mummy wrappings, without a corpse inside; it seems like it cannot move.]], level_range = {7, nil}, exp_worth = 1, rarity = 4, max_life = resolvers.rngavg(20,40), life_rating=6, @@ -154,7 +154,7 @@ newEntity{ base = "BASE_NPC_MUMMY", newEntity{ base = "BASE_NPC_MUMMY", allow_infinite_dungeon = true, name = "rotting mummy", color=colors.TAN, - desc = [[A rotting animated corpse in mummy wrappings.]], + desc = _t[[A rotting animated corpse in mummy wrappings.]], level_range = {7, nil}, exp_worth = 1, rarity = 2, max_life = resolvers.rngavg(60,80), life_rating=9, @@ -177,7 +177,7 @@ newEntity{ base = "BASE_NPC_MUMMY", define_as = "GREATER_MUMMY", allow_infinite_dungeon = true, name = "greater mummy", color=colors.YELLOW, image = "npc/undead_mummy_greater_mummy.png", - desc = [[An animated corpse in mummy wrappings, both very well preserved.]], + desc = _t[[An animated corpse in mummy wrappings, both very well preserved.]], level_range = {20, nil}, exp_worth = 1, rank = 3, rarity = 8, diff --git a/game/modules/tome/data/zones/ancient-elven-ruins/objects.lua b/game/modules/tome/data/zones/ancient-elven-ruins/objects.lua index eedf1f87078d423d05d8cf3cc3469279f6a673d7..9c4045636571dba42b1891a58f854bb3bdd9460c 100644 --- a/game/modules/tome/data/zones/ancient-elven-ruins/objects.lua +++ b/game/modules/tome/data/zones/ancient-elven-ruins/objects.lua @@ -27,7 +27,7 @@ for i = 1, 3 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "ancient papyrus scroll", lore="ancient-elven-ruins-note-"..i, - desc = [[This seems to be an account of the last days of a great Shaloren mage.]], + desc = _t[[This seems to be an account of the last days of a great Shaloren mage.]], rarity = false, } end @@ -36,8 +36,8 @@ newEntity{ base = "BASE_MUMMY_WRAPPING", define_as = "BINDINGS_ETERNAL_NIGHT", power_source = {arcane=true}, unique = true, name = "Bindings of Eternal Night", image = "object/artifact/bindings_of_eternal_night.png", - unided_name = "blackened, slithering mummy wrappings", - desc = [[Woven through with fell magics of undeath, these bindings suck the light and life out of everything they touch. Any who don them will find themselves suspended in a nightmarish limbo between life and death.]], + unided_name = _t"blackened, slithering mummy wrappings", + desc = _t[[Woven through with fell magics of undeath, these bindings suck the light and life out of everything they touch. Any who don them will find themselves suspended in a nightmarish limbo between life and death.]], color = colors.DARK_GREY, level_range = {1, 50}, rarity = 20, -- not particularly rare, to be loaded only with mummy NPCs @@ -66,7 +66,7 @@ newEntity{ base = "BASE_MUMMY_WRAPPING", define_as = "BINDINGS_ETERNAL_NIGHT", set_list = { {"define_as","CROWN_ETERNAL_NIGHT"} }, set_desc = { - eternalnight = "A complementing item would be your crowning glory.", + eternalnight = _t"A complementing item would be your crowning glory.", }, on_set_complete = function(self, who) self.use_talent = { id = "T_ABYSSAL_SHROUD", level = 2, power = 47 } @@ -80,8 +80,8 @@ newEntity{ base = "BASE_LEATHER_CAP", define_as = "CROWN_ETERNAL_NIGHT", power_source = {arcane=true}, unique = true, name = "Crown of Eternal Night", image = "object/artifact/crown_of_eternal_night.png", - unided_name = "blackened crown", - desc = [[This crown looks useless, yet you can feel it is woven with fell magics of undeath. Maybe it has a use.]], + unided_name = _t"blackened crown", + desc = _t[[This crown looks useless, yet you can feel it is woven with fell magics of undeath. Maybe it has a use.]], color = colors.DARK_GREY, level_range = {1, 50}, cost = 100, @@ -98,7 +98,7 @@ newEntity{ base = "BASE_LEATHER_CAP", define_as = "CROWN_ETERNAL_NIGHT", set_list = { {"define_as","BINDINGS_ETERNAL_NIGHT"} }, set_desc = { - eternalnight = "You need to find something to bind its powers.", + eternalnight = _t"You need to find something to bind its powers.", }, on_set_complete = function(self, who) self:specialSetAdd({"wielder","lite"}, -1) diff --git a/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua b/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua index ca93e8e9910c035fa96b5dda7722ed886a5ea0c6..1caaca7f20a95d96b81ac89b7f467c00bf705b63 100644 --- a/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua +++ b/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Elven Ruins", + name = _t"Elven Ruins", level_range = {43,52}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/ardhungol/npcs.lua b/game/modules/tome/data/zones/ardhungol/npcs.lua index aa86f6dc567975480560bde2e52adf75c484b8fc..cfbe4ebb53c9e98efd3a7a691e2dc3a805fdf3f7 100644 --- a/game/modules/tome/data/zones/ardhungol/npcs.lua +++ b/game/modules/tome/data/zones/ardhungol/npcs.lua @@ -27,8 +27,8 @@ newEntity{ define_as = "UNGOLE", base = "BASE_NPC_SPIDER", allow_infinite_dungeon = true, name = "Ungolë", color=colors.VIOLET, unique = true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/spiderkin_spider_ungole.png", display_h=2, display_y=-1}}}, - desc = [[A huge spider, shrouded in darkness, her red glowing eyes darting to fix on you. She looks hungry.]], - killer_message = "and devoured alongside a Sun Paladin", + desc = _t[[A huge spider, shrouded in darkness, her red glowing eyes darting to fix on you. She looks hungry.]], + killer_message = _t"and devoured alongside a Sun Paladin", level_range = {30, nil}, exp_worth = 2, female = 1, max_life = 450, life_rating = 15, fixed_rating = true, @@ -67,7 +67,7 @@ newEntity{ define_as = "UNGOLE", base = "BASE_NPC_SPIDER", on_die = function(self, who) local Chat = require"engine.Chat" - local chat = Chat.new("ardhungol-end", {name="Sun Paladin Rashim"}, game.player:resolveSource()) + local chat = Chat.new("ardhungol-end", {name=_t"Sun Paladin Rashim"}, game.player:resolveSource()) chat:invoke() end, } @@ -75,7 +75,7 @@ newEntity{ define_as = "UNGOLE", base = "BASE_NPC_SPIDER", -- Now a couple humanoid spiderkins because ... well, you'll see later ! newEntity{ base = "BASE_NPC_SPIDER", subtype = "xhaiak", name = "xhaiak arachnomancer", color={0,0,0}, -- spider night, don't change the color - desc = [[A strange looking humanoid spiderkin, its body half covered by a light flowing robe. It looks like tiny spiders are crawling on his skin.]], + desc = _t[[A strange looking humanoid spiderkin, its body half covered by a light flowing robe. It looks like tiny spiders are crawling on his skin.]], resolvers.nice_tile{tall=1}, level_range = {38, nil}, exp_worth = 1, rarity = 2, @@ -105,7 +105,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", subtype = "shiaak", name = "shiaak venomblade", color=colors.GREEN, - desc = [[A strange looking humanoid, covered in black chitinous skin. He dual wields sinuous daggers and seems bent on plunging them in your body.]], + desc = _t[[A strange looking humanoid, covered in black chitinous skin. He dual wields sinuous daggers and seems bent on plunging them in your body.]], resolvers.nice_tile{tall=1}, level_range = {35, nil}, exp_worth = 1, rarity = 4, diff --git a/game/modules/tome/data/zones/ardhungol/objects.lua b/game/modules/tome/data/zones/ardhungol/objects.lua index a6f17fd0536476145b3fac5546226dc36ab1eca9..fbd0633a7465e4d8b777eaf4597c6bfaab51ca66 100644 --- a/game/modules/tome/data/zones/ardhungol/objects.lua +++ b/game/modules/tome/data/zones/ardhungol/objects.lua @@ -24,14 +24,14 @@ for i = 1, 3 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "diary page", lore="ardhungol-"..i, - desc = [[A page of a diary.]], + desc = _t[[A page of a diary.]], rarity = false, encumberance = 0, } newEntity{ base = "BASE_LORE", define_as = "NOTE4", name = "scrap of paper", lore="ardhungol-4", - desc = [[A scrap of paper.]], + desc = _t[[A scrap of paper.]], rarity = false, encumberance = 0, } @@ -40,15 +40,15 @@ end newEntity{ base = "BASE_ROD", power_source = {nature=true}, define_as = "ROD_SPYDRIC_POISON", - unided_name = "poison dripping wand", image = "object/artifact/rod_of_spydric_poison.png", + unided_name = _t"poison dripping wand", image = "object/artifact/rod_of_spydric_poison.png", name = "Rod of Spydric Poison", color=colors.LIGHT_GREEN, unique=true, - desc = [[This rod carved out of a giant spider fang continuously drips venom.]], + desc = _t[[This rod carved out of a giant spider fang continuously drips venom.]], cost = 50, elec_proof = true, max_power = 25, power_regen = 1, use_power = { name = function(self, who) return ("shoot a bolt of spydric poison out to range %d, dealing %0.2f nature damage (based on Magic) over %d turns while rendering the target unable to move"): - format(self.use_power.range, engine.interface.ActorTalents.damDesc(who, engine.DamageType.NATURE, self.use_power.damage(self, who)), self.use_power.duration) + tformat(self.use_power.range, engine.interface.ActorTalents.damDesc(who, engine.DamageType.NATURE, self.use_power.damage(self, who)), self.use_power.duration) end, power = 25, damage = function(self, who) return 200 + who:getMag() * 4 end, @@ -61,7 +61,7 @@ newEntity{ base = "BASE_ROD", local tg = self.use_power.target(self, who) local x, y = who:getTarget(tg) if not x or not y then return nil end - game.logSeen(who, "%s activates %s %s!", who.name:capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) + game.logSeen(who, "%s activates %s %s!", who:getName():capitalize(), who:his_her(), self:getName({no_add_name = true, do_color = true})) who:project(tg, x, y, engine.DamageType.SPYDRIC_POISON, {dam=self.use_power.damage(self, who), dur=self.use_power.duration}, {type="slime"}) return {id=true, used=true} end diff --git a/game/modules/tome/data/zones/ardhungol/zone.lua b/game/modules/tome/data/zones/ardhungol/zone.lua index 041b3714e5129f94e0e0bee767a0adbba138dd59..22457928ffc080e5e20fa68b9021030786fd46b9 100644 --- a/game/modules/tome/data/zones/ardhungol/zone.lua +++ b/game/modules/tome/data/zones/ardhungol/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Ardhungol", + name = _t"Ardhungol", level_range = {25, 32}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/arena-unlock/npcs.lua b/game/modules/tome/data/zones/arena-unlock/npcs.lua index 907a4c5e482b86b7efe52b2d4f040f53c9b7c318..244128e108a0eeebb3582d3401248da36f492ef2 100644 --- a/game/modules/tome/data/zones/arena-unlock/npcs.lua +++ b/game/modules/tome/data/zones/arena-unlock/npcs.lua @@ -40,7 +40,7 @@ newEntity{ name = "gladiator", ai = "tactical", ai_state = { ai_move = "move_complex", talent_in = 1 }, stats = { str=15, dex=15, mag=1, con=15 }, - desc = [[A menacing man in heavy armor, wielding a mace. He looks battle-hardened.]], + desc = _t[[A menacing man in heavy armor, wielding a mace. He looks battle-hardened.]], level_range = {5, 19}, exp_worth = 2, rarity = false, max_life = resolvers.rngavg(100,125), @@ -87,7 +87,7 @@ newEntity{ name = "halfling slinger", ai = "tactical", ai_state = { ai_move = "move_complex", talent_in = 1 }, stats = { str=10, dex=15, cun=15, con=8 }, - desc = [[A Halfling slinger. He seems adept at combat.]], + desc = _t[[A Halfling slinger. He seems adept at combat.]], level_range = {6, 20}, exp_worth = 1, rarity = false, max_life = resolvers.rngavg(100,110), @@ -139,7 +139,7 @@ newEntity{ name = "arcane blade", ai = "tactical", ai_state = { ai_move = "move_complex", talent_in = 1 }, stats = { str=20, dex=20, mag=8, con=16 }, - desc = [[A Human Arcane Blade. His body shows multiple scars from battle.]], + desc = _t[[A Human Arcane Blade. His body shows multiple scars from battle.]], level_range = {6, 21}, exp_worth = 2, rarity = false, max_life = resolvers.rngavg(100,130), @@ -161,7 +161,7 @@ newEntity{ name = "arcane blade", end, on_die = function (self) local Chat = require "engine.Chat" - local npc = {name="Cornac rogue"} + local npc = {name=_t"Cornac rogue"} local chat = Chat.new("arena-unlock", npc, game.player, {npc=npc}) chat:invoke("win") end diff --git a/game/modules/tome/data/zones/arena-unlock/zone.lua b/game/modules/tome/data/zones/arena-unlock/zone.lua index 01bad35ff7c55b74bcb4b672fa389f4d10832642..813bf330671ccc8d7f2ecffc3cc5aa516f5a5486 100644 --- a/game/modules/tome/data/zones/arena-unlock/zone.lua +++ b/game/modules/tome/data/zones/arena-unlock/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Derth (Southeast)", + name = _t"Derth (Southeast)", level_range = {5, 12}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/arena/npcs.lua b/game/modules/tome/data/zones/arena/npcs.lua index e444cb7d9dd4d32ae9f207e5847ca32ebe353af6..03c45531c0811e6ad348b789624ce4c9c6cf7a69 100644 --- a/game/modules/tome/data/zones/arena/npcs.lua +++ b/game/modules/tome/data/zones/arena/npcs.lua @@ -66,7 +66,7 @@ newEntity{ name = "skeletal rat", base = "BASE_NPC_RODENT", define_as = "SKELERAT", type = "undead", - desc = [[The diminutive skeleton of a giant rat, charged with evil energies. Nobody understands the usefulness of undead rodents until several of them come after you.]], + desc = _t[[The diminutive skeleton of a giant rat, charged with evil energies. Nobody understands the usefulness of undead rodents until several of them come after you.]], color = colors.GOLD, level_range = {3, 4}, exp_worth = 2, @@ -86,7 +86,7 @@ newEntity{ name = "homeless fighter", type = "humanoid", subtype = "human", color = colors.BROWN, life_rating = 4, - desc = "Will fight for a meal.", + desc = _t"Will fight for a meal.", equipment = resolvers.equip{ { type="weapon", force_drop=true, autoreq = true }, { type="armor", force_drop=true, autoreq = true }, @@ -104,7 +104,7 @@ newEntity{ name = "golden crystal", base = "BASE_NPC_CRYSTAL", define_as = "GOLDCRYSTAL", color=colors.GOLD, image = false, - desc = "A formation of golden crystal. It emits a golden radiance equalling the sun itself.", + desc = _t"A formation of golden crystal. It emits a golden radiance equalling the sun itself.", level_range = {1, 99}, exp_worth = 2, rank = 3, @@ -126,7 +126,7 @@ newEntity{ name = "master alchemist", life_rating = 8, stats = { str = 12, dex = 20, cun = 5, mag = 20, con = 10 }, - desc = [[Deadly fighters using explosive gems to attack.]], + desc = _t[[Deadly fighters using explosive gems to attack.]], level_range = {15, nil}, exp_worth = 2, rarity = 10, rank = 3, @@ -165,7 +165,7 @@ newEntity{ name = "multihued wyrmic", shader = "quad_hue", resolvers.drops{chance=100, nb=3, {type="scroll"} }, stats = { str = 20, dex = 20, mag = 20, con = 9, wil = 15 }, - desc = [[A powerful wyrmic with mastery over several elements.]], + desc = _t[[A powerful wyrmic with mastery over several elements.]], level_range = {20, nil}, exp_worth = 2, rarity = 10, rank = 3, @@ -202,7 +202,7 @@ newEntity{ name = "master slinger", rank = 3, autolevel = "slinger", stats = { str=11, dex=15, cun = 15, mag=1, con=13 }, - desc = [[Expert slingers on hire by the arena. They are great at their jobs.]], + desc = _t[[Expert slingers on hire by the arena. They are great at their jobs.]], level_range = {12, nil}, exp_worth = 2, rarity = 10, max_life = resolvers.rngavg(100,110), @@ -234,7 +234,7 @@ newEntity{ name = "gladiator", rank = 3, stats = { str=20, dex=10, mag=1, con=16 }, - desc = [[Mercenaries hired by the arena for the sole purpose of entertainment. They make a living beating people up.]], + desc = _t[[Mercenaries hired by the arena for the sole purpose of entertainment. They make a living beating people up.]], level_range = {7, nil}, exp_worth = 2, rarity = 10, max_life = resolvers.rngavg(80,100), @@ -258,7 +258,7 @@ newEntity{ name = "reaver", type = "humanoid", subtype = "human", color=colors.GOLD, stats = { str = 20, dex = 20, mag = 20, con = 9, wil = 15 }, - desc = [[A warrior of death.]], + desc = _t[[A warrior of death.]], level_range = {25, nil}, exp_worth = 2, rarity = 10, rank = 3, @@ -289,7 +289,7 @@ newEntity{ name = "reaver", newEntity{ name = "headless horror", base = "BASE_NPC_HORROR", define_as = "HEADLESSHORROR", color=colors.GOLD, - desc ="A headless gangly humanoid with a large distended stomach. Was captured and tamed by the first master of the arena.", + desc =_t"A headless gangly humanoid with a large distended stomach. Was captured and tamed by the first master of the arena.", level_range = {30, nil}, exp_worth = 1, rarity = 3, rank = 3, @@ -329,7 +329,7 @@ newEntity{ name = "headless horror", if not eye.dead then eye:die(src) nb = nb + 1 end end if nb > 0 then - game.logSeen(self, "#AQUAMARINE#As %s falls all its eyes fall to the ground!", self.name) + game.logSeen(self, "#AQUAMARINE#As %s falls all its eyes fall to the ground!", self:getName()) end end, } @@ -342,7 +342,7 @@ newEntity{ name = "Ryal", color=colors.VIOLET, define_as = "ARENA_BOSS_RYAL", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_ryal.png", display_h=2, display_y=-1}}}, - desc = "A gargantuan bone giant resembling a wingless wyrm. He is fully sentient and surprisingly fast.", + desc = _t"A gargantuan bone giant resembling a wingless wyrm. He is fully sentient and surprisingly fast.", rank = 4, unique = true, resolvers.equip{ {type="weapon", subtype="trident", autoreq=true, forbid_power_source={antimagic=true}, special_rarity="trident_rarity"}, @@ -375,7 +375,7 @@ newEntity{ name = "Fryjia Loren", type = "humanoid", subtype = "human", display = "@", color=colors.VIOLET, - desc = [[A young girl with skin pale as snow. She is small, but deadly in battle, unleashing a constant barrage of ice shards.]], + desc = _t[[A young girl with skin pale as snow. She is small, but deadly in battle, unleashing a constant barrage of ice shards.]], level_range = {12, nil}, exp_worth = 3, rank = 4, unique = true, size_category = 2, @@ -433,7 +433,7 @@ newEntity{ name = "Riala Shalarak", type = "humanoid", subtype = "human", display = "@", color=colors.VIOLET, - desc = [[A strong female magician. Years of experience make her a dangerous combatant.]], + desc = _t[[A strong female magician. Years of experience make her a dangerous combatant.]], level_range = {25, nil}, exp_worth = 3, rank = 4, unique = true, size_category = 3, @@ -480,7 +480,7 @@ newEntity{ name = "Valfren Loren", display = "@", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_valfred_loren.png", display_h=2, display_y=-1}}}, - desc = [[A massive suit of armor with a massive axe containing a massively cursed person. He is cursed to fight eternally.]], + desc = _t[[A massive suit of armor with a massive axe containing a massively cursed person. He is cursed to fight eternally.]], level_range = {16, nil}, exp_worth = 3, rank = 4, unique = true, size_category = 4, @@ -525,7 +525,7 @@ newEntity{ name = "Rej Arkatis", display = "@", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_rej_arkatis.png", display_h=2, display_y=-1}}}, - desc = [[A Cornac fighter of respectable talent. He emerged from nowhere and became the true master of fighting.]], + desc = _t[[A Cornac fighter of respectable talent. He emerged from nowhere and became the true master of fighting.]], level_range = {1, nil}, exp_worth = 3, rank = 5, unique = true, lite = -5, size_category = 3, @@ -579,7 +579,7 @@ newEntity{ name = "slinger", type = "humanoid", subtype = "human", color=colors.UMBER, life_rating = 8, stats = { str = 7, dex = 10, cun = 10, mag = 1, con = 7 }, - desc = [[Ranged fighters coming to the arena looking for wealth and glory, just like you.]], + desc = _t[[Ranged fighters coming to the arena looking for wealth and glory, just like you.]], level_range = {4, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(80,95), @@ -602,7 +602,7 @@ newEntity{ name = "high slinger", type = "humanoid", subtype = "human", color=colors.DARK_UMBER, life_rating = 8, stats = { str = 7, dex = 10, cun = 10, mag = 1, con = 7 }, - desc = [[Ranged fighters coming to the arena looking for wealth and glory, just like you.]], + desc = _t[[Ranged fighters coming to the arena looking for wealth and glory, just like you.]], level_range = {4, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(80,95), @@ -629,7 +629,7 @@ newEntity{ name = "alchemist", life_rating = 8, stats = { str = 7, dex = 11, cun = 1, mag = 11, con = 6 }, - desc = [[Deadly fighters using explosive gems to attack.]], + desc = _t[[Deadly fighters using explosive gems to attack.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = 60, @@ -663,7 +663,7 @@ newEntity{ name = "blood mage", life_rating = 4, stats = { str = 7, dex = 11, cun = 1, mag = 11, con = 6 }, - desc = [[A man dressed in black robes. You feel weak as you hear his ominous chanting.]], + desc = _t[[A man dressed in black robes. You feel weak as you hear his ominous chanting.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = 40, @@ -688,7 +688,7 @@ newEntity{ name = "hexer", life_rating = 1, stats = { str = 7, dex = 11, cun = 1, mag = 15, con = 6 }, - desc = [[A man dressed in black robes. You feel a thousand curses being put on you.]], + desc = _t[[A man dressed in black robes. You feel a thousand curses being put on you.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = 10, @@ -714,7 +714,7 @@ newEntity{ name = "rogue", life_rating = 8, lite = -1, stats = { str = 7, dex = 10, cun = 28, mag = 1, con = 7 }, - desc = [[Stealthy fighters trying to achieve victory with trickery. Be careful or they will steal your sight!]], + desc = _t[[Stealthy fighters trying to achieve victory with trickery. Be careful or they will steal your sight!]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = 60, @@ -744,7 +744,7 @@ newEntity{ name = "trickster", life_rating = 8, lite = -1, stats = { str = 15, dex = 28, cun = 28, mag = 1, con = 7 }, - desc = [[Stealthy ranged fighters trying to achieve victory with trickery. Be careful or they will shoot your heart!]], + desc = _t[[Stealthy ranged fighters trying to achieve victory with trickery. Be careful or they will shoot your heart!]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = 60, @@ -777,7 +777,7 @@ newEntity{ name = "shadowblade", life_rating = 10, lite = -2, stats = { str = 7, dex = 10, cun = 28, mag = 1, con = 7 }, - desc = [[Stealthy fighters trying to achieve victory with trickery. Be careful or they will steal your life!]], + desc = _t[[Stealthy fighters trying to achieve victory with trickery. Be careful or they will steal your life!]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = 100, @@ -807,7 +807,7 @@ newEntity{ name = "fire wyrmic", color=colors.RED, resolvers.drops{chance=30, nb=1, {type="scroll"}}, stats = { str = 10, dex = 10, mag = 10, con = 9, wil = 15}, - desc = [[A fire wyrmic aspiring to win the tournament. He comes paired with an ice wyrmic.]], + desc = _t[[A fire wyrmic aspiring to win the tournament. He comes paired with an ice wyrmic.]], level_range = {1, nil}, exp_worth = 1, autolevel = "wyrmic", rarity = 1, max_life = resolvers.rngavg(90,105), @@ -831,7 +831,7 @@ newEntity{ name = "ice wyrmic", color=colors.BLUE, resolvers.drops{chance=30, nb=1, {type="scroll"}}, stats = { str = 10, dex = 10, mag = 10, con = 9, wil = 15}, - desc = [[An ice wyrmic aspiring to win the tournament. He comes paired with a fire wyrmic.]], + desc = _t[[An ice wyrmic aspiring to win the tournament. He comes paired with a fire wyrmic.]], level_range = {1, nil}, exp_worth = 1, autolevel = "wyrmic", rarity = 1, female = true, @@ -856,7 +856,7 @@ newEntity{ name = "sand wyrmic", color = {r = 204, g = 255, b = 95}, resolvers.drops{chance=30, nb=1, {type="scroll"}}, stats = { str = 10, dex = 10, mag = 10, con = 9, wil = 15}, - desc = [[A sand wyrmic aspiring to win the tournament. He comes paired with a storm wyrmic.]], + desc = _t[[A sand wyrmic aspiring to win the tournament. He comes paired with a storm wyrmic.]], level_range = {1, nil}, exp_worth = 1, autolevel = "wyrmic", rarity = 1, max_life = resolvers.rngavg(90,105), @@ -883,7 +883,7 @@ newEntity{ name = "storm wyrmic", color=colors.WHITE, resolvers.drops{chance=30, nb=1, {type="scroll"}}, stats = { str = 10, dex = 10, mag = 10, con = 9, wil = 15}, - desc = [[A storm wyrmic aspiring to win the tournament. He comes paired with a sand wyrmic.]], + desc = _t[[A storm wyrmic aspiring to win the tournament. He comes paired with a sand wyrmic.]], level_range = {1, nil}, exp_worth = 1, autolevel = "wyrmic", rarity = 1, female = true, @@ -911,7 +911,7 @@ newEntity{ name = "high gladiator", life_rating = 11, stats = { str=15, dex=15, mag=1, con=15, wil=20 }, - desc = [[Mercenaries hired by the arena for the sole purpose of entertainment. They make a living beating people up.]], + desc = _t[[Mercenaries hired by the arena for the sole purpose of entertainment. They make a living beating people up.]], level_range = {14, nil}, exp_worth = 1, rarity = 10, max_life = 90, @@ -942,7 +942,7 @@ newEntity{ name = "great gladiator", life_rating = 12, stats = { str=20, dex=20, mag=5, con=15, wil=25 }, - desc = [[Mercenaries hired by the arena for the sole purpose of entertainment. They make a living beating people up.]], + desc = _t[[Mercenaries hired by the arena for the sole purpose of entertainment. They make a living beating people up.]], level_range = {19, nil}, exp_worth = 2, rarity = 10, max_life = 120, @@ -971,7 +971,7 @@ newEntity{ name = "martyr", life_rating = 12, positive_regen = 2, stats = { str=15, dex=15, mag=20, con=10, wil=15 }, - desc = [[A devout soldier.]], + desc = _t[[A devout soldier.]], level_range = {15, nil}, exp_worth = 2, rarity = 10, max_life = 200, @@ -1001,7 +1001,7 @@ newEntity{ name = "anorithil", life_rating = 12, stats = { str=10, dex=10, mag=30, con=10, wil=15 }, - desc = [[Warriors from afar. They use the power of light and darkness against you!]], + desc = _t[[Warriors from afar. They use the power of light and darkness against you!]], level_range = {15, nil}, exp_worth = 2, rarity = 10, max_life = 120, @@ -1030,7 +1030,7 @@ newEntity{ name = "sun paladin", life_rating = 12, stats = { str=20, dex=20, mag=15, con=10, wil=15 }, - desc = [[Warriors from afar. They wield the power of light, and a mean sword.]], + desc = _t[[Warriors from afar. They wield the power of light, and a mean sword.]], level_range = {15, nil}, exp_worth = 2, rarity = 10, max_life = 150, @@ -1061,7 +1061,7 @@ newEntity{ name = "star crusader", life_rating = 10, stats = { str=25, dex=25, mag=25, con=8, wil=25 }, - desc = [[Warriors from afar. They wield the power of light, and a mean sword. Darkness, too.]], + desc = _t[[Warriors from afar. They wield the power of light, and a mean sword. Darkness, too.]], level_range = {20, nil}, exp_worth = 2, rarity = 10, max_life = 150, diff --git a/game/modules/tome/data/zones/arena/objects.lua b/game/modules/tome/data/zones/arena/objects.lua index 5ab9861f9455cc3ff6c7cf80da96594f8d23137f..022734ca42fcf5e7e7af45a3a5702137f84d3df5 100644 --- a/game/modules/tome/data/zones/arena/objects.lua +++ b/game/modules/tome/data/zones/arena/objects.lua @@ -23,7 +23,7 @@ local Talents = require "engine.interface.ActorTalents" newEntity{ base = "BASE_LORE", define_as = "ARENA_SCORING", name = "Arena for dummies", lore="arena-scoring", - desc = [[A note explaining the arena's scoring rules. Someone must have dropped it.]], + desc = _t[[A note explaining the arena's scoring rules. Someone must have dropped it.]], rarity = false, encumberance = 0, } @@ -35,7 +35,7 @@ newEntity{ define_as = "ARENA_BOOTS_DISE", name = "a pair of leather boots of di add_name = " (#ARMOR#)#CHARGES#", display = "]", color=colors.UMBER, image = resolvers.image_material("boots", "leather"), encumber = 2, - desc = [[A pair of boots made of leather. They seem to be of exceptional quality.]], + desc = _t[[A pair of boots made of leather. They seem to be of exceptional quality.]], suffix=true, instant_resolve=true, egoed = true, greater_ego = 1, @@ -58,7 +58,7 @@ newEntity{ define_as = "ARENA_BOOTS_PHAS", name = "a pair of leather boots of ph add_name = " (#ARMOR#)#CHARGES#", display = "]", color=colors.UMBER, image = resolvers.image_material("boots", "leather"), encumber = 2, - desc = [[A pair of boots made of leather. They seem to be of exceptional quality.]], + desc = _t[[A pair of boots made of leather. They seem to be of exceptional quality.]], suffix=true, instant_resolve=true, egoed = true, greater_ego = 1, @@ -72,7 +72,7 @@ newEntity{ define_as = "ARENA_BOOTS_PHAS", name = "a pair of leather boots of ph }, max_power = 25, power_regen = 1, use_power = { - name = function(self, who) return ("blink to a nearby random location within range %d (based on Magic)"):format(self.use_power.range(self, who)) end, + name = function(self, who) return ("blink to a nearby random location within range %d (based on Magic)"):tformat(self.use_power.range(self, who)) end, power = 15, range = function(self, who) return 10 + who:getMag(5) end, use = function(self, who) @@ -80,7 +80,7 @@ newEntity{ define_as = "ARENA_BOOTS_PHAS", name = "a pair of leather boots of ph who:teleportRandom(who.x, who.y, self.use_power.range(self, who)) game.level.map:particleEmitter(who.x, who.y, 1, "teleport") game:playSoundNear(who, "talents/teleport") - game.logSeen(who, "%s uses %s!", who.name:capitalize(), self:getName{no_count=true, no_add_name=true}) + game.logSeen(who, "%s uses %s!", who:getName():capitalize(), self:getName{no_count=true, no_add_name=true}) return {id=true, used=true} end} } @@ -92,7 +92,7 @@ newEntity{ define_as = "ARENA_BOOTS_RUSH", name = "a pair of leather boots of ru add_name = " (#ARMOR#)#CHARGES#", display = "]", color=colors.UMBER, image = resolvers.image_material("boots", "leather"), encumber = 2, - desc = [[A pair of boots made of leather. They seem to be of exceptional quality.]], + desc = _t[[A pair of boots made of leather. They seem to be of exceptional quality.]], suffix=true, instant_resolve=true, egoed = true, rarity = false, diff --git a/game/modules/tome/data/zones/arena/zone.lua b/game/modules/tome/data/zones/arena/zone.lua index 73b31686912af803aa8c66fa23b8610794f2ee0e..adee7bacdb1d1e35fbdad88bcb36949178808ade 100644 --- a/game/modules/tome/data/zones/arena/zone.lua +++ b/game/modules/tome/data/zones/arena/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "The Arena", + name = _t"The Arena", level_range = {1, 50}, level_scheme = "player", max_level = 1, @@ -312,8 +312,8 @@ return { if newRank == 13 then world:gainAchievement("XXX_THE_DESTROYER", game.player) elseif newRank == 24 then world:gainAchievement("GRAND_MASTER", game.player) end - game.flyers:add(x, y, 90, 0, -0.5, "RANK UP!!", { 2, 57, 185 }, true) - game.log("#LIGHT_GREEN#The public is pleased by your performance! You now have the rank of #WHITE#"..game.level.arena.ranks[newRank].."#LIGHT_GREEN#!") + game.flyers:add(x, y, 90, 0, -0.5, _t"RANK UP!!", { 2, 57, 185 }, true) + game.log("#LIGHT_GREEN#The public is pleased by your performance! You now have the rank of #WHITE#%s#LIGHT_GREEN#!", game.level.arena.ranks[newRank]) end end, @@ -323,8 +323,8 @@ return { local x, y = game.level.map:getTileToScreen(game.player.x, game.player.y, true) local b = (k * 0.035) + 0.04 game.level.arena.raiseRank(b) - game.flyers:add(x, y, 90, 0.5, 0, k.." kills!", { 2, 57, 185 }, false) - game.log("#YELLOW#You killed "..k.." enemies in a single turn! The public is excited!") + game.flyers:add(x, y, 90, 0.5, 0, ("%d kills!"):tformat(k), { 2, 57, 185 }, false) + game.log("#YELLOW#You killed %d enemies in a single turn! The public is excited!", k) if k >= 4 and k < 6 then local drop = game.zone:makeEntity(game.level, "object", {tome = { ego=30, double_ego=15, greater=7, greater_normal=1 }}, nil, true) game.zone:addEntity(game.level, drop, "object", game.player.x, game.player.y) @@ -346,7 +346,7 @@ return { initWave = function (val) --Clean up and start a new wave. if val > 20 then --If the player has more than 20 turns of rest, clean up all items lying around. game.level.arena.clearItems = true - game.log("#YELLOW#Items lying around will disappear in #WHITE#"..val.."#YELLOW# turns!#LAST#") + game.log("#YELLOW#Items lying around will disappear in #WHITE#%d#YELLOW# turns!#LAST#", val) end game.level.arena.dangerTop = game.level.arena.dangerTop + (2 + math.floor(game.level.arena.currentWave * 0.05)) game.level.arena.currentWave = game.level.arena.currentWave + 1 @@ -400,11 +400,11 @@ return { game.player:gainExp(expAward) game.player:incMoney(game.level.arena.bonusMultiplier) game.level.arena.score = game.level.arena.score + game.level.arena.bonus - game.flyers:add(x, y, 90, 0, -1, "Round Clear! +"..expAward.." EXP!", { 2, 57, 185 }, true) - game.log(col.."Wave clear!") - game.log(col.."Clear bonus: "..hgh..clearBonus..col.."! Score bonus: "..hgh..scoreBonus..col.."! Danger bonus: "..hgh..dangerBonus..col.."! Rank bonus: "..hgh..rankBonus..col.."!") - game.log(col.."Your experience increases by"..hgh..expAward..col.."!") - game.log(col.."You earn "..game.level.arena.bonusMultiplier.." gold for your victory!") + game.flyers:add(x, y, 90, 0, -1, ("Round Clear! +%s EXP!"):tformat(expAward), { 2, 57, 185 }, true) + game.log("%sWave clear!", col) + game.log("%sClear bonus: %s%s%s! Score bonus: %s%s%s! Danger bonus: %s%s%s! Rank bonus: %s%s%s!", col, hgh, clearBonus, col, hgh, scoreBonus, col, hgh, dangerBonus, col, hgh, rankBonus, col) + game.log("%sYour experience increases by %s%s%s!", hgh, expAward, col) + game.log("%sYou earn %s gold for your victory!", game.level.arena.bonusMultiplier) game.player.changed = true end, @@ -446,7 +446,7 @@ return { end, } local Chat = require "engine.Chat" - local chat = Chat.new("arena-start", {name="Arena mode"}, game.player, {text = level.arena.printRankings()}) + local chat = Chat.new("arena-start", {name=_t"Arena mode"}, game.player, {text = level.arena.printRankings()}) chat:invoke() end } \ No newline at end of file diff --git a/game/modules/tome/data/zones/blighted-ruins/npcs.lua b/game/modules/tome/data/zones/blighted-ruins/npcs.lua index e059810481bcc024ad2d6b87f4c0bacb836dfb29..f46872adcfeb8b5cdb1cca0013193e688c119e68 100644 --- a/game/modules/tome/data/zones/blighted-ruins/npcs.lua +++ b/game/modules/tome/data/zones/blighted-ruins/npcs.lua @@ -31,7 +31,7 @@ newEntity{ type = "humanoid", subtype = "human", display = "p", color=colors.DARK_GREY, name = "Necromancer", color=colors.DARK_GREY, - desc = [[A Human dressed in black robes. He mumbles in a harsh tongue. He seems to think you are his slave.]], + desc = _t[[A Human dressed in black robes. He mumbles in a harsh tongue. He seems to think you are his slave.]], level_range = {1, nil}, exp_worth = 1, combat = { dam=resolvers.rngavg(5,12), atk=2, apr=6, physspeed=2 }, @@ -73,7 +73,7 @@ newEntity{ newEntity{ base = "BASE_NPC_BONE_GIANT", define_as = "HALF_BONE_GIANT", allow_infinite_dungeon = true, name = "Half-Finished Bone Giant", color=colors.VIOLET, unique=true, - desc = [[A towering creature, made from the bones of hundreds of dead bodies. It is covered by an unholy aura. + desc = _t[[A towering creature, made from the bones of hundreds of dead bodies. It is covered by an unholy aura. This specimen looks like it was hastily assembled and is not really complete yet.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_half_finished_bone_giant.png", display_h=2, display_y=-1}}}, level_range = {7, nil}, exp_worth = 1, @@ -126,7 +126,7 @@ This specimen looks like it was hastily assembled and is not really complete yet newEntity{ base = "BASE_NPC_HORROR_UNDEAD", name = "fleshy experiment", color=colors.DARK_GREEN, - desc ="This pile of rotting flesh twitches and makes horrid noises.", + desc =_t"This pile of rotting flesh twitches and makes horrid noises.", level_range = {1, 5}, exp_worth = 1, rarity = 1, rank = 2, @@ -157,7 +157,7 @@ newEntity{ base = "BASE_NPC_HORROR_UNDEAD", newEntity{ base = "BASE_NPC_HORROR_UNDEAD", name = "boney experiment", color=colors.WHITE, - desc ="This pile of bones appears to move on its own, but it can't seem to organise itself into something dangerous.", + desc =_t"This pile of bones appears to move on its own, but it can't seem to organise itself into something dangerous.", level_range = {1, 5}, exp_worth = 1, rarity = 1, rank = 2, @@ -189,7 +189,7 @@ newEntity{ base = "BASE_NPC_HORROR_UNDEAD", newEntity{ base = "BASE_NPC_HORROR_UNDEAD", name = "sanguine experiment", color=colors.RED, - desc ="It looks like a giant blood clot. Is that what its creator intended?", + desc =_t"It looks like a giant blood clot. Is that what its creator intended?", level_range = {1, 5}, exp_worth = 1, rarity = 1, rank = 2, life_rating = 10, diff --git a/game/modules/tome/data/zones/blighted-ruins/objects.lua b/game/modules/tome/data/zones/blighted-ruins/objects.lua index 4468fd3ee4433ca86210b1224b843dc2d92d69d7..3a171d1ab52f621242f3b195007811d1cf99754e 100644 --- a/game/modules/tome/data/zones/blighted-ruins/objects.lua +++ b/game/modules/tome/data/zones/blighted-ruins/objects.lua @@ -25,12 +25,12 @@ newEntity{ define_as = "CLOAK_DECEPTION", unique = true, quest=true, slot = "CLOAK", type = "armor", subtype="cloak", - unided_name = "black cloak", image = "object/artifact/black_cloak.png", + unided_name = _t"black cloak", image = "object/artifact/black_cloak.png", moddable_tile = "cloak_%s_05", moddable_tile_hood = true, name = "Cloak of Deception", display = ")", color=colors.DARK_GREY, encumber = 1, - desc = [[A black cloak, with subtle illusion enchantments woven into its very fabric.]], + desc = _t[[A black cloak, with subtle illusion enchantments woven into its very fabric.]], wielder = { combat_spellpower = 5, @@ -64,7 +64,7 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "journal page", lore="blighted-ruins-note-"..i, - desc = [[A paper scrap, left by the Necromancer.]], + desc = _t[[A paper scrap, left by the Necromancer.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/blighted-ruins/zone.lua b/game/modules/tome/data/zones/blighted-ruins/zone.lua index f6531695714816c9fd7ffd48bd25afcb9f8cc233..2de6869a9eb56132d065805f40c5ddc6283322f6 100644 --- a/game/modules/tome/data/zones/blighted-ruins/zone.lua +++ b/game/modules/tome/data/zones/blighted-ruins/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Blighted Ruins", + name = _t"Blighted Ruins", level_range = {1, 5}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/briagh-lair/npcs.lua b/game/modules/tome/data/zones/briagh-lair/npcs.lua index e2bb45a0801a98130ccc256470362035b36d4cef..64c48ab9c56a7df6974cac447048661440592012 100644 --- a/game/modules/tome/data/zones/briagh-lair/npcs.lua +++ b/game/modules/tome/data/zones/briagh-lair/npcs.lua @@ -28,7 +28,7 @@ newEntity{ define_as = "BRIAGH", name = "Briagh, Great Sand Wyrm", display = "D", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_sand_briagh__great_sand_wyrm.png", display_h=2, display_y=-1}}}, - desc = [[A towering sand drake stands before you. This wingless worm is mighty and could easily crush you.]], + desc = _t[[A towering sand drake stands before you. This wingless worm is mighty and could easily crush you.]], level_range = {35, nil}, exp_worth = 2, max_life = 350, life_rating = 29, fixed_rating = true, max_mana = 900, mana_regen=100, diff --git a/game/modules/tome/data/zones/briagh-lair/zone.lua b/game/modules/tome/data/zones/briagh-lair/zone.lua index 6865e8e69e25a85146b8b30484322d8dfa43f9fe..7d2da57a5830920aff4e7dc639e37c1fef8e43af 100644 --- a/game/modules/tome/data/zones/briagh-lair/zone.lua +++ b/game/modules/tome/data/zones/briagh-lair/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Briagh's Lair", + name = _t"Briagh's Lair", level_range = {30, 40}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/charred-scar/grids.lua b/game/modules/tome/data/zones/charred-scar/grids.lua index 57183b9fe368f67de85b025138d60c26596a746b..564cc5fdd954ca79740689cd5b8328848d6ee111 100644 --- a/game/modules/tome/data/zones/charred-scar/grids.lua +++ b/game/modules/tome/data/zones/charred-scar/grids.lua @@ -30,7 +30,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use.]], + desc = _t[[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use.]], nice_editer = lava_editer, orb_portal = { @@ -39,7 +39,7 @@ newEntity{ change_wilderness = { spot = {type="farportal-end", subtype="fareast"}, }, - message = "#VIOLET#You enter the swirling portal and in the blink of an eye you are back to the far east.", + message = _t"#VIOLET#You enter the swirling portal and in the blink of an eye you are back to the far east.", }, } diff --git a/game/modules/tome/data/zones/charred-scar/npcs.lua b/game/modules/tome/data/zones/charred-scar/npcs.lua index d38e3e0d0036c21ac13b3a76681e6e1dca76b7cc..c196cbc812b83a4f59ea806bfa3078e0a36f213c 100644 --- a/game/modules/tome/data/zones/charred-scar/npcs.lua +++ b/game/modules/tome/data/zones/charred-scar/npcs.lua @@ -49,7 +49,7 @@ newEntity{ newEntity{ base = "BASE_NPC_SUNWALL_DEFENDER", define_as = "SUN_PALADIN_DEFENDER", name = "human sun-paladin", color=colors.GOLD, - desc = [[A Human in shiny plate armour.]], + desc = _t[[A Human in shiny plate armour.]], level_range = {70, nil}, exp_worth = 1, rank = 3, positive_regen = 10, @@ -79,7 +79,7 @@ newEntity{ base = "BASE_NPC_SUNWALL_DEFENDER", define_as = "SUN_PALADIN_DEFENDER newEntity{ base = "BASE_NPC_SUNWALL_DEFENDER", define_as = "SUN_PALADIN_DEFENDER_RODMOUR", name = "High Sun-Paladin Rodmour", color=colors.VIOLET, unique = true, - desc = [[A Human in shiny plate armour.]], + desc = _t[[A Human in shiny plate armour.]], level_range = {70, nil}, exp_worth = 1, rank = 3, positive_regen = 10, @@ -104,7 +104,7 @@ newEntity{ base = "BASE_NPC_SUNWALL_DEFENDER", define_as = "SUN_PALADIN_DEFENDER on_added = function(self) self.energy.value = game.energy_to_act self:useTalent(self.T_WEAPON_OF_LIGHT) self.energy.value = game.energy_to_act self:useTalent(self.T_CHANT_OF_FORTRESS) - self:doEmote("Go "..game.player.name.."! We will hold the line!", 150) + self:doEmote(("Go %s! We will hold the line!"):tformat(game.player.name), 150) end, } @@ -134,7 +134,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ORC_ATTACKER", define_as = "ORC_ATTACK", name = "orc warrior", color=colors.DARK_RED, - desc = [[A fierce soldier-orc.]], + desc = _t[[A fierce soldier-orc.]], level_range = {42, nil}, exp_worth = 1, max_life = resolvers.rngavg(120,140), life_rating = 8, @@ -165,7 +165,7 @@ newEntity{ faction = "sorcerers", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_shalore_elandar.png", display_h=2, display_y=-1}}}, - desc = [[Renegade mages from Angolwen, the Sorcerers have set up in the Far East, slowly growing corrupt. Now they must be stopped.]], + desc = _t[[Renegade mages from Angolwen, the Sorcerers have set up in the Far East, slowly growing corrupt. Now they must be stopped.]], level_range = {70, nil}, exp_worth = 15, max_life = 1000, life_rating = 36, fixed_rating = true, max_mana = 10000, @@ -210,7 +210,7 @@ newEntity{ hunted_difficulty_immune = 1, on_acquire_target = function(self, who) - self:doEmote("Damn you, you only postpone your death! Fyrk!", 60) + self:doEmote(_t"Damn you, you only postpone your death! Fyrk!", 60) game.player:hasQuest("charred-scar"):setStatus(engine.Quest.COMPLETED, "stopped") game.player:hasQuest("charred-scar"):start_fyrk() end, @@ -225,7 +225,7 @@ newEntity{ female = true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_argoniel.png", display_h=2, display_y=-1}}}, - desc = [[Renegade mages from Angolwen, the Sorcerers have set up in the Far East, slowly growing corrupt. Now they must be stopped.]], + desc = _t[[Renegade mages from Angolwen, the Sorcerers have set up in the Far East, slowly growing corrupt. Now they must be stopped.]], level_range = {70, nil}, exp_worth = 15, max_life = 1000, life_rating = 36, fixed_rating = true, max_mana = 10000, @@ -275,9 +275,9 @@ newEntity{ base = "BASE_NPC_FAEROS", define_as = "FYRK", allow_infinite_dungeon = true, name = "Fyrk, Faeros High Guard", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/elemental_fire_fyrk__faeros_high_guard.png", display_h=2, display_y=-1}}}, - desc = [[Faeros are highly intelligent fire elementals, rarely seen outside volcanoes. They are probably not native to this world. + desc = _t[[Faeros are highly intelligent fire elementals, rarely seen outside volcanoes. They are probably not native to this world. This one looks even nastier and looks toward you with what seems to be disdain. Flames swirl all around him.]], - killer_message = "and a sole piece of char was sent to his masters as a totem", + killer_message = _t"and a sole piece of char was sent to his masters as a totem", level_range = {35, nil}, exp_worth = 2, rank = 5, max_life = resolvers.rngavg(800,900), life_rating = 20, fixed_rating = true, diff --git a/game/modules/tome/data/zones/charred-scar/zone.lua b/game/modules/tome/data/zones/charred-scar/zone.lua index 30d2e044d1f1a9c3954be368db8ed1f28365254f..1a3c0b543f6215ebac54e32ae3aaa4c616946a58 100644 --- a/game/modules/tome/data/zones/charred-scar/zone.lua +++ b/game/modules/tome/data/zones/charred-scar/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Charred Scar", + name = _t"Charred Scar", level_range = {30, 50}, level_scheme = "player", max_level = 1, @@ -60,7 +60,7 @@ return { post_process = function(level) level.turn_counter = 550 * 10 level.max_turn_counter = 550 * 10 - level.turn_counter_desc = "Hurry down south while the sun-paladins are holding off the orcs. Make their sacrifice worth it!" + level.turn_counter_desc = _t"Hurry down south while the sun-paladins are holding off the orcs. Make their sacrifice worth it!" end, on_enter = function(lev, old_lev, newzone) diff --git a/game/modules/tome/data/zones/conclave-vault/npcs.lua b/game/modules/tome/data/zones/conclave-vault/npcs.lua index 073f04f1fcb0e6ad9decf706774d1a86e205428e..c488e40c18e5c1b4e942e73e366bcecb77b3cfe9 100644 --- a/game/modules/tome/data/zones/conclave-vault/npcs.lua +++ b/game/modules/tome/data/zones/conclave-vault/npcs.lua @@ -60,7 +60,7 @@ newEntity{ newEntity{ base = "BASE_NPC_OGRE", name = "degenerated ogric mass", color=colors.BLUE, - desc = [[This huge mass of deformed flesh was probably once an ogre, but something had gone wrong.]], + desc = _t[[This huge mass of deformed flesh was probably once an ogre, but something had gone wrong.]], resolvers.nice_tile{tall=1}, level_range = {20, nil}, exp_worth = 1, special_rarity = 2, @@ -78,7 +78,7 @@ newEntity{ base = "BASE_NPC_OGRE", newEntity{ base = "BASE_NPC_OGRE", name = "ogric abomination", color=colors.LIGHT_GREY, - desc = [[This ogre seems to have tried to graft golem parts on its own body. To various interresting results.]], + desc = _t[[This ogre seems to have tried to graft golem parts on its own body. To various interresting results.]], resolvers.nice_tile{tall=1}, level_range = {22, nil}, exp_worth = 1, special_rarity = 4, @@ -102,7 +102,7 @@ newEntity{ base = "BASE_NPC_OGRE", newEntity{ base = "BASE_NPC_OGRE", define_as = "OGRE_SENTRY", name = "ogre sentry", color=colors.GREY, resolvers.nice_tile{tall=1}, - desc = [[This greatsword-wielding ogre looks at you with contempt and hatred.]], + desc = _t[[This greatsword-wielding ogre looks at you with contempt and hatred.]], level_range = {21, nil}, exp_worth = 1, rank = 3, max_life = resolvers.rngavg(110,120), life_rating = 13, @@ -140,8 +140,8 @@ newEntity{ base = "OGRE_SENTRY", define_as = "OGRE_SENTRY2", newEntity{ base = "BASE_NPC_OGRE", define_as = "HEALER_ASTELRID", name = "Healer Astelrid", color=colors.VIOLET, unique = true, resolvers.nice_tile{tall=1}, - desc = [[An enormous ogre, clad in a tattered set of robes with an officer's badge. She clutches a healer's staff, wrapped in casting plaster and scalpels for use as a massive spiked club.]], - killer_message = "and spliced for experiments", + desc = _t[[An enormous ogre, clad in a tattered set of robes with an officer's badge. She clutches a healer's staff, wrapped in casting plaster and scalpels for use as a massive spiked club.]], + killer_message = _t"and spliced for experiments", level_range = {23, nil}, exp_worth = 2, female = 1, rank = 4, diff --git a/game/modules/tome/data/zones/conclave-vault/objects.lua b/game/modules/tome/data/zones/conclave-vault/objects.lua index 1dd207e98337d3e39f64d120b8c1d92a869cce00..2c2becf6f768082dae0281606c5159232acba8b3 100644 --- a/game/modules/tome/data/zones/conclave-vault/objects.lua +++ b/game/modules/tome/data/zones/conclave-vault/objects.lua @@ -26,7 +26,7 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "log of healer Astelrid", lore="conclave-vault-"..i, - desc = [[A very faded note, nearly unreadable.]], + desc = _t[[A very faded note, nearly unreadable.]], rarity = false, encumberance = 0, } @@ -34,7 +34,7 @@ end newEntity{ base = "BASE_LORE", define_as = "LORE_SONG", name = "investigator Churrack note", lore="conclave-vault-song", - desc = [[A very faded note, nearly unreadable.]], + desc = _t[[A very faded note, nearly unreadable.]], rarity = false, encumberance = 0, } @@ -42,9 +42,9 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_GREATMAUL", define_as = "ASTELRID_CLUBSTAFF", power_source = {arcane=true}, name = "Astelrid's Clubstaff", color = colors.GREEN, image = "object/artifact/astelrids_clubstaff.png", - unided_name = "huge maul", unique = true, + unided_name = _t"huge maul", unique = true, moddable_tile = "special/%s_astelrids_clubstaff", - desc = [[Like its former owner, this was once an instrument of altruistic healing, before fury and fear caused its twisting into a sadistic weapon. Surges of restorative magic can be faintly felt under the layers of plaster and sharp surgical equipment.]], + desc = _t[[Like its former owner, this was once an instrument of altruistic healing, before fury and fear caused its twisting into a sadistic weapon. Surges of restorative magic can be faintly felt under the layers of plaster and sharp surgical equipment.]], level_range = {20, 30}, require = { stat = { str=23 }, }, cost = 650, @@ -63,5 +63,5 @@ newEntity{ base = "BASE_GREATMAUL", define_as = "ASTELRID_CLUBSTAFF", healing_factor = 0.25, inscriptions_stat_multiplier = 0.15, }, - special_desc = function(self) return "Improves the contribution of primary stats on infusions and runes by 15%" end, + special_desc = function(self) return _t"Improves the contribution of primary stats on infusions and runes by 15%" end, } diff --git a/game/modules/tome/data/zones/conclave-vault/zone.lua b/game/modules/tome/data/zones/conclave-vault/zone.lua index d545fdfbc2b97b4dc661844d648eda47b32f142e..aa407eb86fbc898bd454b80152571ba6c99f1ceb 100644 --- a/game/modules/tome/data/zones/conclave-vault/zone.lua +++ b/game/modules/tome/data/zones/conclave-vault/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Old Conclave Vault", + name = _t"Old Conclave Vault", level_range = {20, 30}, level_scheme = "player", max_level = 4, diff --git a/game/modules/tome/data/zones/crypt-kryl-feijan/npcs.lua b/game/modules/tome/data/zones/crypt-kryl-feijan/npcs.lua index 46782327786307baecf2074667b2bd6fa134e258..327eba5fc1c53f94a945a15bf7a4c0fb62e3a15a 100644 --- a/game/modules/tome/data/zones/crypt-kryl-feijan/npcs.lua +++ b/game/modules/tome/data/zones/crypt-kryl-feijan/npcs.lua @@ -29,8 +29,8 @@ newEntity{ base="BASE_NPC_MAJOR_DEMON", define_as = "KRYL_FEIJAN", allow_infinite_dungeon = true, name = "Kryl-Feijan", color=colors.VIOLET, unique = true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_kryl_feijan.png", display_h=2, display_y=-1}}}, - desc = [[This huge demon is covered in darkness. The ripped flesh of its "mother" still hangs from its sharp claws.]], - killer_message = "and devoured as a demonic breakfast", + desc = _t[[This huge demon is covered in darkness. The ripped flesh of its "mother" still hangs from its sharp claws.]], + killer_message = _t"and devoured as a demonic breakfast", level_range = {29, nil}, exp_worth = 2, faction = "fearscape", rank = 4, @@ -91,7 +91,7 @@ newEntity{ define_as = "MELINDA", display = "@", color=colors.LIGHT_BLUE, image = "terrain/woman_naked_altar.png", resolvers.generic(function(e) if engine.Map.tiles.nicer_tiles then e.display_w = 2 end end), - desc = [[A female Human with twisted sigils scored into her naked flesh. Her wrists and ankles are sore and hurt by ropes and chains. You can discern great beauty beyond the stains of blood covering her skin.]], + desc = _t[[A female Human with twisted sigils scored into her naked flesh. Her wrists and ankles are sore and hurt by ropes and chains. You can discern great beauty beyond the stains of blood covering her skin.]], autolevel = "tank", ai = "summoned", ai_real = "move_complex", ai_state = { ai_target="target_player", talent_in=4, }, stats = { str=8, dex=7, mag=8, con=12 }, @@ -122,7 +122,7 @@ newEntity{ define_as = "ACOLYTE", name = "Acolyte of the Sect of Kryl-Feijan", type = "humanoid", subtype = "elf", image = "npc/humanoid_shalore_elven_corruptor.png", display = "p", color=colors.LIGHT_RED, - desc = [[Black-robed Elves with a mad look in their eyes.]], + desc = _t[[Black-robed Elves with a mad look in their eyes.]], autolevel = "caster", stats = { str=12, dex=17, mag=18, wil=22, con=12 }, @@ -172,7 +172,7 @@ newEntity{ define_as = "ACOLYTE", melinda.image = "npc/woman_redhair_naked.png" melinda:removeAllMOs() game.level.map:updateMap(melinda.x, melinda.y) - require("engine.ui.Dialog"):simpleLongPopup("Melinda", "The woman seems to be freed from her bonds.\nShe stumbles on her feet, her naked body still dripping in blood. 'Please get me out of here!'", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Melinda", _t"The woman seems to be freed from her bonds.\nShe stumbles on her feet, her naked body still dripping in blood. 'Please get me out of here!'", 400) end end end, diff --git a/game/modules/tome/data/zones/crypt-kryl-feijan/objects.lua b/game/modules/tome/data/zones/crypt-kryl-feijan/objects.lua index 4076ff27439a5c1e85bd0941ab4fb047dfe104fe..d59a95b839f0fde426b7b9d2fe878e6de2ef908b 100644 --- a/game/modules/tome/data/zones/crypt-kryl-feijan/objects.lua +++ b/game/modules/tome/data/zones/crypt-kryl-feijan/objects.lua @@ -26,8 +26,8 @@ newEntity{ base = "BASE_MINDSTAR", power_source = {psionic = true }, unique = true, name = "Writhing Essence of Nightmares", - desc = [[Whispers seem to ceaselessly emanate from this writhing mass of black tentacles, murmuring unspeakable horrors into the ears of any unfortunate enough to hear them.]], - unided_name = "writhing mindstar", + desc = _t[[Whispers seem to ceaselessly emanate from this writhing mass of black tentacles, murmuring unspeakable horrors into the ears of any unfortunate enough to hear them.]], + unided_name = _t"writhing mindstar", level_range = {20, 32}, colors = colors.PURPLE , image = "object/artifact/writhing_essence_of_nightmares.png", rarity = 30, diff --git a/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua b/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua index a75b6579de66cb5788cec0aa83f49aaf35cdb336..3f955f6f5dbe4c411bff9b7d81b5d49d33761019 100644 --- a/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua +++ b/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Dark crypt", + name = _t"Dark crypt", level_range = {25,35}, level_scheme = "player", max_level = 5, @@ -64,13 +64,13 @@ return { end, on_enter = function(lev) if lev < 4 then - require("engine.ui.Dialog"):simplePopup("Crypt", "You hear an eerie chanting echoing from a distance.") + require("engine.ui.Dialog"):simplePopup(_t"Crypt", _t"You hear an eerie chanting echoing from a distance.") elseif lev == 4 then - require("engine.ui.Dialog"):simplePopup("Crypt", "The chanting grows louder. You hear a sudden high-pitched scream.") + require("engine.ui.Dialog"):simplePopup(_t"Crypt", _t"The chanting grows louder. You hear a sudden high-pitched scream.") elseif lev == 5 then game.level.turn_counter = 20 * 10 game.level.max_turn_counter = 20 * 10 - game.level.turn_counter_desc = "The cultists are about to sacrifice the woman. Stop them!" + game.level.turn_counter_desc = _t"The cultists are about to sacrifice the woman. Stop them!" game.player:grantQuest("kryl-feijan-escape") game.party:learnLore("kryl-feijan-altar") end @@ -81,7 +81,7 @@ return { game.player.changed = true if game.level.turn_counter < 0 then game.level.turn_counter = nil - require("engine.ui.Dialog"):simpleLongPopup("Crypt", "The woman lets out a sudden ear-splitting scream that turns from pain to horror as her stomach is ripped open from within by long dark claws. A towering black demon arises, rending her flesh to shreds, and replacing her dying scream with a terrifying roar.", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Crypt", _t"The woman lets out a sudden ear-splitting scream that turns from pain to horror as her stomach is ripped open from within by long dark claws. A towering black demon arises, rending her flesh to shreds, and replacing her dying scream with a terrifying roar.", 400) for uid, e in pairs(game.level.entities) do if e.define_as and e.define_as == "MELINDA" then local x, y = e.x, e.y @@ -108,7 +108,7 @@ return { local melinda for uid, e in pairs(game.level.entities) do if e.define_as and e.define_as == "MELINDA" then melinda = e end end if melinda and not melinda.dead and core.fov.distance(game.player.x, game.player.y, melinda.x, melinda.y) > 1 then - require("engine.ui.Dialog"):simplePopup("Crypt", "You cannot abandon Melinda here!") + require("engine.ui.Dialog"):simplePopup(_t"Crypt", _t"You cannot abandon Melinda here!") return nil, nil, true end diff --git a/game/modules/tome/data/zones/daikara/grids.lua b/game/modules/tome/data/zones/daikara/grids.lua index e7405c9d52bfb36fd25b1a45d4cd301b9c54dc8b..1732ccbc19309df555a775e30a56da2a57763bc7 100644 --- a/game/modules/tome/data/zones/daikara/grids.lua +++ b/game/modules/tome/data/zones/daikara/grids.lua @@ -28,11 +28,11 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[The rift leads... somewhere.]], + desc=_t[[The rift leads... somewhere.]], change_level = 1, change_zone = "temporal-rift", change_level_check = function() -- Forbid going back if not game.player:hasQuest("temporal-rift") then - require("engine.ui.Dialog"):yesnoPopup("Temporal Rift", "Are you sure you want to enter? There's no telling where you will end up or if you will be able to make it back.", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Temporal Rift", _t"Are you sure you want to enter? There's no telling where you will end up or if you will be able to make it back.", function(ret) if ret then game:changeLevel(1, "temporal-rift") end end) return true diff --git a/game/modules/tome/data/zones/daikara/npcs.lua b/game/modules/tome/data/zones/daikara/npcs.lua index 5a3796b63059750e0dd2cb9528b343869b216393..c66f00b830964f8ae0366d91290480587061793e 100644 --- a/game/modules/tome/data/zones/daikara/npcs.lua +++ b/game/modules/tome/data/zones/daikara/npcs.lua @@ -37,8 +37,8 @@ newEntity{ define_as = "RANTHA_THE_WORM", name = "Rantha the Worm", display = "D", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_ice_rantha_the_worm.png", display_h=2, display_y=-1}}}, - desc = [[Claws and teeth. Ice and death. Dragons are not all extinct it seems...]], - killer_message = "and fed to the hatchlings", + desc = _t[[Claws and teeth. Ice and death. Dragons are not all extinct it seems...]], + killer_message = _t"and fed to the hatchlings", level_range = {12, nil}, exp_worth = 2, max_life = 230, life_rating = 17, fixed_rating = true, max_stamina = 85, @@ -83,7 +83,7 @@ newEntity{ define_as = "RANTHA_THE_WORM", resolvers.inscriptions(1, "infusion"), on_die = function(self, who) - game.state:activateBackupGuardian("MASSOK", 4, 43, "I have heard there is a dragon hunter in the Daikara that is unhappy about the wyrm being already dead.") + game.state:activateBackupGuardian("MASSOK", 4, 43, _t"I have heard there is a dragon hunter in the Daikara that is unhappy about the wyrm being already dead.") game.player:resolveSource():grantQuest("starter-zones") game.player:resolveSource():setQuestStatus("starter-zones", engine.Quest.COMPLETED, "daikara") @@ -99,8 +99,8 @@ newEntity{ define_as = "VARSHA_THE_WRITHING", name = "Varsha the Writhing", display = "D", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_fire_varsha_the_writhing.png", display_h=2, display_y=-1}}}, - desc = [[Claws and teeth. Fire and death. Dragons are not all extinct it seems...]], - killer_message = "and fed to the hatchlings", + desc = _t[[Claws and teeth. Fire and death. Dragons are not all extinct it seems...]], + killer_message = _t"and fed to the hatchlings", level_range = {12, nil}, exp_worth = 2, max_life = 230, life_rating = 17, fixed_rating = true, max_stamina = 85, @@ -146,7 +146,7 @@ newEntity{ define_as = "VARSHA_THE_WRITHING", resolvers.inscriptions(1, "infusion"), on_die = function(self, who) - game.state:activateBackupGuardian("MASSOK", 4, 43, "I have heard there is a dragon hunter in the Daikara that is unhappy about the wyrm being already dead.") + game.state:activateBackupGuardian("MASSOK", 4, 43, _t"I have heard there is a dragon hunter in the Daikara that is unhappy about the wyrm being already dead.") game.player:resolveSource():grantQuest("starter-zones") game.player:resolveSource():setQuestStatus("starter-zones", engine.Quest.COMPLETED, "daikara") game.player:resolveSource():setQuestStatus("starter-zones", engine.Quest.COMPLETED, "daikara-volcano") @@ -161,7 +161,7 @@ newEntity{ base="BASE_NPC_ORC_GRUSHNAK", define_as = "MASSOK", allow_infinite_dungeon = true, name = "Massok the Dragonslayer", color=colors.VIOLET, unique = true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_orc_massok_the_dragonslayer.png", display_h=2, display_y=-1}}}, - desc = [[A huge and heavily-scarred orc with a gigantic sword. His helm is fashioned from a dragon's skull.]], + desc = _t[[A huge and heavily-scarred orc with a gigantic sword. His helm is fashioned from a dragon's skull.]], level_range = {45, nil}, exp_worth = 3, rank = 4, max_life = 500, life_rating = 25, fixed_rating = true, diff --git a/game/modules/tome/data/zones/daikara/objects.lua b/game/modules/tome/data/zones/daikara/objects.lua index 0c0ab0829ec4aaca7abce6f62f89bb394a359935..b8fc2b39e8ac880c993d2a5ea4261bb0c5660071 100644 --- a/game/modules/tome/data/zones/daikara/objects.lua +++ b/game/modules/tome/data/zones/daikara/objects.lua @@ -23,7 +23,7 @@ for i = 1, 5 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "daikara expedition note", lore="daikara-note-"..i, - desc = [[A paper scrap, left by an adventurer.]], + desc = _t[[A paper scrap, left by an adventurer.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/daikara/zone.lua b/game/modules/tome/data/zones/daikara/zone.lua index 72bade8af6d6db3f7512b11338ffcf159e7f0fa7..21f8a2ee5ce5ab2b0bd9725f5ef966a063d5af13 100644 --- a/game/modules/tome/data/zones/daikara/zone.lua +++ b/game/modules/tome/data/zones/daikara/zone.lua @@ -21,7 +21,7 @@ local layout = game.state:alternateZone(short_name, {"VOLCANO", 2}) local is_volcano = layout == "VOLCANO" return { - name = "Daikara", + name = _t"Daikara", level_range = {7, 16}, level_scheme = "player", max_level = 4, @@ -132,7 +132,7 @@ return { on_enter = function(lev) if lev == 1 and not game.level.data.warned and game.zone.is_volcano then game.level.data.warned = true - require("engine.ui.Dialog"):simpleLongPopup("BOOM!", "As you walk toward the Daikara you can not fail to notice the huge volcano that erupts in the center of it, right where the path is taking you.\nYou see pyroclasts ejected from the heart of the volcano, they look relatively harmless but very impressive.", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"BOOM!", _t"As you walk toward the Daikara you can not fail to notice the huge volcano that erupts in the center of it, right where the path is taking you.\nYou see pyroclasts ejected from the heart of the volcano, they look relatively harmless but very impressive.", 400) end end, } diff --git a/game/modules/tome/data/zones/deep-bellow/npcs.lua b/game/modules/tome/data/zones/deep-bellow/npcs.lua index 08bd52e1b1eee7bf514e40b9a4b7362967735f6a..4a69672af36e902b708b8e35be55a9b56739bc9e 100644 --- a/game/modules/tome/data/zones/deep-bellow/npcs.lua +++ b/game/modules/tome/data/zones/deep-bellow/npcs.lua @@ -28,8 +28,8 @@ newEntity{ base="BASE_NPC_CORRUPTED_HORROR", define_as = "THE_MOUTH", unique = true, name = "The Mouth", tint=colors.PURPLE, color=colors.VIOLET, - desc = [["From bellow, it devours."]], - killer_message = "and revived as a screeching drem bat", + desc = _t[["From bellow, it devours."]], + killer_message = _t"and revived as a screeching drem bat", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_corrupted_the_mouth.png", display_h=2, display_y=-1}}}, level_range = {7, nil}, exp_worth = 2, max_life = 10000, life_rating = 0, fixed_rating = true, @@ -60,7 +60,7 @@ newEntity{ base="BASE_NPC_CORRUPTED_HORROR", define_as = "THE_MOUTH", on_takehit = function(self, value) if value <= 500 then - game.logSeen(self, "#CRIMSON#%s seems invulnerable, there must be an other way to kill it!", self.name:capitalize()) + game.logSeen(self, "#CRIMSON#%s seems invulnerable, there must be an other way to kill it!", self:getName():capitalize()) return 0 end return value @@ -80,7 +80,7 @@ newEntity{ base="BASE_NPC_CORRUPTED_HORROR", define_as = "THE_MOUTH", on_die = function(self, who) game.player:resolveSource():setQuestStatus("deep-bellow", engine.Quest.COMPLETED) - game.state:activateBackupGuardian("ABOMINATION", 3, 35, "I have heard a dwarf whispering about some abomination in the deep bellow.") + game.state:activateBackupGuardian("ABOMINATION", 3, 35, _t"I have heard a dwarf whispering about some abomination in the deep bellow.") if game:getPlayer(true).female then game:setAllowedBuild("cosmetic_race_dwarf_female_beard", true) @@ -91,7 +91,7 @@ newEntity{ base="BASE_NPC_CORRUPTED_HORROR", define_as = "THE_MOUTH", newEntity{ base="BASE_NPC_CORRUPTED_HORROR", define_as = "SLIMY_CRAWLER", name = "slimy crawler", color = colors.GREEN, - desc = [[This disgusting... thing crawls on the floor toward you with great speed. + desc = _t[[This disgusting... thing crawls on the floor toward you with great speed. It seems to come from the digestive system of the mouth.]], level_range = {4, nil}, exp_worth = 0, max_life = 80, life_rating = 10, fixed_rating = true, @@ -136,7 +136,7 @@ newEntity{ base="BASE_NPC_CORRUPTED_HORROR", define_as = "ABOMINATION", name = "The Abomination", display = "h", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_corrupted_the_abomination.png", display_h=2, display_y=-1}}}, - desc = [[A horrid mass of pustulent flesh, sinew, and bone; this creature seems to constantly be in pain. Two heads glare malevolently at you, an intruder in its domain.]], + desc = _t[[A horrid mass of pustulent flesh, sinew, and bone; this creature seems to constantly be in pain. Two heads glare malevolently at you, an intruder in its domain.]], level_range = {35, nil}, exp_worth = 3, max_life = 350, life_rating = 23, fixed_rating = true, life_regen = 30, diff --git a/game/modules/tome/data/zones/deep-bellow/objects.lua b/game/modules/tome/data/zones/deep-bellow/objects.lua index 88371fadc31e07af1bf16f26e4371137b3b81d8e..a7070c7ac17ba7ef6d8fe1252b66b317278e1b88 100644 --- a/game/modules/tome/data/zones/deep-bellow/objects.lua +++ b/game/modules/tome/data/zones/deep-bellow/objects.lua @@ -22,8 +22,8 @@ load("/data/general/objects/objects-maj-eyal.lua") for i = 1, 3 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, - name = "Deep Bellow excavation report "..i, lore="deep-bellow-"..i, - desc = [[A paper scrap.]], + name = ("Deep Bellow excavation report %d"):tformat(i), lore="deep-bellow-"..i, + desc = _t[[A paper scrap.]], rarity = false, encumberance = 0, } @@ -32,18 +32,18 @@ end newEntity{ base = "BASE_LORE", define_as = "ADV_LTR_6", name = "letter to Rolf (3)", lore="adventurer-letter-6", - desc = [[A paper scrap.]], + desc = _t[[A paper scrap.]], rarity = false, } newEntity{ base = "BASE_LORE", define_as = "ADV_LTR_7", name = "letter to Weisman (4)", lore="adventurer-letter-7", - desc = [[A paper scrap.]], + desc = _t[[A paper scrap.]], rarity = false, } newEntity{ base = "BASE_LORE", define_as = "ADV_LTR_8", name = "Last Will of Rolf", lore="adventurer-letter-8", - desc = [[A paper scrap.]], + desc = _t[[A paper scrap.]], rarity = false, } diff --git a/game/modules/tome/data/zones/deep-bellow/zone.lua b/game/modules/tome/data/zones/deep-bellow/zone.lua index b9720c27758a6cb82e66acac70719b459ddf635c..ae363ffdf980d6da6a7c064e1bfa2cfa63bc9a2c 100644 --- a/game/modules/tome/data/zones/deep-bellow/zone.lua +++ b/game/modules/tome/data/zones/deep-bellow/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "The Deep Bellow", + name = _t"The Deep Bellow", level_range = {1, 5}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/demon-plane-spell/zone.lua b/game/modules/tome/data/zones/demon-plane-spell/zone.lua index d37c2dd6fb0d7137717a99ea616d840d579ee8f6..999547baa39f0422185e3b695b3c811d52e442f9 100644 --- a/game/modules/tome/data/zones/demon-plane-spell/zone.lua +++ b/game/modules/tome/data/zones/demon-plane-spell/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Fearscape", + name = _t"Fearscape", level_range = {1, 100}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/demon-plane/grids.lua b/game/modules/tome/data/zones/demon-plane/grids.lua index f33bdf9355709eac941ba827930836f680c596ff..14e852605be69856ce76e03aebaddc8795f7615b 100644 --- a/game/modules/tome/data/zones/demon-plane/grids.lua +++ b/game/modules/tome/data/zones/demon-plane/grids.lua @@ -27,11 +27,11 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[This portal seems to be connected with Maj'Eyal; you could probably use it to go back.]], + desc=_t[[This portal seems to be connected with Maj'Eyal; you could probably use it to go back.]], on_move = function(self, x, y, who) if who == game.player then - require("engine.ui.Dialog"):yesnoPopup("Back and there again", "Enter the portal back to Maj'Eyal? (Warning loot Draebor first)", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Back and there again", _t"Enter the portal back to Maj'Eyal? (Warning loot Draebor first)", function(ret) if not ret then game:onLevelLoad("wilderness-1", function(zone, level) local p = game:getPlayer(true) @@ -41,7 +41,7 @@ newEntity{ game:changeLevel(1, "wilderness") game.logPlayer(who, "#VIOLET#You enter the swirling portal and in the blink of an eye you are back to Maj'Eyal, near the Daikara.") end - end, "Stay", "Enter") + end, _t"Stay", _t"Enter") end end, } diff --git a/game/modules/tome/data/zones/demon-plane/npcs.lua b/game/modules/tome/data/zones/demon-plane/npcs.lua index b781c188f0fc34267250ca39b8a10efff7f7c510..6b7cc92c695cab75c58d98b208bb2a1ca9f0772f 100644 --- a/game/modules/tome/data/zones/demon-plane/npcs.lua +++ b/game/modules/tome/data/zones/demon-plane/npcs.lua @@ -28,7 +28,7 @@ newEntity{ define_as = "DRAEBOR", type = "demon", subtype = "minor", unique = true, name = "Draebor, the Imp", display = "u", color=colors.VIOLET, - desc = [[An intensely irritating git of a monster.]], + desc = _t[[An intensely irritating git of a monster.]], faction = "fearscape", level_range = {35, nil}, exp_worth = 3, max_life = 300, life_rating = 22, fixed_rating = true, @@ -79,7 +79,7 @@ newEntity{ define_as = "DRAEBOR", resolvers.inscriptions(1, {"manasurge rune"}), on_die = function(self, who) - require("engine.ui.Dialog"):simplePopup("Back and there again", "As the annoying imp falls a portal appears under its corpse.") + require("engine.ui.Dialog"):simplePopup(_t"Back and there again", _t"As the annoying imp falls a portal appears under its corpse.") local g = game.zone:makeEntityByName(game.level, "terrain", "PORTAL_BACK") game.zone:addEntity(game.level, g, "terrain", self.x, self.y) end, diff --git a/game/modules/tome/data/zones/demon-plane/objects.lua b/game/modules/tome/data/zones/demon-plane/objects.lua index 1a0963ca5f1ef0f2dbc644189582858e0091bac7..5d99abd64feffce7d96790b274ef361a928ae165 100644 --- a/game/modules/tome/data/zones/demon-plane/objects.lua +++ b/game/modules/tome/data/zones/demon-plane/objects.lua @@ -26,8 +26,8 @@ newEntity{ base = "BASE_LEATHER_BOOT", define_as = "BOOTS_OF_PHASING", unique = true, name = "Shifting Boots", image = "object/artifact/shifting_boots.png", - unided_name = "pair of shifting boots", - desc = [[Those leather boots can make anybody as annoying as their former possessor, Draebor.]], + unided_name = _t"pair of shifting boots", + desc = _t[[Those leather boots can make anybody as annoying as their former possessor, Draebor.]], color = colors.BLUE, rarity = false, cost = 200, @@ -42,12 +42,12 @@ newEntity{ base = "BASE_LEATHER_BOOT", max_power = 40, power_regen = 1, use_power = { - name = function(self, who) return ("blink to a nearby random location within range %d (based on Magic)"):format(self.use_power.range(self, who)) end, + name = function(self, who) return ("blink to a nearby random location within range %d (based on Magic)"):tformat(self.use_power.range(self, who)) end, power = 22, tactical = { ESCAPE = 2}, range = function(self, who) return 10 + who:getMag(5) end, use = function(self, who) - game.logSeen(who, "%s taps %s %s together!", who.name:capitalize(), who:his_her(), self:getName{no_count=true, do_color = true, no_add_name = true}) + game.logSeen(who, "%s taps %s %s together!", who:getName():capitalize(), who:his_her(), self:getName{no_count=true, do_color = true, no_add_name = true}) game.level.map:particleEmitter(who.x, who.y, 1, "teleport") who:teleportRandom(who.x, who.y, self.use_power.range(self, who)) game.level.map:particleEmitter(who.x, who.y, 1, "teleport") diff --git a/game/modules/tome/data/zones/demon-plane/zone.lua b/game/modules/tome/data/zones/demon-plane/zone.lua index 03651ad811ded459b386acca8c30067faf844818..f5329e5b19c7ecdcf766151fcbe2882b6c9ea54d 100644 --- a/game/modules/tome/data/zones/demon-plane/zone.lua +++ b/game/modules/tome/data/zones/demon-plane/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Fearscape", + name = _t"Fearscape", level_range = {30, 40}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/dreadfell-ambush/npcs.lua b/game/modules/tome/data/zones/dreadfell-ambush/npcs.lua index 9b340e3093480ba68d0c7752cd7e6c21f9056167..a31059c855df9603c59335d12e123e1e58ca2683 100644 --- a/game/modules/tome/data/zones/dreadfell-ambush/npcs.lua +++ b/game/modules/tome/data/zones/dreadfell-ambush/npcs.lua @@ -26,7 +26,7 @@ newEntity{ base="BASE_NPC_ORC", define_as = "UKRUK", name = "Ukruk the Fierce", faction = "orc-pride", color=colors.VIOLET, - desc = [[This ugly orc looks really nasty and vicious. He is obviously looking for something and bears an unknown symbol on his shield.]], + desc = _t[[This ugly orc looks really nasty and vicious. He is obviously looking for something and bears an unknown symbol on his shield.]], level_range = {30, nil}, exp_worth = 2, max_life = 1500, life_rating = 18, fixed_rating = true, rank = 4, diff --git a/game/modules/tome/data/zones/dreadfell-ambush/objects.lua b/game/modules/tome/data/zones/dreadfell-ambush/objects.lua index 0a9599e44b7dac85895407381f02f2cd324f7d4d..c00af66e86812430a552c944cfa7ea96d045c75c 100644 --- a/game/modules/tome/data/zones/dreadfell-ambush/objects.lua +++ b/game/modules/tome/data/zones/dreadfell-ambush/objects.lua @@ -22,7 +22,7 @@ load("/data/general/objects/objects-maj-eyal.lua") newEntity{ base = "BASE_LORE", define_as = "UKRUK_NOTE", name = "hastily written log", lore="ukruk-log", - desc = [[A paper scrap, left by Ukruk.]], + desc = _t[[A paper scrap, left by Ukruk.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/dreadfell-ambush/zone.lua b/game/modules/tome/data/zones/dreadfell-ambush/zone.lua index f83a9d772bfb153afd54c61c8fbe519d5ea4c868..faf42214a654c34af31834940282548ee713806d 100644 --- a/game/modules/tome/data/zones/dreadfell-ambush/zone.lua +++ b/game/modules/tome/data/zones/dreadfell-ambush/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Ambush!", + name = _t"Ambush!", level_range = {20, 50}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/dreadfell/npcs.lua b/game/modules/tome/data/zones/dreadfell/npcs.lua index a3d48034dec1c8ef513085baf952019bc7dfeffe..6265c25d5cac2bd5cc00d7c99d79e2dd7896739a 100644 --- a/game/modules/tome/data/zones/dreadfell/npcs.lua +++ b/game/modules/tome/data/zones/dreadfell/npcs.lua @@ -37,8 +37,8 @@ newEntity{ define_as = "THE_MASTER", type = "undead", subtype = "vampire", unique = true, image = "npc/the_master.png", name = "The Master", display = "V", color=colors.VIOLET, - desc = [[A terrifying vampiric figure of power, with flowing robes and an intense aura of fright. His cold, sinewy flesh seems to cling to this world through greed and malice, and his eyes betray a strength of mind beyond any puny mortal. All nearby are utterly subservient to his will, though he stands aloof from them, as if to say he needs not the pathetic meddling of minions to help him overcome his foes. Your eyes are drawn to a dark staff in his hands which seems to suck the very life from the air around it. It looks ancient and dangerous and terrible, and the sight of it fills you with fervent desire.]], - killer_message = "and raised as his tortured undead thrall", + desc = _t[[A terrifying vampiric figure of power, with flowing robes and an intense aura of fright. His cold, sinewy flesh seems to cling to this world through greed and malice, and his eyes betray a strength of mind beyond any puny mortal. All nearby are utterly subservient to his will, though he stands aloof from them, as if to say he needs not the pathetic meddling of minions to help him overcome his foes. Your eyes are drawn to a dark staff in his hands which seems to suck the very life from the air around it. It looks ancient and dangerous and terrible, and the sight of it fills you with fervent desire.]], + killer_message = _t"and raised as his tortured undead thrall", not_power_source = {nature=true}, level_range = {23, nil}, exp_worth = 2, max_life = 350, life_rating = 19, fixed_rating = true, @@ -113,7 +113,7 @@ newEntity{ define_as = "THE_MASTER", resolvers.inscriptions(1, {"manasurge rune"}), on_die = function(self, who) - game.state:activateBackupGuardian("PALE_DRAKE", 1, 40, "It has been months since the hero cleansed the Dreadfell, yet rumours are growing: evil is back.") + game.state:activateBackupGuardian("PALE_DRAKE", 1, 40, _t"It has been months since the hero cleansed the Dreadfell, yet rumours are growing: evil is back.") world:gainAchievement("VAMPIRE_CRUSHER", game.player:resolveSource()) game.player:resolveSource():grantQuest("dreadfell") @@ -138,7 +138,7 @@ newEntity{ define_as = "PALE_DRAKE", name = "Pale Drake", display = "s", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_skeleton_pale_drake.png", display_h=2, display_y=-1}}}, - desc = [[A malevolent skeleton archmage that has taken control of the Dreadfell since the Master's demise.]], + desc = _t[[A malevolent skeleton archmage that has taken control of the Dreadfell since the Master's demise.]], level_range = {40, nil}, exp_worth = 3, not_power_source = {nature=true}, max_life = 450, life_rating = 21, fixed_rating = true, @@ -209,9 +209,9 @@ newEntity{ define_as = "BORFAST", type = "undead", subtype = "ghoul", unique = true, name = "Borfast the Broken", display = "g", color=colors.VIOLET, - desc = [[Thick skin hangs loosely from this short, shambling form. Tufts of hair sticking out from its chin give evidence of a once magnificent dwarven beard. Half its face seems to have been seared in acid at some point, the flesh melted away from the skull and an eyeball drooping low from its socket. There is a unique sadness to its eyes, and a slump of resignation to its gait. + desc = _t[[Thick skin hangs loosely from this short, shambling form. Tufts of hair sticking out from its chin give evidence of a once magnificent dwarven beard. Half its face seems to have been seared in acid at some point, the flesh melted away from the skull and an eyeball drooping low from its socket. There is a unique sadness to its eyes, and a slump of resignation to its gait. What proud hero of renown was this before he was condemned to such a terrible fate?]], - killer_message = "and offered to his dark Master", + killer_message = _t"and offered to his dark Master", not_power_source = {nature=true}, level_range = {20, nil}, exp_worth = 2, max_life = 350, life_rating = 19, fixed_rating = true, @@ -281,9 +281,9 @@ newEntity{ define_as = "ALETTA", type = "undead", subtype = "ghost", unique = true, name = "Aletta Soultorn", female=1, display = "G", color=colors.VIOLET, - desc = [[What once must have been an enchantingly beautiful Higher woman now looks to be a ghost of utter despair. Her thin, elegant form ripples gently in the air, whilst her tattered robes seem oddly still. The ghost's face looks jittery and pained whilst her wild, glowing eyes move rapidly back and forth in their sockets. + desc = _t[[What once must have been an enchantingly beautiful Higher woman now looks to be a ghost of utter despair. Her thin, elegant form ripples gently in the air, whilst her tattered robes seem oddly still. The ghost's face looks jittery and pained whilst her wild, glowing eyes move rapidly back and forth in their sockets. Now and then she seems to see something and her jaw pulls back, her whole face splitting apart as she shrieks an unholy cry of pain and torment.]], - killer_message = "and offered to her dark Master", + killer_message = _t"and offered to her dark Master", not_power_source = {nature=true}, level_range = {20, nil}, exp_worth = 2, max_life = 150, life_rating = 10, fixed_rating = true, @@ -357,9 +357,9 @@ newEntity{ define_as = "FILIO", type = "undead", subtype = "skeleton", unique = true, name = "Filio Flightfond", display = "s", color=colors.VIOLET, - desc = [[A short, furtive-looking skeleton with padded feet. He moves quickly and silently, and seems to meld into the shadows with ease. In one hand he holds a sling, and the other a short dagger. + desc = _t[[A short, furtive-looking skeleton with padded feet. He moves quickly and silently, and seems to meld into the shadows with ease. In one hand he holds a sling, and the other a short dagger. There is a cunning air to his hollow skull, and his empty sockets reveal nothing of what tricks and tactics he has planned.]], - killer_message = "and offered to his dark Master", + killer_message = _t"and offered to his dark Master", not_power_source = {nature=true}, level_range = {20, nil}, exp_worth = 2, max_life = 250, life_rating = 15, fixed_rating = true, diff --git a/game/modules/tome/data/zones/dreadfell/objects.lua b/game/modules/tome/data/zones/dreadfell/objects.lua index 2888be424e67def31141fa012333db346d1b2e40..be893530c8b4c9912bfda2f5822c658afad6b9cd 100644 --- a/game/modules/tome/data/zones/dreadfell/objects.lua +++ b/game/modules/tome/data/zones/dreadfell/objects.lua @@ -22,7 +22,7 @@ load("/data/general/objects/objects-maj-eyal.lua") newEntity{ base = "BASE_LORE", define_as = "UNDEAD_POEM_LEVEL_2", name = "paper scrap", lore="dreadfell-poem-level-2", - desc = [[A smudged poem chalked on a dark piece of slate]], + desc = _t[[A smudged poem chalked on a dark piece of slate]], rarity = false, encumberance = 0, } @@ -30,7 +30,7 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_LORE", define_as = "UNDEAD_POEM_LEVEL_5", name = "paper scrap", lore="dreadfell-poem-level-5", - desc = [[A poem written in scribbled, child-like writing]], + desc = _t[[A poem written in scribbled, child-like writing]], rarity = false, encumberance = 0, } @@ -38,7 +38,7 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_LORE", define_as = "UNDEAD_POEM_LEVEL_7", name = "paper scrap", lore="dreadfell-poem-level-7", - desc = [[A poem written in an elegant Gothic script]], + desc = _t[[A poem written in an elegant Gothic script]], rarity = false, encumberance = 0, } @@ -46,7 +46,7 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_LORE", define_as = "BORFAST_LETTER", name = "a letter from the Master", lore="dreadfell-borfast-letter", - desc = [[A letter written in a bold, commanding script]], + desc = _t[[A letter written in a bold, commanding script]], rarity = false, encumberance = 0, } @@ -54,7 +54,7 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_LORE", define_as = "ALETTA_LETTER", name = "a letter from the Master", lore="dreadfell-aletta-letter", - desc = [[A letter written in a bold, commanding script]], + desc = _t[[A letter written in a bold, commanding script]], rarity = false, encumberance = 0, } @@ -62,7 +62,7 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_LORE", define_as = "FILIO_LETTER", name = "a letter from the Master", lore="dreadfell-filio-letter", - desc = [[A letter written in a bold, commanding script]], + desc = _t[[A letter written in a bold, commanding script]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/dreadfell/zone.lua b/game/modules/tome/data/zones/dreadfell/zone.lua index 73632413e566220ae77173273a993028cfe19e6e..2d6ac78805bf91c6376112bb1a566e8d8899220d 100644 --- a/game/modules/tome/data/zones/dreadfell/zone.lua +++ b/game/modules/tome/data/zones/dreadfell/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Dreadfell", + name = _t"Dreadfell", level_range = {15, 26}, level_scheme = "player", max_level = 9, diff --git a/game/modules/tome/data/zones/dreams/grids.lua b/game/modules/tome/data/zones/dreams/grids.lua index 4309393820790b844e413ea134af6f743d50820a..323e63aa6c0281aae44b4d020ae4d6412f70e266 100644 --- a/game/modules/tome/data/zones/dreams/grids.lua +++ b/game/modules/tome/data/zones/dreams/grids.lua @@ -56,7 +56,7 @@ newEntity{ define_as = "DREAM_MOUSE_HOLE", type = "wall", subtype = "grass", name = "mouse hole", - desc = "A hole small enough that only you can go through.", + desc = _t"A hole small enough that only you can go through.", color_r=0, color_g=0, color_b=0, notice = true, image = "terrain/jungle/jungle_grass_floor_01.png", add_displays = class:makeTrees("terrain/jungle/jungle_tree_", 17, 7), diff --git a/game/modules/tome/data/zones/dreams/npcs.lua b/game/modules/tome/data/zones/dreams/npcs.lua index 588df37488243db47aa8480eea7c32d3b3e8d218..425a43af6f2b0312c99f0b90cac6b620f58fa507 100644 --- a/game/modules/tome/data/zones/dreams/npcs.lua +++ b/game/modules/tome/data/zones/dreams/npcs.lua @@ -52,7 +52,7 @@ newEntity{ "npc/humanoid_yeek_yeek_commoner_08.png", }, display = "p", color=colors.WHITE, - desc = [[What?!]], + desc = _t[[What?!]], faction = "neutral", combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, @@ -61,7 +61,7 @@ newEntity{ lite = 3, life_rating = 10, max_life = 15, - emote_random = {chance=10, "Who are you?", "What do you want?", "Why are you here?", "Where are you going?", "Do you have anything worth living for?"}, + emote_random = {chance=10, _t"Who are you?", _t"What do you want?", _t"Why are you here?", _t"Where are you going?", _t"Do you have anything worth living for?"}, level_range = {1, 1}, exp_worth = 1, rarity = 1, @@ -89,7 +89,7 @@ newEntity{ m.inc_damage.all = -50 m.life = 30 game.zone:addEntity(game.level, m, "actor", self.x, self.y) - m:doEmote("GRrrrrrllllll!", 60) + m:doEmote(_t"GRrrrrrllllll!", 60) elseif nb <= 1 then local g = game.zone.grid_list.DREAM2_END:clone() game.zone:addEntity(game.level, g, "terrain", self.x, self.y) @@ -100,7 +100,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ORC", define_as = "WIFE", name = "lost wife", color=colors.YELLOW, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_orc_orc_mother.png", display_h=2, display_y=-1}}}, - desc = [[Your wife has been turned into a giant, bloated form that towers above you. Mucus and slime ooze from every orifice, dripping onto the floor. The sight and the smell make you retch.]], + desc = _t[[Your wife has been turned into a giant, bloated form that towers above you. Mucus and slime ooze from every orifice, dripping onto the floor. The sight and the smell make you retch.]], level_range = {10, 10}, exp_worth = 0, female = true, never_move = 1, diff --git a/game/modules/tome/data/zones/dreams/zone.lua b/game/modules/tome/data/zones/dreams/zone.lua index c92deba839234815a23da716888dc7fa06cb85c9..e63515184ebf05d4d33057e44efb258eae2c5b74 100644 --- a/game/modules/tome/data/zones/dreams/zone.lua +++ b/game/modules/tome/data/zones/dreams/zone.lua @@ -18,11 +18,11 @@ -- darkgod@te4.org return { - name = "Dreams", + name = _t"Dreams", display_name = function(x, y) - if game.level.level == 1 then return "Dream of vulnerability" end - if game.level.level == 2 then return "Dream of loss" end - return "Dream ???" + if game.level.level == 1 then return _t"Dream of vulnerability" end + if game.level.level == 2 then return _t"Dream of loss" end + return _t"Dream ???" end, variable_zone_name = true, level_range = {1, 1}, @@ -196,7 +196,7 @@ return { -- Dream of vulnerability if lev == 1 then game.level.data.enter_dreams{ - name = "frail mouse", image = "npc/vermin_rodent_giant_white_mouse.png", + name = _t"frail mouse", image = "npc/vermin_rodent_giant_white_mouse.png", type = "vermin", subtype = "rodent", display = "r", color=colors.WHITE, infravision = 10, @@ -227,12 +227,12 @@ return { T_NIMBLE_MOVEMENTS = 3, T_PIERCING_SIGHT = 30, }, - msg = [[The noxious fumes have invaded all your body, you suddenty fall into a deep slumber... + msg = _t[[The noxious fumes have invaded all your body, you suddenty fall into a deep slumber... ... you feel weak ... ... you feel unimportant ... ... you feel like ... food ... You feel like running away!]], - success_msg = [[As your mind-mouse enters the dream portal you suddenly wake up. + success_msg = _t[[As your mind-mouse enters the dream portal you suddenly wake up. You feel good!]], dream = "mice", } @@ -241,7 +241,7 @@ You feel good!]], -- Dream of loss if lev == 2 then game.level.data.enter_dreams{ - name = "lost man", image = "npc/humanoid_human_townsfolk_meanlooking_mercenary01_64.png", + name = _t"lost man", image = "npc/humanoid_human_townsfolk_meanlooking_mercenary01_64.png", type = "humanoid", subtype = "human", display = "h", color=colors.VIOLET, infravision = 10, @@ -251,12 +251,12 @@ You feel good!]], max_life = 100, life_regen = 0, resolvers.talents{ }, - msg = [[The noxious fumes have invaded all your body, you suddenty fall into a deep slumber... + msg = _t[[The noxious fumes have invaded all your body, you suddenty fall into a deep slumber... ... you feel you forgot something ... ... you feel lost ... ... you feel sad ... You forgot your wife! Find her!]], - success_msg = [[As you enter the dream portal you suddenly wake up. + success_msg = _t[[As you enter the dream portal you suddenly wake up. You feel good!]], dream = "lost", } @@ -295,7 +295,7 @@ You feel good!]], f.energy.value = 1000 game.paused = true game.player:updateMainShader() - require("engine.ui.Dialog"):simpleLongPopup("Deep slumber...", t.msg, 600) + require("engine.ui.Dialog"):simpleLongPopup(_t"Deep slumber...", t.msg, 600) end, leave_dreams = function(self, msg, dream) local danger = game.level.data.danger @@ -313,14 +313,14 @@ You feel good!]], world:gainAchievement("ALL_DREAMS", self.summoner, dream) end if self.success and danger then - require("engine.ui.Dialog"):simpleLongPopup("Deep slumber...", msg, 600) + require("engine.ui.Dialog"):simpleLongPopup(_t"Deep slumber...", msg, 600) game.logPlayer(game.player, msg:gsub("\n", " ")) game.player:setEffect(game.player.EFF_VICTORY_RUSH_ZIGUR, 4, {}) elseif danger then - local msg = [[As you die in a dream you suddenly wake up. + local msg = _t[[As you die in a dream you suddenly wake up. Poisonous fumes take their toll on your body!]] game.logPlayer(game.player) - require("engine.ui.Dialog"):simpleLongPopup("Deep slumber...", msg, 600) + require("engine.ui.Dialog"):simpleLongPopup(_t"Deep slumber...", msg, 600) local hit = math.max(0, game.player.life * 2 / 3) game:onTickEnd(game.player:setEffect(game.player.EFF_DEATH_DREAM, 4, {power=hit/4})) end diff --git a/game/modules/tome/data/zones/dreamscape-talent/zone.lua b/game/modules/tome/data/zones/dreamscape-talent/zone.lua index 449c8620726eddb312e1bbf58959c8ed16019363..e774969f1d48d4e2b36139daf560219268a17d9b 100644 --- a/game/modules/tome/data/zones/dreamscape-talent/zone.lua +++ b/game/modules/tome/data/zones/dreamscape-talent/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Dreamscape", + name = _t"Dreamscape", level_range = {1, 100}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/eidolon-plane/npcs.lua b/game/modules/tome/data/zones/eidolon-plane/npcs.lua index a0377dd14a4c59702b9dbfca8d94632f58e67cbf..671b12f878edb37f05b42745713298274ebe12ad 100644 --- a/game/modules/tome/data/zones/eidolon-plane/npcs.lua +++ b/game/modules/tome/data/zones/eidolon-plane/npcs.lua @@ -22,7 +22,7 @@ newEntity{ define_as = "EIDOLON", name = "The Eidolon", display = "@", color=colors.GREY, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/unknown_unknown_the_eidolon.png", display_h=2, display_y=-1}}}, - desc = [[A ripple in the void that somehow seems... alive, this creature stares at you with interest.]], + desc = _t[[A ripple in the void that somehow seems... alive, this creature stares at you with interest.]], faction = "neutral", blood_color = colors.DARK, level_range = {200, nil}, exp_worth = 0, diff --git a/game/modules/tome/data/zones/eidolon-plane/zone.lua b/game/modules/tome/data/zones/eidolon-plane/zone.lua index b82687b30d8f354c2a73643f1d816a8d223a5a2e..f93f16e25d24ec68f459ba62fb577fd049d6b1e1 100644 --- a/game/modules/tome/data/zones/eidolon-plane/zone.lua +++ b/game/modules/tome/data/zones/eidolon-plane/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Eidolon Plane", + name = _t"Eidolon Plane", level_range = {1, 1}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/eruan/grids.lua b/game/modules/tome/data/zones/eruan/grids.lua index 22fbbcb7088b0c8e30a93ba1f37945b9061386a4..bc8e0d20e35acfadc35c87352860b5b7f76a5c9d 100644 --- a/game/modules/tome/data/zones/eruan/grids.lua +++ b/game/modules/tome/data/zones/eruan/grids.lua @@ -32,13 +32,13 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. + desc = _t[[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. This one seems to go to the west, to Charred Scar. A fiery volcano that can only spell death...]], orb_portal = { change_level = 1, change_zone = "charred-scar", - message = "#VIOLET#You enter the swirling portal while it fades away and in the blink of an eye you set foot on hellish land, the heart of a volcano...", + message = _t"#VIOLET#You enter the swirling portal while it fades away and in the blink of an eye you set foot on hellish land, the heart of a volcano...", on_preuse = function(self, who) -- Find all portals and deactivate them for i = -4, 4 do for j = -4, 4 do if game.level.map:isBound(who.x + i, who.y + j) then diff --git a/game/modules/tome/data/zones/eruan/npcs.lua b/game/modules/tome/data/zones/eruan/npcs.lua index ef4fe3609c092841e9f6eab2921105e89db80935..6b93eabc16554f10c54df98256d29331af9e6f5d 100644 --- a/game/modules/tome/data/zones/eruan/npcs.lua +++ b/game/modules/tome/data/zones/eruan/npcs.lua @@ -30,7 +30,7 @@ newEntity{ define_as = "SUN_PALADIN_GUREN", display = "p", faction = "sunwall", name = "Sun Paladin Guren", color=colors.GOLD, unique = true, - desc = [[A Human warrior, clad in shining plate armour. Power radiates from him.]], + desc = _t[[A Human warrior, clad in shining plate armour. Power radiates from him.]], level_range = {50, nil}, exp_worth = 2, life_regen = 10, rank = 3, diff --git a/game/modules/tome/data/zones/eruan/zone.lua b/game/modules/tome/data/zones/eruan/zone.lua index 45faacad398eefedae791db9a31844b01199f8bc..8b96c261bdff8d29037e39fc2609f86567660d7e 100644 --- a/game/modules/tome/data/zones/eruan/zone.lua +++ b/game/modules/tome/data/zones/eruan/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Erúan", + name = _t"Erúan", level_range = {30, 45}, level_scheme = "player", max_level = 4, diff --git a/game/modules/tome/data/zones/flooded-cave/npcs.lua b/game/modules/tome/data/zones/flooded-cave/npcs.lua index e13790aa1b3b0fa19fd96aadc9b1b2cf17cd3d29..9b859e82168514f0ce9d943139e47cd592baa6cb 100644 --- a/game/modules/tome/data/zones/flooded-cave/npcs.lua +++ b/game/modules/tome/data/zones/flooded-cave/npcs.lua @@ -28,7 +28,7 @@ newEntity{ define_as = "UKLLMSWWIK", name = "Ukllmswwik the Wise", faction="water-lair", display = "D", color=colors.VIOLET, - desc = [[It looks like a cross between a shark and a dragon, only nastier.]], + desc = _t[[It looks like a cross between a shark and a dragon, only nastier.]], global_speed_base = 1.4, level_range = {30, nil}, exp_worth = 4, max_life = 250, life_rating = 27, fixed_rating = true, diff --git a/game/modules/tome/data/zones/flooded-cave/zone.lua b/game/modules/tome/data/zones/flooded-cave/zone.lua index 9db89ab66bc076245680a9f0879b7dde606aa85d..0085fc389cce9c77f5e486c5fe8643a179302227 100644 --- a/game/modules/tome/data/zones/flooded-cave/zone.lua +++ b/game/modules/tome/data/zones/flooded-cave/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Flooded Cave", + name = _t"Flooded Cave", level_range = {30, 40}, level_scheme = "player", max_level = 2, diff --git a/game/modules/tome/data/zones/gladium/zone.lua b/game/modules/tome/data/zones/gladium/zone.lua index fa61a1f8eb446df7c9e99ce6d20e256ec13c973f..f4be74c11eec5bbc9ad343c229ba74afca0914fb 100644 --- a/game/modules/tome/data/zones/gladium/zone.lua +++ b/game/modules/tome/data/zones/gladium/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Fortress Gladium", + name = _t"Fortress Gladium", level_range = {1, 1}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/golem-graveyard/grids.lua b/game/modules/tome/data/zones/golem-graveyard/grids.lua index a24974d83332fef12111ff951b8582d2dbe60ddc..ba0efe064b229b40d25ba18eef1031563ebc65a8 100644 --- a/game/modules/tome/data/zones/golem-graveyard/grids.lua +++ b/game/modules/tome/data/zones/golem-graveyard/grids.lua @@ -28,7 +28,7 @@ newEntity{base="HARDWALL", define_as = "ATAMATHON_BROKEN", resolvers.nice_tile{image="terrain/grass.png", add_displays = {class.new{z=18,image="npc/construct_golem_athamathon_the_giant_golem.png", display_y=-1, display_h=2}}}, name = "the remains of Atamathon", show_tooltip = true, - desc = [[This giant golem was constructed by the Halflings during the Pyre Wars to fight the orcs, but was felled by Garkul the Devourer. + desc = _t[[This giant golem was constructed by the Halflings during the Pyre Wars to fight the orcs, but was felled by Garkul the Devourer. Its body is made of marble, its joints of solid voratun, and its sole eye of purest ruby; the other one seems to be missing. At over 40 feet tall, it towers above you. Someone foolish has tried to reconstruct it, but was unable to complete the task; the golem needs another eye to be complete.]], dig = false, @@ -37,7 +37,7 @@ Someone foolish has tried to reconstruct it, but was unable to complete the task game.party:learnLore("broken-atamathon") local eye, eye_item = e:findInInventoryBy(e:getInven("INVEN"), "define_as", "ATAMATHON_ACTIVATE") if eye then - require("engine.ui.Dialog"):yesnoPopup("Atamathon", "It seems that your "..eye:getName{do_color=true}.." is made to fit inside the empty eye socket of Atamathon. This is probably very unwise.", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Atamathon", ("It seems that your %s is made to fit inside the empty eye socket of Atamathon. This is probably very unwise."):tformat(eye:getName{do_color=true}), function(ret) if not ret then return end game:applyDifficulty(game.zone, {50, 50}) game.zone:updateBaseLevel() @@ -54,9 +54,9 @@ Someone foolish has tried to reconstruct it, but was unable to complete the task game.log("#LIGHT_RED#Atamathon walks the world again, but without control.") game.zone:addEntity(game.level, grass, "terrain", x, y) game.zone:addEntity(game.level, atamathon, "actor", x, y) - atamathon:doEmote("Activating defenses. Targetting hostile. **DESTRUCTION**!", 60) + atamathon:doEmote(_t"Activating defenses. Targetting hostile. **DESTRUCTION**!", 60) atamathon:setTarget(e) - end, "Insert", "Cancel") + end, _t"Insert", _t"Cancel") end end return true diff --git a/game/modules/tome/data/zones/golem-graveyard/npcs.lua b/game/modules/tome/data/zones/golem-graveyard/npcs.lua index 070d376e0188bdf2f77ad533c087e07b0a9596ce..3dd183f672bcbcd0d213500a0a40f30d51d4b1d5 100644 --- a/game/modules/tome/data/zones/golem-graveyard/npcs.lua +++ b/game/modules/tome/data/zones/golem-graveyard/npcs.lua @@ -27,7 +27,7 @@ newEntity{ define_as = "ATAMATHON", base = "BASE_NPC_CONSTRUCT", name = "Atamathon the Giant Golem", image = "npc/atamathon.png", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/construct_golem_athamathon_the_giant_golem.png", display_h=2, display_y=-1}}}, - desc = [[This giant golem was constructed by the Halflings during the Pyre Wars to fight the orcs, but was felled by Garkul the Devourer. Someone foolish has tried to reconstruct it, but has lost control of it, and now it rampages in search of its original creators, who are long dead. Its body is made of marble, its joints of solid voratun, and its eyes of purest ruby. At over 40 feet tall, it towers above you, and its crimson orbs seem to glow with rage.]], + desc = _t[[This giant golem was constructed by the Halflings during the Pyre Wars to fight the orcs, but was felled by Garkul the Devourer. Someone foolish has tried to reconstruct it, but has lost control of it, and now it rampages in search of its original creators, who are long dead. Its body is made of marble, its joints of solid voratun, and its eyes of purest ruby. At over 40 feet tall, it towers above you, and its crimson orbs seem to glow with rage.]], level_range = {70, nil}, exp_worth = 2, max_life = 5000, life_rating = 60, fixed_rating = true, life_regen = 150, @@ -39,15 +39,15 @@ newEntity{ define_as = "ATAMATHON", base = "BASE_NPC_CONSTRUCT", move_others=true, emote_random = resolvers.emote_random{ chance=20, - "DESTROY!", - "LIFE-ENDING SYSTEMS ACTIVATED!", - "GLORY TO THE HALFLINGS!", - "YOUR DEATH IS NECESSARY", - "ACTIVATING PAIN GIVING SUBMODULES!", - "YOUR LIFE WILL END, PLEASE DO NOT RESIST!", - "RESISTANCE IS FUTILE, YOUR WILL BE EXTERMINATED!", - "PLEASE STAY STEADY AS YOU ARE ERASED FROM THE WORLD!", - "EXECUTE PHASE COMMENCING!", + _t"DESTROY!", + _t"LIFE-ENDING SYSTEMS ACTIVATED!", + _t"GLORY TO THE HALFLINGS!", + _t"YOUR DEATH IS NECESSARY", + _t"ACTIVATING PAIN GIVING SUBMODULES!", + _t"YOUR LIFE WILL END, PLEASE DO NOT RESIST!", + _t"RESISTANCE IS FUTILE, YOUR WILL BE EXTERMINATED!", + _t"PLEASE STAY STEADY AS YOU ARE ERASED FROM THE WORLD!", + _t"EXECUTE PHASE COMMENCING!", }, body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, GEM=4 }, diff --git a/game/modules/tome/data/zones/golem-graveyard/objects.lua b/game/modules/tome/data/zones/golem-graveyard/objects.lua index bc43a86670251e308174b7e2f4c988050ffaf471..f0eba1c58232bfbe8e007dbf39bd39c5fbcb3ba2 100644 --- a/game/modules/tome/data/zones/golem-graveyard/objects.lua +++ b/game/modules/tome/data/zones/golem-graveyard/objects.lua @@ -23,7 +23,7 @@ newEntity{ base = "BASE_GEM", define_as = "ATAMATHON_RUBY_EYE", subtype = "red", name = "Atamathon's Ruby Eye", color=colors.VIOLET, quest=true, unique=true, identified=true, image="object/artifact/atamathons_lost_ruby_eye.png", - desc = [[One of the ruby eyes of the legendary giant golem Atamathon. + desc = _t[[One of the ruby eyes of the legendary giant golem Atamathon. It is said it was made by the halflings during the Age of Pyre as a weapon against the orcs. Even though it was destroyed, it managed to deal a crippling blow by killing their leader, Garkul the Devourer.]], material_level = 5, cost = 100, diff --git a/game/modules/tome/data/zones/golem-graveyard/zone.lua b/game/modules/tome/data/zones/golem-graveyard/zone.lua index 5fc05cb5b5fd8bd1469bc8d3055e7c3bb698a9d4..25026c4b6e9ab410a18d7d8428bab1b30dfb2b26 100644 --- a/game/modules/tome/data/zones/golem-graveyard/zone.lua +++ b/game/modules/tome/data/zones/golem-graveyard/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Golem Graveyard", + name = _t"Golem Graveyard", level_range = {14, 20}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/gorbat-pride/grids.lua b/game/modules/tome/data/zones/gorbat-pride/grids.lua index e0dd44da301eb5b154878191236af7f14d681d62..91d0b76834b1fc3a40ffa34122afd9470c40e169 100644 --- a/game/modules/tome/data/zones/gorbat-pride/grids.lua +++ b/game/modules/tome/data/zones/gorbat-pride/grids.lua @@ -124,7 +124,7 @@ newEntity{ block_sight = true, block_sense = true, block_esp = true, - door_player_stop = "This rock seems to have been sealed off. You need to find a way to open it.", + door_player_stop = _t"This rock seems to have been sealed off. You need to find a way to open it.", is_door = true, door_opened = "FLOOR", on_lever_change = function(self, x, y, who, val, oldval) diff --git a/game/modules/tome/data/zones/gorbat-pride/npcs.lua b/game/modules/tome/data/zones/gorbat-pride/npcs.lua index c96256e3226ba8fa0ba3941c3ade58799069533a..06c16638b0c7b2df13d48ae7acc205bc58d4c219 100644 --- a/game/modules/tome/data/zones/gorbat-pride/npcs.lua +++ b/game/modules/tome/data/zones/gorbat-pride/npcs.lua @@ -34,8 +34,8 @@ newEntity{ base="BASE_NPC_ORC_GORBAT", define_as = "GORBAT", allow_infinite_dungeon = true, name = "Gorbat, Supreme Wyrmic of the Pride", color=colors.VIOLET, unique = true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_orc_gorbat__supreme_wyrmic_of_the_pride.png", display_h=2, display_y=-1}}}, - desc = [[An orc with scaly skin, claws and a pair of small wings on his back.]], - killer_message = "and fed to the hatchlings", + desc = _t[[An orc with scaly skin, claws and a pair of small wings on his back.]], + killer_message = _t"and fed to the hatchlings", level_range = {40, nil}, exp_worth = 1, rank = 5, max_life = 250, life_rating = 29, fixed_rating = true, diff --git a/game/modules/tome/data/zones/gorbat-pride/objects.lua b/game/modules/tome/data/zones/gorbat-pride/objects.lua index 1cf09dd9aadf3f805e456e3da0668955f3717f72..0ef52315e3de5154d599cf984247dc81c53f8b46 100644 --- a/game/modules/tome/data/zones/gorbat-pride/objects.lua +++ b/game/modules/tome/data/zones/gorbat-pride/objects.lua @@ -24,7 +24,7 @@ load("/data/general/objects/lore/orc-prides.lua") newEntity{ base = "BASE_LORE", define_as = "NOTE_LORE", name = "draft note", lore="gorbat-pride-note", - desc = [[A note.]], + desc = _t[[A note.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/gorbat-pride/zone.lua b/game/modules/tome/data/zones/gorbat-pride/zone.lua index a8d154c19988fe7f538baf66b23fc79be5af752a..e2b342e7f4b41fa9950d58cfd4f0bdafe5f1c67c 100644 --- a/game/modules/tome/data/zones/gorbat-pride/zone.lua +++ b/game/modules/tome/data/zones/gorbat-pride/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Gorbat Pride", + name = _t"Gorbat Pride", level_range = {35, 60}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/grushnak-pride/mapscripts/last.lua b/game/modules/tome/data/zones/grushnak-pride/mapscripts/last.lua index c3936a5a5fc5ad8e8a317f234462e0b1f2405f8c..886d89604a098cc83cdf7e99d6ed7b122f52abb1 100644 --- a/game/modules/tome/data/zones/grushnak-pride/mapscripts/last.lua +++ b/game/modules/tome/data/zones/grushnak-pride/mapscripts/last.lua @@ -28,8 +28,8 @@ self:defineTile('"', "HARDWALL") self:defineTile('t', "TRAINING_DUMMY") self:defineTile('b', "FLOOR", nil, "ORC_ELITE_BERSERKER") self:defineTile('f', "FLOOR", nil, "ORC_ELITE_FIGHTER") -self:defineTile("B", "FLOOR", nil, {random_filter={define_as="ORC_ELITE_BERSERKER", random_boss={name_scheme="Combat Trainer #rng#", force_classes={Berserker=true}, nb_classes=1, class_filter=function(d) return d.name ~= "Berserker" end, loot_quality="store", loot_quantity=1, rank=3.5}}}) -self:defineTile("F", "FLOOR", nil, {random_filter={define_as="ORC_ELITE_FIGHTER", random_boss={name_scheme="Combat Trainer #rng#", force_classes={Bulwark=true}, nb_classes=1, class_filter=function(d) return d.name ~= "Bulwark" end, loot_quality="store", loot_quantity=1, loot_unique=true, no_loot_randart=true, rank=3.5}}}) +self:defineTile("B", "FLOOR", nil, {random_filter={define_as="ORC_ELITE_BERSERKER", random_boss={name_scheme=_t"Combat Trainer #rng#", force_classes={Berserker=true}, nb_classes=1, class_filter=function(d) return d.name ~= "Berserker" end, loot_quality="store", loot_quantity=1, rank=3.5}}}) +self:defineTile("F", "FLOOR", nil, {random_filter={define_as="ORC_ELITE_FIGHTER", random_boss={name_scheme=_t"Combat Trainer #rng#", force_classes={Bulwark=true}, nb_classes=1, class_filter=function(d) return d.name ~= "Bulwark" end, loot_quality="store", loot_quantity=1, loot_unique=true, no_loot_randart=true, rank=3.5}}}) self:defineTile('>', "SLIME_TUNNELS", nil, nil, nil, {special="slimepit"}) self:defineTile(";", "UNDERGROUND_CREEP", nil, nil, nil, {special="slimepit"}) self:defineTile("s", "UNDERGROUND_CREEP", nil, {random_filter={special_rarity="slime_rarity"}}, nil, {special="slimepit"}) diff --git a/game/modules/tome/data/zones/grushnak-pride/mapscripts/main.lua b/game/modules/tome/data/zones/grushnak-pride/mapscripts/main.lua index a48f28b22be66d7a14b0fe4dd0bbfd649f993f15..427fe63fb54390f8807991f5cc18fbfd611f67b8 100644 --- a/game/modules/tome/data/zones/grushnak-pride/mapscripts/main.lua +++ b/game/modules/tome/data/zones/grushnak-pride/mapscripts/main.lua @@ -23,8 +23,8 @@ self:defineTile('"', "HARDWALL") self:defineTile('t', "TRAINING_DUMMY") self:defineTile('b', "FLOOR", nil, "ORC_ELITE_BERSERKER") self:defineTile('f', "FLOOR", nil, "ORC_ELITE_FIGHTER") -self:defineTile("B", "FLOOR", nil, {random_filter={define_as="ORC_ELITE_BERSERKER", random_boss={name_scheme="Combat Trainer #rng#", force_classes={Berserker=true}, nb_classes=1, class_filter=function(d) return d.name ~= "Berserker" end, loot_quality="store", loot_quantity=1, rank=3.5}}}) -self:defineTile("F", "FLOOR", nil, {random_filter={define_as="ORC_ELITE_FIGHTER", random_boss={name_scheme="Combat Trainer #rng#", force_classes={Bulwark=true}, nb_classes=1, class_filter=function(d) return d.name ~= "Bulwark" end, loot_quality="store", loot_quantity=1, loot_unique=true, no_loot_randart=true, rank=3.5}}}) +self:defineTile("B", "FLOOR", nil, {random_filter={define_as="ORC_ELITE_BERSERKER", random_boss={name_scheme=_t"Combat Trainer #rng#", force_classes={Berserker=true}, nb_classes=1, class_filter=function(d) return d.name ~= "Berserker" end, loot_quality="store", loot_quantity=1, rank=3.5}}}) +self:defineTile("F", "FLOOR", nil, {random_filter={define_as="ORC_ELITE_FIGHTER", random_boss={name_scheme=_t"Combat Trainer #rng#", force_classes={Bulwark=true}, nb_classes=1, class_filter=function(d) return d.name ~= "Bulwark" end, loot_quality="store", loot_quantity=1, loot_unique=true, no_loot_randart=true, rank=3.5}}}) -- Make the barracks local bsp = BSP.new(5, 5, 6):make(30, 30, '.', '#') diff --git a/game/modules/tome/data/zones/grushnak-pride/npcs.lua b/game/modules/tome/data/zones/grushnak-pride/npcs.lua index ab627972d9fbd6d7a1ec44021743bd091f0a1636..2ac7dde1b2fdbc6063ed43c5d9fa56faaaebb84d 100644 --- a/game/modules/tome/data/zones/grushnak-pride/npcs.lua +++ b/game/modules/tome/data/zones/grushnak-pride/npcs.lua @@ -29,8 +29,8 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ base="BASE_NPC_ORC_GRUSHNAK", define_as = "GRUSHNAK", allow_infinite_dungeon = true, name = "Grushnak, Battlemaster of the Pride", color=colors.VIOLET, unique = true, - desc = [[An old orc, covered in battle scars, he looks fierce and very, very, dangerous.]], - killer_message = "and mounted on the barracks wall", + desc = _t[[An old orc, covered in battle scars, he looks fierce and very, very, dangerous.]], + killer_message = _t"and mounted on the barracks wall", level_range = {45, nil}, exp_worth = 1, rank = 5, max_life = 700, life_rating = 25, fixed_rating = true, diff --git a/game/modules/tome/data/zones/grushnak-pride/objects.lua b/game/modules/tome/data/zones/grushnak-pride/objects.lua index 232f980f7d516ea7e701c37dee85944621498c0e..8263d1698d3807b1cbef1f97014f011f6b9d7bed 100644 --- a/game/modules/tome/data/zones/grushnak-pride/objects.lua +++ b/game/modules/tome/data/zones/grushnak-pride/objects.lua @@ -24,7 +24,7 @@ load("/data/general/objects/lore/orc-prides.lua") newEntity{ base = "BASE_LORE", define_as = "NOTE_LORE", name = "draft note", lore="grushnak-pride-note", - desc = [[A note.]], + desc = _t[[A note.]], rarity = false, encumberance = 0, } @@ -33,7 +33,7 @@ for i = 1, 5 do newEntity{ base = "BASE_LORE", define_as = "GARKUL_HISTORY"..i, name = "The Legend of Garkul", lore="garkul-history-"..i, - desc = [[The Legend of Garkul the Devourer, mightiest of all orcs.]], + desc = _t[[The Legend of Garkul the Devourer, mightiest of all orcs.]], rarity = false, } end diff --git a/game/modules/tome/data/zones/grushnak-pride/zone.lua b/game/modules/tome/data/zones/grushnak-pride/zone.lua index db6feaee4fe1998e79b4ec14b97948c13e48c557..812ccb8da3054363b20bc38ee36d1bd1fbb59586 100644 --- a/game/modules/tome/data/zones/grushnak-pride/zone.lua +++ b/game/modules/tome/data/zones/grushnak-pride/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Grushnak Pride", + name = _t"Grushnak Pride", level_range = {35, 60}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/halfling-ruins/npcs.lua b/game/modules/tome/data/zones/halfling-ruins/npcs.lua index 23755bfdb5111099c9b0a4f127818158bf1f268e..f9646658c2443995edf17eb4f3dad89bc9c08346 100644 --- a/game/modules/tome/data/zones/halfling-ruins/npcs.lua +++ b/game/modules/tome/data/zones/halfling-ruins/npcs.lua @@ -25,9 +25,9 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ define_as="SUBJECT_Z", name = "Subject Z", color=colors.VIOLET, display = "p", unique = true, - desc = "This seems to be the 'subject Z' the notes spoke about. He looks human, but this cannot be -- he would be about five thousand years old!", + desc = _t"This seems to be the 'subject Z' the notes spoke about. He looks human, but this cannot be -- he would be about five thousand years old!", type = "humanoid", subtype = "human", - killer_message = "and bloodily smeared across the granite walls", + killer_message = _t"and bloodily smeared across the granite walls", level_range = {10, nil}, exp_worth = 2, rank = 4, autolevel = "roguemage", @@ -82,15 +82,15 @@ newEntity{ define_as="SUBJECT_Z", wayist:setTarget(self) self:setTarget(wayist) - wayist:doEmote("Sacrifice for the Way!", 60) + wayist:doEmote(_t"Sacrifice for the Way!", 60) -- Warning for our good yeek folks to GTFOH if game:getPlayer(true) and game:getPlayer(true).starting_zone == "town-irkkk" then - require("engine.ui.Dialog"):yesnoLongPopup("#LIGHT_RED#Intense fight", "As you approach you come upon an other Wayist and receive a very clear mental message:\n#{italic}##UMBER#RUN AWAY! I am done for but you can save yourself still!#{normal}#", 600, function(ret) if ret then + require("engine.ui.Dialog"):yesnoLongPopup(_t"#LIGHT_RED#Intense fight", _t"As you approach you come upon an other Wayist and receive a very clear mental message:\n#{italic}##UMBER#RUN AWAY! I am done for but you can save yourself still!#{normal}#", 600, function(ret) if ret then who:setEffect(who.EFF_RECALL, 5, {}) game.bignews:say(120, "#GOLD#You hastily activate your Rod of Recall, vowing to come back later!") game.logPlayer(who, "Space around you starts to dissolve...") - end end, "Emergency recall", "Stay and fight!") + end end, _t"Emergency recall", _t"Stay and fight!") end end, @@ -102,13 +102,13 @@ newEntity{ define_as="SUBJECT_Z", local p = game.party:findMember{main=true} -- Yeeks really, really, really, hate halflings if p.descriptor.race == "Halfling" then - wayist:doEmote("Halfling?! DIE!!!!!", 70) + wayist:doEmote(_t"Halfling?! DIE!!!!!", 70) wayist:checkAngered(p, false, -200) elseif p.descriptor.race == "Yeek" then - wayist:doEmote("The Way sent you?", 70) + wayist:doEmote(_t"The Way sent you?", 70) wayist.can_talk = "yeek-wayist" else - wayist:doEmote("You.. saved me?", 70) + wayist:doEmote(_t"You.. saved me?", 70) wayist.can_talk = "yeek-wayist" end end, @@ -116,7 +116,7 @@ newEntity{ define_as="SUBJECT_Z", newEntity{ define_as="YEEK_WAYIST", name = "Yeek Wayist", color=colors.VIOLET, display = "y", unique = true, - desc = "This creature is about as tall as a halfling. It is covered in white silky fur and has a disproportionate head. The weirdest thing about it though, its weapon simply floats in front of it.", + desc = _t"This creature is about as tall as a halfling. It is covered in white silky fur and has a disproportionate head. The weirdest thing about it though, its weapon simply floats in front of it.", type = "humanoid", subtype = "yeek", level_range = {10, nil}, rank = 3, diff --git a/game/modules/tome/data/zones/halfling-ruins/objects.lua b/game/modules/tome/data/zones/halfling-ruins/objects.lua index cd4dc4e546c774fe63e1eff5da257f7452a8e446..f887eb5d096d7aec2d98f8e1d49e15bb497ec11d 100644 --- a/game/modules/tome/data/zones/halfling-ruins/objects.lua +++ b/game/modules/tome/data/zones/halfling-ruins/objects.lua @@ -23,7 +23,7 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "research log of halfling mage Hompalan", lore="halfling-research-note-"..i, - desc = [[A very faded research note, nearly unreadable.]], + desc = _t[[A very faded research note, nearly unreadable.]], rarity = false, encumberance = 0, } @@ -31,7 +31,7 @@ end newEntity{ base = "BASE_LORE", define_as = "DIRECTOR_HOMPALAN_ORDER", name = "order for Director Hompalan", lore="conclave-vault-start", - desc = [[A very faded note, nearly unreadable.]], + desc = _t[[A very faded note, nearly unreadable.]], rarity = false, encumberance = 0, } @@ -40,8 +40,8 @@ newEntity{ base = "BASE_CLOTH_ARMOR", power_source = {psionic=true}, unique = true, name = "Yeek-fur Robe", color = colors.WHITE, image = "object/artifact/yeek_fur_robe.png", - unided_name = "sleek fur robe", - desc = [[A beautifully soft robe of fine white fur. It looks designed for a halfling noble, with glorious sapphires sewn across the hems. But entrancing as it is, you can't help but feel a little queasy wearing it.]], + unided_name = _t"sleek fur robe", + desc = _t[[A beautifully soft robe of fine white fur. It looks designed for a halfling noble, with glorious sapphires sewn across the hems. But entrancing as it is, you can't help but feel a little queasy wearing it.]], level_range = {16, 30}, rarity = 20, cost = 250, diff --git a/game/modules/tome/data/zones/halfling-ruins/zone.lua b/game/modules/tome/data/zones/halfling-ruins/zone.lua index d9244c139be7b47e41fce027fba2de6a70535748..582c7ca6f50d5758e9b83ea940fffd6140118b0c 100644 --- a/game/modules/tome/data/zones/halfling-ruins/zone.lua +++ b/game/modules/tome/data/zones/halfling-ruins/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Ruined halfling complex", + name = _t"Ruined halfling complex", level_range = {10, 25}, level_scheme = "player", max_level = 4, diff --git a/game/modules/tome/data/zones/heart-gloom/npcs.lua b/game/modules/tome/data/zones/heart-gloom/npcs.lua index b072b5502fbf27f50639fa4e0b620de20a88570e..75fee7345f4749e1e80a464dd8edab8f0a56ca7e 100644 --- a/game/modules/tome/data/zones/heart-gloom/npcs.lua +++ b/game/modules/tome/data/zones/heart-gloom/npcs.lua @@ -30,7 +30,7 @@ if not currentZone.is_purified then local list = {"T_GLOOM", "T_AGONY", "T_REPROACH", "T_DARK_TENDRILS", "T_BLINDSIDE"} e[#e+1] = resolvers.talents{[ Talents[rng.table(list)] ] = {base=1, every=5, max=6}} e.rarity = math.ceil(e.rarity * mult + add) - e.name = rng.table{"gloomy ", "deformed ", "sick "}..e.name + e.name = rng.table{_t"gloomy ", _t"deformed ", _t"sick "}..e:getName() end end end @@ -43,7 +43,7 @@ else local list = {"T_PYROKINESIS", "T_DREAM_CRUSHER", "T_FORGE_SHIELD", "T_SOLIPSISM", "T_DREAM_WALK"} e[#e+1] = resolvers.talents{[ Talents[rng.table(list)] ] = {base=1, every=5, max=6}} e.rarity = math.ceil(e.rarity * mult + add) - e.name = rng.table{"dreaming ", "slumbering ", "dozing "}..e.name + e.name = rng.table{_t"dreaming ", _t"slumbering ", _t"dozing "}..e:getName() end end end @@ -60,8 +60,8 @@ newEntity{ base="BASE_NPC_CANINE", define_as = "WITHERING_THING", unique = true, name = "The Withering Thing", tint=colors.PURPLE, color=colors.VIOLET, - desc = [[This deformed beast might have been a wolf before, but now it is just... terrible.]], - killer_message = "and corrupted into a pile of writhing worms", + desc = _t[[This deformed beast might have been a wolf before, but now it is just... terrible.]], + killer_message = _t"and corrupted into a pile of writhing worms", level_range = {7, nil}, exp_worth = 2, max_life = 100, life_rating = 15, fixed_rating = true, stats = { str=20, dex=20, cun=12, wil=20, con=10 }, @@ -107,8 +107,8 @@ newEntity{ define_as = "DREAMING_ONE", unique = true, name = "The Dreaming One", tint=colors.PURPLE, color=colors.VIOLET, image = "npc/seed_of_dreams.png", - desc = [[This strange globe of blue light seems to be alive and asleep. Nothing about it moves, yet you can feel the crushing power of its dreams assaulting your mind.]], - killer_message = "and absorbed into nightmares forever", + desc = _t[[This strange globe of blue light seems to be alive and asleep. Nothing about it moves, yet you can feel the crushing power of its dreams assaulting your mind.]], + killer_message = _t"and absorbed into nightmares forever", level_range = {7, nil}, exp_worth = 2, max_life = 70, life_rating = 10, fixed_rating = true, stats = { str=10, dex=10, cun=20, wil=25, con=10 }, diff --git a/game/modules/tome/data/zones/heart-gloom/zone.lua b/game/modules/tome/data/zones/heart-gloom/zone.lua index b2f4b6064d36540a96bac9c8499696af5dc242bf..ff9b166edc2a54b8df58e6195fc7f51b8a3c334f 100644 --- a/game/modules/tome/data/zones/heart-gloom/zone.lua +++ b/game/modules/tome/data/zones/heart-gloom/zone.lua @@ -21,7 +21,7 @@ local layout = game.state:alternateZone(short_name, {"PURIFIED", 2}) local is_purified = layout == "PURIFIED" return { - name = "Heart of the Gloom", + name = _t"Heart of the Gloom", level_range = {1, 7}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/high-peak/grids.lua b/game/modules/tome/data/zones/high-peak/grids.lua index f6a6e199d4f8a4d4ec697412e8c89a07e236c552..12e38399a9e5c34a5517a6fb7851f5ffd8139fb7 100644 --- a/game/modules/tome/data/zones/high-peak/grids.lua +++ b/game/modules/tome/data/zones/high-peak/grids.lua @@ -30,7 +30,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. + desc = _t[[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. This one seems to go to the Far East.]], orb_portal = { @@ -39,7 +39,7 @@ This one seems to go to the Far East.]], change_wilderness = { spot = {type="farportal-end", subtype="fareast"}, }, - message = "#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on the Far East, with no trace of the portal...", + message = _t"#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on the Far East, with no trace of the portal...", on_use = function(self, who) end, }, @@ -62,7 +62,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. + desc = _t[[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. This one seems to go to the Iron Throne in the West.]], orb_portal = { @@ -71,7 +71,7 @@ This one seems to go to the Iron Throne in the West.]], change_wilderness = { spot = {type="farportal-end", subtype="iron-throne"}, }, - message = "#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on the slopes of the Iron Throne, with no trace of the portal...", + message = _t"#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on the slopes of the Iron Throne, with no trace of the portal...", on_use = function(self, who) end, }, @@ -94,7 +94,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. + desc = _t[[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. This one seems to go to an unknown place, seemingly out of this world. You dare not use it.]], } newEntity{ base = "VOID_PORTAL", define_as = "CVOID_PORTAL", @@ -116,7 +116,7 @@ local invocation_close = function(self, who) game.logPlayer(who, "#LIGHT_BLUE#You use the orb on the portal, shutting it down easily.") for i = 1, #game.level.spots do if game.level.spots[i] == spot then table.remove(game.level.spots, i) break end end local g = game.level.map(spot.x, spot.y, engine.Map.TERRAIN) - g.name = g.name .. " (disabled)" + g.name = ("%s (disabled)"):tformat(_t(g.name)) g.color_r = colors.WHITE.r g.color_g = colors.WHITE.g g.color_b = colors.WHITE.b @@ -132,7 +132,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[An invocation portal, perpetually summoning beings through it.]], + desc = _t[[An invocation portal, perpetually summoning beings through it.]], orb_command = { summon = "undead", special = invocation_close, @@ -146,7 +146,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[An invocation portal, perpetually summoning beings through it.]], + desc = _t[[An invocation portal, perpetually summoning beings through it.]], orb_command = { summon = "elemental", special = invocation_close, @@ -160,7 +160,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[An invocation portal, perpetually summoning beings through it.]], + desc = _t[[An invocation portal, perpetually summoning beings through it.]], orb_command = { summon = "dragon", special = invocation_close, @@ -174,7 +174,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[An invocation portal, perpetually summoning beings through it.]], + desc = _t[[An invocation portal, perpetually summoning beings through it.]], orb_command = { summon = "demon", special = invocation_close, @@ -188,17 +188,17 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[This portal seems to connect to another part of this level.]], + desc = _t[[This portal seems to connect to another part of this level.]], change_level_check = function() game.bignews:say(60, "#GOLD#This portal looks like it reacts only to the Orb of Many Ways.") return true end, change_level = 1, orb_portal = { nothing = true, - message = "#VIOLET#You enter the swirling portal and appear in a large room with other portals and the two wizards.", + message = _t"#VIOLET#You enter the swirling portal and appear in a large room with other portals and the two wizards.", on_use = function() game:changeLevel(11, nil, {direct_switch=true}) -- Special level, can not get to it any other way if game.player:hasQuest("high-peak"):isCompleted("sanctum-chat") then return end local Chat = require "engine.Chat" - local chat = Chat.new("sorcerer-fight", {name="Elandar"}, game.player) + local chat = Chat.new("sorcerer-fight", {name=_t"Elandar"}, game.player) chat:invoke() game.player:hasQuest("high-peak"):setStatus(engine.Quest.COMPLETED, "sanctum-chat") game.player:hasQuest("high-peak"):start_end_combat() diff --git a/game/modules/tome/data/zones/high-peak/npcs.lua b/game/modules/tome/data/zones/high-peak/npcs.lua index 4e94cbefe68736a51ed5d37eb2d5ef17b3307d05..4141380fdda3a60cf3c758124c6f0f2bec628795 100644 --- a/game/modules/tome/data/zones/high-peak/npcs.lua +++ b/game/modules/tome/data/zones/high-peak/npcs.lua @@ -58,7 +58,7 @@ newEntity{ faction = "sorcerers", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_shalore_elandar.png", display_h=2, display_y=-1}}}, - desc = [[Renegade mages from Angolwen, the Sorcerers have set up in the Far East, slowly growing corrupt. Now they must be stopped.]], + desc = _t[[Renegade mages from Angolwen, the Sorcerers have set up in the Far East, slowly growing corrupt. Now they must be stopped.]], level_range = {75, nil}, exp_worth = 15, max_life = 1000, life_rating = 36, fixed_rating = true, max_mana = 10000, @@ -150,7 +150,7 @@ newEntity{ female = true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_argoniel.png", display_h=2, display_y=-1}}}, - desc = [[Renegade mages from Angolwen, the Sorcerers have set up in the Far East, slowly growing corrupt. Now they must be stopped.]], + desc = _t[[Renegade mages from Angolwen, the Sorcerers have set up in the Far East, slowly growing corrupt. Now they must be stopped.]], level_range = {75, nil}, exp_worth = 15, max_life = 1000, life_rating = 42, fixed_rating = true, max_mana = 10000, @@ -242,7 +242,7 @@ newEntity{ define_as = "FALLEN_SUN_PALADIN_AERYN", faction = "sorcerers", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_fallen_sun_paladin_aeryn.png", display_h=2, display_y=-1}}}, name = "Fallen Sun Paladin Aeryn", color=colors.VIOLET, unique = true, - desc = [[A beautiful woman, clad in shining plate armour. Power radiates from her.]], + desc = _t[[A beautiful woman, clad in shining plate armour. Power radiates from her.]], level_range = {56, nil}, exp_worth = 2, rank = 5, size_category = 3, @@ -320,7 +320,7 @@ newEntity{ define_as = "HIGH_SUN_PALADIN_AERYN", faction = "sunwall", name = "High Sun Paladin Aeryn", color=colors.VIOLET, unique = "High Sun Paladin Aeryn High Peak Help", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_high_sun_paladin_aeryn.png", display_h=2, display_y=-1}}}, - desc = [[A beautiful woman, clad in shining plate armour. Power radiates from her.]], + desc = _t[[A beautiful woman, clad in shining plate armour. Power radiates from her.]], level_range = {56, nil}, exp_worth = 2, rank = 5, size_category = 3, diff --git a/game/modules/tome/data/zones/high-peak/objects.lua b/game/modules/tome/data/zones/high-peak/objects.lua index 3a73c24268d8095533d490cf8e97b1b4c7a74f29..413cb4f8999b94f2d094e11a78856574fb33c923 100644 --- a/game/modules/tome/data/zones/high-peak/objects.lua +++ b/game/modules/tome/data/zones/high-peak/objects.lua @@ -26,7 +26,7 @@ local Talents = require "engine.interface.ActorTalents" newEntity{ base = "BASE_LORE", define_as = "ARGONIEL_DIAMOND", image = "object/artifact/bloodsoaked_resonating_diamond.png", name = "bloodsoaked diamond", lore="argoniel-1", - desc = [[A strangely wet diamond.]], + desc = _t[[A strangely wet diamond.]], rarity = false, encumberance = 0, } @@ -34,7 +34,7 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_LORE", define_as = "ARGONIEL_ATHAME", image = "object/artifact/bloodsoaked_runed_athame.png", name = "bloodsoaked athame", lore="argoniel-2", - desc = [[A strangely wet athame.]], + desc = _t[[A strangely wet athame.]], rarity = false, encumberance = 0, } @@ -42,7 +42,7 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_LORE", define_as = "ELANDAR_JOURNAL1", name = "journal", lore="elandar-1", image = "object/artifact/elandars_journal.png", - desc = [[A magically-preserved journal.]], + desc = _t[[A magically-preserved journal.]], rarity = false, encumberance = 0, } @@ -50,7 +50,7 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_LORE", define_as = "ELANDAR_JOURNAL2", name = "journal", lore="elandar-2", image = "object/artifact/elandars_journal.png", - desc = [[A magically-preserved journal.]], + desc = _t[[A magically-preserved journal.]], rarity = false, encumberance = 0, } @@ -62,14 +62,14 @@ newEntity{ define_as = "STAFF_ABSORPTION_AWAKENED", base="BASE_STAFF", flavors = {magestaff=true}, name = "Awakened Staff of Absorption", -- identified=true, - unided_name = "ominous, dark runed staff", + unided_name = _t"ominous, dark runed staff", force_lore_artifact=true, display = "\\", color=colors.VIOLET, image = "object/artifact/staff_absorption.png", moddable_tile = "special/%s_awaken_staff_of_absorbtion", encumber = 7, material_level = 5, plot=true, - desc = [[Carved with runes of power, this staff seems to have been made long ago, yet it bears no signs of tarnish. + desc = _t[[Carved with runes of power, this staff seems to have been made long ago, yet it bears no signs of tarnish. Light around it seems to dim and you can feel its tremendous power simply by touching it. The Sorcerers seem to have awakened its power. #{italic}#"And lo they came to Amakthel himself, and thousands were killed in the assault on his throne, and three of the Godslayers were broken beneath his feet. But Falion with his dying breath pierced the great god on his knee with the icy sword Arkil, and seeing his opportunity Caldizar, leader of the Godslayers, advanced with the Staff of Absorption and struck a terrifying blow against Amakthel. So fell the greatest of the gods by the hands of his own children, and his face was forced into the dust."#{normal}#]], @@ -120,7 +120,7 @@ The Sorcerers seem to have awakened its power. max_power = 200, power_regen = 1, use_power = { - name = function(self, who) return ("absorb the essence (ignoring resistance and bypassing most defenses) of a target in range %d, draining 30%% of its life and increasing your own damage by 30%% for %d turns"):format(self.use_power.range, self.use_power.duration) end, + name = function(self, who) return ("absorb the essence (ignoring resistance and bypassing most defenses) of a target in range %d, draining 30%% of its life and increasing your own damage by 30%% for %d turns"):tformat(self.use_power.range, self.use_power.duration) end, power = 200, range = 8, duration =7, @@ -145,12 +145,12 @@ The Sorcerers seem to have awakened its power. if bone_shield then bone_shield.nb = 0 end who:attr("iceblock_pierce", 100) who:attr("damage_shield_penetrate", 100) - _, x = target:takeHit(target.max_life * 0.3, who, {special_death_msg = "was absorbed by the ".. self.name.." held by "..who.name:capitalize()}) + _, x = target:takeHit(target.max_life * 0.3, who, {special_death_msg = ("was absorbed by the %s held by %s"):tformat(self:getName(), who.name:capitalize())}) who:attr("damage_shield_penetrate", -100) who:attr("iceblock_pierce", -100) if bone_shield then bone_shield.nb = nb end - who:logCombat(target, "#Source# brandishes %s %s, absorbing the essence of #target#!", who:his_her(), self:getName({do_color=true, no_add_name=true}), target.name:capitalize()) - game:delayedLogDamage(who, target, x, ("#ORCHID# %d essence drain#LAST#"):format(x), false) + who:logCombat(target, "#Source# brandishes %s %s, absorbing the essence of #target#!", who:his_her(), self:getName({do_color=true, no_add_name=true}), target:getName():capitalize()) + game:delayedLogDamage(who, target, x, ("#ORCHID# %d essence drain#LAST#"):tformat(x), false) who:setEffect(who.EFF_POWER_OVERLOAD, self.use_power.duration, {power=30}) return {id=true, used=true} end @@ -161,12 +161,12 @@ newEntity{ define_as = "PEARL_LIFE_DEATH", power_source = {nature=true}, unique = true, type = "gem", subtype="white", - unided_name = "shining pearl", + unided_name = _t"shining pearl", name = "Pearl of Life and Death", display = "*", color=colors.WHITE, image = "object/artifact/pearl_of_life.png", encumber = 2, plot=true, - desc = [[A pearl, three times the size of a normal pearl, that glitters in infinite colours, with slight patterns ever shifting away.]], + desc = _t[[A pearl, three times the size of a normal pearl, that glitters in infinite colours, with slight patterns ever shifting away.]], carrier = { lite = 1, diff --git a/game/modules/tome/data/zones/high-peak/zone.lua b/game/modules/tome/data/zones/high-peak/zone.lua index 237f7ad911e1004c3599b502137adda863646751..5f29a8c850e41545490251f1549c7dd53a170789 100644 --- a/game/modules/tome/data/zones/high-peak/zone.lua +++ b/game/modules/tome/data/zones/high-peak/zone.lua @@ -18,10 +18,10 @@ -- darkgod@te4.org return { - name = "High Peak", + name = _t"High Peak", display_name = function(x, y) - if game.level.level == 11 then return "High Peak: The Sanctum" end - return "High Peak ("..game.level.level..")" + if game.level.level == 11 then return _t"High Peak: The Sanctum" end + return ("High Peak (%d)"):tformat(game.level.level) end, level_range = {55, 80}, level_scheme = "player", diff --git a/game/modules/tome/data/zones/illusory-castle/zone.lua b/game/modules/tome/data/zones/illusory-castle/zone.lua index fb43099164e42c62d6e397bc1e152f71db8c78e6..6cebc5790dea75f400547d5f8ed3e617ac309c9d 100644 --- a/game/modules/tome/data/zones/illusory-castle/zone.lua +++ b/game/modules/tome/data/zones/illusory-castle/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Illusory Castle", + name = _t"Illusory Castle", level_range = {25, 30}, level_scheme = "player", max_level = 5, diff --git a/game/modules/tome/data/zones/infinite-dungeon/grids.lua b/game/modules/tome/data/zones/infinite-dungeon/grids.lua index b19c86a2beb89b7a040fed3164bb8fce6591755c..ad03102022fb95ba942ce0f5668455cb5c81d682 100644 --- a/game/modules/tome/data/zones/infinite-dungeon/grids.lua +++ b/game/modules/tome/data/zones/infinite-dungeon/grids.lua @@ -236,7 +236,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[The rift leads to another floor of the dungeon.]], + desc=_t[[The rift leads to another floor of the dungeon.]], change_level = 1, } diff --git a/game/modules/tome/data/zones/infinite-dungeon/objects.lua b/game/modules/tome/data/zones/infinite-dungeon/objects.lua index efcbc100a878894df7b02c935ddf89da2d77c036..63b4fe856f835653fe48909869b81fa21d36ce95 100644 --- a/game/modules/tome/data/zones/infinite-dungeon/objects.lua +++ b/game/modules/tome/data/zones/infinite-dungeon/objects.lua @@ -24,7 +24,7 @@ for id, i in ipairs{1, 10, 20, 30, 40} do newEntity{ base = "BASE_LORE", define_as = "ID_HISTORY"..i, name = "The Hunter and the Hunted", lore="infinite-dungeon-history-"..id, - desc = [[The infinite hunt.]], + desc = _t[[The infinite hunt.]], image = "terrain/signpost.png", rarity = false, encumberance = 0, @@ -36,16 +36,16 @@ newEntity{ unique = true, type = "potion", subtype="potion", name = "Potion of Martial Prowess", - unided_name = "phial filled with metallic liquid", + unided_name = _t"phial filled with metallic liquid", level_range = {1, 50}, display = '!', color=colors.VIOLET, image="object/elixir_of_stoneskin.png", encumber = 0.4, rarity = 150, - desc = [[This potent elixir can give insights into martial combat to those unlucky enough to ignore the basics.]], + desc = _t[[This potent elixir can give insights into martial combat to those unlucky enough to ignore the basics.]], cost = 500, use_simple = { name = "quaff the elixir", use = function(self, who) - game.logSeen(who, "%s quaffs the %s!", who.name:capitalize(), self:getName()) + game.logSeen(who, "%s quaffs the %s!", who:getName():capitalize(), self:getName()) local done = 0 @@ -83,18 +83,18 @@ newEntity{ unique = true, type = "potion", subtype="potion", name = "Antimagic Wyrm Bile Extract", - unided_name = "phial filled with slimy liquid", + unided_name = _t"phial filled with slimy liquid", level_range = {10, 50}, display = '!', color=colors.VIOLET, image="object/elixir_of_avoidance.png", encumber = 0.4, rarity = 150, - desc = [[This potent elixir extracted from a powerful wyrm can grant the power to repel arcane forces.]], + desc = _t[[This potent elixir extracted from a powerful wyrm can grant the power to repel arcane forces.]], cost = 500, use_simple = { name = "quaff the elixir", use = function(self, who, inven, item) - local d = require("engine.ui.Dialog"):yesnoLongPopup("Antimagic", [[Quaffing this potion will grant you access to the antimagic talents but at the cost of all access to runes, arcane items and spells.]], 500, function(ret) + local d = require("engine.ui.Dialog"):yesnoLongPopup(_t"Antimagic", _t[[Quaffing this potion will grant you access to the antimagic talents but at the cost of all access to runes, arcane items and spells.]], 500, function(ret) if ret then - game.logSeen(who, "%s quaffs the %s!", who.name:capitalize(), self:getName()) + game.logSeen(who, "%s quaffs the %s!", who:getName():capitalize(), self:getName()) who:removeObject(inven, item) diff --git a/game/modules/tome/data/zones/infinite-dungeon/zone.lua b/game/modules/tome/data/zones/infinite-dungeon/zone.lua index 4b4d6eeb6efe407aaecba9b1d23ab9738edd997e..a082875c3c83df0fdafaa46cb52b6519e7a4356f 100644 --- a/game/modules/tome/data/zones/infinite-dungeon/zone.lua +++ b/game/modules/tome/data/zones/infinite-dungeon/zone.lua @@ -21,7 +21,7 @@ local rooms = {"random_room", {"pit",3}, {"greater_vault",7}} if game:isAddonActive("items-vault") then table.insert(rooms, {"!items-vault",5}) end return { - name = "Infinite Dungeon", + name = _t"Infinite Dungeon", level_range = {1, 1}, level_scheme = "player", max_level = 1000000000, @@ -108,7 +108,7 @@ return { -- Define standard floor layouts: local layouts = { { id_layout_name = "default", - desc = ", carefully excavated area", + desc = _t", carefully excavated area", class = "engine.generator.map.Roomer", nb_rooms = 4 + math.ceil(vx * vy * 10/4900), -- 12 @ 60x60, 14 @ 70x70, 21 @ 90x90 rooms = {"random_room", {"pit",3}, {"greater_vault",7}}, @@ -116,7 +116,7 @@ return { lite_room_chance = 50, }, { id_layout_name = "forest", - desc = " wilderness", + desc = _t" wilderness", class = "engine.generator.map.Forest", edge_entrances = rng.table{{2,8}, {4,6}, {6,4}, {8,2}}, zoom = rng.range(2,6), @@ -129,19 +129,19 @@ return { enemy_count = math.ceil(vx * vy *40/4900) -- more room for enemies and more cover on this map: avg: 30 @ 60x60, 40 @ 70x70, 67 @ 90x90 }, { id_layout_name = "cavern", - desc = " cavern", + desc = _t" cavern", class = "engine.generator.map.Cavern", zoom = math.random(12, 20), min_floor = math.floor(rng.range(vx * vy * 0.4 / 2, vx * vy * 0.4)), }, { id_layout_name = "maze", - desc = " network of corridors", + desc = _t" network of corridors", class = "engine.generator.map.Maze", widen_w = util.bound(rng.normal(2, 2), 1, 7), widen_h = util.bound(rng.normal(2, 2), 1, 7), }, { id_layout_name = "town", - desc = ", settled area", + desc = _t", settled area", class = "engine.generator.map.Town", building_chance = math.random(50,90), max_building_w = math.random(6,11), max_building_h = math.random(6,11), @@ -151,7 +151,7 @@ return { rooms_config = {forest_clearing={pit_chance=util.bound(lev, 10, 50), filters={{special=function(e) return e.rank <= 3 end}}}}, }, { id_layout_name = "building", - desc = ", constructed area", + desc = _t", constructed area", class = "engine.generator.map.Building", nb_rooms = math.random(0, math.ceil(vx*vy/2000)), rooms = {{"lesser_vault", math.floor(40/lev)}, "greater_vault"}, @@ -161,7 +161,7 @@ return { enemy_count = math.ceil(vx * vy *60/4900) -- more room for enemies and more cover on this map: avg: 44 @ 60x60, 60 @ 70x70, 99 @ 90x90 }, { id_layout_name = "octopus", - desc = ", subsided area", + desc = _t", subsided area", class = "engine.generator.map.Octopus", main_radius = {0.25, 0.35}, arms_radius = {0.1, 0.2}, @@ -169,7 +169,7 @@ return { nb_rooms = {5, 10}, }, { id_layout_name = "hexa", - desc = ", geometrically ordered area", + desc = _t", geometrically ordered area", class = "engine.generator.map.Hexacle", segment_wide_chance = 70, nb_segments = 8, @@ -183,23 +183,23 @@ return { -- define additional grid sets: local vgrids = { - {id_grids_name="default", floor="FLOOR", wall="WALL", door="DOOR", down="DOWN", desc="hewn"}, - {id_grids_name="tree", floor="GRASS", wall="TREE", door="GRASS_ROCK", down="GRASS_DOWN2", desc="sylvan"}, - {id_grids_name="underground", floor="UNDERGROUND_FLOOR", wall="UNDERGROUND_TREE", door="UNDERGROUND_ROCK", down="UNDERGROUND_LADDER_DOWN", desc="subterranean"}, - {id_grids_name="crystals", floor="CRYSTAL_FLOOR", wall={"CRYSTAL_WALL","CRYSTAL_WALL2","CRYSTAL_WALL3","CRYSTAL_WALL4","CRYSTAL_WALL5","CRYSTAL_WALL6","CRYSTAL_WALL7","CRYSTAL_WALL8","CRYSTAL_WALL9","CRYSTAL_WALL10","CRYSTAL_WALL11","CRYSTAL_WALL12","CRYSTAL_WALL13","CRYSTAL_WALL14","CRYSTAL_WALL15","CRYSTAL_WALL16","CRYSTAL_WALL17","CRYSTAL_WALL18","CRYSTAL_WALL19","CRYSTAL_WALL20",}, door="CRYSTAL_ROCK", down="CRYSTAL_LADDER_DOWN", desc="crystalline"}, - {id_grids_name="sand", floor="UNDERGROUND_SAND", wall="SANDWALL", door="SAND_ROCK", down="SAND_LADDER_DOWN", desc="sandy"}, - {id_grids_name="desert", floor="SAND", wall="PALMTREE", door="DESERT_ROCK", down="SAND_DOWN2", desc="arrid"}, - {id_grids_name="slime", floor="SLIME_FLOOR", wall="SLIME_WALL", door="SLIME_DOOR", down="SLIME_DOWN", desc="slimey"}, - {id_grids_name="jungle", floor="JUNGLE_GRASS", wall="JUNGLE_TREE", door="JUNGLE_ROCK", down="JUNGLE_GRASS_DOWN2", desc="humid, tropical"}, - {id_grids_name="cave", floor="CAVEFLOOR", wall="CAVEWALL", door="CAVE_ROCK", down="CAVE_LADDER_DOWN", desc="unhewn"}, - {id_grids_name="burntland", floor="BURNT_GROUND", wall="BURNT_TREE", door="BURNT_DOOR", down="BURNT_DOWN6", desc="burned"}, - {id_grids_name="mountain", floor="ROCKY_GROUND", wall="MOUNTAIN_WALL", door="DOOR", down="ROCKY_DOWN2", desc="mountainous"}, - {id_grids_name="mountain_forest", floor="ROCKY_GROUND", wall="ROCKY_SNOWY_TREE", door="ROCKY_SNOWY_DOOR", down="ROCKY_DOWN2", desc="alpine"}, - {id_grids_name="snowy_forest", floor="SNOWY_GRASS_2", wall="SNOWY_TREE_2", door="SNOWY_DOOR", down="snowy_DOWN2", desc="cold, wooded"}, - {id_grids_name="temporal_void", floor="VOID", wall="SPACETIME_RIFT2", door="VOID", down="RIFT2", desc="empty"}, - {id_grids_name="water", floor="WATER_FLOOR_FAKE", wall="WATER_WALL_FAKE", door="WATER_DOOR_FAKE", down="WATER_DOWN_FAKE", desc="flooded"}, - {id_grids_name="lava", floor="LAVA_FLOOR_FAKE", wall="LAVA_WALL_FAKE", door="LAVA_ROCK", down="LAVA_DOWN_FAKE", desc="molten"}, - {id_grids_name="autumn_forest", floor="AUTUMN_GRASS", wall="AUTUMN_TREE", door="AUTUMN_ROCK", down="AUTUMN_GRASS_DOWN2", desc="temperate"}, + {id_grids_name="default", floor="FLOOR", wall="WALL", door="DOOR", down="DOWN", desc=_t"hewn"}, + {id_grids_name="tree", floor="GRASS", wall="TREE", door="GRASS_ROCK", down="GRASS_DOWN2", desc=_t"sylvan"}, + {id_grids_name="underground", floor="UNDERGROUND_FLOOR", wall="UNDERGROUND_TREE", door="UNDERGROUND_ROCK", down="UNDERGROUND_LADDER_DOWN", desc=_t"subterranean"}, + {id_grids_name="crystals", floor="CRYSTAL_FLOOR", wall={"CRYSTAL_WALL","CRYSTAL_WALL2","CRYSTAL_WALL3","CRYSTAL_WALL4","CRYSTAL_WALL5","CRYSTAL_WALL6","CRYSTAL_WALL7","CRYSTAL_WALL8","CRYSTAL_WALL9","CRYSTAL_WALL10","CRYSTAL_WALL11","CRYSTAL_WALL12","CRYSTAL_WALL13","CRYSTAL_WALL14","CRYSTAL_WALL15","CRYSTAL_WALL16","CRYSTAL_WALL17","CRYSTAL_WALL18","CRYSTAL_WALL19","CRYSTAL_WALL20",}, door="CRYSTAL_ROCK", down="CRYSTAL_LADDER_DOWN", desc=_t"crystalline"}, + {id_grids_name="sand", floor="UNDERGROUND_SAND", wall="SANDWALL", door="SAND_ROCK", down="SAND_LADDER_DOWN", desc=_t"sandy"}, + {id_grids_name="desert", floor="SAND", wall="PALMTREE", door="DESERT_ROCK", down="SAND_DOWN2", desc=_t"arrid"}, + {id_grids_name="slime", floor="SLIME_FLOOR", wall="SLIME_WALL", door="SLIME_DOOR", down="SLIME_DOWN", desc=_t"slimey"}, + {id_grids_name="jungle", floor="JUNGLE_GRASS", wall="JUNGLE_TREE", door="JUNGLE_ROCK", down="JUNGLE_GRASS_DOWN2", desc=_t"humid, tropical"}, + {id_grids_name="cave", floor="CAVEFLOOR", wall="CAVEWALL", door="CAVE_ROCK", down="CAVE_LADDER_DOWN", desc=_t"unhewn"}, + {id_grids_name="burntland", floor="BURNT_GROUND", wall="BURNT_TREE", door="BURNT_DOOR", down="BURNT_DOWN6", desc=_t"burned"}, + {id_grids_name="mountain", floor="ROCKY_GROUND", wall="MOUNTAIN_WALL", door="DOOR", down="ROCKY_DOWN2", desc=_t"mountainous"}, + {id_grids_name="mountain_forest", floor="ROCKY_GROUND", wall="ROCKY_SNOWY_TREE", door="ROCKY_SNOWY_DOOR", down="ROCKY_DOWN2", desc=_t"alpine"}, + {id_grids_name="snowy_forest", floor="SNOWY_GRASS_2", wall="SNOWY_TREE_2", door="SNOWY_DOOR", down="snowy_DOWN2", desc=_t"cold, wooded"}, + {id_grids_name="temporal_void", floor="VOID", wall="SPACETIME_RIFT2", door="VOID", down="RIFT2", desc=_t"empty"}, + {id_grids_name="water", floor="WATER_FLOOR_FAKE", wall="WATER_WALL_FAKE", door="WATER_DOOR_FAKE", down="WATER_DOWN_FAKE", desc=_t"flooded"}, + {id_grids_name="lava", floor="LAVA_FLOOR_FAKE", wall="LAVA_WALL_FAKE", door="LAVA_ROCK", down="LAVA_DOWN_FAKE", desc=_t"molten"}, + {id_grids_name="autumn_forest", floor="AUTUMN_GRASS", wall="AUTUMN_TREE", door="AUTUMN_ROCK", down="AUTUMN_GRASS_DOWN2", desc=_t"temperate"}, } zone:triggerHook{"InfiniteDungeon:getGrids", grids=vgrids} @@ -309,7 +309,7 @@ return { if x and y and ex and ex.change_level then -- update the exit tile ex = ex:clone() ex.show_tooltip = true - ex.desc = (ex.desc or "")..("\nEncroaching terrain:\n%s%s"):format(ae.grids.desc or "indistinct", ae.layout.desc or "continuation of the Infinite Dungeon") + ex.desc = (ex.desc or "")..("\nEncroaching terrain:\n%s%s"):tformat(ae.grids.desc or _t"indistinct", ae.layout.desc or _t"continuation of the Infinite Dungeon") -- make sure the exit is clearly marked (in case the nice tiler hides it) if ex.add_displays then -- migrate graphics up, but below actor and nice tiler 3d z levels for i, d in ipairs(ex.add_displays) do diff --git a/game/modules/tome/data/zones/keepsake-meadow/npcs.lua b/game/modules/tome/data/zones/keepsake-meadow/npcs.lua index 3b6df2d22431b187ab99f4f1f1e502f1ed79443f..860b1bf148bb8e1ef52fc47cada1bf212b21521b 100644 --- a/game/modules/tome/data/zones/keepsake-meadow/npcs.lua +++ b/game/modules/tome/data/zones/keepsake-meadow/npcs.lua @@ -47,7 +47,7 @@ newEntity{ ai = "dumb_talented_simple", ai_state = { ai_move="move_complex", talent_in=3, }, stats = { str=20, dex=8, mag=6, con=16 }, - emote_random = {chance=10, "To arms!", "Monster!", "Die!", "You will not kill us!", "We will end this!"}, + emote_random = {chance=10, _t"To arms!", _t"Monster!", _t"Die!", _t"You will not kill us!", _t"We will end this!"}, on_die = function(self, who) -- wait for all caravanners to die @@ -62,7 +62,7 @@ newEntity{ newEntity{ base = "BASE_CARAVANEER", define_as = "CARAVAN_MERCHANT", name = "caravan merchant", color=colors.KHAKI, image="npc/humanoid_human_spectator02.png", subtype = "human", - desc = [[A caravan merchant.]], + desc = _t[[A caravan merchant.]], level_range = {1, 10}, exp_worth = 1, max_life = resolvers.rngavg(40,50), life_rating = 7, combat_armor = 0, combat_def = 6, @@ -75,7 +75,7 @@ newEntity{ base = "BASE_CARAVANEER", define_as = "CARAVAN_MERCHANT", newEntity{ base = "BASE_CARAVANEER", define_as = "CARAVAN_GUARD", name = "caravan guard", color=colors.KHAKI, image="npc/humanoid_human_spectator.png", subtype = "human", - desc = [[A caravan guard.]], + desc = _t[[A caravan guard.]], level_range = {1, 15}, exp_worth = 1, max_life = resolvers.rngavg(80,90), life_rating = 11, combat_armor = 0, combat_def = 6, @@ -91,7 +91,7 @@ newEntity{ base = "BASE_CARAVANEER", define_as = "CARAVAN_GUARD", newEntity{ base = "BASE_CARAVANEER", define_as = "CARAVAN_PORTER", name = "caravan porter", color=colors.KHAKI, image="npc/humanoid_human_spectator03.png", subtype = "human", - desc = [[A caravan porter.]], + desc = _t[[A caravan porter.]], level_range = {1, 8}, exp_worth = 1, max_life = resolvers.rngavg(60,70), life_rating = 8, combat_armor = 0, combat_def = 6, @@ -103,7 +103,7 @@ newEntity{ base = "BASE_CARAVANEER", define_as = "CARAVAN_PORTER", newEntity{ base = "BASE_NPC_CANINE", define_as = "WAR_DOG", name = "war dog", color=colors.KHAKI, image="npc/canine_dw.png", - desc = [[This is a large dog, bred and trained for fighting.]], + desc = _t[[This is a large dog, bred and trained for fighting.]], level_range = {15, 30}, exp_worth = 1, max_life = resolvers.rngavg(60,100), life_rating = 10, combat_armor = 4, combat_def = 7, @@ -117,7 +117,7 @@ newEntity{ base = "BASE_NPC_CANINE", define_as = "WAR_DOG", newEntity{ base = "BASE_NPC_CANINE", define_as = "CORRUPTED_WAR_DOG", name = "corrupted war dog", color=colors.BLACK, image="npc/canine_dw.png", - desc = [[This is a large dog, bred and trained for fighting. Something about the way it moves doesn't look normal.]], + desc = _t[[This is a large dog, bred and trained for fighting. Something about the way it moves doesn't look normal.]], level_range = {15, 30}, exp_worth = 1, rarity = 5, cave_rarity = 5, max_life = resolvers.rngavg(60,100), @@ -170,7 +170,7 @@ newEntity{ newEntity{ base = "BASE_SHADOW", define_as = "SHADOW_CLAW", name = "shadow claw", image="npc/shadow-claw.png", - desc = [[A shadow, almost humanoid in shape. Long claws extend in front of it as is swims through the air.]], + desc = _t[[A shadow, almost humanoid in shape. Long claws extend in front of it as is swims through the air.]], rarity = 5, cave_rarity = 5, vault_rarity = 5, max_life = resolvers.rngavg(80,100), life_rating = 8, @@ -192,7 +192,7 @@ newEntity{ base = "BASE_SHADOW", define_as = "SHADOW_CLAW", newEntity{ base = "BASE_SHADOW", define_as = "SHADOW_STALKER", name = "shadow stalker", image="npc/shadow-stalker.png", - desc = [[A shadow, almost humanoid in shape. It seems to move carefully and with cunning before swiftly striking.]], + desc = _t[[A shadow, almost humanoid in shape. It seems to move carefully and with cunning before swiftly striking.]], rarity = 5, cave_rarity = 5, vault_rarity = 5, max_life = resolvers.rngavg(30,50), life_rating = 5, @@ -225,7 +225,7 @@ newEntity{ base = "BASE_SHADOW", define_as = "SHADOW_STALKER", newEntity{ base = "BASE_SHADOW", define_as = "SHADOW_CASTER", name = "shadow claw", image="npc/shadow-caster.png", - desc = [[A shadow, almost humanoid in shape. At times its form seems to be a force of will rather than something real.]], + desc = _t[[A shadow, almost humanoid in shape. At times its form seems to be a force of will rather than something real.]], rarity = 5, cave_rarity = 5, vault_rarity = 5, max_life = resolvers.rngavg(50,60), life_rating = 6, @@ -273,7 +273,7 @@ newEntity{ newEntity{ base = "BASE_BERETHH_COMPANION", define_as = "BERETHH_WARRIOR", name = "Companion Warrior", color=colors.DARK_GREEN, image="npc/humanoid_elenulach_thief.png", - desc = [[This elf is a companion of Berethh. He's dressed in light armor and wields a sword.]], + desc = _t[[This elf is a companion of Berethh. He's dressed in light armor and wields a sword.]], autolevel = "warrior", stats = { str=22, dex=16, mag=6, con=16 }, @@ -296,7 +296,7 @@ newEntity{ base = "BASE_BERETHH_COMPANION", define_as = "BERETHH_WARRIOR", newEntity{ base = "BASE_BERETHH_COMPANION", define_as = "BERETHH_ARCHER", name = "Companion Archer", color=colors.GREEN, image="npc/humanoid_elf_elven_archer.png", - desc = [[This elf is a companion of Berethh. He's dressed in light armor and wields a bow.]], + desc = _t[[This elf is a companion of Berethh. He's dressed in light armor and wields a bow.]], autolevel = "archer", stats = { str=16, dex=22, mag=6, con=14, cun=14 }, @@ -321,8 +321,8 @@ newEntity{ define_as="KYLESS", name = "Kyless", unique = true, type = "humanoid", subtype = "human", color=colors.VIOLET, display = "p", image = "player/cornac_male.png", - desc = "This is Kyless, your old friend. He seems dirtier than you recall and a good bit more dangerous.", - killer_message = "and fed to his corrupted dogs", + desc = _t"This is Kyless, your old friend. He seems dirtier than you recall and a good bit more dangerous.", + killer_message = _t"and fed to his corrupted dogs", stats = { str=10, dex=20, wil=40, cun=30, con=15 }, autolevel = "wildcaster", @@ -388,8 +388,8 @@ newEntity{ define_as="BERETHH", name = "Berethh", unique = true, type = "humanoid", subtype = "thalore", color=colors.LIGHT_GREEN, display = "p", image = "player/thalore_male.png", - desc = "This is Berethh, your old friend. He is dressed in well-worn leather and skillfully wields a bow. There is something noble about the way he carries himself but his expression carries no emotion.", - killer_message = "and quickly burned in a pyre", + desc = _t"This is Berethh, your old friend. He is dressed in well-worn leather and skillfully wields a bow. There is something noble about the way he carries himself but his expression carries no emotion.", + killer_message = _t"and quickly burned in a pyre", level_range = {20, 35}, exp_worth = 2, rank = 4, autolevel = "archer", diff --git a/game/modules/tome/data/zones/keepsake-meadow/objects.lua b/game/modules/tome/data/zones/keepsake-meadow/objects.lua index c506c35cabaf0a9f257a574bd6619f6af3b6558e..1106a20c3aa0386b6c092c5db93271ea30d5332f 100644 --- a/game/modules/tome/data/zones/keepsake-meadow/objects.lua +++ b/game/modules/tome/data/zones/keepsake-meadow/objects.lua @@ -23,7 +23,7 @@ newEntity{ base = "BASE_LORE", define_as = "BANDERS_NOTES", name = "folded up piece of paper", lore="keepsake-banders-notes", - desc = [[A folded up piece of paper with a few notes written on it.]], + desc = _t[[A folded up piece of paper with a few notes written on it.]], rarity = false, encumberance = 0, } @@ -42,7 +42,7 @@ newEntity{ material_level = 1, encumber = 0, not_in_stores = true, - desc = [[A small acorn, crafted crudely out of iron.]], + desc = _t[[A small acorn, crafted crudely out of iron.]], on_pickup = function(self, who) if who.player then who:hasQuest("keepsake"):on_pickup_acorn(who) @@ -70,7 +70,7 @@ newEntity{ material_level = 1, encumber = 0, not_in_stores = true, - desc = [[A small acorn, crafted crudely out of iron. It once belonged to Bander, but now it is yours. You find having the acorn helps to anchor your mind and prepare you for the trials ahead.]], + desc = _t[[A small acorn, crafted crudely out of iron. It once belonged to Bander, but now it is yours. You find having the acorn helps to anchor your mind and prepare you for the trials ahead.]], carrier = { resists={[DamageType.MIND] = 30, [DamageType.PHYSICAL] = 8,}, combat_mindpower = 15, @@ -98,7 +98,7 @@ newEntity{ material_level = 1, encumber = 0, not_in_stores = true, - desc = [[A small acorn, crafted crudely out of iron. It once belonged to Bander, but now it is yours. The acorn serves as a reminder of who and what you are.]], + desc = _t[[A small acorn, crafted crudely out of iron. It once belonged to Bander, but now it is yours. The acorn serves as a reminder of who and what you are.]], carrier = { resists={[DamageType.MIND] = 30,}, inc_damage = { [DamageType.PHYSICAL] = 12 }, @@ -116,7 +116,7 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "KYLESS_JOURNAL_"..i, name = "journal page", lore="keepsake-kyless-journal-"..i, - desc = [[A page containing an entry from Kyless' journal.]], + desc = _t[[A page containing an entry from Kyless' journal.]], rarity = false, is_magic_device = false, encumberance = 0, @@ -137,7 +137,7 @@ newEntity{ material_level = 1, encumber = 5, not_in_stores = true, - desc = [[This was the book that gave power to Kyless and eventually led to his doom. The book is simple in appearance, bound in leather with no markings on the cover. All of the pages are blank.]], + desc = _t[[This was the book that gave power to Kyless and eventually led to his doom. The book is simple in appearance, bound in leather with no markings on the cover. All of the pages are blank.]], } diff --git a/game/modules/tome/data/zones/keepsake-meadow/traps.lua b/game/modules/tome/data/zones/keepsake-meadow/traps.lua index d39010cdf2c2f4dfdd10ff8fc199756ca6831518..bd9e03d2bbcbee80710136f6479736a2abe7b555 100644 --- a/game/modules/tome/data/zones/keepsake-meadow/traps.lua +++ b/game/modules/tome/data/zones/keepsake-meadow/traps.lua @@ -18,13 +18,13 @@ -- darkgod@te4.org newEntity{ - type = "event", subtype = "event", id_by_type=false, unided_name = "trap", + type = "event", subtype = "event", id_by_type=false, unided_name = _t"trap", display = ' ', color=colors.WHITE, name = "creeping darkness", detect_power = 99999, disarm_power = 99999, rarity = 3, level_range = {1, nil}, pressure_trap = false, - message = "A creeping darkness spreads through the air!", + message = _t"A creeping darkness spreads through the air!", triggered = function(self, x, y, who) local NPC = require "mod.class.NPC" local m = NPC.new{ @@ -41,13 +41,13 @@ newEntity{ } newEntity{ - type = "event", subtype = "event", id_by_type=false, unided_name = "trap", + type = "event", subtype = "event", id_by_type=false, unided_name = _t"trap", display = ' ', color=colors.WHITE, name = "summon shadow", detect_power = 99999, disarm_power = 99999, rarity = 3, level_range = {1, nil}, pressure_trap = false, - message = "A shadow traces across the floor.", + message = _t"A shadow traces across the floor.", triggered = function(self, x, y, who) if (game.level.remaining_summons or 5) <= 0 then return false end diff --git a/game/modules/tome/data/zones/keepsake-meadow/zone.lua b/game/modules/tome/data/zones/keepsake-meadow/zone.lua index 4afce0ba88676b9b3e674a096db82c21f06225ab..c546f4def08d74790f3a096513f3fb5905cc0f3c 100644 --- a/game/modules/tome/data/zones/keepsake-meadow/zone.lua +++ b/game/modules/tome/data/zones/keepsake-meadow/zone.lua @@ -1,5 +1,5 @@ return { - name = "Tranquil Meadow", + name = _t"Tranquil Meadow", level_range = {15, 25}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, diff --git a/game/modules/tome/data/zones/lake-nur/objects.lua b/game/modules/tome/data/zones/lake-nur/objects.lua index e57cbbbdbc3002958a16e548745cc153e9dcbd1d..e3b462aa10dfaf056febfb5e3d3f059d68ab228d 100644 --- a/game/modules/tome/data/zones/lake-nur/objects.lua +++ b/game/modules/tome/data/zones/lake-nur/objects.lua @@ -26,7 +26,7 @@ load("/data/general/objects/objects-maj-eyal.lua") newEntity{ base = "BASE_LORE", define_as = "NOTE", name = "journal page", lore="old-forest-note-5", - desc = [[A paper scrap, left by an adventurer.]], + desc = _t[[A paper scrap, left by an adventurer.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/lake-nur/zone.lua b/game/modules/tome/data/zones/lake-nur/zone.lua index 14153336a736588632b2cf09fdc4c43f8fef116e..bcf5da0f92e1dc21e48df80d91335513034cf48d 100644 --- a/game/modules/tome/data/zones/lake-nur/zone.lua +++ b/game/modules/tome/data/zones/lake-nur/zone.lua @@ -21,7 +21,7 @@ local layout = game.state:alternateZone(short_name, {"FLOODED", 2}) local is_flooded = layout == "FLOODED" return { - name = "Lake of Nur", + name = _t"Lake of Nur", level_range = {15, 25}, level_scheme = "player", max_level = 3, @@ -140,13 +140,13 @@ return { on_enter = function(lev, old_lev, newzone) local Dialog = require("engine.ui.Dialog") if lev == 2 and not game.level.shown_warning then - Dialog:simplePopup("Lake of Nur", "You descend into the submerged ruins. The walls look extremely ancient, yet you feel power within this place.") + Dialog:simplePopup(_t"Lake of Nur", _t"You descend into the submerged ruins. The walls look extremely ancient, yet you feel power within this place.") game.level.shown_warning = true elseif lev == 3 and not game.level.shown_warning and not game.level.data.is_flooded then game.level.shown_warning = true game.party:learnLore("lake-nur-not-flooded") elseif lev == 3 and not game.level.shown_warning and game.level.data.is_flooded then - Dialog:simpleLongPopup("Lake of Nur", "As you descend to the next level you traverse a kind of magical barrier keeping the water away. The barrier seems to be failing however and the next level is flooded too.", 400) + Dialog:simpleLongPopup(_t"Lake of Nur", _t"As you descend to the next level you traverse a kind of magical barrier keeping the water away. The barrier seems to be failing however and the next level is flooded too.", 400) game.level.shown_warning = true end end, diff --git a/game/modules/tome/data/zones/last-hope-graveyard/npcs.lua b/game/modules/tome/data/zones/last-hope-graveyard/npcs.lua index b2b019e4efbab02d1313d0dc271867a649107efb..b9ee04cf5e615203df9f878ca0621de7a29a3bf1 100644 --- a/game/modules/tome/data/zones/last-hope-graveyard/npcs.lua +++ b/game/modules/tome/data/zones/last-hope-graveyard/npcs.lua @@ -32,7 +32,7 @@ newEntity{ define_as = "CELIA", female = true, display = "p", color=colors.GREY, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_celia.png", display_h=2, display_y=-1}}}, - desc = [[A tall woman stands before you in a stained robe. Her sallow skin is marked by pox and open sores, but her eyes are bright and keen. The bulge around her abdomen would indicate that she is several months pregnant.]], + desc = _t[[A tall woman stands before you in a stained robe. Her sallow skin is marked by pox and open sores, but her eyes are bright and keen. The bulge around her abdomen would indicate that she is several months pregnant.]], autolevel = "caster", stats = { str=12, dex=17, mag=22, wil=22, con=12 }, @@ -110,7 +110,7 @@ newEntity{ define_as = "CELIA", end local Dialog = require("engine.ui.Dialog") - Dialog:simpleLongPopup("Celia", "As you deal the last blow you quickly carve out Celia's heart for your Lichform ritual.\nCarefully weaving magic around it to keep it beating.", 400) + Dialog:simpleLongPopup(_t"Celia", _t"As you deal the last blow you quickly carve out Celia's heart for your Lichform ritual.\nCarefully weaving magic around it to keep it beating.", 400) p:setQuestStatus("grave-necromancer", engine.Quest.COMPLETED, "kill-necromancer") else if game.party:knownLore("necromancer-primer-1") and diff --git a/game/modules/tome/data/zones/last-hope-graveyard/objects.lua b/game/modules/tome/data/zones/last-hope-graveyard/objects.lua index ebb9b7eb05dcb949d3b1b214d05fc4c069e07edf..66a2aae2f8c6ec81641260fd09aa674a4a05924c 100644 --- a/game/modules/tome/data/zones/last-hope-graveyard/objects.lua +++ b/game/modules/tome/data/zones/last-hope-graveyard/objects.lua @@ -26,7 +26,7 @@ load("/data/general/objects/objects-maj-eyal.lua") newEntity{ base = "BASE_LORE", define_as = "CELIA_NOTE", name = "creased letter", lore="celia-letter", - desc = [[A letter.]], + desc = _t[[A letter.]], rarity = false, encumberance = 0, } @@ -35,18 +35,18 @@ newEntity{ define_as = "CELIA_HEART", power_source = {arcane=true}, unique = true, type = "misc", subtype="heart", - unided_name = "bloody heart", + unided_name = _t"bloody heart", name = "Celia's Still Beating Heart", level_range = {20, 35}, rarity = false, display = "*", color=colors.RED, image = "object/artifact/celias_heart.png", encumber = 2, not_in_stores = true, - desc = [[The living heart of the necromancer Celia, carved out of her chest and preserved with magic.]], + desc = _t[[The living heart of the necromancer Celia, carved out of her chest and preserved with magic.]], max_power = 75, power_regen = 1, use_sound = "talents/slime", - use_power = { name = "extract a tiny part of Celia's soul", power = 75, use = function(self, who) + use_power = { name = _t"extract a tiny part of Celia's soul", power = 75, use = function(self, who) who:incSoul(1) who.changed = true game.logPlayer(who, "You squeeze Celia's heart in your hand, absorbing part of her soul into your necrotic aura.") diff --git a/game/modules/tome/data/zones/last-hope-graveyard/zone.lua b/game/modules/tome/data/zones/last-hope-graveyard/zone.lua index cd4516426007420ac3e1588528dbfdcf56eb018a..a8c746e6c131f4195cfdaddaee7c7cf351f90027 100644 --- a/game/modules/tome/data/zones/last-hope-graveyard/zone.lua +++ b/game/modules/tome/data/zones/last-hope-graveyard/zone.lua @@ -18,12 +18,12 @@ -- darkgod@te4.org return { - name = "Last Hope Graveyard", + name = _t"Last Hope Graveyard", display_name = function(x, y) - if game.level.level == 1 then return "Last Hope Graveyard" - elseif game.level.level == 2 then return "Mausoleum" + if game.level.level == 1 then return _t"Last Hope Graveyard" + elseif game.level.level == 2 then return _t"Mausoleum" end - return "Last Hope Graveyard" + return _t"Last Hope Graveyard" end, level_range = {15, 25}, level_scheme = "player", @@ -89,7 +89,7 @@ return { fct = function(self, x, y, who) local Dialog = require("engine.ui.Dialog") if not who:knowTalentType("cursed/cursed-aura") then - Dialog:simplePopup("Curse!", "The coffin was a decoy, a powerful curse was set upon you (check your talents).") + Dialog:simplePopup(_t"Curse!", _t"The coffin was a decoy, a powerful curse was set upon you (check your talents).") who:learnTalentType("cursed/cursed-aura", true) who:learnTalent(who.T_DEFILING_TOUCH, true, nil, {no_unlearn=true}) else @@ -130,7 +130,7 @@ return { open_coffin = function(self, x, y, who) local Dialog = require("engine.ui.Dialog") - Dialog:yesnoLongPopup("Open the coffin", "In rich families the dead are sometimes put to rest with some treasures. However they also sometime protect the coffins with powerful curses. Open?", 500, function(ret) + Dialog:yesnoLongPopup(_t"Open the coffin", _t"In rich families the dead are sometimes put to rest with some treasures. However they also sometime protect the coffins with powerful curses. Open?", 500, function(ret) if not ret then return end if self.coffin_open then @@ -186,7 +186,7 @@ return { on_enter = function(lev, old_lev, newzone) local Dialog = require("engine.ui.Dialog") if lev == 2 and not game.level.shown_warning then - Dialog:simpleLongPopup("Mausoleum", [[As you tread softly down the stairs a large stone slab slides into place behind you, blocking all retreat. The air is still and stuffy, and in this tight space you feel as if in a coffin, buried alive. + Dialog:simpleLongPopup(_t"Mausoleum", _t[[As you tread softly down the stairs a large stone slab slides into place behind you, blocking all retreat. The air is still and stuffy, and in this tight space you feel as if in a coffin, buried alive. Adding to your unease is a rising feeling of dread, overwhelming fear in fact. A hall of doors lies ahead, and behind each you sense a power of great malevolence and unholy horror. At the end of the corridor you see a faint light beneath a large black door, and you have a vague sense that the other doors are enslaved to this one - obedient, subservient, and waiting... diff --git a/game/modules/tome/data/zones/mark-spellblaze/grids.lua b/game/modules/tome/data/zones/mark-spellblaze/grids.lua index 5b61fc8a820bc691bbd6100d0a96f8b50ffa8fd3..88642a48beb84cae6940e449c7f34485fcf6cedc 100644 --- a/game/modules/tome/data/zones/mark-spellblaze/grids.lua +++ b/game/modules/tome/data/zones/mark-spellblaze/grids.lua @@ -30,7 +30,7 @@ newEntity{ base = "ALTAR", local o, item, inven = who:findInAllInventoriesBy("define_as", "SANDQUEEN_HEART") if not o then return end - require("engine.ui.Dialog"):yesnoPopup("Heart of the Sandworm Queen", "The altar seems to react to the heart. You feel you could corrupt it here.", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Heart of the Sandworm Queen", _t"The altar seems to react to the heart. You feel you could corrupt it here.", function(ret) if ret then return end local o = game.zone:makeEntityByName(game.level, "object", "CORRUPTED_SANDQUEEN_HEART", true) if o then @@ -40,6 +40,6 @@ newEntity{ base = "ALTAR", who:sortInven(who.INVEN_INVEN) game.log("#GREEN#You put the heart on the altar. The heart shrivels and shakes, vibrating with new corrupt forces.") end - end, "Cancel", "Corrupt", nil, true) + end, _t"Cancel", _t"Corrupt", nil, true) end, } diff --git a/game/modules/tome/data/zones/mark-spellblaze/npcs.lua b/game/modules/tome/data/zones/mark-spellblaze/npcs.lua index 18e83448bbf13859f33797ec29cfe83aaa2ef347..99674b697ad4ffdd3e1c6db8e9af4a222a0b6a57 100644 --- a/game/modules/tome/data/zones/mark-spellblaze/npcs.lua +++ b/game/modules/tome/data/zones/mark-spellblaze/npcs.lua @@ -30,7 +30,7 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ base = "BASE_NPC_ELVEN_CASTER", define_as = "GRAND_CORRUPTOR", allow_infinite_dungeon = true, name = "Grand Corruptor", color=colors.VIOLET, unique = true, - desc = [[An Elven corruptor, drawn to these blighted lands.]], + desc = _t[[An Elven corruptor, drawn to these blighted lands.]], level_range = {25, nil}, exp_worth = 0.3, rank = 4, max_vim = 800, diff --git a/game/modules/tome/data/zones/mark-spellblaze/objects.lua b/game/modules/tome/data/zones/mark-spellblaze/objects.lua index c16566d9aaeed49b4ab9445d786867cc64c602cc..bb2fcc3eecc229a6ec7c09feec84461ec1cb1ee3 100644 --- a/game/modules/tome/data/zones/mark-spellblaze/objects.lua +++ b/game/modules/tome/data/zones/mark-spellblaze/objects.lua @@ -22,7 +22,7 @@ load("/data/general/objects/objects-maj-eyal.lua") newEntity{ base = "BASE_LORE", define_as = "DRAFT_LETTER", name = "draft letter", lore="grand-corruptor-draft", - desc = [[A letter.]], + desc = _t[[A letter.]], rarity = false, encumberance = 0, } @@ -31,13 +31,13 @@ newEntity{ power_source = {arcane=true}, define_as = "CORRUPTED_SANDQUEEN_HEART", type = "corpse", subtype = "heart", image = "object/artifact/corrupted_queen_heart.png", - name = "Corrupted heart of the Sandworm Queen", unique=true, unided_name="pulsing organ", + name = "Corrupted heart of the Sandworm Queen", unique=true, unided_name=_t"pulsing organ", display = "*", color=colors.VIOLET, - desc = [[The heart of the Sandworm Queen, ripped from her dead body and corrupted in the mark of the spellblaze altar. You could ... consume it, should you feel mad enough.]], + desc = _t[[The heart of the Sandworm Queen, ripped from her dead body and corrupted in the mark of the spellblaze altar. You could ... consume it, should you feel mad enough.]], cost = 3000, quest = 1, - use_simple = { name="consume the heart", use = function(self, who) + use_simple = { name=_t"consume the heart", use = function(self, who) game.logPlayer(who, "#00FFFF#You consume the heart and feel the corruption fill you!") who.unused_stats = who.unused_stats + 3 who.unused_talents = who.unused_talents + 1 diff --git a/game/modules/tome/data/zones/mark-spellblaze/zone.lua b/game/modules/tome/data/zones/mark-spellblaze/zone.lua index 754371ef6df7ab3d4e0dc9bb7dfc913aae7d5993..9fe78ff7e5fb54430838f2484655c6a9a2ada9eb 100644 --- a/game/modules/tome/data/zones/mark-spellblaze/zone.lua +++ b/game/modules/tome/data/zones/mark-spellblaze/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Mark of the Spellblaze", + name = _t"Mark of the Spellblaze", level_range = {15, 25}, level_scheme = "player", max_level = 2, diff --git a/game/modules/tome/data/zones/maze/grids.lua b/game/modules/tome/data/zones/maze/grids.lua index fa51e4f987d15bb49cf8c01432277109aaad721e..c50efd4aa2abf3bec5544a490bd2dbe22494bc9b 100644 --- a/game/modules/tome/data/zones/maze/grids.lua +++ b/game/modules/tome/data/zones/maze/grids.lua @@ -38,9 +38,9 @@ newEntity{ pass_projectile = true, block_move = function(self, x, y, who, act) if not who or not act or not who.player then return true end - require("engine.ui.Dialog"):yesnoLongPopup("Crack in the floor", "This area appears to have been hit by a huge tremor, breaking the floor in a huge crack.\nYou think you can jump to the level below.", 400, function(ret) if ret then + require("engine.ui.Dialog"):yesnoLongPopup(_t"Crack in the floor", _t"This area appears to have been hit by a huge tremor, breaking the floor in a huge crack.\nYou think you can jump to the level below.", 400, function(ret) if ret then game:changeLevel(game.level.level + 1) - end end, "Jump", "Stay") + end end, _t"Jump", _t"Stay") return true end, } diff --git a/game/modules/tome/data/zones/maze/npcs.lua b/game/modules/tome/data/zones/maze/npcs.lua index 936e0d61f3c9c002d0fdd61a28aa08b549ca5c19..71797b3c2388c93200820ee131caabd26c9ad091 100644 --- a/game/modules/tome/data/zones/maze/npcs.lua +++ b/game/modules/tome/data/zones/maze/npcs.lua @@ -50,8 +50,8 @@ newEntity{ define_as = "HORNED_HORROR", name = "Horned Horror", display = "h", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_corrupted_horner_horror.png", display_h=2, display_y=-1}}}, - desc = [[Some horrible power has twisted this brutish minotaur into something altogether more terrifying. Huge tentacles undulate from its back as it clenches and unclenches its powerful fists.]], - killer_message = "and revived as a mindless horror", + desc = _t[[Some horrible power has twisted this brutish minotaur into something altogether more terrifying. Huge tentacles undulate from its back as it clenches and unclenches its powerful fists.]], + killer_message = _t"and revived as a mindless horror", level_range = {12, nil}, exp_worth = 2, max_life = 250, life_rating = 17, fixed_rating = true, stats = { str=20, dex=20, cun=20, mag=10, wil=10, con=20 }, @@ -90,7 +90,7 @@ newEntity{ define_as = "HORNED_HORROR", resolvers.inscriptions(1, {"invisibility rune"}), on_die = function(self, who) - game.state:activateBackupGuardian("NIMISIL", 2, 40, "Have you hard about the patrol that disappeared in the maze in the west?") + game.state:activateBackupGuardian("NIMISIL", 2, 40, _t"Have you hard about the patrol that disappeared in the maze in the west?") game.player:resolveSource():grantQuest("starter-zones") game.player:resolveSource():setQuestStatus("starter-zones", engine.Quest.COMPLETED, "maze") game.player:resolveSource():setQuestStatus("starter-zones", engine.Quest.COMPLETED, "maze-horror") @@ -104,8 +104,8 @@ newEntity{ define_as = "MINOTAUR_MAZE", name = "Minotaur of the Labyrinth", display = "H", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_minotaur_minotaur_of_the_labyrinth.png", display_h=2, display_y=-1}}}, - desc = [[A fearsome bull-headed monster, he swings a mighty axe as he curses all who defy him.]], - killer_message = "and hung on a wall-spike", + desc = _t[[A fearsome bull-headed monster, he swings a mighty axe as he curses all who defy him.]], + killer_message = _t"and hung on a wall-spike", level_range = {12, nil}, exp_worth = 2, max_life = 250, life_rating = 17, fixed_rating = true, max_stamina = 200, @@ -143,7 +143,7 @@ newEntity{ define_as = "MINOTAUR_MAZE", resolvers.inscriptions(2, "infusion"), on_die = function(self, who) - game.state:activateBackupGuardian("NIMISIL", 2, 40, "Have you hard about the patrol that disappeared in the maze in the west?") + game.state:activateBackupGuardian("NIMISIL", 2, 40, _t"Have you hard about the patrol that disappeared in the maze in the west?") game.player:resolveSource():grantQuest("starter-zones") game.player:resolveSource():setQuestStatus("starter-zones", engine.Quest.COMPLETED, "maze") end, @@ -153,7 +153,7 @@ newEntity{ base = "BASE_NPC_SPIDER", define_as = "NIMISIL", unique = true, allow_infinite_dungeon = true, name = "Nimisil", color=colors.VIOLET, - desc = [[Covered by eerie luminescent growths and protuberances, this spider now haunts the maze's silent passageways.]], + desc = _t[[Covered by eerie luminescent growths and protuberances, this spider now haunts the maze's silent passageways.]], level_range = {43, nil}, exp_worth = 3, max_life = 520, life_rating = 21, fixed_rating = true, rank = 4, diff --git a/game/modules/tome/data/zones/maze/objects.lua b/game/modules/tome/data/zones/maze/objects.lua index ce4b25a3631d12b31f6d43f9ac61517c0f2020ce..3f5fb4f65ed9cfa56a2a3f4e09a90fb14975f6af 100644 --- a/game/modules/tome/data/zones/maze/objects.lua +++ b/game/modules/tome/data/zones/maze/objects.lua @@ -23,13 +23,13 @@ for i = 1, 2 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "torn diary page", lore="maze-note-"..i, - desc = [[A diary, left by an adventurer.]], + desc = _t[[A diary, left by an adventurer.]], rarity = false, } end newEntity{ base = "BASE_LORE", define_as = "NOTE_LEARN_TRAP", name = "the perfect killing device", lore="maze-note-trap", unique=true, no_unique_lore=true, - desc = [[Some notes describing how to create poison gas traps, left by an unfortunate rogue.]], + desc = _t[[Some notes describing how to create poison gas traps, left by an unfortunate rogue.]], rarity = false, } diff --git a/game/modules/tome/data/zones/maze/zone.lua b/game/modules/tome/data/zones/maze/zone.lua index db08fe7117528dcf3a61cfa0769cbe3f451970a5..757e2da808ec7af30668f273061d28255ada89a9 100644 --- a/game/modules/tome/data/zones/maze/zone.lua +++ b/game/modules/tome/data/zones/maze/zone.lua @@ -21,7 +21,7 @@ local layout = game.state:alternateZone(short_name, {"COLLAPSED", 2}) if layout == "COLLAPSED" then return { - name = "The Maze", + name = _t"The Maze", level_range = {7, 16}, level_scheme = "player", max_level = 4, @@ -133,7 +133,7 @@ return { elseif layout == "DEFAULT" then return { - name = "The Maze", + name = _t"The Maze", level_range = {7, 16}, level_scheme = "player", max_level = 2, diff --git a/game/modules/tome/data/zones/murgol-lair/npcs.lua b/game/modules/tome/data/zones/murgol-lair/npcs.lua index a85668acea81ab0f768c4f3913c8a865997195c7..67b7c7924bee49093c8f909ab14177d90b24bfc6 100644 --- a/game/modules/tome/data/zones/murgol-lair/npcs.lua +++ b/game/modules/tome/data/zones/murgol-lair/npcs.lua @@ -26,8 +26,8 @@ newEntity{ base = "BASE_NPC_YAECH", define_as = "MURGOL", unique = true, name = "Murgol, the Yaech Lord", color=colors.VIOLET, - desc = [[You can feel the psionic waves of power come from this yaech.]], - killer_message = "and flushed out to sea", + desc = _t[[You can feel the psionic waves of power come from this yaech.]], + killer_message = _t"and flushed out to sea", level_range = {7, nil}, exp_worth = 2, max_life = 100, life_rating = 13, fixed_rating = true, psi_regen = 10, @@ -124,7 +124,7 @@ newEntity{ base = "BASE_NPC_NAGA", define_as = "NAGA_TIDEWARDEN", newEntity{ base = "BASE_NPC_NAGA", define_as = "NAGA_TIDECALLER", name = "naga tidecaller", color=colors.BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_naga_naga_tidecaller.png", display_h=2, display_y=-1}}}, - desc = [[A slithering noise accompanies the movement of this strange creature, whose snake-like tail gives rise to the body of a beautiful elf-like woman. As she moves her delicate hands water rises from the ground, and you feel that here is no mere monster, but a creature of awe and power.]], + desc = _t[[A slithering noise accompanies the movement of this strange creature, whose snake-like tail gives rise to the body of a beautiful elf-like woman. As she moves her delicate hands water rises from the ground, and you feel that here is no mere monster, but a creature of awe and power.]], level_range = {2, nil}, exp_worth = 3, female = true, rarity = 1, max_life = resolvers.rngavg(50,60), life_rating = 9, @@ -141,7 +141,7 @@ newEntity{ base = "BASE_NPC_NAGA", define_as = "NAGA_TIDECALLER", newEntity{ base = "BASE_NPC_NAGA", name = "naga nereid", color=colors.YELLOW, resolvers.nice_tile{tall=1}, - desc = [[Green eyes stare out from behind strands of long, golden hair, which falls down in waves over smooth, pale skin. Your eyes are drawn to the bare flesh, but as they look further they see dark scales stretching out into a long serpent's tail. You look up as she moves, her hair parting to reveal a slim and beautiful face with high cheekbones and full lips. Yet for all the allure of this wondrous creature the terror of the serpentine tail sends shivers down your spine.]], + desc = _t[[Green eyes stare out from behind strands of long, golden hair, which falls down in waves over smooth, pale skin. Your eyes are drawn to the bare flesh, but as they look further they see dark scales stretching out into a long serpent's tail. You look up as she moves, her hair parting to reveal a slim and beautiful face with high cheekbones and full lips. Yet for all the allure of this wondrous creature the terror of the serpentine tail sends shivers down your spine.]], level_range = {2, nil}, exp_worth = 3, female = true, rarity = 1, max_life = resolvers.rngavg(80,90), life_rating = 10, @@ -162,8 +162,8 @@ newEntity{ base="BASE_NPC_NAGA", define_as = "NASHVA", name = "Lady Nashva the Streambender", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_naga_lady_nashva_the_streambender.png", display_h=2, display_y=-1}}}, color=colors.VIOLET, female = true, - desc = [[Water circles slowly on the ground around this naga's tail. Her dark tail is coiled tight, making her look short, but her calm and confident stare assure you that she will not be easily overcome. As the water begins to rise around her the air starts to shimmer, and you feel her dark eyes are penetrating into you deeper than is comfortable.]], - killer_message = "and brought back to Vargh for experimentations", + desc = _t[[Water circles slowly on the ground around this naga's tail. Her dark tail is coiled tight, making her look short, but her calm and confident stare assure you that she will not be easily overcome. As the water begins to rise around her the air starts to shimmer, and you feel her dark eyes are penetrating into you deeper than is comfortable.]], + killer_message = _t"and brought back to Vargh for experimentations", level_range = {7, nil}, exp_worth = 2, max_life = 150, life_rating = 13, fixed_rating = true, max_stamina = 85, diff --git a/game/modules/tome/data/zones/murgol-lair/zone.lua b/game/modules/tome/data/zones/murgol-lair/zone.lua index 68dfa793e77e6e607cc557e6bece32696760afa9..aff65773464fe0bb68a8d98a8fb5005cad39fc31 100644 --- a/game/modules/tome/data/zones/murgol-lair/zone.lua +++ b/game/modules/tome/data/zones/murgol-lair/zone.lua @@ -21,7 +21,7 @@ local layout = game.state:alternateZone(short_name, {"INVASION", 2}) local is_invaded = layout == "INVASION" return { - name = "Murgol Lair", + name = _t"Murgol Lair", level_range = {1, 5}, level_scheme = "player", max_level = 3, @@ -79,7 +79,7 @@ return { on_enter = function(lev) if lev == 1 and not game.level.data.warned and game.zone.is_invaded then game.level.data.warned = true - require("engine.ui.Dialog"):simplePopup("Murgol Lair", "As you enter the lair you can hear the distorted sound of fighting. Somebody is already invading the lair.") + require("engine.ui.Dialog"):simplePopup(_t"Murgol Lair", _t"As you enter the lair you can hear the distorted sound of fighting. Somebody is already invading the lair.") end end, } diff --git a/game/modules/tome/data/zones/norgos-lair/npcs.lua b/game/modules/tome/data/zones/norgos-lair/npcs.lua index 82922f03d9eab0376e8372c5203b13a2444ebd42..3249b4f1ae8dce9ce402e2bcdb5bc28fd7943955 100644 --- a/game/modules/tome/data/zones/norgos-lair/npcs.lua +++ b/game/modules/tome/data/zones/norgos-lair/npcs.lua @@ -51,9 +51,9 @@ else name = "Norgos, the Frozen", display = "q", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/animal_bear_norgos_the_frozen.png", display_h=2, display_y=-1}}}, - desc = [[This ancient bear long guarded the western side of the forest, but as of late he started growing mad, attacking even the Thaloren. + desc = _t[[This ancient bear long guarded the western side of the forest, but as of late he started growing mad, attacking even the Thaloren. It seems to have fallen prey to the shivgoroth invading the area. Dead and frozen, it seems like a statue, animated by the elementals.]], - killer_message = "and was turned into icicles", + killer_message = _t"and was turned into icicles", level_range = {7, nil}, exp_worth = 2, max_life = 200, life_rating = 17, fixed_rating = true, life_regen = 0, max_stamina = 85, @@ -96,8 +96,8 @@ newEntity{ base="BASE_NPC_BEAR", define_as = "NORGOS", name = "Norgos, the Guardian", display = "q", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/animal_bear_norgos_the_guardian.png", display_h=2, display_y=-1}}}, - desc = [[This ancient bear long guarded the western side of the forest, but as of late he started growing mad, attacking even the Thaloren.]], - killer_message = "and was feasted upon by wolves", + desc = _t[[This ancient bear long guarded the western side of the forest, but as of late he started growing mad, attacking even the Thaloren.]], + killer_message = _t"and was feasted upon by wolves", level_range = {7, nil}, exp_worth = 2, max_life = 200, life_rating = 17, fixed_rating = true, max_stamina = 85, diff --git a/game/modules/tome/data/zones/norgos-lair/zone.lua b/game/modules/tome/data/zones/norgos-lair/zone.lua index 5763252426c8612dd77b5102d53e425ce824eda2..4047f16e5f884d0e559e7d9e3078c1a1b2f00249 100644 --- a/game/modules/tome/data/zones/norgos-lair/zone.lua +++ b/game/modules/tome/data/zones/norgos-lair/zone.lua @@ -21,7 +21,7 @@ local layout = game.state:alternateZoneTier1(short_name, {"INVADED", 1}) local is_invaded = layout == "INVADED" return { - name = "Norgos Lair", + name = _t"Norgos Lair", level_range = {1, 7}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/noxious-caldera/grids.lua b/game/modules/tome/data/zones/noxious-caldera/grids.lua index c630f7717a96985849f55b89e98027feb15d3e7f..78b344fe0cc9d1445392b43252b9f18389f028e8 100644 --- a/game/modules/tome/data/zones/noxious-caldera/grids.lua +++ b/game/modules/tome/data/zones/noxious-caldera/grids.lua @@ -34,7 +34,7 @@ newEntity{ next_dream = 1, block_move = function(self, x, y, who, act) if who == game.player and act then - require("engine.ui.Dialog"):yesnoLongPopup("Altar of Dreams", "Looking into the altar will let you experience a dream. Without the influence of Mindworm, it'll however have no power over your body. Do you wish to look?", 400, function(ret) + require("engine.ui.Dialog"):yesnoLongPopup(_t"Altar of Dreams", _t"Looking into the altar will let you experience a dream. Without the influence of Mindworm, it'll however have no power over your body. Do you wish to look?", 400, function(ret) if ret then local dream = self.next_dream self.next_dream = util.boundWrap(self.next_dream+1, 1, game.zone.max_dreams) diff --git a/game/modules/tome/data/zones/noxious-caldera/npcs.lua b/game/modules/tome/data/zones/noxious-caldera/npcs.lua index 5310dcfcc53c671b89001afaa8d2c8cc5cef4168..92f2d4798b3287c42bb54bf300a498681bb8642b 100644 --- a/game/modules/tome/data/zones/noxious-caldera/npcs.lua +++ b/game/modules/tome/data/zones/noxious-caldera/npcs.lua @@ -39,8 +39,8 @@ newEntity{ define_as = "MINDWORM", type = "humanoid", subtype = "thalore", unique = true, name = "Mindworm", display = "p", color=colors.VIOLET, - desc = [[This tall Thalore's eyes are lost in the distance; you can sense that he barely sees you.]], - killer_message = "and mind-probed", + desc = _t[[This tall Thalore's eyes are lost in the distance; you can sense that he barely sees you.]], + killer_message = _t"and mind-probed", level_range = {25, nil}, exp_worth = 2, max_life = 100, life_rating = 10, fixed_rating = true, psi_rating = 9, @@ -90,6 +90,6 @@ newEntity{ define_as = "MINDWORM", on_die = function(self) game.zone.fumes_active = false game.level.turn_counter = nil - require("engine.ui.Dialog"):simplePopup("Fumes", "As Mindworm dies you can feel the fumes getting less poisonous for your mind.") + require("engine.ui.Dialog"):simplePopup(_t"Fumes", _t"As Mindworm dies you can feel the fumes getting less poisonous for your mind.") end, } diff --git a/game/modules/tome/data/zones/noxious-caldera/objects.lua b/game/modules/tome/data/zones/noxious-caldera/objects.lua index a8f81b626ed7515dab18d07d3e2a0d3a49521a53..45bd758b8794de622216b6424b949784057bece3 100644 --- a/game/modules/tome/data/zones/noxious-caldera/objects.lua +++ b/game/modules/tome/data/zones/noxious-caldera/objects.lua @@ -23,7 +23,7 @@ for i = 1, 5 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "tattered paper scrap", lore="noxious-caldera-note-"..i, - desc = [[A paper scrap, left by an adventurer.]], + desc = _t[[A paper scrap, left by an adventurer.]], rarity = false, } end diff --git a/game/modules/tome/data/zones/noxious-caldera/zone.lua b/game/modules/tome/data/zones/noxious-caldera/zone.lua index 2137a0908105748abda786f109e520617de1a5e6..905b71ad0b6fbd0ebece01b95ea5df3ff40b27f3 100644 --- a/game/modules/tome/data/zones/noxious-caldera/zone.lua +++ b/game/modules/tome/data/zones/noxious-caldera/zone.lua @@ -18,8 +18,8 @@ -- darkgod@te4.org return { - name = "Noxious Caldera", - display_name = function(x, y) return "Dogroth Caldera" end, + name = _t"Noxious Caldera", + display_name = function(x, y) return _t"Dogroth Caldera" end, variable_zone_name = true, level_range = {25, 35}, level_scheme = "player", @@ -135,7 +135,7 @@ return { game.level.turn_counter = 60 * 10 * (game.level.level == 1 and 10 or 1) game.level.max_turn_counter = 60 * 10 * (game.level.level == 1 and 10 or 1) - game.level.turn_counter_desc = "The noxious fumes of the caldera are slowly affecting you..." + game.level.turn_counter_desc = _t"The noxious fumes of the caldera are slowly affecting you..." end, on_turn = function(self) @@ -154,7 +154,7 @@ return { max_dreams = 2, run_dream = function(dangerous, dream) game.party:setPlayer(game:getPlayer(true)) - if game.player.runStop then game.player:runStop("dream") end + if game.player.runStop then game.player:runStop(_t"dream") end local Map = require "engine.Map" for pmem, def in pairs(game.party.members) do if pmem.x and pmem.y and game.level.map(pmem.x, pmem.y, Map.ACTOR) == pmem then diff --git a/game/modules/tome/data/zones/old-forest/npcs.lua b/game/modules/tome/data/zones/old-forest/npcs.lua index e3b85f2ff368a5c60e3a3fae193c5b9420e837fc..9ac4409b81b4b8fe95c1e6062f7100552f13c090 100644 --- a/game/modules/tome/data/zones/old-forest/npcs.lua +++ b/game/modules/tome/data/zones/old-forest/npcs.lua @@ -46,8 +46,8 @@ newEntity{ define_as = "SHARDSKIN", name = "Shardskin", display = "%", color=colors.VIOLET, image = "npc/immovable_crystal_golden_crystal.png", - desc = [[This crystalline structure seems to be filled with a malevolent aura. Through the crystal surface you can still see the remains of what once was a huge tree.]], - killer_message = "and integrated into the crystaline structure", + desc = _t[[This crystalline structure seems to be filled with a malevolent aura. Through the crystal surface you can still see the remains of what once was a huge tree.]], + killer_message = _t"and integrated into the crystaline structure", level_range = {12, nil}, exp_worth = 2, max_life = 200, life_rating = 17, fixed_rating = true, stats = { str=15, dex=10, cun=8, mag=20, wil=20, con=20 }, @@ -82,7 +82,7 @@ newEntity{ define_as = "SHARDSKIN", resolvers.inscriptions(1, "rune"), on_die = function(self, who) - game.state:activateBackupGuardian("SNAPROOT", 3, 50, "Have you heard, the old forest seems to have been claimed by a new evil!") + game.state:activateBackupGuardian("SNAPROOT", 3, 50, _t"Have you heard, the old forest seems to have been claimed by a new evil!") game.player:resolveSource():grantQuest("starter-zones") game.player:resolveSource():setQuestStatus("starter-zones", engine.Quest.COMPLETED, "old-forest") game.player:resolveSource():setQuestStatus("starter-zones", engine.Quest.COMPLETED, "old-forest-crystal") @@ -96,11 +96,11 @@ newEntity{ define_as = "WRATHROOT", name = "Wrathroot", display = "#", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_treant_wrathroot.png", display_h=2, display_y=-1}}}, - desc = [[The ancient grey willow tree, ruler of the Old Forest. He despises trespassers in his territory.]], + desc = _t[[The ancient grey willow tree, ruler of the Old Forest. He despises trespassers in his territory.]], sound_moam = "creatures/treant/treeant_2", sound_die = {"creatures/treant/treeant_death_%d", 1, 2}, sound_random = {"creatures/treant/treeant_%d", 1, 3}, - killer_message = "and digested by treants", + killer_message = _t"and digested by treants", level_range = {12, nil}, exp_worth = 2, max_life = 200, life_rating = 17, fixed_rating = true, max_stamina = 85, @@ -133,7 +133,7 @@ newEntity{ define_as = "WRATHROOT", resolvers.inscriptions(1, "infusion"), on_die = function(self, who) - game.state:activateBackupGuardian("SNAPROOT", 3, 50, "Have you heard, the old forest seems to have been claimed by a new evil!") + game.state:activateBackupGuardian("SNAPROOT", 3, 50, _t"Have you heard, the old forest seems to have been claimed by a new evil!") game.player:resolveSource():grantQuest("starter-zones") game.player:resolveSource():setQuestStatus("starter-zones", engine.Quest.COMPLETED, "old-forest") end, @@ -143,8 +143,8 @@ newEntity{ define_as = "WRATHROOT", newEntity{ base = "BASE_NPC_RODENT", allow_infinite_dungeon = true, name = "cute little bunny", color=colors.SALMON, - desc = [[It looks at you with cute little eyes before jumping at you with razor sharp teeth.]], - killer_message = "(how pathetic)", + desc = _t[[It looks at you with cute little eyes before jumping at you with razor sharp teeth.]], + killer_message = _t"(how pathetic)", level_range = {1, 15}, exp_worth = 3, rarity = 200, max_life = resolvers.rngavg(15,20), @@ -161,7 +161,7 @@ newEntity{ define_as = "SNAPROOT", -- backup guardian sound_die = {"creatures/treants/treeant_death_%d", 1, 2}, sound_random = {"creatures/treants/treeant_%d", 1, 3}, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_treant_snaproot.png", display_h=2, display_y=-1}}}, - desc = [[This ancient Treant's bark is scorched almost black. It sees humanity as a scourge, to be purged.]], + desc = _t[[This ancient Treant's bark is scorched almost black. It sees humanity as a scourge, to be purged.]], level_range = {50, nil}, exp_worth = 3, max_life = 1000, life_rating = 40, fixed_rating = true, diff --git a/game/modules/tome/data/zones/old-forest/objects.lua b/game/modules/tome/data/zones/old-forest/objects.lua index 272b1018faa4a47e1de00be82c178c0e5c10d89f..e844c3e06c268d80bcd94e207e1a4eac92cb779a 100644 --- a/game/modules/tome/data/zones/old-forest/objects.lua +++ b/game/modules/tome/data/zones/old-forest/objects.lua @@ -23,7 +23,7 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "journal page", lore="old-forest-note-"..i, - desc = [[A paper scrap, left by an adventurer.]], + desc = _t[[A paper scrap, left by an adventurer.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/old-forest/zone.lua b/game/modules/tome/data/zones/old-forest/zone.lua index 1f8c00f457494e2ddb1660e74f76f336050fc980..7ef98c433906bdddd3706a5920bb0302d784ed22 100644 --- a/game/modules/tome/data/zones/old-forest/zone.lua +++ b/game/modules/tome/data/zones/old-forest/zone.lua @@ -21,7 +21,7 @@ local layout = game.state:alternateZone(short_name, {"CRYSTALINE", 2}) local is_crystaline = layout == "CRYSTALINE" return { - name = "Old Forest", + name = _t"Old Forest", level_range = {7, 16}, level_scheme = "player", max_level = 4, diff --git a/game/modules/tome/data/zones/orc-breeding-pit/npcs.lua b/game/modules/tome/data/zones/orc-breeding-pit/npcs.lua index b3363ce74f9d5b7234daf204f15a0756b85c6a5f..c60ec8de0c508e9bb9f697c5e7963dd75e3a75c3 100644 --- a/game/modules/tome/data/zones/orc-breeding-pit/npcs.lua +++ b/game/modules/tome/data/zones/orc-breeding-pit/npcs.lua @@ -50,7 +50,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ORC_SUMMON", name = "orc baby", color=colors.GREEN, - desc = [[Crawling on all fours, this green-skinned creature is far from cute, with vicious little sharp teeth and nails, and slime still sticking to its skin.]], + desc = _t[[Crawling on all fours, this green-skinned creature is far from cute, with vicious little sharp teeth and nails, and slime still sticking to its skin.]], level_range = {25, nil}, exp_worth = 0, resolvers.generic(function(e) if rng.percent(50) then e.female = true end end), rarity = 3, @@ -65,7 +65,7 @@ newEntity{ base = "BASE_NPC_ORC_SUMMON", newEntity{ base = "BASE_NPC_ORC", name = "orc child", color=colors.LIGHT_GREEN, - desc = [[This small orc has a malicious and greedy look in its eyes. Its veins pulse with new life and it moves with surprising speed. Though not fully developed you can still see the muscles forming on its long limbs, leading to clawed fingers and toes.]], + desc = _t[[This small orc has a malicious and greedy look in its eyes. Its veins pulse with new life and it moves with surprising speed. Though not fully developed you can still see the muscles forming on its long limbs, leading to clawed fingers and toes.]], resolvers.generic(function(e) if rng.percent(50) then e.female = true end end), level_range = {25, nil}, exp_worth = 0, rarity = 3, @@ -83,7 +83,7 @@ newEntity{ base = "BASE_NPC_ORC", newEntity{ base = "BASE_NPC_ORC", name = "young orc", color=colors.TEAL, - desc = [[This young orc is almost fully formed, with hard muscles prominently visible beneath its thick skin. Whilst it has lost some of the wild energy of its younger siblings you can see the gleams of intelligence and cold calculation behind its dark eyes.]], + desc = _t[[This young orc is almost fully formed, with hard muscles prominently visible beneath its thick skin. Whilst it has lost some of the wild energy of its younger siblings you can see the gleams of intelligence and cold calculation behind its dark eyes.]], resolvers.generic(function(e) if rng.percent(50) then e.female = true end end), level_range = {25, nil}, exp_worth = 0, rarity = 3, @@ -102,7 +102,7 @@ newEntity{ base = "BASE_NPC_ORC", newEntity{ base = "BASE_NPC_ORC", name = "orc mother", color=colors.YELLOW, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_orc_orc_mother.png", display_h=2, display_y=-1}}}, - desc = [[This giant, bloated form towers above you. Mucus and slime ooze from every orifice, dripping onto the cavern floor. Orc children fight over the right to feed from her distended teats whilst small babies are regularly emerge from folds of flesh. The sight and the smell make you retch. + desc = _t[[This giant, bloated form towers above you. Mucus and slime ooze from every orifice, dripping onto the cavern floor. Orc children fight over the right to feed from her distended teats whilst small babies are regularly emerge from folds of flesh. The sight and the smell make you retch. Here stands a tremendous form almost the size of a dragon. Bloated skin rises in thick folds, seeping viscous slime from its wide pores. Hundreds of hanging teats feed a small army of squabbling, fighting young orcs - only the toughest of them are able to gain the precious nutrients to grow stronger, the weaker ones left to wither on the mouldy floor. At the top of this towering hulk is a shrivelled head coated in long tangled hair. Dazed eyes peer out with a mixture of sadness and pain, but as they fix on you they turn to anger, the creature's face contorted with the fierce desire to protect its young.]], level_range = {25, nil}, exp_worth = 1, female = true, @@ -135,9 +135,9 @@ Here stands a tremendous form almost the size of a dragon. Bloated skin rises in newEntity{ base="BASE_NPC_ORC", define_as = "GREATMOTHER", name = "Orc Greatmother", color=colors.VIOLET, unique = true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_orc_orc_greatmother.png", display_h=2, display_y=-1}}}, - desc = [[This giant, bloated form towers above you. Mucus and slime ooze from every orifice, dripping onto the cavern floor. Orc children fight over the right to feed from her distended teats whilst small babies are regularly emerge from folds of flesh. The sight and the smell make you retch. + desc = _t[[This giant, bloated form towers above you. Mucus and slime ooze from every orifice, dripping onto the cavern floor. Orc children fight over the right to feed from her distended teats whilst small babies are regularly emerge from folds of flesh. The sight and the smell make you retch. Here stands a tremendous form almost the size of a dragon. Bloated skin rises in thick folds, seeping viscous slime from its wide pores. Hundreds of hanging teats feed a small army of squabbling, fighting young orcs - only the toughest of them are able to gain the precious nutrients to grow stronger, the weaker ones left to wither on the mouldy floor. At the top of this towering hulk is a shrivelled head coated in long tangled hair. Dazed eyes peer out with a mixture of sadness and pain, but as they fix on you they turn to anger, the creature's face contorted with the fierce desire to protect its young.]], - killer_message = "and given to the children as a plaything", + killer_message = _t"and given to the children as a plaything", level_range = {40, nil}, exp_worth = 1, female = true, rank = 5, diff --git a/game/modules/tome/data/zones/orc-breeding-pit/objects.lua b/game/modules/tome/data/zones/orc-breeding-pit/objects.lua index 0632220eaf2bd9e318acf6e2e4f7a75153357fa9..f5ed6e7fc897e431b3014bfe66bb83d219662378 100644 --- a/game/modules/tome/data/zones/orc-breeding-pit/objects.lua +++ b/game/modules/tome/data/zones/orc-breeding-pit/objects.lua @@ -23,7 +23,7 @@ load("/data/general/objects/lore/orc-prides.lua") newEntity{ base = "BASE_LORE", define_as = "NOTE_LORE", name = "draft note", lore="grushnak-pride-note", - desc = [[A note.]], + desc = _t[[A note.]], rarity = false, encumberance = 0, } @@ -32,13 +32,13 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "BREEDING_HISTORY"..i, name = "Clinician Korbek's experimental notes", lore="orc-breeding-"..i, - desc = [[Birthing new orcs ...]], + desc = _t[[Birthing new orcs ...]], rarity = false, } end newEntity{ base = "BASE_LORE", define_as = "BREEDING_HISTORY5", name = "Captain Gumlarat's report", lore="orc-breeding-5", - desc = [[Birthing new orcs ...]], + desc = _t[[Birthing new orcs ...]], rarity = false, } diff --git a/game/modules/tome/data/zones/orc-breeding-pit/zone.lua b/game/modules/tome/data/zones/orc-breeding-pit/zone.lua index 44567ca91bd873d76328ac87e75a0a65f4b93ffc..75defadcbce1fb43d4fb27f1c0dfd65ce4f6f20b 100644 --- a/game/modules/tome/data/zones/orc-breeding-pit/zone.lua +++ b/game/modules/tome/data/zones/orc-breeding-pit/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Orc breeding pits", + name = _t"Orc breeding pits", level_range = {30, 60}, level_scheme = "player", max_level = 3, @@ -66,7 +66,7 @@ return { end, on_enter = function(lev, old_lev, newzone) if newzone and not game.level.shown_warning then - require("engine.ui.Dialog"):simplePopup("Orc Breeding Pit", "You arrive in a small underground structure. There are orcs there and as soon as they notice you they scream 'Protect the mothers!'.") + require("engine.ui.Dialog"):simplePopup(_t"Orc Breeding Pit", _t"You arrive in a small underground structure. There are orcs there and as soon as they notice you they scream 'Protect the mothers!'.") game.level.shown_warning = true end end, diff --git a/game/modules/tome/data/zones/paradox-plane/grids.lua b/game/modules/tome/data/zones/paradox-plane/grids.lua index 9cf67df77f2cec8b3de534a8b6e34ea0fb975202..d0d41f285142081fe3525a1902e31d6af3e75277 100644 --- a/game/modules/tome/data/zones/paradox-plane/grids.lua +++ b/game/modules/tome/data/zones/paradox-plane/grids.lua @@ -36,6 +36,6 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[The rift leads... somewhere.]], + desc=_t[[The rift leads... somewhere.]], change_level = 3, change_zone = "daikara", } diff --git a/game/modules/tome/data/zones/paradox-plane/npcs.lua b/game/modules/tome/data/zones/paradox-plane/npcs.lua index 0c2252140eb441b6ec3e75953f26422e86272190..26b77e0e52fb087e74842ae9f92cf0dcf8cda251 100644 --- a/game/modules/tome/data/zones/paradox-plane/npcs.lua +++ b/game/modules/tome/data/zones/paradox-plane/npcs.lua @@ -27,7 +27,7 @@ newEntity{ define_as = "EPOCH", type = "elemental", subtype = "temporal", unique = true, name = "Epoch", display = "E", color=colors.VIOLET, - desc = [[A huge being composed of sparking blue and yellow energy stands before you. It shifts and flows as it moves, at once erratic and graceful.]], + desc = _t[[A huge being composed of sparking blue and yellow energy stands before you. It shifts and flows as it moves, at once erratic and graceful.]], level_range = {12, nil}, exp_worth = 2, max_life = 200, life_rating = 12, fixed_rating = true, max_stamina = 85, diff --git a/game/modules/tome/data/zones/paradox-plane/objects.lua b/game/modules/tome/data/zones/paradox-plane/objects.lua index 1b9aac39440751b370ab3e41c44e2850351c2ec8..4ef0ada0cc37483611033e069c48fcd6ce7264b3 100644 --- a/game/modules/tome/data/zones/paradox-plane/objects.lua +++ b/game/modules/tome/data/zones/paradox-plane/objects.lua @@ -27,8 +27,8 @@ newEntity{ base = "BASE_LONGBOW", define_as = "EPOCH_CURVE", -- not sure what rarity does so commented out for now rarity=false, - name = "Epoch's Curve", unided_name = "white ash longbow", unique=true, image="object/artifact/bow_epochs_curve.png", - desc = [[Epoch's Curve has served the Wardens for generations and was passed from Warden to Warden for many years before being lost. + name = "Epoch's Curve", unided_name = _t"white ash longbow", unique=true, image="object/artifact/bow_epochs_curve.png", + desc = _t[[Epoch's Curve has served the Wardens for generations and was passed from Warden to Warden for many years before being lost. According to legend it was made from the first ash sapling to sprout after the Spellblaze and carries powers of both time and renewal.]], level_range = {20, 40}, rarity = 200, diff --git a/game/modules/tome/data/zones/paradox-plane/zone.lua b/game/modules/tome/data/zones/paradox-plane/zone.lua index 34c1ade577b9a6ad49fdc57b65829e0a69b1b8ca..92fd584d1c200c30e139c230816411a5c5e86b68 100644 --- a/game/modules/tome/data/zones/paradox-plane/zone.lua +++ b/game/modules/tome/data/zones/paradox-plane/zone.lua @@ -18,8 +18,8 @@ -- darkgod@te4.org return { - name = "Paradox Plane", - display_name = function(x, y) return "Paradox Plane" end, + name = _t"Paradox Plane", + display_name = function(x, y) return _t"Paradox Plane" end, variable_zone_name = true, level_range = {7, 16}, level_scheme = "player", diff --git a/game/modules/tome/data/zones/rak-shor-pride/npcs.lua b/game/modules/tome/data/zones/rak-shor-pride/npcs.lua index 0bd492c4481ce6b6c98553e897bda61197815d96..d4c689402f4cb8e7991fce9cd0dd87c197f7feec 100644 --- a/game/modules/tome/data/zones/rak-shor-pride/npcs.lua +++ b/game/modules/tome/data/zones/rak-shor-pride/npcs.lua @@ -32,8 +32,8 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ base="BASE_NPC_ORC_RAK_SHOR", define_as = "RAK_SHOR", allow_infinite_dungeon = true, name = "Rak'shor, Grand Necromancer of the Pride", color=colors.VIOLET, unique = true, - desc = [[An old orc, wearing black robes. He commands his undead armies to destroy you.]], - killer_message = "and raised as a malformed servant", + desc = _t[[An old orc, wearing black robes. He commands his undead armies to destroy you.]], + killer_message = _t"and raised as a malformed servant", level_range = {35, nil}, exp_worth = 1, rank = 5, max_life = 150, life_rating = 19, fixed_rating = true, @@ -114,7 +114,7 @@ newEntity{ base = "BASE_NPC_GHOUL", define_as = "ROTTING_TITAN", allow_infinite_dungeon = true, name = "Rotting Titan", color={128,64,0}, unique=true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_ghoul_rotting_titan.png", display_h=2, display_y=-1}}}, - desc = [[This gigantic mass of flesh and stone moves slowly, the ground rumbling with each step it takes. Its body seems to constantly pulsate and reform. Massive stones at the end of each limb form massive blunt weapons.]], + desc = _t[[This gigantic mass of flesh and stone moves slowly, the ground rumbling with each step it takes. Its body seems to constantly pulsate and reform. Massive stones at the end of each limb form massive blunt weapons.]], level_range = {45, nil}, exp_worth = 2, rarity = 25, max_life = resolvers.rngavg(150,200), life_rating = 40, @@ -154,7 +154,7 @@ newEntity{ base = "BASE_NPC_GHOUL", define_as = "ROTTING_TITAN", -- But only AFTER we are finished moving, shall we ? :) on_move = function(self) game:onTickEnd(function() if rng.percent(35) then - game.logSeen(self, "The ground shakes as %s steps!", self.name:capitalize()) + game.logSeen(self, "The ground shakes as %s steps!", self:getName():capitalize()) local tg = {type="ball", range=0, selffire=false, radius=4, no_restrict=true} local DamageType = require "engine.DamageType" --self:project(tg, self.x, self.y, DamageType.PHYSKNOCKBACK, {dam=24, dist=5}) @@ -190,7 +190,7 @@ newEntity{ base = "BASE_NPC_GHOST", define_as = "GLACIAL_LEGION", allow_infinite_dungeon = true, name = "Glacial Legion", color=colors.BLUE, unique=true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_ghost_glacial_legion.png", display_h=2, display_y=-1}}}, - desc = [[A massive, shifting, ethereal form floats in the air around an orb of frozen blood. The air around it condenses into freezing pools on the floor beneath it.]], + desc = _t[[A massive, shifting, ethereal form floats in the air around an orb of frozen blood. The air around it condenses into freezing pools on the floor beneath it.]], level_range = {45, nil}, exp_worth = 2, rarity = 25, size_category=5, @@ -250,7 +250,7 @@ newEntity{ base = "BASE_NPC_GHOST", define_as = "GLACIAL_LEGION", newEntity{ base = "BASE_NPC_BONE_GIANT", define_as = "HEAVY_SENTINEL", allow_infinite_dungeon = true, name = "Heavy Sentinel", color=colors.ORANGE, unique=true, - desc = [[A towering creature, made from the bones of countless bodies. An aura of flame billows from within its chest.]], + desc = _t[[A towering creature, made from the bones of countless bodies. An aura of flame billows from within its chest.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_heavy_sentinel.png", display_h=2, display_y=-1}}}, level_range = {45, nil}, exp_worth = 2, rarity = 25, @@ -297,7 +297,7 @@ newEntity{ base = "BASE_NPC_VAMPIRE", unique=true, define_as="ARCH_ZEPHYR", allow_infinite_dungeon = true, name = "Arch Zephyr", color=colors.BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_vampire_arch_zephyr.png", display_h=2, display_y=-1}}}, - desc=[[The robes of this ancient vampire billow with intense winds. Bolts of lightning arc along its body. In its hand it holds a bow, electricity streaking across it.]], + desc=_t[[The robes of this ancient vampire billow with intense winds. Bolts of lightning arc along its body. In its hand it holds a bow, electricity streaking across it.]], level_range = {45, nil}, exp_worth = 1, rarity = 25, autolevel="warriormage", @@ -348,7 +348,7 @@ newEntity{ base = "BASE_NPC_WIGHT", allow_infinite_dungeon = true, name = "Void Spectre", color=colors.RED, unique=true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_wight_void_spectre.png", display_h=2, display_y=-1}}}, - desc=[[Intense Arcane energy whirls in the air around this ethereal form.]], + desc=_t[[Intense Arcane energy whirls in the air around this ethereal form.]], level_range = {45, nil}, exp_worth = 2, life_rating=16, rarity = 25, diff --git a/game/modules/tome/data/zones/rak-shor-pride/objects.lua b/game/modules/tome/data/zones/rak-shor-pride/objects.lua index d1181b42a918cedfd78363aafa272a5745b0f4ca..749158d6f06556e074224196b7db3e80a7eac843 100644 --- a/game/modules/tome/data/zones/rak-shor-pride/objects.lua +++ b/game/modules/tome/data/zones/rak-shor-pride/objects.lua @@ -24,7 +24,7 @@ load("/data/general/objects/lore/orc-prides.lua") newEntity{ base = "BASE_LORE", define_as = "NOTE_LORE", name = "draft note", lore="rak-shor-pride-note", - desc = [[A note.]], + desc = _t[[A note.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/rak-shor-pride/zone.lua b/game/modules/tome/data/zones/rak-shor-pride/zone.lua index d69afe2a9ebe6f906769c4903ba9291e59bf7dd5..06a15c276f4a4a61907db271e6812d061d73bd73 100644 --- a/game/modules/tome/data/zones/rak-shor-pride/zone.lua +++ b/game/modules/tome/data/zones/rak-shor-pride/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Rak'shor Pride", + name = _t"Rak'shor Pride", level_range = {30, 60}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/reknor-escape/npcs.lua b/game/modules/tome/data/zones/reknor-escape/npcs.lua index 5fd7a97e5c8e2d25c9e2d5a5565ac156477f94a3..561bc7fd8dd949ec4c1750157ccfe62f27b9c5ae 100644 --- a/game/modules/tome/data/zones/reknor-escape/npcs.lua +++ b/game/modules/tome/data/zones/reknor-escape/npcs.lua @@ -41,8 +41,8 @@ newEntity{ define_as = "BROTOQ", name = "Brotoq the Reaver", display = "o", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_orc_brotoq_the_reaver.png", display_h=2, display_y=-1}}}, - desc = [[A huge orc blocks your way to the Iron Council. You must pass.]], - killer_message = ", who ate their brains still warm,", + desc = _t[[A huge orc blocks your way to the Iron Council. You must pass.]], + killer_message = _t", who ate their brains still warm,", level_range = {7, nil}, exp_worth = 2, max_life = 150, life_rating = 15, fixed_rating = true, rank = 4, @@ -93,7 +93,7 @@ newEntity{ define_as = "NORGAN", name = "Norgan", display = "@", color=colors.UMBER, faction = "iron-throne", - desc = [[Norgan and you are the sole survivors of the Reknor expedition; your duty is to make sure the news makes it back to the Iron Council.]], + desc = _t[[Norgan and you are the sole survivors of the Reknor expedition; your duty is to make sure the news makes it back to the Iron Council.]], level_range = {1, nil}, max_life = 120, life_rating = 12, fixed_rating = true, rank = 3, diff --git a/game/modules/tome/data/zones/reknor-escape/objects.lua b/game/modules/tome/data/zones/reknor-escape/objects.lua index 605182ecbe9cf856a2a92f94e5551e29cb20a31f..0bce43ca66d72ec067e4b278edc64820cada9014 100644 --- a/game/modules/tome/data/zones/reknor-escape/objects.lua +++ b/game/modules/tome/data/zones/reknor-escape/objects.lua @@ -22,9 +22,9 @@ load("/data/general/objects/objects-maj-eyal.lua") newEntity{ base = "BASE_WARAXE", power_source = {arcane=true}, define_as = "FAKE_SKULLCLEAVER", - unided_name = "fake crimson waraxe", + unided_name = _t"fake crimson waraxe", name = "Fake Skullcleaver", unique=true, image = "object/artifact/axe_skullcleaver.png", - desc = [[A small but sharp axe, with a handle made of polished bone. The blade has chopped through the skulls of many, and has been stained a deep crimson.]], + desc = _t[[A small but sharp axe, with a handle made of polished bone. The blade has chopped through the skulls of many, and has been stained a deep crimson.]], require = { stat = { str=18 }, }, level_range = {5, 12}, rarity = false, diff --git a/game/modules/tome/data/zones/reknor-escape/zone.lua b/game/modules/tome/data/zones/reknor-escape/zone.lua index 74616dc5268f05b752db4da16048ac531ca9faca..2aac2dd7c312071a2c4534cb9e899c2f086ebf4c 100644 --- a/game/modules/tome/data/zones/reknor-escape/zone.lua +++ b/game/modules/tome/data/zones/reknor-escape/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Escape from Reknor", + name = _t"Escape from Reknor", level_range = {1, 5}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/reknor/grids.lua b/game/modules/tome/data/zones/reknor/grids.lua index 188a3791f86ad22be8b665d6cd7e4547e92bd1cf..2191ffd5cd1e1043255a7d0322994f2ebc26e0cd 100644 --- a/game/modules/tome/data/zones/reknor/grids.lua +++ b/game/modules/tome/data/zones/reknor/grids.lua @@ -26,7 +26,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. + desc = _t[[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. This one seems to go to the Far East, a continent of which only rumours are known...]], orb_portal = { @@ -39,7 +39,7 @@ This one seems to go to the Far East, a continent of which only rumours are know after_zone_teleport = { x = 98, y = 25, }, - message = "#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on an unfamiliar cave, with no trace of the portal...", + message = _t"#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on an unfamiliar cave, with no trace of the portal...", on_use = function(self, who) game.state:goneEast() who:setQuestStatus("wild-wild-east", engine.Quest.DONE) @@ -65,7 +65,7 @@ newEntity{ base = "FAR_EAST_PORTAL", define_as = "CFAR_EAST_PORTAL", newEntity{ define_as = "IRON_THRONE_EDICT", name = "Iron Throne Edict", lore="iron-throne-reknor-edict", - desc = [["AN EDICT TO ALL CITIZENS OF THE IRON THRONE. LONG MAY OUR EMPIRE ENDURE"]], + desc=_t[["AN EDICT TO ALL CITIZENS OF THE IRON THRONE. LONG MAY OUR EMPIRE ENDURE"]], image = "terrain/marble_floor.png", display = '_', color=colors.GREEN, back_color=colors.DARK_GREY, add_displays = {class.new{image="terrain/signpost.png"}}, diff --git a/game/modules/tome/data/zones/reknor/npcs.lua b/game/modules/tome/data/zones/reknor/npcs.lua index 3d27c96c302e4484fbd27214814d4fdd3f710444..6974e155675800e6fcd37852bcebc43813939ed1 100644 --- a/game/modules/tome/data/zones/reknor/npcs.lua +++ b/game/modules/tome/data/zones/reknor/npcs.lua @@ -32,7 +32,7 @@ newEntity{ define_as = "GOLBUG", name = "Golbug the Destroyer", display = "o", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_orc_golbug_the_destroyer.png", display_h=2, display_y=-1}}}, - desc = [[A huge and muscular orc of unknown breed. He looks both menacing and cunning...]], + desc = _t[[A huge and muscular orc of unknown breed. He looks both menacing and cunning...]], level_range = {28, nil}, exp_worth = 2, max_life = 350, life_rating = 16, fixed_rating = true, max_stamina = 245, @@ -99,8 +99,8 @@ newEntity{ define_as = "GOLBUG", end, on_die = function(self, who) - game.state:activateBackupGuardian("LITHFENGEL", 4, 35, "They say that after it has been confirmed orcs still inhabited Reknor, they found a mighty demon there.", function(gen) - if gen then require("engine.ui.Dialog"):simpleLongPopup("Danger...", "When last you saw it, this cavern was littered with the corpses of orcs that you had slain. Now many, many more corpses carpet the floor, all charred and reeking of sulfur. An orange glow dimly illuminates the far reaches of the cavern to the east.", 400) end + game.state:activateBackupGuardian("LITHFENGEL", 4, 35, _t"They say that after it has been confirmed orcs still inhabited Reknor, they found a mighty demon there.", function(gen) + if gen then require("engine.ui.Dialog"):simpleLongPopup(_t"Danger...", _t"When last you saw it, this cavern was littered with the corpses of orcs that you had slain. Now many, many more corpses carpet the floor, all charred and reeking of sulfur. An orange glow dimly illuminates the far reaches of the cavern to the east.", 400) end end) world:gainAchievement("DESTROYER_BANE", game.player:resolveSource()) @@ -121,7 +121,7 @@ newEntity{ define_as = "HARNO", faction = "allied-kingdoms", name = "Harno, Herald of Last Hope", display = "@", color=colors.LIGHT_BLUE, - desc = [[This is one of the heralds of Last Hope. He seems to be looking for you.]], + desc = _t[[This is one of the heralds of Last Hope. He seems to be looking for you.]], global_speed_base = 2, level_range = {40, 40}, exp_worth = 0, max_life = 150, life_rating = 12, @@ -158,7 +158,7 @@ newEntity{ define_as = "LITHFENGEL", -- Lord of Ash; backup guardian type = "demon", subtype = "major", unique = true, name = "Lithfengel", display = "U", color=colors.VIOLET, - desc = [[A terrible demon of decay and atrophy, drawn to the energy of the farportal. A beast of blight!]], + desc = _t[[A terrible demon of decay and atrophy, drawn to the energy of the farportal. A beast of blight!]], level_range = {35, nil}, exp_worth = 3, max_life = 400, life_rating = 25, fixed_rating = true, rank = 4, @@ -203,7 +203,7 @@ newEntity{ define_as = "LITHFENGEL", -- Lord of Ash; backup guardian on_die = function(self, who) if who.resolveSource and who:resolveSource().player and who:resolveSource():hasQuest("east-portal") then - require("engine.ui.Dialog"):simpleLongPopup("Back and there again", "A careful examination of the demon's body turns up a Blood-Runed Athame and a Resonating Diamond, both covered in soot and gore but otherwise in good condition.", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Back and there again", _t"A careful examination of the demon's body turns up a Blood-Runed Athame and a Resonating Diamond, both covered in soot and gore but otherwise in good condition.", 400) end end, } diff --git a/game/modules/tome/data/zones/reknor/objects.lua b/game/modules/tome/data/zones/reknor/objects.lua index e9fd7cac92c78291c7c0faf5c40cd65780449748..9628b95ba75c199797d26e92e157518b1b2a5e45 100644 --- a/game/modules/tome/data/zones/reknor/objects.lua +++ b/game/modules/tome/data/zones/reknor/objects.lua @@ -24,7 +24,7 @@ newEntity{ base = "BASE_SCROLL", define_as = "NOTE_FROM_LAST_HOPE", image = "object/letter1.png", fire_proof = true, - use_simple = { name="open the seal and read the message", use = function(self, who) + use_simple = { name=_t"open the seal and read the message", use = function(self, who) game:registerDialog(require("engine.dialogs.ShowText").new(self:getName{do_color=true}, "message-last-hope", {playername=who.name}, game.w * 0.6)) return {used=true, id=true} end} @@ -47,12 +47,12 @@ newEntity{ base = "BASE_GEM", newEntity{ define_as = "ATHAME_WEST", quest=true, unique="Blood-Runed Athame West", identified=true, no_unique_lore=true, type = "misc", subtype="misc", - unided_name = "athame", + unided_name = _t"athame", name = "Blood-Runed Athame", image = "object/artifact/blood_runed_athame.png", level_range = {50, 50}, display = "|", color=colors.VIOLET, encumber = 1, - desc = [[An athame, covered in blood runes. It radiates power.]], + desc = _t[[An athame, covered in blood runes. It radiates power.]], on_drop = function(self, who) if who == game.player then @@ -66,7 +66,7 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "IRON_THRONE_PROFIT"..i, name = "Iron Throne Profits History", lore="iron-throne-profits-"..i, - desc = [[A journal of the profits history of the Iron Throne dwarves.]], + desc = _t[[A journal of the profits history of the Iron Throne dwarves.]], rarity = false, encumberance = 0, } @@ -75,7 +75,7 @@ end newEntity{ base = "BASE_LORE", define_as = "IRON_THRONE_LEDGER", name = "Iron Throne trade ledger", lore="iron-throne-trade-ledger", - desc = [[A trade ledger of the Iron Throne dwarves.]], + desc = _t[[A trade ledger of the Iron Throne dwarves.]], rarity = false, encumberance = 0, } @@ -83,7 +83,7 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_LORE", define_as = "IRON_THRONE_LAST_WORDS", name = "Iron Throne Reknor expedition, last words", lore="iron-throne-last-words", - desc = [[Last words of a dwarven expedition to secure Reknor.]], + desc = _t[[Last words of a dwarven expedition to secure Reknor.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/reknor/zone.lua b/game/modules/tome/data/zones/reknor/zone.lua index 02c5fccc66e0e85349ab263a1f89943cbf04afe9..a92d9276582024ad320f561b6358e78688499eed 100644 --- a/game/modules/tome/data/zones/reknor/zone.lua +++ b/game/modules/tome/data/zones/reknor/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Lost Dwarven Kingdom of Reknor", + name = _t"Lost Dwarven Kingdom of Reknor", level_range = {18, 35}, level_scheme = "player", max_level = 4, diff --git a/game/modules/tome/data/zones/rhaloren-camp/npcs.lua b/game/modules/tome/data/zones/rhaloren-camp/npcs.lua index 413c5d45f5a3f38a27f10fa49221f4433f39922a..3989116b3c158b4ce9d06ba6ef5bd6487b01507e 100644 --- a/game/modules/tome/data/zones/rhaloren-camp/npcs.lua +++ b/game/modules/tome/data/zones/rhaloren-camp/npcs.lua @@ -32,9 +32,9 @@ newEntity{ define_as = "INQUISITOR", type = "humanoid", subtype = "shalore", unique = true, name = "Rhaloren Inquisitor", display = "p", color=colors.VIOLET, female = true, - desc = [[This tall elf rushes at you, wielding both her greatsword and magical spells.]], + desc = _t[[This tall elf rushes at you, wielding both her greatsword and magical spells.]], faction = "rhalore", - killer_message = "and hung from the rafters", + killer_message = _t"and hung from the rafters", level_range = {7, nil}, exp_worth = 2, max_life = 150, life_rating = 15, fixed_rating = true, rank = 4, diff --git a/game/modules/tome/data/zones/rhaloren-camp/objects.lua b/game/modules/tome/data/zones/rhaloren-camp/objects.lua index e6887d3422019d6803458d94f165cabbe909631a..92575cf34efdc97f3e4383ddb320e99db5b86bde 100644 --- a/game/modules/tome/data/zones/rhaloren-camp/objects.lua +++ b/game/modules/tome/data/zones/rhaloren-camp/objects.lua @@ -23,7 +23,7 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "letter", lore="rhaloren-note-"..i, - desc = [[A letter.]], + desc = _t[[A letter.]], rarity = false, } end @@ -31,6 +31,6 @@ end newEntity{ base = "BASE_LORE", define_as = "NOTE5", name = "a carefully preserved letter", lore="rhaloren-note-5", - desc = [[A letter.]], + desc = _t[[A letter.]], rarity = false, } diff --git a/game/modules/tome/data/zones/rhaloren-camp/zone.lua b/game/modules/tome/data/zones/rhaloren-camp/zone.lua index 2b80656275f24cc2de05e61d0a68ab3d97fc1601..170557761be8240b8194dceacd27d1cf1649c311 100644 --- a/game/modules/tome/data/zones/rhaloren-camp/zone.lua +++ b/game/modules/tome/data/zones/rhaloren-camp/zone.lua @@ -22,7 +22,7 @@ if layout == "DEFAULT" then -- Underground return { - name = "Rhaloren Camp", + name = _t"Rhaloren Camp", level_range = {1, 7}, level_scheme = "player", max_level = 3, @@ -92,7 +92,7 @@ elseif layout == "OVERGROUND" then -- Overground return { - name = "Rhaloren Camp", + name = _t"Rhaloren Camp", level_range = {1, 5}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/ring-of-blood/npcs.lua b/game/modules/tome/data/zones/ring-of-blood/npcs.lua index 5c0f9314d1a01f53e4b0a97c81ffb3f8df5fb91d..9fdc684ab593bfe5d7d5f8c89ef639ebdf9e0ad5 100644 --- a/game/modules/tome/data/zones/ring-of-blood/npcs.lua +++ b/game/modules/tome/data/zones/ring-of-blood/npcs.lua @@ -26,7 +26,7 @@ newEntity{ define_as = "RING_MASTER", name = "Blood Master", display = "@", color=colors.VIOLET, blood_color = colors.BLUE, - desc = [[This small humanoid is covered in silky white fur. Its bulging eyes stare deep into your mind.]], + desc = _t[[This small humanoid is covered in silky white fur. Its bulging eyes stare deep into your mind.]], level_range = {14, nil}, exp_worth = 2, max_life = 150, life_rating = 12, fixed_rating = true, rank = 3.5, @@ -83,14 +83,14 @@ newEntity{ define_as = "SPECTATOR", female = resolvers.rngtable{false, true}, image = resolvers.rngtable{"npc/humanoid_human_spectator.png","npc/humanoid_human_spectator02.png","npc/humanoid_human_spectator03.png",}, display = "p", resolvers.rngcolor{colors.BLUE, colors.LIGHT_BLUE, colors.RED, colors.LIGHT_RED, colors.ORANGE, colors.YELLOW, colors.GREEN, colors.LIGHT_GREEN, colors.PINK, }, - desc = [[A spectator, who probably paid a lot to watch this bloody "game".]], + desc = _t[[A spectator, who probably paid a lot to watch this bloody "game".]], level_range = {1, nil}, exp_worth = 0, max_life = 100, life_rating = 12, faction = "neutral", emote_random = resolvers.emote_random{ - "Blood!", "Fight!", "To the death!", - "Oh this is great", "I love the smell of death...", - "Slavers forever!", + _t"Blood!", _t"Fight!", _t"To the death!", + _t"Oh this is great", _t"I love the smell of death...", + _t"Slavers forever!", }, } @@ -100,7 +100,7 @@ newEntity{ define_as = "PLAYER_SLAVE", type = "humanoid", subtype = "human", name = "slave combatant", display = "@", color=colors.UMBER, - desc = [[This humanoid has been enslaved by the yaech's mental powers.]], + desc = _t[[This humanoid has been enslaved by the yaech's mental powers.]], level_range = {9, 9}, exp_worth = 0, max_life = 120, life_rating = 12, fixed_rating = true, rank = 3, @@ -172,7 +172,7 @@ newEntity{ newEntity{ base = "BASE_NPC_SLAVER", name = "slaver", color=colors.TEAL, subtype = "yaech", - desc = [[A slaver.]], + desc = _t[[A slaver.]], level_range = {10, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(80,90), life_rating = 11, @@ -195,7 +195,7 @@ newEntity{ base = "BASE_NPC_SLAVER", if self.master and self.master:attr("dead") then self.faction = "neutral" self:removeAllEffects() - self:doEmote(rng.table{"I am free!", "At last, freedom!", "Thanks for this!", "The mental hold is gone!"}, 60) + self:doEmote(rng.table{_t"I am free!", _t"At last, freedom!", _t"Thanks for this!", _t"The mental hold is gone!"}, 60) self.on_act = nil self.master = nil world:gainAchievement("RING_BLOOD_FREED", game:getPlayer(true)) @@ -208,7 +208,7 @@ newEntity{ base = "BASE_NPC_SLAVER", newEntity{ base = "BASE_NPC_SLAVER", name = "enthralled slave", color=colors.KHAKI, subtype = "human", - desc = [[A slave.]], + desc = _t[[A slave.]], level_range = {10, nil}, exp_worth = 0, rarity = 20, max_life = resolvers.rngavg(80,90), life_rating = 13, diff --git a/game/modules/tome/data/zones/ring-of-blood/objects.lua b/game/modules/tome/data/zones/ring-of-blood/objects.lua index 0d8620b68ceac38246b40f4dcd003a2a8a11fa5c..f9805c87a0017548e4d8793f21586976daf22a18 100644 --- a/game/modules/tome/data/zones/ring-of-blood/objects.lua +++ b/game/modules/tome/data/zones/ring-of-blood/objects.lua @@ -23,9 +23,9 @@ newEntity{ base = "BASE_RING", power_source = {psionic=true}, define_as = "RING_OF_BLOOD", rarity=false, name = "Bloodcaller", unique=true, image = "object/artifact/jewelry_ring_bloodcaller.png", - desc = [[You won the Ring of Blood trial, and this is your reward.]], - unided_name = "bloody ring", - special_desc = function(self) return ("You heal for 2.5%% of the damage you deal.\nHealing during current combat: #GREEN#%0.2f#LAST#"):format(self.bloodcaller_heal_amt or 0) end, + desc = _t[[You won the Ring of Blood trial, and this is your reward.]], + unided_name = _t"bloody ring", + special_desc = function(self) return ("You heal for 2.5%% of the damage you deal.\nHealing during current combat: #GREEN#%0.2f#LAST#"):tformat(self.bloodcaller_heal_amt or 0) end, rarity = false, cost = 300, material_level = 4, diff --git a/game/modules/tome/data/zones/ring-of-blood/zone.lua b/game/modules/tome/data/zones/ring-of-blood/zone.lua index abb7913c2629157020198659592501100a68b265..26ca5b4bd65a22f1b86cf9449fa7ac9eceb0cc3d 100644 --- a/game/modules/tome/data/zones/ring-of-blood/zone.lua +++ b/game/modules/tome/data/zones/ring-of-blood/zone.lua @@ -18,10 +18,10 @@ -- darkgod@te4.org return { - name = "Ring of Blood", + name = _t"Ring of Blood", display_name = function(x, y) - if game.level.level < 3 then return "Slavers Compound ("..game.level.level..")" end - return "Ring of Blood" + if game.level.level < 3 then return ("Slavers Compound (%d)"):tformat(game.level.level) end + return _t"Ring of Blood" end, variable_zone_name = true, level_range = {10, 25}, diff --git a/game/modules/tome/data/zones/ritch-tunnels/npcs.lua b/game/modules/tome/data/zones/ritch-tunnels/npcs.lua index c4a769fa8246d5917c2d10bb3af2ecf5d07de3c6..475425e884170a0beb8983e9072c808b8b14c822 100644 --- a/game/modules/tome/data/zones/ritch-tunnels/npcs.lua +++ b/game/modules/tome/data/zones/ritch-tunnels/npcs.lua @@ -28,9 +28,9 @@ newEntity{ define_as = "BASE_NPC_RITCH_REL", type = "insect", subtype = "ritch", display = "I", color=colors.RED, - desc = [[Ritches are giant insects native to the arid wastes of the southern parts of the Far East. + desc = _t[[Ritches are giant insects native to the arid wastes of the southern parts of the Far East. Vicious predators, they inject corrupting diseases into their foes, and their sharp claws cut through most armours.]], - killer_message = ", who incubated her eggs in the corpse,", + killer_message = _t", who incubated her eggs in the corpse,", combat = { dam=resolvers.rngavg(10,32), atk=0, apr=4, damtype=DamageType.BLIGHT, dammod={dex=1.2} }, @@ -99,7 +99,7 @@ newEntity{ base = "BASE_NPC_RITCH_REL", define_as = "HIVE_MOTHER", unique = true, female = true, name = "Ritch Great Hive Mother", image = "npc/insect_ritch_ritch_hive_mother.png", display = "I", color=colors.VIOLET, - desc = [[This huge ritch seems to be the mother of all those here. Her sharp, fiery, claws dart toward you!]], + desc = _t[[This huge ritch seems to be the mother of all those here. Her sharp, fiery, claws dart toward you!]], level_range = {7, nil}, exp_worth = 2, max_life = 120, life_rating = 14, fixed_rating = true, equilibrium_regen = -50, diff --git a/game/modules/tome/data/zones/ritch-tunnels/zone.lua b/game/modules/tome/data/zones/ritch-tunnels/zone.lua index b42d4278d7e172dd468c12dace74cccea66f0934..a7d98cc5566b581b6a17602e3d69a1097d8d3f13 100644 --- a/game/modules/tome/data/zones/ritch-tunnels/zone.lua +++ b/game/modules/tome/data/zones/ritch-tunnels/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Ritches Tunnels", + name = _t"Ritches Tunnels", level_range = {1, 5}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/ruined-dungeon/grids.lua b/game/modules/tome/data/zones/ruined-dungeon/grids.lua index 35b3952409eed47a593e1df70a7c168b0658d2dc..d745281e52403647bc06c38eddb8ebabade766fc 100644 --- a/game/modules/tome/data/zones/ruined-dungeon/grids.lua +++ b/game/modules/tome/data/zones/ruined-dungeon/grids.lua @@ -62,13 +62,13 @@ newEntity{ if not who.player then return end local p = game:getPlayer(true) if p.winner then - require("engine.ui.Dialog"):yesnoLongPopup("Infinite Dungeon", "You have accomplished great deads, but if you enter the infinite dungeon there will be no way back you will go on and on until you meet your glorious death.", 400, function(ret) + require("engine.ui.Dialog"):yesnoLongPopup(_t"Infinite Dungeon", _t"You have accomplished great deads, but if you enter the infinite dungeon there will be no way back you will go on and on until you meet your glorious death.", 400, function(ret) if ret then game:changeLevel(math.ceil(game.player.level * 1.5), "infinite-dungeon") end end) else - require("engine.ui.Dialog"):simplePopup("Infinite Dungeon", "You should not go there. There is no way back. Ever. Maybe later when you have done all you must do.") + require("engine.ui.Dialog"):simplePopup(_t"Infinite Dungeon", _t"You should not go there. There is no way back. Ever. Maybe later when you have done all you must do.") end end, } @@ -95,26 +95,26 @@ newEntity{ if not game.level.data.touch_orb then return true end if not self.orb_allowed then - require("engine.ui.Dialog"):simplePopup("Strange Orb", "The orb looks inactive.") + require("engine.ui.Dialog"):simplePopup(_t"Strange Orb", _t"The orb looks inactive.") return true end local text = "???" - if self.portal_type == "water" then text = "The orb seems to drip water." - elseif self.portal_type == "earth" then text = "The orb is covered in dust." - elseif self.portal_type == "wind" then text = "The orb is floating in the air." - elseif self.portal_type == "nature" then text = "Small seeds seem to be growing inside the orb." - elseif self.portal_type == "arcane" then text = "The orb swirls with magical energies." - elseif self.portal_type == "fire" then text = "Flames burst out of the orb." + if self.portal_type == "water" then text = _t"The orb seems to drip water." + elseif self.portal_type == "earth" then text = _t"The orb is covered in dust." + elseif self.portal_type == "wind" then text = _t"The orb is floating in the air." + elseif self.portal_type == "nature" then text = _t"Small seeds seem to be growing inside the orb." + elseif self.portal_type == "arcane" then text = _t"The orb swirls with magical energies." + elseif self.portal_type == "fire" then text = _t"Flames burst out of the orb." - elseif self.portal_type == "darkness" then text = "The orb seems to absorb all light." - elseif self.portal_type == "blood" then text = "The orb is drips with thick blood." - elseif self.portal_type == "ice" then text = "The orb is icy to the touch." - elseif self.portal_type == "time" then text = "Time seems to slow down around the orb." - elseif self.portal_type == "mind" then text = "Your mind is filled with strange thoughts as you approach the orb." - elseif self.portal_type == "blight" then text = "The orb seems to corrupt all it touches." + elseif self.portal_type == "darkness" then text = _t"The orb seems to absorb all light." + elseif self.portal_type == "blood" then text = _t"The orb is drips with thick blood." + elseif self.portal_type == "ice" then text = _t"The orb is icy to the touch." + elseif self.portal_type == "time" then text = _t"Time seems to slow down around the orb." + elseif self.portal_type == "mind" then text = _t"Your mind is filled with strange thoughts as you approach the orb." + elseif self.portal_type == "blight" then text = _t"The orb seems to corrupt all it touches." end - require("engine.ui.Dialog"):yesnoLongPopup("Strange Orb", text.."\nDo you touch it?", 400, function(ret) + require("engine.ui.Dialog"):yesnoLongPopup(_t"Strange Orb", text.._t"\nDo you touch it?", 400, function(ret) if ret then game.level.data.touch_orb(self.portal_type, x, y) end diff --git a/game/modules/tome/data/zones/ruined-dungeon/zone.lua b/game/modules/tome/data/zones/ruined-dungeon/zone.lua index e77c0a52f080b7ac8ad16137e51a5c156f49cbc2..9b33e24585732028da0cbfb7dc8afc6d5a6ff000 100644 --- a/game/modules/tome/data/zones/ruined-dungeon/zone.lua +++ b/game/modules/tome/data/zones/ruined-dungeon/zone.lua @@ -20,7 +20,7 @@ local layout = game.state:alternateZoneTier1(short_name, {"ALT1", 1}) return { - name = "Ruined Dungeon", + name = _t"Ruined Dungeon", level_range = {10, 30}, level_scheme = "player", max_level = 1, @@ -78,11 +78,11 @@ return { end -- Pop guardians - local guardian_filter = {not_properties = {"unique"}, random_elite={name_scheme="#rng# the Guardian", on_die=function(self) + local guardian_filter = {not_properties = {"unique"}, random_elite={name_scheme=_t"#rng# the Guardian", on_die=function(self) local spot = game.level:pickSpotRemove{type="portal", subtype="portal"} if spot then game.level.map(spot.x, spot.y, engine.Map.TERRAIN).orb_allowed = true - require("engine.ui.Dialog"):simplePopup("Guardian", "You can hear a magical trigger firing off.") + require("engine.ui.Dialog"):simplePopup(_t"Guardian", _t"You can hear a magical trigger firing off.") end end}, add_levels=5} local _, guardians = level:pickSpot{type="spawn", subtype="guardian"} @@ -110,7 +110,7 @@ return { -- Failed! if o[i] ~= order[i] then game.level.orbs_touched = {} - Dialog:simplePopup("Strange Orb", "The orb seems to react badly to your touch, there is a high shriek!") + Dialog:simplePopup(_t"Strange Orb", _t"The orb seems to react badly to your touch, there is a high shriek!") for i = 1, 4 do -- Find space local x, y = util.findFreeGrid(sx, sy, 10, true, {[game.level.map.ACTOR]=true}) @@ -132,13 +132,13 @@ return { end -- Success if #o == #order then - Dialog:simplePopup("Strange Orb", "The orb glows brightly. There is a loud crack coming from the northern central chamber.") + Dialog:simplePopup(_t"Strange Orb", _t"The orb glows brightly. There is a loud crack coming from the northern central chamber.") local spot = game.level:pickSpot{type="door", subtype="sealed"} local g = game.zone:makeEntityByName(game.level, "terrain", "OLD_FLOOR") game.zone:addEntity(game.level, g, "terrain", spot.x, spot.y) game.level.orbs_used = true else - Dialog:simplePopup("Strange Orb", "The orb glows brightly.") + Dialog:simplePopup(_t"Strange Orb", _t"The orb glows brightly.") end end, } diff --git a/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua b/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua index 5f0924947423c023d091559a91dbee17290165f6..746a492be0b75daf1266ade41320258024ccf6d1 100644 --- a/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua +++ b/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua @@ -44,8 +44,8 @@ newEntity{ define_as = "SHADE", name = "The Shade", display = "s", color=colors.VIOLET, shader = "unique_glow", - desc = [[This skeleton looks nasty. There are red flames in its empty eye sockets. It wields a nasty sword and strides toward you, throwing spells.]], - killer_message = "and left to rot", + desc = _t[[This skeleton looks nasty. There are red flames in its empty eye sockets. It wields a nasty sword and strides toward you, throwing spells.]], + killer_message = _t"and left to rot", level_range = {7, nil}, exp_worth = 2, max_life = 150, life_rating = 15, fixed_rating = true, max_mana = 85, @@ -85,7 +85,7 @@ newEntity{ define_as = "SHADE", low_level_tactics_override = {escape=0, safe_range=1}, on_die = function(self, who) - game.state:activateBackupGuardian("KOR_FURY", 3, 35, ".. yes I tell you! The old ruins of Kor'Pul are still haunted!") + game.state:activateBackupGuardian("KOR_FURY", 3, 35, _t".. yes I tell you! The old ruins of Kor'Pul are still haunted!") game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "kor-pul") end, } @@ -94,8 +94,8 @@ newEntity{ base = "BASE_NPC_THIEF", define_as = "THE_POSSESSED", allow_infinite_dungeon = true, name = "The Possessed", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_the_possessed.png", display_h=2, display_y=-1}}}, - desc = [[He is the leader of a gang of bandits that killed the Shade of Kor'Pul, however it is obvious the Shade was merely displaced. It is now possessing the corpse of his killer.]], - killer_message = "and used as a new host", + desc = _t[[He is the leader of a gang of bandits that killed the Shade of Kor'Pul, however it is obvious the Shade was merely displaced. It is now possessing the corpse of his killer.]], + killer_message = _t"and used as a new host", level_range = {7, nil}, exp_worth = 2, unique = true, rank = 4, @@ -129,7 +129,7 @@ newEntity{ base = "BASE_NPC_THIEF", define_as = "THE_POSSESSED", low_level_tactics_override = {escape=0, safe_range=1}, on_die = function(self, who) - game.state:activateBackupGuardian("KOR_FURY", 3, 35, ".. yes I tell you! The old ruins of Kor'Pul are still haunted!") + game.state:activateBackupGuardian("KOR_FURY", 3, 35, _t".. yes I tell you! The old ruins of Kor'Pul are still haunted!") game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "kor-pul") game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "kor-pul-invaded") end, @@ -140,7 +140,7 @@ newEntity{ define_as = "KOR_FURY", type = "undead", subtype = "ghost", unique = true, name = "Kor's Fury", display = "G", color=colors.VIOLET, - desc = [[The Shade's colossal will keeps it anchored to this world, now as a vengeful, insane spirit.]], + desc = _t[[The Shade's colossal will keeps it anchored to this world, now as a vengeful, insane spirit.]], level_range = {38, nil}, exp_worth = 3, max_life = 250, life_rating = 20, fixed_rating = true, rank = 4, diff --git a/game/modules/tome/data/zones/ruins-kor-pul/objects.lua b/game/modules/tome/data/zones/ruins-kor-pul/objects.lua index 08e8495c9ddca0f8b271feae3a646265b4adeab1..590291835468d7e7749486cb41d80326d476713c 100644 --- a/game/modules/tome/data/zones/ruins-kor-pul/objects.lua +++ b/game/modules/tome/data/zones/ruins-kor-pul/objects.lua @@ -23,7 +23,7 @@ for i = 1, 5 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "journal page", lore="kor-pul-note-"..i, - desc = [[A journal page, left by an adventurer.]], + desc = _t[[A journal page, left by an adventurer.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/ruins-kor-pul/zone.lua b/game/modules/tome/data/zones/ruins-kor-pul/zone.lua index 2b8a4ead84c3ec4f68f2a4895bd18852c1ca3f9c..a7d327588a6801e4e03f85528e7d90106e366998 100644 --- a/game/modules/tome/data/zones/ruins-kor-pul/zone.lua +++ b/game/modules/tome/data/zones/ruins-kor-pul/zone.lua @@ -21,7 +21,7 @@ local layout = game.state:alternateZone(short_name, {"HIDEOUT", 2}) local is_hideout = layout == "HIDEOUT" return { - name = "Ruins of Kor'Pul", + name = _t"Ruins of Kor'Pul", level_range = {1, 7}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/sandworm-lair/npcs.lua b/game/modules/tome/data/zones/sandworm-lair/npcs.lua index f1cecb91adbee5415028da1fb2c7ed17db70ed61..beaedfcdf65892048d8ed0e59a75882eebd0609b 100644 --- a/game/modules/tome/data/zones/sandworm-lair/npcs.lua +++ b/game/modules/tome/data/zones/sandworm-lair/npcs.lua @@ -33,7 +33,7 @@ newEntity{ define_as = "SANDWORM_TUNNELER", type = "vermin", subtype = "sandworm", name = "sandworm burrower", display = "w", color=colors.GREEN, - desc = [[This sandworm seems to not care about your presence at all and simply continues digging its way through the sand. + desc = _t[[This sandworm seems to not care about your presence at all and simply continues digging its way through the sand. Maybe following it is the only way to move around here...]], level_range = {12, 50}, exp_worth = 0, @@ -59,7 +59,7 @@ newEntity{ define_as = "SANDWORM_TUNNELER_HUGE", name = "huge sandworm burrower", display_w = 2, display_h = 2, display_x = -0.5, display_y = -0.5, display = "w", color=colors.GREEN, - desc = [[This sandworm seems to not care about your presence at all and simply continues digging its way through the sand. + desc = _t[[This sandworm seems to not care about your presence at all and simply continues digging its way through the sand. Maybe following it is the only way to move around here...]], level_range = {12, 50}, exp_worth = 0, @@ -87,8 +87,8 @@ newEntity{ define_as = "SANDWORM_QUEEN", name = "Sandworm Queen", display = "w", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/vermin_sandworm_sandworm_queen.png", display_h=2, display_y=-1}}}, - desc = [[Before you stands the queen of the sandworms. Massive and bloated, she slithers toward you, calling for her offspring!]], - killer_message = "and swallowed whole", + desc = _t[[Before you stands the queen of the sandworms. Massive and bloated, she slithers toward you, calling for her offspring!]], + killer_message = _t"and swallowed whole", level_range = {15, nil}, exp_worth = 2, female = 1, max_life = 150, life_rating = 17, fixed_rating = true, @@ -150,14 +150,14 @@ newEntity{ define_as = "SANDWORM_QUEEN", self.move_project = {[engine.DamageType.DIG]=1} local Dialog = require("engine.ui.Dialog") - Dialog:simplePopup("Rumbling...", "The ground shakes. Something very large is stirring in the distance.") + Dialog:simplePopup(_t"Rumbling...", _t"The ground shakes. Something very large is stirring in the distance.") end end end, on_die = function(self, who) - game.state:activateBackupGuardian("CORRUPTED_SAND_WYRM", 1, 45, "Did you hear? Something seems to have devoured all the last sandworms!", function(gen) + game.state:activateBackupGuardian("CORRUPTED_SAND_WYRM", 1, 45, _t"Did you hear? Something seems to have devoured all the last sandworms!", function(gen) if gen then return end for i = #game.level.e_array, 1, -1 do local e = game.level.e_array[i] @@ -176,7 +176,7 @@ newEntity{ define_as = "CORRUPTED_SAND_WYRM", name = "Corrupted Sand Wyrm", display = "D", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_sand_corrupted_sand_wyrm.png", display_h=2, display_y=-1}}}, - desc = [[The sandworms are gone, devoured by this shrieking, warped horror.]], + desc = _t[[The sandworms are gone, devoured by this shrieking, warped horror.]], level_range = {47, nil}, exp_worth = 3, max_life = 850, life_rating = 24, fixed_rating = true, infravision = 10, diff --git a/game/modules/tome/data/zones/sandworm-lair/objects.lua b/game/modules/tome/data/zones/sandworm-lair/objects.lua index 61786fa7643b6c42f005f67274cecf7e11693ad6..d6a42d05ba2f585208091fd9c7ff12f093ebadee 100644 --- a/game/modules/tome/data/zones/sandworm-lair/objects.lua +++ b/game/modules/tome/data/zones/sandworm-lair/objects.lua @@ -23,7 +23,7 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "Song of the Sands", lore="sandworm-note-"..i, - desc = [[Some people get the weirdest ideas!]], + desc = _t[[Some people get the weirdest ideas!]], rarity = false, } end @@ -33,14 +33,14 @@ newEntity{ power_source = {nature=true}, define_as = "SANDQUEEN_HEART", type = "corpse", subtype = "heart", image = "object/artifact/queen_heart.png", - name = "Heart of the Sandworm Queen", unique=true, unided_name="pulsing organ", + name = "Heart of the Sandworm Queen", unique=true, unided_name=_t"pulsing organ", display = "*", color=colors.VIOLET, - desc = [[The heart of the Sandworm Queen, ripped from her dead body. + desc = _t[[The heart of the Sandworm Queen, ripped from her dead body. You could ... consume it, should you feel mad enough or you could try to corrupt it somewhere.]], cost = 3000, quest = 1, - use_simple = { name="consume the heart", use = function(self, who) + use_simple = { name=_t"consume the heart", use = function(self, who) game.logPlayer(who, "#00FFFF#You consume the heart and feel the knowledge of this very old creature fill you!") who.unused_stats = who.unused_stats + 3 who.unused_talents = who.unused_talents + 1 @@ -75,13 +75,13 @@ newEntity{ power_source = {nature=true}, define_as = "PUTRESCENT_POTION", type = "corpse", subtype = "blood", - name = "Wyrm Bile", unique=true, unided_name="putrescent potion", image="object/artifact/vial_wyrm_bile.png", + name = "Wyrm Bile", unique=true, unided_name=_t"putrescent potion", image="object/artifact/vial_wyrm_bile.png", display = "*", color=colors.VIOLET, - desc = [[A vial of thick, lumpy fluid. Who knows what this will do to you if you drink it?]], + desc = _t[[A vial of thick, lumpy fluid. Who knows what this will do to you if you drink it?]], cost = 3000, quest = 1, - use_simple = { name="drink the vile fluid", use = function(self, who) + use_simple = { name=_t"drink the vile fluid", use = function(self, who) game.logPlayer(who, "#00FFFF#You drink the wyrm bile and feel forever transformed!") who.unused_talents_types = who.unused_talents_types + 1 game.log("You have %d category point(s) to spend. Press p to use them.", who.unused_talents_types) @@ -105,7 +105,7 @@ newEntity{ base = "BASE_GEM", define_as = "ATAMATHON_ACTIVATE", subtype = "red", name = "Atamathon's Lost Ruby Eye", color=colors.VIOLET, quest=true, unique=true, identified=true, image="object/artifact/atamathons_lost_ruby_eye.png", - desc = [[One of the ruby eyes of the legendary giant golem Atamathon. + desc = _t[[One of the ruby eyes of the legendary giant golem Atamathon. It is said it was made by the halflings during the Age of Pyre as a weapon against the orcs. Even though it was destroyed it managed to deal a crippling blow by killing their leader, Garkul the Devourer.]], material_level = 5, cost = 100, diff --git a/game/modules/tome/data/zones/sandworm-lair/zone.lua b/game/modules/tome/data/zones/sandworm-lair/zone.lua index f03daa01fab2c238362cc994796a67aedbf4e047..e51e53cce0cf8c0cda03306aa75b6650539a11e1 100644 --- a/game/modules/tome/data/zones/sandworm-lair/zone.lua +++ b/game/modules/tome/data/zones/sandworm-lair/zone.lua @@ -23,7 +23,7 @@ local is_bigworm = layout == "BIGWORM" if layout == "DEFAULT" then return { - name = "Sandworm lair", + name = _t"Sandworm lair", level_range = {7, 16}, level_scheme = "player", max_level = 4, @@ -87,7 +87,7 @@ return { elseif layout == "BIGWORM" then return { - name = "Sandworm lair", + name = _t"Sandworm lair", level_range = {7, 16}, level_scheme = "player", max_level = 2, diff --git a/game/modules/tome/data/zones/scintillating-caves/npcs.lua b/game/modules/tome/data/zones/scintillating-caves/npcs.lua index 35c1e4f52ae9ae53743405b606625734576914b5..27e992530dcfd7d892310ed42d7f80b0e510804e 100644 --- a/game/modules/tome/data/zones/scintillating-caves/npcs.lua +++ b/game/modules/tome/data/zones/scintillating-caves/npcs.lua @@ -32,8 +32,8 @@ newEntity{ base="BASE_NPC_CRYSTAL", define_as = "SPELLBLAZE_CRYSTAL", unique = true, name = "Spellblaze Crystal", tint=colors.PURPLE, image = "npc/spellblaze_crystal.png", color=colors.VIOLET, - desc = [[A formation of purple crystal. It seems strangely aware.]], - killer_message = "and vaporised into nothingness", + desc = _t[[A formation of purple crystal. It seems strangely aware.]], + killer_message = _t"and vaporised into nothingness", level_range = {7, nil}, exp_worth = 2, max_life = 150, life_rating = 12, fixed_rating = true, mana_regen = 3, @@ -68,7 +68,7 @@ newEntity{ base="BASE_NPC_CRYSTAL", define_as = "SPELLBLAZE_CRYSTAL", on_die = function(self, who) game.player:resolveSource():setQuestStatus("start-shaloren", engine.Quest.COMPLETED, "spellblaze") - game.state:activateBackupGuardian("SPELLBLAZE_SIMULACRUM", 3, 35, "I heard that some old crystals are nearly alive now in the scintillating caves.") + game.state:activateBackupGuardian("SPELLBLAZE_SIMULACRUM", 3, 35, _t"I heard that some old crystals are nearly alive now in the scintillating caves.") end, } @@ -78,8 +78,8 @@ newEntity{ base="BASE_NPC_CRYSTAL", define_as = "SPELLBLAZE_SIMULACRUM", name = "Spellblaze Simulacrum", display = "g", image = "npc/spellblaze_simulacrum.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/spellblaze_simulacrum.png", display_h=2, display_y=-1}}}, color=colors.VIOLET, - desc = [[A formation of purple crystal, but where the others could only be described as polyhedral, this construct seems to strangely resemble... you, if you were much, much larger.]], - killer_message = "and vaporised into nothingness", + desc = _t[[A formation of purple crystal, but where the others could only be described as polyhedral, this construct seems to strangely resemble... you, if you were much, much larger.]], + killer_message = _t"and vaporised into nothingness", level_range = {35, nil}, exp_worth = 3, max_life = 300, life_rating = 25, fixed_rating = true, life_regen = 0, diff --git a/game/modules/tome/data/zones/scintillating-caves/objects.lua b/game/modules/tome/data/zones/scintillating-caves/objects.lua index 314ed5c8333d2ada789d55325bbe46c5f3094997..e0fd7c0b8c48db105c6b4523ca09e16b1accaf37 100644 --- a/game/modules/tome/data/zones/scintillating-caves/objects.lua +++ b/game/modules/tome/data/zones/scintillating-caves/objects.lua @@ -23,7 +23,7 @@ for i = 1, 5 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "research log", lore="scintillating-caves-note-"..i, - desc = [[A paper scrap, left by an adventurer.]], + desc = _t[[A paper scrap, left by an adventurer.]], rarity = false, encumberance = 0, } @@ -32,7 +32,7 @@ end newEntity{ base = "BASE_LORE", define_as = "NOTE6", name = "exploration log", lore="scintillating-caves-note-6", - desc = [[A paper scrap, left by an adventurer.]], + desc = _t[[A paper scrap, left by an adventurer.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/scintillating-caves/zone.lua b/game/modules/tome/data/zones/scintillating-caves/zone.lua index cb77d59fee3c6fde2f7228c87332640e320746ad..f6821b79f52aefdd6b424228adef4346a842c8fc 100644 --- a/game/modules/tome/data/zones/scintillating-caves/zone.lua +++ b/game/modules/tome/data/zones/scintillating-caves/zone.lua @@ -21,7 +21,7 @@ local layout = game.state:alternateZone(short_name, {"TWISTED", 2}) if layout == "TWISTED" then return { - name = "Scintillating Caves", + name = _t"Scintillating Caves", level_range = {1, 7}, level_scheme = "player", max_level = 5, @@ -96,7 +96,7 @@ return { on_enter = function(lev) if lev == 1 and not game.level.data.warned then game.level.data.warned = true - require("engine.ui.Dialog"):simplePopup("Caves...", "As you enter the caves you notice the magic here has distorted the land, making sharp angles and turns.") + require("engine.ui.Dialog"):simplePopup(_t"Caves...", _t"As you enter the caves you notice the magic here has distorted the land, making sharp angles and turns.") end end, } @@ -104,7 +104,7 @@ return { else return { - name = "Scintillating Caves", + name = _t"Scintillating Caves", level_range = {1, 5}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/shadow-crypt/npcs.lua b/game/modules/tome/data/zones/shadow-crypt/npcs.lua index cebb351f415f59fc034b6d369451fa23609acfb7..2c7a9e0a48f40adaa9bd1e99062f89b69ef5c4b9 100644 --- a/game/modules/tome/data/zones/shadow-crypt/npcs.lua +++ b/game/modules/tome/data/zones/shadow-crypt/npcs.lua @@ -26,8 +26,8 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ base="BASE_NPC_ORC_RAK_SHOR", define_as = "CULTIST_RAK_SHOR", name = "Rak'Shor Cultist", color=colors.VIOLET, unique = true, - desc = [[An old orc, wearing black robes. He seems to be responsible for the creation of the shades.]], - killer_message = "but nobody knew why #sex# suddenly became evil", + desc = _t[[An old orc, wearing black robes. He seems to be responsible for the creation of the shades.]], + killer_message = _t"but nobody knew why #sex# suddenly became evil", level_range = {35, nil}, exp_worth = 2, rank = 4, max_life = 150, life_rating = 17, fixed_rating = true, @@ -91,7 +91,7 @@ newEntity{ base="BASE_NPC_ORC_RAK_SHOR", define_as = "CULTIST_RAK_SHOR", max_level=table.NIL_MERGE, name = is_yeek and ("Wayist Shade of %s"):format(plr.name) or ("Doomed Shade of %s"):format(plr.name), desc = is_yeek and ([[%s under the mental protection of The Way could not be swayed and sided with you against the Cultist!]]):format(plr.name) or ([[The Dark Side of %s, completely consumed by hate...]]):format(plr.name), - killer_message = "but nobody knew why #sex# suddenly became evil", + killer_message = _t"but nobody knew why #sex# suddenly became evil", color_r = 150, color_g = 150, color_b = 150, ai = "tactical", ai_state = {talent_in=1}, })) @@ -124,11 +124,11 @@ newEntity{ base="BASE_NPC_ORC_RAK_SHOR", define_as = "CULTIST_RAK_SHOR", local x, y = util.findFreeGrid(self.x, self.y, 10, true, {[engine.Map.ACTOR]=true}) if x and y then self:logCombat(game.player, "#GREY#The #Source# looks deep into your eyes. You feel torn apart!") - self:doEmote("Ra'kk kor merk ZUR!!!", 120) + self:doEmote(_t"Ra'kk kor merk ZUR!!!", 120) game.zone:addEntity(game.level, a, "actor", x, y) a:resolve() if is_yeek then - a:doEmote("FOR THE WAY! Die cultist!", 120) + a:doEmote(_t"FOR THE WAY! Die cultist!", 120) a.can_talk = "shadow-crypt-yeek-clone" self:logCombat(game.player, "#PURPLE#The #Source# looks afraid, he did not plan on his creation turning against him!") end diff --git a/game/modules/tome/data/zones/shadow-crypt/zone.lua b/game/modules/tome/data/zones/shadow-crypt/zone.lua index 10d49d160d648cc6aa46a415fd378fb6ffc2fa80..ac31c9bdfde1d46a0f3be485e8dea6e1d3815619 100644 --- a/game/modules/tome/data/zones/shadow-crypt/zone.lua +++ b/game/modules/tome/data/zones/shadow-crypt/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Shadow Crypt", + name = _t"Shadow Crypt", level_range = {34,45}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/shertul-fortress-caldizar/grids.lua b/game/modules/tome/data/zones/shertul-fortress-caldizar/grids.lua index 75173a99fac923cab58c53dca8eeb0a7fb958a4a..1de3b899da3ef09f35f5ad21ebff0f96f71c4baf 100644 --- a/game/modules/tome/data/zones/shertul-fortress-caldizar/grids.lua +++ b/game/modules/tome/data/zones/shertul-fortress-caldizar/grids.lua @@ -39,14 +39,14 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They were left behind by the powerful Sher'tul race. + desc = _t[[A farportal is a way to travel incredible distances in the blink of an eye. They were left behind by the powerful Sher'tul race. This farportal is not connected to any other portal. It is made for exploration; you cannot know where it will send you. It should automatically create a portal back, but it might not be near your arrival zone.]], block_move = function(self, x, y, who, act, couldpass) if not who or not who.player or not act then return true end local Dialog = require "engine.ui.Dialog" - Dialog:simplePopup("Farportal", "The farportal seems to be inactive") + Dialog:simplePopup(_t"Farportal", _t"The farportal seems to be inactive") return true end, } diff --git a/game/modules/tome/data/zones/shertul-fortress-caldizar/npcs.lua b/game/modules/tome/data/zones/shertul-fortress-caldizar/npcs.lua index 3d23a48d566881d3d60fde3b4c5638a29ac1eec2..a21779189addf8371a6e2c7b131c229dfb451e96 100644 --- a/game/modules/tome/data/zones/shertul-fortress-caldizar/npcs.lua +++ b/game/modules/tome/data/zones/shertul-fortress-caldizar/npcs.lua @@ -23,7 +23,7 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ base = "BASE_NPC_SHERTUL", define_as = "CALDIZAR", name = "Caldizar", color=colors.LIGHT_RED, unique="Caldizar Unknown Fortress", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_sher_tul_caldizar.png", display_h=2, display_y=-1}}}, - desc ="A creature stands before you, with long tentacle-like appendages and a squat bump in place of a head. An intense aura of power radiates from this being unlike anything you've ever felt before. It can only be a Sher'Tul. A living Sher'Tul!", + desc =_t"A creature stands before you, with long tentacle-like appendages and a squat bump in place of a head. An intense aura of power radiates from this being unlike anything you've ever felt before. It can only be a Sher'Tul. A living Sher'Tul!", level_range = {1000, nil}, exp_worth = 5, life_rating = 40, rank = 5, diff --git a/game/modules/tome/data/zones/shertul-fortress-caldizar/zone.lua b/game/modules/tome/data/zones/shertul-fortress-caldizar/zone.lua index b0a39af276af206caa520e06a0c61ad2a659e93d..6a9e7216a51c51b7b5c8b94c47044b80bc9216f6 100644 --- a/game/modules/tome/data/zones/shertul-fortress-caldizar/zone.lua +++ b/game/modules/tome/data/zones/shertul-fortress-caldizar/zone.lua @@ -18,11 +18,11 @@ -- darkgod@te4.org return { - name = "Unknown Sher'Tul Fortress", + name = _t"Unknown Sher'Tul Fortress", display_name = function(x, y) local zn = game.level.map.attrs(x or game.player.x, y or game.player.y, "zonename") - if zn then return "Unknown Sher'Tul Fortress ("..zn..")" - else return "Unknown the Sher'Tul Fortress" end + if zn then return ("Unknown Sher'Tul Fortress (%s)"):tformat(zn) + else return _t"Unknown the Sher'Tul Fortress" end end, variable_zone_name = true, actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, @@ -71,7 +71,7 @@ return { end, on_enter = function(lev, old_lev, zone) local Dialog = require("engine.ui.Dialog") - Dialog:simpleLongPopup("Unknown Sher'Tul Fortress", "With a sudden jolt you find yourself... somewhere familiar. The smooth walls and gentle lighting remind you of your fortress. And yet it feels different too. There is a gentle humming noise in the background, and your whole body feels light, almost weightless, such that the slightest movement propels you into the air. You have the odd feeling that you are not on Maj'Eyal any longer... From ahead you sense something both terrible and wonderful, and trepidation fills every corner of your being.", 500) + Dialog:simpleLongPopup(_t"Unknown Sher'Tul Fortress", _t"With a sudden jolt you find yourself... somewhere familiar. The smooth walls and gentle lighting remind you of your fortress. And yet it feels different too. There is a gentle humming noise in the background, and your whole body feels light, almost weightless, such that the slightest movement propels you into the air. You have the odd feeling that you are not on Maj'Eyal any longer... From ahead you sense something both terrible and wonderful, and trepidation fills every corner of your being.", 500) end, background = function(level, x, y, nb_keyframes) diff --git a/game/modules/tome/data/zones/shertul-fortress/grids.lua b/game/modules/tome/data/zones/shertul-fortress/grids.lua index e0c8f8460612696f0616eb41dd0f0c740a19774a..380c73221ab129b75a77cfc3cdd035b6327b4db0 100644 --- a/game/modules/tome/data/zones/shertul-fortress/grids.lua +++ b/game/modules/tome/data/zones/shertul-fortress/grids.lua @@ -37,7 +37,7 @@ local energycount = function(self) if not q:isCompleted("chat-energy") and q.shertul_energy <= 0 then return end if not tex or lastenergy ~= q.shertul_energy then lastenergy = q.shertul_energy - local text = ("%0.2f Energy Stored"):format(q.shertul_energy) + local text = ("%0.2f Energy Stored"):tformat(q.shertul_energy) tex, nblines, wline = font:draw(text, text:toTString():maxWidth(font), 0, 255, 128) end @@ -111,7 +111,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They were left behind by the powerful Sher'tul race. + desc = _t[[A farportal is a way to travel incredible distances in the blink of an eye. They were left behind by the powerful Sher'tul race. This farportal is not connected to any other portal. It is made for exploration; you cannot know where it will send you. It should automatically create a portal back, but it might not be near your arrival zone.]], @@ -143,11 +143,11 @@ It should automatically create a portal back, but it might not be near your arri if not who.player then return end local Dialog = require "engine.ui.Dialog" local q = who:hasQuest("shertul-fortress") - if not q then Dialog:simplePopup("Exploratory Farportal", "The farportal seems to be inactive") return end - if q:isCompleted("farportal-broken") then Dialog:simplePopup("Exploratory Farportal", "The farportal is broken and will not be usable anymore.") return end - if not q:exploratory_energy(true) then Dialog:simplePopup("Exploratory Farportal", "The fortress does not have enough energy to power a trip through the portal.") return end + if not q then Dialog:simplePopup(_t"Exploratory Farportal", _t"The farportal seems to be inactive") return end + if q:isCompleted("farportal-broken") then Dialog:simplePopup(_t"Exploratory Farportal", _t"The farportal is broken and will not be usable anymore.") return end + if not q:exploratory_energy(true) then Dialog:simplePopup(_t"Exploratory Farportal", _t"The fortress does not have enough energy to power a trip through the portal.") return end - Dialog:yesnoPopup("Exploratory Farportal", "Do you want to travel in the farportal? You cannot know where you will end up.", function(ret) if ret then + Dialog:yesnoPopup(_t"Exploratory Farportal", _t"Do you want to travel in the farportal? You cannot know where you will end up.", function(ret) if ret then if not game:changeLevelCheck(1, {}, {direct_switch=true}) then return end if self:checkSpecialLocation(who, q) then return end @@ -165,14 +165,14 @@ It should automatically create a portal back, but it might not be near your arri g:removeAllMOs(true) g:altered() g.show_tooltip = true - g.name = "Exploratory Farportal exit" + g.name = _t"Exploratory Farportal exit" g.display = '&' g.color_r = colors.VIOLET.r g.color_g = colors.VIOLET.g g.color_b = colors.VIOLET.b g.add_displays = g.add_displays or {} g.add_displays[#g.add_displays+1] = mod.class.Grid.new{image="terrain/maze_teleport.png"} g.notice = true g.change_level = 1 g.change_zone = "shertul-fortress" game.zone:addEntity(game.level, g, "terrain", x, y) - if self then game.logSeen(self, "#VIOLET#As %s falls you notice a portal appearing.", self.name) + if self then game.logSeen(self, "#VIOLET#As %s falls you notice a portal appearing.", self:getName()) else game.logSeen(p, "#VIOLET#Your rod of recall shakes, a portal appears beneath you.") end end zone.on_turn = function(zone) @@ -227,7 +227,7 @@ newEntity{ local nb = 0 if profile.mod.lore then for lore, _ in pairs(profile.mod.lore.lore) do if game.party:isLoreShareable(lore) then nb = nb + 1 end end end - local popup = require("engine.ui.Dialog"):simpleWaiter("Yiilkgur's Library of Lost Mysteries", "Receiving the lost knowledge of the universe...", nil, nil, nb) + local popup = require("engine.ui.Dialog"):simpleWaiter(_t"Yiilkgur's Library of Lost Mysteries", _t"Receiving the lost knowledge of the universe...", nil, nil, nb) core.wait.enableManualTick(true) core.display.forceRedraw() @@ -244,7 +244,7 @@ newEntity{ popup:done() - game:registerDialog(require("mod.dialogs.ShowLore").new("Yiilkgur's Library of Lost Mysteries", game.party)) + game:registerDialog(require("mod.dialogs.ShowLore").new(_t"Yiilkgur's Library of Lost Mysteries", game.party)) end return true end, @@ -294,7 +294,7 @@ local dcb = function(self) local turns = (game.turn - data.start_turn) / 10 local text if self.monitor_mode == "global" then - text = ("Turns: %d\nTotal Damage: %d\nDamage/turns: %d"):format(turns, data.total, data.total / turns) + text = ("Turns: %d\nTotal Damage: %d\nDamage/turns: %d"):tformat(turns, data.total, data.total / turns) data.changed = false else text = {} diff --git a/game/modules/tome/data/zones/shertul-fortress/npcs.lua b/game/modules/tome/data/zones/shertul-fortress/npcs.lua index d4f1bb5c8a97cd9adcff548b047e843a74b706db..9f3eb12e395f57c7fa1e20c31ae7fa63154dfd0a 100644 --- a/game/modules/tome/data/zones/shertul-fortress/npcs.lua +++ b/game/modules/tome/data/zones/shertul-fortress/npcs.lua @@ -23,8 +23,8 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ base = "BASE_NPC_HORROR", define_as="WEIRDLING_BEAST", name = "Weirdling Beast", color=colors.VIOLET, unique = true, - desc = "A roughly humanoid creature, with tentacle-like appendages in the place of arms and legs. You gasp in horror as you notice it has no head. Putrid warts form quickly on its skin and explode as quickly.", - killer_message = "and slowly consumed", + desc = _t"A roughly humanoid creature, with tentacle-like appendages in the place of arms and legs. You gasp in horror as you notice it has no head. Putrid warts form quickly on its skin and explode as quickly.", + killer_message = _t"and slowly consumed", level_range = {19, nil}, exp_worth = 3, rank = 3.5, autolevel = "caster", @@ -107,7 +107,7 @@ newEntity{ base = "BASE_NPC_HORROR", define_as="WEIRDLING_BEAST", game:onLevelLoad("wilderness-1", function(zone, level) local g = mod.class.Grid.new{ show_tooltip=true, always_remember = true, - name="Teleportation portal to the Sher'Tul Fortress", + name=_t"Teleportation portal to the Sher'Tul Fortress", display='>', color=colors.ANTIQUE_WHITE, image = "terrain/grass.png", add_mos = {{image = "terrain/maze_teleport.png"}}, notice = true, change_level=1, change_zone="shertul-fortress", @@ -128,7 +128,7 @@ newEntity{ base = "BASE_NPC_HORROR", define_as="WEIRDLING_BEAST", newEntity{ base = "BASE_NPC_HORROR", define_as="BUTLER", subtype = "Sher'Tul", name = "Fortress Shadow", color=colors.GREY, - desc = "The shadow created by the fortress, it resembles somewhat the horrors you saw previously, but it is not the same.", + desc = _t"The shadow created by the fortress, it resembles somewhat the horrors you saw previously, but it is not the same.", level_range = {19, nil}, exp_worth = 3, rank = 3, max_life = 300, life_rating = 16, @@ -142,7 +142,7 @@ newEntity{ base = "BASE_NPC_HORROR", define_as="BUTLER", newEntity{ define_as="TRAINING_DUMMY", type = "training", subtype = "dummy", name = "Training Dummy", color=colors.GREY, - desc = "Training dummy.", image = "npc/lure.png", + desc = _t"Training dummy.", image = "npc/lure.png", level_range = {1, 1}, exp_worth = 0, rank = 3, max_life = 300000, life_rating = 0, @@ -176,7 +176,7 @@ newEntity{ define_as="TRAINING_DUMMY", newEntity{ base = "BASE_NPC_CAT", define_as = "KITTY", name = "Pumpkin, the little kitty", color=colors.ORANGE, unique = true, image="npc/sage_kitty.png", - desc = [[An orange kitty with a white star blaze on his chest. Has a strange affinity for licking your face whenever possible.]], + desc = _t[[An orange kitty with a white star blaze on his chest. Has a strange affinity for licking your face whenever possible.]], level_range = {1, nil}, exp_worth = 1, rarity = 4, immune_possession = 1, diff --git a/game/modules/tome/data/zones/shertul-fortress/zone.lua b/game/modules/tome/data/zones/shertul-fortress/zone.lua index 3921b13f4e268b01699a33e9b4aa01f481a2ff8c..6f87c8666022d4e0bc04cd351c090a16a407b552 100644 --- a/game/modules/tome/data/zones/shertul-fortress/zone.lua +++ b/game/modules/tome/data/zones/shertul-fortress/zone.lua @@ -18,11 +18,11 @@ -- darkgod@te4.org return { - name = "Yiilkgur, the Sher'Tul Fortress", + name = _t"Yiilkgur, the Sher'Tul Fortress", display_name = function(x, y) local zn = game.level.map.attrs(x or game.player.x, y or game.player.y, "zonename") - if zn then return zn.." (Yiilkgur, the Sher'Tul Fortress)" - else return "Yiilkgur, the Sher'Tul Fortress" end + if zn then return ("%s (Yiilkgur, the Sher'Tul Fortress)"):tformat(_t(zn)) + else return _t"Yiilkgur, the Sher'Tul Fortress" end end, variable_zone_name = true, actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, @@ -83,7 +83,7 @@ return { local Dialog = require("engine.ui.Dialog") if not game.level.shown_warning then - Dialog:simpleLongPopup("Yiilkgur", "This level seems to be removed from the rest of the ruins. The air is fresh and the level is lighted. You hear the distant crackling of magical energies.", 400) + Dialog:simpleLongPopup(_t"Yiilkgur", _t"This level seems to be removed from the rest of the ruins. The air is fresh and the level is lighted. You hear the distant crackling of magical energies.", 400) game.level.shown_warning = true end @@ -96,7 +96,7 @@ return { game.zone:addEntity(game.level, kitty, "actor", x, y) kitty.faction = game.player.faction game.state.kitty_summoned = true - Dialog:simpleLongPopup("Yiilkgur", "As you enter the familiar Fortress you notice a small orange cat has followed you somehow.\nIt looks like the kitty you fed earlier.", 400) + Dialog:simpleLongPopup(_t"Yiilkgur", _t"As you enter the familiar Fortress you notice a small orange cat has followed you somehow.\nIt looks like the kitty you fed earlier.", 400) end end end, diff --git a/game/modules/tome/data/zones/slazish-fen/grids.lua b/game/modules/tome/data/zones/slazish-fen/grids.lua index ef36aa0877ffc0c61ac6416d8ffe2fba39720982..bf7bcbc9856ca76c1ecbe603dd6eadc9fce16851 100644 --- a/game/modules/tome/data/zones/slazish-fen/grids.lua +++ b/game/modules/tome/data/zones/slazish-fen/grids.lua @@ -88,7 +88,7 @@ newEntity{ base="BOGWATER", return true end - who:restInit(20, "destroying the portal", "destroyed the portal", function(cnt, max) + who:restInit(20, _t"destroying the portal", _t"destroyed the portal", function(cnt, max) if cnt > max then game.log("#VIOLET#The portal starts to break down, run!") self.broken = true diff --git a/game/modules/tome/data/zones/slazish-fen/npcs.lua b/game/modules/tome/data/zones/slazish-fen/npcs.lua index 674c0e981e298591869d53400bb5233e18470c8e..31841c039653639b4e5aedfb1b5564d96efe60f6 100644 --- a/game/modules/tome/data/zones/slazish-fen/npcs.lua +++ b/game/modules/tome/data/zones/slazish-fen/npcs.lua @@ -60,7 +60,7 @@ newEntity{ newEntity{ base = "BASE_NPC_NAGA", define_as = "NAGA_TIDEWARDEN", name = "naga tidewarden", color=colors.DARK_UMBER, - desc = [[Before you stands a tall figure, propped high by a serpent's tail in place of where his legs should rightly be. His torso is slim and muscular, and his face has an elven beauty to it, framed by locks of blonde hair. But there is a fierceness to this creature too, and his bright eyes veil a smouldering anger.]], + desc = _t[[Before you stands a tall figure, propped high by a serpent's tail in place of where his legs should rightly be. His torso is slim and muscular, and his face has an elven beauty to it, framed by locks of blonde hair. But there is a fierceness to this creature too, and his bright eyes veil a smouldering anger.]], resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_naga_naga_tidewarden.png", display_h=2, display_y=-1}}}, level_range = {1, nil}, exp_worth = 3, rarity = 1, @@ -78,7 +78,7 @@ newEntity{ base = "BASE_NPC_NAGA", define_as = "NAGA_TIDEWARDEN", newEntity{ base = "BASE_NPC_NAGA", define_as = "NAGA_TIDECALLER", name = "naga tidecaller", color=colors.BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_naga_naga_tidecaller.png", display_h=2, display_y=-1}}}, - desc = [[A slithering noise accompanies the movement of this strange creature, whose snake-like tail gives rise to the body of a beautiful Elf-like woman. As she moves her delicate hands, water rises from the ground, and you feel that here is no mere monster, but a creature of awe and power.]], + desc = _t[[A slithering noise accompanies the movement of this strange creature, whose snake-like tail gives rise to the body of a beautiful Elf-like woman. As she moves her delicate hands, water rises from the ground, and you feel that here is no mere monster, but a creature of awe and power.]], level_range = {2, nil}, exp_worth = 3, female = true, rarity = 1, max_life = resolvers.rngavg(50,60), life_rating = 10, @@ -96,7 +96,7 @@ newEntity{ base = "BASE_NPC_NAGA", define_as = "NAGA_TIDECALLER", newEntity{ base = "BASE_NPC_NAGA", name = "naga nereid", color=colors.YELLOW, resolvers.nice_tile{tall=1}, - desc = [[Green eyes stare out from behind strands of long, golden hair, which falls down in waves over smooth, pale skin. Your eyes are drawn to the bare flesh, but as they look further they see dark scales stretching out into a long serpent's tail. You look up as she moves, her hair parting to reveal a slim and beautiful face with high cheekbones and full lips. Yet for all the allure of this wondrous creature the terror of the serpentine tail sends shivers down your spine.]], + desc = _t[[Green eyes stare out from behind strands of long, golden hair, which falls down in waves over smooth, pale skin. Your eyes are drawn to the bare flesh, but as they look further they see dark scales stretching out into a long serpent's tail. You look up as she moves, her hair parting to reveal a slim and beautiful face with high cheekbones and full lips. Yet for all the allure of this wondrous creature the terror of the serpentine tail sends shivers down your spine.]], level_range = {2, nil}, exp_worth = 3, female = true, rarity = 1, max_life = resolvers.rngavg(80,90), life_rating = 11, @@ -118,8 +118,8 @@ newEntity{ base="BASE_NPC_NAGA", define_as = "ZOISLA", name = "Lady Zoisla the Tidebringer", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_naga_lady_zoisla_the_tidebringer.png", display_h=2, display_y=-1}}}, color=colors.VIOLET, female = true, - desc = [[Water circles slowly on the ground around this naga's tail, some droplets leaping up now and then as if they are impatient to do their mistress' bidding. Her dark tail is coiled tight, making her look short, but her calm and confident stare assure you that she will not be easily overcome. As the water begins to rise around her the air starts to shimmer, and you feel her dark eyes are penetrating into you deeper than is comfortable.]], - killer_message = "and brought back to Vargh for experimentation", + desc = _t[[Water circles slowly on the ground around this naga's tail, some droplets leaping up now and then as if they are impatient to do their mistress' bidding. Her dark tail is coiled tight, making her look short, but her calm and confident stare assure you that she will not be easily overcome. As the water begins to rise around her the air starts to shimmer, and you feel her dark eyes are penetrating into you deeper than is comfortable.]], + killer_message = _t"and brought back to Vargh for experimentation", level_range = {7, nil}, exp_worth = 2, max_life = 150, life_rating = 15, fixed_rating = true, max_stamina = 85, diff --git a/game/modules/tome/data/zones/slazish-fen/objects.lua b/game/modules/tome/data/zones/slazish-fen/objects.lua index 9efee8fafbb059fb4ef828677d2fc7017a0eb2f6..e83181658b68a6574f06f663fcded31c0ddf2d31 100644 --- a/game/modules/tome/data/zones/slazish-fen/objects.lua +++ b/game/modules/tome/data/zones/slazish-fen/objects.lua @@ -26,7 +26,7 @@ for i = 1, 3 do newEntity{ base = "BASE_LORE", define_as = "SLAZISH_NOTE"..i, name = "weird conch", lore="slazish-note-"..i, image = "terrain/shell1.png", - desc = [[A conch; it seems the naga was using it as a communication tool.]], + desc = _t[[A conch; it seems the naga was using it as a communication tool.]], rarity = false, encumberance = 0, } @@ -36,8 +36,8 @@ newEntity{ base = "BASE_CLOTH_ARMOR", define_as = "ROBES_DEFLECTION", power_source = {arcane=true}, unique = true, name = "Robes of Deflection", color = colors.UMBER, image = "object/artifact/robes_of_deflection.png", - unided_name = "iridescent robe", - desc = [[This set of robes seems to shine with metallic colors.]], + unided_name = _t"iridescent robe", + desc = _t[[This set of robes seems to shine with metallic colors.]], level_range = {1, 10}, rarity = false, cost = 70, diff --git a/game/modules/tome/data/zones/slazish-fen/zone.lua b/game/modules/tome/data/zones/slazish-fen/zone.lua index 675692f8eebcd5a5ed91562787a88bc517972184..00011f9eb7c363b2c0c51f143f9c1f0e42574fc4 100644 --- a/game/modules/tome/data/zones/slazish-fen/zone.lua +++ b/game/modules/tome/data/zones/slazish-fen/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Slazish Fens", + name = _t"Slazish Fens", level_range = {1, 5}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/slime-tunnels/grids.lua b/game/modules/tome/data/zones/slime-tunnels/grids.lua index d838a71f527b3975f42e0139617d6c318e89b936..fa7b552d9bd0b3aa4383a129430e6801a754b478 100644 --- a/game/modules/tome/data/zones/slime-tunnels/grids.lua +++ b/game/modules/tome/data/zones/slime-tunnels/grids.lua @@ -28,9 +28,9 @@ local orb_activate = function(self, x, y, who, act, couldpass) local owner, orb = game.party:findInAllPartyInventoriesBy("define_as", self.define_as) if not orb then - require("engine.ui.Dialog"):simplePopup("Strange Pedestal", "This pedestal looks old, you can see the shape of an orb carved on it.") + require("engine.ui.Dialog"):simplePopup(_t"Strange Pedestal", _t"This pedestal looks old, you can see the shape of an orb carved on it.") else - require("engine.ui.Dialog"):yesnoLongPopup("Strange Pedestal", "The pedestal seems to react to something in your bag. After some tests you notice it is the "..tostring(orb:getName{do_color=true})..".\nDo you wish to use the orb on the pedestal?", 400, function(ret) + require("engine.ui.Dialog"):yesnoLongPopup(_t"Strange Pedestal", ("The pedestal seems to react to something in your bag. After some tests you notice it is the %s.\nDo you wish to use the orb on the pedestal?"):tformat(tostring(orb:getName{do_color=true})), 400, function(ret) if ret then game.player:useCommandOrb(orb, x, y) end end) end @@ -61,7 +61,7 @@ newEntity{ summon = { base_list="mod.class.NPC:/data/general/npcs/multihued-drake.lua", type="dragon", subtype="multihued", name="greater multi-hued wyrm", - random_boss = {name_scheme="#rng# the Fearsome", class_filter=function(d) return d.name == "Archmage" end}, + random_boss = {name_scheme=_t"#rng# the Fearsome", class_filter=function(d) return d.name == "Archmage" end}, add_levels = 12, }, special = orb_summon, @@ -81,7 +81,7 @@ newEntity{ summon = { base_list="mod.class.NPC:/data/general/npcs/lich.lua", type="undead", subtype="lich", name="archlich", - random_boss = {name_scheme="#rng# the Neverdead", class_filter=function(d) return d.name == "Necromancer" end}, + random_boss = {name_scheme=_t"#rng# the Neverdead", class_filter=function(d) return d.name == "Necromancer" end}, add_levels = 12, }, special = orb_summon, @@ -101,7 +101,7 @@ newEntity{ summon = { base_list="mod.class.NPC:/data/general/npcs/gwelgoroth.lua", type="elemental", subtype="air", name="ultimate gwelgoroth", - random_boss = {name_scheme="#rng# the Silent Death", class_filter=function(d) return d.name == "Shadowblade" end}, + random_boss = {name_scheme=_t"#rng# the Silent Death", class_filter=function(d) return d.name == "Shadowblade" end}, add_levels = 12, }, special = orb_summon, @@ -121,7 +121,7 @@ newEntity{ summon = { base_list="mod.class.NPC:/data/general/npcs/major-demon.lua", type="demon", subtype="major", name="forge-giant", - random_boss = {name_scheme="#rng# the Crusher", class_filter=function(d) return d.name == "Corruptor" end}, + random_boss = {name_scheme=_t"#rng# the Crusher", class_filter=function(d) return d.name == "Corruptor" end}, add_levels = 12, }, special = orb_summon, @@ -156,10 +156,10 @@ newEntity{ change_level=1, change_zone="high-peak", change_level_check = function() if not game.player:hasQuest("orb-command") or not game.player:isQuestStatus("orb-command", engine.Quest.DONE) then - require("engine.ui.Dialog"):simplePopup("High Peak", 'The way forward is blocked. There must be some way around here to unlock those doors.') + require("engine.ui.Dialog"):simplePopup(_t"High Peak", _t'The way forward is blocked. There must be some way around here to unlock those doors.') return true end - require("engine.ui.Dialog"):yesnoLongPopup("High Peak", 'As you stand on the stairs you can feel this is a "do or die" one way trip. If you enter there will be no coming back.\nEnter?', 500, function(ret) if ret then + require("engine.ui.Dialog"):yesnoLongPopup(_t"High Peak", _t'As you stand on the stairs you can feel this is a "do or die" one way trip. If you enter there will be no coming back.\nEnter?', 500, function(ret) if ret then game:changeLevel(1, "high-peak") end end) return true diff --git a/game/modules/tome/data/zones/slime-tunnels/zone.lua b/game/modules/tome/data/zones/slime-tunnels/zone.lua index 4aa681bfd9cc9f253a95b37a83d343c05e854dbd..0abe70174b69bce184cfe8d29a6af5368f5fd151 100644 --- a/game/modules/tome/data/zones/slime-tunnels/zone.lua +++ b/game/modules/tome/data/zones/slime-tunnels/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Slime Tunnels", + name = _t"Slime Tunnels", level_range = {45, 55}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/sludgenest/grids.lua b/game/modules/tome/data/zones/sludgenest/grids.lua index 026fa71ccb57f9a61f77059090119c78a2dfc3d3..8e02d00e33e34ff6c5424e3be7fe21b998b89a58 100644 --- a/game/modules/tome/data/zones/sludgenest/grids.lua +++ b/game/modules/tome/data/zones/sludgenest/grids.lua @@ -28,9 +28,9 @@ local orb_activate = function(self, x, y, who, act, couldpass) local owner, orb = game.party:findInAllPartyInventoriesBy("define_as", self.define_as) if not orb then - require("engine.ui.Dialog"):simplePopup("Strange Pedestal", "This pedestal looks old, you can see the shape of an orb carved on it.") + require("engine.ui.Dialog"):simplePopup(_t"Strange Pedestal", _t"This pedestal looks old, you can see the shape of an orb carved on it.") else - require("engine.ui.Dialog"):yesnoLongPopup("Strange Pedestal", "The pedestal seems to react to something in your bag. After some tests you notice it is the "..tostring(orb:getName{do_color=true})..".\nDo you wish to use the orb on the pedestal?", 400, function(ret) + require("engine.ui.Dialog"):yesnoLongPopup(_t"Strange Pedestal", ("The pedestal seems to react to something in your bag. After some tests you notice it is the %s.\nDo you wish to use the orb on the pedestal?"):tformat(tostring(orb:getName{do_color=true})), 400, function(ret) if ret then game.player:useCommandOrb(orb, x, y) end end) end @@ -58,7 +58,7 @@ newEntity{ summon = { base_list="mod.class.NPC:/data/general/npcs/multihued-drake.lua", type="dragon", subtype="multihued", name="greater multi-hued wyrm", - random_boss = {name_scheme="#rng# the Fearsome", class_filter=function(d) return d.name == "Archmage" end}, + random_boss = {name_scheme=_t"#rng# the Fearsome", class_filter=function(d) return d.name == "Archmage" end}, add_levels = 12, }, special = orb_summon, @@ -77,7 +77,7 @@ newEntity{ summon = { base_list="mod.class.NPC:/data/general/npcs/lich.lua", type="undead", subtype="lich", name="archlich", - random_boss = {name_scheme="#rng# the Neverdead", class_filter=function(d) return d.name == "Necromancer" end}, + random_boss = {name_scheme=_t"#rng# the Neverdead", class_filter=function(d) return d.name == "Necromancer" end}, add_levels = 12, }, special = orb_summon, @@ -96,7 +96,7 @@ newEntity{ summon = { base_list="mod.class.NPC:/data/general/npcs/gwelgoroth.lua", type="elemental", subtype="air", name="ultimate gwelgoroth", - random_boss = {name_scheme="#rng# the Silent Death", class_filter=function(d) return d.name == "Shadowblade" end}, + random_boss = {name_scheme=_t"#rng# the Silent Death", class_filter=function(d) return d.name == "Shadowblade" end}, add_levels = 12, }, special = orb_summon, @@ -115,7 +115,7 @@ newEntity{ summon = { base_list="mod.class.NPC:/data/general/npcs/major-demon.lua", type="demon", subtype="major", name="forge-giant", - random_boss = {name_scheme="#rng# the Crusher", class_filter=function(d) return d.name == "Corruptor" end}, + random_boss = {name_scheme=_t"#rng# the Crusher", class_filter=function(d) return d.name == "Corruptor" end}, add_levels = 12, }, special = orb_summon, @@ -141,7 +141,7 @@ newEntity{ notice = true, change_level=1, change_zone="high-peak", change_level_check = function() - require("engine.ui.Dialog"):yesnoLongPopup("High Peak", 'As you stand on the stairs you can feel this is a "do or die" one way trip. If you enter there will be no coming back.\nEnter?', 500, function(ret) if ret then + require("engine.ui.Dialog"):yesnoLongPopup(_t"High Peak", _t'As you stand on the stairs you can feel this is a "do or die" one way trip. If you enter there will be no coming back.\nEnter?', 500, function(ret) if ret then game:changeLevel(1, "high-peak") end end) return true diff --git a/game/modules/tome/data/zones/sludgenest/npcs.lua b/game/modules/tome/data/zones/sludgenest/npcs.lua index 05e1e9e02127dae5877e51c0e234ee11eb85e2ab..55555dee567c8023b5cbc98a2a5167407ad9e850 100644 --- a/game/modules/tome/data/zones/sludgenest/npcs.lua +++ b/game/modules/tome/data/zones/sludgenest/npcs.lua @@ -27,8 +27,8 @@ newEntity{ define_as = "CORRUPTED_OOZEMANCER", type = "giant", subtype = "troll", unique = true, name = "Corrupted Oozemancer", display = "T", color=colors.VIOLET, - desc = [[This blight-ridden troll was once a proud defender of Nature. His corruption is spreading, eating away at the forest around him.]], - killer_message = "and dissolved into acidic ooze", + desc = _t[[This blight-ridden troll was once a proud defender of Nature. His corruption is spreading, eating away at the forest around him.]], + killer_message = _t"and dissolved into acidic ooze", level_range = {35, nil}, exp_worth = 2, max_life = 250, life_rating = 18, fixed_rating = true, equilibrium_regen = -10, diff --git a/game/modules/tome/data/zones/sludgenest/zone.lua b/game/modules/tome/data/zones/sludgenest/zone.lua index a51005e553b3f395f3ede00b87daba532c700809..68675a07d6140a2e89d8fbe686fa1c206031c8a9 100644 --- a/game/modules/tome/data/zones/sludgenest/zone.lua +++ b/game/modules/tome/data/zones/sludgenest/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Sludgenest", + name = _t"Sludgenest", level_range = {35, 45}, level_scheme = "player", max_level = 3, @@ -120,7 +120,7 @@ return { local randelite = 10 + (dl / 10) ^ 1.6 local randboss = (dl / 10) ^ 1.2 - 3 - if dl == 20 then require("engine.ui.Dialog"):simplePopup("Sludgenest", "It seems the slimes coming from the walls become stronger with time.") end + if dl == 20 then require("engine.ui.Dialog"):simplePopup(_t"Sludgenest", _t"It seems the slimes coming from the walls become stronger with time.") end if dl == 100 then world:gainAchievement("SLUDGENEST100", game.player) end if dl == 200 then world:gainAchievement("SLUDGENEST200", game.player) end if dl == 300 then world:gainAchievement("SLUDGENEST300", game.player) end diff --git a/game/modules/tome/data/zones/south-beach/npcs.lua b/game/modules/tome/data/zones/south-beach/npcs.lua index d68b2b443e006f4474501a95fbf93cbe1d5ad878..c13905055adacaa8ec59ac24d378ed50728c9cb7 100644 --- a/game/modules/tome/data/zones/south-beach/npcs.lua +++ b/game/modules/tome/data/zones/south-beach/npcs.lua @@ -28,7 +28,7 @@ newEntity{ image = "player/cornac_female_redhair.png", moddable_tile = "human_female", moddable_tile_base = "base_redhead_01.png", - desc = [[Enjoying a lovely day at the beach.]], + desc = _t[[Enjoying a lovely day at the beach.]], autolevel = "tank", ai = "move_complex", ai_state = { ai_target="target_player", talent_in=4, }, stats = { str=8, dex=7, mag=8, con=12 }, @@ -63,7 +63,7 @@ newEntity{ local DamageType = require "engine.DamageType" DamageType:get(DamageType.BLIGHT).projector(self, e.x, e.y, DamageType.BLIGHT, 10000) end - self:doEmote("What..! Please lets run!", 120) + self:doEmote(_t"What..! Please lets run!", 120) game.player:setQuestStatus("love-melinda", engine.Quest.COMPLETED, "saved-beach") game.bignews:say(120, "#DARK_GREEN#As Melinda is about to die a powerful wave of blight emanates from her!") end, diff --git a/game/modules/tome/data/zones/south-beach/zone.lua b/game/modules/tome/data/zones/south-beach/zone.lua index f6081aaae846850754f619f0bac1038c0acc2ad4..190427b0c50e01c7da534c86966af0ba38d42d53 100644 --- a/game/modules/tome/data/zones/south-beach/zone.lua +++ b/game/modules/tome/data/zones/south-beach/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Southern Beach", + name = _t"Southern Beach", level_range = {24, 35}, level_scheme = "player", max_level = 1, @@ -125,7 +125,7 @@ return { if game.level.data.yaech_start_in < 0 then game.level.data.yaech_start_in = nil local melinda = game.party:findMember{type="Girlfriend"} - if melinda then melinda:doEmote("Look over there!", 120) end + if melinda then melinda:doEmote(_t"Look over there!", 120) end game.level.data.nb_yaech_killed = 0 for i = 1, 12 do local m = game.zone:makeEntity(game.level, "actor", {type = "humanoid", subtype = "yaech"}, nil, true) diff --git a/game/modules/tome/data/zones/stellar-system-shandral/grids.lua b/game/modules/tome/data/zones/stellar-system-shandral/grids.lua index 8ad3ff360141e37b03a914f2f019f9c0038afabe..fe4c710a935a447b80748a65671292a5b7cd45ba 100644 --- a/game/modules/tome/data/zones/stellar-system-shandral/grids.lua +++ b/game/modules/tome/data/zones/stellar-system-shandral/grids.lua @@ -42,7 +42,7 @@ newEntity{ base = "CELESTIAL_BODY", define_as = "SHANDRAL", name = "Shandral (Sun)", display = '*', color=colors.GOLD, - desc = [[The sun of the Shandral star system.]], + desc=_t[[The sun of the Shandral star system.]], sphere_map = "stars/sun_surface.png", sphere_size = 8, x_rot = 20, y_rot = -20, rot_speed = 17000, @@ -55,7 +55,7 @@ newEntity{ base = "CELESTIAL_BODY", define_as = "EYAL", name = "Eyal (Planet)", display = 'O', color=colors.BLUE, - desc = [[One of the main planets of the Shandral system.]], + desc=_t[[One of the main planets of the Shandral system.]], sphere_map = "stars/eyal.png", sphere_size = 1, x_rot = 30, y_rot = -30, rot_speed = 9000, @@ -65,7 +65,7 @@ newEntity{ base = "CELESTIAL_BODY", define_as = "SUMMERTIDE", name = "Summertide (Moon of Eyal)", display = 'o', color=colors.GREY, - desc = [[One of the moons of Eyal.]], + desc=_t[[One of the moons of Eyal.]], sphere_map = "stars/moon1.png", sphere_size = 0.32, x_rot = 50, y_rot = -80, rot_speed = 5600, @@ -75,7 +75,7 @@ newEntity{ base = "CELESTIAL_BODY", define_as = "WINTERTIDE", name = "Wintertide (Moon of Eyal)", display = 'o', color=colors.GREY, - desc = [[One of the moons of Eyal.]], + desc=_t[[One of the moons of Eyal.]], sphere_map = "stars/moon1.png", sphere_size = 0.32, x_rot = -50, y_rot = 20, rot_speed = 5600, @@ -88,7 +88,7 @@ newEntity{ base = "CELESTIAL_BODY", define_as = "KOLAL", name = "Kolal (Planet)", display = 'O', color=colors.BROWN, - desc = [[One of the main planets of the Shandral system.]], + desc=_t[[One of the main planets of the Shandral system.]], sphere_map = "stars/kolal.png", sphere_size = 0.8, x_rot = 10, y_rot = -50, rot_speed = 4000, @@ -101,7 +101,7 @@ newEntity{ base = "CELESTIAL_BODY", define_as = "LUXAM", name = "Luxam (Planet)", display = 'O', color=colors.BROWN, - desc = [[One of the main planets of the Shandral system.]], + desc=_t[[One of the main planets of the Shandral system.]], sphere_map = "stars/luxam.png", sphere_size = 1.3, x_rot = 0, y_rot = -20, rot_speed = 1000, @@ -114,7 +114,7 @@ newEntity{ base = "CELESTIAL_BODY", define_as = "PONX", name = "Ponx (Gaz Planet)", display = 'O', color=colors.LIGHT_BLUE, - desc = [[One of the main planets of the Shandral system.]], + desc=_t[[One of the main planets of the Shandral system.]], sphere_map = "stars/ponx.png", sphere_size = 2, x_rot = 20, y_rot = -40, rot_speed = 3000, diff --git a/game/modules/tome/data/zones/stellar-system-shandral/zone.lua b/game/modules/tome/data/zones/stellar-system-shandral/zone.lua index 0c54832940de29d1ecc214ab60b95d0cd06cd201..33c2a31c3b967850f3ea1f24de7ce0dd16e1df3b 100644 --- a/game/modules/tome/data/zones/stellar-system-shandral/zone.lua +++ b/game/modules/tome/data/zones/stellar-system-shandral/zone.lua @@ -18,9 +18,9 @@ -- darkgod@te4.org return { - name = "Stellar System: Shandral", + name = _t"Stellar System: Shandral", display_name = function(x, y) - return "Stellar System: Shandral" + return _t"Stellar System: Shandral" end, variable_zone_name = true, level_range = {1, 1}, diff --git a/game/modules/tome/data/zones/tannen-tower/grids.lua b/game/modules/tome/data/zones/tannen-tower/grids.lua index c1c866a7a935249ae6388ab3f13606d570895c15..e9c7c56d7d9142ce196b0843fdec2bc8192f3cc7 100644 --- a/game/modules/tome/data/zones/tannen-tower/grids.lua +++ b/game/modules/tome/data/zones/tannen-tower/grids.lua @@ -30,15 +30,15 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[This portal seems to be connected with Last Hope; you could probably use it to go back.]], + desc=_t[[This portal seems to be connected with Last Hope; you could probably use it to go back.]], on_move = function(self, x, y, who) if who == game.player then - require("engine.ui.Dialog"):yesnoPopup("Back and there again", "Enter the portal back to Last Hope?", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Back and there again", _t"Enter the portal back to Last Hope?", function(ret) if not ret then game.player:hasQuest("east-portal"):back_to_last_hope() end - end, "Stay", "Enter") + end, _t"Stay", _t"Enter") end end, } diff --git a/game/modules/tome/data/zones/tannen-tower/npcs.lua b/game/modules/tome/data/zones/tannen-tower/npcs.lua index 8852583b50e2f23fe0c6d595d10b23689ccf266a..e0f61d6b470b9a67966ead8b8b962ae6e1db1f48 100644 --- a/game/modules/tome/data/zones/tannen-tower/npcs.lua +++ b/game/modules/tome/data/zones/tannen-tower/npcs.lua @@ -34,8 +34,8 @@ newEntity{ define_as = "TANNEN", type = "humanoid", subtype = "human", unique = true, name = "Tannen", display = "p", color=colors.VIOLET, - desc = [[The traitor has been revealed, and he does not intend to let you escape to tell the tale.]], - killer_message = "and was neither found nor heard from again", + desc = _t[[The traitor has been revealed, and he does not intend to let you escape to tell the tale.]], + killer_message = _t"and was neither found nor heard from again", level_range = {35, nil}, exp_worth = 2, max_life = 250, life_rating = 16, fixed_rating = true, max_mana = 850, mana_regen = 40, @@ -97,9 +97,9 @@ newEntity{ define_as = "DROLEM", display = 'g', color=colors.GREEN, name = "Drolem", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/construct_golem_drolem.png", display_h=2, display_y=-1}}}, - desc = [[This is Tannen's construct, a HUGE golem in the rough shape of a dragon. + desc = _t[[This is Tannen's construct, a HUGE golem in the rough shape of a dragon. It is so huge that it blocks sight beyond it.]], - killer_message = "and was neither found nor heard from again", + killer_message = _t"and was neither found nor heard from again", level_range = {35, nil}, exp_worth=2, max_life = 6000, life_rating = 17, fixed_rating = true, diff --git a/game/modules/tome/data/zones/tannen-tower/objects.lua b/game/modules/tome/data/zones/tannen-tower/objects.lua index 4ac3629609526e6ec0d58c572493c41dac518540..95e32390a11a4efafbd01bdd949e25707965015a 100644 --- a/game/modules/tome/data/zones/tannen-tower/objects.lua +++ b/game/modules/tome/data/zones/tannen-tower/objects.lua @@ -43,12 +43,12 @@ newEntity{ base = "BASE_GEM", newEntity{ define_as = "ATHAME_WEST2", quest=true, unique="Blood-Runed Athame West2", identified=true, no_unique_lore=true, type = "misc", subtype="misc", - unided_name = "athame", + unided_name = _t"athame", name = "Blood-Runed Athame", image = "object/artifact/blood_runed_athame.png", level_range = {50, 50}, display = "|", color=colors.VIOLET, encumber = 1, - desc = [[An athame, covered in blood runes. It radiates power.]], + desc = _t[[An athame, covered in blood runes. It radiates power.]], on_drop = function(self, who) if who == game.player then @@ -68,16 +68,16 @@ newEntity{ define_as = "ORB_MANY_WAYS2", power_source = {unknown=true}, unique = "Orb of Many Ways2", quest=true, no_unique_lore=true, type = "jewelry", subtype="orb", - unided_name = "swirling orb", + unided_name = _t"swirling orb", name = "Orb of Many Ways", level_range = {30, 30}, display = "*", color=colors.VIOLET, image = "object/artifact/orb_many_ways.png", encumber = 1, - desc = [[The orb projects images of distant places, some that seem not to be of this world, switching rapidly. + desc = _t[[The orb projects images of distant places, some that seem not to be of this world, switching rapidly. If used near a portal, it could probably activate it.]], max_power = 30, power_regen = 1, - use_power = { name = "activate a portal", power = 10, + use_power = { name = _t"activate a portal", power = 10, use = function(self, who) self:identify(true) local g = game.level.map(who.x, who.y, game.level.map.TERRAIN) @@ -108,7 +108,7 @@ for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "tattered paper scrap", lore="tannen-level"..i, - desc = [[A paper scrap, left by Tannen.]], + desc = _t[[A paper scrap, left by Tannen.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/tannen-tower/zone.lua b/game/modules/tome/data/zones/tannen-tower/zone.lua index bb5a4ffa1881456a7483b2173407744ff92c8fca..ca40ed16763523c5360a2399f0b630dd829a9580 100644 --- a/game/modules/tome/data/zones/tannen-tower/zone.lua +++ b/game/modules/tome/data/zones/tannen-tower/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Tannen's Tower", + name = _t"Tannen's Tower", level_range = {35, 45}, level_scheme = "player", max_level = 4, reverse_level_display=true, @@ -52,14 +52,14 @@ return { }, on_enter = function(lev, old_lev, newzone) if newzone and not game.level.shown_warning then - require("engine.ui.Dialog"):simplePopup("Tannen's Tower", "The portal brought you to what seems to be a cell in the basement of the tower. You must escape!") + require("engine.ui.Dialog"):simplePopup(_t"Tannen's Tower", _t"The portal brought you to what seems to be a cell in the basement of the tower. You must escape!") game.level.shown_warning = true end if lev == 4 then core.fov.set_actor_vision_size(0) if not game.level.data.seen_tannen then game.level.data.seen_tannen = true - require("engine.ui.Dialog"):simpleLongPopup("Tannen's Tower", [[As you climb up the steps, you see Tannen standing with his drolem, reading a scrap of parchment. As he reads, his eyes grow wider, and he starts sweating and pacing back and forth. When he reaches to stuff it in his pocket, he sees you and jumps back like a startled cat. "No! Not now! You have no idea what's at stake!" He retrieves a fistful of brightly-colored flasks from his robes, and his drolem's eyes glow as it springs to life, metal screeching in an impressive imitation of a roar.]], 500) + require("engine.ui.Dialog"):simpleLongPopup(_t"Tannen's Tower", _t[[As you climb up the steps, you see Tannen standing with his drolem, reading a scrap of parchment. As he reads, his eyes grow wider, and he starts sweating and pacing back and forth. When he reaches to stuff it in his pocket, he sees you and jumps back like a startled cat. "No! Not now! You have no idea what's at stake!" He retrieves a fistful of brightly-colored flasks from his robes, and his drolem's eyes glow as it springs to life, metal screeching in an impressive imitation of a roar.]], 500) end end end, diff --git a/game/modules/tome/data/zones/telmur/npcs.lua b/game/modules/tome/data/zones/telmur/npcs.lua index e203981e8a2d51585e199e848eb6552554e977b0..aded701d337a73b7620524316b5e39d5bed96214 100644 --- a/game/modules/tome/data/zones/telmur/npcs.lua +++ b/game/modules/tome/data/zones/telmur/npcs.lua @@ -31,8 +31,8 @@ newEntity{ define_as = "SHADE_OF_TELOS", type = "undead", subtype = "ghost", unique = true, name = "The Shade of Telos", display = "G", color=colors.VIOLET, - desc = [[Everybody thought Telos dead and his spirit destroyed, but it seems he still lingers in his old place of power.]], - killer_message = "and was savagely mutilated, a show of his rage towards all living things", + desc = _t[[Everybody thought Telos dead and his spirit destroyed, but it seems he still lingers in his old place of power.]], + killer_message = _t"and was savagely mutilated, a show of his rage towards all living things", not_power_source = {nature=true}, level_range = {38, nil}, exp_worth = 3, max_life = 250, life_rating = 22, fixed_rating = true, @@ -89,6 +89,6 @@ newEntity{ define_as = "SHADE_OF_TELOS", resolvers.inscriptions(1, {"manasurge rune"}), on_die = function(self, who) - require("engine.ui.Dialog"):simpleLongPopup("Back and there again", 'As the shade dissipates, you see no sign of the text entitled "Inverted and Reverted Probabilistic Fields". You should go back to Tannen.', 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Back and there again", _t'As the shade dissipates, you see no sign of the text entitled "Inverted and Reverted Probabilistic Fields". You should go back to Tannen.', 400) end, } diff --git a/game/modules/tome/data/zones/telmur/objects.lua b/game/modules/tome/data/zones/telmur/objects.lua index 645e7e2369e13954a88cfb169164968f9cb6dbbe..67e9af03ea83c3d62389894ef9fd7f0a1abe894f 100644 --- a/game/modules/tome/data/zones/telmur/objects.lua +++ b/game/modules/tome/data/zones/telmur/objects.lua @@ -26,9 +26,9 @@ newEntity{ base = "BASE_STAFF", slot = "OFFHAND", slot_forbid = false, twohanded = false, add_name=false, define_as = "TELOS_BOTTOM_HALF", rarity=false, image = "object/artifact/staff_broken_bottom_telos.png", - unided_name = "broken staff", + unided_name = _t"broken staff", name = "Telos's Staff (Bottom Half)", unique=true, - desc = [[The bottom part of Telos' broken staff.]], + desc = _t[[The bottom part of Telos' broken staff.]], require = { stat = { mag=35 }, }, encumberance = 2.5, cost = 500, diff --git a/game/modules/tome/data/zones/telmur/zone.lua b/game/modules/tome/data/zones/telmur/zone.lua index 902432bc31dce5d263adaf5320a61e2347ae39c0..bbdfded5f248c980918546ff92bafbb800d05583 100644 --- a/game/modules/tome/data/zones/telmur/zone.lua +++ b/game/modules/tome/data/zones/telmur/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Ruins of Telmur", + name = _t"Ruins of Telmur", level_range = {30, 40}, level_scheme = "player", max_level = 5, @@ -59,7 +59,7 @@ return { }, on_enter = function(lev, old_lev, newzone) if newzone and not game.level.shown_warning then - require("engine.ui.Dialog"):simplePopup("Telmur", "As you approach the tower you notice it is utterly destroyed, only the basement remaining.") + require("engine.ui.Dialog"):simplePopup(_t"Telmur", _t"As you approach the tower you notice it is utterly destroyed, only the basement remaining.") game.level.shown_warning = true end end, diff --git a/game/modules/tome/data/zones/tempest-peak/npcs.lua b/game/modules/tome/data/zones/tempest-peak/npcs.lua index 3496d756a8c7b5e2516df525678707ca7c08e1ee..ca02d8a21e3f4dea146a65f8b3a53e369d2ce70a 100644 --- a/game/modules/tome/data/zones/tempest-peak/npcs.lua +++ b/game/modules/tome/data/zones/tempest-peak/npcs.lua @@ -32,8 +32,8 @@ newEntity{ define_as = "URKIS", name = "Urkis, the High Tempest", display = "p", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_urkis__the_high_tempest.png", display_h=2, display_y=-1}}}, - desc = [[Lightning crackles around this middle-aged man. He radiates power.]], - killer_message = "and used in mad electrical reanimation experiments", + desc = _t[[Lightning crackles around this middle-aged man. He radiates power.]], + killer_message = _t"and used in mad electrical reanimation experiments", level_range = {17, nil}, exp_worth = 2, max_life = 250, life_rating = 17, fixed_rating = true, max_mana = 850, mana_regen = 40, diff --git a/game/modules/tome/data/zones/tempest-peak/zone.lua b/game/modules/tome/data/zones/tempest-peak/zone.lua index 427da8c20e06e9fafa3de8a794e29daba3c20020..c2247e230f0ea99f3f046558f8bfe60e1bfa0a63 100644 --- a/game/modules/tome/data/zones/tempest-peak/zone.lua +++ b/game/modules/tome/data/zones/tempest-peak/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Tempest Peak", + name = _t"Tempest Peak", level_range = {15, 22}, level_scheme = "player", max_level = 2, diff --git a/game/modules/tome/data/zones/temple-of-creation/npcs.lua b/game/modules/tome/data/zones/temple-of-creation/npcs.lua index c02d889b4d87af901b2f02a71011843b1e673b66..340f9ae91db34e98fac959bb16b63efa5fcec3ce 100644 --- a/game/modules/tome/data/zones/temple-of-creation/npcs.lua +++ b/game/modules/tome/data/zones/temple-of-creation/npcs.lua @@ -30,8 +30,8 @@ newEntity{ define_as = "SLASUL", faction="temple-of-creation", display = "@", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_naga_slasul.png", display_h=2, display_y=-1}}}, - desc = [[This towering naga exudes power, and radiates a certain charismatic charm as well. His masculine face stares at you with great intensity, and you struggle to meet his gaze. His torso is bare apart from an exquisite pearl set directly in his chest, and in his muscular arms he holds ready a heavy mace and shield. You sense there is more to him also, as if the very power of the ocean were concentrated in this great creature, and that the wrath of it may come flooding out at any moment.]], - killer_message = "and perverted into a monstrous aberration as a warning to the surface", + desc = _t[[This towering naga exudes power, and radiates a certain charismatic charm as well. His masculine face stares at you with great intensity, and you struggle to meet his gaze. His torso is bare apart from an exquisite pearl set directly in his chest, and in his muscular arms he holds ready a heavy mace and shield. You sense there is more to him also, as if the very power of the ocean were concentrated in this great creature, and that the wrath of it may come flooding out at any moment.]], + killer_message = _t"and perverted into a monstrous aberration as a warning to the surface", global_speed_base = 1.7, level_range = {30, nil}, exp_worth = 4, max_life = 350, life_rating = 22, fixed_rating = true, diff --git a/game/modules/tome/data/zones/temple-of-creation/objects.lua b/game/modules/tome/data/zones/temple-of-creation/objects.lua index 4e4f301e8afa42bee08be6f4f5208d6ec9e51de5..c3bbc5b3deb87aafe6d440a402beef296b973306 100644 --- a/game/modules/tome/data/zones/temple-of-creation/objects.lua +++ b/game/modules/tome/data/zones/temple-of-creation/objects.lua @@ -27,10 +27,10 @@ local DamageType = require "engine.DamageType" newEntity{ base = "BASE_LITE", power_source = {arcane=true}, define_as = "ELDRITCH_PEARL", - unided_name = "bright pearl", + unided_name = _t"bright pearl", name = "Eldritch Pearl", unique=true, image = "object/artifact/eldritch_pearl.png", display ='*', color = colors.AQUAMARINE, - desc = [[Thousands of years spent inside the temple of creation have infused this pearl with the fury of rushing water. It pulses light.]], + desc = _t[[Thousands of years spent inside the temple of creation have infused this pearl with the fury of rushing water. It pulses light.]], -- No cost, it's invaluable wielder = { @@ -57,7 +57,7 @@ for i = 1, 3 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "tract", lore="temple-creation-note-"..i, - desc = [[A tract revealing the history of the Nagas.]], + desc = _t[[A tract revealing the history of the Nagas.]], rarity = false, encumberance = 0, } @@ -66,7 +66,7 @@ end newEntity{ base = "BASE_LORE", define_as = "SLASUL_NOTE", name = "note", lore="temple-creation-note-4", - desc = [[A note.]], + desc = _t[[A note.]], rarity = false, encumberance = 0, } @@ -74,9 +74,9 @@ newEntity{ base = "BASE_LORE", newEntity{ base = "BASE_TRIDENT", power_source = {nature=true, psionic=true}, define_as = "LEGACY_NALOREN", - unided_name = "ornate orichalcum trident", + unided_name = _t"ornate orichalcum trident", name = "Legacy of the Naloren", unique=true, image = "object/artifact/legacy_of_the_naloren.png", - desc = [[This incredibly beautiful -- and powerful -- trident is made of the rare metal orichalcum. An amazing pearl is seated in head of the trident, as it spreads into three razor sharp prongs. + desc = _t[[This incredibly beautiful -- and powerful -- trident is made of the rare metal orichalcum. An amazing pearl is seated in head of the trident, as it spreads into three razor sharp prongs. It is imbued with the greatest strengths of all of the most powerful Naga warriors. Slasul gave it to you as a sign of his faith in you. It is a sign of hope for all of the Naloren race, that one outside of their tribe could be so trusted.]], require = { stat = { str=35 }, }, diff --git a/game/modules/tome/data/zones/temple-of-creation/zone.lua b/game/modules/tome/data/zones/temple-of-creation/zone.lua index e84bae6513409e75dd1af51a8884143845ef156d..348b755f2a81044187f5c4679ab5d40b430aa607 100644 --- a/game/modules/tome/data/zones/temple-of-creation/zone.lua +++ b/game/modules/tome/data/zones/temple-of-creation/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Temple of Creation", + name = _t"Temple of Creation", level_range = {30, 40}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/temporal-reprieve-talent/zone.lua b/game/modules/tome/data/zones/temporal-reprieve-talent/zone.lua index abc19c9faee7d1b0ea1ae1980d11ca99a24996cb..499de448e601e49acae1818d3302a32ced7cad6e 100644 --- a/game/modules/tome/data/zones/temporal-reprieve-talent/zone.lua +++ b/game/modules/tome/data/zones/temporal-reprieve-talent/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Temporal Reprieve", + name = _t"Temporal Reprieve", level_range = {1, 100}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/temporal-rift/grids.lua b/game/modules/tome/data/zones/temporal-rift/grids.lua index 79f021338db651a44a84e01b8bc148a28439dee8..78cea28fe70613222fd14fe6dde713550b0cc9b8 100644 --- a/game/modules/tome/data/zones/temporal-rift/grids.lua +++ b/game/modules/tome/data/zones/temporal-rift/grids.lua @@ -36,13 +36,13 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[The rift leads... somewhere.]], + desc=_t[[The rift leads... somewhere.]], change_level = 1, change_level_check = function() if game.level.level > 1 then return end local p = game.party:findMember{main=true} local Chat = require "engine.Chat" - local chat = Chat.new("temporal-rift-start", {name="Temporal Warden"}, p) + local chat = Chat.new("temporal-rift-start", {name=_t"Temporal Warden"}, p) chat:invoke() return true end, diff --git a/game/modules/tome/data/zones/temporal-rift/npcs.lua b/game/modules/tome/data/zones/temporal-rift/npcs.lua index 166996cf1b878673a78f3d866f4ed0a982d6ccf2..fcab556ec5c6e53b0a82f1f4189c81d0f2946e53 100644 --- a/game/modules/tome/data/zones/temporal-rift/npcs.lua +++ b/game/modules/tome/data/zones/temporal-rift/npcs.lua @@ -26,7 +26,7 @@ newEntity{ define_as = "BEN_CRUTHDAR_ABOMINATION", type = "humanoid", subtype = "temporal", unique = true, name = "Ben Cruthdar, the Abomination", image = "npc/humanoid_human_ben_cruthdar__the_cursed.png", display = "p", color=colors.VIOLET, - desc = [[This crazed madman seems twisted and corrupted by temporal energy, his body shifting and phasing in and out of reality.]], + desc = _t[[This crazed madman seems twisted and corrupted by temporal energy, his body shifting and phasing in and out of reality.]], level_range = {15, nil}, exp_worth = 2, max_life = 270, life_rating = 17, fixed_rating = true, max_stamina = 85, @@ -75,7 +75,7 @@ newEntity{ define_as = "ABOMINATION_RANTHA", name = "Rantha the Abomination", display = "D", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/dragon_temporal_rantha_the_abomination.png", display_h=2, display_y=-1}}}, - desc = [[Claws and teeth. Ice and death. Dragons are not all extinct it seems... and this one seems to have been corrupted by the time rift.]], + desc = _t[[Claws and teeth. Ice and death. Dragons are not all extinct it seems... and this one seems to have been corrupted by the time rift.]], level_range = {15, nil}, exp_worth = 2, max_life = 220, life_rating = 15, fixed_rating = true, max_stamina = 85, @@ -138,7 +138,7 @@ newEntity{ base="BASE_NPC_HORROR_TEMPORAL", define_as = "CHRONOLITH_TWIN", name = "Chronolith Twin", color=colors.VIOLET, unique = true, subtype = "temporal", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_temporal_cronolith_twin.png", display_h=2, display_y=-1}}}, - desc = [[A six-armed creature, dressed in robes, with black insectile eyes.]], + desc = _t[[A six-armed creature, dressed in robes, with black insectile eyes.]], level_range = {20, nil}, exp_worth = 1, max_life = 150, life_rating = 15, fixed_rating = true, rank = 4, @@ -184,7 +184,7 @@ newEntity{ base="BASE_NPC_HORROR_TEMPORAL", define_as = "CHRONOLITH_CLONE", name = "Chronolith Clone", color=colors.VIOLET, unique = true, subtype = "temporal", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_temporal_cronolith_clone.png", display_h=2, display_y=-1}}}, - desc = [[A six-armed creature, dressed in robes, with black insectile eyes.]], + desc = _t[[A six-armed creature, dressed in robes, with black insectile eyes.]], level_range = {20, nil}, exp_worth = 1, max_life = 150, life_rating = 15, fixed_rating = true, rank = 4, diff --git a/game/modules/tome/data/zones/temporal-rift/zone.lua b/game/modules/tome/data/zones/temporal-rift/zone.lua index 4319aee758c698ae449ad7fec270bc63b5a858d7..c133253ea952f51735b74cf0c44a6d50fed459c0 100644 --- a/game/modules/tome/data/zones/temporal-rift/zone.lua +++ b/game/modules/tome/data/zones/temporal-rift/zone.lua @@ -18,13 +18,13 @@ -- darkgod@te4.org return { - name = "Temporal Rift", + name = _t"Temporal Rift", display_name = function(x, y) - if game.level.level == 2 then return "Temporal Rift: Lumberjack village" - elseif game.level.level == 3 then return "Temporal Rift: Daikara" - elseif game.level.level == 4 then return "Temporal Rift: Lake of Nur" + if game.level.level == 2 then return _t"Temporal Rift: Lumberjack village" + elseif game.level.level == 3 then return _t"Temporal Rift: Daikara" + elseif game.level.level == 4 then return _t"Temporal Rift: Lake of Nur" end - return "Temporal Rift" + return _t"Temporal Rift" end, variable_zone_name = true, level_range = {16, 30}, @@ -136,18 +136,18 @@ return { local Dialog = require("engine.ui.Dialog") if lev == 1 and not game.level.shown_warning then - Dialog:simplePopup("Temporal Rift", "Space and time distort and lose meaning as you pass through the rift. This place is alien.") + Dialog:simplePopup(_t"Temporal Rift", _t"Space and time distort and lose meaning as you pass through the rift. This place is alien.") game.level.shown_warning = true elseif lev == 2 and not game.level.shown_warning then - Dialog:simplePopup("Temporal Rift", "This looks like Maj'Eyal's forest but it looks strangely distorted, beware...") + Dialog:simplePopup(_t"Temporal Rift", _t"This looks like Maj'Eyal's forest but it looks strangely distorted, beware...") game.level.shown_warning = true require("mod.class.generator.actor.Random").new(game.zone, game.level.map, game.level, {}):generateGuardian("BEN_CRUTHDAR_ABOMINATION") elseif lev == 3 and not game.level.shown_warning then - Dialog:simplePopup("Temporal Rift", "As you pass the rift you see what seems to be the Daikara mountains, yet they are not.") + Dialog:simplePopup(_t"Temporal Rift", _t"As you pass the rift you see what seems to be the Daikara mountains, yet they are not.") game.level.shown_warning = true require("mod.class.generator.actor.Random").new(game.zone, game.level.map, game.level, {}):generateGuardian("ABOMINATION_RANTHA") elseif lev == 4 and not game.level.shown_warning then - Dialog:simplePopup("Temporal Rift", "The peace of this place has been disturbed.") + Dialog:simplePopup(_t"Temporal Rift", _t"The peace of this place has been disturbed.") game.level.shown_warning = true local m1 = game.zone:makeEntityByName(game.level, "actor", "CHRONOLITH_TWIN") diff --git a/game/modules/tome/data/zones/test/zone.lua b/game/modules/tome/data/zones/test/zone.lua index 69d4bdb4e91d61bc38a58e8be2965a9afb4d0d03..0d73fc647cdb91ef2b98e445ca5a55707ea68aa5 100644 --- a/game/modules/tome/data/zones/test/zone.lua +++ b/game/modules/tome/data/zones/test/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "TestZone!", + name = _t"TestZone!", level_range = {1, 50}, level_scheme = "player", max_level = 4, diff --git a/game/modules/tome/data/zones/thieves-tunnels/npcs.lua b/game/modules/tome/data/zones/thieves-tunnels/npcs.lua index 791d7d621271d42355206f66fe303372220f5df7..4b969e31823b2dbbfad994f515456f3505e34324 100644 --- a/game/modules/tome/data/zones/thieves-tunnels/npcs.lua +++ b/game/modules/tome/data/zones/thieves-tunnels/npcs.lua @@ -48,7 +48,7 @@ newEntity{ define_as = "ASSASSIN_LORD", resolvers.tmasteries{ ["cunning/stealth"]=1.3, }, - desc = [[He is the leader of a gang of bandits; watch out for his men.]], + desc = _t[[He is the leader of a gang of bandits; watch out for his men.]], level_range = {8, 50}, exp_worth = 1, combat_armor = 5, combat_def = 7, max_life = resolvers.rngavg(90,100), life_rating = 14, diff --git a/game/modules/tome/data/zones/thieves-tunnels/zone.lua b/game/modules/tome/data/zones/thieves-tunnels/zone.lua index 01c975a71c5091426912ea2a4f4a78572b007d5e..489c0675de182c2463ae04f1787333c32013f72d 100644 --- a/game/modules/tome/data/zones/thieves-tunnels/zone.lua +++ b/game/modules/tome/data/zones/thieves-tunnels/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Unknown tunnels", + name = _t"Unknown tunnels", level_range = {14, 28}, level_scheme = "player", max_level = 2, diff --git a/game/modules/tome/data/zones/town-angolwen/npcs.lua b/game/modules/tome/data/zones/town-angolwen/npcs.lua index b4ed02de7196990bbcf403b7038b48a6c1d77098..706c17c2cca1f52f1d77108f4e1d0dcb4aa0c35e 100644 --- a/game/modules/tome/data/zones/town-angolwen/npcs.lua +++ b/game/modules/tome/data/zones/town-angolwen/npcs.lua @@ -25,7 +25,7 @@ newEntity{ define_as = "SUPREME_ARCHMAGE_LINANIIL", faction = "angolwen", name = "Linaniil, Supreme Archmage of Angolwen", color=colors.VIOLET, unique = true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_linaniil_supreme_archmage.png", display_h=2, display_y=-1}}}, - desc = [[A tall, pale woman dressed in a revealing silk robe. Her gaze is so intense it seems to burn.]], + desc = _t[[A tall, pale woman dressed in a revealing silk robe. Her gaze is so intense it seems to burn.]], level_range = {50, nil}, exp_worth = 2, rank = 4, size_category = 3, @@ -39,7 +39,7 @@ newEntity{ define_as = "SUPREME_ARCHMAGE_LINANIIL", teleport_immune = 1, move_others=true, combat_spellpower = 30, - anger_emote = "Remove @himher@!", + anger_emote = _t"Remove @himher@!", hates_antimagic = 1, open_door = true, @@ -119,7 +119,7 @@ newEntity{ define_as = "TARELION", faction = "angolwen", name = "Archmage Tarelion", color=colors.CRIMSON, unique = true, resolvers.nice_tile{tall=true}, - desc = [[A tall Shalore in a flowing robe, he looks calm and at peace, but you can feel his tremendous power.]], + desc = _t[[A tall Shalore in a flowing robe, he looks calm and at peace, but you can feel his tremendous power.]], level_range = {30, nil}, exp_worth = 2, rank = 4, size_category = 3, @@ -132,7 +132,7 @@ newEntity{ define_as = "TARELION", teleport_immune = 1, move_others=true, combat_spellpower = 30, - anger_emote = "Remove @himher@!", + anger_emote = _t"Remove @himher@!", hates_antimagic = 1, open_door = true, @@ -176,7 +176,7 @@ newEntity{ type = "humanoid", subtype = "human", display = "p", color=colors.WHITE, faction = "angolwen", - anger_emote = "Catch @himher@!", + anger_emote = _t"Catch @himher@!", hates_antimagic = 1, exp_worth = 0, resolvers.racial(), @@ -201,7 +201,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ANGOLWEN_TOWN", name = "apprentice mage", color=colors.RED, - desc = [[An apprentice, learning the ways of the arcane arts.]], + desc = _t[[An apprentice, learning the ways of the arcane arts.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -216,7 +216,7 @@ newEntity{ base = "BASE_NPC_ANGOLWEN_TOWN", newEntity{ base = "BASE_NPC_ANGOLWEN_TOWN", name = "pyromancer", color=colors.LIGHT_RED, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_pyromancer.png", display_h=2, display_y=-1}}}, - desc = [[An archmage specializing in fire magic.]], + desc = _t[[An archmage specializing in fire magic.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -231,7 +231,7 @@ newEntity{ base = "BASE_NPC_ANGOLWEN_TOWN", newEntity{ base = "BASE_NPC_ANGOLWEN_TOWN", name = "cryomancer", color=colors.LIGHT_BLUE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_cryomancer.png", display_h=2, display_y=-1}}}, - desc = [[An archmage specializing in ice magic.]], + desc = _t[[An archmage specializing in ice magic.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -246,7 +246,7 @@ newEntity{ base = "BASE_NPC_ANGOLWEN_TOWN", newEntity{ base = "BASE_NPC_ANGOLWEN_TOWN", name = "geomancer", color=colors.UMBER, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_geomancer.png", display_h=2, display_y=-1}}}, - desc = [[An archmage specializing in earth magic.]], + desc = _t[[An archmage specializing in earth magic.]], level_range = {1, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -261,7 +261,7 @@ newEntity{ base = "BASE_NPC_ANGOLWEN_TOWN", newEntity{ base = "BASE_NPC_ANGOLWEN_TOWN", name = "tempest", color=colors.WHITE, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_tempest.png", display_h=2, display_y=-1}}}, - desc = [[An archmage specializing in lightning magic.]], + desc = _t[[An archmage specializing in lightning magic.]], level_range = {1, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(70,80), diff --git a/game/modules/tome/data/zones/town-angolwen/objects.lua b/game/modules/tome/data/zones/town-angolwen/objects.lua index 1012743a1911d27fe999ff0556a057e1a916b976..25a5d564de1bc60e4c294d66602d5fc310865c11 100644 --- a/game/modules/tome/data/zones/town-angolwen/objects.lua +++ b/game/modules/tome/data/zones/town-angolwen/objects.lua @@ -23,7 +23,7 @@ newEntity{ base = "BASE_LORE", define_as = "LINANIIL_LECTURE", subtype = "lecture on humility", unique=true, no_unique_lore=true, not_in_stores=false, name = "Lecture on Humility by Archmage Linaniil", lore="angolwen-linaniil-lecture", - desc = [[Lecture on Humility by Archmage Linaniil. A tale of the first ages and the Spellblaze.]], + desc = _t[[Lecture on Humility by Archmage Linaniil. A tale of the first ages and the Spellblaze.]], rarity = false, cost = 2, } @@ -32,7 +32,7 @@ newEntity{ base = "BASE_LORE", define_as = "TARELION_LECTURE_MAGIC", subtype = "magic teaching", unique=true, no_unique_lore=true, not_in_stores=false, name = "'What is Magic' by Archmage Tarelion", lore="angolwen-tarelion-magic", - desc = [[Lecture on the nature of magic by Archmage Tarelion.]], + desc = _t[[Lecture on the nature of magic by Archmage Tarelion.]], rarity = false, cost = 2, } diff --git a/game/modules/tome/data/zones/town-angolwen/zone.lua b/game/modules/tome/data/zones/town-angolwen/zone.lua index f9bd3e0e93f2c2a338e81f734bba234cb817847c..5573c68f7049c3ab0df6876c4dcfa32262850b55 100644 --- a/game/modules/tome/data/zones/town-angolwen/zone.lua +++ b/game/modules/tome/data/zones/town-angolwen/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Angolwen", + name = _t"Angolwen", level_range = {20, 50}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, diff --git a/game/modules/tome/data/zones/town-derth/npcs.lua b/game/modules/tome/data/zones/town-derth/npcs.lua index 7b1647c3d8021b12ba6539d5482e2a0da1b9a86d..eb94ae4fea5ea5cd2827015196ba2460e8b6f736 100644 --- a/game/modules/tome/data/zones/town-derth/npcs.lua +++ b/game/modules/tome/data/zones/town-derth/npcs.lua @@ -26,7 +26,7 @@ newEntity{ type = "humanoid", subtype = "human", display = "p", color=colors.WHITE, faction = "allied-kingdoms", - anger_emote = "Catch @himher@!", + anger_emote = _t"Catch @himher@!", exp_worth = 0, combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, @@ -55,7 +55,7 @@ newEntity{ newEntity{ base = "BASE_NPC_DERTH_TOWN", name = "derth guard", color=colors.LIGHT_UMBER, - desc = [[A stern-looking guard, he will not let you disturb the town.]], + desc = _t[[A stern-looking guard, he will not let you disturb the town.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -70,7 +70,7 @@ newEntity{ base = "BASE_NPC_DERTH_TOWN", newEntity{ base = "BASE_NPC_DERTH_TOWN", name = "halfling slinger", color=colors.UMBER, subtype = "halfling", - desc = [[A Halfling, with a sling. Beware.]], + desc = _t[[A Halfling, with a sling. Beware.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(50,60), @@ -82,7 +82,7 @@ newEntity{ base = "BASE_NPC_DERTH_TOWN", newEntity{ base = "BASE_NPC_DERTH_TOWN", name = "human farmer", color=colors.WHITE, - desc = [[A weather-worn Human farmer.]], + desc = _t[[A weather-worn Human farmer.]], level_range = {1, nil}, exp_worth = 0, rarity = 1, max_life = resolvers.rngavg(30,40), @@ -92,7 +92,7 @@ newEntity{ base = "BASE_NPC_DERTH_TOWN", newEntity{ base = "BASE_NPC_DERTH_TOWN", name = "halfling gardener", color=colors.WHITE, subtype = "halfling", - desc = [[A Halfling, he seems to be looking for plants.]], + desc = _t[[A Halfling, he seems to be looking for plants.]], level_range = {1, nil}, exp_worth = 0, rarity = 1, max_life = resolvers.rngavg(30,40), @@ -110,7 +110,7 @@ newEntity{ base = "BASE_NPC_DERTH_TOWN", seen_by = function(self, who) if not game.party:hasMember(who) then return end self.seen_by = nil - self:doEmote("Hey you. Come here.", 60) + self:doEmote(_t"Hey you. Come here.", 60) end, on_die = false, } diff --git a/game/modules/tome/data/zones/town-derth/zone.lua b/game/modules/tome/data/zones/town-derth/zone.lua index 49006300b948458fc2411820f9ab34d6c7efadfc..f415dfe09754a445d9ba1c746855615f0f1a258a 100644 --- a/game/modules/tome/data/zones/town-derth/zone.lua +++ b/game/modules/tome/data/zones/town-derth/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Derth", + name = _t"Derth", level_range = {1, 15}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, diff --git a/game/modules/tome/data/zones/town-elvala/npcs.lua b/game/modules/tome/data/zones/town-elvala/npcs.lua index 6638ded06de65c0ae2ba144a6fd0ff1551d785d6..3eec7a079a64c689589b56a4ad0b5ff64abf89ae 100644 --- a/game/modules/tome/data/zones/town-elvala/npcs.lua +++ b/game/modules/tome/data/zones/town-elvala/npcs.lua @@ -26,7 +26,7 @@ newEntity{ type = "humanoid", subtype = "shalore", display = "p", color=colors.WHITE, faction = "shalore", - anger_emote = "Catch @himher@!", + anger_emote = _t"Catch @himher@!", exp_worth = 0, combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, @@ -51,7 +51,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ELVALA_TOWN", name = "elvala guard", color=colors.LIGHT_UMBER, - desc = [[A stern-looking guard, he will not let you disturb the town.]], + desc = _t[[A stern-looking guard, he will not let you disturb the town.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -65,7 +65,7 @@ newEntity{ base = "BASE_NPC_ELVALA_TOWN", newEntity{ base = "BASE_NPC_ELVALA_TOWN", name = "shalore rune master", color=colors.RED, - desc = [[A tall Elf, his skin covered in runes.]], + desc = _t[[A tall Elf, his skin covered in runes.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(50,60), @@ -79,7 +79,7 @@ newEntity{ type = "giant", subtype = "ogre", display = "O", color=colors.WHITE, faction = "shalore", - anger_emote = "Catch @himher@!", + anger_emote = _t"Catch @himher@!", exp_worth = 0, combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, @@ -104,7 +104,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ELVALA_OGRE_TOWN", name = "ogre rune-spinner", color=colors.LIGHT_UMBER, - desc = [[A towering ogre guard, her skin covered in runes.]], + desc = _t[[A towering ogre guard, her skin covered in runes.]], female = 1, resolvers.nice_tile{tall=1}, level_range = {1, nil}, exp_worth = 0, diff --git a/game/modules/tome/data/zones/town-elvala/zone.lua b/game/modules/tome/data/zones/town-elvala/zone.lua index a50fab3c943f3415e35c466ea0f80e6a1aeaaada..fdd61ddf743a298d6423231b15294007480807e1 100644 --- a/game/modules/tome/data/zones/town-elvala/zone.lua +++ b/game/modules/tome/data/zones/town-elvala/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Elvala", + name = _t"Elvala", level_range = {1, 15}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, diff --git a/game/modules/tome/data/zones/town-gates-of-morning/grids.lua b/game/modules/tome/data/zones/town-gates-of-morning/grids.lua index e85ef8356f7632a59da65837fff4b042ad4c9feb..c02c009f1f5e440d4737f9da3e5f3e796926ec5c 100644 --- a/game/modules/tome/data/zones/town-gates-of-morning/grids.lua +++ b/game/modules/tome/data/zones/town-gates-of-morning/grids.lua @@ -39,7 +39,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. + desc = _t[[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. This one seems to go near the town of Last Hope in Maj'Eyal.]], orb_portal = { @@ -48,7 +48,7 @@ This one seems to go near the town of Last Hope in Maj'Eyal.]], change_wilderness = { spot = {type="farportal-end", subtype="last-hope"}, }, - message = "#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on the outskirts of Last Hope, with no trace of the portal...", + message = _t"#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on the outskirts of Last Hope, with no trace of the portal...", on_use = function(self, who) end, }, diff --git a/game/modules/tome/data/zones/town-gates-of-morning/npcs.lua b/game/modules/tome/data/zones/town-gates-of-morning/npcs.lua index ea0057ede98797e4fc3bebfdac3fe11e16769640..f431167e28bbfb6853d57adac09e734a7729e812 100644 --- a/game/modules/tome/data/zones/town-gates-of-morning/npcs.lua +++ b/game/modules/tome/data/zones/town-gates-of-morning/npcs.lua @@ -28,7 +28,7 @@ newEntity{ define_as = "HIGH_SUN_PALADIN_AERYN", faction = "sunwall", name = "High Sun Paladin Aeryn", color=colors.VIOLET, unique = true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_high_sun_paladin_aeryn.png", display_h=2, display_y=-1}}}, - desc = [[A beautiful woman, clad in shining plate armour. Power radiates from her.]], + desc = _t[[A beautiful woman, clad in shining plate armour. Power radiates from her.]], level_range = {50, nil}, exp_worth = 2, rank = 4, size_category = 3, diff --git a/game/modules/tome/data/zones/town-gates-of-morning/zone.lua b/game/modules/tome/data/zones/town-gates-of-morning/zone.lua index 90ee8a7c82fdebeb3fe4451bd1a1e33891819b87..dcb10973e47fc9cebf35e7aa0436674a85a599ce 100644 --- a/game/modules/tome/data/zones/town-gates-of-morning/zone.lua +++ b/game/modules/tome/data/zones/town-gates-of-morning/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Gates of Morning", + name = _t"Gates of Morning", level_range = {33, 50}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, diff --git a/game/modules/tome/data/zones/town-irkkk/npcs.lua b/game/modules/tome/data/zones/town-irkkk/npcs.lua index d8b4d694ea6f9d3dec723a213297c0fecbb5147e..a78b27d6c83e48eb80fefe494356f45aa3f8ae76 100644 --- a/game/modules/tome/data/zones/town-irkkk/npcs.lua +++ b/game/modules/tome/data/zones/town-irkkk/npcs.lua @@ -26,7 +26,7 @@ newEntity{ type = "humanoid", subtype = "yeek", display = "p", color=colors.WHITE, faction = "the-way", - anger_emote = "Catch @himher@!", + anger_emote = _t"Catch @himher@!", exp_worth = 0, combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, @@ -52,7 +52,7 @@ newEntity{ newEntity{ base = "BASE_NPC_IRKKK_TOWN", name = "yeek mindslayer", color=colors.LIGHT_UMBER, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_yeek_yeek_mindslayer.png", display_h=2, display_y=-1}}}, - desc = [[A mindslayer in training.]], + desc = _t[[A mindslayer in training.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -70,7 +70,7 @@ newEntity{ base = "BASE_NPC_IRKKK_TOWN", newEntity{ base = "BASE_NPC_IRKKK_TOWN", name = "yeek psionic", color=colors.YELLOW, - desc = [[You can literaly feel the mental energies emitted by this yeek.]], + desc = _t[[You can literaly feel the mental energies emitted by this yeek.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(50,60), @@ -89,7 +89,7 @@ newEntity{ base = "BASE_NPC_IRKKK_TOWN", -------------------------------- Stores newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_GEM", name = "gem crafter", color=colors.BLUE, image = "npc/humanoid_yeek_yeek_psionic.png", - desc = [[This yeek has all sorts of gems to sell.]], + desc = _t[[This yeek has all sorts of gems to sell.]], level_range = {1, nil}, exp_worth = 0, max_life = resolvers.rngavg(50,60), ai_state = { talent_in=1, }, @@ -107,7 +107,7 @@ newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_GEM", newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_2HANDS", name = "two hander weapons crafter", color=colors.UMBER, image = "npc/humanoid_yeek_yeek_commoner_06.png", - desc = [[This yeek has all sorts of two handed weapons to sell.]], + desc = _t[[This yeek has all sorts of two handed weapons to sell.]], level_range = {1, nil}, exp_worth = 0, max_life = resolvers.rngavg(50,60), ai_state = { talent_in=1, }, @@ -125,7 +125,7 @@ newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_2HANDS", newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_1HAND", name = "one hander weapons crafter", color=colors.UMBER, image = "npc/humanoid_yeek_yeek_commoner_08.png", - desc = [[This yeek has all sorts of one handed weapons to sell.]], + desc = _t[[This yeek has all sorts of one handed weapons to sell.]], level_range = {1, nil}, exp_worth = 0, max_life = resolvers.rngavg(50,60), ai_state = { talent_in=1, }, @@ -143,7 +143,7 @@ newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_1HAND", newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_CLOTH", name = "tailor", color=colors.BLUE, image = "npc/humanoid_yeek_yeek_commoner_04.png", - desc = [[This yeek has all sorts of cloth to sell.]], + desc = _t[[This yeek has all sorts of cloth to sell.]], level_range = {1, nil}, exp_worth = 0, max_life = resolvers.rngavg(50,60), ai_state = { talent_in=1, }, @@ -161,7 +161,7 @@ newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_CLOTH", newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_LEATHER", name = "tanner", color=colors.BLUE, image = "npc/humanoid_yeek_yeek_commoner_07.png", - desc = [[This yeek has all sorts of leathers to sell.]], + desc = _t[[This yeek has all sorts of leathers to sell.]], level_range = {1, nil}, exp_worth = 0, max_life = resolvers.rngavg(50,60), ai_state = { talent_in=1, }, @@ -179,7 +179,7 @@ newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_LEATHER", newEntity{ base = "BASE_NPC_IRKKK_TOWN", define_as = "YEEK_STORE_NATURE", name = "natural infusions", color=colors.BLUE, image = "npc/humanoid_yeek_yeek_summoner.png", - desc = [[This yeek has all sorts of infusions to sell.]], + desc = _t[[This yeek has all sorts of infusions to sell.]], level_range = {1, nil}, exp_worth = 0, max_life = resolvers.rngavg(50,60), ai_state = { talent_in=1, }, diff --git a/game/modules/tome/data/zones/town-irkkk/zone.lua b/game/modules/tome/data/zones/town-irkkk/zone.lua index 3f46a10d0b6b218dc98bad2c059a204f314d5ea6..7a8d8936ed0eec28243d6c3c706ee3ea52a8b166 100644 --- a/game/modules/tome/data/zones/town-irkkk/zone.lua +++ b/game/modules/tome/data/zones/town-irkkk/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Irkkk", + name = _t"Irkkk", level_range = {1, 15}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, diff --git a/game/modules/tome/data/zones/town-iron-council/npcs.lua b/game/modules/tome/data/zones/town-iron-council/npcs.lua index 2c0f718c0e26966b509c99fb6bcccd8c0a174065..399074518691679f409e65a0f34089a5b0ea3db2 100644 --- a/game/modules/tome/data/zones/town-iron-council/npcs.lua +++ b/game/modules/tome/data/zones/town-iron-council/npcs.lua @@ -26,7 +26,7 @@ newEntity{ type = "humanoid", subtype = "dwarf", display = "p", color=colors.WHITE, faction = "iron-throne", - anger_emote = "Catch @himher@!", + anger_emote = _t"Catch @himher@!", exp_worth = 0, combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, @@ -52,7 +52,7 @@ newEntity{ newEntity{ base = "BASE_NPC_IRON_COUNCIL_TOWN", name = "dwarven guard", color=colors.LIGHT_UMBER, - desc = [[A stocky dwarf, he looks angry.]], + desc = _t[[A stocky dwarf, he looks angry.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -65,7 +65,7 @@ newEntity{ base = "BASE_NPC_IRON_COUNCIL_TOWN", newEntity{ base = "BASE_NPC_IRON_COUNCIL_TOWN", name = "dwarven earthwarden", color=colors.RED, - desc = [[A stocky dwarf, he looks angry.]], + desc = _t[[A stocky dwarf, he looks angry.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(50,60), diff --git a/game/modules/tome/data/zones/town-iron-council/zone.lua b/game/modules/tome/data/zones/town-iron-council/zone.lua index c0df1644dc060df4a759ee24dd83a7e24cb233c9..8ce226785e2a1191bf989fb883e013940f4911b4 100644 --- a/game/modules/tome/data/zones/town-iron-council/zone.lua +++ b/game/modules/tome/data/zones/town-iron-council/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Iron Council", + name = _t"Iron Council", level_range = {1, 15}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, diff --git a/game/modules/tome/data/zones/town-last-hope/grids.lua b/game/modules/tome/data/zones/town-last-hope/grids.lua index c3d30ab3846311e4ad286866ae1f198dbfe7dc99..1cda26f40603c6477fa40c3e0b54b15613c53fc9 100644 --- a/game/modules/tome/data/zones/town-last-hope/grids.lua +++ b/game/modules/tome/data/zones/town-last-hope/grids.lua @@ -37,7 +37,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. + desc = _t[[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. This one seems to go near the Gates of Morning in the Far East.]], orb_portal = { @@ -46,7 +46,7 @@ This one seems to go near the Gates of Morning in the Far East.]], change_wilderness = { spot = {type="farportal-end", subtype="gates-of-morning"}, }, - message = "#VIOLET#You enter the swirling portal and in the blink of an eye you set foot in sight of the Gates of Morning, with no trace of the portal...", + message = _t"#VIOLET#You enter the swirling portal and in the blink of an eye you set foot in sight of the Gates of Morning, with no trace of the portal...", on_use = function(self, who) end, }, diff --git a/game/modules/tome/data/zones/town-last-hope/npcs.lua b/game/modules/tome/data/zones/town-last-hope/npcs.lua index 476bbddbd32f08728a83567874a54e057f6c26ca..bb57e07703291d17d688880b963ef33aa5da2408 100644 --- a/game/modules/tome/data/zones/town-last-hope/npcs.lua +++ b/game/modules/tome/data/zones/town-last-hope/npcs.lua @@ -26,7 +26,7 @@ newEntity{ type = "humanoid", subtype = "human", display = "p", color=colors.WHITE, faction = "allied-kingdoms", - anger_emote = "Catch @himher@!", + anger_emote = _t"Catch @himher@!", exp_worth = 0, combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, @@ -51,7 +51,7 @@ newEntity{ newEntity{ base = "BASE_NPC_LAST_HOPE_TOWN", name = "last hope guard", color=colors.LIGHT_UMBER, - desc = [[A stern-looking guard, he will not let you disturb the town.]], + desc = _t[[A stern-looking guard, he will not let you disturb the town.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -66,7 +66,7 @@ newEntity{ base = "BASE_NPC_LAST_HOPE_TOWN", newEntity{ base = "BASE_NPC_LAST_HOPE_TOWN", name = "halfling guard", color=colors.UMBER, subtype = "halfling", - desc = [[A Halfling, with a sling. Beware.]], + desc = _t[[A Halfling, with a sling. Beware.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(50,60), @@ -80,7 +80,7 @@ newEntity{ base = "BASE_NPC_LAST_HOPE_TOWN", newEntity{ base = "BASE_NPC_LAST_HOPE_TOWN", name = "human citizen", color=colors.WHITE, - desc = [[A clean-looking Human resident of Last Hope.]], + desc = _t[[A clean-looking Human resident of Last Hope.]], level_range = {1, nil}, exp_worth = 0, rarity = 1, max_life = resolvers.rngavg(30,40), @@ -90,7 +90,7 @@ newEntity{ base = "BASE_NPC_LAST_HOPE_TOWN", newEntity{ base = "BASE_NPC_LAST_HOPE_TOWN", name = "halfling citizen", color=colors.WHITE, subtype = "halfling", - desc = [[A clean-looking Halfling resident of Last Hope.]], + desc = _t[[A clean-looking Halfling resident of Last Hope.]], level_range = {1, nil}, exp_worth = 0, rarity = 1, max_life = resolvers.rngavg(30,40), diff --git a/game/modules/tome/data/zones/town-last-hope/objects.lua b/game/modules/tome/data/zones/town-last-hope/objects.lua index e5ed37b5a0145b051d21f46fd00a61a3d51352da..d7cbef93d59c0da059579efda9d982ae90996782 100644 --- a/game/modules/tome/data/zones/town-last-hope/objects.lua +++ b/game/modules/tome/data/zones/town-last-hope/objects.lua @@ -23,8 +23,8 @@ for i = 1, 6 do newEntity{ base = "BASE_LORE", define_as = "FOUNDATION_NOTE"..i, subtype = "last hope foundation", unique=true, no_unique_lore=true, not_in_stores=false, - name = "The Diaries of King Toknor the Brave ("..i..")", lore="last-hope-foundation-note-"..i, - desc = [[A part of the history of Last Hope, and King Toknor the Brave.]], + name = ("The Diaries of King Toknor the Brave (%d)"):tformat(i), lore="last-hope-foundation-note-"..i, + desc = _t[[A part of the history of Last Hope, and King Toknor the Brave.]], rarity = false, encumberance = 0, cost = 2, @@ -47,8 +47,8 @@ for i = 1, 2 do newEntity{ base = "BASE_LORE", define_as = "SOUTHSPAR_NOTE"..i, subtype = "southspar", unique=true, no_unique_lore=true, not_in_stores=false, - name = "the Pale King part "..(i==1 and "one" or "two"), lore="southspar-note-"..i, - desc = [[A study of Southspar's most unusual ruler.]], + name = ("the Pale King part %s"):tformat(i==1 and _t"one" or _t"two"), lore="southspar-note-"..i, + desc = _t[[A study of Southspar's most unusual ruler.]], rarity = false, encumberance = 0, cost = 2, @@ -59,7 +59,7 @@ newEntity{ base = "BASE_LORE", define_as = "OCEANS_OF_EYAL", subtype = "oceans", unique=true, no_unique_lore=true, not_in_stores=false, name = "The Oceans of Eyal", lore="oceans-of-yeal", - desc = [[Thoughts about the impossibility of sea travel.]], + desc = _t[[Thoughts about the impossibility of sea travel.]], rarity = false, encumberance = 0, cost = 10, diff --git a/game/modules/tome/data/zones/town-last-hope/zone.lua b/game/modules/tome/data/zones/town-last-hope/zone.lua index 0011d2ec9a36ca5715d501ca4804bf98c8385697..eac922b83909643a5c17d194633fc187fa315e57 100644 --- a/game/modules/tome/data/zones/town-last-hope/zone.lua +++ b/game/modules/tome/data/zones/town-last-hope/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Last Hope", + name = _t"Last Hope", level_range = {15, 35}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, diff --git a/game/modules/tome/data/zones/town-lumberjack-village/npcs.lua b/game/modules/tome/data/zones/town-lumberjack-village/npcs.lua index ff15720a6966ca9d434422206576a81e12565fcf..0aedf003843ce31e5e4c04e9a135484e226b63fc 100644 --- a/game/modules/tome/data/zones/town-lumberjack-village/npcs.lua +++ b/game/modules/tome/data/zones/town-lumberjack-village/npcs.lua @@ -24,7 +24,7 @@ newEntity{ define_as = "BEN_CRUTHDAR", type = "humanoid", subtype = "human", unique = true, name = "Ben Cruthdar, the Cursed", display = "p", color=colors.VIOLET, - desc = [[This madman looks extremely dangerous. He wields a big axe and means to use it. + desc = _t[[This madman looks extremely dangerous. He wields a big axe and means to use it. A gloomy aura emanates from him.]], level_range = {10, nil}, exp_worth = 2, max_life = 250, life_rating = 20, fixed_rating = true, @@ -71,7 +71,7 @@ newEntity{ defined_as = "LUMBERJACK", type = "humanoid", subtype = "human", name = "lumberjack", display = "p", color=colors.UMBER, faction = "allied-kingdoms", - desc = [[A lumberjack. Cutting wood is his job, dream and passion.]], + desc = _t[[A lumberjack. Cutting wood is his job, dream and passion.]], level_range = {1, 1}, exp_worth = 1, rarity = 1, max_life = 100, life_rating = 10, diff --git a/game/modules/tome/data/zones/town-lumberjack-village/zone.lua b/game/modules/tome/data/zones/town-lumberjack-village/zone.lua index 8b4ab0753897c4be1bfae65b1a97e1bc2e2b0753..c8e741f62e77ea68b7fb806a88e96903a55a0869 100644 --- a/game/modules/tome/data/zones/town-lumberjack-village/zone.lua +++ b/game/modules/tome/data/zones/town-lumberjack-village/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Small lumberjack village", + name = _t"Small lumberjack village", level_range = {8, 14}, max_level = 1, width = 25, height = 25, @@ -49,7 +49,7 @@ return { }, on_enter = function(lev, old_lev, zone) if not game.level.heard_screams then - require("engine.ui.Dialog"):simplePopup("Screams", "You hear screaming not too far from you.") + require("engine.ui.Dialog"):simplePopup(_t"Screams", _t"You hear screaming not too far from you.") game.level.heard_screams = true end end, diff --git a/game/modules/tome/data/zones/town-point-zero/grids.lua b/game/modules/tome/data/zones/town-point-zero/grids.lua index 9c47dae21c058006790174c1484d57ec0e5dc6b2..75eb62fc37f78a2bb00a6233ed0226fafa92d504 100644 --- a/game/modules/tome/data/zones/town-point-zero/grids.lua +++ b/game/modules/tome/data/zones/town-point-zero/grids.lua @@ -30,7 +30,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[The rift leads to Maj'Eyal.]], + desc=_t[[The rift leads to Maj'Eyal.]], change_level = 1, change_zone = "wilderness", } diff --git a/game/modules/tome/data/zones/town-point-zero/npcs.lua b/game/modules/tome/data/zones/town-point-zero/npcs.lua index 896c77b877d1eb76411c5091e3e88c019e03809b..0c2612687c40bcd532b975a6c066ec2a64d5141f 100644 --- a/game/modules/tome/data/zones/town-point-zero/npcs.lua +++ b/game/modules/tome/data/zones/town-point-zero/npcs.lua @@ -26,7 +26,7 @@ newEntity{ type = "humanoid", subtype = "human", display = "p", color=colors.WHITE, faction = "point-zero-guardians", - anger_emote = "Catch @himher@!", + anger_emote = _t"Catch @himher@!", hates_antimagic = 1, never_anger = 1, @@ -54,7 +54,7 @@ newEntity{ base = "BASE_NPC_POINT_ZERO_TOWN", define_as = "DEFENDER_OF_REALITY", female = resolvers.rngtable{false, true}, subtype = resolvers.rngtable{"human", "shalore"}, shader = "moving_transparency", shader_args = {a_min=0.2, a_max=0.8}, - desc = [[A stern-looking guardian, ever vigilant against the threats of the paradox.]], + desc = _t[[A stern-looking guardian, ever vigilant against the threats of the paradox.]], level_range = {1, nil}, exp_worth = 0, rarity = false, max_life = 400, @@ -79,7 +79,7 @@ newEntity{ type = "elemental", subtype = "void", blood_color = colors.DARK_GREY, display = "E", color=colors.DARK_GREY, - desc = [[Losgoroth are mighty void elementals, native to the void between the stars; they are rarely seen on the planet's surface.]], + desc = _t[[Losgoroth are mighty void elementals, native to the void between the stars; they are rarely seen on the planet's surface.]], combat = { dam=resolvers.levelup(resolvers.mbonus(40, 15), 1, 1.2), atk=15, apr=15, dammod={mag=0.8}, damtype=DamageType.ARCANE }, @@ -131,7 +131,7 @@ newEntity{ base = "BASE_NPC_POINT_ZERO_TOWN", define_as = "ZEMEKKYS", name = "Zemekkys, Grand Keeper of Reality", color=colors.VIOLET, unique = true, image = "npc/humanoid_elf_high_chronomancer_zemekkys.png", subtype = "shalore", - desc = [[A timeless elf stands before you. Even though his age is impossible to determine, you feel he has seen many things.]], + desc = _t[[A timeless elf stands before you. Even though his age is impossible to determine, you feel he has seen many things.]], level_range = {50, nil}, exp_worth = 1, rarity = false, max_life = 2000, life_rating = 20, @@ -204,7 +204,7 @@ newEntity{ define_as = "TEMPORAL_DEFILER", name = "Temporal Defiler", display = "h", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_temporal_temporal_defiler.png", display_h=2, display_y=-1}}}, - desc = [[A huge, slender, metallic monstrosity with long claws in place of fingers, and razor-sharp teeth. It seems to seek something here.]], + desc = _t[[A huge, slender, metallic monstrosity with long claws in place of fingers, and razor-sharp teeth. It seems to seek something here.]], level_range = {50, nil}, exp_worth = 0.1, max_life = 1500, life_rating = 35, fixed_rating = true, stats = { str=20, dex=10, cun=8, mag=10, con=20 }, diff --git a/game/modules/tome/data/zones/town-point-zero/objects.lua b/game/modules/tome/data/zones/town-point-zero/objects.lua index fac7e250a3cf782c5138e0183d092e528e2c3ad7..60dd6506399e15c5711d7dca8368150d5d652998 100644 --- a/game/modules/tome/data/zones/town-point-zero/objects.lua +++ b/game/modules/tome/data/zones/town-point-zero/objects.lua @@ -25,10 +25,10 @@ local Talents = require "engine.interface.ActorTalents" newEntity{ base = "BASE_TOOL_MISC", power_source = {arcane=true}, define_as = "TIME_SHARD", - desc = [[An iridescent shard of violet crystal. Its light ebbs and flows, sometimes fast and sometimes slow, keeping pace with the chaotic streams of time itself. It makes you feel both old and young, a newborn child and an ancient being, your flesh simply one instance in a thousand refractions of a single timeless and eternal soul.]], + desc = _t[[An iridescent shard of violet crystal. Its light ebbs and flows, sometimes fast and sometimes slow, keeping pace with the chaotic streams of time itself. It makes you feel both old and young, a newborn child and an ancient being, your flesh simply one instance in a thousand refractions of a single timeless and eternal soul.]], unique = true, name = "Shard of Crystalized Time", color = colors.YELLOW, - unided_name = "glowing shard", image = "object/artifact/time_shard.png", + unided_name = _t"glowing shard", image = "object/artifact/time_shard.png", level_range = {5, 12}, rarity = false, cost = 10, diff --git a/game/modules/tome/data/zones/town-point-zero/zone.lua b/game/modules/tome/data/zones/town-point-zero/zone.lua index 796f8d61444085efe480ef1a9d345d8845e9afc8..3f225e69bd367a490f7ab4b0ca09d26142077c74 100644 --- a/game/modules/tome/data/zones/town-point-zero/zone.lua +++ b/game/modules/tome/data/zones/town-point-zero/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Point Zero", + name = _t"Point Zero", level_range = {1, 15}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, @@ -97,7 +97,7 @@ return { }) local g = game.level.map(z.x1, z.y1, engine.Map.TERRAIN):cloneFull() - g.name = "temporal beam endpoint" + g.name = _t"temporal beam endpoint" g:removeAllMOs() g:altered() g.exit = {x=z.x2, y=z.y2} @@ -116,7 +116,7 @@ return { game.zone:addEntity(game.level, g, "terrain", z.x1, z.y1) local g = game.level.map(z.x2, z.y2, engine.Map.TERRAIN):cloneFull() - g.name = "temporal beam endpoint" + g.name = _t"temporal beam endpoint" g:removeAllMOs() g:altered() g.exit = {x=z.x1, y=z.y1} diff --git a/game/modules/tome/data/zones/town-shatur/npcs.lua b/game/modules/tome/data/zones/town-shatur/npcs.lua index 60dc37580572c5f5d5bb2a19f88253240cba9911..dcc8ecbe443ac706269fded7c74152677d61c177 100644 --- a/game/modules/tome/data/zones/town-shatur/npcs.lua +++ b/game/modules/tome/data/zones/town-shatur/npcs.lua @@ -24,7 +24,7 @@ newEntity{ type = "humanoid", subtype = "thalore", display = "p", color=colors.WHITE, faction = "thalore", - anger_emote = "Catch @himher@!", + anger_emote = _t"Catch @himher@!", exp_worth = 0, combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, @@ -49,7 +49,7 @@ newEntity{ newEntity{ base = "BASE_NPC_ELVALA_TOWN", name = "thalore hunter", color=colors.LIGHT_UMBER, - desc = [[A stern-looking guard, he will not let you disturb the town.]], + desc = _t[[A stern-looking guard, he will not let you disturb the town.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(70,80), @@ -71,7 +71,7 @@ newEntity{ base = "BASE_NPC_ELVALA_TOWN", newEntity{ base = "BASE_NPC_ELVALA_TOWN", name = "thalore wilder", color=colors.GREEN, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_thalore_thalore_wilder.png", display_h=2, display_y=-1}}}, - desc = [[A tall elf, his skin covered in green moss.]], + desc = _t[[A tall elf, his skin covered in green moss.]], level_range = {1, nil}, exp_worth = 0, rarity = 3, max_life = resolvers.rngavg(50,60), diff --git a/game/modules/tome/data/zones/town-shatur/zone.lua b/game/modules/tome/data/zones/town-shatur/zone.lua index 47d5c72af5e26e64bc2721640c47f565471e50b8..e76d31899a0ad34e8e6fe8487e0d4ce385b82b8b 100644 --- a/game/modules/tome/data/zones/town-shatur/zone.lua +++ b/game/modules/tome/data/zones/town-shatur/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Shatur", + name = _t"Shatur", level_range = {1, 15}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, diff --git a/game/modules/tome/data/zones/town-zigur/grids.lua b/game/modules/tome/data/zones/town-zigur/grids.lua index fd4b4c62b4709aa410275d6eee1518854e25fd73..349af7d99be73fd7402ce7ec3c61ded885bc1a0d 100644 --- a/game/modules/tome/data/zones/town-zigur/grids.lua +++ b/game/modules/tome/data/zones/town-zigur/grids.lua @@ -25,7 +25,7 @@ load("/data/general/grids/forest.lua") newEntity{ define_as = "POST", name = "Zigur Postsign", lore="zigur-post", - desc = [[The laws of the Ziguranth]], + desc=_t[[The laws of the Ziguranth]], image = "terrain/grass.png", display = '_', color=colors.UMBER, back_color=colors.DARK_GREEN, add_displays = {class.new{image="terrain/signpost.png"}}, diff --git a/game/modules/tome/data/zones/town-zigur/npcs.lua b/game/modules/tome/data/zones/town-zigur/npcs.lua index 6e8498c58293f632a8ab5dbe7107a61027d10821..f0cfa37cdcb80ad9a842105447b2c628adfa7189 100644 --- a/game/modules/tome/data/zones/town-zigur/npcs.lua +++ b/game/modules/tome/data/zones/town-zigur/npcs.lua @@ -27,7 +27,7 @@ local Talents = require("engine.interface.ActorTalents") load("/data/general/npcs/elven-caster.lua", function(e) if e.rarity then e.rarity, e.corruptor_rarity = nil, e.rarity end end) newEntity{ base = "BASE_NPC_ELVEN_CASTER", define_as = "GRAND_CORRUPTOR", name = "Grand Corruptor", color=colors.VIOLET, unique = "Grand Corruptor Zigur", - desc = [[An Elven corruptor, drawn to these blighted lands.]], + desc = _t[[An Elven corruptor, drawn to these blighted lands.]], level_range = {30, nil}, exp_worth = 1, rank = 3.5, max_vim = 800, @@ -73,7 +73,7 @@ newEntity{ base = "BASE_NPC_ELVEN_CASTER", define_as = "GRAND_CORRUPTOR", load("/data/general/npcs/ziguranth.lua", function(e) if e.rarity then e.rarity, e.ziguranth_rarity = nil, e.rarity end end) newEntity{ base = "BASE_NPC_ZIGURANTH", define_as = "PROTECTOR_MYSSIL", name = "Protector Myssil", color=colors.VIOLET, unique = true, - desc = [[A Halfling Ziguranth, clad in dark steel plates. She is the current leader of Zigur.]], + desc = _t[[A Halfling Ziguranth, clad in dark steel plates. She is the current leader of Zigur.]], female = true, subtype = "halfling", level_range = {30, nil}, exp_worth = 1, rank = 4, diff --git a/game/modules/tome/data/zones/town-zigur/objects.lua b/game/modules/tome/data/zones/town-zigur/objects.lua index ce0e2937d881f64a89be5eb7bed743d26079f784..cea220919110c76c0fdea4524cb08b602f694653 100644 --- a/game/modules/tome/data/zones/town-zigur/objects.lua +++ b/game/modules/tome/data/zones/town-zigur/objects.lua @@ -23,7 +23,7 @@ newEntity{ base = "BASE_LORE", define_as = "ZIGUR_HISTORY", subtype = "the great evil", unique=true, no_unique_lore=true, not_in_stores=false, name = "The Great Evil", lore="zigur-history", - desc = [[History of the horrors of magic.]], + desc = _t[[History of the horrors of magic.]], rarity = false, encumberance = 0, cost = 2, diff --git a/game/modules/tome/data/zones/town-zigur/zone.lua b/game/modules/tome/data/zones/town-zigur/zone.lua index ace137d0cae2b1d2810ad76ac5a3d6a64bee6581..aa9259ea7fa65b47c79502dda96a23021fe2a16b 100644 --- a/game/modules/tome/data/zones/town-zigur/zone.lua +++ b/game/modules/tome/data/zones/town-zigur/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Zigur", + name = _t"Zigur", level_range = {15, 50}, level_scheme = "player", actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, diff --git a/game/modules/tome/data/zones/trollmire/npcs.lua b/game/modules/tome/data/zones/trollmire/npcs.lua index e2a930c306bbdf718c364f73d749d207e3c141f6..ba3c5406003cc00e67de362fb02567926245a928 100644 --- a/game/modules/tome/data/zones/trollmire/npcs.lua +++ b/game/modules/tome/data/zones/trollmire/npcs.lua @@ -49,8 +49,8 @@ newEntity{ define_as = "TROLL_PROX", name = "Prox the Mighty", display = "T", color=colors.VIOLET, image="npc/giant_troll_prox_the_mighty.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_troll_prox_the_mighty.png", display_h=2, display_y=-1}}}, - desc = [[A huge troll, he might move slowly but he does look dangerous nonetheless.]], - killer_message = "and eaten raw", + desc = _t[[A huge troll, he might move slowly but he does look dangerous nonetheless.]], + killer_message = _t"and eaten raw", level_range = {7, nil}, exp_worth = 2, max_life = 150, life_rating = 15, fixed_rating = true, max_stamina = 85, @@ -104,7 +104,7 @@ newEntity{ define_as = "TROLL_PROX", game.zone:addEntity(game.level, n, "object", self.x, self.y) end end - game.state:activateBackupGuardian("ALUIN", 2, 35, "... and we thought the trollmire was safer now!") + game.state:activateBackupGuardian("ALUIN", 2, 35, _t"... and we thought the trollmire was safer now!") game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "trollmire") end, } @@ -115,8 +115,8 @@ newEntity{ define_as = "TROLL_SHAX", name = "Shax the Slimy", display = "T", color=colors.VIOLET, image="npc/giant_troll_prox_the_mighty.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_troll_shax_the_slimy.png", display_h=2, display_y=-1}}}, - desc = [[A huge troll, he seems to be adapted to aquatic life.]], - killer_message = "and eaten raw", + desc = _t[[A huge troll, he seems to be adapted to aquatic life.]], + killer_message = _t"and eaten raw", level_range = {7, nil}, exp_worth = 2, max_life = 150, life_rating = 15, fixed_rating = true, max_stamina = 85, @@ -170,7 +170,7 @@ newEntity{ define_as = "TROLL_SHAX", game.zone:addEntity(game.level, n, "object", self.x, self.y) end end - game.state:activateBackupGuardian("ALUIN", 2, 35, "... and we thought the trollmire was safer now!") + game.state:activateBackupGuardian("ALUIN", 2, 35, _t"... and we thought the trollmire was safer now!") game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "trollmire") game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "trollmire-flooded") end, @@ -182,10 +182,10 @@ newEntity{ define_as = "TROLL_BILL", name = "Bill the Stone Troll", display = "T", color=colors.VIOLET, image="npc/troll_bill.png", resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/troll_bill.png", display_h=2, display_y=-1}}}, - desc = [[Big, brawny, powerful and with a taste for Halfling. + desc = _t[[Big, brawny, powerful and with a taste for Halfling. He is wielding a small tree trunk and lumbering toward you. This is the troll the notes spoke about, no doubt.]], - killer_message = "and clobbered into soup", + killer_message = _t"and clobbered into soup", level_range = {7, nil}, exp_worth = 2, max_life = 250, life_rating = 18, fixed_rating = true, max_stamina = 85, @@ -225,7 +225,7 @@ newEntity{ define_as = "ALUIN", type = "humanoid", subtype = "human", unique = true, name = "Aluin the Fallen", display = "p", color=colors.VIOLET, - desc = [[His once-shining armour now dull and bloodstained, this Sun Paladin has given in to despair.]], + desc = _t[[His once-shining armour now dull and bloodstained, this Sun Paladin has given in to despair.]], level_range = {35, nil}, exp_worth = 3, max_life = 350, life_rating = 23, fixed_rating = true, hate_regen = 100, diff --git a/game/modules/tome/data/zones/trollmire/objects.lua b/game/modules/tome/data/zones/trollmire/objects.lua index 4313857cafe8a6c9cdb591b9d74a9d9e23df5332..a7b1e5d18cd02eea9f931cceeff78cae5a611d8e 100644 --- a/game/modules/tome/data/zones/trollmire/objects.lua +++ b/game/modules/tome/data/zones/trollmire/objects.lua @@ -23,7 +23,7 @@ for i = 1, 2 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "tattered paper scrap", lore="trollmire-note-"..i, - desc = [[A paper scrap, left by an adventurer.]], + desc = _t[[A paper scrap, left by an adventurer.]], rarity = false, encumberance = 0, } @@ -32,7 +32,7 @@ end newEntity{ base = "BASE_LORE", define_as = "PROX_NOTE", name = "tattered paper scrap", lore="trollmire-note-3", - desc = [[A paper scrap, left by an adventurer.]], + desc = _t[[A paper scrap, left by an adventurer.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/trollmire/zone.lua b/game/modules/tome/data/zones/trollmire/zone.lua index 11c4475c5e5fb1c9e4d44c9a36e192fdf156c189..c0541fbbad069df6f9ca556d20d281e2b3dd301c 100644 --- a/game/modules/tome/data/zones/trollmire/zone.lua +++ b/game/modules/tome/data/zones/trollmire/zone.lua @@ -22,7 +22,7 @@ local layout = game.state:alternateZoneTier1(short_name, {"FLOODED", 1}) if layout == "FLOODED" then return { - name = "Trollmire", + name = _t"Trollmire", level_range = {1, 7}, level_scheme = "player", max_level = 3, @@ -152,7 +152,7 @@ return { elseif layout == "DEFAULT" then return { - name = "Trollmire", + name = _t"Trollmire", level_range = {1, 5}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/tutorial-combat-stats/grids.lua b/game/modules/tome/data/zones/tutorial-combat-stats/grids.lua index 764abd08799ffc7bda144f21b8df9568ff26f80a..363adb0655052d2c4cc135bf88410d95138283e8 100644 --- a/game/modules/tome/data/zones/tutorial-combat-stats/grids.lua +++ b/game/modules/tome/data/zones/tutorial-combat-stats/grids.lua @@ -32,11 +32,11 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[This portal will bring you back to the Tutorial Lobby.]], + desc=_t[[This portal will bring you back to the Tutorial Lobby.]], on_move = function(self, x, y, who) if who == game.player then - require("engine.ui.Dialog"):yesnoPopup("Tutorial Lobby Portal", "Enter the portal back to the lobby?", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Tutorial Lobby Portal", _t"Enter the portal back to the lobby?", function(ret) if not ret then --game:onLevelLoad("wilderness-1", function(zone, level) -- local spot = level:pickSpot{type="farportal-end", subtype="demon-plane-arrival"} @@ -45,7 +45,7 @@ newEntity{ game:changeLevel(1, "tutorial") game.logPlayer(who, "#VIOLET#You enter the swirling portal and in the blink of an eye you are back in the lobby.") end - end, "Stay", "Enter") + end, _t"Stay", _t"Enter") end end, } @@ -57,11 +57,11 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[This portal will bring you back to the Tutorial Lobby.]], + desc=_t[[This portal will bring you back to the Tutorial Lobby.]], on_move = function(self, x, y, who) if who == game.player then - require("engine.ui.Dialog"):yesnoPopup("Tutorial Lobby Portal", "Enter the portal back to the lobby?", function(ret) + require("engine.ui.Dialog"):yesnoPopup(_t"Tutorial Lobby Portal", _t"Enter the portal back to the lobby?", function(ret) if not ret then --game:onLevelLoad("wilderness-1", function(zone, level) -- local spot = level:pickSpot{type="farportal-end", subtype="demon-plane-arrival"} @@ -70,7 +70,7 @@ newEntity{ game:changeLevel(1, "tutorial") game.logPlayer(who, "#VIOLET#You enter the swirling portal and in the blink of an eye you are back in the lobby.") end - end, "Stay", "Enter") + end, _t"Stay", _t"Enter") end end, } @@ -96,7 +96,7 @@ newEntity{ base="WATER_BASE", newEntity{ define_as = "SIGN", name = "Sign", - desc = [[Contains a snippet of ToME wisdom.]], + desc=_t[[Contains a snippet of ToME wisdom.]], image = "terrain/grass.png", display = '_', color=colors.UMBER, back_color=colors.DARK_GREEN, add_displays = {class.new{image="terrain/signpost.png"}}, @@ -107,7 +107,7 @@ newEntity{ newEntity{ define_as = "SIGN_FLOOR", name = "Sign", - desc = [[Contains a snippet of ToME wisdom.]], + desc=_t[[Contains a snippet of ToME wisdom.]], image = "terrain/marble_floor.png", display = '_', color=colors.UMBER, back_color=colors.DARK_GREEN, add_displays = {class.new{image="terrain/signpost.png"}}, @@ -117,7 +117,7 @@ newEntity{ newEntity{ define_as = "SIGN_CAVE", name = "Sign", - desc = [[Contains a snippet of ToME wisdom.]], + desc=_t[[Contains a snippet of ToME wisdom.]], image = "terrain/cave/cave_floor_1_01.png", display = '_', color=colors.UMBER, back_color=colors.DARK_GREEN, add_displays = {class.new{image="terrain/signpost.png"}}, @@ -127,7 +127,7 @@ newEntity{ newEntity{ define_as = "SIGN_SOLID_FLOOR", name = "Sign", - desc = [[Contains a snippet of ToME wisdom.]], + desc=_t[[Contains a snippet of ToME wisdom.]], image = "terrain/solidwall/solid_floor1.png", display = '_', color=colors.UMBER, back_color=colors.DARK_GREEN, add_displays = {class.new{image="terrain/signpost.png"}}, @@ -137,7 +137,7 @@ newEntity{ newEntity{ define_as = "UNLEARN_ALL", name = "Rune of Enlightenment: Summer Vacation", - desc = [[Causes the player's brain to jettison all recently-acquired knowledge.]], + desc=_t[[Causes the player's brain to jettison all recently-acquired knowledge.]], image = "terrain/cave/cave_floor_1_01.png", display = '*', color=colors.VIOLET, back_color=colors.DARK_GREEN, add_displays = {class.new{image = "trap/trap_lethargy_rune_01.png"}}, @@ -172,7 +172,7 @@ newEntity{ newEntity{ define_as = "LEARN_PHYS_KB", name = "Rune of Enlightenment: Shove", - desc = [[Teaches the player 'Shove'.]], + desc=_t[[Teaches the player 'Shove'.]], image = "terrain/cave/cave_floor_1_01.png", display = '*', color=colors.VIOLET, back_color=colors.DARK_GREEN, add_displays = {class.new{image = "trap/blast_acid01.png"}}, @@ -211,7 +211,7 @@ newEntity{ newEntity{ define_as = "LEARN_SPELL_KB", name = "Rune of Enlightenment: Mana Gale", - desc = [[Teaches the player 'Mana Gale'.]], + desc=_t[[Teaches the player 'Mana Gale'.]], image = "terrain/cave/cave_floor_1_01.png", display = '*', color=colors.VIOLET, back_color=colors.DARK_GREEN, add_displays = {class.new{image = "trap/blast_fire01.png"}}, @@ -243,7 +243,7 @@ newEntity{ newEntity{ define_as = "LEARN_SPELL_KB3", name = "Rune of Enlightenment: Mana Gale", - desc = [[Teaches the player 'Mana Gale'.]], + desc=_t[[Teaches the player 'Mana Gale'.]], image = "terrain/cave/cave_floor_1_01.png", display = '*', color=colors.VIOLET, back_color=colors.DARK_GREEN, add_displays = {class.new{image = "trap/blast_fire01.png"}}, @@ -275,7 +275,7 @@ newEntity{ newEntity{ define_as = "LEARN_MIND_KB", name = "Rune of Enlightenment: Telekinetic Punt", - desc = [[Teaches the player 'Telekinetic Punt'.]], + desc=_t[[Teaches the player 'Telekinetic Punt'.]], image = "terrain/cave/cave_floor_1_01.png", display = '*', color=colors.VIOLET, back_color=colors.DARK_GREEN, add_displays = {class.new{image = "trap/blast_ice01.png"}}, @@ -308,7 +308,7 @@ newEntity{ newEntity{ define_as = "LEARN_SPELL_BLINK", name = "Rune of Enlightenment: Blink", - desc = [[Teaches the player 'Blink'.]], + desc=_t[[Teaches the player 'Blink'.]], image = "terrain/cave/cave_floor_1_01.png", display = '*', color=colors.VIOLET, back_color=colors.DARK_GREEN, add_displays = {class.new{image = "trap/blast_lightning01.png"}}, @@ -340,7 +340,7 @@ newEntity{ newEntity{ define_as = "LEARN_MIND_FEAR", name = "Rune of Enlightenment: Fear", - desc = [[Teaches the player 'Fear'.]], + desc=_t[[Teaches the player 'Fear'.]], image = "terrain/cave/cave_floor_1_01.png", display = '*', color=colors.VIOLET, back_color=colors.DARK_GREEN, add_displays = {class.new{image = "trap/trap_poison_burst_01.png"}}, @@ -372,7 +372,7 @@ newEntity{ newEntity{ define_as = "LEARN_SPELL_BLEED", name = "Rune of Enlightenment: Bleed", - desc = [[Teaches the player 'Bleed'.]], + desc=_t[[Teaches the player 'Bleed'.]], image = "terrain/cave/cave_floor_1_01.png", display = '*', color=colors.VIOLET, back_color=colors.DARK_GREEN, add_displays = {class.new{image = "trap/trap_magical_disarm_01_64.png"}}, @@ -394,7 +394,7 @@ newEntity{ newEntity{ define_as = "LEARN_MIND_CONFUSION", name = "Rune of Enlightenment: Confusion", - desc = [[Teaches the player 'Confusion'.]], + desc=_t[[Teaches the player 'Confusion'.]], image = "terrain/cave/cave_floor_1_01.png", display = '*', color=colors.VIOLET, back_color=colors.DARK_GREEN, add_displays = {class.new{image = "trap/trap_teleport_01.png"}}, @@ -462,7 +462,7 @@ newEntity{ newEntity{ define_as = "FINAL_LESSON", name = "Sign", - desc = [[Contains a snippet of ToME wisdom.]], + desc=_t[[Contains a snippet of ToME wisdom.]], image = "terrain/cave/cave_floor_1_01.png", display = '_', color=colors.UMBER, back_color=colors.DARK_GREEN, add_displays = {class.new{image="terrain/signpost.png"}}, @@ -480,7 +480,7 @@ newEntity{ newEntity{ define_as = "COMBAT_STATS_DONE", name = "Sign", - desc = [[Contains a snippet of ToME wisdom.]], + desc=_t[[Contains a snippet of ToME wisdom.]], image = "terrain/solidwall/solid_floor1.png", display = '_', color=colors.UMBER, back_color=colors.DARK_GREEN, add_displays = {class.new{image="terrain/signpost.png"}}, diff --git a/game/modules/tome/data/zones/tutorial-combat-stats/npcs.lua b/game/modules/tome/data/zones/tutorial-combat-stats/npcs.lua index 0f4917b8e049bf6e15ce72f9fb5be50c4cb89f28..41b29473f831cf4c27e98ed03d24da489b0c4fb8 100644 --- a/game/modules/tome/data/zones/tutorial-combat-stats/npcs.lua +++ b/game/modules/tome/data/zones/tutorial-combat-stats/npcs.lua @@ -28,7 +28,7 @@ newEntity{ define_as = "TUT_GUIDE", faction = "angolwen", name = "Nain the Guide", color=colors.VIOLET, unique = true, image="npc/humanoid_human_human_farmer.png", - desc = [[A pitchfork-wielding human with a welcoming smile.]], + desc = _t[[A pitchfork-wielding human with a welcoming smile.]], level_range = {50, nil}, exp_worth = 2, rank = 4, size_category = 3, @@ -69,7 +69,7 @@ newEntity{ base = "BASE_NPC_SKELETON", define_as = "TUTORIAL_NPC_MAGE", image="n newEntity{ base = "BASE_NPC_TROLL", define_as = "TUTORIAL_NPC_TROLL", name = "half-dead forest troll", color=colors.YELLOW_GREEN, - desc = [[Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists. + desc = _t[[Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists. He looks hurt.]], level_range = {1, nil}, exp_worth = 1, max_life = resolvers.rngavg(10,20), @@ -79,7 +79,7 @@ He looks hurt.]], newEntity{ base = "BASE_NPC_CANINE", define_as = "TUTORIAL_NPC_LONE_WOLF", name = "Lone Wolf", color=colors.VIOLET, unique=true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/animal_canine_lone_wolf.png", display_h=2, display_y=-1}}}, - desc = [[It is a large wolf with eyes full of cunning, only 3 times bigger than a normal wolf. It looks hungry. You look tasty!]], + desc = _t[[It is a large wolf with eyes full of cunning, only 3 times bigger than a normal wolf. It looks hungry. You look tasty!]], level_range = {3, nil}, exp_worth = 2, rank = 4, size_category = 4, @@ -113,7 +113,7 @@ newEntity{ base = "BASE_NPC_ORC", define_as = "TUTORIAL_ORC", name = "Orc", color=colors.LIGHT_UMBER, image="npc/humanoid_orc_orc_soldier.png", - --desc = [[He is a hardy, well-weathered survivor.]], + --desc = _t[[He is a hardy, well-weathered survivor.]], level_range = {1, nil}, exp_worth = 1, max_life = 100, -- resolvers.equip{ @@ -171,7 +171,7 @@ newEntity{ base = "BASE_NPC_ELVEN_CASTER", define_as = "FEEBLE_ELF", name = "Robe-clad elf", color=colors.DARK_SEA_GREEN, image="npc/humanoid_shalore_elven_blood_mage.png", - desc = [[An elf that looks as though he spends a good amount of his time wiggling his fingers and chanting.]], + desc = _t[[An elf that looks as though he spends a good amount of his time wiggling his fingers and chanting.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, mana_regen = 20, @@ -382,7 +382,7 @@ newEntity{ define_as = "BASE_TUTORIAL_SPIDER", type = "spiderkin", subtype = "spider", display = "S", color=colors.WHITE, - desc = [[Arachnophobia...]], + desc = _t[[Arachnophobia...]], combat = false, @@ -406,7 +406,7 @@ newEntity{ newEntity{ base = "BASE_TUTORIAL_SPIDER", define_as = "TUT_SPIDER_1", name = "giant spider", color=colors.LIGHT_DARK, - desc = [[A huge arachnid.]], + desc = _t[[A huge arachnid.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = 100, @@ -424,7 +424,7 @@ newEntity{ base = "BASE_TUTORIAL_SPIDER", define_as = "TUT_SPIDER_2", name = "chittering spider", color=colors.LIGHT_DARK, image="npc/spiderkin_spider_chitinous_spider.png", - desc = [[A huge, chittering arachnid.]], + desc = _t[[A huge, chittering arachnid.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = 100, @@ -442,7 +442,7 @@ newEntity{ base = "BASE_TUTORIAL_SPIDER", define_as = "TUT_SPIDER_3", name = "hairy spider", color=colors.LIGHT_DARK, image="npc/spiderkin_spider_ninurlhing.png", - desc = [[A huge, hairy arachnid.]], + desc = _t[[A huge, hairy arachnid.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = 100, diff --git a/game/modules/tome/data/zones/tutorial-combat-stats/objects.lua b/game/modules/tome/data/zones/tutorial-combat-stats/objects.lua index a86f685197847640cce22d198a40f158add2db59..2d7d38c3ed6ccee85381721bd6bd6172c3ae5f41 100644 --- a/game/modules/tome/data/zones/tutorial-combat-stats/objects.lua +++ b/game/modules/tome/data/zones/tutorial-combat-stats/objects.lua @@ -23,14 +23,14 @@ newEntity{ base = "BASE_HEAVY_BOOTS", define_as = "PHYSSAVE_BOOTS", power_source = {technique=true}, unique = true, name = "Boots of Physical Save (+10)", image = "object/artifact/scorched_boots.png", - unided_name = "Dried-up old boots.", + unided_name = _t"Dried-up old boots.", identified = true, no_unique_lore = true, level_range = {1, nil}, color = colors.YELLOW, encumber = 1, rarity = 300, - desc = [[Fine boots that increase your Physical Save by 10.]], + desc = _t[[Fine boots that increase your Physical Save by 10.]], cost = 100, wielder = { combat_physresist = 10, @@ -41,14 +41,14 @@ newEntity{ base = "BASE_AMULET", define_as = "MINDPOWER_AMULET", power_source = {technique=true}, unique = true, name = "Amulet of Mindpower (+3)", image = "object/artifact/amulet_spellblaze_echoes.png", - unided_name = "Glittering amulet.", + unided_name = _t"Glittering amulet.", identified = true, no_unique_lore = true, level_range = {1, nil}, color = colors.YELLOW, encumber = 1, rarity = 300, - desc = [[A beautiful amulet that increases your Mindpower by 3.]], + desc = _t[[A beautiful amulet that increases your Mindpower by 3.]], cost = 100, wielder = { combat_mindpower = 3, @@ -59,14 +59,14 @@ newEntity{ base = "BASE_HELM", define_as = "ACCURACY_HELM", power_source = {technique=true}, unique = true, name = "Helmet of Accuracy (+6)", image = "object/artifact/helm_of_the_dwarven_emperors.png", - unided_name = "Hard-looking helmet.", + unided_name = _t"Hard-looking helmet.", identified = true, no_unique_lore = true, level_range = {1, nil}, color = colors.YELLOW, encumber = 1, rarity = 300, - desc = [[A finely-wrought helmet that increases your Accuracy by 6.]], + desc = _t[[A finely-wrought helmet that increases your Accuracy by 6.]], cost = 100, wielder = { combat_atk = 6, @@ -77,14 +77,14 @@ newEntity{ base = "BASE_RING", define_as = "MENTALSAVE_RING", power_source = {technique=true}, unique = true, name = "Ring of Mental Save (+6)", image = "object/artifact/ring_of_war_master.png", - unided_name = "Smooth ring.", + unided_name = _t"Smooth ring.", identified = true, no_unique_lore = true, level_range = {1, nil}, color = colors.YELLOW, encumber = 1, rarity = 300, - desc = [[A ruby-studded ring.]], + desc = _t[[A ruby-studded ring.]], cost = 100, wielder = { combat_mentalresist = 6, diff --git a/game/modules/tome/data/zones/tutorial-combat-stats/traps.lua b/game/modules/tome/data/zones/tutorial-combat-stats/traps.lua index 05f3c0254630dc9a94a2d0a6dfd5f2956c0f9407..03abea46e6dbaafc90c99a7bcee3e78871218638 100644 --- a/game/modules/tome/data/zones/tutorial-combat-stats/traps.lua +++ b/game/modules/tome/data/zones/tutorial-combat-stats/traps.lua @@ -20,15 +20,15 @@ load("/data/general/traps/natural_forest.lua") newEntity{ define_as = "TRAP_TUTORIAL", - type = "tutorial", subtype="tutorial", id_by_type=true, unided_name = "tutorial", + type = "tutorial", subtype="tutorial", id_by_type=true, unided_name = _t"tutorial", detect_power = 999999, disarm_power = 999999, - desc = [[A tutorial]], + desc=_t[[A tutorial]], display = ' ', color=colors.WHITE, message = false, triggered = function(self, x, y, who) if who.player then game.player:runStop() - local d = require("engine.dialogs.ShowText").new("Tutorial: "..self.name, "tutorial/"..self.text) + local d = require("engine.dialogs.ShowText").new(("Tutorial: %s"):tformat(_t(self.name)), "tutorial/"..self.text) game:registerDialog(d) end return false, false @@ -36,15 +36,15 @@ newEntity{ define_as = "TRAP_TUTORIAL", } newEntity{ define_as = "TRAP_TUTORIAL2", - type = "tutorial", subtype="tutorial2", id_by_type=true, unided_name = "tutorial", + type = "tutorial", subtype="tutorial2", id_by_type=true, unided_name = _t"tutorial", detect_power = 999999, disarm_power = 999999, - desc = [[A tutorial]], + desc=_t[[A tutorial]], display = ' ', color=colors.WHITE, message = false, triggered = function(self, x, y, who) if who.player then game.player:runStop() - local d = require("engine.dialogs.ShowText").new("Tutorial: "..self.name, "tutorial/stats/"..self.text) + local d = require("engine.dialogs.ShowText").new(("Tutorial: %s"):tformat(_t(self.name)), "tutorial/stats/"..self.text) game:registerDialog(d) end return false, false @@ -52,15 +52,15 @@ newEntity{ define_as = "TRAP_TUTORIAL2", } newEntity{ define_as = "TRAP_TUTORIAL3", - type = "tutorial", subtype="tutorial3", id_by_type=true, unided_name = "tutorial", + type = "tutorial", subtype="tutorial3", id_by_type=true, unided_name = _t"tutorial", detect_power = 999999, disarm_power = 999999, - desc = [[A tutorial]], + desc=_t[[A tutorial]], display = ' ', color=colors.WHITE, message = false, triggered = function(self, x, y, who) if who.player then game.player:runStop() - local d = require("engine.dialogs.ShowText").new("Tutorial: "..self.name, "tutorial/stats-scale/"..self.text) + local d = require("engine.dialogs.ShowText").new(("Tutorial: %s"):tformat(_t(self.name)), "tutorial/stats-scale/"..self.text) game:registerDialog(d) end return false, false @@ -68,15 +68,15 @@ newEntity{ define_as = "TRAP_TUTORIAL3", } newEntity{ define_as = "TRAP_TUTORIAL4", - type = "tutorial", subtype="tutorial4", id_by_type=true, unided_name = "tutorial", + type = "tutorial", subtype="tutorial4", id_by_type=true, unided_name = _t"tutorial", detect_power = 999999, disarm_power = 999999, - desc = [[A tutorial]], + desc=_t[[A tutorial]], display = ' ', color=colors.WHITE, message = false, triggered = function(self, x, y, who) if who.player then game.player:runStop() - local d = require("engine.dialogs.ShowText").new("Tutorial: "..self.name, "tutorial/stats-calc/"..self.text) + local d = require("engine.dialogs.ShowText").new(("Tutorial: %s"):tformat(_t(self.name)), "tutorial/stats-calc/"..self.text) game:registerDialog(d) end return false, false @@ -84,15 +84,15 @@ newEntity{ define_as = "TRAP_TUTORIAL4", } newEntity{ define_as = "TRAP_TUTORIAL5", - type = "tutorial", subtype="tutorial5", id_by_type=true, unided_name = "tutorial", + type = "tutorial", subtype="tutorial5", id_by_type=true, unided_name = _t"tutorial", detect_power = 999999, disarm_power = 999999, - desc = [[A tutorial]], + desc=_t[[A tutorial]], display = ' ', color=colors.WHITE, message = false, triggered = function(self, x, y, who) if who.player then game.player:runStop() - local d = require("engine.dialogs.ShowText").new("Tutorial: "..self.name, "tutorial/stats-timed/"..self.text) + local d = require("engine.dialogs.ShowText").new(("Tutorial: %s"):tformat(_t(self.name)), "tutorial/stats-timed/"..self.text) game:registerDialog(d) end return false, false @@ -100,15 +100,15 @@ newEntity{ define_as = "TRAP_TUTORIAL5", } newEntity{ define_as = "TRAP_TUTORIAL6", - type = "tutorial", subtype="tutorial6", id_by_type=true, unided_name = "tutorial", + type = "tutorial", subtype="tutorial6", id_by_type=true, unided_name = _t"tutorial", detect_power = 999999, disarm_power = 999999, - desc = [[A tutorial]], + desc=_t[[A tutorial]], display = ' ', color=colors.WHITE, message = false, triggered = function(self, x, y, who) if who.player then game.player:runStop() - local d = require("engine.dialogs.ShowText").new("Tutorial: "..self.name, "tutorial/stats-tier/"..self.text) + local d = require("engine.dialogs.ShowText").new(("Tutorial: %s"):tformat(_t(self.name)), "tutorial/stats-tier/"..self.text) game:registerDialog(d) end return false, false diff --git a/game/modules/tome/data/zones/tutorial-combat-stats/zone.lua b/game/modules/tome/data/zones/tutorial-combat-stats/zone.lua index c9847212568b4b01c327ce7dc058b0eb295b135d..4bab510f14e399903ddfec96b7d08d4d61927f0f 100644 --- a/game/modules/tome/data/zones/tutorial-combat-stats/zone.lua +++ b/game/modules/tome/data/zones/tutorial-combat-stats/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Tutorial", + name = _t"Tutorial", level_range = {1, 1}, level_scheme = "player", max_level = 5, diff --git a/game/modules/tome/data/zones/tutorial/npcs.lua b/game/modules/tome/data/zones/tutorial/npcs.lua index aa09aa003a9c3e640226a3f19b6a8b1b3253df0b..0e7a431c343f76f31dcc23e1e498fa3caaaee7bf 100644 --- a/game/modules/tome/data/zones/tutorial/npcs.lua +++ b/game/modules/tome/data/zones/tutorial/npcs.lua @@ -38,7 +38,7 @@ newEntity{ base = "BASE_NPC_SKELETON", define_as = "TUTORIAL_NPC_MAGE", image="n newEntity{ base = "BASE_NPC_TROLL", define_as = "TUTORIAL_NPC_TROLL", name = "half-dead forest troll", color=colors.YELLOW_GREEN, - desc = [[Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists. + desc = _t[[Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists. He looks hurt.]], level_range = {1, nil}, exp_worth = 1, max_life = resolvers.rngavg(10,20), @@ -48,7 +48,7 @@ He looks hurt.]], newEntity{ base = "BASE_NPC_CANINE", define_as = "TUTORIAL_NPC_LONE_WOLF", name = "Lone Wolf", color=colors.VIOLET, unique=true, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/animal_canine_lone_wolf.png", display_h=2, display_y=-1}}}, - desc = [[It is a large wolf with eyes full of cunning, only 3 times bigger than a normal wolf. It looks hungry. You look tasty!]], + desc = _t[[It is a large wolf with eyes full of cunning, only 3 times bigger than a normal wolf. It looks hungry. You look tasty!]], level_range = {3, nil}, exp_worth = 2, rank = 4, size_category = 4, @@ -70,7 +70,7 @@ newEntity{ base = "BASE_NPC_CANINE", define_as = "TUTORIAL_NPC_LONE_WOLF", on_die = function(self, who) game.player:resolveSource():setQuestStatus("tutorial", engine.Quest.COMPLETED) - local d = require("engine.dialogs.ShowText").new("Tutorial: Finish", "tutorial/done") + local d = require("engine.dialogs.ShowText").new(_t"Tutorial: Finish", "tutorial/done") game:registerDialog(d) end, } diff --git a/game/modules/tome/data/zones/tutorial/traps.lua b/game/modules/tome/data/zones/tutorial/traps.lua index 3cf82310fdad3ef6e8b0c23b2a10caf53e3489b2..bba4f312e77e3b7cddad86ca1ceb486882964b79 100644 --- a/game/modules/tome/data/zones/tutorial/traps.lua +++ b/game/modules/tome/data/zones/tutorial/traps.lua @@ -20,15 +20,15 @@ load("/data/general/traps/natural_forest.lua") newEntity{ define_as = "TRAP_TUTORIAL", - type = "tutorial", subtype="tutorial", id_by_type=true, unided_name = "tutorial", + type = "tutorial", subtype="tutorial", id_by_type=true, unided_name = _t"tutorial", detect_power = 999999, disarm_power = 999999, - desc = [[A tutorial]], + desc=_t[[A tutorial]], display = ' ', color=colors.WHITE, message = false, triggered = function(self, x, y, who) if who.player then game.player:runStop() - local d = require("engine.dialogs.ShowText").new("Tutorial: "..self.name, "tutorial/"..self.text) + local d = require("engine.dialogs.ShowText").new(("Tutorial: %s"):tformat(_t(self.name)), "tutorial/"..self.text) game:registerDialog(d) end return false, false diff --git a/game/modules/tome/data/zones/tutorial/zone.lua b/game/modules/tome/data/zones/tutorial/zone.lua index 07902da0eaac7800370530d1f3cedd6f166b35ba..50175d115de2163565a4cd3bbc03fcd928d89a84 100644 --- a/game/modules/tome/data/zones/tutorial/zone.lua +++ b/game/modules/tome/data/zones/tutorial/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Tutorial", + name = _t"Tutorial", level_range = {1, 1}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/unhallowed-morass/grids.lua b/game/modules/tome/data/zones/unhallowed-morass/grids.lua index 00142f3bb5a5fc0f5b9fd0ea3ad1b592e1ca3116..0ebc47c6574180666f335c1ce337249614ae8716 100644 --- a/game/modules/tome/data/zones/unhallowed-morass/grids.lua +++ b/game/modules/tome/data/zones/unhallowed-morass/grids.lua @@ -27,7 +27,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[The rift leads to another part of the morass.]], + desc=_t[[The rift leads to another part of the morass.]], change_level = 1, } @@ -38,7 +38,7 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[The rift leads to another part of the morass.]], + desc=_t[[The rift leads to another part of the morass.]], change_level = 1, change_zone = "town-point-zero", change_level_check = function() @@ -51,7 +51,7 @@ newEntity{ local spot = level:pickSpot{type="pop", subtype="player-attack"} game.player:move(spot.x, spot.y, true) - require("engine.ui.Dialog"):simpleLongPopup("Point Zero", "The rift has brought you back to Point Zero, and the source of the disturbances.\nA temporal defiler is attacking the town, all the Keepers in range are attacking it!", 400) + require("engine.ui.Dialog"):simpleLongPopup(_t"Point Zero", _t"The rift has brought you back to Point Zero, and the source of the disturbances.\nA temporal defiler is attacking the town, all the Keepers in range are attacking it!", 400) for uid, e in pairs(game.level.entities) do if e.faction == "keepers-of-reality" or e.faction == "point-zero-guardians" then diff --git a/game/modules/tome/data/zones/unhallowed-morass/npcs.lua b/game/modules/tome/data/zones/unhallowed-morass/npcs.lua index 8ecf4a36bdf30fd4050ba4ea1184d1e0ba4f47bf..48da3838fa289ebc37db3f5f6b9b15ccaee5c73d 100644 --- a/game/modules/tome/data/zones/unhallowed-morass/npcs.lua +++ b/game/modules/tome/data/zones/unhallowed-morass/npcs.lua @@ -23,7 +23,7 @@ newEntity{ define_as = "BASE_NPC_SPIDER", type = "spiderkin", subtype = "spider", display = "S", color=colors.WHITE, - desc = [[Arachnophobia...]], + desc = _t[[Arachnophobia...]], body = { INVEN = 10 }, max_stamina = 150, @@ -40,7 +40,7 @@ newEntity{ newEntity{ base = "BASE_NPC_SPIDER", name = "weaver hatchling", color=colors.LIGHT_STEEL_BLUE, image="npc/spiderkin_spider_weaver_young.png", - desc = [[A nearly translucent spider hatchling.]], + desc = _t[[A nearly translucent spider hatchling.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, size_category = 1, max_life = resolvers.rngavg(10,20), @@ -56,7 +56,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "orb spinner", color=colors.UMBER, - desc = [[A large brownish arachnid, its fangs drip with a strange fluid.]], + desc = _t[[A large brownish arachnid, its fangs drip with a strange fluid.]], level_range = {1, nil}, exp_worth = 1, rarity = 1, max_life = resolvers.rngavg(20,40), @@ -72,7 +72,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "orb weaver", color=colors.DARK_UMBER, - desc = [[A large brownish arachnid spinning its web. It doesn't look pleased that you've disturbed its work.]], + desc = _t[[A large brownish arachnid spinning its web. It doesn't look pleased that you've disturbed its work.]], level_range = {3, nil}, exp_worth = 1, rarity = 10, -- rarely appears alone max_life = resolvers.rngavg(40,60), @@ -86,7 +86,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "fate spinner", color=colors.SLATE, - desc = [[Easily as big as a horse, this giant spider menaces at you with claws and fangs.]], + desc = _t[[Easily as big as a horse, this giant spider menaces at you with claws and fangs.]], level_range = {3, nil}, exp_worth = 1, rarity = 2, rank = 2, size_category = 4, @@ -101,7 +101,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", name = "fate weaver", color=colors.WHITE, - desc = [[A large white spider.]], + desc = _t[[A large white spider.]], level_range = {3, nil}, exp_worth = 1, rarity = 3, rank = 2, max_life = resolvers.rngavg(70,100), @@ -119,7 +119,7 @@ newEntity{ base = "BASE_NPC_SPIDER", newEntity{ base = "BASE_NPC_SPIDER", define_as = "WEAVER_QUEEN", name = "Weaver Queen", color=colors.WHITE, female=1, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/spiderkin_spider_weaver_queen.png", display_h=2, display_y=-1}}}, - desc = [[A large white spider.]], + desc = _t[[A large white spider.]], level_range = {7, nil}, exp_worth = 1, unique = true, rarity = false, @@ -162,7 +162,7 @@ newEntity{ base = "BASE_NPC_SPIDER", define_as = "WEAVER_QUEEN", on_die = function(self, who) game.player:resolveSource():setQuestStatus("start-point-zero", engine.Quest.COMPLETED, "morass") - require("engine.ui.Dialog"):simplePopup("Weaver Queen", "As you vanquish the queen you notice a temporal thread that seems to have been controlling her. It seems to go through a rift.") + require("engine.ui.Dialog"):simplePopup(_t"Weaver Queen", _t"As you vanquish the queen you notice a temporal thread that seems to have been controlling her. It seems to go through a rift.") local rift = game.zone:makeEntityByName(game.level, "terrain", "RIFT_HOME") game.zone:addEntity(game.level, rift, "terrain", self.x, self.y) end, diff --git a/game/modules/tome/data/zones/unhallowed-morass/objects.lua b/game/modules/tome/data/zones/unhallowed-morass/objects.lua index 497d9617b598a29dd4679e5a4b0d93d2b096fc73..fb888805716f3673e9c68df93a94a5ff2fdc0619 100644 --- a/game/modules/tome/data/zones/unhallowed-morass/objects.lua +++ b/game/modules/tome/data/zones/unhallowed-morass/objects.lua @@ -25,12 +25,12 @@ newEntity{ base = "BASE_LITE", define_as = "VOID_STAR", power_source = {arcane=true}, unique = true, name = "Void Star", image="object/artifact/void_star.png", - unided_name = "tiny black star", + unided_name = _t"tiny black star", level_range = {1, 10}, color = colors.GREY, encumber = 1, rarity = false, - desc = [[It looks like a very tiny star -- deep black -- and yet it somehow shines.]], + desc = _t[[It looks like a very tiny star -- deep black -- and yet it somehow shines.]], cost = 120, material_level = 2, diff --git a/game/modules/tome/data/zones/unhallowed-morass/zone.lua b/game/modules/tome/data/zones/unhallowed-morass/zone.lua index 12c682944e6ccd6f2eb88b6f7dfc5d397d212565..fca4f6276e31d34accc91163849986c5770f92e5 100644 --- a/game/modules/tome/data/zones/unhallowed-morass/zone.lua +++ b/game/modules/tome/data/zones/unhallowed-morass/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Unhallowed Morass", + name = _t"Unhallowed Morass", level_range = {1, 5}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/unremarkable-cave/npcs.lua b/game/modules/tome/data/zones/unremarkable-cave/npcs.lua index 23dd76f6617f7357be3f1b59ac91870187613ccc..521afff84027c012a4333ed5d91f1f153ad9ce00 100644 --- a/game/modules/tome/data/zones/unremarkable-cave/npcs.lua +++ b/game/modules/tome/data/zones/unremarkable-cave/npcs.lua @@ -32,7 +32,7 @@ newEntity{ define_as = "FILLAREL", name = "Fillarel Aldaren", faction = "neutral", display = "@", color=colors.GOLD, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_elf_fillarel_aldaren.png", display_h=2, display_y=-1}}}, - desc = [[An Elven woman. She wears a tight robe decorated with symbols of the Sun and the Moon and wields a staff.]], + desc = _t[[An Elven woman. She wears a tight robe decorated with symbols of the Sun and the Moon and wields a staff.]], level_range = {25, nil}, exp_worth = 2, female = 1, max_life = 120, life_rating = 15, fixed_rating = true, @@ -103,7 +103,7 @@ newEntity{ define_as = "CORRUPTOR", name = "Krogar", faction = "neutral", display = "@", color=colors.GREEN, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_orc_krogar.png", display_h=2, display_y=-1}}}, - desc = [[An orc clad in mail armour, he wields a staff and looks menacing.]], + desc = _t[[An orc clad in mail armour, he wields a staff and looks menacing.]], level_range = {25, nil}, exp_worth = 2, max_life = 120, life_rating = 15, fixed_rating = true, positive_regen = 10, diff --git a/game/modules/tome/data/zones/unremarkable-cave/zone.lua b/game/modules/tome/data/zones/unremarkable-cave/zone.lua index 33957aa41a9689fac0eca639e112ceaab9bd1048..5b700efa31d09ac23a685b77047ca74c6a70c8be 100644 --- a/game/modules/tome/data/zones/unremarkable-cave/zone.lua +++ b/game/modules/tome/data/zones/unremarkable-cave/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Unremarkable Cave", + name = _t"Unremarkable Cave", level_range = {25, 35}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/valley-moon-caverns/objects.lua b/game/modules/tome/data/zones/valley-moon-caverns/objects.lua index e0539a5e45a8e86d89d24e2b745fb416bd1fc5ba..3082193a94c2de1999f17170bddff30520d203d1 100644 --- a/game/modules/tome/data/zones/valley-moon-caverns/objects.lua +++ b/game/modules/tome/data/zones/valley-moon-caverns/objects.lua @@ -24,7 +24,7 @@ for i = 1, 3 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "tattered paper scrap", lore="valley-moon-"..i, - desc = [[A paper scrap, left by somebody named Rassir.]], + desc = _t[[A paper scrap, left by somebody named Rassir.]], rarity = false, encumberance = 0, } diff --git a/game/modules/tome/data/zones/valley-moon-caverns/zone.lua b/game/modules/tome/data/zones/valley-moon-caverns/zone.lua index 7f46554528cac179aa06fae8e0aaaf8e84688b78..70e382ebe527c23a11141dfffc46c735b0fd37dd 100644 --- a/game/modules/tome/data/zones/valley-moon-caverns/zone.lua +++ b/game/modules/tome/data/zones/valley-moon-caverns/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Caverns to the hidden valley", + name = _t"Caverns to the hidden valley", level_range = {30, 40}, level_scheme = "player", max_level = 2, diff --git a/game/modules/tome/data/zones/valley-moon/grids.lua b/game/modules/tome/data/zones/valley-moon/grids.lua index a130d2bd97d4c3e7d566762747e60770ae81adac..f7ce7a365d461e8d55f92b34ad5e09d146829ca2 100644 --- a/game/modules/tome/data/zones/valley-moon/grids.lua +++ b/game/modules/tome/data/zones/valley-moon/grids.lua @@ -42,5 +42,5 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[An invocation portal, perpetually summoning beings through it.]], + desc = _t[[An invocation portal, perpetually summoning beings through it.]], } diff --git a/game/modules/tome/data/zones/valley-moon/npcs.lua b/game/modules/tome/data/zones/valley-moon/npcs.lua index 413a631a43cea3a68f212352f159bd389e018866..25dbb84d54bd22bcdec165048c7ba6c77c1fcaa3 100644 --- a/game/modules/tome/data/zones/valley-moon/npcs.lua +++ b/game/modules/tome/data/zones/valley-moon/npcs.lua @@ -27,7 +27,7 @@ newEntity{ define_as = "CORRUPTED_DAELACH", name = "Corrupted Daelach", display = "U", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/demon_major_corrupted_daelach.png", display_h=2, display_y=-1}}}, - desc = [[Shadow and flames. The huge beast of fire moves speedily toward you, its huge shadowy wings deployed.]], + desc = _t[[Shadow and flames. The huge beast of fire moves speedily toward you, its huge shadowy wings deployed.]], level_range = {40, nil}, exp_worth = 2, max_life = 250, life_rating = 25, fixed_rating = true, rank = 4, @@ -77,7 +77,7 @@ newEntity{ define_as = "LIMMIR", display = "p", faction = "sunwall", name = "Limmir the Jeweler", color=colors.RED, unique = true, - desc = [[An Elven Anorithil, specializing in the art of jewelry.]], + desc = _t[[An Elven Anorithil, specializing in the art of jewelry.]], level_range = {50, 50}, exp_worth = 2, rank = 3, size_category = 3, diff --git a/game/modules/tome/data/zones/valley-moon/zone.lua b/game/modules/tome/data/zones/valley-moon/zone.lua index 3148e2b6a5bb9346a4c712fa37e60d7525a61319..c5c29eb6f83fa9149c9227403459f4cd8a68ee48 100644 --- a/game/modules/tome/data/zones/valley-moon/zone.lua +++ b/game/modules/tome/data/zones/valley-moon/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Ithilthum, Valley of the Moon", + name = _t"Ithilthum, Valley of the Moon", level_range = {35, 45}, level_scheme = "player", max_level = 1, diff --git a/game/modules/tome/data/zones/void/grids.lua b/game/modules/tome/data/zones/void/grids.lua index 79f021338db651a44a84e01b8bc148a28439dee8..78cea28fe70613222fd14fe6dde713550b0cc9b8 100644 --- a/game/modules/tome/data/zones/void/grids.lua +++ b/game/modules/tome/data/zones/void/grids.lua @@ -36,13 +36,13 @@ newEntity{ notice = true, always_remember = true, show_tooltip = true, - desc = [[The rift leads... somewhere.]], + desc=_t[[The rift leads... somewhere.]], change_level = 1, change_level_check = function() if game.level.level > 1 then return end local p = game.party:findMember{main=true} local Chat = require "engine.Chat" - local chat = Chat.new("temporal-rift-start", {name="Temporal Warden"}, p) + local chat = Chat.new("temporal-rift-start", {name=_t"Temporal Warden"}, p) chat:invoke() return true end, diff --git a/game/modules/tome/data/zones/void/npcs.lua b/game/modules/tome/data/zones/void/npcs.lua index 5bebf9d58214268e8ba30633c206e377dc691bad..f5afe472d78dfbb0507820f10839da88ec606d26 100644 --- a/game/modules/tome/data/zones/void/npcs.lua +++ b/game/modules/tome/data/zones/void/npcs.lua @@ -26,7 +26,7 @@ newEntity{ define_as = "GOD_GERLYK", type = "god", subtype = "eyal", unique = true, name = "Gerlyk, the Creator", display = "P", color=colors.VIOLET, - desc = [[During the Age of Haze nearly all gods were destroyed by the Sher'tul Godslayers. However, a small number escaped. + desc = _t[[During the Age of Haze nearly all gods were destroyed by the Sher'tul Godslayers. However, a small number escaped. Gerlyk, the creator of the Human race, prefered to flee into the void between the stars than to face death. He has been trapped ever since. The sorcerers tried to bring him back and nearly succeeded. Now you have come to finish what the Sher'tul began. Become a Godslayer yourself.]], diff --git a/game/modules/tome/data/zones/void/zone.lua b/game/modules/tome/data/zones/void/zone.lua index a8033a382f7b64b52b28b31ba2f89940b98e0654..eb55ae808ba1f4c1674866bb4904c266e1257267 100644 --- a/game/modules/tome/data/zones/void/zone.lua +++ b/game/modules/tome/data/zones/void/zone.lua @@ -18,9 +18,9 @@ -- darkgod@te4.org return { - name = "Void between worlds", + name = _t"Void between worlds", display_name = function(x, y) - return "Void between worlds" + return _t"Void between worlds" end, variable_zone_name = true, level_range = {100, 100}, diff --git a/game/modules/tome/data/zones/vor-armoury/npcs.lua b/game/modules/tome/data/zones/vor-armoury/npcs.lua index 7f4febc5013bde801dd37f45cdaf56d141dc7813..497b09700ede215c28869f8e4620c8722b0de569 100644 --- a/game/modules/tome/data/zones/vor-armoury/npcs.lua +++ b/game/modules/tome/data/zones/vor-armoury/npcs.lua @@ -29,7 +29,7 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ base="BASE_NPC_ORC_GRUSHNAK", define_as = "GNARG", allow_infinite_dungeon = true, name = "Warmaster Gnarg", color=colors.VIOLET, unique = true, - desc = [[This ugly orc looks really nasty and vicious. He wields a huge two-handed sword and means to use it.]], + desc = _t[[This ugly orc looks really nasty and vicious. He wields a huge two-handed sword and means to use it.]], level_range = {35, nil}, exp_worth = 2, rank = 4, max_life = 250, life_rating = 27, fixed_rating = true, diff --git a/game/modules/tome/data/zones/vor-armoury/objects.lua b/game/modules/tome/data/zones/vor-armoury/objects.lua index 180f05eb655880b21818a4612fd376ccae9b4bb5..e6258aca532158798663c38dc573ffc8fd56ad06 100644 --- a/game/modules/tome/data/zones/vor-armoury/objects.lua +++ b/game/modules/tome/data/zones/vor-armoury/objects.lua @@ -22,12 +22,12 @@ load("/data/general/objects/objects-far-east.lua") newEntity{ define_as = "ATHAME", quest=true, unique=true, identified=true, no_unique_lore=true, type = "misc", subtype="misc", - unided_name = "athame", + unided_name = _t"athame", name = "Blood-Runed Athame", image = "object/artifact/blood_runed_athame.png", level_range = {50, 50}, display = "|", color=colors.VIOLET, encumber = 1, - desc = [[An athame, covered in blood runes. It radiates power.]], + desc = _t[[An athame, covered in blood runes. It radiates power.]], on_pickup = function(self, who) if who == game.player then diff --git a/game/modules/tome/data/zones/vor-armoury/zone.lua b/game/modules/tome/data/zones/vor-armoury/zone.lua index 58504b6439cab15f5a510e2b0068fcf15f530ce6..70ceebbc96f5d53d0fe9072c11dab6b7d277bd38 100644 --- a/game/modules/tome/data/zones/vor-armoury/zone.lua +++ b/game/modules/tome/data/zones/vor-armoury/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Vor Armoury", + name = _t"Vor Armoury", level_range = {30, 40}, level_scheme = "player", max_level = 2, diff --git a/game/modules/tome/data/zones/vor-pride/npcs.lua b/game/modules/tome/data/zones/vor-pride/npcs.lua index 9de0fb66d85d8ad85f4301ad7a33470bc719b325..7d433910a199d42e7b6ae2f4c5882168fa0d7661 100644 --- a/game/modules/tome/data/zones/vor-pride/npcs.lua +++ b/game/modules/tome/data/zones/vor-pride/npcs.lua @@ -28,8 +28,8 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ base="BASE_NPC_ORC_VOR", define_as = "VOR", allow_infinite_dungeon = true, name = "Vor, Grand Geomancer of the Pride", color=colors.VIOLET, unique = true, - desc = [[An old orc, wearing multi-colored robes. Ice shards fly around him, leaving a trail of fire and lightning bursts.]], - killer_message = "and used as target practice for initiate mages", + desc = _t[[An old orc, wearing multi-colored robes. Ice shards fly around him, leaving a trail of fire and lightning bursts.]], + killer_message = _t"and used as target practice for initiate mages", level_range = {40, nil}, exp_worth = 1, rank = 5, max_life = 250, life_rating = 19, fixed_rating = true, diff --git a/game/modules/tome/data/zones/vor-pride/objects.lua b/game/modules/tome/data/zones/vor-pride/objects.lua index 0017193205202d87631731ee6c6098c06377f236..17480fb1b5e1d573e7e6e388d1ca3f249d046c49 100644 --- a/game/modules/tome/data/zones/vor-pride/objects.lua +++ b/game/modules/tome/data/zones/vor-pride/objects.lua @@ -26,14 +26,14 @@ local Stats = require"engine.interface.ActorStats" -- Artifact, randomly dropped in Vor Pride, and only there newEntity{ base = "BASE_SCROLL", subtype="tome", power_source = {arcane=true}, - name = "Tome of Wildfire", unided_name = "burning book", unique=true, no_unique_lore=true, image = "object/artifact/tome_of_wildfire.png", - desc = "This huge book is covered in searing flames. Yet they do not harm you.", + name = "Tome of Wildfire", unided_name = _t"burning book", unique=true, no_unique_lore=true, image = "object/artifact/tome_of_wildfire.png", + desc = _t"This huge book is covered in searing flames. Yet they do not harm you.", color = colors.VIOLET, level_range = {35, 45}, rarity = 200, cost = 100, - use_simple = { name="learn the ancient secrets", use = function(self, who) + use_simple = { name=_t"learn the ancient secrets", use = function(self, who) if not who:knowTalent(who.T_FLAME) then who:learnTalent(who.T_FLAME, true, 3, {no_unlearn=true}) game.logPlayer(who, "#00FFFF#You read the tome and learn about ancient forgotten fire magic!") @@ -50,14 +50,14 @@ newEntity{ base = "BASE_SCROLL", subtype="tome", -- Artifact, randomly dropped in Vor Pride, and only there newEntity{ base = "BASE_SCROLL", subtype="tome", power_source = {arcane=true}, - name = "Tome of Uttercold", unided_name = "frozen book", unique=true, no_unique_lore=true, image = "object/artifact/tome_of_uttercold.png", - desc = "This huge book is covered in slowly shifting patterns of ice. Yet they do not harm you.", + name = "Tome of Uttercold", unided_name = _t"frozen book", unique=true, no_unique_lore=true, image = "object/artifact/tome_of_uttercold.png", + desc = _t"This huge book is covered in slowly shifting patterns of ice. Yet they do not harm you.", color = colors.VIOLET, level_range = {35, 45}, rarity = 200, cost = 100, - use_simple = { name="learn the ancient secrets", use = function(self, who) + use_simple = { name=_t"learn the ancient secrets", use = function(self, who) if not who:knowTalent(who.T_ICE_STORM) then who:learnTalent(who.T_ICE_STORM, true, 3, {no_unlearn=true}) game.logPlayer(who, "#00FFFF#You read the tome and learn about ancient forgotten ice magic!") @@ -74,7 +74,7 @@ newEntity{ base = "BASE_SCROLL", subtype="tome", newEntity{ base = "BASE_LORE", define_as = "NOTE_LORE", name = "draft note", lore="vor-pride-note", - desc = [[A note.]], + desc = _t[[A note.]], rarity = false, } @@ -82,7 +82,7 @@ for i = 1, 5 do newEntity{ base = "BASE_LORE", define_as = "ORC_HISTORY"..i, name = "Records of Lorekeeper Hadak", lore="orc-history-"..i, unique="Records of Lorekeeper Hadak "..i, - desc = [[Part of the long history of the Orc race.]], + desc = _t[[Part of the long history of the Orc race.]], rarity = false, } end diff --git a/game/modules/tome/data/zones/vor-pride/zone.lua b/game/modules/tome/data/zones/vor-pride/zone.lua index ec9b3dc8a5c545fed1a11aee775f7bd2f79535dd..05cf626d39a1c017746655d9264e53000ad96b98 100644 --- a/game/modules/tome/data/zones/vor-pride/zone.lua +++ b/game/modules/tome/data/zones/vor-pride/zone.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org return { - name = "Vor Pride", + name = _t"Vor Pride", level_range = {35, 60}, level_scheme = "player", max_level = 3, diff --git a/game/modules/tome/data/zones/wilderness/grids.lua b/game/modules/tome/data/zones/wilderness/grids.lua index 6e9f4961fd08c31f3ecf1c7804484241d0836ced..019b160f7de3e10acdaeac5beedd873cfdd01808 100644 --- a/game/modules/tome/data/zones/wilderness/grids.lua +++ b/game/modules/tome/data/zones/wilderness/grids.lua @@ -508,17 +508,17 @@ newEntity{ base="JUNGLE_PLAINS", define_as = "JUNGLE_TOWN", notice = true, chang newEntity{ base="TOWN", define_as = "TOWN_DERTH", name = "Derth (Town)", add_mos = {{image="terrain/village_01.png"}}, - desc = "A quiet town at the crossroads of the north", + desc = _t"A quiet town at the crossroads of the north", change_zone="town-derth", } newEntity{ base="TOWN", define_as = "TOWN_LAST_HOPE", name = "Last Hope (Town)", add_displays = {class.new{image="terrain/last_hope.png", display_w=2, display_x=-0.5, z=5}, class.new{image="terrain/last_hope_up.png", display_w=2, display_x=-0.5, display_h=2, display_y=-2, z=16}}, - desc = "Capital city of the Allied Kingdoms ruled by King Tolak", + desc = _t"Capital city of the Allied Kingdoms ruled by King Tolak", change_zone="town-last-hope", } newEntity{ base="TOWN", define_as = "TOWN_ANGOLWEN", name = "Angolwen, the hidden city of magic", add_displays = {mod.class.Grid.new{z=5, image="terrain/town1.png"}}, - desc = "Secret place of magic, set apart from the world to protect it.\nLead by the Supreme Archmage Linaniil.", + desc = _t"Secret place of magic, set apart from the world to protect it.\nLead by the Supreme Archmage Linaniil.", change_zone="town-angolwen", } newEntity{ base="TOWN", define_as = "TOWN_ANGOLWEN_PORTAL", @@ -530,28 +530,28 @@ newEntity{ base="TOWN", define_as = "TOWN_ANGOLWEN_PORTAL", } newEntity{ base="TOWN", define_as = "TOWN_SHATUR", name = "Shatur (Town)", add_mos = {{image="terrain/town1.png"}}, - desc = "Capital city of Thaloren lands, ruled by Nessilla Tantaelen", + desc = _t"Capital city of Thaloren lands, ruled by Nessilla Tantaelen", change_zone="town-shatur", } newEntity{ base="TOWN", define_as = "TOWN_ELVALA", name = "Elvala (Town)", add_mos = {{image="terrain/village_01.png"}}, - desc = "Capital city of Shaloren lands, ruled by Aranion Gayaeil", + desc = _t"Capital city of Shaloren lands, ruled by Aranion Gayaeil", change_zone="town-elvala", } newEntity{ base="TOWN", define_as = "TOWN_GATES_OF_MORNING", name = "Gates of Morning (Town)", - desc = "A massive hole in the Sunwall.", + desc = _t"A massive hole in the Sunwall.", add_displays = {class.new{image="terrain/golden_cave_entrance02.png", z=8}}, change_zone="town-gates-of-morning", } newEntity{ base="JUNGLE_TOWN", define_as = "TOWN_IRKKK", name = "Irkkk (Town)", add_mos = {{image="terrain/village_01.png"}}, - desc = "Yeek Wayist main village", + desc = _t"Yeek Wayist main village", change_zone="town-irkkk", } newEntity{ base="TOWN", define_as = "TOWN_ZIGUR", name = "Zigur (Town)", add_mos = {{image="terrain/village_01.png"}}, - desc = "Ziguranth main training ground", + desc = _t"Ziguranth main training ground", change_zone="town-zigur", change_level_check = function() local p = game.party:findMember{main=true} @@ -559,7 +559,7 @@ newEntity{ base="TOWN", define_as = "TOWN_ZIGUR", return false end if p:attr("has_arcane_knowledge") or p:attr("undead") then - require("engine.ui.Dialog"):simplePopup("Zigur", "Somehow as magic user you feel this place is not safe for you.") + require("engine.ui.Dialog"):simplePopup(_t"Zigur", _t"Somehow as magic user you feel this place is not safe for you.") return true end return false @@ -568,7 +568,7 @@ newEntity{ base="TOWN", define_as = "TOWN_ZIGUR", newEntity{ base="TOWN", define_as = "TOWN_IRON_COUNCIL", name = "Iron Council (Town)", add_displays = {class.new{image="terrain/cave_entrance_closed02.png", z=5}}, - desc = "Heart of the dwarven Empire", + desc = _t"Heart of the dwarven Empire", change_zone="town-iron-council", change_zone_auto_stairs = true, } @@ -684,7 +684,7 @@ newEntity{ base="ZONE_JUNGLE_PLAINS", define_as = "REL_TUNNEL", colors.LIGHT_BLUE, add_mos={{image="terrain/ruin_entrance01.png"}}, force_down=true, change_level=4, change_zone="halfling-ruins", - change_level_check = function() local p = game.party:findMember{main=true} if p:hasQuest("start-yeek") and not p:isQuestStatus("start-yeek", engine.Quest.DONE) then require("engine.ui.Dialog"):simplePopup("Long tunnel", "You cannot abandon the yeeks of Rel to the dangers that lie within the island.") return true end p:setQuestStatus("rel-tunnel", engine.Quest.DONE) return false end, + change_level_check = function() local p = game.party:findMember{main=true} if p:hasQuest("start-yeek") and not p:isQuestStatus("start-yeek", engine.Quest.DONE) then require("engine.ui.Dialog"):simplePopup(_t"Long tunnel", _t"You cannot abandon the yeeks of Rel to the dangers that lie within the island.") return true end p:setQuestStatus("rel-tunnel", engine.Quest.DONE) return false end, } newEntity{ base="ZONE_PLAINS", define_as = "UNREMARKABLE_CAVE", @@ -723,7 +723,7 @@ newEntity{ base="ZONE_PLAINS", define_as = "TEMPEST_PEAK", change_level_check = function() game.turn = game.turn + 5 * game.calendar.HOUR if not game.player:hasQuest("lightning-overload").walked then - require("engine.ui.Dialog"):simpleLongPopup("Danger...", [[After walking many hours, you finally reach the end of the way. You are nearly on top of one of the highest peaks you can see. + require("engine.ui.Dialog"):simpleLongPopup(_t"Danger...", _t[[After walking many hours, you finally reach the end of the way. You are nearly on top of one of the highest peaks you can see. The storm is raging above your head.]], 400) game.player:hasQuest("lightning-overload").walked = true end diff --git a/game/modules/tome/data/zones/wilderness/zone.lua b/game/modules/tome/data/zones/wilderness/zone.lua index 3234604ef93fdfb5e892c40e389854c001cc7d60..65e5ea1708323d431215881ae65113a0231dc53d 100644 --- a/game/modules/tome/data/zones/wilderness/zone.lua +++ b/game/modules/tome/data/zones/wilderness/zone.lua @@ -18,8 +18,8 @@ -- darkgod@te4.org return { - name = "World of Eyal", - display_name = function(x, y) return game.level and game.level.map.attrs(x or game.player.x, y or game.player.y, "zonename") or "Eyal" end, + name = _t"World of Eyal", + display_name = function(x, y) return game.level and game.level.map.attrs(x or game.player.x, y or game.player.y, "zonename") or _t"Eyal" end, variable_zone_name = true, level_range = {1, 1}, max_level = 1, diff --git a/game/modules/tome/dialogs/ArenaFinish.lua b/game/modules/tome/dialogs/ArenaFinish.lua index 8483a67ce3757905d1632cdd204f8592c072c44a..321a476c8464074e53365036ad44082a1743d406 100644 --- a/game/modules/tome/dialogs/ArenaFinish.lua +++ b/game/modules/tome/dialogs/ArenaFinish.lua @@ -29,7 +29,7 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(actor) self.actor = actor - Dialog.init(self, "Arena mode", 500, 300) + Dialog.init(self, _t"Arena mode", 500, 300) actor:saveUUID() @@ -49,16 +49,15 @@ end function _M:printRanking() local scores = world.arena.scores - if not scores[1].name then return "#LIGHT_GREEN#No high scores. This should not happen." + if not scores[1].name then return _t"#LIGHT_GREEN#No high scores. This should not happen." else local text = "" local tmp = "" local line = function (txt, col) return " "..col..txt.."\n" end - local stri = "%s (%s %s %s)\n Score %d[%s]) - Wave: %d" local i = 1 while(scores[i] and scores[i].name) do p = scores[i] - tmp = stri:format((p.name or "unknown"):capitalize(), p.sex or "unknown", p.race or "unknown", p.class or "unknown", p.score or "unknown", p.perk or "unknown", p.wave or -1) + tmp = ("%s (%s %s %s)\n Score %d[%s]) - Wave: %d"):tformat((p.name or _t"unknown"):capitalize(), p.sex or _t"unknown", p.race or _t"unknown", p.class or _t"unknown", p.score or _t"unknown", p.perk or _t"unknown", p.wave or -1) if p.name == world.arena.lastScore.name and p.score == world.arena.lastScore.score and p.wave == world.arena.lastScore.wave and p.perk == world.arena.lastScore.perk then text = text..line(tmp, "#YELLOW#") else @@ -149,7 +148,7 @@ function _M:use(item) elseif act == "dump" then game:registerDialog(require("mod.dialogs.CharacterSheet").new(self.actor)) elseif act == "log" then - game:registerDialog(require("mod.dialogs.ShowChatLog").new("Message Log", 0.6, game.uiset.logdisplay, profile.chat)) + game:registerDialog(require("mod.dialogs.ShowChatLog").new(_t"Message Log", 0.6, game.uiset.logdisplay, profile.chat)) elseif act == "lichform" then local t = self.actor:getTalentFromId(self.actor.T_LICHFORM) @@ -166,12 +165,12 @@ end function _M:generateList() local list = {} - if config.settings.cheat then list[#list+1] = {name="Resurrect by cheating", action="cheat"} end - list[#list+1] = {name=(not profile.auth and "Message Log" or "Message/Chat log (allows to talk)"), action="log"} - list[#list+1] = {name="Character dump", action="dump"} - list[#list+1] = {name="Restart the same character", action="exit", subaction="restart"} - list[#list+1] = {name="Restart with a new character", action="exit", subaction="restart-new"} - list[#list+1] = {name="Exit to main menu", action="exit", subaction="none"} + if config.settings.cheat then list[#list+1] = {name=_t"Resurrect by cheating", action="cheat"} end + list[#list+1] = {name=(not profile.auth and _t"Message Log" or _t"Message/Chat log (allows to talk)"), action="log"} + list[#list+1] = {name=_t"Character dump", action="dump"} + list[#list+1] = {name=_t"Restart the same character", action="exit", subaction="restart"} + list[#list+1] = {name=_t"Restart with a new character", action="exit", subaction="restart-new"} + list[#list+1] = {name=_t"Exit to main menu", action="exit", subaction="none"} self.list = list if self.actor:isTalentActive(self.actor.T_LICHFORM) then diff --git a/game/modules/tome/dialogs/Birther.lua b/game/modules/tome/dialogs/Birther.lua index 7603b27ddaccda87ebcda524ddb6e0eedb0b7806..f3929194b9d36515fbd2b1524f0e75294506a9bd 100644 --- a/game/modules/tome/dialogs/Birther.lua +++ b/game/modules/tome/dialogs/Birther.lua @@ -76,7 +76,7 @@ function _M:init(title, actor, order, at_end, quickbirth, w, h) self.selected_cosmetic_options = nil self.tiles = Tiles.new(64, 64, nil, nil, true, nil) - Dialog.init(self, title and title or "Character Creation", w or 600, h or 400) + Dialog.init(self, title and title or _t"Character Creation", w or 600, h or 400) self.obj_list = Object:loadList("/data/general/objects/objects.lua") self.obj_list_by_name = {} @@ -87,40 +87,40 @@ function _M:init(title, actor, order, at_end, quickbirth, w, h) self.to_reset_cosmetic = {} - self.c_ok = Button.new{text=" Play! ", fct=function() self:atEnd("created") end} - self.c_random = Button.new{text="Random!", fct=function() self:randomBirth() end} - self.c_premade = Button.new{text="Load premade", fct=function() self:loadPremadeUI() end} - self.c_tile = Button.new{text="Select custom tile", fct=function() self:selectTile() end} - self.c_cancel = Button.new{text="Cancel", fct=function() self:atEnd("quit") end} - self.c_tut = Button.new{text="Tutorial", fct=function() self:tutorial() end} - self.c_options = Button.new{text="Customize", fct=function() self:customizeOptions() end} + self.c_ok = Button.new{text=_t" Play! ", fct=function() self:atEnd("created") end} + self.c_random = Button.new{text=_t"Random!", fct=function() self:randomBirth() end} + self.c_premade = Button.new{text=_t"Load premade", fct=function() self:loadPremadeUI() end} + self.c_tile = Button.new{text=_t"Select custom tile", fct=function() self:selectTile() end} + self.c_cancel = Button.new{text=_t"Cancel", fct=function() self:atEnd("quit") end} + self.c_tut = Button.new{text=_t"Tutorial", fct=function() self:tutorial() end} + self.c_options = Button.new{text=_t"Customize", fct=function() self:customizeOptions() end} self.c_options.hide = true - self.c_extra_options = Button.new{text="Extra Options", fct=function() self:extraOptions() end} + self.c_extra_options = Button.new{text=_t"Extra Options", fct=function() self:extraOptions() end} self.c_extra_options.hide = not game.extra_birth_option_defs or #game.extra_birth_option_defs == 0 - self.c_name = Textbox.new{title="Name: ", text=(not config.settings.cheat and game.player_name == "player") and "" or game.player_name, chars=30, max_len=50, fct=function() + self.c_name = Textbox.new{title=_t"Name: ", text=(not config.settings.cheat and game.player_name == "player") and "" or game.player_name, chars=30, max_len=50, fct=function() if config.settings.cheat then self:makeDefault() end end, on_change=function() self:setDescriptor() end, on_mouse = function(button) if button == "right" then self:randomName() end end} - self.c_female = Checkbox.new{title="Female", default=true, + self.c_female = Checkbox.new{title=_t"Female", default=true, fct=function() end, on_change=function(s) self.c_male.checked = not s self:setDescriptor("sex", s and "Female" or "Male") end } - self.c_male = Checkbox.new{title="Male", default=false, + self.c_male = Checkbox.new{title=_t"Male", default=false, fct=function() end, on_change=function(s) self.c_female.checked = not s self:setDescriptor("sex", s and "Male" or "Female") end } self:generateCampaigns() - self.c_campaign_text = Textzone.new{auto_width=true, auto_height=true, text="Campaign: "} + self.c_campaign_text = Textzone.new{auto_width=true, auto_height=true, text=_t"Campaign: "} self.c_campaign = Dropdown.new{width=400, fct=function(item) self:campaignUse(item) end, on_select=function(item) self:updateDesc(item) end, list=self.all_campaigns, nb_items=#self.all_campaigns} self:generateDifficulties() - self.c_difficulty_text = Textzone.new{auto_width=true, auto_height=true, text="Difficulty: "} + self.c_difficulty_text = Textzone.new{auto_width=true, auto_height=true, text=_t"Difficulty: "} self.c_difficulty = Dropdown.new{width=100, fct=function(item) self:difficultyUse(item) end, on_select=function(item) self:updateDesc(item) end, list=self.all_difficulties, nb_items=#self.all_difficulties} self:generatePermadeaths() - self.c_permadeath_text = Textzone.new{auto_width=true, auto_height=true, text="Permadeath: "} + self.c_permadeath_text = Textzone.new{auto_width=true, auto_height=true, text=_t"Permadeath: "} self.c_permadeath = Dropdown.new{width=150, fct=function(item) self:permadeathUse(item) end, on_select=function(item) self:updateDesc(item) end, list=self.all_permadeaths, nb_items=#self.all_permadeaths} self.c_desc = TextzoneList.new{width=math.floor(self.iw / 3 - 10), height=self.ih - self.c_female.h - self.c_ok.h - self.c_difficulty.h - self.c_campaign.h - 10, scrollbar=true, pingpong=20, no_color_bleed=true} @@ -220,9 +220,9 @@ function _M:checkNew(fct) local function checkfct() local savename = self.c_name.text:gsub("[^a-zA-Z0-9_-.]", "_") if fs.exists(("/save/%s/game.teag"):format(savename)) then - Dialog:yesnoPopup("Overwrite character?", "There is already a character with this name, do you want to overwrite it?", function(ret) + Dialog:yesnoPopup(_t"Overwrite character?", _t"There is already a character with this name, do you want to overwrite it?", function(ret) if not ret then fct() end - end, "No", "Yes") + end, _t"No", _t"Yes") else fct() end @@ -244,9 +244,9 @@ function _M:checkNew(fct) end if is_magic and is_antimagic then - Dialog:yesnoPopup("Antimagic Magic combo", "The selected race/class has both magic and antimagic, this is unlikely to work. Continue?", function(ret) if not ret then + Dialog:yesnoPopup(_t"Antimagic Magic combo", _t"The selected race/class has both magic and antimagic, this is unlikely to work. Continue?", function(ret) if not ret then checkfct() - end end, "No", "Yes I'm sure") + end end, _t"No", _t"Yes I'm sure") else checkfct() end @@ -414,10 +414,10 @@ function _M:tutorial() self:atEnd("created") end - local d = Dialog.new("Tutorials", 280, 100) - local basic = Button.new{text="Basic Gameplay (recommended)", fct=function() run("Basic") d.key:triggerVirtual("EXIT") end} --- local stats = Button.new{text="Stats and effects (advanced players)", fct=function() run("Stats") d.key:triggerVirtual("EXIT") end} - local cancel = Button.new{text="Cancel", fct=function() d.key:triggerVirtual("EXIT") end} + local d = Dialog.new(_t"Tutorials", 280, 100) + local basic = Button.new{text=_t"Basic Gameplay (recommended)", fct=function() run("Basic") d.key:triggerVirtual("EXIT") end} +-- local stats = Button.new{text=_t"Stats and effects (advanced players)", fct=function() run("Stats") d.key:triggerVirtual("EXIT") end} + local cancel = Button.new{text=_t"Cancel", fct=function() d.key:triggerVirtual("EXIT") end} local sep = Separator.new{dir="vertical", size=230} d:loadUI{ @@ -518,7 +518,7 @@ function _M:randomName() end function _M:on_focus(id, ui) - if self.focus_ui and self.focus_ui.ui == self.c_name then self.c_desc:switchItem(self.c_name, "This is the name of your character.\nRight mouse click to generate a random name based on race and sex.") + if self.focus_ui and self.focus_ui.ui == self.c_name then self.c_desc:switchItem(self.c_name, _t"This is the name of your character.\nRight mouse click to generate a random name based on race and sex.") elseif self.focus_ui and self.focus_ui.ui == self.c_female then self.c_desc:switchItem(self.c_female, self.birth_descriptor_def.sex.Female.desc) elseif self.focus_ui and self.focus_ui.ui == self.c_male then self.c_desc:switchItem(self.c_male, self.birth_descriptor_def.sex.Male.desc) elseif self.focus_ui and self.focus_ui.ui == self.c_campaign then @@ -674,7 +674,7 @@ function _M:updateDescriptors() if #clist > 0 then table.sort(clist, function(a, b) return a.name < b.name end) - table.insert(self.cosmetic_options, {name=kind:gsub("_", " "):capitalize(), kind=kind, color=function() return colors.simple(colors.GOLD) end, nodes=clist}) + table.insert(self.cosmetic_options, {name=_t(kind:gsub("_", " "):capitalize()), kind=kind, color=function() return colors.simple(colors.GOLD) end, nodes=clist}) end end end end @@ -795,7 +795,7 @@ function _M:getLock(d) end function _M:generateCampaigns() - local locktext = "\n\n#GOLD#This is a locked birth option. Performing certain actions and completing certain quests will make locked campaigns, races and classes permanently available." + local locktext = _t"\n\n#GOLD#This is a locked birth option. Performing certain actions and completing certain quests will make locked campaigns, races and classes permanently available." local list = {} for i, d in ipairs(self.birth_descriptor_def.world) do @@ -817,7 +817,7 @@ function _M:generateCampaigns() end function _M:generateDifficulties() - local locktext = "\n\n#GOLD#This is a locked birth option. Performing certain actions and completing certain quests will make locked campaigns, races and classes permanently available." + local locktext = _t"\n\n#GOLD#This is a locked birth option. Performing certain actions and completing certain quests will make locked campaigns, races and classes permanently available." local list = {} local oldsel = nil @@ -849,7 +849,7 @@ function _M:generateDifficulties() end function _M:generatePermadeaths() - local locktext = "\n\n#GOLD#This is a locked birth option. Performing certain actions and completing certain quests will make locked campaigns, races and classes permanently available." + local locktext = _t"\n\n#GOLD#This is a locked birth option. Performing certain actions and completing certain quests will make locked campaigns, races and classes permanently available." local list = {} local oldsel = nil @@ -881,7 +881,7 @@ function _M:generatePermadeaths() end function _M:generateRaces() - local locktext = "\n\n#GOLD#This is a locked birth option. Performing certain actions and completing certain quests will make locked campaigns, races and classes permanently available." + local locktext = _t"\n\n#GOLD#This is a locked birth option. Performing certain actions and completing certain quests will make locked campaigns, races and classes permanently available." local oldtree = {} for i, t in ipairs(self.all_races or {}) do oldtree[t.id] = t.shown end @@ -935,7 +935,7 @@ function _M:generateRaces() end function _M:generateClasses() - local locktext = "\n\n#GOLD#This is a locked birth option. Performing certain actions and completing certain quests will make locked campaigns, races and classes permanently available." + local locktext = _t"\n\n#GOLD#This is a locked birth option. Performing certain actions and completing certain quests will make locked campaigns, races and classes permanently available." local oldtree = {} for i, t in ipairs(self.all_classes or {}) do oldtree[t.id] = t.shown end @@ -949,7 +949,7 @@ function _M:generateClasses() if (d.descriptor_choices.subclass[sd.name] == "allow" or d.descriptor_choices.subclass[sd.name] == "allow-nochange" or d.descriptor_choices.subclass[sd.name] == "nolore") and self:isDescriptorAllowed(sd, {subclass=true, class=true}) then local locked = self:getLock(sd) if locked == true then - nodes[#nodes+1] = { name = tstring{{"font", "italic"}, {"color", "GREY"}, "-- locked --", {"font", "normal"}}, id=sd.name, pid=d.name, locked=true, desc=util.getval(sd.locked_desc, self)..locktext } + nodes[#nodes+1] = { name = tstring{{"font", "italic"}, {"color", "GREY"}, _t"-- locked --", {"font", "normal"}}, id=sd.name, pid=d.name, locked=true, desc=util.getval(sd.locked_desc, self)..locktext } elseif locked == false then local old = self.descriptors_by_type.subclass self.descriptors_by_type.subclass = nil @@ -958,7 +958,7 @@ function _M:generateClasses() local desc = sd.desc if type(desc) == "table" then desc = table.concat(sd.desc, "\n") end if how == "nolore" and self.descriptors_by_type.subrace then - desc = "#CRIMSON#Playing this class with the race you selected does not make much sense lore-wise. You can still do it but might miss on some special quests/...#WHITE#\n" .. desc + desc = _t"#CRIMSON#Playing this class with the race you selected does not make much sense lore-wise. You can still do it but might miss on some special quests/...#WHITE#\n" .. desc end nodes[#nodes+1] = { name = sd.display_name, basename=sd.display_name, id=sd.name, pid=d.name, desc=desc, def=sd } if self.sel_class and self.sel_class.id == sd.name then newsel = nodes[#nodes] end @@ -968,7 +968,7 @@ function _M:generateClasses() local locked = self:getLock(d) if locked == true then - tree[#tree+1] = { name = tstring{{"font", "italic"}, {"color", "GREY"}, "-- locked --", {"font", "normal"}}, id=d.name, shown=oldtree[d.name], nodes = nodes, locked=true, desc=util.getval(d.locked_desc, self)..locktext } + tree[#tree+1] = { name = tstring{{"font", "italic"}, {"color", "GREY"}, _t"-- locked --", {"font", "normal"}}, id=d.name, shown=oldtree[d.name], nodes = nodes, locked=true, desc=util.getval(d.locked_desc, self)..locktext } elseif locked == false then local desc = d.desc if type(desc) == "table" then desc = table.concat(d.desc, "\n") end @@ -1086,7 +1086,7 @@ end function _M:loadPremadeUI() local lss = Module:listVaultSavesForCurrent() - local d = Dialog.new("Characters Vault", 600, 550) + local d = Dialog.new(_t"Characters Vault", 600, 550) local sel = nil local sep = Separator.new{dir="horizontal", size=400} @@ -1104,9 +1104,9 @@ function _M:loadPremadeUI() select=function(item) desc:switchItem(item, item.description) end } - local load = Button.new{text=" Load ", fct=function() if sel then self:loadPremade(sel) game:unregisterDialog(d) end end} - local del = Button.new{text="Delete", fct=function() if sel then - self:yesnoPopup(sel.name, "Really delete premade: "..sel.name, function(ret) if ret then + local load = Button.new{text=_t" Load ", fct=function() if sel then self:loadPremade(sel) game:unregisterDialog(d) end end} + local del = Button.new{text=_t"Delete", fct=function() if sel then + self:yesnoPopup(sel.name, ("Really delete premade: %s"):tformat(sel.name), function(ret) if ret then local vault = CharacterVaultSave.new(sel.short_name) vault:delete() vault:close() @@ -1359,8 +1359,8 @@ function _M:applyCosmeticActor(last) end function _M:selectExplorationNoDonations() - Dialog:yesnoLongPopup("Exploration mode", - [[Exploration mode provides the characters using it with infinite lives. + Dialog:yesnoLongPopup(_t"Exploration mode", + _t[[Exploration mode provides the characters using it with infinite lives. Tales of Maj'Eyal is meant to be a very replayable game in which you get better by learning from mistakes (and thus from dying too). I realize this can not please everybody and after multiple requests I have decided to grant exploration mode to donators, because it will allow player that like the game to see it all if they wish. Beware though, infinite lives does not mean the difficulty is reduced, only that you can try as much as you want without restarting. @@ -1373,12 +1373,12 @@ Donators will also gain access to the custom tiles for their characters.]], 400, if not ret then game:registerDialog(require("mod.dialogs.Donation").new("exploration-mode")) end - end, "Later", "Donate!") + end, _t"Later", _t"Donate!") end function _M:selectTileNoDonations() - Dialog:yesnoLongPopup("Custom tiles", - [[Custom Tiles have been added as a thank you to everyone that has donated to ToME. + Dialog:yesnoLongPopup(_t"Custom tiles", + _t[[Custom Tiles have been added as a thank you to everyone that has donated to ToME. They are a fun cosmetic feature that allows you to choose a tile for your character from a list of nearly 180 (with more to be added over time), ranging from special humanoid tiles to downright wonky ones! If you'd like to use this feature and find this game good you should consider donating. It will help ensure its survival. @@ -1389,11 +1389,11 @@ Donators will also gain access to the Exploration Mode featuring infinite lives. if not ret then game:registerDialog(require("mod.dialogs.Donation").new("custom-tiles")) end - end, "Later", "Donate!") + end, _t"Later", _t"Donate!") end function _M:selectTile() - local d = Dialog.new("Select a Tile", 600, 550) + local d = Dialog.new(_t"Select a Tile", 600, 550) local list = { "npc/alchemist_golem.png", @@ -1637,19 +1637,19 @@ function _M:selectTile() end self:triggerHook{"Birther:donatorTiles", list=list} - local remove = Button.new{text="Use default tile", width=240, fct=function() + local remove = Button.new{text=_t"Use default tile", width=240, fct=function() game:unregisterDialog(d) self.has_custom_tile = nil self:setTile() end} - local custom = Button.new{text="Use custom-made tile", width=240, fct=function() - self:simpleLongPopup("Howto: Custom-made tiles", ([[You can use your own custom tiles if you are a donator. + local custom = Button.new{text=_t"Use custom-made tile", width=240, fct=function() + self:simpleLongPopup(_t"Howto: Custom-made tiles", ([[You can use your own custom tiles if you are a donator. For the game to use them you must simply respect a few rules: - they must be 64x64 or 64x128 tiles - they must be saved as PNG files - you must place them in folder #LIGHT_BLUE#%s#WHITE# -Once you have done so, simply restart the game and the tiles will be listed at the bottom of the list.]]):format(fs.getRealPath("/data/gfx/custom-tiles/")), 500) +Once you have done so, simply restart the game and the tiles will be listed at the bottom of the list.]]):tformat(fs.getRealPath("/data/gfx/custom-tiles/")), 500) end} local list = ImageList.new{width=500, height=500, tile_w=64, tile_h=64, padding=10, scrollbar=true, list=list, fct=function(item) game:unregisterDialog(d) @@ -1685,12 +1685,12 @@ function _M:customizeOptions(cosmetic_actor, on_exit, title) self.actor = oldactor end - local d = Dialog.new(title or "Cosmetic Options", 600, 550) + local d = Dialog.new(title or _t"Cosmetic Options", 600, 550) local sel = nil local list list = TreeList.new{width=450, tree=self.cosmetic_options, height=400, scrollbar=true, all_clicks=true, columns={ - {name="Name", width=100, display_prop="name"}, + {name=_t"Name", width=100, display_prop="name"}, }, fct=function(item, sel, button) if item.nodes then @@ -1712,9 +1712,9 @@ function _M:customizeOptions(cosmetic_actor, on_exit, title) end if not self:isDonator() then - self:yesnoPopup("Donator Feature", "Cosmetic customization is a donator-only feature.", function(ret) if ret then + self:yesnoPopup(_t"Donator Feature", _t"Cosmetic customization is a donator-only feature.", function(ret) if ret then game:registerDialog(require("mod.dialogs.Donation").new()) - end end, "I want to help!", "Dismiss") + end end, _t"I want to help!", _t"Dismiss") end local selected = false @@ -1763,7 +1763,7 @@ function _M:customizeOptions(cosmetic_actor, on_exit, title) end function _M:extraOptions() - local options = OptionTree.new(game.extra_birth_option_defs, 'Birth Options', 600, 550) + local options = OptionTree.new(game.extra_birth_option_defs, _t'Birth Options', 600, 550) options:initialize() game:registerDialog(options) end @@ -1787,7 +1787,7 @@ function _M:showCosmeticCustomizer(actor, title, on_end) birther:setDescriptor("subrace", actor.descriptor.subrace) birther:customizeOptions(clone, function() - self:yesnoPopup("Confirm", "Apply the selected cosmetics to "..actor.name.."?", function(ret) if ret then + self:yesnoPopup(_t"Confirm", ("Apply the selected cosmetics to %s?"):tformat(actor:getName()), function(ret) if ret then local oldactor = birther.actor birther.actor = actor birther:applyCosmeticActor(true) diff --git a/game/modules/tome/dialogs/CharacterSheet.lua b/game/modules/tome/dialogs/CharacterSheet.lua index 97ed1017415a7c5a353313a5c94222ecdd3e5157..209e89b237ea7f32e4b00fd6be9fc433c8137a46 100644 --- a/game/modules/tome/dialogs/CharacterSheet.lua +++ b/game/modules/tome/dialogs/CharacterSheet.lua @@ -47,18 +47,18 @@ function _M:init(actor, start_tab) self.font_w, self.font_h = self.font:size(' ') self.font_h = self.font:lineSkip() - Dialog.init(self, "Character Sheet: "..self.actor.name, util.bound(self.font_w*200, game.w*0.5, game.w*0.95), util.bound(self.font_h*36, game.h*.35, game.h*.85)) + Dialog.init(self, ("Character Sheet: %s"):tformat(self.actor:getName()), util.bound(self.font_w*200, game.w*0.5, game.w*0.95), util.bound(self.font_h*36, game.h*.35, game.h*.85)) self.talent_sorting = config.settings.tome.charsheet_talent_sorting or 1 - self.c_general = Tab.new{title="[G]eneral", default=start_tab == "general", fct=function() end, on_change=function(s) if s then self:switchTo("general") end end} - self.c_attack = Tab.new{title="[A]ttack", default=start_tab == "attack", fct=function() end, on_change=function(s) if s then self:switchTo("attack") end end} - self.c_defence = Tab.new{title="[D]efense", default=start_tab == "defense", fct=function() end, on_change=function(s) if s then self:switchTo("defence") end end} - self.c_talents = Tab.new{title="[T]alents", default=start_tab == "talents", fct=function() end, on_change=function(s) if s then self:switchTo("talents") end end } + self.c_general = Tab.new{title=_t"[G]eneral", default=start_tab == "general", fct=function() end, on_change=function(s) if s then self:switchTo("general") end end} + self.c_attack = Tab.new{title=_t"[A]ttack", default=start_tab == "attack", fct=function() end, on_change=function(s) if s then self:switchTo("attack") end end} + self.c_defence = Tab.new{title=_t"[D]efense", default=start_tab == "defense", fct=function() end, on_change=function(s) if s then self:switchTo("defence") end end} + self.c_talents = Tab.new{title=_t"[T]alents", default=start_tab == "talents", fct=function() end, on_change=function(s) if s then self:switchTo("talents") end end } -- Select equipment/switch sets - self.equip_set = self.actor.off_weapon_slots and "off" or "main" - self.c_equipment = Tab.new{title="[E]quipment: "..self.equip_set.." set", default=start_tab == "equipment", + self.equip_set = self.actor.off_weapon_slots and _t"off" or _t"main" + self.c_equipment = Tab.new{title=("[E]quipment: %s set"):tformat(self.equip_set), default=start_tab == "equipment", fct=function() end, on_change=function(s) @@ -68,7 +68,7 @@ function _M:init(actor, start_tab) local switch_set = self.equip_set == "off" and "main" or "off" if self:updateEquipDollRefs(switch_set) then self.equip_set = switch_set - game.logPlayer(self.actor, "#RED#Displaying %s set for %s (equipment NOT switched)", self.equip_set, self.actor.name:capitalize()) + game.logPlayer(self.actor, "#RED#Displaying %s set for %s (equipment NOT switched)", self.equip_set, self.actor:getName():capitalize()) end end self:switchTo("equipment") @@ -77,10 +77,10 @@ function _M:init(actor, start_tab) end } self.c_equipment.generate = function(tab) - tab.title = "[E]quipment: "..self.equip_set.." set" + tab.title = ("[E]quipment: %s set"):tformat(self.equip_set) Tab.generate(tab) end - self.b_talents_sorting = Button.new{text="Sort: "..({"Groups", "Name", "Type"})[self.talent_sorting], hide=true, width=100, fct=function() + self.b_talents_sorting = Button.new{text=("Sort: %s"):tformat(({_t"Groups", _t"Name", _t"Type"})[self.talent_sorting]), hide=true, width=100, fct=function() self.talent_sorting = self.talent_sorting + 1 if self.talent_sorting > 3 then self.talent_sorting = 1 end @@ -88,15 +88,15 @@ function _M:init(actor, start_tab) config.settings.tome.charsheet_talent_sorting = self.talent_sorting game:saveSettings("tome.charsheet_talent_sorting", ("tome.charsheet_talent_sorting = %d\n"):format(self.talent_sorting)) - self.b_talents_sorting.text = "Sort: "..({"Groups", "Name", "Type"})[self.talent_sorting] + self.b_talents_sorting.text = ("Sort: %s"):tformat(({_t"Groups", _t"Name", _t"Type"})[self.talent_sorting]) self.b_talents_sorting:generate() self:switchTo("talents") -- Force a redraw end} - self.b_show_equipment = Button.new{text="Manage [I]nventory", fct=function() + self.b_show_equipment = Button.new{text=_t"Manage [I]nventory", fct=function() self:showInventory() return end} - self.b_levelup = Button.new{text="[L]evelup", fct=function() + self.b_levelup = Button.new{text=_t"[L]evelup", fct=function() game.key:triggerVirtual("LEVELUP") return end} @@ -105,7 +105,7 @@ function _M:init(actor, start_tab) self.vs = Separator.new{dir="vertical", size=self.iw} - self.c_tut = Textzone.new{width=self.iw * 0.6, auto_height=true, no_color_bleed=true, font = self.font, text=[[ + self.c_tut = Textzone.new{width=self.iw * 0.6, auto_height=true, no_color_bleed=true, font = self.font, text=_t[[ Values #00FF00#in brackets ( )#LAST# show changes made from last character sheet checking. Keyboard: #00FF00#'u'#LAST# to save character dump. #00FF00#TAB key#LAST# to switch between tabs. Mouse: Hover over stat for info @@ -120,13 +120,13 @@ Mouse: Hover over stat for info local seconds = game.total_playtime % 60 if days > 0 then - playtime = ("%i day%s %i hour%s %i minute%s %s second%s"):format(days, days > 1 and "s" or "", hours, hours > 1 and "s" or "", minutes, minutes > 1 and "s" or "", seconds, seconds > 1 and "s" or "") + playtime = ("%i %s %i %s %i %s %s %s"):tformat(days, days > 1 and _t"days" or _t"day", hours, hours > 1 and _t"hours" or _t"hour", minutes, minutes > 1 and _t"minutes" or _t"minute", seconds, seconds > 1 and _t"seconds" or _t"second") elseif hours > 0 then - playtime = ("%i hour%s %i minute%s %s second%s"):format(hours, hours > 1 and "s" or "", minutes, minutes > 1 and "s" or "", seconds, seconds > 1 and "s" or "") + playtime = ("%i %s %i %s %s %s"):tformat(hours, hours > 1 and _t"hours" or _t"hour", minutes, minutes > 1 and _t"minutes" or _t"minute", seconds, seconds > 1 and _t"seconds" or _t"second") elseif minutes > 0 then - playtime = ("%i minute%s %s second%s"):format(minutes, minutes > 1 and "s" or "", seconds, seconds > 1 and "s" or "") + playtime = ("%i %s %s %s"):tformat(minutes, minutes > 1 and _t"minutes" or _t"minute", seconds, seconds > 1 and _t"seconds" or _t"second") else - playtime = ("%s second%s"):format(seconds, seconds > 1 and "s" or "") + playtime = ("%s %s"):tformat(seconds, seconds > 1 and _t"seconds" or _t"second") end local all_kills_kind = self.actor.all_kills_kind or {} @@ -134,7 +134,7 @@ Mouse: Hover over stat for info #GOLD#Time playing:#LAST# %s #GOLD#Creatures killed: #ANTIQUE_WHITE#%d #GOLD#Elites/Rares/Bosses killed: #YELLOW#%d/#SALMON#%d/#ORANGE#%d -]]):format( +]]):tformat( game.turn / game.calendar.DAY, game.calendar:getMonthName(game.calendar:getDayOfYear(game.turn)), playtime, @@ -210,16 +210,16 @@ table.merge(_M.immune_types, {negative_status_effect = "negative_status_effect_i planechange = table.NIL_MERGE}) --- specific labels to use for certain immunity types -_M.immune_labels = {poison = "Poison", - disease = "Disease", cut = "Bleed", confusion= "Confusion", - blind = "Blindness", silence = "Silence", disarm = "Disarm", - pin = "Pinning", stun = "Stun/Freeze", sleep = "Sleep", - fear = "Fear", knockback = "Knockback", stone = "Stoning", - instakill = "Instant death", teleport = "Teleportation", - negative_status_effect = "#GOLD#All Status ", - mental_negative_status_effect = "#ORANGE#Mental Status ", - physical_negative_status_effect = "#ORANGE#Physical Status", - spell_negative_status_effect = "#ORANGE#Magical Status ", +_M.immune_labels = {poison = _t"Poison", + disease = _t"Disease", cut = _t"Bleed", confusion= _t"Confusion", + blind = _t"Blindness", silence = _t"Silence", disarm = _t"Disarm", + pin = _t"Pinning", stun = _t"Stun/Freeze", sleep = _t"Sleep", + fear = _t"Fear", knockback = _t"Knockback", stone = _t"Stoning", + instakill = _t"Instant death", teleport = _t"Teleportation", + negative_status_effect = _t"#GOLD#All Status ", + mental_negative_status_effect = _t"#ORANGE#Mental Status ", + physical_negative_status_effect = _t"#ORANGE#Physical Status", + spell_negative_status_effect = _t"#ORANGE#Magical Status ", } --- specific tooltips to use for certain immunity types @@ -429,7 +429,7 @@ end function _M:showInventory() if not config.settings.cheat and (self.actor.no_inventory_access or not self.actor.player) then return end local d - local titleupdator = self.actor:getEncumberTitleUpdator("Inventory") + local titleupdator = self.actor:getEncumberTitleUpdator(_t"Inventory") local offset = self.actor.off_weapon_slots d = require("mod.dialogs.ShowEquipInven").new(titleupdator(), self.actor, nil, function(o, inven, item, button, event) @@ -479,11 +479,11 @@ function _M:drawDialog(kind, actor_to_compare) if player.__te4_uuid and profile.auth and profile.auth.drupid and not config.settings.disable_all_connectivity and config.settings.tome.upload_charsheet then local path = "https://te4.org/characters/"..profile.auth.drupid.."/tome/"..player.__te4_uuid - local LinkTxt = "Online URL: #LIGHT_BLUE##{underline}#"..path.."#{normal}#" + local LinkTxt = ("Online URL: #LIGHT_BLUE##{underline}#%s#{normal}#"):tformat(path) local Link_w, Link_h = self.font:size(LinkTxt) h = self.c_desc.h - Link_h w = (self.c_desc.w - Link_w) * 0.5 - self:mouseLink(path, "You can find your character sheet online", s:drawColorStringBlended(self.font, LinkTxt, w, h, 255, 255, 255, true)) + self:mouseLink(path, _t"You can find your character sheet online", s:drawColorStringBlended(self.font, LinkTxt, w, h, 255, 255, 255, true)) end local compare_fields = function(item1, item2, field, outformat, diffoutformat, mod, isinversed, nobracets, ...) @@ -601,30 +601,30 @@ function _M:drawDialog(kind, actor_to_compare) local cur_exp, max_exp = player.exp, player:getExpChart(player.level+1) h = 0 w = 0 - s:drawStringBlended(self.font, "Sex : "..((player.descriptor and player.descriptor.sex) or (player.female and "Female" or "Male")), w, h, 0, 200, 255, true) h = h + self.font_h - s:drawStringBlended(self.font, (player.descriptor and "Race : " or "Type : ")..((player.descriptor and player.descriptor.subrace) or player.type:capitalize()), w, h, 0, 200, 255, true) h = h + self.font_h + s:drawStringBlended(self.font, _t"Sex : "..((player.descriptor and _t(player.descriptor.sex)) or (player.female and _t"Female" or _t"Male")), w, h, 0, 200, 255, true) h = h + self.font_h + s:drawStringBlended(self.font, (player.descriptor and _t"Race : " or _t"Type : ")..((player.descriptor and _t(player.descriptor.subrace)) or _t(player.type):capitalize()), w, h, 0, 200, 255, true) h = h + self.font_h local class_evo = "" if player.descriptor and player.descriptor.class_evolution then class_evo = " ("..player.descriptor.class_evolution..")" end - s:drawStringBlended(self.font, (player.descriptor and "Class: " or "Stype: ")..((player.descriptor and player.descriptor.subclass) or player.subtype:capitalize())..class_evo, w, h, 0, 200, 255, true) + s:drawStringBlended(self.font, (player.descriptor and _t"Class: " or _t"Stype: ")..((player.descriptor and _t(player.descriptor.subclass or "")) or _t(player.subtype):capitalize())..class_evo, w, h, 0, 200, 255, true) if player:attr("forbid_arcane") then - local follow = (player.faction == "zigur" or player:attr("zigur_follower")) and "Zigur follower" or "Antimagic adherent" + local follow = (player.faction == "zigur" or player:attr("zigur_follower")) and _t"Zigur follower" or _t"Antimagic adherent" self:mouseTooltip(self.TOOLTIP_ANTIMAGIC_USER, s:drawColorStringBlended(self.font, "#ORCHID#"..follow, w+200, h, 255, 255, 255, true)) end h = h + self.font_h - s:drawStringBlended(self.font, "Size : "..(player:TextSizeCategory():capitalize()), w, h, 0, 200, 255, true) h = h + self.font_h + s:drawStringBlended(self.font, _t"Size : "..(player:TextSizeCategory():capitalize()), w, h, 0, 200, 255, true) h = h + self.font_h h = h + self.font_h - self:mouseTooltip(self.TOOLTIP_LEVEL, s:drawColorStringBlended(self.font, "Level: #00ff00#"..player.level, w, h, 255, 255, 255, true)) h = h + self.font_h - self:mouseTooltip(self.TOOLTIP_LEVEL, s:drawColorStringBlended(self.font, ("Exp : #00ff00#%2d%%"):format(100 * cur_exp / max_exp), w, h, 255, 255, 255, true)) h = h + self.font_h - self:mouseTooltip(self.TOOLTIP_GOLD, s:drawColorStringBlended(self.font, ("Gold : #00ff00#%0.2f"):format(player.money), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_LEVEL, s:drawColorStringBlended(self.font, ("Level: #00ff00#%d"):tformat(player.level), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_LEVEL, s:drawColorStringBlended(self.font, ("Exp : #00ff00#%2d%%"):tformat(100 * cur_exp / max_exp), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_GOLD, s:drawColorStringBlended(self.font, ("Gold : #00ff00#%0.2f"):tformat(player.money), w, h, 255, 255, 255, true)) h = h + self.font_h h = h + self.font_h - s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Resources:", w, h, 255, 255, 255, true) h = h + self.font_h - text = compare_fields(player, actor_to_compare, "max_life", "%d", "%+.0f max") + s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Resources:", w, h, 255, 255, 255, true) h = h + self.font_h + text = compare_fields(player, actor_to_compare, "max_life", "%d", _t"%+.0f max") if player.die_at ~= 0 or (actor_to_compare and actor_to_compare.die_at ~=0) then - text = text .. " #a08080#[" .. compare_fields(player, actor_to_compare, "die_at", "die:%+d","%+.0f", 1, true) .. "]" + text = text .. " #a08080#[" .. compare_fields(player, actor_to_compare, "die_at", _t"die:%+d","%+.0f", 1, true) .. "]" end - self:mouseTooltip(self.TOOLTIP_LIFE, s:drawColorStringBlended(self.font, ("#c00000#Life : #00ff00#%d/%s"):format(player.life, text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_LIFE, s:drawColorStringBlended(self.font, ("#c00000#Life : #00ff00#%d/%s"):tformat(player.life, text), w, h, 255, 255, 255, true)) h = h + self.font_h -- general resources for res, res_def in ipairs(player.resources_def) do @@ -636,11 +636,11 @@ function _M:drawDialog(kind, actor_to_compare) val_text = status_text(player, actor_to_compare, compare_fields) else -- generate std. status text local show_min = not player[res_def.getMaxFunction](player) and player[res_def.getMinFunction](player) - text = compare_fields(player, actor_to_compare, function(act) return act[show_min and res_def.getMinFunction or res_def.getMaxFunction](act) or 0 end, "%d", "%+.0f "..(show_min and "min" or "max"), nil, show_min) + text = compare_fields(player, actor_to_compare, function(act) return act[show_min and res_def.getMinFunction or res_def.getMaxFunction](act) or 0 end, "%d", "%+.0f "..(show_min and _t"min" or _t"max"), nil, show_min) val_text = ("%d/%s"):format(player[res_def.getFunction](player), text) end local tt = self["TOOLTIP_"..rname:upper()] or ([[#GOLD#%s#LAST# -%s]]):format(res_def.name, res_def.description or "No Description") +%s]]):format(res_def.name, res_def.description or _t"No Description") -- display regen property if present if (player[res_def.regen_prop] and player[res_def.regen_prop] ~= 0) or (actor_to_compare and actor_to_compare[res_def.regen_prop] and actor_to_compare[res_def.regen_prop] ~= 0) then @@ -649,10 +649,10 @@ function _M:drawDialog(kind, actor_to_compare) reg_text = compare_fields(player, actor_to_compare, function(act) return act[res_def.regen_prop] or 0 end, reg_fmt, reg_fmt, nil, res_def.invert_values) reg_text = ((player[res_def.regen_prop] or 0)*(res_def.invert_values and -1 or 1) >= 0 and "#LIGHT_GREEN#" or "#LIGHT_RED#")..reg_text.."#LAST#" end - self:mouseTooltip(tt, s:drawColorStringBlended(self.font, ("%s%-8.8s: #00ff00#%s "):format(res_def.color or "#WHITE#", res_def.name, val_text), w, h, 255, 255, 255, true)) + self:mouseTooltip(tt, s:drawColorStringBlended(self.font, ("%s%-8.8s: #00ff00#%s "):tformat(res_def.color or "#WHITE#", res_def.name, val_text), w, h, 255, 255, 255, true)) if reg_text then tt = ([[#GOLD#%s Recovery/Depletion#LAST# -The amount of %s automatically gained or lost each turn.]]):format(res_def.name, res_def.name:lower()) +The amount of %s automatically gained or lost each turn.]]):tformat(res_def.name, res_def.name:lower()) self:mouseTooltip(tt, s:drawColorStringBlended(self.font, " "..reg_text, self.w*.17, h, 255, 255, 255, true)) end h = h + self.font_h @@ -662,8 +662,8 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, -- special resources if player:getMaxFeedback() > 0 then text = compare_fields(player, actor_to_compare, "psionic_feedback_max", "%d", "%+.0f") - local tt = self.TOOLTIP_FEEDBACK..("Current Feedback gain is %0.1f%% of damage taken."):format(player:callTalent(player.T_FEEDBACK_POOL, "getFeedbackRatio")*100) - self:mouseTooltip(tt, s:drawColorStringBlended(self.font, ("#7fffd4#Feedback: #00ff00#%d/%s"):format(player:getFeedback(), text), w, h, 255, 255, 255, true)) + local tt = self.TOOLTIP_FEEDBACK..("Current Feedback gain is %0.1f%% of damage taken."):tformat(player:callTalent(player.T_FEEDBACK_POOL, "getFeedbackRatio")*100) + self:mouseTooltip(tt, s:drawColorStringBlended(self.font, ("#7fffd4#Feedback: #00ff00#%d/%s"):tformat(player:getFeedback(), text), w, h, 255, 255, 255, true)) local decay_text = compare_fields(player, actor_to_compare, function(act) return act:getFeedbackDecay() end, (player:getFeedbackDecay() > 0 and "#LIGHT_RED#" or "#LIGHT_GREEN#").."%+0.1f", "%+.1f", -1, true) if decay_text then self:mouseTooltip(tt, s:drawColorStringBlended(self.font, " "..decay_text, self.w*.17, h, 255, 255, 255, true)) @@ -676,85 +676,85 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, h = 0 w = self.w * 0.25 - s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Speeds:", w, h, 255, 255, 255, true) h = h + self.font_h + s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Speeds:", w, h, 255, 255, 255, true) h = h + self.font_h local color = player.global_speed color = color >= 1 and "#LIGHT_GREEN#" or "#LIGHT_RED#" text = compare_fields(player, actor_to_compare, "global_speed", color.."%.1f%%", "%+.1f%%",100) - self:mouseTooltip(self.TOOLTIP_SPEED_GLOBAL, s:drawColorStringBlended(self.font, ("Global speed : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SPEED_GLOBAL, s:drawColorStringBlended(self.font, ("Global speed : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h color = 1/player:getSpeed("movement") color = color >= 1 and "#LIGHT_GREEN#" or "#LIGHT_RED#" text = compare_fields(player, actor_to_compare, function(actor) return (1/actor:getSpeed("movement")) end, color.."%.1f%%", "%+.1f%%", 100) - self:mouseTooltip(self.TOOLTIP_SPEED_MOVEMENT, s:drawColorStringBlended(self.font, ("Movement speed: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SPEED_MOVEMENT, s:drawColorStringBlended(self.font, ("Movement speed: #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h color = 1/player:getSpeed("spell") color = color >= 1 and "#LIGHT_GREEN#" or "#LIGHT_RED#" text = compare_fields(player, actor_to_compare, function(actor, ...) return 1/actor:getSpeed("spell") end, color.."%.1f%%", "%+.1f%%", 100) - self:mouseTooltip(self.TOOLTIP_SPEED_SPELL, s:drawColorStringBlended(self.font, ("Spell speed : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SPEED_SPELL, s:drawColorStringBlended(self.font, ("Spell speed : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h color = 1/player:getSpeed("weapon") color = color >= 1 and "#LIGHT_GREEN#" or "#LIGHT_RED#" text = compare_fields(player, actor_to_compare, function(actor, ...) return 1/actor:getSpeed("weapon") end, color.."%.1f%%", "%+.1f%%", 100) - self:mouseTooltip(self.TOOLTIP_SPEED_ATTACK, s:drawColorStringBlended(self.font, ("Attack speed : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SPEED_ATTACK, s:drawColorStringBlended(self.font, ("Attack speed : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h color = 1/player:getSpeed("mind") color = color >= 1 and "#LIGHT_GREEN#" or "#LIGHT_RED#" text = compare_fields(player, actor_to_compare, function(actor, ...) return 1/actor:getSpeed("mind") end, color.."%.1f%%", "%+.1f%%", 100) - self:mouseTooltip(self.TOOLTIP_SPEED_MENTAL, s:drawColorStringBlended(self.font, ("Mental speed : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SPEED_MENTAL, s:drawColorStringBlended(self.font, ("Mental speed : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h h = h + self.font_h if player.died_times then text = compare_fields(player, actor_to_compare, function(actor) return #actor.died_times end, "%3d", "%+.0f") - self:mouseTooltip(self.TOOLTIP_LIVES, s:drawColorStringBlended(self.font, ("Times died : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) + self:mouseTooltip(self.TOOLTIP_LIVES, s:drawColorStringBlended(self.font, ("Times died : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) if player:attr("blood_life") then - self:mouseTooltip(self.TOOLTIP_BLOOD_LIFE, s:drawColorStringBlended(self.font, "#DARK_RED#Blood of Life", w+200, h, 255, 255, 255, true)) + self:mouseTooltip(self.TOOLTIP_BLOOD_LIFE, s:drawColorStringBlended(self.font, _t"#DARK_RED#Blood of Life", w+200, h, 255, 255, 255, true)) end h = h + self.font_h end if player.easy_mode_lifes then text = compare_fields(player, actor_to_compare, "easy_mode_lifes", "%3d", "%+.0f") - self:mouseTooltip(self.TOOLTIP_LIVES, s:drawColorStringBlended(self.font, ("Lives left : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_LIVES, s:drawColorStringBlended(self.font, ("Lives left : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end color = player.healing_factor color = color >= 1 and "#LIGHT_GREEN#" or "#LIGHT_RED#" text = compare_fields(player, actor_to_compare, function(actor) return util.bound((actor.healing_factor or 1), 0, 2.5) end, color.."%.1f%%", "%+.1f%%", 100) - self:mouseTooltip(self.TOOLTIP_HEALING_MOD, s:drawColorStringBlended(self.font, ("Healing mod. : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_HEALING_MOD, s:drawColorStringBlended(self.font, ("Healing mod. : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h color = player.life_regen color = color >= 0 and "#LIGHT_GREEN#" or "#LIGHT_RED#" text = compare_fields(player, actor_to_compare, "life_regen", color.."%.1f", "%+.1f") - self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("Life regen : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("Life regen : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor) return actor.life_regen * util.bound((actor.healing_factor or 1), 0, 2.5) end, "%.2f", "%+.2f") - self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("(with heal mod): #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("(with heal mod): #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h h = h + self.font_h - s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Vision:", w, h, 255, 255, 255, true) h = h + self.font_h + s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Vision:", w, h, 255, 255, 255, true) h = h + self.font_h text = compare_fields(player, actor_to_compare, "lite", "%d", "%+.0f") if text then - self:mouseTooltip(self.TOOLTIP_VISION_LITE, s:drawColorStringBlended(self.font, ("Light radius : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_VISION_LITE, s:drawColorStringBlended(self.font, ("Light radius : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end text = compare_fields(player, actor_to_compare, "sight", "%d", "%+.0f") if text then - self:mouseTooltip(self.TOOLTIP_VISION_SIGHT, s:drawColorStringBlended(self.font, ("Vision range : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_VISION_SIGHT, s:drawColorStringBlended(self.font, ("Vision range : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end text = compare_fields(player, actor_to_compare, function(actor) return (actor:attr("infravision") or actor:attr("heightened_senses")) and math.max((actor.heightened_senses or 0), (actor.infravision or 0)) end, "%d", "%+.0f") if text then - self:mouseTooltip(self.TOOLTIP_VISION_INFRA, s:drawColorStringBlended(self.font, ("Heighten Senses: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_VISION_INFRA, s:drawColorStringBlended(self.font, ("Heighten Senses: #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end text = compare_fields(player, actor_to_compare, function(actor) return actor:attr("see_traps") and (actor:attr("see_traps") or 0) end, "%.1f", "%+.1f") if text then - self:mouseTooltip(self.TOOLTIP_SEE_TRAPS, s:drawColorStringBlended(self.font, ("Detect Traps : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SEE_TRAPS, s:drawColorStringBlended(self.font, ("Detect Traps : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end text = compare_fields(player, actor_to_compare, function(who) return who:attr("stealth") and who.stealth + (who:attr("inc_stealth") or 0) end, "%.1f", "%+.1f") if text then - self:mouseTooltip(self.TOOLTIP_VISION_STEALTH, s:drawColorStringBlended(self.font, ("Stealth : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_VISION_STEALTH, s:drawColorStringBlended(self.font, ("Stealth : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end text = compare_fields(player, actor_to_compare, function(actor) return actor:combatSeeStealth() end, "%.1f", "%+.1f") if text then - self:mouseTooltip(self.TOOLTIP_VISION_SEE_STEALTH, s:drawColorStringBlended(self.font, ("See stealth : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_VISION_SEE_STEALTH, s:drawColorStringBlended(self.font, ("See stealth : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end text = compare_fields(player, actor_to_compare, "invisible", "%.1f", "%+.1f") if text then - self:mouseTooltip(self.TOOLTIP_VISION_INVISIBLE, s:drawColorStringBlended(self.font, ("Invisibility : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_VISION_INVISIBLE, s:drawColorStringBlended(self.font, ("Invisibility : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end text = compare_fields(player, actor_to_compare, function(actor) return actor:combatSeeInvisible() end, "%.1f", "%+.1f") if text then - self:mouseTooltip(self.TOOLTIP_VISION_SEE_INVISIBLE, s:drawColorStringBlended(self.font, ("See invisible : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_VISION_SEE_INVISIBLE, s:drawColorStringBlended(self.font, ("See invisible : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end local any_esp = false @@ -786,7 +786,7 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, if any_esp then text = compare_fields(player, actor_to_compare, "esp_range", "%d", "%+.0f") if text then - self:mouseTooltip(self.TOOLTIP_ESP_RANGE, s:drawColorStringBlended(self.font, ("Telepathy range: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_ESP_RANGE, s:drawColorStringBlended(self.font, ("Telepathy range: #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end end @@ -797,7 +797,7 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, h = 0 w = self.w * 0.5 - self:mouseTooltip(self.TOOLTIP_STATS, s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Stats: Base/Current", w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_STATS, s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Stats: Base/Current", w, h, 255, 255, 255, true)) h = h + self.font_h local print_stat = function(stat, name, tooltip) local StatVal = player:getStat(stat, nil, nil, true) local StatTxt = "" @@ -824,7 +824,7 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, local nb_inscriptions = 0 for i = 1, player.max_inscriptions do if player.inscriptions[i] then nb_inscriptions = nb_inscriptions + 1 end end - self:mouseTooltip(self.TOOLTIP_INSCRIPTIONS, s:drawColorStringBlended(self.font, ("#AQUAMARINE#Inscriptions (%d/%d)"):format(nb_inscriptions, player.max_inscriptions), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_INSCRIPTIONS, s:drawColorStringBlended(self.font, ("#AQUAMARINE#Inscriptions (%d/%d)"):tformat(nb_inscriptions, player.max_inscriptions), w, h, 255, 255, 255, true)) h = h + self.font_h for i = 1, player.max_inscriptions do if player.inscriptions[i] then local t = player:getTalentFromId("T_"..player.inscriptions[i]) local desc = player:getTalentFullDescription(t) @@ -833,19 +833,19 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, if any_esp then h = h + self.font_h - self:mouseTooltip(self.TOOLTIP_ESP, s:drawColorStringBlended(self.font, ("Telepathy of: "), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_ESP, s:drawColorStringBlended(self.font, _t("Telepathy of: "), w, h, 255, 255, 255, true)) h = h + self.font_h if not esps_compare["All"] or not esps_compare["All"][2] or esps_compare["All"][2] == 0 then for type, v in pairs(esps_compare) do - self:mouseTooltip(self.TOOLTIP_ESP, s:drawColorStringBlended(self.font, ("%s%s "):format(v[2] and (v[1] and "#GOLD#" or "#00ff00#") or "#ff0000#", type:capitalize()), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_ESP, s:drawColorStringBlended(self.font, ("%s%s "):format(v[2] and (v[1] and "#GOLD#" or "#00ff00#") or "#ff0000#", string.ttype(type, "entity"):capitalize()), w, h, 255, 255, 255, true)) h = h + self.font_h end else - self:mouseTooltip(self.TOOLTIP_ESP_ALL, s:drawColorStringBlended(self.font, ("%sAll "):format(esps_compare["All"][2] and (esps_compare["All"][1] and "#GOLD#" or "#00ff00#") or "#ff0000#"), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_ESP_ALL, s:drawColorStringBlended(self.font, ("%sAll "):tformat(esps_compare["All"][2] and (esps_compare["All"][1] and "#GOLD#" or "#00ff00#") or "#ff0000#"), w, h, 255, 255, 255, true)) h = h + self.font_h end end h = 0 w = self.w * 0.77 - s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Current effects:", w, h, 255, 255, 255, true) h = h + self.font_h + s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Current effects:", w, h, 255, 255, 255, true) h = h + self.font_h for tid, act in pairs(player.sustain_talents) do if act then local t = player:getTalentFromId(tid) @@ -873,43 +873,43 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, local combatc = actor_to_compare and actor_to_compare:getCombatStats(type, inven_id, item) or {} local color local weap_type = combat.talented or table.get(combat.mean, "talented") - local text2 = (combat.obj and combat.obj.slot_forbid == "OFFHAND" and "Two-Handed, " or "")..(weap_type and weap_type or "") - s:drawColorStringBlended(self.font, (text or "Weapon")..(weap_type and " ("..text2..")" or "")..":", w, h, 255, 255, 255, true) h = h + self.font_h + local text2 = (combat.obj and combat.obj.slot_forbid == "OFFHAND" and _t"Two-Handed, " or "")..(weap_type and _t(weap_type) or "") + s:drawColorStringBlended(self.font, (text or _t"Weapon")..(weap_type and " ("..text2..")" or "")..":", w, h, 255, 255, 255, true) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor == actor_to_compare and combatc.atk or combat.atk end, "%3d", "%+.0f", 1, false, false, mean, dam) - self:mouseTooltip(self.TOOLTIP_COMBAT_ATTACK, s:drawColorStringBlended(self.font, ("Accuracy : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_COMBAT_ATTACK, s:drawColorStringBlended(self.font, ("Accuracy : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor == actor_to_compare and combatc.dmg or combat.dmg end, "%3d", "%+.0f", 1, false, false, dam) - self:mouseTooltip(self.TOOLTIP_COMBAT_DAMAGE, s:drawColorStringBlended(self.font, ("Damage : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) + self:mouseTooltip(self.TOOLTIP_COMBAT_DAMAGE, s:drawColorStringBlended(self.font, ("Damage : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) if combat.block then -- or combatc and combatc.block then text = compare_fields(player, actor_to_compare, function(actor, ...) return actor == actor_to_compare and ((combatc.block or 0) + (actor:attr("block_bonus") or 0)) or ((combat.block or 0) + (actor:attr("block_bonus") or 0)) end, "%3d", "%+.0f", 1, false, false, dam) - self:mouseTooltip(self.TOOLTIP_COMBAT_BLOCK, s:drawColorStringBlended(self.font, ("Block : #00ff00#%s"):format(text), self.w*.14, h, 255, 255, 255, true))-- h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_COMBAT_BLOCK, s:drawColorStringBlended(self.font, ("Block : #00ff00#%s"):tformat(text), self.w*.14, h, 255, 255, 255, true))-- h = h + self.font_h end h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor == actor_to_compare and combatc.apr or combat.apr end, "%3d", "%+.0f", 1, false, false, dam) - self:mouseTooltip(self.TOOLTIP_COMBAT_APR, s:drawColorStringBlended(self.font, ("APR : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_COMBAT_APR, s:drawColorStringBlended(self.font, ("APR : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor == actor_to_compare and combatc.crit or combat.crit end, "%3d%%", "%+.0f%%", 1, false, false, dam) - self:mouseTooltip(self.TOOLTIP_COMBAT_CRIT, s:drawColorStringBlended(self.font, ("Crit. chance : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_COMBAT_CRIT, s:drawColorStringBlended(self.font, ("Crit. chance : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h if combat.crit_power and combat.crit_power ~= 0 or combatc.crit_power and combatc.crit_power ~= 0 then text = compare_fields(player, actor_to_compare, function(actor, ...) return 150 + (actor.combat_critical_power or 0) + (actor == actor_to_compare and combatc.crit_power or combat.crit_power) end, "%3d%%", "%+.0f%%", 1, false, false, dam) - self:mouseTooltip(self.TOOLTIP_INC_CRIT_POWER, s:drawColorStringBlended(self.font, ("Crit. power : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_INC_CRIT_POWER, s:drawColorStringBlended(self.font, ("Crit. power : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end color = combat.aspeed color = color >= 1 and "#LIGHT_GREEN#" or "#LIGHT_RED#" text = compare_fields(player, actor_to_compare, function(actor, ...) return actor == actor_to_compare and combatc.aspeed or combat.aspeed end, color.."%.1f%%", "%+.1f%%", 100, false, false, mean) - self:mouseTooltip(self.TOOLTIP_COMBAT_SPEED, s:drawColorStringBlended(self.font, ("Attack Speed : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_COMBAT_SPEED, s:drawColorStringBlended(self.font, ("Attack Speed : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h if combat.archery then -- display range and projectile speed - text = compare_fields(player, actor_to_compare, function(actor, ...) return actor == actor_to_compare and combatc.range or combat.range end, "range %2d", "%+d", 1, false, false, mean) - local text2 = compare_fields(player, actor_to_compare, function(actor, ...) return actor == actor_to_compare and combatc.mspeed or combat.mspeed end, "speed %3d%%", "%+.0f%%", 100, false, false, dam) - self:mouseTooltip(self.TOOLTIP_ARCHERY_RANGE_SPEED, s:drawColorStringBlended(self.font, ("Archery : #00ff00#%s, %s"):format(text, text2), w, h, 255, 255, 255, true)) h = h + self.font_h + text = compare_fields(player, actor_to_compare, function(actor, ...) return actor == actor_to_compare and combatc.range or combat.range end, _t"range %2d", "%+d", 1, false, false, mean) + local text2 = compare_fields(player, actor_to_compare, function(actor, ...) return actor == actor_to_compare and combatc.mspeed or combat.mspeed end, _t"speed %3d%%", "%+.0f%%", 100, false, false, dam) + self:mouseTooltip(self.TOOLTIP_ARCHERY_RANGE_SPEED, s:drawColorStringBlended(self.font, ("Archery : #00ff00#%s, %s"):tformat(text, text2), w, h, 255, 255, 255, true)) h = h + self.font_h end end @@ -919,10 +919,10 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, if mainhand and (#mainhand > 0) and not player:attr("disarmed") then for i, o in ipairs(player:getInven(player.INVEN_MAINHAND)) do if not double_weapon and o.double_weapon then double_weapon = i end - display_combat_stats("#LIGHT_BLUE#Main Hand", player, actor_to_compare, player.INVEN_MAINHAND, "mainhand", i) h = h + self.font_h + display_combat_stats(_t"#LIGHT_BLUE#Main Hand", player, actor_to_compare, player.INVEN_MAINHAND, "mainhand", i) h = h + self.font_h end else -- Handle bare-handed combat - display_combat_stats("#LIGHT_BLUE#Unarmed", player, actor_to_compare, player.INVEN_MAINHAND, "barehand", 1) h = h + self.font_h + display_combat_stats(_t"#LIGHT_BLUE#Unarmed", player, actor_to_compare, player.INVEN_MAINHAND, "barehand", 1) h = h + self.font_h end -- All weapons in off hands -- Most offhand attacks are with a damage penalty, that can be reduced by talents @@ -930,48 +930,48 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, if player:getInven(player.INVEN_OFFHAND) then for i, o in ipairs(player:getInven(player.INVEN_OFFHAND)) do count = count + 1 - display_combat_stats("#LIGHT_BLUE#Offhand"..(player:attr("disarmed") and " (disabled)" or ""), player, actor_to_compare, player.INVEN_OFFHAND, "offhand", i) h = h + self.font_h + display_combat_stats(("#LIGHT_BLUE#Offhand%s"):tformat(player:attr("disarmed") and _t" (disabled)" or ""), player, actor_to_compare, player.INVEN_OFFHAND, "offhand", i) h = h + self.font_h end end -- special case: double weapon in mainhand if double_weapon and count == 0 then - display_combat_stats("#LIGHT_BLUE#Offhand-Dual Weapon"..(player:attr("disarmed") and " (disabled)" or ""), player, actor_to_compare, player.INVEN_MAINHAND, "offhand", double_weapon) h = h + self.font_h + display_combat_stats(("#LIGHT_BLUE#Offhand-Dual Weapon%s"):tformat(player:attr("disarmed") and _t" (disabled)" or ""), player, actor_to_compare, player.INVEN_MAINHAND, "offhand", double_weapon) h = h + self.font_h end -- Psionic Focus weapon if present (only 1 slot) if player:getInven(player.INVEN_PSIONIC_FOCUS) and player:attr("psi_focus_combat") then - display_combat_stats("#LIGHT_BLUE#Psionic Focus", player, actor_to_compare, player.INVEN_PSIONIC_FOCUS, "psionic", 1) h = h + self.font_h + display_combat_stats(_t"#LIGHT_BLUE#Psionic Focus", player, actor_to_compare, player.INVEN_PSIONIC_FOCUS, "psionic", 1) h = h + self.font_h end h = 0 w = self.w * 0.25 - s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Physical:", w, h, 255, 255, 255, true) h = h + self.font_h + s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Physical:", w, h, 255, 255, 255, true) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatPhysicalpower() end, "%3d", "%+.0f") - self:mouseTooltip(self.TOOLTIP_PHYSICAL_POWER, s:drawColorStringBlended(self.font, ("Phys. Power: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_PHYSICAL_POWER, s:drawColorStringBlended(self.font, ("Phys. Power: #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatCrit() end, "%d%%", "%+.0f%%") - self:mouseTooltip(self.TOOLTIP_PHYSICAL_CRIT, s:drawColorStringBlended(self.font, ("Crit. chance: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_PHYSICAL_CRIT, s:drawColorStringBlended(self.font, ("Crit. chance: #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h h = h + self.font_h - s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Magical:", w, h, 255, 255, 255, true) h = h + self.font_h + s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Magical:", w, h, 255, 255, 255, true) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatSpellpower() end, "%3d", "%+.0f") - self:mouseTooltip(self.TOOLTIP_SPELL_POWER, s:drawColorStringBlended(self.font, ("Spellpower : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SPELL_POWER, s:drawColorStringBlended(self.font, ("Spellpower : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatSpellCrit() end, "%d%%", "%+.0f%%") - self:mouseTooltip(self.TOOLTIP_SPELL_CRIT, s:drawColorStringBlended(self.font, ("Crit. chance: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SPELL_CRIT, s:drawColorStringBlended(self.font, ("Crit. chance: #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h color = 1/player:combatSpellSpeed() color = color >= 1 and "#LIGHT_GREEN#" or "#LIGHT_RED#" text = compare_fields(player, actor_to_compare, function(actor, ...) return 1/actor:combatSpellSpeed() end, color.."%.1f%%", "%+.1f%%", 100) - self:mouseTooltip(self.TOOLTIP_SPELL_SPEED, s:drawColorStringBlended(self.font, ("Spell speed : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SPELL_SPEED, s:drawColorStringBlended(self.font, ("Spell speed : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return (1 - (actor.spell_cooldown_reduction or 0)) * 100 end, "%3d%%", "%+.0f%%", nil, true) - self:mouseTooltip(self.TOOLTIP_SPELL_COOLDOWN , s:drawColorStringBlended(self.font, ("Spell cooldown: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SPELL_COOLDOWN , s:drawColorStringBlended(self.font, ("Spell cooldown: #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h h = h + self.font_h - s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Mental:", w, h, 255, 255, 255, true) h = h + self.font_h + s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Mental:", w, h, 255, 255, 255, true) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatMindpower() end, "%3d", "%+.0f") dur_text = ("%d"):format(math.floor(player:combatMindpower()/5)) - self:mouseTooltip(self.TOOLTIP_MINDPOWER, s:drawColorStringBlended(self.font, ("Mindpower: #00ff00#%s"):format(text, dur_text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_MINDPOWER, s:drawColorStringBlended(self.font, ("Mindpower: #00ff00#%s"):tformat(text, dur_text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatMindCrit() end, "%d%%", "%+.0f%%") - self:mouseTooltip(self.TOOLTIP_MIND_CRIT, s:drawColorStringBlended(self.font, ("Crit. chance: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_MIND_CRIT, s:drawColorStringBlended(self.font, ("Crit. chance: #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h color = 1/player:combatMindSpeed() color = color >= 1 and "#LIGHT_GREEN#" or "#LIGHT_RED#" text = compare_fields(player, actor_to_compare, function(actor, ...) return 1/actor:combatMindSpeed() end, color.."%.1f%%", "%+.1f%%", 100) - self:mouseTooltip(self.TOOLTIP_MIND_SPEED, s:drawColorStringBlended(self.font, ("Mind speed : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_MIND_SPEED, s:drawColorStringBlended(self.font, ("Mind speed : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h -- Hook to display additional types of attack power local hd = {"CharacterSheet:Attack:power", player=player, actor_to_compare=actor_to_compare, h=h, w=w, s=s, compare_fields = compare_fields} @@ -982,13 +982,13 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, h = 0 w = self.w * 0.5 - s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Damage Modifiers:", w, h, 255, 255, 255, true) h = h + self.font_h + s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Damage Modifiers:", w, h, 255, 255, 255, true) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return 150 + (actor.combat_critical_power or 0) end, "%3d%%", "%+.0f%%") - self:mouseTooltip(self.TOOLTIP_INC_CRIT_POWER , s:drawColorStringBlended(self.font, ("Critical mult.: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_INC_CRIT_POWER , s:drawColorStringBlended(self.font, ("Critical mult.: #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h if player.inc_damage.all and player.inc_damage.all ~= 0 or (actor_to_compare and actor_to_compare.inc_damage.all and actor_to_compare.inc_damage.all ~= 0) then text = compare_fields(player, actor_to_compare, function(actor, ...) return actor.inc_damage and actor.inc_damage.all or 0 end, "%3d%%", "%+.0f%%") - self:mouseTooltip(self.TOOLTIP_INC_DAMAGE_ALL, s:drawColorStringBlended(self.font, ("All damage : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_INC_DAMAGE_ALL, s:drawColorStringBlended(self.font, ("All damage : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end -- Specific Damage type increases @@ -1012,7 +1012,7 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, local valo = actor_to_compare and actor_to_compare.inc_damage_actor_type and actor_to_compare.inc_damage_actor_type[t] or 0 if valn~=0 or valo~=0 then text = compare_fields(player, actor_to_compare, function(actor, ...) return actor == player and valn or actor == actor_to_compare and valo or 0 end, "%+3d%%", "%+.0f%%") - self:mouseTooltip(self.TOOLTIP_INC_DAMAGE_ACTOR, s:drawColorStringBlended(self.font, ("%s%-20s: #00ff00#%s"):format("#ORANGE#", "vs "..t:capitalize().."#LAST#", text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_INC_DAMAGE_ACTOR, s:drawColorStringBlended(self.font, ("%s%-20s: #00ff00#%s"):format("#ORANGE#", _t"vs ".._t(t):capitalize().."#LAST#", text), w, h, 255, 255, 255, true)) h = h + self.font_h end end end @@ -1020,14 +1020,14 @@ The amount of %s automatically gained or lost each turn.]]):format(res_def.name, h = 0 w = self.w * 0.75 --Resist penetration - text=[[#GOLD#Restance Penetration#LAST# + text=_t[[#GOLD#Restance Penetration#LAST# Ability to reduce opponent resistances to your damage]] - self:mouseTooltip(text, s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Damage penetration:", w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(text, s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Damage penetration:", w, h, 255, 255, 255, true)) h = h + self.font_h if player.resists_pen.all then text = compare_fields(player, actor_to_compare, function(actor, ...) return actor.resists_pen and actor.resists_pen.all or 0 end, "%3d%%", "%+.0f%%") - self:mouseTooltip(self.TOOLTIP_RESISTS_PEN_ALL, s:drawColorStringBlended(self.font, ("All damage : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_RESISTS_PEN_ALL, s:drawColorStringBlended(self.font, ("All damage : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end for i, t in pairs(DamageType.dam_def) do @@ -1042,7 +1042,7 @@ Ability to reduce opponent resistances to your damage]] -- melee project if next(player.melee_project) or (actor_to_compare and next(actor_to_compare.melee_project)) then h = h + self.font_h - self:mouseTooltip(self.TOOLTIP_MELEE_PROJECT_INNATE, s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Additional Melee Damage:", w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_MELEE_PROJECT_INNATE, s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Additional Melee Damage:", w, h, 255, 255, 255, true)) h = h + self.font_h for i, t in pairs(DamageType.dam_def) do local valn = player.melee_project[DamageType[t.type]] and player:damDesc(t.type, player.melee_project[DamageType[t.type]]) or 0 local valo = actor_to_compare and actor_to_compare.melee_project[DamageType[t.type]] and actor_to_compare:damDesc(t, actor_to_compare.melee_project[DamageType[t.type]]) or 0 @@ -1056,7 +1056,7 @@ Ability to reduce opponent resistances to your damage]] -- ranged project if next(player.ranged_project) or (actor_to_compare and next(actor_to_compare.ranged_project)) then h = h + self.font_h - self:mouseTooltip(self.TOOLTIP_RANGED_PROJECT_INNATE, s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Additional Ranged Damage:", w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_RANGED_PROJECT_INNATE, s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Additional Ranged Damage:", w, h, 255, 255, 255, true)) h = h + self.font_h for i, t in pairs(DamageType.dam_def) do local valn = player.ranged_project[DamageType[t.type]] and player:damDesc(t.type, player.ranged_project[DamageType[t.type]]) or 0 local valo = actor_to_compare and actor_to_compare.ranged_project[DamageType[t.type]] and actor_to_compare:damDesc(t, actor_to_compare.ranged_project[DamageType[t.type]]) or 0 @@ -1073,39 +1073,39 @@ Ability to reduce opponent resistances to your damage]] local ArmorTxt = "#LIGHT_BLUE#" if player:hasHeavyArmor() then - ArmorTxt = ArmorTxt.."Heavy armor" + ArmorTxt = ArmorTxt.._t"Heavy armor" elseif player:hasMassiveArmor() then - ArmorTxt = ArmorTxt.."Massive armor" + ArmorTxt = ArmorTxt.._t"Massive armor" else - ArmorTxt = ArmorTxt.."Light armor" + ArmorTxt = ArmorTxt.._t"Light armor" end ArmorTxt = ArmorTxt..":" s:drawColorStringBlended(self.font, ArmorTxt, w, h, 255, 255, 255, true) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatFatigue() end, "%3d%%", "%+.0f%%", 1, true) - self:mouseTooltip(self.TOOLTIP_FATIGUE, s:drawColorStringBlended(self.font, ("Fatigue : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_FATIGUE, s:drawColorStringBlended(self.font, ("Fatigue : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatArmorHardiness() end, "%3d%%", "%+.0f%%") - self:mouseTooltip(self.TOOLTIP_ARMOR_HARDINESS, s:drawColorStringBlended(self.font, ("Armor Hardiness : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_ARMOR_HARDINESS, s:drawColorStringBlended(self.font, ("Armor Hardiness : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatArmor() end, "%3d", "%+.0f") - self:mouseTooltip(self.TOOLTIP_ARMOR, s:drawColorStringBlended(self.font, ("Armor : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_ARMOR, s:drawColorStringBlended(self.font, ("Armor : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatDefense(true) end, "%3d", "%+.0f") - self:mouseTooltip(self.TOOLTIP_DEFENSE, s:drawColorStringBlended(self.font, ("Defense : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_DEFENSE, s:drawColorStringBlended(self.font, ("Defense : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatDefenseRanged(true) end, "%3d", "%+.0f") - self:mouseTooltip(self.TOOLTIP_RDEFENSE,s:drawColorStringBlended(self.font, ("Ranged Defense : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_RDEFENSE,s:drawColorStringBlended(self.font, ("Ranged Defense : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatCritReduction() end, "%d%%", "%+.0f%%") - self:mouseTooltip(self.TOOLTIP_CRIT_REDUCTION,s:drawColorStringBlended(self.font, ("Crit. Reduction : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_CRIT_REDUCTION,s:drawColorStringBlended(self.font, ("Crit. Reduction : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:attr("ignore_direct_crits") or 0 end, "%d%%", "%+.0f%%") - self:mouseTooltip(self.TOOLTIP_CRIT_SHRUG,s:drawColorStringBlended(self.font, ("Crit. Shrug Off : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_CRIT_SHRUG,s:drawColorStringBlended(self.font, ("Crit. Shrug Off : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h h = h + self.font_h - self:mouseTooltip(self.TOOLTIP_SAVES, s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Saves:", w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SAVES, s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Saves:", w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return math.floor(actor:combatPhysicalResist(true)) end, "%3d", "%+.0f") - self:mouseTooltip(self.TOOLTIP_PHYS_SAVE, s:drawColorStringBlended(self.font, ("Physical: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_PHYS_SAVE, s:drawColorStringBlended(self.font, ("Physical: #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return math.floor(actor:combatSpellResist(true)) end, "%3d", "%+.0f") - self:mouseTooltip(self.TOOLTIP_SPELL_SAVE, s:drawColorStringBlended(self.font, ("Spell : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_SPELL_SAVE, s:drawColorStringBlended(self.font, ("Spell : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h text = compare_fields(player, actor_to_compare, function(actor, ...) return math.floor(actor:combatMentalResist(true)) end, "%3d", "%+.0f") - self:mouseTooltip(self.TOOLTIP_MENTAL_SAVE, s:drawColorStringBlended(self.font, ("Mental : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_MENTAL_SAVE, s:drawColorStringBlended(self.font, ("Mental : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h -- Hook to display additional types of saves local hd = {"CharacterSheet:Defence:saves", player=player, actor_to_compare=actor_to_compare, h=h, w=w, s=s, compare_fields = compare_fields} @@ -1116,7 +1116,7 @@ Ability to reduce opponent resistances to your damage]] h = 0 w = self.w * 0.25 -- Damage Resistance - self:mouseTooltip(self.TOOLTIP_RESIST_DAMAGE, s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Resistances : base / cap:", w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_RESIST_DAMAGE, s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Resistances : base / cap:", w, h, 255, 255, 255, true)) h = h + self.font_h if player.resists.all or actor_to_compare and actor_to_compare.resists.all then local res = player.resists.all or 0 local reso = actor_to_compare and actor_to_compare.resists.all or res @@ -1129,7 +1129,7 @@ Ability to reduce opponent resistances to your damage]] local rdiff, capdiff = res-reso, cap-capo change = ("(%s%+3.0f%%#LAST#/%s%+3.0f%%#LAST#)"):format(rdiff>0 and "#LIGHT_GREEN#" or rdiff<0 and "#RED#" or "#GREY#", rdiff, capdiff>0 and "#LIGHT_GREEN#" or capdiff<0 and "#RED#" or "#GREY#", capdiff) end - self:mouseTooltip(self.TOOLTIP_RESIST_ALL, s:drawColorStringBlended(self.font, ("%-14s: #00ff00#%3d%% / %3.0f%% %s"):format("All", res, cap, change), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_RESIST_ALL, s:drawColorStringBlended(self.font, ("%-14s: #00ff00#%3d%% / %3.0f%% %s"):format(_t"All", res, cap, change), w, h, 255, 255, 255, true)) h = h + self.font_h end end if player.resists.absolute or actor_to_compare and actor_to_compare.resists.absolute then @@ -1144,7 +1144,7 @@ Ability to reduce opponent resistances to your damage]] local rdiff, capdiff = res-reso, cap-capo change = ("(%s%+3.0f%%#LAST#/%s%+3.0f%%#LAST#)"):format(rdiff>0 and "#LIGHT_GREEN#" or rdiff<0 and "#RED#" or "#GREY#", rdiff, capdiff>0 and "#LIGHT_GREEN#" or capdiff<0 and "#RED#" or "#GREY#", capdiff) end - self:mouseTooltip(self.TOOLTIP_RESIST_ABSOLUTE, s:drawColorStringBlended(self.font, ("#SALMON#%-14s: #00ff00#%3d%% / %3.0f%% %s"):format("Absolute", res, cap, change), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_RESIST_ABSOLUTE, s:drawColorStringBlended(self.font, ("#SALMON#%-14s: #00ff00#%3d%% / %3.0f%% %s"):format(_t"Absolute", res, cap, change), w, h, 255, 255, 255, true)) h = h + self.font_h end end if player:attr("speed_resist") or actor_to_compare and actor_to_compare:attr("speed_resist") then @@ -1161,7 +1161,7 @@ Ability to reduce opponent resistances to your damage]] local rdiff, capdiff = res-reso, cap-capo change = ("(%s%+3.0f%%#LAST#/%s%+3.0f%%#LAST#)"):format(rdiff>0 and "#LIGHT_GREEN#" or rdiff<0 and "#RED#" or "#GREY#", rdiff, capdiff>0 and "#LIGHT_GREEN#" or capdiff<0 and "#RED#" or "#GREY#", capdiff) end - self:mouseTooltip(self.TOOLTIP_RESIST_SPEED, s:drawColorStringBlended(self.font, ("#SALMON#%-14s: #00ff00#%3d%% / %3.0f%% %s"):format("Speed Res", res, cap, change), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_RESIST_SPEED, s:drawColorStringBlended(self.font, ("#SALMON#%-14s: #00ff00#%3d%% / %3.0f%% %s"):format(_t"Speed Res", res, cap, change), w, h, 255, 255, 255, true)) h = h + self.font_h end -- Resists vs specific damage types for i, t in pairs(DamageType.dam_def) do @@ -1203,7 +1203,7 @@ Ability to reduce opponent resistances to your damage]] local capdiff = cap-capo change = ("(%s%+.0f%%#LAST#/%s%+.0f%%#LAST#)"):format(rdiff>0 and "#LIGHT_GREEN#" or rdiff<0 and "#RED#" or "#GREY#", rdiff, capdiff>0 and "#LIGHT_GREEN#" or capdiff<0 and "#RED#" or "#GREY#", capdiff) end - self:mouseTooltip(self.TOOLTIP_RESIST_DAMAGE_ACTOR, s:drawColorStringBlended(self.font, ("#ORANGE#vs %-11s#LAST#: #00ff00#%3s %s"):format(t:capitalize(), vals, change), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_RESIST_DAMAGE_ACTOR, s:drawColorStringBlended(self.font, ("#ORANGE#vs %-11s#LAST#: #00ff00#%3s %s"):tformat(_t(t):capitalize(), vals, change), w, h, 255, 255, 255, true)) h = h + self.font_h end end @@ -1211,12 +1211,12 @@ Ability to reduce opponent resistances to your damage]] h = h + self.font_h --Damage Affinities - s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Damage affinities:", w, h, 255, 255, 255, true) h = h + self.font_h + s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Damage affinities:", w, h, 255, 255, 255, true) h = h + self.font_h if player.damage_affinity.all or (actor_to_compare and actor_to_compare.damage_affinity.all) then text = compare_fields(player, actor_to_compare, function(actor, ...) return actor.damage_affinity and actor.damage_affinity.all or 0 end, "%3d%%", "%+.0f%%") if text ~= " 0%" then - self:mouseTooltip(self.TOOLTIP_AFFINITY_ALL, s:drawColorStringBlended(self.font, ("All damage : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_AFFINITY_ALL, s:drawColorStringBlended(self.font, ("All damage : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end end @@ -1234,12 +1234,12 @@ Ability to reduce opponent resistances to your damage]] --Flat resists if player.flat_damage_armor and next(player.flat_damage_armor) then h = h + self.font_h - s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Flat resistances:", w, h, 255, 255, 255, true) h = h + self.font_h + s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Flat resistances:", w, h, 255, 255, 255, true) h = h + self.font_h if player.flat_damage_armor.all or (actor_to_compare and actor_to_compare.flat_damage_armor.all) then text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatGetFlatResist("none") end, "%3d", "%+.0f") if text ~= " 0%" then - self:mouseTooltip(self.TOOLTIP_FLAT_RESIST, s:drawColorStringBlended(self.font, ("All damage : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_FLAT_RESIST, s:drawColorStringBlended(self.font, ("All damage : #00ff00#%s"):tformat(text), w, h, 255, 255, 255, true)) h = h + self.font_h end end @@ -1256,7 +1256,7 @@ Ability to reduce opponent resistances to your damage]] -- Status Immunities h = 0 w = self.w * 0.52 - self:mouseTooltip(self.TOOLTIP_STATUS_IMMUNE, s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Effect resistances:", w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_STATUS_IMMUNE, s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Effect resistances:", w, h, 255, 255, 255, true)) h = h + self.font_h -- list the status immunities in pre-sorted order for i, immune_type in ipairs(self.immune_order) do @@ -1292,7 +1292,7 @@ Ability to reduce opponent resistances to your damage]] h = 0 w = self.w * 0.75 - self:mouseTooltip(self.TOOLTIP_ON_HIT_DAMAGE, s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Damage when hit:", w, h, 255, 255, 255, true)) h = h + self.font_h + self:mouseTooltip(self.TOOLTIP_ON_HIT_DAMAGE, s:drawColorStringBlended(self.font, _t"#LIGHT_BLUE#Damage when hit:", w, h, 255, 255, 255, true)) h = h + self.font_h for i, t in pairs(DamageType.dam_def) do if player.on_melee_hit[DamageType[t.type]] and player.on_melee_hit[DamageType[t.type]] ~= 0 then @@ -1321,31 +1321,31 @@ Ability to reduce opponent resistances to your damage]] local sort_rank, sort_rank_keys -- set up talent sorting data and functions if self.talent_sorting == 1 then -- Grouped by talent type, Racial/infusions first, then alphabetical order - sort_rank = {"race/.*", "Inscriptions", "Prodigies", "Item_Talents"} + sort_rank = {_t"race/.*", _t"Inscriptions", _t"Prodigies", _t"Item_Talents"} get_group = function(t, tt) if tt.type:match("inscriptions/.*") then - return "Inscriptions" + return _t"Inscriptions" elseif tt.type:match("uber/.*") then - return "Prodigies" + return _t"Prodigies" elseif tt.type:match(".*/objects") then - return "Item_Talents" + return _t"Item_Talents" end local mastery = player:getTalentTypeMastery(tt.type) - local cat = tt.type:gsub("/.*", ""):bookCapitalize() + local cat = _t(tt.type:gsub("/.*", "")):bookCapitalize() return cat.."/"..(tt.name or ""):bookCapitalize().." ("..mastery..")" end elseif self.talent_sorting == 2 then -- Alphabetically, so no groups at all. get_group = function(t, tt) - return "Talents" + return _t"Talents" end else --Group by usage type/speed: instant > activated > sustained > passive > alphabetically - sort_rank = {"Instant", "Activated", "Sustained", "Passive" } + sort_rank = {_t"Instant", _t"Activated", _t"Sustained", _t"Passive" } get_group = function(t, tt) if t.mode == "activated" then local no_energy = util.getval(t.no_energy, player, t) - return no_energy and "Instant" or "Activated" + return no_energy and _t"Instant" or _t"Activated" else - return t.mode:bookCapitalize() + return _t(t.mode:bookCapitalize()) end end end @@ -1714,7 +1714,7 @@ function _M:dump() local ttknown = player:knowTalentType(tt.type) if not (player.talents_types[tt.type] == nil) and ttknown then local cat = tt.type:gsub("/.*", "") - local catname = ("%s / %s"):format(cat:capitalize(), tt.name:capitalize()) + local catname = ("%s / %s"):format(_t(cat):capitalize(), tt.name:capitalize()) nl((" - %-35s(mastery %.02f)"):format(catname, player:getTalentTypeMastery(tt.type))) -- Find all talents of this school @@ -1852,5 +1852,5 @@ function _M:dump() fff:close() - Dialog:simplePopup("Character dump complete", "File: "..fs.getRealPath(file)) + Dialog:simplePopup(_t"Character dump complete", ("File: %s"):tformat(fs.getRealPath(file))) end diff --git a/game/modules/tome/dialogs/CursedAuraSelect.lua b/game/modules/tome/dialogs/CursedAuraSelect.lua index 1d54249f20bf719144e5c0326aa33e6ab8b880d6..d6fe9295bc11a691bc37ebaf65c59c14fd667e0d 100644 --- a/game/modules/tome/dialogs/CursedAuraSelect.lua +++ b/game/modules/tome/dialogs/CursedAuraSelect.lua @@ -29,11 +29,11 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(actor) self.actor = actor - Dialog.init(self, "Cursed Aura Selection", 1, 1) + Dialog.init(self, _t"Cursed Aura Selection", 1, 1) self:generateList() - local c_desc = Textzone.new{width=350, auto_height=true, text="A malevolent aura begins to form around you. Choose your curse:"} + local c_desc = Textzone.new{width=350, auto_height=true, text=_t"A malevolent aura begins to form around you. Choose your curse:"} local c_list = List.new{width=350, height=400, nb_items=#self.list, list=self.list, fct=function(item) self:use(item) end} self:loadUI{ {left=0, top=0, ui=c_desc}, diff --git a/game/modules/tome/dialogs/DeathDialog.lua b/game/modules/tome/dialogs/DeathDialog.lua index 2ad2c59785e4731623bd0f22511d1143ee52bd86..4a8417738cbefc936ae4dd04fb5fdcac4926efeb 100644 --- a/game/modules/tome/dialogs/DeathDialog.lua +++ b/game/modules/tome/dialogs/DeathDialog.lua @@ -31,7 +31,7 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(actor) self.actor = actor self.ui = "deathbox" - Dialog.init(self, "You have #LIGHT_RED#died#LAST#!", 500, 600) + Dialog.init(self, _t"You have #LIGHT_RED#died#LAST#!", 500, 600) actor:saveUUID() @@ -39,12 +39,12 @@ function _M:init(actor) if self.dont_show then return end if not config.settings.cheat then game:onTickEnd(function() game:saveGame() end) end - local text = [[Death in #{bold}#Tales of Maj'Eyal#{normal}# is usually permanent, but if you have a means of resurrection it will be proposed in the menu below. + local text = _t[[Death in #{bold}#Tales of Maj'Eyal#{normal}# is usually permanent, but if you have a means of resurrection it will be proposed in the menu below. You can dump your character data to a file to remember her/him forever, or you can exit and try once again to survive in the wilds! ]] if #game.party.on_death_show_achieved > 0 then - self.c_achv = Textzone.new{width=self.iw, scrollbar=true, height=100, text="#LIGHT_GREEN#During your game you#WHITE#:\n* "..table.concat(game.party.on_death_show_achieved, "\n* ")} + self.c_achv = Textzone.new{width=self.iw, scrollbar=true, height=100, text=("#LIGHT_GREEN#During your game you#WHITE#:\n* %s"):tformat(table.concat(game.party.on_death_show_achieved, "\n* "))} end self:setTitleShadowShader(Shader.default.textoutline and Shader.default.textoutline.shad, 1.5) @@ -168,7 +168,11 @@ function _M:eidolonPlane() game:onTickEnd(function() if not self.actor:attr("infinite_lifes") then self.actor:attr("easy_mode_lifes", -1) - game.log("#LIGHT_RED#You have %s left.", (self.actor:attr("easy_mode_lifes") and self.actor:attr("easy_mode_lifes").." life(s)") or "no more lives") + local nb = self.actor:attr("easy_mode_lifes") and self.actor:attr("easy_mode_lifes") or 0 + local style + if(nb > 0) then style = ("#LIGHT_RED#You have %d life(s) left."):tformat(nb) + else style = ("#LIGHT_RED#You have no more lives left."):tformat() end + game.log(style) end local is_exploration = game.permadeath == game.PERMADEATH_INFINITE @@ -213,7 +217,7 @@ function _M:use(item) elseif act == "dump" then game:registerDialog(require("mod.dialogs.CharacterSheet").new(self.actor)) elseif act == "log" then - game:registerDialog(require("mod.dialogs.ShowChatLog").new("Message Log", 0.6, game.uiset.logdisplay, profile.chat)) + game:registerDialog(require("mod.dialogs.ShowChatLog").new(_t"Message Log", 0.6, game.uiset.logdisplay, profile.chat)) elseif act == "cheat" then game.logPlayer(self.actor, "#LIGHT_BLUE#You resurrect! CHEATER!") @@ -298,7 +302,7 @@ function _M:generateList() allow_res = false end - if config.settings.cheat then list[#list+1] = {name="Resurrect by cheating", action="cheat"} end + if config.settings.cheat then list[#list+1] = {name=_t"Resurrect by cheating", action="cheat"} end if not self.actor.no_resurrect and allow_res then if self.actor:hasEffect(self.actor.EFF_SEE_THREADS) and game._chronoworlds then self:use{action="threads"} @@ -315,13 +319,13 @@ function _M:generateList() self.dont_show = true return end - if self.actor:attr("blood_life") and not self.actor:attr("undead") then list[#list+1] = {name="Resurrect with the Blood of Life", action="blood_life"} end - if self.actor:getTalentLevelRaw(self.actor.T_SKELETON_REASSEMBLE) >= 5 and not self.actor:attr("re-assembled") then list[#list+1] = {name="Re-assemble your bones and resurrect (Skeleton ability)", action="skeleton"} end + if self.actor:attr("blood_life") and not self.actor:attr("undead") then list[#list+1] = {name=_t"Resurrect with the Blood of Life", action="blood_life"} end + if self.actor:getTalentLevelRaw(self.actor.T_SKELETON_REASSEMBLE) >= 5 and not self.actor:attr("re-assembled") then list[#list+1] = {name=_t"Re-assemble your bones and resurrect (Skeleton ability)", action="skeleton"} end local consumenb = 1 self.actor:inventoryApplyAll(function(inven, item, o) if o.one_shot_life_saving and (not o.slot or inven.worn) then - list[#list+1] = {name="Resurrect by consuming "..o:getName{do_colour=true}, action="consume"..consumenb, inven=inven, item=item, object=o, is_consume=true} + list[#list+1] = {name=("Resurrect by consuming %s"):tformat(o:getName{do_colour=true}), action="consume"..consumenb, inven=inven, item=item, object=o, is_consume=true} consumenb = consumenb + 1 self.possible_items.consume = true end @@ -330,11 +334,11 @@ function _M:generateList() self.actor:fireTalentCheck("callbackOnDeathbox", self, list) end - list[#list+1] = {name=(not profile.auth and "Message Log" or "Message/Chat log (allows to talk)"), action="log"} - list[#list+1] = {name="Character dump", action="dump"} - list[#list+1] = {name="Restart the same character", action="exit", subaction="restart"} - list[#list+1] = {name="Restart with a new character", action="exit", subaction="restart-new"} - list[#list+1] = {name="Exit to main menu", action="exit", subaction="none"} + list[#list+1] = {name=(not profile.auth and _t"Message Log" or _t"Message/Chat log (allows to talk)"), action="log"} + list[#list+1] = {name=_t"Character dump", action="dump"} + list[#list+1] = {name=_t"Restart the same character", action="exit", subaction="restart"} + list[#list+1] = {name=_t"Restart with a new character", action="exit", subaction="restart-new"} + list[#list+1] = {name=_t"Exit to main menu", action="exit", subaction="none"} self.list = list for _, item in ipairs(list) do self.possible_items[item.action] = true end diff --git a/game/modules/tome/dialogs/Donation.lua b/game/modules/tome/dialogs/Donation.lua index 222d85c951209960d630e7b0b0f8810a0aa78f4c..854a041fdf33a4e885e64d447e2f0e8819f1d438 100644 --- a/game/modules/tome/dialogs/Donation.lua +++ b/game/modules/tome/dialogs/Donation.lua @@ -35,38 +35,38 @@ _M.force_ui_inside = "microtxn" function _M:init(source) self.donation_source = source or "ingame" - Dialog.init(self, "Donations", 600, 300) + Dialog.init(self, _t"Donations", 600, 300) local desc local recur = false if not profile.auth or not tonumber(profile.auth.donated) or tonumber(profile.auth.donated) <= 1 or true then - local donation_features = { "#GOLD#Character cosmetic customization and special tiles#WHITE#", "#GOLD#Exploration mode (infinite lives)#WHITE#", "#GOLD#Item's appearance change (Shimmering)#WHITE#"} + local donation_features = { _t"#GOLD#Character cosmetic customization and special tiles#WHITE#", _t"#GOLD#Exploration mode (infinite lives)#WHITE#", _t"#GOLD#Item's appearance change (Shimmering)#WHITE#"} self:triggerHook{"DonationDialog:features", list=donation_features} -- First time donation - desc = Textzone.new{width=self.iw, auto_height=true, text=[[Hi, I am Nicolas (DarkGod), the maker of this game. + desc = Textzone.new{width=self.iw, auto_height=true, text=([[Hi, I am Nicolas (DarkGod), the maker of this game. It is my dearest hope that you find my game enjoyable, and that you will continue to do so for many years to come! ToME is free and open-source and will stay that way, but that does not mean I can live without money, so I have come to disturb you here and now to ask for your kindness. If you feel that the (many) hours you have spent having fun were worth it, please consider making a donation for the future of the game. -Donators are also granted a few special features: ]]..table.concatNice(donation_features, ", ", " and ").."."} +Donators are also granted a few special features: %s.]]):tformat(table.concatNice(donation_features, ", ", _t" and "))} else -- Recurring donation recur = true - desc = Textzone.new{width=self.iw, auto_height=true, text=[[Thank you for supporting ToME, your donation was greatly appreciated. + desc = Textzone.new{width=self.iw, auto_height=true, text=_t[[Thank you for supporting ToME, your donation was greatly appreciated. If you want to continue supporting ToME you are welcome to make a new donation or even a reccuring one which helps ensure the future of the game. Thank you for your kindness!]]} end - self.c_donate = Numberbox.new{title="Donation amount: ", number=10, max=1000, min=5, chars=5, fct=function() end} - self.c_recur = Checkbox.new{title="Monthly donation", default=recur, fct=function() end} - local euro = Textzone.new{auto_width=true, auto_height=true, text=[[euro]]} + self.c_donate = Numberbox.new{title=_t"Donation amount: ", number=10, max=1000, min=5, chars=5, fct=function() end} + self.c_recur = Checkbox.new{title=_t"Monthly donation", default=recur, fct=function() end} + local euro = Textzone.new{auto_width=true, auto_height=true, text=_t[[euro]]} local patreon = ButtonImage.new{alpha_unfocus=1, file="ui/patreon.png", fct=function() self:patreon() end} local paypal = ButtonImage.new{alpha_unfocus=1, file="ui/paypal.png", fct=function() self:paypal() end} - local cancel = Button.new{text="Cancel", fct=function() self:cancel() end} - local patreon_explain = Textzone.new{width=patreon.w, auto_height=true, text=[[You can also make a pledge on Patreon if you prefer.]]} + local cancel = Button.new{text=_t"Cancel", fct=function() self:cancel() end} + local patreon_explain = Textzone.new{width=patreon.w, auto_height=true, text=_t[[You can also make a pledge on Patreon if you prefer.]]} local hsep = Separator.new{dir="horizontal", size=self.c_donate.h+paypal.h+self.c_recur.h-cancel.h} self:loadUI{ @@ -95,7 +95,7 @@ function _M:paypal() local inside = jit and jit.os ~= "Linux" and core.webview and true or false - if not inside then self:simplePopup("Thank you", "Thank you, a paypal page should now open in your browser.") end + if not inside then self:simplePopup(_t"Thank you", _t"Thank you, a paypal page should now open in your browser.") end local url = ("https://te4.org/ingame-donate/%s/%s/%s/EUR/%s"):format(self.c_donate.number, self.c_recur.checked and "monthly" or "onetime", (profile.auth and profile.auth.drupid) and profile.auth.drupid or "0", self.donation_source) @@ -106,6 +106,6 @@ end function _M:patreon() game:unregisterDialog(self) - self:simplePopup("Thank you", "Thank you, a Patreon page should now open in your browser.") + self:simplePopup(_t"Thank you", _t"Thank you, a Patreon page should now open in your browser.") util.browserOpenUrl("https://www.patreon.com/darkgodone", {is_external=true}) end diff --git a/game/modules/tome/dialogs/GameOptions.lua b/game/modules/tome/dialogs/GameOptions.lua index c955181c439add3002ca1552ffe293aa9fd2804b..dae44afe83321842c33a513eab5b7cd7c68aa5c5 100644 --- a/game/modules/tome/dialogs/GameOptions.lua +++ b/game/modules/tome/dialogs/GameOptions.lua @@ -34,16 +34,16 @@ function _M:init() -- we can be called from the boot menu, so make sure to load initial settings in this case dofile("/mod/settings.lua") - Dialog.init(self, "Game Options", game.w * 0.8, game.h * 0.8) + Dialog.init(self, _t"Game Options", game.w * 0.8, game.h * 0.8) self.vsep = Separator.new{dir="horizontal", size=self.ih - 10} self.c_desc = Textzone.new{width=math.floor((self.iw - self.vsep.w)/2), height=self.ih, text=""} local tabs = { - {title="UI", kind="ui"}, - {title="Gameplay", kind="gameplay"}, - {title="Online", kind="online"}, - {title="Misc", kind="misc"} + {title=_t"UI", kind="ui"}, + {title=_t"Gameplay", kind="gameplay"}, + {title=_t"Online", kind="online"}, + {title=_t"Misc", kind="misc"} } self:triggerHook{"GameOptions:tabs", tab=function(title, fct) local id = #tabs+1 @@ -95,8 +95,8 @@ function _M:generateListUi() local list = {} local i = 0 - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Select the graphical mode to display the world.\nDefault is 'Modern'.\nWhen you change it, make a new character or it may look strange."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Graphic Mode#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Select the graphical mode to display the world.\nDefault is 'Modern'.\nWhen you change it, make a new character or it may look strange."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Graphic Mode#WHITE##{normal}#"):toTString(), status=function(item) local ts = GraphicMode.tiles_packs[config.settings.tome.gfx.tiles] local size = config.settings.tome.gfx.size or "???x???" return (ts and ts.name or "???").." <"..size..">" @@ -104,11 +104,11 @@ function _M:generateListUi() game:registerDialog(GraphicMode.new()) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Make the movement of creatures and projectiles 'smooth'. When set to 0 movement will be instantaneous.\nThe higher this value the slower the movements will appear.\n\nNote: This does not affect the turn-based idea of the game. You can move again while your character is still moving, and it will correctly update and compute a new animation."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Smooth creatures movement#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Make the movement of creatures and projectiles 'smooth'. When set to 0 movement will be instantaneous.\nThe higher this value the slower the movements will appear.\n\nNote: This does not affect the turn-based idea of the game. You can move again while your character is still moving, and it will correctly update and compute a new animation."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Smooth creatures movement#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.tome.smooth_move) end, fct=function(item) - game:registerDialog(GetQuantity.new("Enter movement speed(lower is faster)", "From 0 to 60", config.settings.tome.smooth_move, 60, function(qty) + game:registerDialog(GetQuantity.new(_t"Enter movement speed(lower is faster)", _t"From 0 to 60", config.settings.tome.smooth_move, 60, function(qty) game:saveSettings("tome.smooth_move", ("tome.smooth_move = %d\n"):format(qty)) config.settings.tome.smooth_move = qty if self:isTome() then engine.Map.smooth_scroll = qty end @@ -116,31 +116,31 @@ function _M:generateListUi() end)) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables or disables 'twitch' movement.\nWhen enabled creatures will do small bumps when moving and attacking.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Twitch creatures movement and attack#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.twitch_move and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enables or disables 'twitch' movement.\nWhen enabled creatures will do small bumps when moving and attacking.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Twitch creatures movement and attack#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.twitch_move and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.twitch_move = not config.settings.tome.twitch_move game:saveSettings("tome.twitch_move", ("tome.twitch_move = %s\n"):format(tostring(config.settings.tome.twitch_move))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables smooth fog-of-war.\nDisabling it will make the fog of war look 'blocky' but might gain a slight performance increase.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Smooth fog of war#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.smooth_fov and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enables smooth fog-of-war.\nDisabling it will make the fog of war look 'blocky' but might gain a slight performance increase.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Smooth fog of war#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.smooth_fov and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.smooth_fov = not config.settings.tome.smooth_fov game:saveSettings("tome.smooth_fov", ("tome.smooth_fov = %s\n"):format(tostring(config.settings.tome.smooth_fov))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Select the interface look. Metal is the default one. Simple is basic but takes less screen space.\nYou must restart the game for the change to take effect."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Interface Style#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.ui_theme3):capitalize() + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Select the interface look. Metal is the default one. Simple is basic but takes less screen space.\nYou must restart the game for the change to take effect."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Interface Style#WHITE##{normal}#"):toTString(), status=function(item) + return _t(tostring(config.settings.tome.ui_theme3):capitalize()) end, fct=function(item) - local uis = {{name="Dark", ui="dark"}, {name="Metal", ui="metal"}, {name="Stone", ui="stone"}, {name="Simple", ui="simple"}} + local uis = {{name=_t"Dark", ui="dark"}, {name=_t"Metal", ui="metal"}, {name=_t"Stone", ui="stone"}, {name=_t"Simple", ui="simple"}} self:triggerHook{"GameOptions:UIs", uis=uis} - Dialog:listPopup("Interface style", "Select style", uis, 300, 200, function(sel) + Dialog:listPopup(_t"Interface style", _t"Select style", uis, 300, 200, function(sel) if not sel or not sel.ui then return end game:saveSettings("tome.ui_theme3", ("tome.ui_theme3 = %q\n"):format(sel.ui)) config.settings.tome.ui_theme3 = sel.ui @@ -148,13 +148,13 @@ function _M:generateListUi() end) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Select the HUD look. 'Minimalist' is the default one.\n#LIGHT_RED#This will take effect on next restart."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#HUD Style#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.uiset_mode):capitalize() + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Select the HUD look. 'Minimalist' is the default one.\n#LIGHT_RED#This will take effect on next restart."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#HUD Style#WHITE##{normal}#"):toTString(), status=function(item) + return _t(tostring(config.settings.tome.uiset_mode):capitalize()) end, fct=function(item) - local huds = {{name="Minimalist", ui="Minimalist"}, {name="Classic", ui="Classic"}} + local huds = {{name=_t"Minimalist", ui="Minimalist"}, {name=_t"Classic", ui="Classic"}} self:triggerHook{"GameOptions:HUDs", huds=huds} - Dialog:listPopup("HUD style", "Select style", huds, 300, 200, function(sel) + Dialog:listPopup(_t"HUD style", _t"Select style", huds, 300, 200, function(sel) if not sel or not sel.ui then return end game:saveSettings("tome.uiset_mode", ("tome.uiset_mode = %q\n"):format(sel.ui)) config.settings.tome.uiset_mode = sel.ui @@ -163,11 +163,11 @@ function _M:generateListUi() end,} if self:isTome() and game.uiset:checkGameOption("log_lines") then - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"The number of lines to display in the combat log (for the Classic HUD)."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Log lines#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"The number of lines to display in the combat log (for the Classic HUD)."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Log lines#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.tome.log_lines) end, fct=function(item) - game:registerDialog(GetQuantity.new("Log lines", "From 5 to 50", config.settings.tome.log_lines, 50, function(qty) + game:registerDialog(GetQuantity.new(_t"Log lines", _t"From 5 to 50", config.settings.tome.log_lines, 50, function(qty) qty = util.bound(qty, 5, 50) game:saveSettings("tome.log_lines", ("tome.log_lines = %d\n"):format(qty)) config.settings.tome.log_lines = qty @@ -179,9 +179,9 @@ function _M:generateListUi() end,} end - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Draw faint lines to separate each grid, making visual positioning easier to see.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Display map grid lines#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.show_grid_lines and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Draw faint lines to separate each grid, making visual positioning easier to see.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Display map grid lines#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.show_grid_lines and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.show_grid_lines = not config.settings.tome.show_grid_lines game:saveSettings("tome.show_grid_lines", ("tome.show_grid_lines = %s\n"):format(tostring(config.settings.tome.show_grid_lines))) @@ -189,12 +189,12 @@ function _M:generateListUi() if self:isTome() then game:createMapGridLines() end end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Select the fonts look. Fantasy is the default one. Basic is simplified and smaller.\nYou must restart the game for the change to take effect."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Font Style#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.fonts.type):capitalize() + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Select the fonts look. Fantasy is the default one. Basic is simplified and smaller.\nYou must restart the game for the change to take effect."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Font Style#WHITE##{normal}#"):toTString(), status=function(item) + return _t(tostring(config.settings.tome.fonts.type):capitalize()) end, fct=function(item) local list = FontPackage:list() - Dialog:listPopup("Font style", "Select font", list, 300, 200, function(sel) + Dialog:listPopup(_t"Font style", _t"Select font", list, 300, 200, function(sel) if not sel or not sel.id then return end game:saveSettings("tome.fonts", ("tome.fonts = { type = %q, size = %q }\n"):format(sel.id, config.settings.tome.fonts.size)) config.settings.tome.fonts.type = sel.id @@ -202,11 +202,11 @@ function _M:generateListUi() end) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Select the fonts size.\nYou must restart the game for the change to take effect."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Font Size#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.fonts.size):capitalize() + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Select the fonts size.\nYou must restart the game for the change to take effect."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Font Size#WHITE##{normal}#"):toTString(), status=function(item) + return _t(tostring(config.settings.tome.fonts.size):capitalize()) end, fct=function(item) - Dialog:listPopup("Font size", "Select font", {{name="Normal", size="normal"},{name="Small", size="small"},{name="Big", size="big"},}, 300, 200, function(sel) + Dialog:listPopup(_t"Font size", _t"Select font", {{name=_t"Normal", size="normal"},{name=_t"Small", size="small"},{name=_t"Big", size="big"},}, 300, 200, function(sel) if not sel or not sel.size then return end game:saveSettings("tome.fonts", ("tome.fonts = { type = %q, size = %q }\n"):format(config.settings.tome.fonts.type, sel.size)) config.settings.tome.fonts.size = sel.size @@ -214,11 +214,11 @@ function _M:generateListUi() end) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"How many seconds before log and chat lines begin to fade away.\nIf set to 0 the logs will never fade away."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Log fade time#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"How many seconds before log and chat lines begin to fade away.\nIf set to 0 the logs will never fade away."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Log fade time#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.tome.log_fade) end, fct=function(item) - game:registerDialog(GetQuantity.new("Fade time (in seconds)", "From 0 to 20", config.settings.tome.log_fade, 20, function(qty) + game:registerDialog(GetQuantity.new(_t"Fade time (in seconds)", _t"From 0 to 20", config.settings.tome.log_fade, 20, function(qty) qty = util.bound(qty, 0, 20) game:saveSettings("tome.log_fade", ("tome.log_fade = %d\n"):format(qty)) config.settings.tome.log_fade = qty @@ -230,11 +230,11 @@ function _M:generateListUi() end, 0)) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"How long will flying text messages be visible on screen.\nThe range is 1 (very short) to 100 (10x slower) than the normal duration, which varies with each individual message."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Duration of flying text#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"How long will flying text messages be visible on screen.\nThe range is 1 (very short) to 100 (10x slower) than the normal duration, which varies with each individual message."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Duration of flying text#WHITE##{normal}#"):toTString(), status=function(item) return tostring((config.settings.tome.flyers_fade_time or 10) ) end, fct=function(item) - game:registerDialog(GetQuantity.new("Relative duration", "From 1 to 100", (config.settings.tome.flyers_fade_time or 10), 100, function(qty) + game:registerDialog(GetQuantity.new(_t"Relative duration", _t"From 1 to 100", (config.settings.tome.flyers_fade_time or 10), 100, function(qty) qty = util.bound(qty, 1, 100) config.settings.tome.flyers_fade_time = qty game:saveSettings("tome.flyers_fade_time", ("tome.flyers_fade_time = %d\n"):format(qty)) @@ -244,9 +244,9 @@ function _M:generateListUi() if self:isTome() then if game.uiset:checkGameOption("icons_temp_effects") then - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Uses the icons for status effects instead of text.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Icons status effects#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.effects_icons and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Uses the icons for status effects instead of text.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Icons status effects#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.effects_icons and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.effects_icons = not config.settings.tome.effects_icons game:saveSettings("tome.effects_icons", ("tome.effects_icons = %s\n"):format(tostring(config.settings.tome.effects_icons))) @@ -256,9 +256,9 @@ function _M:generateListUi() end if game.uiset:checkGameOption("icons_hotkeys") then - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Uses the icons hotkeys toolbar or the textual one.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Icons hotkey toolbar#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.hotkey_icons and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Uses the icons hotkeys toolbar or the textual one.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Icons hotkey toolbar#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.hotkey_icons and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.hotkey_icons = not config.settings.tome.hotkey_icons game:saveSettings("tome.hotkey_icons", ("tome.hotkey_icons = %s\n"):format(tostring(config.settings.tome.hotkey_icons))) @@ -268,11 +268,11 @@ function _M:generateListUi() end if game.uiset:checkGameOption("hotkeys_rows") then - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Number of rows to show in the icons hotkeys toolbar.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Icons hotkey toolbar rows#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Number of rows to show in the icons hotkeys toolbar.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Icons hotkey toolbar rows#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.tome.hotkey_icons_rows) end, fct=function(item) - game:registerDialog(GetQuantity.new("Number of icons rows", "From 1 to 4", config.settings.tome.hotkey_icons_rows, 4, function(qty) + game:registerDialog(GetQuantity.new(_t"Number of icons rows", _t"From 1 to 4", config.settings.tome.hotkey_icons_rows, 4, function(qty) qty = util.bound(qty, 1, 4) game:saveSettings("tome.hotkey_icons_rows", ("tome.hotkey_icons_rows = %d\n"):format(qty)) config.settings.tome.hotkey_icons_rows = qty @@ -283,29 +283,29 @@ function _M:generateListUi() end end - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"When you activate a hotkey, either by keyboard or click a visual feedback will appear over it in the hotkeys bar.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Visual hotkeys feedback#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.visual_hotkeys and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"When you activate a hotkey, either by keyboard or click a visual feedback will appear over it in the hotkeys bar.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Visual hotkeys feedback#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.visual_hotkeys and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.visual_hotkeys = not config.settings.tome.visual_hotkeys game:saveSettings("tome.visual_hotkeys", ("tome.visual_hotkeys = %s\n"):format(tostring(config.settings.tome.visual_hotkeys))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"When the player or an NPC uses a talent shows a quick popup with the talent's icon and name over its head.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Talents activations map display#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.talents_flyers and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"When the player or an NPC uses a talent shows a quick popup with the talent's icon and name over its head.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Talents activations map display#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.talents_flyers and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.talents_flyers = not config.settings.tome.talents_flyers game:saveSettings("tome.talents_flyers", ("tome.talents_flyers = %s\n"):format(tostring(config.settings.tome.talents_flyers))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Size of the icons in the hotkeys toolbar.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Icons hotkey toolbar icon size#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Size of the icons in the hotkeys toolbar.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Icons hotkey toolbar icon size#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.tome.hotkey_icons_size) end, fct=function(item) - game:registerDialog(GetQuantity.new("Icons size", "From 32 to 64", config.settings.tome.hotkey_icons_size, 64, function(qty) + game:registerDialog(GetQuantity.new(_t"Icons size", _t"From 32 to 64", config.settings.tome.hotkey_icons_size, 64, function(qty) qty = util.bound(qty, 32, 64) game:saveSettings("tome.hotkey_icons_size", ("tome.hotkey_icons_size = %d\n"):format(qty)) config.settings.tome.hotkey_icons_size = qty @@ -314,18 +314,18 @@ function _M:generateListUi() end, 32)) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"If disabled lore popups will only appear the first time you see the lore on your profile.\nIf enabled it will appear the first time you see it with each character.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Always show lore popup#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.lore_popup and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"If disabled lore popups will only appear the first time you see the lore on your profile.\nIf enabled it will appear the first time you see it with each character.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Always show lore popup#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.lore_popup and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.lore_popup = not config.settings.tome.lore_popup game:saveSettings("tome.lore_popup", ("tome.lore_popup = %s\n"):format(tostring(config.settings.tome.lore_popup))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"If disabled items with activations will not be auto-added to your hotkeys, you will need to manualty drag them from the inventory screen.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Always add objects to hotkeys#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.auto_hotkey_object and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"If disabled items with activations will not be auto-added to your hotkeys, you will need to manualty drag them from the inventory screen.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Always add objects to hotkeys#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.auto_hotkey_object and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.auto_hotkey_object = not config.settings.tome.auto_hotkey_object game:saveSettings("tome.auto_hotkey_object", ("tome.auto_hotkey_object = %s\n"):format(tostring(config.settings.tome.auto_hotkey_object))) @@ -333,31 +333,31 @@ function _M:generateListUi() end,} if self:isTome() then - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString[[Toggles between various tactical information display: + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t[[Toggles between various tactical information display: - Combined healthbar and small tactical frame - Combined healthbar and big tactical frame - Only healthbar - No tactical information at all -#{italic}#You can also change this directly ingame by pressing shift+T.#{normal}##WHITE#]]} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Tactical overlay#WHITE##{normal}#", status=function(item) - local vs = "Combined Small" +#{italic}#You can also change this directly ingame by pressing shift+T.#{normal}##WHITE#]]):toString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Tactical overlay#WHITE##{normal}#"):toTString(), status=function(item) + local vs = _t"Combined Small" if game.always_target == "old" then - vs = "Combined Big" + vs = _t"Combined Big" elseif game.always_target == "health" then - vs = "Only Healthbars" + vs = _t"Only Healthbars" elseif game.always_target == nil then - vs = "Nothing" + vs = _t"Nothing" elseif game.always_target == true then - vs = "Combined Small" + vs = _t"Combined Small" end return vs end, fct=function(item) - Dialog:listPopup("Tactical overlay", "Select overlay mode", { - {name="Combined Small", mode=true}, - {name="Combined Big", mode="old"}, - {name="Only Healthbars", mode="health"}, - {name="Nothing", mode=nil}, + Dialog:listPopup(_t"Tactical overlay", _t"Select overlay mode", { + {name=_t"Combined Small", mode=true}, + {name=_t"Combined Big", mode="old"}, + {name=_t"Only Healthbars", mode="health"}, + {name=_t"Nothing", mode=nil}, }, 300, 200, function(sel) if not sel then return end game:setTacticalMode(sel.mode) @@ -366,27 +366,27 @@ function _M:generateListUi() end,} end - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Toggles between a normal or flagpost tactical bars.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Flagpost tactical bars#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.flagpost_tactical and "Enabled" or "Disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Toggles between a normal or flagpost tactical bars.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Flagpost tactical bars#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.flagpost_tactical and _t"Enabled" or _t"Disabled") end, fct=function(item) config.settings.tome.flagpost_tactical = not config.settings.tome.flagpost_tactical game:saveSettings("tome.flagpost_tactical", ("tome.flagpost_tactical = %s\n"):format(tostring(config.settings.tome.flagpost_tactical))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Toggles between a bottom or side display for tactial healthbars.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Healthbars position#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.small_frame_side and "Sides" or "Bottom") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Toggles between a bottom or side display for tactial healthbars.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Healthbars position#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.small_frame_side and _t"Sides" or _t"Bottom") end, fct=function(item) config.settings.tome.small_frame_side = not config.settings.tome.small_frame_side game:saveSettings("tome.small_frame_side", ("tome.small_frame_side = %s\n"):format(tostring(config.settings.tome.small_frame_side))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"If disabled you will not get a fullscreen notification of stun/daze effects. Beware.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Fullscreen stun/daze notification#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.fullscreen_stun and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"If disabled you will not get a fullscreen notification of stun/daze effects. Beware.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Fullscreen stun/daze notification#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.fullscreen_stun and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.fullscreen_stun = not config.settings.tome.fullscreen_stun game:saveSettings("tome.fullscreen_stun", ("tome.fullscreen_stun = %s\n"):format(tostring(config.settings.tome.fullscreen_stun))) @@ -394,9 +394,9 @@ function _M:generateListUi() if self:isTome() then if game.player.updateMainShader then game.player:updateMainShader() end end end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"If disabled you will not get a fullscreen notification of confusion effects. Beware.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Fullscreen confusion notification#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.fullscreen_confusion and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"If disabled you will not get a fullscreen notification of confusion effects. Beware.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Fullscreen confusion notification#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.fullscreen_confusion and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.fullscreen_confusion = not config.settings.tome.fullscreen_confusion game:saveSettings("tome.fullscreen_confusion", ("tome.fullscreen_confusion = %s\n"):format(tostring(config.settings.tome.fullscreen_confusion))) @@ -404,56 +404,56 @@ function _M:generateListUi() if self:isTome() then if game.player.updateMainShader then game.player:updateMainShader() end end end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Toggles advanced weapon statistics display.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Advanced Weapon Statistics#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.advanced_weapon_stats and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Toggles advanced weapon statistics display.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Advanced Weapon Statistics#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.advanced_weapon_stats and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.advanced_weapon_stats = not config.settings.tome.advanced_weapon_stats game:saveSettings("tome.advanced_weapon_stats", ("tome.advanced_weapon_stats = %s\n"):format(tostring(config.settings.tome.advanced_weapon_stats))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Always display the combat properties of gloves even if you don't know unarmed attack talents.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Always show glove combat properties#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.display_glove_stats and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Always display the combat properties of gloves even if you don't know unarmed attack talents.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Always show glove combat properties#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.display_glove_stats and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.display_glove_stats = not config.settings.tome.display_glove_stats game:saveSettings("tome.display_glove_stats", ("tome.display_glove_stats = %s\n"):format(tostring(config.settings.tome.display_glove_stats))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Always display combat properties of shields even if you don't know shield attack talents.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Always show shield combat properties#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.display_shield_stats and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Always display combat properties of shields even if you don't know shield attack talents.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Always show shield combat properties#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.display_shield_stats and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.display_shield_stats = not config.settings.tome.display_shield_stats game:saveSettings("tome.display_shield_stats", ("tome.display_shield_stats = %s\n"):format(tostring(config.settings.tome.display_shield_stats))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"When you do a mouse gesture (right click + drag) a color coded trail is displayed.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Display mouse gesture trails#WHITE##{normal}#", status=function(item) - return tostring(config.settings.hide_gestures and "disabled" or "enabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"When you do a mouse gesture (right click + drag) a color coded trail is displayed.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Display mouse gesture trails#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.hide_gestures and _t"disabled" or _t"enabled") end, fct=function(item) config.settings.hide_gestures = not config.settings.hide_gestures game:saveSettings("hide_gestures", ("hide_gestures = %s\n"):format(tostring(config.settings.hide_gestures))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"If enabled new quests and quests updates will display a big popup, if not a simple line of text will fly on the screen.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Big Quest Popups#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.quest_popup and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"If enabled new quests and quests updates will display a big popup, if not a simple line of text will fly on the screen.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Big Quest Popups#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.quest_popup and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.quest_popup = not config.settings.tome.quest_popup game:saveSettings("tome.quest_popup", ("tome.quest_popup = %s\n"):format(tostring(config.settings.tome.quest_popup))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Sharpen Visuals, set to 0 to disable.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Sharpen Visuals#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Sharpen Visuals, set to 0 to disable.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Sharpen Visuals#WHITE##{normal}#"):toTString(), status=function(item) return tostring((config.settings.tome.sharpen_display or 0)) end, fct=function(item) - game:registerDialog(GetQuantitySlider.new("Enter Sharpen Power", "From 0(disable) to 10", math.floor(config.settings.tome.sharpen_display or 0), 0, 10, 1, function(qty) + game:registerDialog(GetQuantitySlider.new(_t"Enter Sharpen Power", _t"From 0(disable) to 10", math.floor(config.settings.tome.sharpen_display or 0), 0, 10, 1, function(qty) qty = util.bound(qty, 0, 10) game:saveSettings("tome.sharpen_display", ("tome.sharpen_display = %f\n"):format(qty)) config.settings.tome.sharpen_display = qty @@ -470,11 +470,11 @@ function _M:generateListGameplay() local list = {} local i = 0 - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Defines the distance from the screen edge at which scrolling will start. If set high enough the game will always center on the player.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Scroll distance#WHITE##{normal}#", status=function(item) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Defines the distance from the screen edge at which scrolling will start. If set high enough the game will always center on the player.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Scroll distance#WHITE##{normal}#"):toTString(), status=function(item) return tostring(config.settings.tome.scroll_dist) end, fct=function(item) - game:registerDialog(GetQuantity.new("Scroll distance", "From 1 to 50", config.settings.tome.scroll_dist, 50, function(qty) + game:registerDialog(GetQuantity.new(_t"Scroll distance", _t"From 1 to 50", config.settings.tome.scroll_dist, 50, function(qty) qty = util.bound(qty, 1, 50) game:saveSettings("tome.scroll_dist", ("tome.scroll_dist = %d\n"):format(qty)) config.settings.tome.scroll_dist = qty @@ -482,11 +482,11 @@ function _M:generateListGameplay() end, 1)) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"If you loose more than this percentage of life in a turn, a warning will display and all key/mouse input will be ignored for 2 seconds to prevent mistakes.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Life Lost Warning#WHITE##{normal}#", status=function(item) - return (not config.settings.tome.life_lost_warning or config.settings.tome.life_lost_warning == 100) and "disabled" or tostring(config.settings.tome.life_lost_warning).."%" + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"If you loose more than this percentage of life in a turn, a warning will display and all key/mouse input will be ignored for 2 seconds to prevent mistakes.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Life Lost Warning#WHITE##{normal}#"):toTString(), status=function(item) + return (not config.settings.tome.life_lost_warning or config.settings.tome.life_lost_warning == 100) and _t"disabled" or tostring(config.settings.tome.life_lost_warning).."%" end, fct=function(item) - game:registerDialog(GetQuantity.new("Life lost percentage (out of max life)", "From 1 to 99 (100 to disable)", config.settings.tome.life_lost_warning or 100, 100, function(qty) + game:registerDialog(GetQuantity.new(_t"Life lost percentage (out of max life)", _t"From 1 to 99 (100 to disable)", config.settings.tome.life_lost_warning or 100, 100, function(qty) qty = util.bound(qty, 1, 100) game:saveSettings("tome.life_lost_warning", ("tome.life_lost_warning = %d\n"):format(qty)) config.settings.tome.life_lost_warning = qty @@ -494,90 +494,90 @@ function _M:generateListGameplay() end, 1)) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables or disables weather effects in some zones.\nDisabling it can gain some performance. It will not affect previously visited zones.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Weather effects#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.weather_effects and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enables or disables weather effects in some zones.\nDisabling it can gain some performance. It will not affect previously visited zones.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Weather effects#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.weather_effects and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.weather_effects = not config.settings.tome.weather_effects game:saveSettings("tome.weather_effects", ("tome.weather_effects = %s\n"):format(tostring(config.settings.tome.weather_effects))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables or disables day/night light variations effects..#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Day/night light cycle#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.daynight and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enables or disables day/night light variations effects..#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Day/night light cycle#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.daynight and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.daynight = not config.settings.tome.daynight game:saveSettings("tome.daynight", ("tome.daynight = %s\n"):format(tostring(config.settings.tome.daynight))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables easy movement using the mouse by left-clicking on the map.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Use mouse to move#WHITE##{normal}#", status=function(item) - return tostring(config.settings.mouse_move and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enables easy movement using the mouse by left-clicking on the map.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Use mouse to move#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.mouse_move and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.mouse_move = not config.settings.mouse_move game:saveSettings("mouse_move", ("mouse_move = %s\n"):format(tostring(config.settings.mouse_move))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables quick melee targeting.\nTalents that require a melee target will automatically target when pressing a direction key instead of requiring a confirmation.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Quick melee targeting#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.immediate_melee_keys and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enables quick melee targeting.\nTalents that require a melee target will automatically target when pressing a direction key instead of requiring a confirmation.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Quick melee targeting#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.immediate_melee_keys and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.immediate_melee_keys = not config.settings.tome.immediate_melee_keys game:saveSettings("tome.immediate_melee_keys", ("tome.immediate_melee_keys = %s\n"):format(tostring(config.settings.tome.immediate_melee_keys))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables quick melee targeting auto attacking.\nTalents that require a melee target will automatically target and confirm if there is only one hostile creatue around.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Quick melee targeting auto attack#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.immediate_melee_keys_auto and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enables quick melee targeting auto attacking.\nTalents that require a melee target will automatically target and confirm if there is only one hostile creatue around.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Quick melee targeting auto attack#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.immediate_melee_keys_auto and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.immediate_melee_keys_auto = not config.settings.tome.immediate_melee_keys_auto game:saveSettings("tome.immediate_melee_keys_auto", ("tome.immediate_melee_keys_auto = %s\n"):format(tostring(config.settings.tome.immediate_melee_keys_auto))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables mouse targeting. If disabled mouse movements will not change the target when casting a spell or using a talent.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Mouse targeting#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.disable_mouse_targeting and "disabled" or "enabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enables mouse targeting. If disabled mouse movements will not change the target when casting a spell or using a talent.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Mouse targeting#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.disable_mouse_targeting and _t"disabled" or _t"enabled") end, fct=function(item) config.settings.tome.disable_mouse_targeting = not config.settings.tome.disable_mouse_targeting game:saveSettings("tome.disable_mouse_targeting", ("tome.disable_mouse_targeting = %s\n"):format(tostring(config.settings.tome.disable_mouse_targeting))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Auto-validate targets. If you fire an arrow/talent/... it will automatically use the default target without asking\n#LIGHT_RED#This is dangerous. Do not enable unless you know exactly what you are doing.#WHITE#\n\nDefault target is always either one of:\n - The last creature hovered by the mouse\n - The last attacked creature\n - The closest creature"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Auto-accept target#WHITE##{normal}#", status=function(item) - return tostring(config.settings.auto_accept_target and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Auto-validate targets. If you fire an arrow/talent/... it will automatically use the default target without asking\n#LIGHT_RED#This is dangerous. Do not enable unless you know exactly what you are doing.#WHITE#\n\nDefault target is always either one of:\n - The last creature hovered by the mouse\n - The last attacked creature\n - The closest creature"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Auto-accept target#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.auto_accept_target and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.auto_accept_target = not config.settings.auto_accept_target game:saveSettings("auto_accept_target", ("auto_accept_target = %s\n"):format(tostring(config.settings.auto_accept_target))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"New games begin with some talent points auto-assigned.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Auto-assign talent points at birth#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.autoassign_talents_on_birth and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"New games begin with some talent points auto-assigned.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Auto-assign talent points at birth#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.autoassign_talents_on_birth and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.autoassign_talents_on_birth = not config.settings.tome.autoassign_talents_on_birth game:saveSettings("tome.autoassign_talents_on_birth", ("tome.autoassign_talents_on_birth = %s\n"):format(tostring(config.settings.tome.autoassign_talents_on_birth))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Always rest to full before auto-exploring.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Rest before auto-explore#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.rest_before_explore and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Always rest to full before auto-exploring.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Rest before auto-explore#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.rest_before_explore and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.rest_before_explore = not config.settings.tome.rest_before_explore game:saveSettings("tome.rest_before_explore", ("tome.rest_before_explore = %s\n"):format(tostring(config.settings.tome.rest_before_explore))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"When swaping an item with a tinker attached, swap the tinker to the newly worn item automatically.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Swap tinkers#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.tinker_auto_switch and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"When swaping an item with a tinker attached, swap the tinker to the newly worn item automatically.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Swap tinkers#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.tinker_auto_switch and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.tinker_auto_switch = not config.settings.tome.tinker_auto_switch game:saveSettings("tome.tinker_auto_switch", ("tome.tinker_auto_switch = %s\n"):format(tostring(config.settings.tome.tinker_auto_switch))) @@ -592,47 +592,47 @@ function _M:generateListOnline() local list = {} local i = 0 - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Configure the chat filters to select what kind of messages to see.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Chat message filters#WHITE##{normal}#", status=function(item) - return "select to configure" + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Configure the chat filters to select what kind of messages to see.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Chat message filters#WHITE##{normal}#"):toTString(), status=function(item) + return _t"select to configure" end, fct=function(item) game:registerDialog(require("engine.dialogs.ChatFilter").new({ - {name="Deaths", kind="death"}, - {name="Object & Creatures links", kind="link"}, + {name=_t"Deaths", kind="death"}, + {name=_t"Object & Creatures links", kind="link"}, })) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Configure the chat ignore filter.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Chat ignore list#WHITE##{normal}#", status=function(item) - return "select to configure" + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Configure the chat ignore filter.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Chat ignore list#WHITE##{normal}#"):toTString(), status=function(item) + return _t"select to configure" end, fct=function(item) game:registerDialog(require("engine.dialogs.ChatIgnores").new()) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Configure the chat channels to listen to.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Chat channels#WHITE##{normal}#", status=function(item) - return "select to configure" + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Configure the chat channels to listen to.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Chat channels#WHITE##{normal}#"):toTString(), status=function(item) + return _t"select to configure" end, fct=function(item) game:registerDialog(require("engine.dialogs.ChatChannels").new()) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Open links in external browser instead of the embedded one.\nThis does not affect addons browse and installation which always stays ingame."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Open links in external browser#WHITE##{normal}#", status=function(item) - return tostring(config.settings.open_links_external and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Open links in external browser instead of the embedded one.\nThis does not affect addons browse and installation which always stays ingame."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Open links in external browser#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.open_links_external and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.open_links_external = not config.settings.open_links_external game:saveSettings("open_links_external", ("open_links_external = %s\n"):format(tostring(config.settings.open_links_external))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enable Discord's Rich Presence integration to show your current character on your currently playing profile on Discord (restart the game to apply).\n#ANTIQUE_WHITE#If you do not use Discord this option doesn't do anything in either state."} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Discord's Rich Presence#WHITE##{normal}#", status=function(item) - return tostring(not config.settings.disable_discord and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Enable Discord's Rich Presence integration to show your current character on your currently playing profile on Discord (restart the game to apply).\n#ANTIQUE_WHITE#If you do not use Discord this option doesn't do anything in either state."):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Discord's Rich Presence#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(not config.settings.disable_discord and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.disable_discord = not config.settings.disable_discord game:saveSettings("disable_discord", ("disable_discord = %s\n"):format(tostring(config.settings.disable_discord))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Keep a copy of your character sheets (not the whole savefile) on the online vault at te4.org.\nFor each character you will be given a link to this online character sheet so that you can brag about your heroic deeds or sad deaths to your friends or the whole community.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Upload characters sheets to the online vault#WHITE##{normal}#", status=function(item) - return tostring(config.settings.upload_charsheet and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Keep a copy of your character sheets (not the whole savefile) on the online vault at te4.org.\nFor each character you will be given a link to this online character sheet so that you can brag about your heroic deeds or sad deaths to your friends or the whole community.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Upload characters sheets to the online vault#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.upload_charsheet and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.upload_charsheet = not config.settings.upload_charsheet game:saveSettings("tome.upload_charsheet", ("tome.upload_charsheet = %s\n"):format(tostring(config.settings.upload_charsheet))) @@ -640,9 +640,9 @@ function _M:generateListOnline() end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Allow various events that are pushed by the server when playing online\n#{bold}#All#{normal}#: Allow all server events (bonus zones, random events, ...)\n#{bold}#Technical help only#{normal}#: Allow administrator to help in case of bugs or weirdness and allows website services (data reset, steam achievements push, ...) to work.\n#{bold}#Disabled#{normal}#: Disallow all.\n#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Allow online events#WHITE##{normal}#", status=function(item) - return tostring(config.settings.allow_online_events == true and "all" or (config.settings.allow_online_events == "limited" and "technical help only" or "disabled")) + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Allow various events that are pushed by the server when playing online\n#{bold}#All#{normal}#: Allow all server events (bonus zones, random events, ...)\n#{bold}#Technical help only#{normal}#: Allow administrator to help in case of bugs or weirdness and allows website services (data reset, steam achievements push, ...) to work.\n#{bold}#Disabled#{normal}#: Disallow all.\n#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Allow online events#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.allow_online_events == true and _t"all" or (config.settings.allow_online_events == "limited" and _t"technical help only" or _t"disabled")) end, fct=function(item) if config.settings.allow_online_events == true then config.settings.allow_online_events = "limited" elseif config.settings.allow_online_events == "limited" then config.settings.allow_online_events = false @@ -651,7 +651,7 @@ function _M:generateListOnline() self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, scrollbar=true, text=string.toTString[[Disables all connectivity to the network. + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, scrollbar=true, text=(_t[[Disables all connectivity to the network. This includes, but is not limited to: - Player profiles: You will not be able to login, register - Characters vault: You will not be able to upload any character to the online vault to show your glory @@ -667,9 +667,9 @@ Note that this setting only affects the game itself. If you use the game launche If you do not want that, simply run the game directly: the #{bold}#only#{normal}# use of the launcher is to update the game. #{bold}##CRIMSON#This is an extremely restrictive setting. It is recommended you only activate it if you have no other choice as it will remove many fun and acclaimed features. -A full exit and restart of the game is neccessary to apply this setting.#{normal}#]]} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Disable all connectivity#WHITE##{normal}#", status=function(item) - return tostring(config.settings.disable_all_connectivity and "yes" or "no") +A full exit and restart of the game is neccessary to apply this setting.#{normal}#]]):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Disable all connectivity#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.disable_all_connectivity and _t"yes" or _t"no") end, fct=function(item) config.settings.disable_all_connectivity = not config.settings.disable_all_connectivity game:saveSettings("disable_all_connectivity", ("disable_all_connectivity = %s\n"):format(tostring(config.settings.disable_all_connectivity))) @@ -684,36 +684,36 @@ function _M:generateListMisc() local list = {} local i = 0 - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Saves in the background, allowing you to continue playing.\n#LIGHT_RED#Disabling it is not recommended.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Save in the background#WHITE##{normal}#", status=function(item) - return tostring(config.settings.background_saves and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Saves in the background, allowing you to continue playing.\n#LIGHT_RED#Disabling it is not recommended.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Save in the background#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.background_saves and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.background_saves = not config.settings.background_saves game:saveSettings("background_saves", ("background_saves = %s\n"):format(tostring(config.settings.background_saves))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Forces the game to save each level instead of each zone.\nThis makes it save more often but the game will use less memory when deep in a dungeon.\n\n#LIGHT_RED#Changing this option will not affect already visited zones.\n*THIS DOES NOT MAKE A FULL SAVE EACH LEVEL*.\n#LIGHT_RED#Disabling it is not recommended#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Zone save per level#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.save_zone_levels and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Forces the game to save each level instead of each zone.\nThis makes it save more often but the game will use less memory when deep in a dungeon.\n\n#LIGHT_RED#Changing this option will not affect already visited zones.\n*THIS DOES NOT MAKE A FULL SAVE EACH LEVEL*.\n#LIGHT_RED#Disabling it is not recommended#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Zone save per level#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.save_zone_levels and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.save_zone_levels = not config.settings.tome.save_zone_levels game:saveSettings("tome.save_zone_levels", ("tome.save_zone_levels = %s\n"):format(tostring(config.settings.tome.save_zone_levels))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Disallow boot images that could be found 'offensive'.#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Censor boot#WHITE##{normal}#", status=function(item) - return tostring(config.settings.censor_boot and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Disallow boot images that could be found 'offensive'.#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Censor boot#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.censor_boot and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.censor_boot = not config.settings.censor_boot game:saveSettings("censor_boot", ("censor_boot = %s\n"):format(tostring(config.settings.censor_boot))) self.c_list:drawItem(item) end,} - local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Replace headwear images by cloak hoods if a cloak is worn#WHITE#"} - list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Show cloak hoods#WHITE##{normal}#", status=function(item) - return tostring(config.settings.tome.show_cloak_hoods and "enabled" or "disabled") + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=(_t"Replace headwear images by cloak hoods if a cloak is worn#WHITE#"):toTString()} + list[#list+1] = { zone=zone, name=(_t"#GOLD##{bold}#Show cloak hoods#WHITE##{normal}#"):toTString(), status=function(item) + return tostring(config.settings.tome.show_cloak_hoods and _t"enabled" or _t"disabled") end, fct=function(item) config.settings.tome.show_cloak_hoods = not config.settings.tome.show_cloak_hoods game:saveSettings("tome.show_cloak_hoods", ("tome.show_cloak_hoods = %s\n"):format(tostring(config.settings.tome.show_cloak_hoods))) diff --git a/game/modules/tome/dialogs/GraphicMode.lua b/game/modules/tome/dialogs/GraphicMode.lua index 4b570d7c793147502e2d6d829e0120f64dea0ea1..310c4e97bfa8169cc3ea4484303466dc0d65dae1 100644 --- a/game/modules/tome/dialogs/GraphicMode.lua +++ b/game/modules/tome/dialogs/GraphicMode.lua @@ -30,13 +30,13 @@ local Map = require "engine.Map" module(..., package.seeall, class.inherit(Dialog)) tiles_packs = { - shockbolt = {name= "Modern", order=1}, - ascii = {name= "ASCII", order=5}, - ascii_full = {name= "ASCII with background", order=6}, - customtiles = {name= "Custom Tileset", order=7}, + shockbolt = {name= _t"Modern", order=1}, + ascii = {name= _t"ASCII", order=5}, + ascii_full = {name= _t"ASCII with background", order=6}, + customtiles = {name= _t"Custom Tileset", order=7}, } -if fs.exists("/data/gfx/altefcat") then tiles_packs.altefcat = {name= "Altefcat/Gervais", order=3} end -if fs.exists("/data/gfx/oldrpg") then tiles_packs.oldrpg = {name= "Old RPG", order=4} end +if fs.exists("/data/gfx/altefcat") then tiles_packs.altefcat = {name= _t"Altefcat/Gervais", order=3} end +if fs.exists("/data/gfx/oldrpg") then tiles_packs.oldrpg = {name= _t"Old RPG", order=4} end function _M:init() @@ -44,7 +44,7 @@ function _M:init() self:generateList() self.changed = false - Dialog.init(self, "Change graphic mode", 300, 20) + Dialog.init(self, _t"Change graphic mode", 300, 20) self.c_list = List.new{width=self.iw, nb_items=7, list=self.list, fct=function(item) self:use(item) end} @@ -74,15 +74,15 @@ function _M:isTome() end function _M:doCustomTiles() - local d = Dialog.new("Custom Tileset", 100, 100) + local d = Dialog.new(_t"Custom Tileset", 100, 100) - local help = Textzone.new{width=500, auto_height=true, text=[[You can configure the game to use a custom tileset. + local help = Textzone.new{width=500, auto_height=true, text=_t[[You can configure the game to use a custom tileset. You must place all files of your tileset in a subfolder of the modules's data/gfx/ folder, just like the existing tilesets. Each tile must be correctly named according to the existing tilesets.]]} - local dir = Textbox.new{title="Folder: ", text="", chars=30, max_len=50, fct=function() end} - local moddable_tiles = Checkbox.new{title="Use moddable tiles (equipment showing on player)", default=false, fct=function() end } - local adv_tiles = Checkbox.new{title="Use advanced tiles (transitions, wide tiles, ...)", default=false, fct=function() end } - local ok = Button.new{text="Use custom tileset", fct=function() + local dir = Textbox.new{title=_t"Folder: ", text="", chars=30, max_len=50, fct=function() end} + local moddable_tiles = Checkbox.new{title=_t"Use moddable tiles (equipment showing on player)", default=false, fct=function() end } + local adv_tiles = Checkbox.new{title=_t"Use advanced tiles (transitions, wide tiles, ...)", default=false, fct=function() end } + local ok = Button.new{text=_t"Use custom tileset", fct=function() config.settings.tome.gfx.tiles = "customtiles" config.settings.tome.gfx.tiles_custom_dir = dir.text config.settings.tome.gfx.tiles_custom_moddable = moddable_tiles.checked @@ -91,7 +91,7 @@ Each tile must be correctly named according to the existing tilesets.]]} self:use{change_sel = "main"} game:unregisterDialog(d) end} - local cancel = Button.new{text="Cancel", fct=function() game:unregisterDialog(d) end} + local cancel = Button.new{text=_t"Cancel", fct=function() game:unregisterDialog(d) end} d:loadUI{ {left=0, top=0, ui=help}, @@ -112,7 +112,7 @@ function _M:use(item) if item.sub and item.val then if item.val == "customsize" then - game:registerDialog(GetQuantity.new("Tile size", "From 10 to 128", Map.tile_w or 64, 128, function(qty) + game:registerDialog(GetQuantity.new(_t"Tile size", _t"From 10 to 128", Map.tile_w or 64, 128, function(qty) qty = math.floor(util.bound(qty, 10, 128)) self:use{name=qty.."x"..qty, sub=item.sub, val=qty.."x"..qty} end, 10)) @@ -139,8 +139,8 @@ function _M:generateList() if self.cur_sel == "main" then local cur = tiles_packs[config.settings.tome.gfx.tiles] list = { - {name="Select style [current: "..(cur and cur.name or "???").."]", change_sel="tiles"}, - {name="Select tiles size [current: "..config.settings.tome.gfx.size.."]", change_sel="size"}, + {name=("Select style [current: %s]"):tformat(cur and cur.name or "???"), change_sel="tiles"}, + {name=("Select tiles size [current: %s]"):tformat(config.settings.tome.gfx.size), change_sel="size"}, } elseif self.cur_sel == "tiles" then list = {} @@ -150,11 +150,11 @@ function _M:generateList() table.sort(list, function(a, b) return a.order < b.order end) elseif self.cur_sel == "size" then list = { - {name="64x64", sub="size", val="64x64"}, - {name="48x48", sub="size", val="48x48"}, - {name="32x32", sub="size", val="32x32"}, - {name="16x16", sub="size", val="16x16"}, - {name="Custom", sub="size", val="customsize"}, + {name=_t"64x64", sub="size", val="64x64"}, + {name=_t"48x48", sub="size", val="48x48"}, + {name=_t"32x32", sub="size", val="32x32"}, + {name=_t"16x16", sub="size", val="16x16"}, + {name=_t"Custom", sub="size", val="customsize"}, } end diff --git a/game/modules/tome/dialogs/LevelupDialog.lua b/game/modules/tome/dialogs/LevelupDialog.lua index cb462b8d2e4a1726565d3e51f45e0656fe67e126..7915392eac8bb1107a08c0bdaf22bd45ea3729c0 100644 --- a/game/modules/tome/dialogs/LevelupDialog.lua +++ b/game/modules/tome/dialogs/LevelupDialog.lua @@ -86,7 +86,7 @@ function _M:init(actor, on_finish, on_birth) end end - Dialog.init(self, "Levelup: "..actor.name..", level "..actor.level, game.w * 0.9, game.h * 0.9, game.w * 0.05, game.h * 0.05) + Dialog.init(self, ("Levelup: %s, level %s"):tformat(actor:getName(), actor.level), game.w * 0.9, game.h * 0.9, game.w * 0.05, game.h * 0.05) if game.w * 0.9 >= 1000 then self.no_tooltip = true end @@ -126,7 +126,7 @@ function _M:init(actor, on_finish, on_birth) if self.actor.unused_stats~=self.actor_dup.unused_stats or self.actor.unused_talents_types~=self.actor_dup.unused_talents_types or self.actor.unused_talents~=self.actor_dup.unused_talents or self.actor.unused_generics~=self.actor_dup.unused_generics or self.actor.unused_prodigies~=self.actor_dup.unused_prodigies or changed then - self:yesnocancelPopup("Finish","Do you accept changes?", function(yes, cancel) + self:yesnocancelPopup(_t"Finish",_t"Do you accept changes?", function(yes, cancel) if cancel then return nil else @@ -181,11 +181,11 @@ local subtleMessageOtherColor = {r=255, g=215, b=0} function _M:finish() local ok, dep_miss = self:checkDeps(true, true) if not ok and not config.settings.cheat then - self:simpleLongPopup("Impossible", "You cannot learn this talent(s): "..dep_miss, game.w * 0.4) + self:simpleLongPopup(_t"Impossible", _t"You cannot learn this talent(s): "..dep_miss, game.w * 0.4) return nil end - local txt = "#LIGHT_BLUE#Warning: You have increased some of your statistics or talent. Talent(s) actually sustained: \n %s If these are dependent on one of the stats you changed, you need to re-use them for the changes to take effect." + local txt = _t"#LIGHT_BLUE#Warning: You have increased some of your statistics or talent. Talent(s) actually sustained: \n %s If these are dependent on one of the stats you changed, you need to re-use them for the changes to take effect." local talents = "" local reset = {} for tid, act in pairs(self.actor.sustain_talents) do @@ -249,20 +249,20 @@ end function _M:incStat(sid, v) if v == 1 then if self.actor.unused_stats <= 0 then - self:subtleMessage("Not enough stat points", "You have no stat points left!", subtleMessageErrorColor) + self:subtleMessage(_t"Not enough stat points", _t"You have no stat points left!", subtleMessageErrorColor) return end if self.actor:getStat(sid, nil, nil, true) >= self.actor.level * 1.4 + 20 then - self:subtleMessage("Stat is at the maximum for your level", "You cannot increase this stat further until next level!", subtleMessageOtherColor) + self:subtleMessage(_t"Stat is at the maximum for your level", _t"You cannot increase this stat further until next level!", subtleMessageOtherColor) return end if self.actor:isStatMax(sid) or self.actor:getStat(sid, nil, nil, true) >= 60 + math.max(0, (self.actor.level - 50)) then - self:subtleMessage("Stat is at the maximum", "You cannot increase this stat further!", subtleMessageWarningColor) + self:subtleMessage(_t"Stat is at the maximum", _t"You cannot increase this stat further!", subtleMessageWarningColor) return end else if self.actor_dup:getStat(sid, nil, nil, true) == self.actor:getStat(sid, nil, nil, true) then - self:subtleMessage("Impossible", "You cannot take out more points!", subtleMessageErrorColor) + self:subtleMessage(_t"Impossible", _t"You cannot take out more points!", subtleMessageErrorColor) return end end @@ -318,7 +318,7 @@ function _M:checkDeps(simple, ignore_special) local t = self.actor:getTalentFromId(t_id) local ok, reason = self.actor:canLearnTalent(t, 0, ignore_special) if not ok and (self.actor:knowTalent(t) or force) then talents = talents.."\n#GOLD##{bold}# - "..t.name.."#{normal}##LAST#("..reason..")" end - if reason == "not enough stat" then + if reason == _t"not enough stat" then stats_ok = false end @@ -363,19 +363,19 @@ end function _M:learnTalent(t_id, v) self.talents_learned[t_id] = self.talents_learned[t_id] or 0 local t = self.actor:getTalentFromId(t_id) - local t_type, t_index = "class", "unused_talents" - if t.generic then t_type, t_index = "generic", "unused_generics" end + local t_type, t_index = _t"class", "unused_talents" + if t.generic then t_type, t_index = _t"generic", "unused_generics" end if v then if self.actor[t_index] < 1 then - self:subtleMessage("Not enough "..t_type.." talent points", "You have no "..t_type.." talent points left!", subtleMessageErrorColor) + self:subtleMessage(("Not enough %s talent points"):tformat(t_type), ("You have no %s talent points left!"):tformat(t_type), subtleMessageErrorColor) return end if not self.actor:canLearnTalent(t) then - self:subtleMessage("Cannot learn talent", "Prerequisites not met!", subtleMessageErrorColor) + self:subtleMessage(_t"Cannot learn talent", _t"Prerequisites not met!", subtleMessageErrorColor) return end if self.actor:getTalentLevelRaw(t_id) >= self:getMaxTPoints(t) then - self:subtleMessage("Already known", "You already fully know this talent!", subtleMessageWarningColor) + self:subtleMessage(_t"Already known", _t"You already fully know this talent!", subtleMessageWarningColor) return end self.actor:learnTalent(t_id, true) @@ -385,15 +385,15 @@ function _M:learnTalent(t_id, v) self.new_talents_changed = true else if not self.actor:knowTalent(t_id) then - self:subtleMessage("Impossible", "You do not know this talent!", subtleMessageErrorColor) + self:subtleMessage(_t"Impossible", _t"You do not know this talent!", subtleMessageErrorColor) return end if not self:isUnlearnable(t, true) and self.actor_dup:getTalentLevelRaw(t_id) >= self.actor:getTalentLevelRaw(t_id) then local _, could = self:isUnlearnable(t, true) if could then - self:subtleMessage("Impossible here", "You must be out of combat or in a quiet place like a #{bold}#town#{normal}# to unlearn this talent.", {r=200, g=200, b=255}) + self:subtleMessage(_t"Impossible here", _t"You must be out of combat or in a quiet place like a #{bold}#town#{normal}# to unlearn this talent.", {r=200, g=200, b=255}) else - self:subtleMessage("Impossible", "You cannot unlearn this talent!", subtleMessageErrorColor) + self:subtleMessage(_t"Impossible", _t"You cannot unlearn this talent!", subtleMessageErrorColor) end return end @@ -402,13 +402,13 @@ function _M:learnTalent(t_id, v) local _, reason = self.actor:canLearnTalent(t, 0) local ok, dep_miss, stats_ok = self:checkDeps(nil, true) self.actor:learnTalent(t_id, true, nil, {no_unlearn=true}) - if ok or reason == "not enough stat" or not stats_ok then + if ok or reason == _t"not enough stat" or not stats_ok then self.actor:unlearnTalent(t_id) self.actor[t_index] = self.actor[t_index] + 1 self.talents_learned[t_id] = self.talents_learned[t_id] - 1 self.new_talents_changed = true else - self:simpleLongPopup("Impossible", "You cannot unlearn this talent because of talent(s): "..dep_miss, game.w * 0.4) + self:simpleLongPopup(_t"Impossible", _t"You cannot unlearn this talent because of talent(s): "..dep_miss, game.w * 0.4) return end end @@ -419,15 +419,15 @@ function _M:learnType(tt, v) self.talent_types_learned[tt] = self.talent_types_learned[tt] or {} if v then if self.actor:knowTalentType(tt) and self.actor.__increased_talent_types[tt] and self.actor.__increased_talent_types[tt] >= 1 then - self:subtleMessage("Impossible", "You can only improve a category mastery once!", subtleMessageWarningColor) + self:subtleMessage(_t"Impossible", _t"You can only improve a category mastery once!", subtleMessageWarningColor) return end if self.actor.unused_talents_types <= 0 then - self:subtleMessage("Not enough talent category points", "You have no category points left!", subtleMessageErrorColor) + self:subtleMessage(_t"Not enough talent category points", _t"You have no category points left!", subtleMessageErrorColor) return end if not self.actor.talents_types_def[tt] or (self.actor.talents_types_def[tt].min_lev or 0) > self.actor.level then - self:simplePopup("Too low level", ("This talent tree only provides talents starting at level %d. Learning it now would be useless."):format(self.actor.talents_types_def[tt].min_lev)) + self:simplePopup(_t"Too low level", ("This talent tree only provides talents starting at level %d. Learning it now would be useless."):tformat(self.actor.talents_types_def[tt].min_lev)) return end if not self.actor:knowTalentType(tt) then @@ -443,15 +443,15 @@ function _M:learnType(tt, v) self.new_talents_changed = true else if self.actor_dup:knowTalentType(tt) == true and self.actor:knowTalentType(tt) == true and (self.actor_dup.__increased_talent_types[tt] or 0) >= (self.actor.__increased_talent_types[tt] or 0) then - self:subtleMessage("Impossible", "You cannot take out more points!", subtleMessageErrorColor) + self:subtleMessage(_t"Impossible", _t"You cannot take out more points!", subtleMessageErrorColor) return end if self.actor_dup:knowTalentType(tt) == true and self.actor:knowTalentType(tt) == true and (self.actor.__increased_talent_types[tt] or 0) == 0 then - self:subtleMessage("Impossible", "You cannot unlearn this category!", subtleMessageWarningColor) + self:subtleMessage(_t"Impossible", _t"You cannot unlearn this category!", subtleMessageWarningColor) return end if not self.actor:knowTalentType(tt) then - self:subtleMessage("Impossible", "You do not know this category!", subtleMessageErrorColor) + self:subtleMessage(_t"Impossible", _t"You do not know this category!", subtleMessageErrorColor) return end @@ -469,7 +469,7 @@ function _M:learnType(tt, v) self.new_talents_changed = true self.talent_types_learned[tt][1] = nil else - self:simpleLongPopup("Impossible", "You cannot unlearn this category because of: "..dep_miss, game.w * 0.4) + self:simpleLongPopup(_t"Impossible", ("You cannot unlearn this category because of: %s"):tformat(dep_miss), game.w * 0.4) self.actor:learnTalentType(tt) return end @@ -493,12 +493,12 @@ function _M:generateList() local isgeneric = self.actor.talents_types_def[tt.type].generic local tshown = (self.actor.__hidden_talent_types[tt.type] == nil and ttknown) or (self.actor.__hidden_talent_types[tt.type] ~= nil and not self.actor.__hidden_talent_types[tt.type]) local node = { - name=function(item) return tstring{{"font", "bold"}, cat:capitalize().." / "..tt.name:capitalize() ..(" (%s)"):format((isgeneric and "generic" or "class")), {"font", "normal"}} end, - rawname=function(item) return cat:capitalize().." / "..tt.name:capitalize() ..(" (x%.2f)"):format(self.actor:getTalentTypeMastery(item.type)) end, + name=function(item) return tstring{{"font", "bold"}, _t(cat):capitalize().." / "..tt.name:capitalize() ..(" (%s)"):format((isgeneric and _t"generic" or _t"class")), {"font", "normal"}} end, + rawname=function(item) return _t(cat):capitalize().." / "..tt.name:capitalize() ..(" (x%.2f)"):format(self.actor:getTalentTypeMastery(item.type)) end, type=tt.type, color=function(item) return ((self.actor:knowTalentType(item.type) ~= self.actor_dup:knowTalentType(item.type)) or ((self.actor.__increased_talent_types[item.type] or 0) ~= (self.actor_dup.__increased_talent_types[item.type] or 0))) and {255, 215, 0} or self.actor:knowTalentType(item.type) and {0,200,0} or {175,175,175} end, shown = tshown, - status = function(item) return self.actor:knowTalentType(item.type) and tstring{{"font", "bold"}, ((self.actor.__increased_talent_types[item.type] or 0) >=1) and {"color", 255, 215, 0} or {"color", 0x00, 0xFF, 0x00}, ("%.2f"):format(self.actor:getTalentTypeMastery(item.type)), {"font", "normal"}} or tstring{{"color", 0xFF, 0x00, 0x00}, "unknown"} end, + status = function(item) return self.actor:knowTalentType(item.type) and tstring{{"font", "bold"}, ((self.actor.__increased_talent_types[item.type] or 0) >=1) and {"color", 255, 215, 0} or {"color", 0x00, 0xFF, 0x00}, ("%.2f"):format(self.actor:getTalentTypeMastery(item.type)), {"font", "normal"}} or tstring{{"color", 0xFF, 0x00, 0x00}, _t"unknown"} end, nodes = {}, isgeneric = isgeneric and 0 or 1, order_id = i, @@ -571,7 +571,7 @@ function _M:generateList() for i, sid in ipairs{self.actor.STAT_STR, self.actor.STAT_DEX, self.actor.STAT_CON, self.actor.STAT_MAG, self.actor.STAT_WIL, self.actor.STAT_CUN } do local s = self.actor.stats_def[sid] - local e = engine.Entity.new{image="stats/"..s.name:lower()..".png", is_stat=true} + local e = engine.Entity.new{image="stats/"..(s.original_name or s.name):lower()..".png", is_stat=true} e:getMapObjects(game.uiset.hotkeys_display_icons.tiles, {}, 1) stats[#stats+1] = {shown=true, nodes={{ @@ -607,32 +607,32 @@ end -- UI Stuff ----------------------------------------------------------------- -local _points_left = [[ +local _points_left = _t[[ Stats points left: #00FF00#%d#LAST# Category points left: #00FF00#%d#LAST# Class talent points left: #00FF00#%d#LAST# Generic talent points left: #00FF00#%d#LAST#]] -local desc_stats = ([[Stat points allow you to increase your core stats. +local desc_stats = (_t[[Stat points allow you to increase your core stats. Each level you gain 3 new stat points to use. You may only increase stats to a natural maximum of 60 or lower (relative to your level).]]):toTString() -local desc_class = ([[Class talent points allow you to learn new class talents or improve them. +local desc_class = (_t[[Class talent points allow you to learn new class talents or improve them. Class talents are core to your class and can not be learnt by training. Each level you gain 1 new class point to use. Each five levels you gain one more. ]]):toTString() -local desc_generic = ([[Generic talent points allow you to learn new generic talents or improve them. +local desc_generic = (_t[[Generic talent points allow you to learn new generic talents or improve them. Generic talents comes from your class, your race or various outside training you can get during your adventures. Each level you gain 1 new generic point to use. Each five levels you gain one less. ]]):toTString() -local desc_types = ([[Talent category points allow you to either: +local desc_types = (_t[[Talent category points allow you to either: - learn a new talent (class or generic) category - improve a known talent category efficiency by 0.2 - learn a new inscription slot (up to a maximum of 5, learning it is automatic when using an inscription) @@ -640,13 +640,13 @@ local desc_types = ([[Talent category points allow you to either: You gain a new point at level 10, 20 and 34. Some races or items may increase them as well.]]):toTString() -local desc_prodigies = ([[Prodigies are special talents that only the most powerful of characters can attain. +local desc_prodigies = (_t[[Prodigies are special talents that only the most powerful of characters can attain. All of them require at least 50 in a core stat and many also have more special demands. You can learn a new prodigy at level 25 and 42.]]):toTString() -local desc_inscriptions = ([[You can use a category point to unlock a new inscription slot (up to 5 slots).]]):toTString() +local desc_inscriptions = (_t[[You can use a category point to unlock a new inscription slot (up to 5 slots).]]):toTString() function _M:createDisplay() - self.b_prodigies = Button.new{text="Prodigies", fct=function() + self.b_prodigies = Button.new{text=_t"Prodigies", fct=function() self.on_finish_prodigies = self.on_finish_prodigies or {} local d = require("mod.dialogs.UberTalent").new(self.actor, self.on_finish_prodigies) game:registerDialog(d) @@ -661,20 +661,20 @@ function _M:createDisplay() end} if self.actor.inscriptions_slots_added < 2 then - self.b_inscriptions = Button.new{text="Inscriptions", fct=function() + self.b_inscriptions = Button.new{text=_t"Inscriptions", fct=function() if self.actor.inscriptions_slots_added >= 2 then - Dialog:simplePopup("Inscriptions", "You have learnt all the inscription slots you could.") + Dialog:simplePopup(_t"Inscriptions", _t"You have learnt all the inscription slots you could.") else if self.actor.unused_talents_types > 0 then - Dialog:yesnoPopup("Inscriptions", ("You can learn %d new slot(s). Do you wish to buy one with one category point?"):format(2 - self.actor.inscriptions_slots_added), function(ret) if ret then + Dialog:yesnoPopup(_t"Inscriptions", ("You can learn %d new slot(s). Do you wish to buy one with one category point?"):tformat(2 - self.actor.inscriptions_slots_added), function(ret) if ret then self.actor.unused_talents_types = self.actor.unused_talents_types - 1 self.actor.max_inscriptions = self.actor.max_inscriptions + 1 self.actor.inscriptions_slots_added = self.actor.inscriptions_slots_added + 1 - self.b_types.text = "Category points: "..self.actor.unused_talents_types + self.b_types.text = ("Category points: %s"):tformat(self.actor.unused_talents_types) self.b_types:generate() end end) else - Dialog:simplePopup("Inscriptions", ("You can still learn %d new slot(s) but you need a category point."):format(2 - self.actor.inscriptions_slots_added)) + Dialog:simplePopup(_t"Inscriptions", ("You can still learn %d new slot(s) but you need a category point."):tformat(2 - self.actor.inscriptions_slots_added)) end end end, on_select=function() @@ -693,7 +693,7 @@ function _M:createDisplay() local recreate_trees = function() self.c_ctree = TalentTrees.new{ - font = core.display.newFont("/data/font/DroidSans.ttf", 14), + font = core.display.newFont(FontPackage:getFont("default"), 14), tiles=game.uiset.hotkeys_display_icons, tree=self.ctree, width=320, height=self.ih-50, @@ -714,7 +714,7 @@ function _M:createDisplay() } self.c_gtree = TalentTrees.new{ - font = core.display.newFont("/data/font/DroidSans.ttf", 14), + font = core.display.newFont(FontPackage:getFont("default"), 14), tiles=game.uiset.hotkeys_display_icons, tree=self.gtree, width=320, height=(self.no_tooltip and self.ih - 50) or self.ih-50 - math.max((not self.b_prodigies and 0 or self.b_prodigies.h + 5), (not self.b_inscriptions and 0 or self.b_inscriptions.h + 5)), @@ -736,7 +736,7 @@ function _M:createDisplay() recreate_trees() self.c_stat = TalentTrees.new{ - font = core.display.newFont("/data/font/DroidSans.ttf", 14), + font = core.display.newFont(FontPackage:getFont("default"), 14), tiles=game.uiset.hotkeys_display_icons, tree=self.tree_stats, no_cross = true, width=50, height=self.ih, @@ -755,7 +755,7 @@ function _M:createDisplay() no_tooltip = self.no_tooltip, } - self.b_stat = Button.new{can_focus = false, can_focus_mouse=true, text="Stats: "..self.actor.unused_stats, fct=function() end, on_select=function() + self.b_stat = Button.new{can_focus = false, can_focus_mouse=true, text=("Stats: %s"):tformat(self.actor.unused_stats), fct=function() end, on_select=function() local str = desc_stats if self.no_tooltip then self.c_desc:erase() @@ -764,7 +764,7 @@ function _M:createDisplay() game:tooltipDisplayAtMap(self.b_stat.last_display_x + self.b_stat.w, self.b_stat.last_display_y, str) end end} - self.b_class = Button.new{can_focus = false, can_focus_mouse=true, text="Class points: "..self.actor.unused_talents, fct=function() end, on_select=function() + self.b_class = Button.new{can_focus = false, can_focus_mouse=true, text=("Class points: %s"):tformat(self.actor.unused_talents), fct=function() end, on_select=function() local str = desc_class if self.no_tooltip then self.c_desc:erase() @@ -773,7 +773,7 @@ function _M:createDisplay() game:tooltipDisplayAtMap(self.b_stat.last_display_x + self.b_stat.w, self.b_stat.last_display_y, str) end end} - self.b_generic = Button.new{can_focus = false, can_focus_mouse=true, text="Generic points: "..self.actor.unused_generics, fct=function() end, on_select=function() + self.b_generic = Button.new{can_focus = false, can_focus_mouse=true, text=("Generic points: %s"):tformat(self.actor.unused_generics), fct=function() end, on_select=function() local str = desc_generic if self.no_tooltip then self.c_desc:erase() @@ -782,7 +782,7 @@ function _M:createDisplay() game:tooltipDisplayAtMap(self.b_stat.last_display_x + self.b_stat.w, self.b_stat.last_display_y, str) end end} - self.b_types = Button.new{can_focus = false, can_focus_mouse=true, text="Category points: "..self.actor.unused_talents_types, fct=function() end, on_select=function() + self.b_types = Button.new{can_focus = false, can_focus_mouse=true, text=("Category points: %s"):tformat(self.actor.unused_talents_types), fct=function() end, on_select=function() local str = desc_types if self.no_tooltip then self.c_desc:erase() @@ -792,7 +792,7 @@ function _M:createDisplay() end end} - self.c_hide_unknown = Checkbox.new{title="Hide unlearnt categories", default=self.actor.levelup_hide_unknown_catgories, fct=function() end, on_change=function(s) + self.c_hide_unknown = Checkbox.new{title=_t"Hide unlearnt categories", default=self.actor.levelup_hide_unknown_catgories, fct=function() end, on_change=function(s) self.actor.levelup_hide_unknown_catgories = s self:generateList() local oldctree, oldgtree = self.c_ctree, self.c_gtree @@ -802,7 +802,7 @@ function _M:createDisplay() end} self.t_messages = StatusBox.new{ - font = core.display.newFont("/data/font/DroidSans.ttf", 16), + font = core.display.newFont(FontPackage:getFont("default"), 16), width = math.floor(2 * self.iw / 3), delay = 1, } local vsep1 = Separator.new{dir="horizontal", size=self.ih - self.b_stat.h - 10} @@ -858,57 +858,57 @@ function _M:getStatDesc(item) local color = diff >= 0 and {"color", "LIGHT_GREEN"} or {"color", "RED"} local dc = {"color", "LAST"} - text:add("Current value: ", {"color", "LIGHT_GREEN"}, ("%d"):format(self.actor:getStat(stat_id)), dc, true) - text:add("Base value: ", {"color", "LIGHT_GREEN"}, ("%d"):format(self.actor:getStat(stat_id, nil, nil, true)), dc, true, true) + text:add(_t"Current value: ", {"color", "LIGHT_GREEN"}, ("%d"):format(self.actor:getStat(stat_id)), dc, true) + text:add(_t"Base value: ", {"color", "LIGHT_GREEN"}, ("%d"):format(self.actor:getStat(stat_id, nil, nil, true)), dc, true, true) - text:add({"color", "LIGHT_BLUE"}, "Stat gives:", dc, true) + text:add({"color", "LIGHT_BLUE"}, _t"Stat gives:", dc, true) if stat_id == self.actor.STAT_CON then local multi_life = 4 + (self.actor.inc_resource_multi.life or 0) - text:add("Max life: ", color, ("%0.2f"):format(diff * multi_life), dc, true) - text:add("Physical save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) - text:add("Healing mod: ", color, ("%0.1f%%"):format((self.actor:combatStatLimit("con", 1.5, 0, 0.5) - self.actor_dup:combatStatLimit("con", 1.5, 0, 0.5))*100), dc, true) + text:add(_t"Max life: ", color, ("%0.2f"):format(diff * multi_life), dc, true) + text:add(_t"Physical save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) + text:add(_t"Healing mod: ", color, ("%0.1f%%"):format((self.actor:combatStatLimit("con", 1.5, 0, 0.5) - self.actor_dup:combatStatLimit("con", 1.5, 0, 0.5))*100), dc, true) elseif stat_id == self.actor.STAT_WIL then if self.actor:knowTalent(self.actor.T_MANA_POOL) then local multi_mana = 5 + (self.actor.inc_resource_multi.mana or 0) - text:add("Max mana: ", color, ("%0.2f"):format(diff * multi_mana), dc, true) + text:add(_t"Max mana: ", color, ("%0.2f"):format(diff * multi_mana), dc, true) end if self.actor:knowTalent(self.actor.T_STAMINA_POOL) then local multi_stamina = 2.5 + (self.actor.inc_resource_multi.stamina or 0) - text:add("Max stamina: ", color, ("%0.2f"):format(diff * multi_stamina), dc, true) + text:add(_t"Max stamina: ", color, ("%0.2f"):format(diff * multi_stamina), dc, true) end if self.actor:knowTalent(self.actor.T_PSI_POOL) then local multi_psi = 1 + (self.actor.inc_resource_multi.psi or 0) - text:add("Max psi: ", color, ("%0.2f"):format(diff * multi_psi), dc, true) + text:add(_t"Max psi: ", color, ("%0.2f"):format(diff * multi_psi), dc, true) end - text:add("Mindpower: ", color, ("%0.2f"):format(diff * 0.7), dc, true) - text:add("Mental save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) - text:add("Spell save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) + text:add(_t"Mindpower: ", color, ("%0.2f"):format(diff * 0.7), dc, true) + text:add(_t"Mental save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) + text:add(_t"Spell save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) -- if self.actor:attr("use_psi_combat") then -- text:add("Accuracy: ", color, ("%0.2f"):format(diff * 0.35), dc, true) -- end elseif stat_id == self.actor.STAT_STR then - text:add("Physical power: ", color, ("%0.2f"):format(diff), dc, true) - text:add("Max encumbrance: ", color, ("%0.2f"):format(diff * 1.8), dc, true) - text:add("Physical save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) + text:add(_t"Physical power: ", color, ("%0.2f"):format(diff), dc, true) + text:add(_t"Max encumbrance: ", color, ("%0.2f"):format(diff * 1.8), dc, true) + text:add(_t"Physical save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) elseif stat_id == self.actor.STAT_CUN then - text:add("Crit. chance: ", color, ("%0.2f"):format(diff * 0.3), dc, true) - text:add("Mental save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) - text:add("Mindpower: ", color, ("%0.2f"):format(diff * 0.4), dc, true) + text:add(_t"Crit. chance: ", color, ("%0.2f"):format(diff * 0.3), dc, true) + text:add(_t"Mental save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) + text:add(_t"Mindpower: ", color, ("%0.2f"):format(diff * 0.4), dc, true) if self.actor:attr("use_psi_combat") then - text:add("Accuracy: ", color, ("%0.2f"):format(diff * 0.35), dc, true) + text:add(_t"Accuracy: ", color, ("%0.2f"):format(diff * 0.35), dc, true) end elseif stat_id == self.actor.STAT_MAG then - text:add("Spell save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) - text:add("Spellpower: ", color, ("%0.2f"):format(diff * 1), dc, true) + text:add(_t"Spell save: ", color, ("%0.2f"):format(diff * 0.35), dc, true) + text:add(_t"Spellpower: ", color, ("%0.2f"):format(diff * 1), dc, true) elseif stat_id == self.actor.STAT_DEX then - text:add("Defense: ", color, ("%0.2f"):format(diff * 0.35), dc, true) - text:add("Ranged defense: ", color, ("%0.2f"):format(diff * 0.35), dc, true) - text:add("Accuracy: ", color, ("%0.2f"):format(diff), dc, true) - text:add("Shrug off criticals chance: ", color, ("%0.2f%%"):format(diff * 0.3), dc, true) + text:add(_t"Defense: ", color, ("%0.2f"):format(diff * 0.35), dc, true) + text:add(_t"Ranged defense: ", color, ("%0.2f"):format(diff * 0.35), dc, true) + text:add(_t"Accuracy: ", color, ("%0.2f"):format(diff), dc, true) + text:add(_t"Shrug off criticals chance: ", color, ("%0.2f%%"):format(diff * 0.3), dc, true) end if self.actor.player and self.desc_def and self.desc_def.getStatDesc and self.desc_def.getStatDesc(stat_id, self.actor) then - text:add({"color", "LIGHT_BLUE"}, "Class powers:", dc, true) + text:add({"color", "LIGHT_BLUE"}, _t"Class powers:", dc, true) text:add(self.desc_def.getStatDesc(stat_id, self.actor)) end return text @@ -923,15 +923,15 @@ function _M:getTalentDesc(item) text:add(true, true) if item.type then - text:add({"color",0x00,0xFF,0xFF}, "Talent Category", true) - text:add({"color",0x00,0xFF,0xFF}, "A talent category contains talents you may learn. You gain a talent category point at level 10, 20 and 34. You may also find trainers or artifacts that allow you to learn more.\nA talent category point can be used either to learn a new category or increase the mastery of a known one.", true, true, {"color", "WHITE"}) + text:add({"color",0x00,0xFF,0xFF}, _t"Talent Category", true) + text:add({"color",0x00,0xFF,0xFF}, _t"A talent category contains talents you may learn. You gain a talent category point at level 10, 20 and 34. You may also find trainers or artifacts that allow you to learn more.\nA talent category point can be used either to learn a new category or increase the mastery of a known one.", true, true, {"color", "WHITE"}) if self.actor.talents_types_def[item.type].generic then - text:add({"color",0x00,0xFF,0xFF}, "Generic talent tree", true) - text:add({"color",0x00,0xFF,0xFF}, "A generic talent allows you to perform various utility actions and improve your character. It represents a skill anybody can learn (should you find a trainer for it). You gain one point every level (except every 5th level). You may also find trainers or artifacts that allow you to learn more.", true, true, {"color", "WHITE"}) + text:add({"color",0x00,0xFF,0xFF}, _t"Generic talent tree", true) + text:add({"color",0x00,0xFF,0xFF}, _t"A generic talent allows you to perform various utility actions and improve your character. It represents a skill anybody can learn (should you find a trainer for it). You gain one point every level (except every 5th level). You may also find trainers or artifacts that allow you to learn more.", true, true, {"color", "WHITE"}) else - text:add({"color",0x00,0xFF,0xFF}, "Class talent tree", true) - text:add({"color",0x00,0xFF,0xFF}, "A class talent allows you to perform new combat moves, cast spells, and improve your character. It represents the core function of your class. You gain one point every level and two every 5th level. You may also find trainers or artifacts that allow you to learn more.", true, true, {"color", "WHITE"}) + text:add({"color",0x00,0xFF,0xFF}, _t"Class talent tree", true) + text:add({"color",0x00,0xFF,0xFF}, _t"A class talent allows you to perform new combat moves, cast spells, and improve your character. It represents the core function of your class. You gain one point every level and two every 5th level. You may also find trainers or artifacts that allow you to learn more.", true, true, {"color", "WHITE"}) end text:add(self.actor:getTalentTypeFrom(item.type).description) @@ -942,12 +942,12 @@ function _M:getTalentDesc(item) local unlearnable, could_unlearn = self:isUnlearnable(t, true) if unlearnable then local max = tostring(self.actor:lastLearntTalentsMax(t.generic and "generic" or "class")) - text:add({"color","LIGHT_BLUE"}, "This talent was recently learnt; you can still unlearn it.", true, "The last ", max, t.generic and " generic" or " class", " talents you learnt are always unlearnable.", {"color","LAST"}, true, true) + text:add({"color","LIGHT_BLUE"}, _t"This talent was recently learnt; you can still unlearn it.", true, ("The last %d %s talents you learnt are always unlearnable."):tformat(max, t.generic and _t" generic" or _t" class"), " ", {"color","LAST"}, true, true) elseif t.no_unlearn_last then - text:add({"color","YELLOW"}, "This talent can alter the world in a permanent way; as such, you can never unlearn it once known.", {"color","LAST"}, true, true) + text:add({"color","YELLOW"}, _t"This talent can alter the world in a permanent way; as such, you can never unlearn it once known.", {"color","LAST"}, true, true) elseif could_unlearn then local max = tostring(self.actor:lastLearntTalentsMax(t.generic and "generic" or "class")) - text:add({"color","LIGHT_BLUE"}, "This talent was recently learnt; you can still unlearn it if you are out of combat or in a quiet area like a #{bold}#town#{normal}#.", true, "The last ", max, t.generic and " generic" or " class", " talents you learnt are always unlearnable.", {"color","LAST"}, true, true) + text:add({"color","LIGHT_BLUE"}, _t"This talent was recently learnt; you can still unlearn it if you are out of combat or in a quiet area like a #{bold}#town#{normal}#.", true, ("The last %d %s talents you learnt are always unlearnable."):tformat(max, t.generic and _t" generic" or _t" class"), {"color","LAST"}, true, true) end local traw = self.actor:getTalentLevelRaw(t.id) @@ -960,7 +960,7 @@ function _M:getTalentDesc(item) if traw == 0 then local req = self.actor:getTalentReqDesc(item.talent, 1):toTString():tokenize(" ()[]") text:add{"color","WHITE"} - text:add({"font", "bold"}, "First talent level: ", tostring(traw+1), {"font", "normal"}) + text:add({"font", "bold"}, _t"First talent level: ", tostring(traw+1), {"font", "normal"}) text:add(true) text:merge(req) text:merge(self.actor:getTalentFullDescription(t, 1000):diffWith(self.actor:getTalentFullDescription(t, 1), diff_color)) @@ -968,13 +968,13 @@ function _M:getTalentDesc(item) local req = self.actor:getTalentReqDesc(item.talent):toTString():tokenize(" ()[]") local req2 = self.actor:getTalentReqDesc(item.talent, 1):toTString():tokenize(" ()[]") text:add{"color","WHITE"} - text:add({"font", "bold"}, traw == 0 and "Next talent level" or "Current talent level: ", tostring(traw), " [-> ", tostring(traw + 1), "]", {"font", "normal"}) + text:add({"font", "bold"}, traw == 0 and _t"Next talent level" or _t"Current talent level: ", tostring(traw), " [-> ", tostring(traw + 1), "]", {"font", "normal"}) text:add(true) text:merge(req2:diffWith(req, diff_full)) text:merge(self.actor:getTalentFullDescription(t, 1):diffWith(self.actor:getTalentFullDescription(t), diff_full)) else local req = self.actor:getTalentReqDesc(item.talent):toTString():tokenize(" ()[]") - text:add({"font", "bold"}, "Current talent level: "..traw, {"font", "normal"}) + text:add({"font", "bold"}, _t"Current talent level: "..traw, {"font", "normal"}) text:add(true) text:merge(req) text:merge(self.actor:getTalentFullDescription(t, 1000):diffWith(self.actor:getTalentFullDescription(t), diff_color)) @@ -1002,13 +1002,13 @@ function _M:onUseTalent(item, inc) self.c_gtree:redrawAllItems() end - self.b_stat.text = "Stats: "..self.actor.unused_stats + self.b_stat.text = ("Stats: %s"):tformat(self.actor.unused_stats) self.b_stat:generate() - self.b_class.text = "Class points: "..self.actor.unused_talents + self.b_class.text = ("Class points: %s"):tformat(self.actor.unused_talents) self.b_class:generate() - self.b_generic.text = "Generic points: "..self.actor.unused_generics + self.b_generic.text = ("Generic points: %s"):tformat(self.actor.unused_generics) self.b_generic:generate() - self.b_types.text = "Category points: "..self.actor.unused_talents_types + self.b_types.text = ("Category points: %s"):tformat(self.actor.unused_talents_types) self.b_types:generate() end diff --git a/game/modules/tome/dialogs/LorePopup.lua b/game/modules/tome/dialogs/LorePopup.lua index 6de6a29e42064adc7eb36f5fe868e7b899d5dbc3..3515f4a4002ac1d03b6fde29468ffa6fed05db22 100644 --- a/game/modules/tome/dialogs/LorePopup.lua +++ b/game/modules/tome/dialogs/LorePopup.lua @@ -32,7 +32,7 @@ function _M:init(l, w, force_height) self.ui = l.special_ui or "parchment" - Dialog.init(self, "Lore found: #0080FF#"..l.name, 1, 1) + Dialog.init(self, ("Lore found: #0080FF#%s"):tformat(l.name), 1, 1) local text = util.getval(l.lore, true).."\n" local list = text:splitLines(w - 10, self.font) diff --git a/game/modules/tome/dialogs/MapMenu.lua b/game/modules/tome/dialogs/MapMenu.lua index 6ba2db144b87cc35011b5df824d34fabfc0a94df..208908ecbfc8dd7f44ec137b8adb9d966b295677 100644 --- a/game/modules/tome/dialogs/MapMenu.lua +++ b/game/modules/tome/dialogs/MapMenu.lua @@ -32,7 +32,7 @@ function _M:init(mx, my, tmx, tmy, extra) self:generateList() self.__showup = false - local name = "Actions" + local name = _t"Actions" local w = self.font_bold:size(name) engine.ui.Dialog.init(self, name, 1, 100, mx, my) @@ -100,7 +100,7 @@ function _M:use(item) elseif act == "debug-inventory" then local d local actor = item.actor - d = item.actor:showEquipInven(item.actor.name..": Inventory", nil, function(o, inven, item, button, event) + d = item.actor:showEquipInven(("%s: Inventory"):tformat(item.actor:getName()), nil, function(o, inven, item, button, event) if not o then return end local ud = require("mod.dialogs.UseItemDialog").new(event == "button", actor, o, item, inven, function(_, _, _, stop) d:generate() @@ -134,29 +134,29 @@ function _M:generateList() local p = game.level.map(self.tmx, self.tmy, Map.PROJECTILE) -- Generic actions - if g and g.change_level and self.on_player then list[#list+1] = {name="Change level", action="change_level", color=colors.simple(colors.VIOLET)} end - if o and self.on_player then list[#list+1] = {name="Pickup item", action="pickup", color=colors.simple(colors.ANTIQUE_WHITE)} end - if g and not self.on_player then list[#list+1] = {name="Move to", action="move_to", color=colors.simple(colors.ANTIQUE_WHITE)} end - if a and not self.on_player and game.party:canControl(a, false) then list[#list+1] = {name="Control", action="control", color=colors.simple(colors.TEAL), actor=a} end - if a and not self.on_player and game.party:canOrder(a, false) then list[#list+1] = {name="Give order", action="order", color=colors.simple(colors.TEAL), actor=a} end - - if a and not self.on_player and config.settings.cheat then list[#list+1] = {name="Target player", action="target-player", color=colors.simple(colors.RED), actor=a} end - if a and config.settings.cheat then list[#list+1] = {name="Lua inspect [Actor]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=a} end - if g and config.settings.cheat then list[#list+1] = {name="Lua inspect [Terrain]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=g} end - if t and config.settings.cheat then list[#list+1] = {name="Lua inspect [Trap]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=t} end - if p and config.settings.cheat then list[#list+1] = {name="Lua inspect [Projectile]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=p} end - if a and config.settings.cheat then list[#list+1] = {name="Show inventory", action="debug-inventory", color=colors.simple(colors.YELLOW), actor=a} end - - if self.on_player then list[#list+1] = {name="Rest a while", action="rest", color=colors.simple(colors.ANTIQUE_WHITE)} end - if self.on_player then list[#list+1] = {name="Auto-explore", action="autoexplore", color=colors.simple(colors.ANTIQUE_WHITE)} end - if self.on_player then list[#list+1] = {name="Inventory", action="inventory", color=colors.simple(colors.ANTIQUE_WHITE)} end - if self.on_player then list[#list+1] = {name="Quest Log", action="quests", color=colors.simple(colors.ANTIQUE_WHITE)} end - if a and game.player:canSee(a) then list[#list+1] = {name="Inspect Creature", action="character_sheet", color=colors.simple(colors.ANTIQUE_WHITE), actor=a} end + if g and g.change_level and self.on_player then list[#list+1] = {name=_t"Change level", action="change_level", color=colors.simple(colors.VIOLET)} end + if o and self.on_player then list[#list+1] = {name=_t"Pickup item", action="pickup", color=colors.simple(colors.ANTIQUE_WHITE)} end + if g and not self.on_player then list[#list+1] = {name=_t"Move to", action="move_to", color=colors.simple(colors.ANTIQUE_WHITE)} end + if a and not self.on_player and game.party:canControl(a, false) then list[#list+1] = {name=_t"Control", action="control", color=colors.simple(colors.TEAL), actor=a} end + if a and not self.on_player and game.party:canOrder(a, false) then list[#list+1] = {name=_t"Give order", action="order", color=colors.simple(colors.TEAL), actor=a} end + + if a and not self.on_player and config.settings.cheat then list[#list+1] = {name=_t"Target player", action="target-player", color=colors.simple(colors.RED), actor=a} end + if a and config.settings.cheat then list[#list+1] = {name=_t"Lua inspect [Actor]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=a} end + if g and config.settings.cheat then list[#list+1] = {name=_t"Lua inspect [Terrain]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=g} end + if t and config.settings.cheat then list[#list+1] = {name=_t"Lua inspect [Trap]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=t} end + if p and config.settings.cheat then list[#list+1] = {name=_t"Lua inspect [Projectile]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=p} end + if a and config.settings.cheat then list[#list+1] = {name=_t"Show inventory", action="debug-inventory", color=colors.simple(colors.YELLOW), actor=a} end + + if self.on_player then list[#list+1] = {name=_t"Rest a while", action="rest", color=colors.simple(colors.ANTIQUE_WHITE)} end + if self.on_player then list[#list+1] = {name=_t"Auto-explore", action="autoexplore", color=colors.simple(colors.ANTIQUE_WHITE)} end + if self.on_player then list[#list+1] = {name=_t"Inventory", action="inventory", color=colors.simple(colors.ANTIQUE_WHITE)} end + if self.on_player then list[#list+1] = {name=_t"Quest Log", action="quests", color=colors.simple(colors.ANTIQUE_WHITE)} end + if a and game.player:canSee(a) then list[#list+1] = {name=_t"Inspect Creature", action="character_sheet", color=colors.simple(colors.ANTIQUE_WHITE), actor=a} end -- can add extended inspection commands here by including the start tab with the dialog -- space separating inspect from active actions - list[#list+1] = {name=" ", action=nil, color=colors.simple(colors.ANTIQUE_WHITE)} - if not self.on_player and a and profile.auth and profile.hash_valid then list[#list+1] = {name="Link creature in chat", action="chat-link"} end - if self.on_player and (player.unused_stats > 0 or player.unused_talents > 0 or player.unused_generics > 0 or player.unused_talents_types > 0) then list[#list+1] = {name="Levelup!", action="levelup", color=colors.simple(colors.YELLOW)} end + list[#list+1] = {name=_t" ", action=nil, color=colors.simple(colors.ANTIQUE_WHITE)} + if not self.on_player and a and profile.auth and profile.hash_valid then list[#list+1] = {name=_t"Link creature in chat", action="chat-link"} end + if self.on_player and (player.unused_stats > 0 or player.unused_talents > 0 or player.unused_generics > 0 or player.unused_talents_types > 0) then list[#list+1] = {name=_t"Levelup!", action="levelup", color=colors.simple(colors.YELLOW)} end -- Talents if game.zone and not game.zone.wilderness then @@ -192,9 +192,9 @@ function _M:generateList() -- Pregenenerate icon with the Tiles instance that allows images if t.display_entity and game.uiset.hotkeys_display_icons then t.display_entity:getMapObjects(game.uiset.hotkeys_display_icons.tiles, {}, 1) end if self.on_player and not rt then - tals[#tals+1] = {name=e:getDisplayString()..t.name, dname=t.name, talent=t, action="talent", color=colors.simple(colors.GOLD)} + tals[#tals+1] = {name=e:getDisplayString()..tostring(player:getTalentDisplayName(t)), dname=t.name, talent=t, action="talent", color=colors.simple(colors.GOLD)} elseif not self.on_player and rt then - tals[#tals+1] = {name=e:getDisplayString()..t.name, dname=t.name, talent=t, action="talent", set_target=tg or default_tg, color=colors.simple(colors.GOLD)} + tals[#tals+1] = {name=e:getDisplayString()..tostring(player:getTalentDisplayName(t)), dname=t.name, talent=t, action="talent", set_target=tg or default_tg, color=colors.simple(colors.GOLD)} end end end diff --git a/game/modules/tome/dialogs/PartyOrder.lua b/game/modules/tome/dialogs/PartyOrder.lua index 109f5d06593f15a0398ae28a0fb1b08c2da895e6..545b94d692b785e0f16022cd313991630b81e2cc 100644 --- a/game/modules/tome/dialogs/PartyOrder.lua +++ b/game/modules/tome/dialogs/PartyOrder.lua @@ -24,21 +24,21 @@ local List = require "engine.ui.List" module(..., package.seeall, class.inherit(engine.ui.Dialog)) local orders = { - escort_rest = {-100, function(actor) return "Wait a few turns" end}, - escort_portal = {-99, function(actor) return "Where is the portal?" end}, - target = {1, function(actor) return ("Set the target [current: %s]"):format(actor.ai_target.actor and actor.ai_target.actor.name or "none") end}, - behavior = {2, function(actor) return ("Set behavior [current: %s]"):format(actor.ai_tactic.type or "default") end}, - anchor = {3, function(actor) return ("Set the leash anchor [current: %s]"):format(actor.ai_state.tactic_leash_anchor and actor.ai_state.tactic_leash_anchor.name or "none") end}, - leash = {4, function(actor) return ("Set the leash distance [current: %d]"):format(actor.ai_state.tactic_leash) end}, - talents = {5, function(actor) return ("Define tactical talents usage") end}, - rename = {6, function(actor) return ("Rename") end}, + escort_rest = {-100, function(actor) return _t"Wait a few turns" end}, + escort_portal = {-99, function(actor) return _t"Where is the portal?" end}, + target = {1, function(actor) return ("Set the target [current: %s]"):tformat(actor.ai_target.actor and actor.ai_target.actor:getName() or _t"none") end}, + behavior = {2, function(actor) return ("Set behavior [current: %s]"):tformat(_t(actor.ai_tactic.type) or _t"default") end}, + anchor = {3, function(actor) return ("Set the leash anchor [current: %s]"):tformat(actor.ai_state.tactic_leash_anchor and _t(actor.ai_state.tactic_leash_anchor.name) or _t"none") end}, + leash = {4, function(actor) return ("Set the leash distance [current: %d]"):tformat(actor.ai_state.tactic_leash) end}, + talents = {5, function(actor) return (_t"Define tactical talents usage") end}, + rename = {6, function(actor) return (_t"Rename") end}, } function _M:init(actor, def) self.actor = actor self.def = def self:generateList() - engine.ui.Dialog.init(self, "Order: "..actor.name, 1, 1) + engine.ui.Dialog.init(self, ("Order: %s"):tformat(actor:getName()), 1, 1) local list = List.new{width=400, nb_items=#self.list, list=self.list, fct=function(item) self:use(item) end} diff --git a/game/modules/tome/dialogs/PartySelect.lua b/game/modules/tome/dialogs/PartySelect.lua index ad8f57172eb29f0d99696cfe0c69687ca34274bb..eae47355889f21a7428136ae6d90dd8f8de2a3a1 100644 --- a/game/modules/tome/dialogs/PartySelect.lua +++ b/game/modules/tome/dialogs/PartySelect.lua @@ -26,7 +26,7 @@ module(..., package.seeall, class.inherit(engine.ui.Dialog)) function _M:init() self:generateList() - engine.ui.Dialog.init(self, "Switch to which character?", 1, 1) + engine.ui.Dialog.init(self, _t"Switch to which character?", 1, 1) local list = List.new{width=400, nb_items=#self.list, list=self.list, fct=function(item) self:use(item) end} diff --git a/game/modules/tome/dialogs/PartySendItem.lua b/game/modules/tome/dialogs/PartySendItem.lua index 22ee9620cc632bd0e03aed0564b218b2302ec2f6..9fe204a343f52151181cda3bd917f71f2031b673 100644 --- a/game/modules/tome/dialogs/PartySendItem.lua +++ b/game/modules/tome/dialogs/PartySendItem.lua @@ -30,7 +30,7 @@ function _M:init(source, o, inven, item, on_end) self.inven = inven self.item = item self.o = o - engine.ui.Dialog.init(self, "Give item to a party member", 1, 1) + engine.ui.Dialog.init(self, _t"Give item to a party member", 1, 1) local list = List.new{width=400, nb_items=#self.list, list=self.list, fct=function(item) self:use(item) end} @@ -51,11 +51,11 @@ end function _M:use(item) if not item or not item.actor:canAddToInven(item.actor.INVEN_INVEN) or (item.actor:attr("sleep") and not item.actor:attr("lucid_dreamer")) then - game.log("%s cannot receive items while asleep!", item.actor.name:capitalize()) + game.log("%s cannot receive items while asleep!", item.actor:getName():capitalize()) return end if self.source:attr("sleep") and not self.source:attr("lucid_dreamer") then - game.log("%s cannot transfer items while asleep!", self.source.name:capitalize()) + game.log("%s cannot transfer items while asleep!", self.source:getName():capitalize()) return end game:unregisterDialog(self) @@ -63,7 +63,7 @@ function _M:use(item) self.source:sortInven(self.inven) self.o.__transmo = nil item.actor:addObject(item.actor.INVEN_INVEN, self.o, true) -- force full stack transfer - game.log("You give %s to %s.", self.o:getName{do_color=true}, item.actor.name) + game.log("You give %s to %s.", self.o:getName{do_color=true}, item.actor:getName()) item.actor:sortInven(item.actor.INVEN_INVEN) self.on_end() end @@ -73,8 +73,8 @@ function _M:generateList() for i, act in ipairs(game.party.m_list) do if not act.no_inventory_access and act ~= game.player and act:getInven(act.INVEN_INVEN) then - local warn = act:attr("sleep") and not act:attr("lucid_dreamer") and " #YELLOW#[SLEEPING]#LAST#" or "" - if not act:canAddToInven(act.INVEN_INVEN) then warn = " #YELLOW#[NO ROOM]#LAST#" end + local warn = act:attr("sleep") and not act:attr("lucid_dreamer") and _t" #YELLOW#[SLEEPING]#LAST#" or "" + if not act:canAddToInven(act.INVEN_INVEN) then warn = _t" #YELLOW#[NO ROOM]#LAST#" end list[#list+1] = {name=act.name..warn, actor=act} end end diff --git a/game/modules/tome/dialogs/QuestPopup.lua b/game/modules/tome/dialogs/QuestPopup.lua index b4bbf9b7e2eac9b615624d72e6d68cd847550d38..a7e88319d0460ecf605dc144a3b7d046b82f98ef 100644 --- a/game/modules/tome/dialogs/QuestPopup.lua +++ b/game/modules/tome/dialogs/QuestPopup.lua @@ -27,11 +27,11 @@ local Quest = require "engine.Quest" module(..., package.seeall, class.inherit(Dialog)) local statuses = { - [-1] = "#LIGHT_GREEN#New#LAST# Quest!", - [Quest.PENDING] = "Quest #AQUAMARINE#Updated!", - [Quest.COMPLETED] = "Quest #LIGHT_GREEN#Completed!", - [Quest.DONE] = "Quest #LIGHT_GREEN#Done!", - [Quest.FAILED] = "Quest #CIMSON#Failed!", + [-1] = _t"#LIGHT_GREEN#New#LAST# Quest!", + [Quest.PENDING] = _t"Quest #AQUAMARINE#Updated!", + [Quest.COMPLETED] = _t"Quest #LIGHT_GREEN#Completed!", + [Quest.DONE] = _t"Quest #LIGHT_GREEN#Done!", + [Quest.FAILED] = _t"Quest #CIMSON#Failed!", } function _M:init(quest, status) @@ -59,11 +59,11 @@ function _M:init(quest, status) self.blight = self:getUITexture("ui/dialogframe_backglow.png") local f, fs = FontPackage:getFont("bold") - local quest = Textzone.new{auto_width=true, auto_height=true, text="#ANTIQUE_WHITE#Quest: #AQUAMARINE#"..self.quest.name, font={f, math.ceil(fs * 2)}} + local quest = Textzone.new{auto_width=true, auto_height=true, text=("#ANTIQUE_WHITE#Quest: #AQUAMARINE#%s"):tformat(self.quest.name), font={f, math.ceil(fs * 2)}} quest:setTextShadow(3) quest:setShadowShader(Shader.default.textoutline and Shader.default.textoutline.shad, 2) - local info = Textzone.new{auto_width=true, auto_height=true, text=add..'#ANTIQUE_WHITE#(See your Journal for further details or click here)', font={f, math.ceil(fs)}} + local info = Textzone.new{auto_width=true, auto_height=true, text=add.._t'#ANTIQUE_WHITE#(See your Journal for further details or click here)', font={f, math.ceil(fs)}} info:setTextShadow(3) info:setShadowShader(Shader.default.textoutline and Shader.default.textoutline.shad, 2) diff --git a/game/modules/tome/dialogs/SentientWeapon.lua b/game/modules/tome/dialogs/SentientWeapon.lua index efb41310c5b8f8d46c3f4d11f3aa904b6e41ba64..481bc0eedb95dd6f1a5683f8d3d9f5290411b039 100644 --- a/game/modules/tome/dialogs/SentientWeapon.lua +++ b/game/modules/tome/dialogs/SentientWeapon.lua @@ -29,7 +29,7 @@ local Separator = require "engine.ui.Separator" module(..., package.seeall, class.inherit(Dialog)) -local _points_text = "Points left: #00FF00#%d#WHITE#" +local _points_text = _t"Points left: #00FF00#%d#WHITE#" -- This stuff is quite the mess. I preserved Sus' Voice of Telos dialogues as much as possible but some of his stats we're simply not using @@ -46,11 +46,11 @@ function _M:init(actor, on_finish) self.actor_dup = actor.actor:clone() self.unused_stats = self.o.unused_stats --Dialog.init(self, self.o.name, 500, 300) - Dialog.init(self, self.o.name, 300, 200) + Dialog.init(self, _t(self.o.name), 300, 200) self.sel = 1 - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - 10), auto_height=true, no_color_bleed=true, text=[[ + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - 10), auto_height=true, no_color_bleed=true, text=_t[[ Keyboard: #00FF00#up key/down key#FFFFFF# to select a stat; #00FF00#right key#FFFFFF# to increase stat; #00FF00#left key#FFFFFF# to decrease a stat. Mouse: #00FF00#Left click#FFFFFF# to increase a stat; #00FF00#right click#FFFFFF# to decrease a stat. ]]} @@ -58,19 +58,19 @@ Mouse: #00FF00#Left click#FFFFFF# to increase a stat; #00FF00#right click#FFFFFF self.c_points = Textzone.new{width=math.floor(self.iw - 10), auto_height=true, no_color_bleed=true, text=_points_text:format(self.unused_stats)} self.c_list = ListColumns.new{width=math.floor(self.iw - 10), height=self.ih - 10, all_clicks=true, columns={ - {name="Stat", width=70, display_prop="name"}, - {name="Value", width=30, display_prop="val"}, + {name=_t"Stat", width=70, display_prop="name"}, + {name=_t"Value", width=30, display_prop="val"}, }, list={ - {name="Spellpower", val=self.o.wielder.combat_spellpower, stat_id = "combat_spellpower", delta = 3}, - {name="Spellcrit", val=self.o.wielder.combat_spellcrit, stat_id = "combat_spellcrit", delta = 1}, - --{name="Critical power", val=self.o.combat.critical_power, stat_id = "critical_power", delta = 0.1}, - --{name="Maximum hit chance", val=self.o.combat.max_acc, stat_id = "max_acc", delta = 5}, - --{name="Strength", val=self.actor:getStr(), stat_id=self.actor.STAT_STR}, - --{name="Dexterity", val=self.actor:getDex(), stat_id=self.actor.STAT_DEX}, - --{name="Magic", val=self.actor:getMag(), stat_id=self.actor.STAT_MAG}, - --{name="Willpower", val=self.actor:getWil(), stat_id=self.actor.STAT_WIL}, - --{name="Cunning", val=self.actor:getCun(), stat_id=self.actor.STAT_CUN}, - --{name="Constitution", val=self.actor:getCon(), stat_id=self.actor.STAT_CON}, + {name=_t"Spellpower", val=self.o.wielder.combat_spellpower, stat_id = "combat_spellpower", delta = 3}, + {name=_t"Spellcrit", val=self.o.wielder.combat_spellcrit, stat_id = "combat_spellcrit", delta = 1}, + --{name=_t"Critical power", val=self.o.combat.critical_power, stat_id = "critical_power", delta = 0.1}, + --{name=_t"Maximum hit chance", val=self.o.combat.max_acc, stat_id = "max_acc", delta = 5}, + --{name=_t"Strength", val=self.actor:getStr(), stat_id=self.actor.STAT_STR}, + --{name=_t"Dexterity", val=self.actor:getDex(), stat_id=self.actor.STAT_DEX}, + --{name=_t"Magic", val=self.actor:getMag(), stat_id=self.actor.STAT_MAG}, + --{name=_t"Willpower", val=self.actor:getWil(), stat_id=self.actor.STAT_WIL}, + --{name=_t"Cunning", val=self.actor:getCun(), stat_id=self.actor.STAT_CUN}, + --{name=_t"Constitution", val=self.actor:getCon(), stat_id=self.actor.STAT_CON}, }, fct=function(item, _, v) self:incStat(v == "left" and 1 or -1, item.stat_id) --end, select=function(item, sel) self.sel = sel self.c_desc:switchItem(item, self.actor.stats_def[item.stat_id].description) end} @@ -131,22 +131,22 @@ function _M:incStat(v, id) local delta = self.delta * v if v == 1 then if self.o.unused_stats <= 0 then - self:simplePopup("Not enough stat points", "You have no stat points left!") + self:simplePopup(_t"Not enough stat points", _t"You have no stat points left!") return end print(self.o.wielder[id] or "false", self.o.factory_settings.maxes[id] or "false") if self.o.wielder[id] >= self.o.factory_settings.maxes[id] then - self:simplePopup("Stat is at the maximum", "You can not increase this stat further!") + self:simplePopup(_t"Stat is at the maximum", _t"You can not increase this stat further!") return end else print(self.o.wielder[id] or "false", self.o.factory_settings.mins[id] or "false") if self.o.wielder[id] <= self.o.factory_settings.mins[id] then - self:simplePopup("Impossible", "You cannot take out more points!") + self:simplePopup(_t"Impossible", _t"You cannot take out more points!") return end if self.o.wielder[id] + delta <= 0 then - self:simplePopup("Impossible", "You cannot take out more points!") + self:simplePopup(_t"Impossible", _t"You cannot take out more points!") return end end @@ -192,7 +192,7 @@ end function _M:drawDialog(s) -- Description part self:drawHBorder(s, self.iw / 2, 2, self.ih - 4) - local statshelp = ([[Keyboard: #00FF00#up key/down key#FFFFFF# to select a stat; #00FF00#right key#FFFFFF# to increase stat; #00FF00#left key#FFFFFF# to decrease a stat. + local statshelp = (_t[[Keyboard: #00FF00#up key/down key#FFFFFF# to select a stat; #00FF00#right key#FFFFFF# to increase stat; #00FF00#left key#FFFFFF# to decrease a stat. Mouse: #00FF00#Left click#FFFFFF# to increase a stat; #00FF00#right click#FFFFFF# to decrease a stat. ]]):splitLines(self.iw / 2 - 10, self.font) local lines = self.actor.stats_def[self.sel].description:splitLines(self.iw / 2 - 10, self.font) @@ -204,11 +204,11 @@ Mouse: #00FF00#Left click#FFFFFF# to increase a stat; #00FF00#right click#FFFFFF end -- Stats - s:drawColorStringBlended(self.font, "Stats points left: #00FF00#"..self.actor.unused_stats, 2, 2) + s:drawColorStringBlended(self.font, ("Stats points left: #00FF00#%s"):tformat(self.actor.unused_stats), 2, 2) self:drawWBorder(s, 2, 20, 200) self:drawSelectionList(s, 2, 25, self.font_h, { - "Strength", "Dexterity", "Magic", "Willpower", "Cunning", "Constitution" + _t"Strength", _t"Dexterity", _t"Magic", _t"Willpower", _t"Cunning", _t"Constitution" }, self.sel) self:drawSelectionList(s, 100, 25, self.font_h, { self.actor:getStr(), self.actor:getDex(), self.actor:getMag(), self.actor:getWil(), self.actor:getCun(), self.actor:getCon(), diff --git a/game/modules/tome/dialogs/ShowAchievements.lua b/game/modules/tome/dialogs/ShowAchievements.lua index 219daebccc049b1e403a63bdb67bf2ea82438cee..d8655fd812ecbef65f8b4816931a37ecbe1a5b75 100644 --- a/game/modules/tome/dialogs/ShowAchievements.lua +++ b/game/modules/tome/dialogs/ShowAchievements.lua @@ -49,9 +49,9 @@ function _M:generateList(kind) if a.show == "full" or not data.notdone then list[#list+1] = { name=a.name, color=color, desc=a.desc, category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } elseif a.show == "none" then - list[#list+1] = { name="???", color=color, desc="-- Unknown --", category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } + list[#list+1] = { name="???", color=color, desc=_t"-- Unknown --", category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } elseif a.show == "name" then - list[#list+1] = { name=a.name, color=color, desc="-- Unknown --", category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } + list[#list+1] = { name=a.name, color=color, desc=_t"-- Unknown --", category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } else list[#list+1] = { name=a.name, color=color, desc=a.desc, category=a.category or "--", when=data.when, who=data.who, order=a.order, id=id, tex=tex, a=a } end diff --git a/game/modules/tome/dialogs/ShowChatLog.lua b/game/modules/tome/dialogs/ShowChatLog.lua index c49fda212f1d1d7737d1713dc1686096c71cdcd3..b5c590dad0eef67b04521f13375036a1cec76dc4 100644 --- a/game/modules/tome/dialogs/ShowChatLog.lua +++ b/game/modules/tome/dialogs/ShowChatLog.lua @@ -43,7 +43,7 @@ function _M:init(title, shadow, log, chat) for name, data in pairs(chat.channels) do list[#list+1] = name end table.sort(list, function(a,b) if a == "global" then return 1 elseif b == "global" then return nil else return a < b end end) - tabs[#tabs+1] = {top=0, left=0, ui = Tab.new{title="Game Log", fct=function() end, on_change=function() local i = #tabs self:switchTo(tabs[1]) end, default=true}, tab_channel="__log", timestamp=log:getLogLast()} + tabs[#tabs+1] = {top=0, left=0, ui = Tab.new{title=_t"Game Log", fct=function() end, on_change=function() local i = #tabs self:switchTo(tabs[1]) end, default=true}, tab_channel="__log", timestamp=log:getLogLast()} for i, name in ipairs(list) do local oname = name local nb_users = 0 @@ -133,7 +133,7 @@ function _M:mouseEvent(button, x, y, xrel, yrel, bx, by, event) for i, e in ipairs(sub_es) do if e.tooltip then tooltip:merge(e:tooltip()) - if e:getEntityKind() == "actor" then tooltip:add(true, "Right click to inspect.", true) end + if e:getEntityKind() == "actor" then tooltip:add(true, _t"Right click to inspect.", true) end if i < #sub_es then tooltip:add(true, "---", true) else tooltip:add(true) end end @@ -168,14 +168,14 @@ function _M:mouseEvent(button, x, y, xrel, yrel, bx, by, event) local data = profile.chat:getUserInfo(citem.login) if data then local list = { - {name="Show infos", ui="show"}, - {name="Whisper", ui="whisper"}, - {name="Ignore", ui="ignore"}, - {name="Open profile(in browser)", ui="profile"}, - {name="Report for bad behavior", ui="report"} + {name=_t"Show infos", ui="show"}, + {name=_t"Whisper", ui="whisper"}, + {name=_t"Ignore", ui="ignore"}, + {name=_t"Open profile(in browser)", ui="profile"}, + {name=_t"Report for bad behavior", ui="report"} } - if data.char_link then table.insert(list, 3, {name="Open charsheet(in browser)", ui="charsheet"}) end - Dialog:listPopup("User: "..citem.login, "Action", list, 300, 200, function(sel) + if data.char_link then table.insert(list, 3, {name=_t"Open charsheet(in browser)", ui="charsheet"}) end + Dialog:listPopup(("User: "):tformat(citem.login), _t"Action", list, 300, 200, function(sel) if not sel or not sel.ui then return end if sel.ui == "show" then local UserInfo = require "engine.dialogs.UserInfo" @@ -188,9 +188,9 @@ function _M:mouseEvent(button, x, y, xrel, yrel, bx, by, event) profile.chat:setCurrentTarget(false, citem.login) profile.chat:talkBox() elseif sel.ui == "ignore" then - Dialog:yesnoPopup("Ignore user", "Really ignore all messages from: "..citem.login, function(ret) if ret then profile.chat:ignoreUser(citem.login) end end) + Dialog:yesnoPopup(_t"Ignore user", ("Really ignore all messages from: %s"):tformat(citem.login), function(ret) if ret then profile.chat:ignoreUser(citem.login) end end) elseif sel.ui == "report" then - game:registerDialog(require('engine.dialogs.GetText').new("Reason to report: "..citem.login, "Reason", 4, 500, function(text) + game:registerDialog(require('engine.dialogs.GetText').new(("Reason to report: %s"):tformat(citem.login), _t"Reason", 4, 500, function(text) profile.chat:reportUser(citem.login, text) game.log("#VIOLET#", "Report sent.") end)) diff --git a/game/modules/tome/dialogs/ShowEquipInven.lua b/game/modules/tome/dialogs/ShowEquipInven.lua index 1a9669709a731e0030b688585a71c0927ed46984..c9be5fe33b8eca8dd0a5dfb108d3658ff876dd00 100644 --- a/game/modules/tome/dialogs/ShowEquipInven.lua +++ b/game/modules/tome/dialogs/ShowEquipInven.lua @@ -39,10 +39,10 @@ function _M:init(title, equip_actor, filter, action, on_select, inven_actor) print("[ShowEquipInven] initiating inventory INVEN_INVEN for", inven_actor.name, inven_actor.uid) inven_actor.inven[inven_actor.INVEN_INVEN] = {worn=false, id=inven_actor.INVEN_INVEN, name="INVEN", max = 10} end - Dialog.init(self, title or "Inventory", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) + Dialog.init(self, title or _t"Inventory", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) - self.c_main_set = Tab.new{title="Main Set", default=not equip_actor.off_weapon_slots, fct=function() end, on_change=function(s) if s then self:switchSets("main") end end} - self.c_off_set = Tab.new{title="Off Set", default=equip_actor.off_weapon_slots, fct=function() end, on_change=function(s) if s then self:switchSets("off") end end} + self.c_main_set = Tab.new{title=_t"Main Set", default=not equip_actor.off_weapon_slots, fct=function() end, on_change=function(s) if s then self:switchSets("main") end end} + self.c_off_set = Tab.new{title=_t"Off Set", default=equip_actor.off_weapon_slots, fct=function() end, on_change=function(s) if s then self:switchSets("off") end end} local vsep = Separator.new{dir="horizontal", size=self.ih - 10} @@ -122,7 +122,7 @@ function _M:init(title, equip_actor, filter, action, on_select, inven_actor) if not game.tooltip.empty then game.tooltip.locked = not game.tooltip.locked game.tooltip.container.focused = game.tooltip.locked - game.log("Tooltip %s", game.tooltip.locked and "locked" or "unlocked") + game.log("Tooltip %s", game.tooltip.locked and _t"locked" or _t"unlocked") if game.tooltip.locked then self.old_areas_name = self.mouse.areas_name self.old_areas = self.mouse.areas @@ -207,7 +207,7 @@ end function _M:on_register() if not self.inven_actor:getInven("INVEN") then - Dialog:simplePopup("No Inventory", self.inven_actor.name:capitalize().." Has no defined main inventory") + Dialog:simplePopup(_t"No Inventory", ("%s Has no defined main inventory"):tformat(self.inven_actor:getName():capitalize())) game:unregisterDialog(self) else game:onTickEnd(function() self.key:unicodeInput(true) end) @@ -225,7 +225,7 @@ function _M:defineHotkey(id) if not item or not item.object then return end self.equip_actor.hotkey[id] = {"inventory", item.object:getName{no_add_name=true, no_count=true}} - self:simplePopup("Hotkey "..id.." assigned", item.object:getName{no_add_name=true, no_count=true}:capitalize().." assigned to hotkey "..id) + self:simplePopup(("Hotkey %s assigned"):tformat(id), item.object:getName{no_add_name=true, no_count=true}:capitalize().." assigned to hotkey "..id) self.equip_actor.changed = true end diff --git a/game/modules/tome/dialogs/ShowEquipment.lua b/game/modules/tome/dialogs/ShowEquipment.lua index 1b1d5e27503af6ae4c755b9db4c2e59c41354eed..e16bc595d6f798829e88e1d90d0889bb787d9a4b 100644 --- a/game/modules/tome/dialogs/ShowEquipment.lua +++ b/game/modules/tome/dialogs/ShowEquipment.lua @@ -31,10 +31,10 @@ function _M:init(title, actor, filter, action) self.actor = actor self.filter = filter self.action = action - Dialog.init(self, title or "Equipment", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) + Dialog.init(self, title or _t"Equipment", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) - self.c_main_set = Tab.new{title="Main Set", default=not actor.off_weapon_slots, fct=function() end, on_change=function(s) if s then self:switchSets("main") end end} - self.c_off_set = Tab.new{title="Off Set", default=actor.off_weapon_slots, fct=function() end, on_change=function(s) if s then self:switchSets("off") end end} + self.c_main_set = Tab.new{title=_t"Main Set", default=not actor.off_weapon_slots, fct=function() end, on_change=function(s) if s then self:switchSets("main") end end} + self.c_off_set = Tab.new{title=_t"Off Set", default=actor.off_weapon_slots, fct=function() end, on_change=function(s) if s then self:switchSets("off") end end} self.c_doll = EquipDoll.new{actor=actor, drag_enable=true, filter=filter, fct=function(item) self:use(item) end, diff --git a/game/modules/tome/dialogs/ShowIngredients.lua b/game/modules/tome/dialogs/ShowIngredients.lua index 62bba5468aceaee0d25ed1ba275a0597f31fe988..0518f298b11770286f4c4fa44e90af4630071bd6 100644 --- a/game/modules/tome/dialogs/ShowIngredients.lua +++ b/game/modules/tome/dialogs/ShowIngredients.lua @@ -29,7 +29,7 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(party) self.party = party - Dialog.init(self, "Ingredients collected", game.w * 0.8, game.h * 0.8) + Dialog.init(self, _t"Ingredients collected", game.w * 0.8, game.h * 0.8) self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - 10), scrollbar=true, height=self.ih} @@ -37,9 +37,9 @@ function _M:init(party) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} self.c_list = ListColumns.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - 10, scrollbar=true, sortable=true, columns={ - {name="Ingredient", width=50, display_prop="name", sort="name"}, - {name="Category", width=30, display_prop="cat", sort="cat"}, - {name="Quantity", width=20, display_prop="nb", sort="nb"}, + {name=_t"Ingredient", width=50, display_prop="name", sort="name"}, + {name=_t"Category", width=30, display_prop="cat", sort="cat"}, + {name=_t"Quantity", width=20, display_prop="nb", sort="nb"}, }, list=self.list, fct=function(item) end, select=function(item, sel) self:select(item) end} self:loadUI{ @@ -62,7 +62,7 @@ function _M:generateList() local i = 0 for id, nb in pairs(self.party.ingredients) do local d = self.party:getIngredient(id) - list[#list+1] = { dname=d.name, name=d.display_entity:getDisplayString(true):add(d.name), desc=util.getval(d.desc), cat=d.type, nb=nb==-1 and "inf" or tostring(nb) } + list[#list+1] = { dname=d.name, name=d.display_entity:getDisplayString(true):add(_t(d.name)), desc=util.getval(d.desc), cat=_t(d.type), nb=nb==-1 and "inf" or tostring(nb) } i = i + 1 end -- Add known artifacts @@ -72,6 +72,6 @@ end function _M:select(item) if item then - self.c_desc:switchItem(item, ("#GOLD#Category:#AQUAMARINE# %s\n#GOLD#Ingredient:#0080FF# %s\n#GOLD#Quantity:#0080FF# %s\n#GOLD#Text:#ANTIQUE_WHITE# %s"):format(item.cat, item.name:toString(), item.nb, item.desc)) + self.c_desc:switchItem(item, ("#GOLD#Category:#AQUAMARINE# %s\n#GOLD#Ingredient:#0080FF# %s\n#GOLD#Quantity:#0080FF# %s\n#GOLD#Text:#ANTIQUE_WHITE# %s"):tformat(item.cat, item.name:toString(), item.nb, item.desc)) end end diff --git a/game/modules/tome/dialogs/ShowInventory.lua b/game/modules/tome/dialogs/ShowInventory.lua index a2cecd92766abe29880d8310aa375a65b148f0a9..42b649c52d5eca203074ae096b2dc072f5da8f79 100644 --- a/game/modules/tome/dialogs/ShowInventory.lua +++ b/game/modules/tome/dialogs/ShowInventory.lua @@ -31,7 +31,7 @@ function _M:init(title, inven, filter, action, actor) self.filter = filter self.action = action self.actor = actor - Dialog.init(self, title or "Inventory", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) + Dialog.init(self, title or _t"Inventory", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} self.c_desc = TextzoneList.new{scrollbar = true, width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih} diff --git a/game/modules/tome/dialogs/ShowLore.lua b/game/modules/tome/dialogs/ShowLore.lua index 946dcb554516cf337efc0ba76fc8c75788c981ff..7717f26e537553981824243f943fea78a1f26377 100644 --- a/game/modules/tome/dialogs/ShowLore.lua +++ b/game/modules/tome/dialogs/ShowLore.lua @@ -34,19 +34,19 @@ function _M:init(title, actor) local nb = 0 for id, data in pairs(actor.lore_known) do nb = nb + 1 end - Dialog.init(self, (title or "Lore").." ("..nb.."/"..total..")", game.w * 0.8, game.h * 0.8) + Dialog.init(self, (title or _t"Lore").." ("..nb.."/"..total..")", game.w * 0.8, game.h * 0.8) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - vsep.w / 2), scrollbar=true, height=self.ih} self:generateList() - self.c_search = Textbox.new{title="Search: ", text="", chars=20, max_len=60, fct=function() end, on_change=function(text) self:search(text) end} + self.c_search = Textbox.new{title=_t"Search: ", text="", chars=20, max_len=60, fct=function() end, on_change=function(text) self:search(text) end} self.c_list = ListColumns.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - 10 - self.c_search.h, scrollbar=true, sortable=true, columns={ - {name="", width={40,"fixed"}, display_prop="order", sort="order"}, - {name="Lore", width=60, display_prop="name", sort="name"}, - {name="Category", width=40, display_prop="cat", sort="cat"}, + {name=_t"", width={40,"fixed"}, display_prop="order", sort="order"}, + {name=_t"Lore", width=60, display_prop="name", sort="name"}, + {name=_t"Category", width=40, display_prop="cat", sort="cat"}, }, list=self.list, fct=function(item) self:popup(item) end, select=function(item, sel) self:select(item) end} self:loadUI{ @@ -82,7 +82,7 @@ function _M:generateList() for id, _ in pairs(self.actor.lore_known) do local l = self.actor:getLore(id) if self:matchSearch(tostring(l.order)) or self:matchSearch(l.name) or self:matchSearch(l.category) then - list[#list+1] = { name=l.name, desc=util.getval(l.lore), cat=l.category, order=l.order, image=l.image, lore=l } + list[#list+1] = { name=l.name, desc=util.getval(l.lore), cat=_t(l.category), order=l.order, image=l.image, lore=l } end end -- Add known artifacts @@ -99,7 +99,7 @@ end function _M:select(item) if item then - self.c_desc:switchItem(item, ("#GOLD#Category:#AQUAMARINE# %s\n#GOLD#Found as:#0080FF# %s\n#GOLD#Text:#ANTIQUE_WHITE# %s"):format(item.cat, item.name, item.desc)) + self.c_desc:switchItem(item, ("#GOLD#Category:#AQUAMARINE# %s\n#GOLD#Found as:#0080FF# %s\n#GOLD#Text:#ANTIQUE_WHITE# %s"):tformat(item.cat, item.name, item.desc)) if item.image then if type(item.image) == "string" then self.image = Image.new{file="lore/"..item.image, auto_width=true, auto_height=true} diff --git a/game/modules/tome/dialogs/ShowMap.lua b/game/modules/tome/dialogs/ShowMap.lua index f7f87e72d72112642342fab98f617af9fffdf2f3..d5d806ad4e967ff4ed093b144ab06c67a294d37c 100644 --- a/game/modules/tome/dialogs/ShowMap.lua +++ b/game/modules/tome/dialogs/ShowMap.lua @@ -46,7 +46,7 @@ function _M:init(mm_mode) local t_per_w, t_per_h = math.floor(mw / self.bsize), math.floor(mh / self.bsize) - Dialog.init(self, "Map: #0080FF#"..game.old_zone_name, 1, 1) + Dialog.init(self, ("Map: #0080FF#%s"):tformat(game.old_zone_name), 1, 1) local mc = GenericContainer.new{width=mw, height=mh} local uis = { {left=0, top=0, ui=mc} } diff --git a/game/modules/tome/dialogs/ShowStore.lua b/game/modules/tome/dialogs/ShowStore.lua index 7aa5c174032a275903a3b38cb51daf968792491a..ac859d310f915622c3f6d5e5016ffecd7593c8a0 100644 --- a/game/modules/tome/dialogs/ShowStore.lua +++ b/game/modules/tome/dialogs/ShowStore.lua @@ -48,11 +48,11 @@ function _M:init(title, store_inven, actor_inven, store_filter, actor_filter, ac local vsep = Separator.new{dir="horizontal", size=self.ih - 10} self.c_inven = Inventory.new{actor=actor_actor, inven=actor_inven, filter=actor_filter, width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - 10, columns={ - {name="", width={30,"fixed"}, display_prop="char", sort="id"}, - {name="", width={24,"fixed"}, display_prop="object", direct_draw=function(item, x, y) item.object:toScreen(nil, x+4, y, 16, 16) end}, - {name="Inventory", width=80, display_prop="name", sort="name"}, - {name="Category", width=20, display_prop="cat", sort="cat"}, - {name="Price", width={70,"fixed"}, display_prop=function(item) return self.descprice("sell", item.object) end, sort=function(a, b) return descprice("sell", a.object) < descprice("sell", b.object) end}, + {name=_t"", width={30,"fixed"}, display_prop="char", sort="id"}, + {name=_t"", width={24,"fixed"}, display_prop="object", direct_draw=function(item, x, y) item.object:toScreen(nil, x+4, y, 16, 16) end}, + {name=_t"Inventory", width=80, display_prop="name", sort="name"}, + {name=_t"Category", width=20, display_prop="cat", sort="cat"}, + {name=_t"Price", width={70,"fixed"}, display_prop=function(item) return self.descprice("sell", item.object) end, sort=function(a, b) return descprice("sell", a.object) < descprice("sell", b.object) end}, }, fct=function(item, sel, button, event) self:use(item, button, event) end, select=function(item, sel) self:select(item) end, @@ -84,11 +84,11 @@ function _M:init(title, store_inven, actor_inven, store_filter, actor_filter, ac self.c_store = Inventory.new{actor=store_actor, inven=store_inven, filter=store_filter, width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - 10, tabslist=false, columns={ - {name="", width={30,"fixed"}, display_prop="char", sort="id"}, - {name="", width={24,"fixed"}, display_prop="object", direct_draw=direct_draw}, - {name="Store", width=80, display_prop="name"}, - {name="Category", width=20, display_prop="cat"}, - {name="Price", width={70,"fixed"}, display_prop=function(item) return self.descprice("buy", item.object) end, sort=function(a, b) return descprice("buy", a.object) < descprice("buy", b.object) end}, + {name=_t"", width={30,"fixed"}, display_prop="char", sort="id"}, + {name=_t"", width={24,"fixed"}, display_prop="object", direct_draw=direct_draw}, + {name=_t"Store", width=80, display_prop="name"}, + {name=_t"Category", width=20, display_prop="cat"}, + {name=_t"Price", width={70,"fixed"}, display_prop=function(item) return self.descprice("buy", item.object) end, sort=function(a, b) return descprice("buy", a.object) < descprice("buy", b.object) end}, }, fct=function(item, sel, button, event) self:use(item, button, event) end, select=function(item, sel) self:select(item) end, @@ -170,7 +170,7 @@ function _M:on_register() end function _M:getStoreTitle() - return self.base_title..(" (pays up to %0.2f gold, Your Gold: %0.2f)"):format(self.store_actor.store.purse, self.actor_actor.money) + return self.base_title..(" (pays up to %0.2f gold, Your Gold: %0.2f)"):tformat(self.store_actor.store.purse, self.actor_actor.money) end function _M:updateStore() diff --git a/game/modules/tome/dialogs/TrapsSelect.lua b/game/modules/tome/dialogs/TrapsSelect.lua index d15b9a6242f05fce98117975f295397c194b14af..1f923b016aff1f645e9f80fdf453a530c84b6a15 100644 --- a/game/modules/tome/dialogs/TrapsSelect.lua +++ b/game/modules/tome/dialogs/TrapsSelect.lua @@ -44,7 +44,7 @@ function _M:init(title, actor, text, dialog_talent, max_traps, trap_tids) for tid, level in pairs(trap_tids or Talents.trap_mastery_tids) do if game.state:unlockTalentCheck(tid, actor) or actor:knowTalent(tid) then self.trap_tids[tid] = level end end - Dialog.init(self, title or "Select Traps", math.max(900, game.w * 0.8), math.max(700, game.h * 0.8)) + Dialog.init(self, title or _t"Select Traps", math.max(900, game.w * 0.8), math.max(700, game.h * 0.8)) -- keep track of traps selected self.traps_selected = {} @@ -56,13 +56,13 @@ function _M:init(title, actor, text, dialog_talent, max_traps, trap_tids) --table.set(game, "debug", "TrapsSelect", self) -- debugging self:generateList() local text_w, text_h = self.font:size(text) - local c_desc = Textzone.new{width=400, auto_height=true, text=self.text or "Select traps to prepare:"} + local c_desc = Textzone.new{width=400, auto_height=true, text=self.text or _t"Select traps to prepare:"} local c_list = List.new{width=400, height=math.min(game.h*.75, (text_h+5)*(#self.list+1)), nb_items=#self.list, list=self.list, scrollbar=true, fct=function(item) self:use(item) end} -- tooltips c_list.on_select = function(item) if item.talent then actor.turn_procs.trap_mastery_tid = dialog_talent.id - game:tooltipDisplayAtMap(game.w, game.h, "#GOLD#"..item.talent.name.."#LAST#\n"..tostring(actor:getTalentFullDescription(item.talent, 1, {force_level=1}))) + game:tooltipDisplayAtMap(game.w, game.h, ("#GOLD#%s#LAST#\n%s"):tformat(item.talent.name, tostring(actor:getTalentFullDescription(item.talent, 1, {force_level=1})))) actor.turn_procs.trap_mastery_tid = nil end end @@ -102,32 +102,32 @@ function _M:formatItem(item) if self.actor.trap_primed == item.tid then if self.traps_selected[item.tid] then item.color = colors_simple.AQUAMARINE - add_text = " (replacing instant trigger)" + add_text = _t" (replacing instant trigger)" else item.color = colors_simple.SALMON - add_text = " (primed trigger)" + add_text = _t" (primed trigger)" end elseif self.traps_selected[item.tid] then if self.starting_traps[item.tid] then item.color = colors_simple.LIGHT_BLUE - add_text = " (prepared)" + add_text = _t" (prepared)" else item.color = colors_simple.LIGHT_GREEN - add_text = " (preparing)" + add_text = _t" (preparing)" end else if self.starting_traps[item.tid] then item.color = colors_simple.LIGHT_RED - add_text = " (dismantling)" + add_text = _t" (dismantling)" elseif item.tier > self.mastery_level then item.color = colors_simple.GREY - add_text = " (need more skill)" + add_text = _t" (need more skill)" elseif item.unlearnable then item.color = colors_simple.GREY - add_text = (" (%s)"):format(item.unlearnable) + add_text = (" (%s)"):tformat(item.unlearnable) end end - item.name = ("%s) Tier %d: %s%s"):format(item.char or " ", item.tier, item.talent.name, add_text) + item.name = ("%s) Tier %d: %s%s"):tformat(item.char or " ", item.tier, item.talent.name, add_text) end end @@ -155,7 +155,7 @@ function _M:use(item) end function _M:generateList() - local list = {{label="Accept these selections", tier=0, color = colors_simple.GOLD, + local list = {{label=_t"Accept these selections", tier=0, color = colors_simple.GOLD, action=function() if self.num_sel <= self.max_traps then self.actor:talentDialogReturn(self.traps_selected, self.starting_traps) diff --git a/game/modules/tome/dialogs/UberTalent.lua b/game/modules/tome/dialogs/UberTalent.lua index 389bf44e18b472cdd7ff2e94311ec1fc909b764f..48fa5e0f7129658327903e5c7c35e819c6427dba 100644 --- a/game/modules/tome/dialogs/UberTalent.lua +++ b/game/modules/tome/dialogs/UberTalent.lua @@ -41,7 +41,7 @@ function _M:init(actor, levelup_end_prodigies) self.actor_dup = actor:clone() self.actor_dup.uid = actor.uid -- Yes ... - Dialog.init(self, "Prodigies: "..actor.name, 800, game.h * 0.9) + Dialog.init(self, ("Prodigies: %s"):tformat(actor:getName()), 800, game.h * 0.9) self:generateList() @@ -147,7 +147,7 @@ end -- UI Stuff ----------------------------------------------------------------- -_M.tuttext = [[Prodigies are special talents that only the most powerful of characters can attain. +_M.tuttext = _t[[Prodigies are special talents that only the most powerful of characters can attain. All of them require at least 50 in a core stat and many also have more special demands. You can learn a new prodigy at level 25 and 42. #LIGHT_GREEN#Prodigies available: %d]] diff --git a/game/modules/tome/dialogs/UnlockDialog.lua b/game/modules/tome/dialogs/UnlockDialog.lua index 622abf2613a7a4e9c74064d192155bc6461405eb..dab631cdda263bb2ca04ac36ed2f0820ca24a308 100644 --- a/game/modules/tome/dialogs/UnlockDialog.lua +++ b/game/modules/tome/dialogs/UnlockDialog.lua @@ -28,12 +28,12 @@ function _M:init(what) local f, err = loadfile("/data/texts/unlock-"..self.what..".lua") if not f and err then error(err) end - setfenv(f, {}) + setfenv(f, {_t=_t}) self.name, self.str = f() - game.logPlayer(game.player, "#VIOLET#Option unlocked: "..self.name) + game.logPlayer(game.player, "#VIOLET#Option unlocked: %s", self.name) - Dialog.init(self, "Option unlocked: "..self.name, 600, 400) + Dialog.init(self, ("Option unlocked: %s"):tformat(self.name), 600, 400) self.c_desc = Textzone.new{width=math.floor(self.iw - 10), height=self.ih, no_color_bleed=true, auto_height=true, text=self.str} diff --git a/game/modules/tome/dialogs/UseItemDialog.lua b/game/modules/tome/dialogs/UseItemDialog.lua index 6a5bfdc0684e22c295387246fd620ccaca998485..5db5105e7877ee906afd1f7b2e5c1a447c9b906a 100644 --- a/game/modules/tome/dialogs/UseItemDialog.lua +++ b/game/modules/tome/dialogs/UseItemDialog.lua @@ -65,7 +65,7 @@ function _M:use(item) if act == "use" then if self.object:wornInven() and not self.object.wielded and not self.object.use_no_wear then - self:simplePopup("Impossible", "You must wear this object to use it!") + self:simplePopup(_t"Impossible", _t"You must wear this object to use it!") else self.actor:playerUseItem(self.object, self.item, self.inven, self.onuse) self.onuse(self.inven, self.item, self.object, true) @@ -75,7 +75,7 @@ function _M:use(item) self.onuse(self.inven, self.item, self.object, false) elseif act == "drop" then if self.object:getNumber() > 1 then - game:registerDialog(GetQuantity.new("Drop how many?", "1 to "..self.object:getNumber(), self.object:getNumber(), self.object:getNumber(), function(qty) + game:registerDialog(GetQuantity.new(_t"Drop how many?", ("1 to %d"):tformat(self.object:getNumber()), self.object:getNumber(), self.object:getNumber(), function(qty) qty = util.bound(qty, 1, self.object:getNumber()) self.actor:doDrop(self.inven, self.item, function() self.onuse(self.inven, self.item, self.object, false) end, qty) end, 1)) @@ -114,16 +114,16 @@ function _M:use(item) end if #list == 1 then doit(list[1]) elseif #list == 0 then - self:simplePopup("Attach to item", "You do not have any equipped items that it can be attached to.") + self:simplePopup(_t"Attach to item", _t"You do not have any equipped items that it can be attached to.") else - self:listPopup("Attach to item", "Select which item to attach it to:", list, 300, 400, doit) + self:listPopup(_t"Attach to item", _t"Select which item to attach it to:", list, 300, 400, doit) end elseif act == "transfer" then game:registerDialog(PartySendItem.new(self.actor, self.object, self.inven, self.item, function() self.onuse(self.inven, self.item, self.object, false) end)) elseif act == "transmo" then - self:yesnoPopup(self.actor:transmoGetWord():capitalize(), "Really "..self.actor:transmoGetWord().." "..self.object:getName{}, function(ret) + self:yesnoPopup(self.actor:transmoGetWord():capitalize(), ("Really %s %s"):tformat(self.actor:transmoGetWord(), self.object:getName{}), function(ret) if not ret then return end self.actor:transmoInven(self.inven, self.item, self.object) self.onuse(self.inven, self.item, self.object, false) @@ -136,7 +136,7 @@ function _M:use(item) self.object.__tagged = nil self.onuse(self.inven, self.item, self.object, false) elseif act == "tag" then - local d = require("engine.dialogs.GetText").new("Tag object (tagged objects can not be destroyed or dropped)", "Tag:", 2, 25, function(tag) if tag then + local d = require("engine.dialogs.GetText").new(_t"Tag object (tagged objects can not be destroyed or dropped)", _t"Tag:", 2, 25, function(tag) if tag then self.object.__tagged = tag self.object.__transmo = false self.onuse(self.inven, self.item, self.object, false) @@ -161,21 +161,21 @@ function _M:generateList() local transmo_chest = self.actor:attr("has_transmo") - if not self.object:isIdentified() and self.actor:attr("auto_id") and self.actor:attr("auto_id") >= 2 then list[#list+1] = {name="Identify", action="identify"} end - if not self.dst_actor and self.object.__transmo then list[#list+1] = {name="Move to normal inventory", action="toinven"} end - if not self.dst_actor and not self.object.__transmo and not self.no_use_allowed then if self.object:canUseObject() then list[#list+1] = {name="Use", action="use"} end end - if self.inven == self.actor.INVEN_INVEN and self.object:wornInven() and self.actor:getInven(self.object:wornInven()) then list[#list+1] = {name="Wield/Wear", action="wear"} end - if not self.object.__transmo then if self.inven ~= self.actor.INVEN_INVEN and self.object:wornInven() then list[#list+1] = {name="Take off", action="takeoff"} end end - if not self.object.__transmo then if self.inven ~= self.actor.INVEN_INVEN and self.object.is_tinker and self.object.tinkered then list[#list+1] = {name="Detach from item", action="tinker-remove"} end end - if not self.object.__transmo then if self.inven == self.actor.INVEN_INVEN and self.object.is_tinker and not self.object.tinkered then list[#list+1] = {name="Attach to item", action="tinker-add"} end end - if not self.object.__transmo and self.object.tinker then list[#list+1] = { name = 'Detach tinker', action='tinker-detach' } end - if not self.dst_actor and not self.object.__tagged and self.inven == self.actor.INVEN_INVEN then list[#list+1] = {name="Drop", action="drop"} end - if not self.dst_actor and self.inven == self.actor.INVEN_INVEN and not self.object.plot and not self.object.quest and game.party:countInventoryAble() >= 2 then list[#list+1] = {name="Transfer to party", action="transfer"} end - if not self.dst_actor and not self.object.__tagged and self.inven == self.actor.INVEN_INVEN and transmo_chest and self.actor:transmoFilter(self.object) then list[#list+1] = {name=self.actor:transmoGetWord():capitalize().." now", action="transmo"} end - if profile.auth and profile.hash_valid then list[#list+1] = {name="Link item in chat", action="chat-link"} end - if config.settings.cheat then list[#list+1] = {name="Lua inspect", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE)} end - if not self.object.__tagged then list[#list+1] = {name="Tag", action="tag"} end - if self.object.__tagged then list[#list+1] = {name="Untag", action="untag"} end + if not self.object:isIdentified() and self.actor:attr("auto_id") and self.actor:attr("auto_id") >= 2 then list[#list+1] = {name=_t"Identify", action="identify"} end + if not self.dst_actor and self.object.__transmo then list[#list+1] = {name=_t"Move to normal inventory", action="toinven"} end + if not self.dst_actor and not self.object.__transmo and not self.no_use_allowed then if self.object:canUseObject() then list[#list+1] = {name=_t"Use", action="use"} end end + if self.inven == self.actor.INVEN_INVEN and self.object:wornInven() and self.actor:getInven(self.object:wornInven()) then list[#list+1] = {name=_t"Wield/Wear", action="wear"} end + if not self.object.__transmo then if self.inven ~= self.actor.INVEN_INVEN and self.object:wornInven() then list[#list+1] = {name=_t"Take off", action="takeoff"} end end + if not self.object.__transmo then if self.inven ~= self.actor.INVEN_INVEN and self.object.is_tinker and self.object.tinkered then list[#list+1] = {name=_t"Detach from item", action="tinker-remove"} end end + if not self.object.__transmo then if self.inven == self.actor.INVEN_INVEN and self.object.is_tinker and not self.object.tinkered then list[#list+1] = {name=_t"Attach to item", action="tinker-add"} end end + if not self.object.__transmo and self.object.tinker then list[#list+1] = { name = _t'Detach tinker', action='tinker-detach' } end + if not self.dst_actor and not self.object.__tagged and self.inven == self.actor.INVEN_INVEN then list[#list+1] = {name=_t"Drop", action="drop"} end + if not self.dst_actor and self.inven == self.actor.INVEN_INVEN and not self.object.plot and not self.object.quest and game.party:countInventoryAble() >= 2 then list[#list+1] = {name=_t"Transfer to party", action="transfer"} end + if not self.dst_actor and not self.object.__tagged and self.inven == self.actor.INVEN_INVEN and transmo_chest and self.actor:transmoFilter(self.object) then list[#list+1] = {name=("%s now"):tformat(self.actor:transmoGetWord():capitalize()), action="transmo"} end + if profile.auth and profile.hash_valid then list[#list+1] = {name=_t"Link item in chat", action="chat-link"} end + if config.settings.cheat then list[#list+1] = {name=_t"Lua inspect", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE)} end + if not self.object.__tagged then list[#list+1] = {name=_t"Tag", action="tag"} end + if self.object.__tagged then list[#list+1] = {name=_t"Untag", action="untag"} end self:triggerHook{"UseItemMenu:generate", actor=self.actor, object=self.object, inven=self.inven, item=self.item, menu=list} diff --git a/game/modules/tome/dialogs/UseTalents.lua b/game/modules/tome/dialogs/UseTalents.lua index ed66ffeedfbd5c71c9c6b8db2d1b2eacc80ba1f3..37e734cb2158e36b41f7b347dcab8c7cadf96816 100644 --- a/game/modules/tome/dialogs/UseTalents.lua +++ b/game/modules/tome/dialogs/UseTalents.lua @@ -32,17 +32,17 @@ local autoMark = require("engine.Entity").new({image = "ui/hotkeys/mainmenu.png" -- generate talent status separately to enable quicker refresh of Dialog local function TalentStatus(who,t) - local status = tstring{{"color", "LIGHT_GREEN"}, "Active"} + local status = tstring{{"color", "LIGHT_GREEN"}, _t"Active"} if who:isTalentCoolingDown(t) then - status = tstring{{"color", "LIGHT_RED"}, who:isTalentCoolingDown(t).." turns"} + status = tstring{{"color", "LIGHT_RED"}, ("%s turns"):tformat(who:isTalentCoolingDown(t))} elseif not who:preUseTalent(t, true, true) then - status = tstring{{"color", "GREY"}, "Unavailable"} + status = tstring{{"color", "GREY"}, _t"Unavailable"} elseif t.is_object_use then - status = tstring{{"color", "SALMON"}, "Object"} + status = tstring{{"color", "SALMON"}, _t"Object"} elseif t.mode == "sustained" then - status = who:isTalentActive(t.id) and tstring{{"color", "YELLOW"}, "Sustaining"} or tstring{{"color", "LIGHT_GREEN"}, "Sustain"} + status = who:isTalentActive(t.id) and tstring{{"color", "YELLOW"}, _t"Sustaining"} or tstring{{"color", "LIGHT_GREEN"}, _t"Sustain"} elseif t.mode == "passive" then - status = tstring{{"color", "LIGHT_BLUE"}, "Passive"} + status = tstring{{"color", "LIGHT_BLUE"}, _t"Passive"} end if who:isTalentAuto(t.id) then status:add(autoMark:getDisplayString()) @@ -56,10 +56,10 @@ end function _M:init(actor) self.actor = actor actor.hotkey = actor.hotkey or {} - Dialog.init(self, "Use Talents: "..actor.name, game.w * 0.8, game.h * 0.8) + Dialog.init(self, ("Use Talents: %s"):tformat(actor:getName()), game.w * 0.8, game.h * 0.8) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=[[ + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=_t[[ You can bind a non-passive talent to a hotkey by pressing the corresponding hotkey while selecting a talent or by right-clicking on the talent. Check out the keybinding screen in the game menu to bind hotkeys to a key (default is 1-0 plus control, shift, or alt). Right click or press '~' to configure talent confirmation and automatic use. @@ -69,13 +69,13 @@ Right click or press '~' to configure talent confirmation and automatic use. self:generateList() local cols = { - {name="", width={40,"fixed"}, display_prop="char"}, - {name="Talent", width=80, display_prop="name"}, - {name="Status", width=20, display_prop=function(item) + {name=_t"", width={40,"fixed"}, display_prop="char"}, + {name=_t"Talent", width=80, display_prop="name"}, + {name=_t"Status", width=20, display_prop=function(item) if item.talent then return TalentStatus(actor, actor:getTalentFromId(item.talent)) else return "" end end}, - {name="Hotkey", width={75,"fixed"}, display_prop="hotkey"}, - {name="Mouse Click", width={60,"fixed"}, display_prop=function(item) + {name=_t"Hotkey", width={75,"fixed"}, display_prop="hotkey"}, + {name=_t"Mouse Click", width={60,"fixed"}, display_prop=function(item) if item.talent and item.talent == self.actor.auto_shoot_talent then return "LeftClick" elseif item.talent and item.talent == self.actor.auto_shoot_midclick_talent then return "MiddleClick" else return "" end @@ -126,7 +126,7 @@ function _M:defineHotkey(id) end self.actor.hotkey[id] = {"talent", item.talent} - self:simplePopup("Hotkey "..id.." assigned", t.name:capitalize().." assigned to hotkey "..id) + self:simplePopup(("Hotkey %s assigned"):tformat(id), ("%s assigned to hotkey %s"):tformat(t.name:capitalize(), id)) self.c_list:drawTree() self.actor.changed = true end @@ -158,41 +158,41 @@ function _M:use(item, button) if t.mode == "passive" then return end if button == "right" then local list = { - {name="Unbind", what="unbind"}, - {name="Bind to left mouse click (on a target)", what="left"}, - {name="Bind to middle mouse click (on a target)", what="middle"}, + {name=_t"Unbind", what="unbind"}, + {name=_t"Bind to left mouse click (on a target)", what="left"}, + {name=_t"Bind to middle mouse click (on a target)", what="middle"}, } - if profile.auth and profile.hash_valid then table.insert(list, {name="Link in chat", what="chat-link"}) end + if profile.auth and profile.hash_valid then table.insert(list, {name=_t"Link in chat", what="chat-link"}) end if self.actor:isTalentConfirmable(t) then - table.insert(list, 1, {name="#YELLOW#Disable talent confirmation", what="unset-confirm"}) + table.insert(list, 1, {name=_t"#YELLOW#Disable talent confirmation", what="unset-confirm"}) else - table.insert(list, 1, {name=confirmMark:getDisplayString().."Request confirmation before using this talent", what="set-confirm"}) + table.insert(list, 1, {name=("%sRequest confirmation before using this talent"):tformat(confirmMark:getDisplayString()), what="set-confirm"}) end local automode = self.actor:isTalentAuto(t) - local ds = "#YELLOW#Disable " - table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==1 and ds or "").."Auto-use when available", what=(automode==1 and "auto-dis" or "auto-en-1")}) - table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==2 and ds or "").."Auto-use when no enemies are visible", what=(automode==2 and "auto-dis" or "auto-en-2")}) - table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==3 and ds or "").."Auto-use when enemies are visible", what=(automode==3 and "auto-dis" or "auto-en-3")}) - table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==4 and ds or "").."Auto-use when enemies are visible and adjacent", what=(automode==4 and "auto-dis" or "auto-en-4")}) - table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==5 and ds or "").."Auto-use when out of combat", what=(automode==5 and "auto-dis" or "auto-en-5")}) + local ds = _t"#YELLOW#Disable " + table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==1 and ds or "").._t"Auto-use when available", what=(automode==1 and "auto-dis" or "auto-en-1")}) + table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==2 and ds or "").._t"Auto-use when no enemies are visible", what=(automode==2 and "auto-dis" or "auto-en-2")}) + table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==3 and ds or "").._t"Auto-use when enemies are visible", what=(automode==3 and "auto-dis" or "auto-en-3")}) + table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==4 and ds or "").._t"Auto-use when enemies are visible and adjacent", what=(automode==4 and "auto-dis" or "auto-en-4")}) + table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==5 and ds or "").._t"Auto-use when out of combat", what=(automode==5 and "auto-dis" or "auto-en-5")}) self:triggerHook{"UseTalents:generate", actor=self.actor, talent=t, menu=list} - for i = 1, 12 * self.actor.nb_hotkey_pages do list[#list+1] = {name="Hotkey "..i, what=i} end - Dialog:listPopup("Bind talent: "..item.name:toString(), "How do you want to bind this talent?", list, 400, 500, function(b) + for i = 1, 12 * self.actor.nb_hotkey_pages do list[#list+1] = {name=_t"Hotkey "..i, what=i} end + Dialog:listPopup(("Bind talent: %s"):tformat(item.name:toString()), _t"How do you want to bind this talent?", list, 400, 500, function(b) if not b then return end if type(b.what) == "number" then for i = 1, 12 * self.actor.nb_hotkey_pages do if self.actor.hotkey[i] and self.actor.hotkey[i][1] == "talent" and self.actor.hotkey[i][2] == item.talent then self.actor.hotkey[i] = nil end end self.actor.hotkey[b.what] = {"talent", item.talent} - self:simplePopup("Hotkey "..b.what.." assigned", self.actor:getTalentFromId(item.talent).name:capitalize().." assigned to hotkey "..b.what) + self:simplePopup(("Hotkey %s assigned"):tformat(b.what), ("%s assigned to hotkey %s"):tformat(self.actor:getTalentFromId(item.talent).name:capitalize(), b.what)) elseif b.what == "middle" then self.actor.auto_shoot_midclick_talent = item.talent - self:simplePopup("Middle mouse click assigned", self.actor:getTalentFromId(item.talent).name:capitalize().." assigned to middle mouse click on an hostile target.") + self:simplePopup(_t"Middle mouse click assigned", ("%s assigned to middle mouse click on an hostile target."):tformat(self.actor:getTalentFromId(item.talent).name:capitalize())) elseif b.what == "left" then self.actor.auto_shoot_talent = item.talent - self:simplePopup("Left mouse click assigned", self.actor:getTalentFromId(item.talent).name:capitalize().." assigned to left mouse click on an hostile target.") + self:simplePopup(_t"Left mouse click assigned", ("%s assigned to left mouse click on an hostile target."):tformat(self.actor:getTalentFromId(item.talent).name:capitalize())) elseif b.what == "unbind" then if self.actor.auto_shoot_talent == item.talent then self.actor.auto_shoot_talent = nil end if self.actor.auto_shoot_midclick_talent == item.talent then self.actor.auto_shoot_midclick_talent = nil end @@ -280,7 +280,7 @@ function _M:generateList() if added then table.insert(list, where+1, { char="", - name=tstring{{"font","bold"}, cat:capitalize().." / "..tt.name:capitalize(), {"font","normal"}}, + name=tstring{{"font","bold"}, _t(cat):capitalize().." / "..tt.name:capitalize(), {"font","normal"}}, type=tt.type, color=function() return {0x80, 0x80, 0x80} end, status="", @@ -348,13 +348,13 @@ function _M:generateList() for i, node in ipairs(passives) do node.char = "" end list = { - { char='', name=('#{bold}#Activable talents#{normal}#'):toTString(), status='', hotkey='', desc="All activable talents you can currently use.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=actives, shown=true }, - { char='', name=('#{bold}#Object powers#{normal}#'):toTString(), status='', hotkey='', desc="Object powers that can be activated automatically. Most usable objects will appear here unless they are on cooldown or have ai restrictions.", color=function() return colors.simple(colors.SALMON) end, nodes=objects, shown=true }, - { char='', name=('#{bold}#Sustainable talents#{normal}#'):toTString(), status='', hotkey='', desc="All sustainable talents you can currently use.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=sustains, shown=true }, - { char='', name=('#{bold}#Sustained talents#{normal}#'):toTString(), status='', hotkey='', desc="All sustainable talents you currently sustain, using them will de-activate them.", color=function() return colors.simple(colors.YELLOW) end, nodes=sustained, shown=true }, - { char='', name=('#{bold}#Cooling down talents#{normal}#'):toTString(), status='', hotkey='', desc="All talents you have used that are still cooling down.", color=function() return colors.simple(colors.LIGHT_RED) end, nodes=cooldowns, shown=true }, - { char='', name=('#{bold}#Unavailable talents#{normal}#'):toTString(), status='', hotkey='', desc="All talents you have that do not have enough resources, or satisfy other dependencies.", color=function() return colors.simple(colors.GREY) end, nodes=unavailables, shown=true }, - { char='', name=('#{bold}#Passive talents#{normal}#'):toTString(), status='', hotkey='', desc="All your passive talents, they are always active.", color=function() return colors.simple(colors.WHITE) end, nodes=passives, shown=true }, + { char='', name=(_t'#{bold}#Activable talents#{normal}#'):toTString(), status='', hotkey='', desc=_t"All activable talents you can currently use.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=actives, shown=true }, + { char='', name=(_t'#{bold}#Object powers#{normal}#'):toTString(), status='', hotkey='', desc=_t"Object powers that can be activated automatically. Most usable objects will appear here unless they are on cooldown or have ai restrictions.", color=function() return colors.simple(colors.SALMON) end, nodes=objects, shown=true }, + { char='', name=(_t'#{bold}#Sustainable talents#{normal}#'):toTString(), status='', hotkey='', desc=_t"All sustainable talents you can currently use.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=sustains, shown=true }, + { char='', name=(_t'#{bold}#Sustained talents#{normal}#'):toTString(), status='', hotkey='', desc=_t"All sustainable talents you currently sustain, using them will de-activate them.", color=function() return colors.simple(colors.YELLOW) end, nodes=sustained, shown=true }, + { char='', name=(_t'#{bold}#Cooling down talents#{normal}#'):toTString(), status='', hotkey='', desc=_t"All talents you have used that are still cooling down.", color=function() return colors.simple(colors.LIGHT_RED) end, nodes=cooldowns, shown=true }, + { char='', name=(_t'#{bold}#Unavailable talents#{normal}#'):toTString(), status='', hotkey='', desc=_t"All talents you have that do not have enough resources, or satisfy other dependencies.", color=function() return colors.simple(colors.GREY) end, nodes=unavailables, shown=true }, + { char='', name=(_t'#{bold}#Passive talents#{normal}#'):toTString(), status='', hotkey='', desc=_t"All your passive talents, they are always active.", color=function() return colors.simple(colors.WHITE) end, nodes=passives, shown=true }, chars = chars, } self.list = list diff --git a/game/modules/tome/dialogs/debug/AdvanceActor.lua b/game/modules/tome/dialogs/debug/AdvanceActor.lua index 69f80c8141dc78f7e25ab38cdf9f214771e00c0c..1a921251cf6b25f961e8fdcca30edcd31f3adbda 100644 --- a/game/modules/tome/dialogs/debug/AdvanceActor.lua +++ b/game/modules/tome/dialogs/debug/AdvanceActor.lua @@ -35,13 +35,13 @@ _M.last_actors = {} function _M:init(data) self.actor = data and data.actor or game.player - Dialog.init(self, ("DEBUG -- Levelup Actor: [%s] %s"):format(self.actor.uid, self.actor.name), 800, 500) + Dialog.init(self, ("DEBUG -- Levelup Actor: [%s] %s"):tformat(self.actor.uid, self.actor.name), 800, 500) -- set default inputs self.inputs = {do_level_up=true, levelup=50, set_base_stats=true, set_bonus_stats=true} self.c_tut = Textzone.new{auto_width=true, auto_height=true, no_color_bleed=true, font=self.font, - text=[[Levelup an actor. + text=_t[[Levelup an actor. Optionally set Stat levels, learn all talents possible, and gain points to spend on Levelup. The actor is backed up before changes are made. (Use the "Restore" button to recover.) ]]} @@ -58,7 +58,7 @@ The actor is backed up before changes are made. (Use the "Restore" button to re } self.do_level_up = do_level_up - local lev_box = Numberbox.new{title=" Advance to Level: ", number=self.inputs.levelup, max=1000, min=1, chars=6, fct=function(value) + local lev_box = Numberbox.new{title=_t" Advance to Level: ", number=self.inputs.levelup, max=1000, min=1, chars=6, fct=function(value) self.inputs.levelup = value self:finish() end, @@ -73,9 +73,9 @@ The actor is backed up before changes are made. (Use the "Restore" button to re local restore_text = function(self) local last_actor = _M.last_actors[self.actor] if last_actor and #last_actor > 0 then - return ("Restore: %s (v%d)"):format(last_actor[#last_actor].name, #last_actor), 1 + return ("Restore: %s (v%d)"):tformat(last_actor[#last_actor].name, #last_actor), 1 else - return "Restore: none", 0.5 + return _t"Restore: none", 0.5 end end local rest_text, rest_alpha = restore_text(self) @@ -97,7 +97,7 @@ The actor is backed up before changes are made. (Use the "Restore" button to re } self.restore = restore - local get_points = Checkbox.new{title="Gain points for stats, talents, and prodigies (unlimited respec)", text="Text", default=false, check_last=false, + local get_points = Checkbox.new{title=_t"Gain points for stats, talents, and prodigies (unlimited respec)", text="Text", default=false, check_last=false, fct=function(checked) end, on_change=function(checked) @@ -116,7 +116,7 @@ The actor is backed up before changes are made. (Use the "Restore" button to re } self.set_base_stats = set_base_stats - local base_stat_box = Numberbox.new{title=" Force all BASE stats to: ", number=self:autoStatLevel(self.inputs.levelup), max=1000, min=1, chars=6, fct=function(value) + local base_stat_box = Numberbox.new{title=_t" Force all BASE stats to: ", number=self:autoStatLevel(self.inputs.levelup), max=1000, min=1, chars=6, fct=function(value) self.inputs.base_stat_level = value end, on_change = function(value) @@ -131,7 +131,7 @@ The actor is backed up before changes are made. (Use the "Restore" button to re end self.base_stat_box = base_stat_box - local set_bonus_stats = Checkbox.new{title="", default=self.inputs.set_bonus_stats, check_last=false, + local set_bonus_stats = Checkbox.new{title=_t"", default=self.inputs.set_bonus_stats, check_last=false, fct=function(checked) self.inputs.set_bonus_stats = checked end, @@ -141,7 +141,7 @@ The actor is backed up before changes are made. (Use the "Restore" button to re } self.set_bonus_stats = set_bonus_stats - local bonus_stat_box = Numberbox.new{title=" Force all BONUS stats to: ", number=self:autoStatBonusLevel(self.inputs.levelup), max=1000, min=-50, chars=6, fct=function(value) + local bonus_stat_box = Numberbox.new{title=_t" Force all BONUS stats to: ", number=self:autoStatBonusLevel(self.inputs.levelup), max=1000, min=-50, chars=6, fct=function(value) self.inputs.bonus_stat_level = value end, on_change = function(value) @@ -156,7 +156,7 @@ The actor is backed up before changes are made. (Use the "Restore" button to re end self.bonus_stat_box = bonus_stat_box - local set_tl = Checkbox.new{title="Learn Talents ", text="Text", default=false, check_last=true, + local set_tl = Checkbox.new{title=_t"Learn Talents ", text="Text", default=false, check_last=true, fct=function(checked) end, on_change=function(checked) @@ -164,7 +164,7 @@ The actor is backed up before changes are made. (Use the "Restore" button to re end } self.set_tl = set_tl - local tl_box = Numberbox.new{title="Unlock & Learn all available talents to level: ", number="maximum allowed", max=1000, min=1, chars=20, fct=function(value) + local tl_box = Numberbox.new{title=_t"Unlock & Learn all available talents to level: ", number=_t"maximum allowed", max=1000, min=1, chars=20, fct=function(value) self.tl_box:updateText(0) self.inputs.talent_levelup = value self:finish() @@ -179,7 +179,7 @@ The actor is backed up before changes are made. (Use the "Restore" button to re } self.tl_box = tl_box - local force_tl = Checkbox.new{title="Ignore requirements", text="Text", default=false, check_last=false, + local force_tl = Checkbox.new{title=_t"Ignore requirements", text="Text", default=false, check_last=false, fct=function(checked) self.inputs.ignore_talent_limits = checked end, @@ -189,7 +189,7 @@ The actor is backed up before changes are made. (Use the "Restore" button to re } self.force_tl = force_tl - local mastery_box = Numberbox.new{title="Force all talent mastery levels to (0.1-5.0): ", number="no change", max=5.0, min=0.1, chars=10, step=0.1, fct=function(value) + local mastery_box = Numberbox.new{title=_t"Force all talent mastery levels to (0.1-5.0): ", number=_t"no change", max=5.0, min=0.1, chars=10, step=0.1, fct=function(value) local old = self.mastery_box.number self.mastery_box:updateText(0) self.inputs.set_mastery = value @@ -207,7 +207,7 @@ The actor is backed up before changes are made. (Use the "Restore" button to re } self.mastery_box = mastery_box - local learn_all_talents = Checkbox.new{title="Unlock all talent types (slow)", default=false, check_last=false, + local learn_all_talents = Checkbox.new{title=_t"Unlock all talent types (slow)", default=false, check_last=false, fct=function(checked) self.inputs.alltalents = checked end, @@ -217,8 +217,8 @@ The actor is backed up before changes are made. (Use the "Restore" button to re } self.learn_all_talents = learn_all_talents - local ok = Button.new{text="Accept", fct=function() self:finish() end} - local cancel = Button.new{text="Cancel", fct=function() self:cancelclick() end} + local ok = Button.new{text=_t"Accept", fct=function() self:finish() end} + local cancel = Button.new{text=_t"Cancel", fct=function() self:cancelclick() end} local top = lev_box.h + self.c_tut.h + 15 self:loadUI{ @@ -311,7 +311,7 @@ function _M:levelupActor(who, lev, data) -- backup the character _M.last_actors[who] = _M.last_actors[who] or {} table.insert(_M.last_actors[who], who:cloneFull()) --- game.log("#LIGHT_BLUE#Advancing actor %s[%s]", who.name, who.uid) +-- game.log("#LIGHT_BLUE#Advancing actor %s[%s]", who:getName(), who.uid) local tt_def=who.talents_types_def who.lastLearntTalentsMax = function(what) return 500 end @@ -323,16 +323,16 @@ function _M:levelupActor(who, lev, data) lev = who.level if data.base_stat_level then - game.log("%s #GOLD#Forcing all Base Stats to %s", who.name, data.base_stat_level) + game.log("%s #GOLD#Forcing all Base Stats to %s", who:getName(), data.base_stat_level) for stat = 1, 6 do local inc = data.base_stat_level - who:getStat(stat, nil, nil, true) who:incStat(stat, inc) end end - if data.set_mastery then game.log("%s #GOLD#Resetting all talents_types_mastery to %s", who.name, data.set_mastery) end + if data.set_mastery then game.log("%s #GOLD#Resetting all talents_types_mastery to %s", who:getName(), data.set_mastery) end if data.alltalents then - game.log("%s #GOLD#Unlocking All Talent Types", who.name) + game.log("%s #GOLD#Unlocking All Talent Types", who:getName()) for key, value in ipairs(tt_def) do who:learnTalentType(tt_def[key].type) game.log("#LIGHT_BLUE#%s -- %s", key, value.type) @@ -366,7 +366,7 @@ function _M:levelupActor(who, lev, data) -- done last to reverse any passive stat bonuses from talents if data.bonus_stat_level then - game.log("%s #GOLD#Forcing all Bonus Stats to %s", who.name, data.bonus_stat_level) + game.log("%s #GOLD#Forcing all Bonus Stats to %s", who:getName(), data.bonus_stat_level) for stat = 1, 6 do local inc = data.bonus_stat_level - (who:getStat(stat, nil, nil, false) - who:getStat(stat, nil, nil, true)) who:incIncStat(stat, inc) @@ -383,11 +383,11 @@ function _M:levelupActor(who, lev, data) who.unused_stats = who.unused_stats + 200 local points = {} - if who.unused_stats > 0 then points[#points+1] = ("%d stat point(s)"):format(who.unused_stats) end - if who.unused_talents > 0 then points[#points+1] = ("%d class talent point(s)"):format(who.unused_talents) end - if who.unused_generics > 0 then points[#points+1] = ("%d generic talent point(s)"):format(who.unused_generics) end - if who.unused_talents_types > 0 then points[#points+1] = ("%d category point(s)"):format(who.unused_talents_types) end - if who.unused_prodigies > 0 then points[#points+1] = ("#ORCHID#%d prodigy point(s)#LAST#"):format(who.unused_prodigies) end - if #points > 0 then game.log("#LIGHT_BLUE#%s has %s to spend", who.name:capitalize(), table.concatNice(points, ", ", ", and ")) end + if who.unused_stats > 0 then points[#points+1] = ("%d stat point(s)"):tformat(who.unused_stats) end + if who.unused_talents > 0 then points[#points+1] = ("%d class talent point(s)"):tformat(who.unused_talents) end + if who.unused_generics > 0 then points[#points+1] = ("%d generic talent point(s)"):tformat(who.unused_generics) end + if who.unused_talents_types > 0 then points[#points+1] = ("%d category point(s)"):tformat(who.unused_talents_types) end + if who.unused_prodigies > 0 then points[#points+1] = ("#ORCHID#%d prodigy point(s)#LAST#"):tformat(who.unused_prodigies) end + if #points > 0 then game.log("#LIGHT_BLUE#%s has %s to spend", who:getName():capitalize(), table.concatNice(points, ", ", _t", and ")) end end end diff --git a/game/modules/tome/dialogs/debug/AdvanceZones.lua b/game/modules/tome/dialogs/debug/AdvanceZones.lua index 1f4ce3cc736d6062ecc2b0ae04cc6cd42b49a8a6..80ffb5e21aa23bc4b2d78c97aa07ccc2e8d51598 100644 --- a/game/modules/tome/dialogs/debug/AdvanceZones.lua +++ b/game/modules/tome/dialogs/debug/AdvanceZones.lua @@ -29,7 +29,7 @@ function _M:run() local escort_count = 0 game.player.advance_zones_data = {} - game:registerDialog(require('engine.dialogs.GetText').new("Advance Through Zones", "Enter a comma delimited list of zones or zone tiers to clear", 1, 9999, function(text) + game:registerDialog(require('engine.dialogs.GetText').new(_t"Advance Through Zones", _t"Enter a comma delimited list of zones or zone tiers to clear", 1, 9999, function(text) list = self:getZones(text) game.player.no_inventory_access = true @@ -45,7 +45,7 @@ function _M:run() -- Do some analysis of where the experience came from and show it for i, zone in ipairs(game.player.advance_zones_data) do local exp_list = self:getExpBreakdown(zone.data) - game.log(("%s: Level %0.2f to %0.2f (#LIGHT_STEEL_BLUE#+%0.2f#LAST#)"):format(zone.name, zone.data.start_level, zone.data.end_level, zone.data.end_level - zone.data.start_level )) + game.log(("%s: Level %0.2f to %0.2f (#LIGHT_STEEL_BLUE#+%0.2f#LAST#)"):tformat(zone.name, zone.data.start_level, zone.data.end_level, zone.data.end_level - zone.data.start_level )) game.log(exp_list) end @@ -210,8 +210,8 @@ end -- - Log multiple run stats -- - Better UI function _M:clearZone(zone, escort_zones) - if not game:changeLevelCheck(1, zone) then game.log("Unable to level change to floor 1 of "..zone) end - if game.zone.debug_auto_clear and game.zone.debug_auto_clear == 0 then game.log(zone.." is not valid for autoclear") end + if not game:changeLevelCheck(1, zone) then game.log("Unable to level change to floor 1 of %s", zone) end + if game.zone.debug_auto_clear and game.zone.debug_auto_clear == 0 then game.log("%s is not valid for autoclear", zone) end local cur_exp, max_exp = game.player.exp, game.player:getExpChart(game.player.level+1) local start_level = game.player.level + math.min(1, math.max(0, cur_exp / max_exp)) @@ -248,7 +248,7 @@ function _M:clearZone(zone, escort_zones) while game.level.level < (max_floors) and i < 20 do data[#data+1] = self:clearLevel() if not game:changeLevelCheck(game.level.level + 1, game.zone.short_name) then - game.log("Unable to level change to floor "..i.." of "..zone) + game.log("Unable to level change to floor %d of %s", i, zone) break end game:changeLevel(game.level.level + 1, game.zone.short_name) diff --git a/game/modules/tome/dialogs/debug/AlterFaction.lua b/game/modules/tome/dialogs/debug/AlterFaction.lua index 7c4b2acc882347523689357a0d5da5e6e149b1c2..495e0f76d52d481e8ed5de967680d81bb7995399 100644 --- a/game/modules/tome/dialogs/debug/AlterFaction.lua +++ b/game/modules/tome/dialogs/debug/AlterFaction.lua @@ -27,7 +27,7 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init() self:generateList() - Dialog.init(self, "DEBUG -- Alter Faction", 1, 1) + Dialog.init(self, _t"DEBUG -- Alter Faction", 1, 1) local list = List.new{width=400, height=500, list=self.list, fct=function(item) self:use(item) end} @@ -63,11 +63,11 @@ function _M:use(item) if not item then return end game:unregisterDialog(self) - Dialog:listPopup("Alter: "..item.def.name, "Alter to which state:", {{name="friendly"}, {name="neutral"}, {name="hostile"}}, 300, 150, function(sel) + Dialog:listPopup(("Alter: %s"):tformat(item.def.name), _t"Alter to which state:", {{name=_t"friendly"}, {name=_t"neutral"}, {name=_t"hostile"}}, 300, 150, function(sel) if not sel then return end - if sel.name == "friendly" then Faction:setFactionReaction(game.player.faction, item.def.short_name, 100, true) - elseif sel.name == "neutral" then Faction:setFactionReaction(game.player.faction, item.def.short_name, 0, true) - elseif sel.name == "hostile" then Faction:setFactionReaction(game.player.faction, item.def.short_name, -100, true) + if sel.name == _t"friendly" then Faction:setFactionReaction(game.player.faction, item.def.short_name, 100, true) + elseif sel.name == _t"neutral" then Faction:setFactionReaction(game.player.faction, item.def.short_name, 0, true) + elseif sel.name == _t"hostile" then Faction:setFactionReaction(game.player.faction, item.def.short_name, -100, true) end end) end diff --git a/game/modules/tome/dialogs/debug/ChangeZone.lua b/game/modules/tome/dialogs/debug/ChangeZone.lua index 4247bd2696339caba79d630f7f8850d99a12aaed..206a49e5911bda2fce1ffbb19e1a3fcc7377e77e 100644 --- a/game/modules/tome/dialogs/debug/ChangeZone.lua +++ b/game/modules/tome/dialogs/debug/ChangeZone.lua @@ -26,7 +26,7 @@ module(..., package.seeall, class.inherit(engine.ui.Dialog)) function _M:init() self:generateList() - engine.ui.Dialog.init(self, "DEBUG -- Change Zone", 1, 1) + engine.ui.Dialog.init(self, _t"DEBUG -- Change Zone", 1, 1) local list = List.new{width=400, height=500, scrollbar=true, list=self.list, fct=function(item) self:use(item) end} @@ -62,7 +62,7 @@ function _M:use(item) if not item then return end game:unregisterDialog(self) - game:registerDialog(GetQuantity.new("Zone: "..item.name, "Level "..item.min.."-"..item.max, 1, item.max, function(qty) + game:registerDialog(GetQuantity.new(("Zone: %s"):tformat(item.name), ("Level %s-%s"):tformat(item.min, item.max), 1, item.max, function(qty) game:changeLevel(qty, item.zone) end), 1) end diff --git a/game/modules/tome/dialogs/debug/CreateItem.lua b/game/modules/tome/dialogs/debug/CreateItem.lua index 191caf87ceeab5a9645fc8bdcbe668ef1ea6e39b..5e3e2d479cbc3447cd0f935afa049e1c4f71811e 100644 --- a/game/modules/tome/dialogs/debug/CreateItem.lua +++ b/game/modules/tome/dialogs/debug/CreateItem.lua @@ -31,10 +31,10 @@ module(..., package.seeall, class.inherit(Dialog, Focusable, UIGroup)) function _M:init() self.actor = game.player self:generateList() - Dialog.init(self, "DEBUG -- Create Object", 1, 1) + Dialog.init(self, _t"DEBUG -- Create Object", 1, 1) self.list_width = 500 - local get_global = Checkbox.new{title="Load from other zones ", default=false, check_last=false, + local get_global = Checkbox.new{title=_t"Load from other zones ", default=false, check_last=false, fct=function(checked) self:setFocus(self.o_list) end, @@ -113,7 +113,7 @@ function _M:init() } self.get_global = get_global - local id_check = Checkbox.new{title="Generate examples (right-click refreshes) ", text="Text", default=false, check_last=false, + local id_check = Checkbox.new{title=_t"Generate examples (right-click refreshes) ", text="Text", default=false, check_last=false, fct=function(checked) self.do_ids = checked self:setFocus(self.o_list) @@ -206,14 +206,14 @@ function _M:list_select(item, sel) local od = item.obj:getDesc({do_color=true}, nil, true, self.actor) if type(od) == "string" then od = od:toTString() end table.insert(od, 1, true) - table.insert(od, 1, "#CRIMSON#==Resolved Example==#LAST#") + table.insert(od, 1, _t"#CRIMSON#==Resolved Example==#LAST#") item.desc = tostring(od) end, debug.traceback) if not ok then print("[DEBUG] Item generation error:", ret) item.error = ret game.log("#LIGHT_BLUE#Object %s could not be generated or identified. Error:\n%s", item.e.name, ret) - item.desc = tstring{("#GOLD#%s#LAST#"):format(item.e.name), true, "Object could not be resolved/identified.", true, ("Error:\n%s"):format(ret)} + item.desc = tstring{("#GOLD#%s#LAST#"):tformat(item.e.name), true, _t"Object could not be resolved/identified.", true, ("Error:\n%s"):tformat(ret)} end end game:tooltipDisplayAtMap(game.w, game.h, item.desc or "") @@ -253,21 +253,21 @@ function _M:acceptObject(obj, actor) obj = obj:cloneFull() actor = actor or self.actor or game.player -- choose where to put object (default is current actor's inventory) - local d = Dialog:multiButtonPopup("Place Object", "Place the object where?", - {{name=("Inventory of %s%s"):format( actor.name, actor.player and " #LIGHT_GREEN#(player)#LAST#" or ""), choice="player", fct=function(sel) + local d = Dialog:multiButtonPopup(_t"Place Object", _t"Place the object where?", + {{name=("Inventory of %s%s"):tformat( actor:getName(), actor.player and _t" #LIGHT_GREEN#(player)#LAST#" or ""), choice="player", fct=function(sel) -- if not obj.quest and not obj.plot then obj.__transmo = true end actor:addObject(actor.INVEN_INVEN, obj) game.zone:addEntity(game.level, obj, "object") _M.findObject(self, obj, actor) end}, - {name=("Drop @ (%s, %s)%s"):format(actor.x, actor.y, actor.player and " #LIGHT_GREEN#(player)#LAST#" or ""), choice="drop", fct=function(sel) + {name=("Drop @ (%s, %s)%s"):tformat(actor.x, actor.y, actor.player and _t" #LIGHT_GREEN#(player)#LAST#" or ""), choice="drop", fct=function(sel) game.zone:addEntity(game.level, obj, "object", actor.x, actor.y) game.log("#LIGHT_BLUE#Dropped %s at (%d, %d)", obj:getName({do_color=true}), actor.x, actor.y) end}, - {name=("NPC Inventory"):format(), choice="npc", fct=function(sel) + {name=("NPC Inventory"):tformat(), choice="npc", fct=function(sel) local x, y, act = _M.objectToTarget(self, obj) end}, - {name=("Cancel"):format(), choice="cancel", fct=function(sel) + {name=("Cancel"):tformat(), choice="cancel", fct=function(sel) end} }, nil, nil, -- autosize @@ -283,7 +283,7 @@ end function _M:findObject(obj, actor) if not (obj and actor) then return end local inv, slot, attached = actor:searchAllInventories(obj, function(o, who, inven, slot, attached) - game.log("#LIGHT_BLUE#OBJECT:#LAST# %s%s: #LIGHT_BLUE#[%s] %s {%s, slot %s} at (%s, %s)#LAST#", o:getName({do_color=true, no_add_name=true}), attached and (" (attached to: %s)"):format(attached:getName({do_color=true, no_add_name=true})) or "", who.uid, who.name, inven.name, slot, who.x, who.y) + game.log("#LIGHT_BLUE#OBJECT:#LAST# %s%s: #LIGHT_BLUE#[%s] %s {%s, slot %s} at (%s, %s)#LAST#", o:getName({do_color=true, no_add_name=true}), attached and (" (attached to: %s)"):format(attached:getName({do_color=true, no_add_name=true})) or "", who.uid, who:getName(), inven.name, slot, who.x, who.y) end) return inv, slot, attached end @@ -309,12 +309,12 @@ function _M:use(item) end else local example = item.obj and not item.error - game:registerDialog(GetQuantity.new("Number of items to make", "Enter 1-100"..(example and ", or 0 for the example item" or ""), 20, 100, function(qty) + game:registerDialog(GetQuantity.new(_t"Number of items to make", ("Enter 1-100%s"):tformat(example and _t", or 0 for the example item" or ""), 20, 100, function(qty) if qty == 0 and item.obj and not item.error then self:acceptObject(item.obj) else game.log("#LIGHT_BLUE# Creating %d items:", qty) - Dialog:yesnoPopup("Ego", "Add an ego enhancement if possible?", function(ret) + Dialog:yesnoPopup(_t"Ego", _t"Add an ego enhancement if possible?", function(ret) if not ret then for i = 1, qty do local n = game.zone:finishEntity(game.level, "object", item.e, {ego_chance=-1000}) @@ -323,7 +323,7 @@ function _M:use(item) game.log("#LIGHT_BLUE#Created %s", n:getName({do_color=true})) end else - Dialog:yesnoPopup("Greater Ego", "Add a greater ego enhancement if possible?", function(ret) + Dialog:yesnoPopup(_t"Greater Ego", _t"Add a greater ego enhancement if possible?", function(ret) local f if not ret then f = {ego_chance=1000} @@ -361,7 +361,7 @@ function _M:generateList(obj_list) return a.name < b.name end) - table.insert(list, 1, {name = " #GOLD#All Artifacts#LAST#", action=function(item) + table.insert(list, 1, {name = _t" #GOLD#All Artifacts#LAST#", action=function(item) game.log("#LIGHT_BLUE#Creating All Artifacts.") local count = 0 for i, e in ipairs(obj_list) do @@ -381,7 +381,7 @@ function _M:generateList(obj_list) end game.log("#LIGHT_BLUE#%d artifacts created.", count) end}) - table.insert(list, 1, {name = " #YELLOW#Random Object#LAST#", action=function(item) + table.insert(list, 1, {name = _t" #YELLOW#Random Object#LAST#", action=function(item) game:unregisterDialog(self) local d = require("mod.dialogs.debug.RandomObject").new() game:registerDialog(d) diff --git a/game/modules/tome/dialogs/debug/CreateTrap.lua b/game/modules/tome/dialogs/debug/CreateTrap.lua index db227d4cfa7f009e5d3af10fc8130ae354945c7a..488bc1613c33db91b578d81c3f99f7ada8c9c5a9 100644 --- a/game/modules/tome/dialogs/debug/CreateTrap.lua +++ b/game/modules/tome/dialogs/debug/CreateTrap.lua @@ -26,7 +26,7 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init() self:generateList() - Dialog.init(self, "DEBUG -- Create Trap", 1, 1) + Dialog.init(self, _t"DEBUG -- Create Trap", 1, 1) local list = List.new{width=400, height=500, list=self.list, fct=function(item) self:use(item) end} diff --git a/game/modules/tome/dialogs/debug/DebugMain.lua b/game/modules/tome/dialogs/debug/DebugMain.lua index f4c6116e1720f9eab335ccf5880c7adadd40175e..262533d2a389c8c3117f0ef55965ee5e6a9a0425 100644 --- a/game/modules/tome/dialogs/debug/DebugMain.lua +++ b/game/modules/tome/dialogs/debug/DebugMain.lua @@ -26,7 +26,7 @@ module(..., package.seeall, class.inherit(engine.ui.Dialog)) function _M:init() self:generateList() - engine.ui.Dialog.init(self, "Debug/Cheat! It's BADDDD!", 1, 1) + engine.ui.Dialog.init(self, _t"Debug/Cheat! It's BADDDD!", 1, 1) local list = List.new{scrollbar=true, width=400, height=500, list=self.list, fct=function(item) self:use(item) end} @@ -97,7 +97,7 @@ function _M:use(item) range = 200, }) elseif act == "change_level" then - game:registerDialog(GetQuantity.new("Zone: "..game.zone.name, "Level 1-"..game.zone.max_level, game.level.level, game.zone.max_level, function(qty) + game:registerDialog(GetQuantity.new(("Zone: %s"):tformat(game.zone.name), ("Level 1-%s"):tformat(game.zone.max_level), game.level.level, game.zone.max_level, function(qty) game:changeLevel(qty) end), 1) elseif act == "shertul-energy" then @@ -119,7 +119,7 @@ function _M:use(item) end end end elseif act == "remove-all" then - local d = require"engine.ui.Dialog":yesnocancelPopup("Kill or Remove", "Remove all (non-party) creatures or kill them for the player (awards experience and drops loot)?", + local d = require"engine.ui.Dialog":yesnocancelPopup(_t"Kill or Remove", _t"Remove all (non-party) creatures or kill them for the player (awards experience and drops loot)?", function(remove_all, escape) if escape then return end local l = {} @@ -137,9 +137,9 @@ function _M:use(item) end count = count + 1 end - game.log("#LIGHT_BLUE#%s %d creatures.", remove_all and "Removed" or "Killed", count) + game.log("#LIGHT_BLUE#%s %d creatures.", remove_all and _t"Removed" or _t"Killed", count) end - , "Remove", "Kill", "Cancel", false) + , _t"Remove", _t"Kill", _t"Cancel", false) elseif act == "all-ingredients" then game.party:giveAllIngredients(100) -- Gems count too @@ -161,25 +161,25 @@ end function _M:generateList() local list = {} - list[#list+1] = {name="Change Zone", dialog="ChangeZone"} - list[#list+1] = {name="Change Level", action="change_level"} - list[#list+1] = {name="Reveal all map", action="magic_map"} - list[#list+1] = {name="Toggle Demi-Godmode", action="demigodmode"} - list[#list+1] = {name="Toggle Godmode", action="godmode"} - list[#list+1] = {name="Alter Faction", dialog="AlterFaction"} - list[#list+1] = {name="Summon a Creature", dialog="SummonCreature"} - list[#list+1] = {name="Create Items", dialog="CreateItem"} - list[#list+1] = {name="Create a Trap", dialog="CreateTrap"} - list[#list+1] = {name="Grant/Alter Quests", dialog="GrantQuest"} - list[#list+1] = {name="Advance Player", dialog="AdvanceActor"} - list[#list+1] = {name="Remove or Kill all creatures", action="remove-all"} - list[#list+1] = {name="Give Sher'tul fortress energy", action="shertul-energy"} - list[#list+1] = {name="Give all ingredients", action="all-ingredients"} - list[#list+1] = {name="Weakdamage", action="weakdamage"} - list[#list+1] = {name="Spawn Event", dialog="SpawnEvent"} - list[#list+1] = {name="Endgamify", class="Endgamify"} - list[#list+1] = {name="Reload/regenerate Zone and level", class="ReloadZone"} - list[#list+1] = {name="Automatically Clear Zones", class="AdvanceZones"} + list[#list+1] = {name=_t"Change Zone", dialog="ChangeZone"} + list[#list+1] = {name=_t"Change Level", action="change_level"} + list[#list+1] = {name=_t"Reveal all map", action="magic_map"} + list[#list+1] = {name=_t"Toggle Demi-Godmode", action="demigodmode"} + list[#list+1] = {name=_t"Toggle Godmode", action="godmode"} + list[#list+1] = {name=_t"Alter Faction", dialog="AlterFaction"} + list[#list+1] = {name=_t"Summon a Creature", dialog="SummonCreature"} + list[#list+1] = {name=_t"Create Items", dialog="CreateItem"} + list[#list+1] = {name=_t"Create a Trap", dialog="CreateTrap"} + list[#list+1] = {name=_t"Grant/Alter Quests", dialog="GrantQuest"} + list[#list+1] = {name=_t"Advance Player", dialog="AdvanceActor"} + list[#list+1] = {name=_t"Remove or Kill all creatures", action="remove-all"} + list[#list+1] = {name=_t"Give Sher'tul fortress energy", action="shertul-energy"} + list[#list+1] = {name=_t"Give all ingredients", action="all-ingredients"} + list[#list+1] = {name=_t"Weakdamage", action="weakdamage"} + list[#list+1] = {name=_t"Spawn Event", dialog="SpawnEvent"} + list[#list+1] = {name=_t"Endgamify", class="Endgamify"} + list[#list+1] = {name=_t"Reload/regenerate Zone and level", class="ReloadZone"} + list[#list+1] = {name=_t"Automatically Clear Zones", class="AdvanceZones"} self:triggerHook{"DebugMain:generate", menu=list} local chars = {} diff --git a/game/modules/tome/dialogs/debug/Endgamify.lua b/game/modules/tome/dialogs/debug/Endgamify.lua index b47c3c6dc1c3f2601cd771eaa93e51fc607d6ce2..f28c336aba8359576fadc360921f6a0048bcc816 100644 --- a/game/modules/tome/dialogs/debug/Endgamify.lua +++ b/game/modules/tome/dialogs/debug/Endgamify.lua @@ -219,7 +219,7 @@ function _M:makeEndgameFixed() game.zone.object_list = obj_list for _, name in pairs(endgame_fixed_artifacts) do local o = game.zone:makeEntityByName(game.level, "object", name) - if not o then game.log("Failed to generate "..name) break end + if not o then game.log("Failed to generate %s", name) break end o:identify(true) game.zone:addEntity(game.level, o, "object") game.player:addObject(game.player:getInven("INVEN"), o) diff --git a/game/modules/tome/dialogs/debug/GrantQuest.lua b/game/modules/tome/dialogs/debug/GrantQuest.lua index 7bce29ee4034984432688f2647b95db0c36ee48c..d035d69edc3859c98483ca0cf82e28b1bb6b1a63 100644 --- a/game/modules/tome/dialogs/debug/GrantQuest.lua +++ b/game/modules/tome/dialogs/debug/GrantQuest.lua @@ -26,7 +26,7 @@ module(..., package.seeall, class.inherit(engine.ui.Dialog)) function _M:init() self:generateList() - engine.ui.Dialog.init(self, "Debug -- Grant/Alter Quest", 1, 1) + engine.ui.Dialog.init(self, _t"Debug -- Grant/Alter Quest", 1, 1) local list = List.new{width=400, height=500, list=self.list, fct=function(item) self:use(item) end} diff --git a/game/modules/tome/dialogs/debug/PlotTalent.lua b/game/modules/tome/dialogs/debug/PlotTalent.lua index c0500894c84f47b8de4c062bb9b29b6028c4ee84..44cf2ddd750d13737742c580fab62639357ebccd 100644 --- a/game/modules/tome/dialogs/debug/PlotTalent.lua +++ b/game/modules/tome/dialogs/debug/PlotTalent.lua @@ -29,12 +29,12 @@ _M.last_max_tl = 10 function _M:init(actor, t) actor = actor:cloneFull() - engine.ui.Dialog.init(self, ("Values plot for: %s (mastery %0.1f)"):format(t.name, actor:getTalentMastery(t)), game.w * 0.8, game.h * 0.8) + engine.ui.Dialog.init(self, ("Values plot for: %s (mastery %0.1f)"):tformat(t.name, actor:getTalentMastery(t)), game.w * 0.8, game.h * 0.8) self.vos = {} self.points_texts = {} self:generatePlot(actor, t, _M.last_max_tl) - local tlbox = Textbox.new{title="TL: ", text=tostring(_M.last_max_tl), chars=5, max_len=3, fct=function() end, on_change=function(text) self:generatePlot(actor, t, util.bound(tonumber(text) or 20, 5, 500)) end} + local tlbox = Textbox.new{title=_t"TL: ", text=tostring(_M.last_max_tl), chars=5, max_len=3, fct=function() end, on_change=function(text) self:generatePlot(actor, t, util.bound(tonumber(text) or 20, 5, 500)) end} self:loadUI{ {left=0, top=0, ui=tlbox} } diff --git a/game/modules/tome/dialogs/debug/RandomActor.lua b/game/modules/tome/dialogs/debug/RandomActor.lua index 19b2bdfdf9cfa019685c16b1a4d5bf30e8b88007..71a6a81318c67bc15e4ae4256d12c833df4a36e7 100644 --- a/game/modules/tome/dialogs/debug/RandomActor.lua +++ b/game/modules/tome/dialogs/debug/RandomActor.lua @@ -34,7 +34,7 @@ _M._boss_data = _M._default_boss_data --- formats function help for dialog output local function formatHelp(f_lines, f_name, f_lnum) - local help = ("#LIGHT_GREEN#(From %s, line %s):#LAST#"):format(f_name or "unknown", f_lnum or "unknown") + local help = ("#LIGHT_GREEN#(From %s, line %s):#LAST#"):tformat(f_name or "unknown", f_lnum or "unknown") for _, line in ipairs(f_lines) do line = line:gsub("#", "_") help = help.."\n "..line:gsub("\t", " ") @@ -56,14 +56,14 @@ lines, fname, lnum = DebugConsole:functionHelp(mod.class.Actor.levelupClass) _M.data_help = _M.data_help.."\n#GOLD#DATA HELP#LAST# "..formatHelp(lines, fname, lnum) function _M:init() - engine.ui.Dialog.init(self, "DEBUG -- Create Random Actor", 1, 1) + engine.ui.Dialog.init(self, _t"DEBUG -- Create Random Actor", 1, 1) local tops={0} self.tops = tops -- if not _M._base_actor then self:generateBase() end local dialog_txt = Textzone.new{auto_width=true, auto_height=true, no_color_bleed=true, font=self.font, - text=([[Randomly generate actors subject to a filter and/or create random bosses according to a data table. + text=(_t[[Randomly generate actors subject to a filter and/or create random bosses according to a data table. Filters are interpreted by game.zone:checkFilter. #ORANGE#Boss Data:#LAST# is interpreted by game.state:createRandomBoss, game.state:applyRandomClass, and Actor.levelupClass. Generation is performed within the _G environment (used by the Lua Console) using the current zone's #LIGHT_GREEN#npc_list#LAST#. @@ -79,11 +79,11 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated local txt if _M._base_actor then local r, rc = _M._base_actor:TextRank() - txt = (rc or "#WHITE#").._M._base_actor.name.."#LAST#" + txt = (rc or "#WHITE#").._M._base_actor:getName().."#LAST#" else - txt = "#GREY#None#LAST#" + txt = _t"#GREY#None#LAST#" end - return ([[Current Base Actor: %s]]):format(txt) + return ([[Current Base Actor: %s]]):tformat(txt) end local base_txt = Textzone.new{auto_width=true, auto_height=true, no_color_bleed=true, font=self.font, text = base_text(), can_focus=true} @@ -94,10 +94,10 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated base_txt.on_focus = function() _M.tooltip(_M._base_actor) _M.help_display = "filter_help" end self.base_txt = base_txt - local base_refresh = self.newButton{text="Generate", _actor_field="_base_actor", + local base_refresh = self.newButton{text=_t"Generate", _actor_field="_base_actor", fct=function() self:generateBase() - game.log("#LIGHT_BLUE# Current base actor: %s", _M._base_actor and _M._base_actor.name or "none") + game.log("#LIGHT_BLUE# Current base actor: %s", _M._base_actor and _M._base_actor:getName() or "none") self.base_txt:refresh(_M._base_actor) self.base_refresh.on_select() end, @@ -106,7 +106,7 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated self.base_refresh = base_refresh tops[#tops+1]=tops[#tops] + base_refresh.h + 5 - local base_make = self.newButton{text="Place", _actor_field="_base_actor", + local base_make = self.newButton{text=_t"Place", _actor_field="_base_actor", fct=function() self:placeActor(_M._base_actor) end, @@ -114,7 +114,7 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated } self.base_make = base_make - local base_reset_filter = self.newButton{text="Default Filter", _actor_field="_base_actor", + local base_reset_filter = self.newButton{text=_t"Default Filter", _actor_field="_base_actor", fct=function() game.log("#LIGHT_BLUE# Reset base filter") _M._base_filter = _M._default_base_filter @@ -124,9 +124,9 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated } self.base_reset_filter = base_reset_filter - local base_clear = self.newButton{text="Clear", _actor_field="_base_actor", + local base_clear = self.newButton{text=_t"Clear", _actor_field="_base_actor", fct=function() - game.log("#LIGHT_BLUE# Clear base actor: %s", _M._base_actor and _M._base_actor.name or "none") + game.log("#LIGHT_BLUE# Clear base actor: %s", _M._base_actor and _M._base_actor:getName() or "none") if _M._base_actor then _M._base_actor:removed() _M._base_actor = nil @@ -138,7 +138,7 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated } self.base_clear = base_clear - local bf_box = _M.newTextbox{title="#LIGHT_BLUE#Base Filter:#LAST# ", text=_M._base_filter or "{}", chars=120, max_len=500, + local bf_box = _M.newTextbox{title=_t"#LIGHT_BLUE#Base Filter:#LAST# ", text=_M._base_filter or "{}", chars=120, max_len=500, fct=function(text) _M._base_filter = text self:generateBase() @@ -154,7 +154,7 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated tops[#tops+1]=tops[#tops] + bf_box.h + 10 local boss_info = Textzone.new{auto_width=true, auto_height=true, no_color_bleed=true, font=self.font, - text=[[The #ORANGE#Boss Data#LAST# is used to transform the base actor into a random boss (which will use a random actor if needed).]]} + text=_t[[The #ORANGE#Boss Data#LAST# is used to transform the base actor into a random boss (which will use a random actor if needed).]]} self.boss_info = boss_info tops[#tops+1]=tops[#tops] + boss_info.h + 5 @@ -162,11 +162,11 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated local txt if _M._boss_actor then local r, rc = _M._boss_actor:TextRank() - txt = (rc or "#ORANGE#").._M._boss_actor.name.."#LAST#" + txt = (rc or "#ORANGE#").._M._boss_actor:getName().."#LAST#" else - txt = "#GREY#None#LAST#" + txt = _t"#GREY#None#LAST#" end - return ([[Current Boss Actor: %s]]):format(txt) + return ([[Current Boss Actor: %s]]):tformat(txt) end local boss_txt = Textzone.new{auto_width=true, auto_height=true, no_color_bleed=true, font=self.font, text=boss_text(), can_focus=true} @@ -177,7 +177,7 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated boss_txt.on_focus = function() _M.tooltip(_M._boss_actor) _M.help_display = "data_help" end self.boss_txt = boss_txt - local boss_refresh = self.newButton{text="Generate", _actor_field="_boss_actor", + local boss_refresh = self.newButton{text=_t"Generate", _actor_field="_boss_actor", fct=function() self:generateBoss() boss_txt:refresh() @@ -188,7 +188,7 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated self.boss_refresh = boss_refresh tops[#tops+1]=tops[#tops] + boss_refresh.h + 5 - local boss_reset_data = self.newButton{text="Default Data", _actor_field="_boss_actor", + local boss_reset_data = self.newButton{text=_t"Default Data", _actor_field="_boss_actor", fct=function() game.log("#LIGHT_BLUE# Reset Randboss Data") _M._boss_data = _M._default_boss_data @@ -198,7 +198,7 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated } self.boss_reset_data = boss_reset_data - local boss_make = self.newButton{text="Place", _actor_field="_boss_actor", + local boss_make = self.newButton{text=_t"Place", _actor_field="_boss_actor", fct=function() boss_txt:refresh() self:placeActor(_M._boss_actor) @@ -207,7 +207,7 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated } self.boss_make = boss_make - local boss_data_box = _M.newTextbox{title="#ORANGE#Boss Data:#LAST# ", text=_M._boss_data or "{}", chars=120, max_len=500, + local boss_data_box = _M.newTextbox{title=_t"#ORANGE#Boss Data:#LAST# ", text=_M._boss_data or "{}", chars=120, max_len=500, fct=function(text) _M._boss_data = text self:generateBoss() @@ -250,7 +250,7 @@ The #LIGHT_BLUE#Base Filter#LAST# is used to filter the actor randomly generated end,} self.key:addCommands{ _F1 = function() -- Help for filters and data (at upper left) - local d = Dialog:simpleLongPopup("Filter and Data Help", + local d = Dialog:simpleLongPopup(_t"Filter and Data Help", ([[%s]]):format(_M[_M.help_display] or _M.filter_help), math.max(500, game.w/2) ) engine.Dialog.resize(d, d.w, d.h, 25, 25) @@ -264,7 +264,7 @@ function _M.tooltip(act) local plr = game.player game:tooltipDisplayAtMap(game.w, game.h, act:tooltip(plr.x, plr.y, plr), nil, true) else - game:tooltipDisplayAtMap(game.w, game.h, "#GREY#No Actor to Display#LAST#", nil, true) + game:tooltipDisplayAtMap(game.w, game.h, _t"#GREY#No Actor to Display#LAST#", nil, true) end end diff --git a/game/modules/tome/dialogs/debug/RandomObject.lua b/game/modules/tome/dialogs/debug/RandomObject.lua index d3e5b3783401a820fdc5d70dba997fa3bc89f8d5..113265d28f3c50935bdde34e7b87d9a3c14700c7 100644 --- a/game/modules/tome/dialogs/debug/RandomObject.lua +++ b/game/modules/tome/dialogs/debug/RandomObject.lua @@ -42,7 +42,7 @@ _M._randart_data = config.settings.tome.cheat_create_object_default_randart_data --- formats function help for dialog output local function formatHelp(f_lines, f_name, f_lnum) - local help = ("#LIGHT_GREEN#(From %-10.60s, line: %s):#LAST#"):format(f_name or "unknown", f_lnum or "unknown") + local help = ("#LIGHT_GREEN#(From %-10.60s, line: %s):#LAST#"):tformat(f_name or _t"unknown", f_lnum or _t"unknown") for _, line in ipairs(f_lines or {}) do line = line:gsub("#", "_") help = help.."\n "..line:gsub("\t", " ") @@ -67,8 +67,8 @@ lines, fname, lnum = DebugConsole:functionHelp(resolvers.resolveObject) _M.resolver_genObj_help = "#GOLD#resolvers.resolveObject#LAST# "..formatHelp(lines, fname, lnum) --- configure resolvers that can be used -_M.resolver_choices = {{name="None", resolver=nil, desc="Don't apply a resolver"}, - {name="Equipment", resolver="equip", desc="Object will be equipped if possible, otherwise added to main inventory", +_M.resolver_choices = {{name=_t"None", resolver=nil, desc=_t"Don't apply a resolver"}, + {name=_t"Equipment", resolver="equip", desc=_t"Object will be equipped if possible, otherwise added to main inventory", generate=function(dialog) -- generate an object, forcing antimagic check local res_input, ok, t if dialog._random_filter then @@ -82,10 +82,10 @@ _M.resolver_choices = {{name="None", resolver=nil, desc="Don't apply a resolver" return resolvers.resolveObject(_M.actor, res_input, false, 5) end, }, - {name="Inventory", resolver="inventory", desc="Object added to main inventory"}, - {name="Drops", resolver="drops", desc="Object added to main inventory (dropped on death)"}, - {name="Attach Tinker", resolver="attachtinker", desc="Tinker will be attached to a worn object"}, - {name="Drop Randart (auto data)", resolver="drop_randart", desc="Random Artifact (dropped on death) added to main inventory, uses the Base Object or Base Filter plus Randart Data as input", + {name=_t"Inventory", resolver="inventory", desc=_t"Object added to main inventory"}, + {name=_t"Drops", resolver="drops", desc=_t"Object added to main inventory (dropped on death)"}, + {name=_t"Attach Tinker", resolver="attachtinker", desc=_t"Tinker will be attached to a worn object"}, + {name=_t"Drop Randart (auto data)", resolver="drop_randart", desc=_t"Random Artifact (dropped on death) added to main inventory, uses the Base Object or Base Filter plus Randart Data as input", generate=function(dialog) -- build input from Randart Data and the base object filter local res_input, ok, t = {} if dialog._randart_data then @@ -112,7 +112,7 @@ _M.resolver_choices = {{name="None", resolver=nil, desc="Don't apply a resolver" return resolvers.calc.drop_randart(res, dialog.actor) end }, - {name="Drop Randart", resolver="drop_randart", desc="Random Artifact (dropped on death) added to main inventory", + {name=_t"Drop Randart", resolver="drop_randart", desc=_t"Random Artifact (dropped on death) added to main inventory", generate=function(dialog) -- drop_randart using the random filter as its input local res_input, ok, t if dialog._random_filter then @@ -152,12 +152,12 @@ _M.resolver_num = 1 -- default to no resolver function _M:init(actor) _M.actor = actor or _M.actor or game.player if not game.level:hasEntity(_M.actor) then _M.actor = game.player end - engine.ui.Dialog.init(self, "DEBUG -- Create Random Object", 1, 1) + engine.ui.Dialog.init(self, _t"DEBUG -- Create Random Object", 1, 1) local tops={0} self.tops = tops local dialog_txt = Textzone.new{auto_width=true, auto_height=true, no_color_bleed=true, font=self.font, - text=([[Generate objects randomly subject to filters and create Random Artifacts. + text=(_t[[Generate objects randomly subject to filters and create Random Artifacts. Use "Generate" to create objects for preview and inspection. Use "Add Object" to choose where to put the object and add it to the game. (Mouse over controls for a preview of the generated object/working Actor. (Press #GOLD#'L'#LAST# to lua inspect.) @@ -171,7 +171,7 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working self.dialog_txt = dialog_txt local random_info = Textzone.new{auto_width=true, auto_height=true, no_color_bleed=true, font=self.font, - text=([[The #LIGHT_GREEN#Random Filter#LAST# controls random generation of a normal object.]]):format()} + text=([[The #LIGHT_GREEN#Random Filter#LAST# controls random generation of a normal object.]]):tformat()} self.random_info = random_info tops[#tops+1]=tops[#tops] + dialog_txt.h + random_info.h + 10 @@ -182,12 +182,12 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working if obj then txt = obj:getName({do_color=true}) else - txt = "#GREY#None#LAST#" + txt = _t"#GREY#None#LAST#" end - return ([[%s: %s]]):format(prefix or "Object", txt) + return ([[%s: %s]]):tformat(prefix or _t"Object", txt) end - local random_refresh = self.newButton{text="Generate", _object_field="_random_object", + local random_refresh = self.newButton{text=_t"Generate", _object_field="_random_object", fct=function() self:generateRandom() self.random_txt:refresh(_M._random_object) @@ -198,7 +198,7 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working self.random_refresh = random_refresh tops[#tops+1]=tops[#tops] + random_refresh.h + 5 - local random_make = self.newButton{text="Add Object", _object_field="_random_object", + local random_make = self.newButton{text=_t"Add Object", _object_field="_random_object", fct=function() self:acceptObject(_M._random_object, true, _M._random_filter_table) end, @@ -206,7 +206,7 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working } self.random_make = random_make - local random_reset_filter = self.newButton{text="Default Filter", _object_field="_random_object", + local random_reset_filter = self.newButton{text=_t"Default Filter", _object_field="_random_object", fct=function() _M._random_filter = _M._default_random_filter self.rf_box:setText(_M._random_filter) @@ -215,7 +215,7 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working } self.random_reset_filter = random_reset_filter - local random_clear = self.newButton{text="Clear Object", _object_field="_random_object", + local random_clear = self.newButton{text=_t"Clear Object", _object_field="_random_object", fct=function() if _M._random_object then _M._random_object = nil @@ -229,15 +229,15 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working self.random_clear = random_clear local random_txt = Textzone.new{width=500, auto_height=true, height=random_refresh.h, no_color_bleed=true, font=self.font, - text=object_text("#LIGHT_GREEN#Random Object#LAST#", _M._random_object), can_focus=true} + text=object_text(_t"#LIGHT_GREEN#Random Object#LAST#", _M._random_object), can_focus=true} random_txt.refresh = function(self, object) - self.text = object_text("#LIGHT_GREEN#Random Object#LAST#", object) + self.text = object_text(_t"#LIGHT_GREEN#Random Object#LAST#", object) self:generate() end random_txt.on_focus = function() _M:tooltip(_M._random_object) _M.help_display = "filter_help" end self.random_txt = random_txt - local rf_box = _M.newTextbox{title="#LIGHT_GREEN#Random Filter:#LAST# ", text=_M._random_filter or "{}", chars=120, max_len=1000, + local rf_box = _M.newTextbox{title=_t"#LIGHT_GREEN#Random Filter:#LAST# ", text=_M._random_filter or "{}", chars=120, max_len=1000, fct=function(text) _M._random_filter = text self:generateRandom() @@ -252,21 +252,21 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working tops[#tops+1]=tops[#tops] + rf_box.h + 10 local base_info = Textzone.new{auto_width=true, auto_height=true, no_color_bleed=true, font=self.font, - text=([[The #LIGHT_BLUE#Base Filter#LAST# is to generate a base object for building a Randart.]]):format()} + text=([[The #LIGHT_BLUE#Base Filter#LAST# is to generate a base object for building a Randart.]]):tformat()} self.base_info = base_info tops[#tops+1]=tops[#tops] + base_info.h + 5 local base_txt = Textzone.new{width=500, auto_height=true, height=random_refresh.h, no_color_bleed=true, font=self.font, - text = object_text("#LIGHT_BLUE#Base Object#LAST#", _M._base_object), can_focus=true} + text = object_text(_t"#LIGHT_BLUE#Base Object#LAST#", _M._base_object), can_focus=true} base_txt.refresh = function(self, object) - self.text = object_text("#LIGHT_BLUE#Base Object#LAST#", _M._base_object) + self.text = object_text(_t"#LIGHT_BLUE#Base Object#LAST#", _M._base_object) self:generate() end base_txt.on_focus = function() _M:tooltip(_M._base_object) _M.help_display = "filter_help" end self.base_txt = base_txt - local base_refresh = self.newButton{text="Generate", _object_field="_base_object", no_finish=true, + local base_refresh = self.newButton{text=_t"Generate", _object_field="_base_object", no_finish=true, fct=function() self:generateBase() self.base_txt:refresh(_M._base_object) @@ -277,7 +277,7 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working self.base_refresh = base_refresh tops[#tops+1]=tops[#tops] + base_refresh.h + 5 - local base_make = self.newButton{text="Add Object", _object_field="_base_object", + local base_make = self.newButton{text=_t"Add Object", _object_field="_base_object", fct=function() self:acceptObject(_M._base_object, false, _M._base_filter_table) end, @@ -285,7 +285,7 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working } self.base_make = base_make - local base_reset_filter = self.newButton{text="Default Filter", _object_field="_base_object", + local base_reset_filter = self.newButton{text=_t"Default Filter", _object_field="_base_object", fct=function() _M._base_filter = _M._default_base_filter self.bf_box:setText(_M._base_filter) @@ -294,7 +294,7 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working } self.base_reset_filter = base_reset_filter - local base_clear = self.newButton{text="Clear Object", _object_field="_base_object", + local base_clear = self.newButton{text=_t"Clear Object", _object_field="_base_object", fct=function() if _M._base_object then _M._base_object = nil @@ -307,7 +307,7 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working } self.base_clear = base_clear - local bf_box = _M.newTextbox{title="#LIGHT_BLUE#Base Filter:#LAST# ", text=_M._base_filter or "{}", chars=120, max_len=1000, + local bf_box = _M.newTextbox{title=_t"#LIGHT_BLUE#Base Filter:#LAST# ", text=_M._base_filter or "{}", chars=120, max_len=1000, fct=function(text) _M._base_filter = text self:generateBase() @@ -324,38 +324,38 @@ Hotkeys: #GOLD#'F1'#LAST# :: context sensitive help, #GOLD#'C'#LAST# :: Working tops[#tops+1]=tops[#tops] + bf_box.h + 10 local resolver_info = Textzone.new{auto_width=true, auto_height=true, no_color_bleed=true, font=self.font, - text=([[#SALMON#Resolver selected:#LAST# ]]):format()} + text=([[#SALMON#Resolver selected:#LAST# ]]):tformat()} resolver_info.on_focus = function(id, ui) _M.help_display = "resolver_genObj_help" - game:tooltipDisplayAtMap(game.w, game.h, "An object resolver interprets additional filter fields to generate an object and determine where it will go.", nil, true) + game:tooltipDisplayAtMap(game.w, game.h, _t"An object resolver interprets additional filter fields to generate an object and determine where it will go.", nil, true) end self.resolver_info = resolver_info - local resolver_sel = Dropdown.new{text="Dropdown text", width=200, nb_items=#_M.resolver_choices, + local resolver_sel = Dropdown.new{text=_t"Dropdown text", width=200, nb_items=#_M.resolver_choices, list = _M.resolver_choices, fct=function(item) _M.resolver_num = item.resolver_num end, on_select=function(item, sel) _M.help_display = item.help - game:tooltipDisplayAtMap(game.w, game.h, item.desc or "No Tooltip", nil, true) + game:tooltipDisplayAtMap(game.w, game.h, item.desc or _t"No Tooltip", nil, true) end, } resolver_sel.on_focus = function(r_sel, ui) _M.help_display = "resolver_genObj_help" local sel = r_sel.c_list and r_sel.c_list.sel if sel then _M.help_display = r_sel.c_list.list[sel].help end - game:tooltipDisplayAtMap(game.w, game.h, "Use this selector to choose which resolver to use", nil, true) + game:tooltipDisplayAtMap(game.w, game.h, _t"Use this selector to choose which resolver to use", nil, true) end self.resolver_sel = resolver_sel local randart_info = Textzone.new{auto_width=true, auto_height=true, no_color_bleed=true, font=self.font, text=([[#ORANGE#Randart Data#LAST# contains parameters used to generate a Randart (interpreted by game.state:generateRandart). -The #LIGHT_BLUE#Base Object#LAST# will be used if possible.]]):format()} +The #LIGHT_BLUE#Base Object#LAST# will be used if possible.]]):tformat()} self.randart_info = randart_info tops[#tops+1]=tops[#tops] + randart_info.h + 5 - local randart_refresh = self.newButton{text="Generate", _object_field="_randart", + local randart_refresh = self.newButton{text=_t"Generate", _object_field="_randart", fct=function() self:generateRandart() self.randart_txt:refresh(_M._randart) @@ -366,7 +366,7 @@ The #LIGHT_BLUE#Base Object#LAST# will be used if possible.]]):format()} self.randart_refresh = randart_refresh tops[#tops+1]=tops[#tops] + randart_refresh.h + 5 - local randart_make = self.newButton{text="Add Object", _object_field="_randart", + local randart_make = self.newButton{text=_t"Add Object", _object_field="_randart", fct=function() self.randart_txt:refresh(_M._randart) self:acceptObject(_M._randart) @@ -375,7 +375,7 @@ The #LIGHT_BLUE#Base Object#LAST# will be used if possible.]]):format()} } self.randart_make = randart_make - local randart_reset_data = self.newButton{text="Default Data", _object_field="_randart", + local randart_reset_data = self.newButton{text=_t"Default Data", _object_field="_randart", fct=function() _M._randart_data = _M._default_randart_data self.randart_data_box:setText(_M._randart_data) @@ -384,7 +384,7 @@ The #LIGHT_BLUE#Base Object#LAST# will be used if possible.]]):format()} } self.randart_reset_data = randart_reset_data - local randart_data_box = _M.newTextbox{title="#ORANGE#Randart Data:#LAST# ", text=_M._randart_data or "{}", chars=120, max_len=1000, + local randart_data_box = _M.newTextbox{title=_t"#ORANGE#Randart Data:#LAST# ", text=_M._randart_data or "{}", chars=120, max_len=1000, fct=function(text) _M._randart_data = text self:generateRandart() @@ -401,29 +401,29 @@ The #LIGHT_BLUE#Base Object#LAST# will be used if possible.]]):format()} tops[#tops+1]=tops[#tops] + randart_data_box.h + 5 local randart_txt = Textzone.new{width=600, auto_height=true, height=random_refresh.h, no_color_bleed=true, font=self.font, - text=object_text("#ORANGE#Randart#LAST#", _M._randart), can_focus=true} + text=object_text(_t"#ORANGE#Randart#LAST#", _M._randart), can_focus=true} randart_txt.refresh = function(self, object) - self.text = object_text("#ORANGE#Randart#LAST#", object) + self.text = object_text(_t"#ORANGE#Randart#LAST#", object) self:generate() end randart_txt.on_focus = function() _M:tooltip(_M._randart) _M.help_display = "data_help" end self.randart_txt = randart_txt - local show_inventory = _M.newButton{text="Show #GOLD#I#LAST#nventory", _object_field="actor", + local show_inventory = _M.newButton{text=_t"Show #GOLD#I#LAST#nventory", _object_field="actor", fct=function() self:showInventory() end, } self.show_inventory = show_inventory - local show_character_sheet = _M.newButton{text="Show #GOLD#C#LAST#haracter Sheet", _object_field="actor", + local show_character_sheet = _M.newButton{text=_t"Show #GOLD#C#LAST#haracter Sheet", _object_field="actor", fct=function() self:characterSheet() end, } self.show_character_sheet = show_character_sheet - local set_actor = _M.newButton{text="Set working actor: "..("[%s] %s"):format(_M.actor.uid, _M.actor.name), _object_field="actor", + local set_actor = _M.newButton{text=("Set working actor: [%s] %s"):tformat(_M.actor.uid, _M.actor:getName()), _object_field="actor", fct=function() self:setWorkingActor() end, } set_actor.update = function(ui) - ui.text = "Set working actor: "..("[%s] %s%s"):format(_M.actor.uid, _M.actor.name, _M.actor.player and " #LIGHT_GREEN#(player)#LAST#" or "") + ui.text = ("Set working actor: [%s] %s%s"):tformat(_M.actor.uid, _M.actor:getName(), _M.actor.player and _t" #LIGHT_GREEN#(player)#LAST#" or "") ui:generate() end set_actor:update() @@ -501,13 +501,13 @@ function _M:tooltip(what) game:tooltipDisplayAtMap(game.w, game.h, what:tooltip(what.x, what.y, what), nil, true) end else - game:tooltipDisplayAtMap(game.w, game.h, "#GREY#No Tooltip to Display#LAST#", nil, true) + game:tooltipDisplayAtMap(game.w, game.h, _t"#GREY#No Tooltip to Display#LAST#", nil, true) end end --- Display context sensitive help (at upper left) function _M:help() - local d = Dialog:simpleLongPopup("Filter/Data/Resolver Reference", + local d = Dialog:simpleLongPopup(_t"Filter/Data/Resolver Reference", ([[%s]]):format(_M[_M.help_display] or _M.filter_help), math.max(500, game.w/2) ) engine.Dialog.resize(d, d.w, d.h, 25, 25) @@ -569,7 +569,7 @@ function _M:interpretTable(text, label) ok, t = pcall(fx) end if not ok or t and type(t) ~= "table" then - game.log("#LIGHT_BLUE#Bad %s: %s", label or "table definition", text) + game.log("#LIGHT_BLUE#Bad %s: %s", label or _t"table definition", text) return ok end return ok, t @@ -595,7 +595,7 @@ function _M:generateRandom() end if ok then if o then - game.log("#LIGHT_BLUE# New random%s object: %s", r_name and (" (resolver: %s)"):format(r_name) or "", o:getName({do_color=true})) + game.log("#LIGHT_BLUE# New random%s object: %s", r_name and (" (resolver: %s)"):tformat(r_name) or "", o:getName({do_color=true})) _M._random_object = _M:finishObject(o) else game.log("#LIGHT_BLUE#Could not generate a random object with filter: %s", _M._random_filter) @@ -716,7 +716,7 @@ end --- show the inventory screen for the working actor function _M:showInventory() local d - local titleupdator = _M.actor:getEncumberTitleUpdator("Inventory") + local titleupdator = _M.actor:getEncumberTitleUpdator(_t"Inventory") d = require("mod.dialogs.ShowEquipInven").new(titleupdator(), _M.actor, nil, function(o, inven, item, button, event) if not o then return end diff --git a/game/modules/tome/dialogs/debug/SpawnEvent.lua b/game/modules/tome/dialogs/debug/SpawnEvent.lua index 969a5b3e02c830ab87fdda1b9ca9a28909f8427e..1a8a8e223b28eedd6ad62ba63235bd074fd7fe77 100644 --- a/game/modules/tome/dialogs/debug/SpawnEvent.lua +++ b/game/modules/tome/dialogs/debug/SpawnEvent.lua @@ -26,7 +26,7 @@ module(..., package.seeall, class.inherit(engine.ui.Dialog)) function _M:init() self:generateList() - engine.ui.Dialog.init(self, "DEBUG -- Spawn Event", 1, 1) + engine.ui.Dialog.init(self, _t"DEBUG -- Spawn Event", 1, 1) local list = List.new{width=400, height=500, scrollbar=true, list=self.list, fct=function(item) self:use(item) end} diff --git a/game/modules/tome/dialogs/debug/SummonCreature.lua b/game/modules/tome/dialogs/debug/SummonCreature.lua index 14636c8dfbd046cd86aee614a9fc359445a51f14..7744c8197e8226225e6a31cefa09de15a474bd71 100644 --- a/game/modules/tome/dialogs/debug/SummonCreature.lua +++ b/game/modules/tome/dialogs/debug/SummonCreature.lua @@ -26,7 +26,7 @@ module(..., package.seeall, class.inherit(engine.ui.Dialog)) function _M:init() self:generateList() - engine.ui.Dialog.init(self, "DEBUG -- Summon Creature", 1, 1) + engine.ui.Dialog.init(self, _t"DEBUG -- Summon Creature", 1, 1) local list = List.new{width=400, height=500, list=self.list, fct=function(item) self:use(item) end} @@ -153,15 +153,15 @@ function _M:generateList() return a.name < b.name end) - table.insert(list, 1, {name = "#YELLOW#Random Actor#LAST#", action=function(item) + table.insert(list, 1, {name = _t"#YELLOW#Random Actor#LAST#", action=function(item) game:registerDialog(require("mod.dialogs.debug.RandomActor").new()) end}) - table.insert(list, 1, {name = "#PINK#Test Dummy#LAST#", action=function(item) + table.insert(list, 1, {name = _t"#PINK#Test Dummy#LAST#", action=function(item) local m = mod.class.NPC.new{define_as="TRAINING_DUMMY", type = "training", subtype = "dummy", - name = "Test Dummy", color=colors.GREY, - desc = "Test dummy.", image = "npc/lure.png", + name = _t"Test Dummy", color=colors.GREY, + desc = _t"Test dummy.", image = "npc/lure.png", level_range = {1, 1}, exp_worth = 0, rank = 3, max_life = 300000, life_rating = 0, diff --git a/game/modules/tome/dialogs/orders/Behavior.lua b/game/modules/tome/dialogs/orders/Behavior.lua index f7330443c5be64ee37781fe2959884f39b5fbb17..564c09da8709ef5833badc365c25da54b11c1e98 100644 --- a/game/modules/tome/dialogs/orders/Behavior.lua +++ b/game/modules/tome/dialogs/orders/Behavior.lua @@ -27,7 +27,7 @@ function _M:init(actor, def) self.actor = actor self.def = def self:generateList() - engine.ui.Dialog.init(self, "Set behavior: "..actor.name, 1, 1) + engine.ui.Dialog.init(self, ("Set behavior: %s"):tformat(actor:getName()), 1, 1) local list = List.new{width=400, nb_items=#self.list, list=self.list, fct=function(item) self:use(item) end} @@ -49,16 +49,16 @@ function _M:use(item) game:unregisterDialog(self) self.actor.ai_tactic = resolvers.calc.tactic({item.set}, self.actor) - game.logPlayer(game.player, "%s behavior set to %s.", self.actor.name:capitalize(), item.set) + game.logPlayer(game.player, "%s behavior set to %s.", self.actor:getName():capitalize(), _t(item.set)) end function _M:generateList() local list = { - {name="Default", set="default"}, - {name="Melee", set="melee"}, - {name="Ranged", set="ranged"}, - {name="Tank", set="tank"}, - {name="Standby", set="standby"}, + {name=_t"Default", set="default"}, + {name=_t"Melee", set="melee"}, + {name=_t"Ranged", set="ranged"}, + {name=_t"Tank", set="tank"}, + {name=_t"Standby", set="standby"}, } local chars = {} diff --git a/game/modules/tome/dialogs/orders/Talents.lua b/game/modules/tome/dialogs/orders/Talents.lua index 268ac13d8b30641c8899848d071f0679a458106c..16dd41ced14c80d4c1881e33a9f1402fc9e154a0 100644 --- a/game/modules/tome/dialogs/orders/Talents.lua +++ b/game/modules/tome/dialogs/orders/Talents.lua @@ -30,7 +30,7 @@ module(..., package.seeall, class.inherit(Dialog)) function _M:init(actor, def) self.actor = actor self.def = def - Dialog.init(self, "Define tactical talents usage", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) + Dialog.init(self, _t"Define tactical talents usage", math.max(800, game.w * 0.8), math.max(600, game.h * 0.8)) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} local halfwidth = math.floor((self.iw - vsep.w)/2) @@ -38,13 +38,13 @@ function _M:init(actor, def) %s is listening attentively, and wants to know what talents to use. You can modify the tactical weights of various talents to increase or decrease their use. The weights are multiplicative (zero will turn the talent off) and relative (changing everything to a weight of 2 will not alter how talents are used relative to each other). Word travels fast in Maj'Eyal, and if %s is a summon all future summons of the same type will remember your preferences. -]]):format(actor.name:capitalize(), actor.name)} +]]):tformat(actor:getName():capitalize(), actor:getName())} self.c_desc = TextzoneList.new{width=halfwidth, height=self.ih, no_color_bleed=true} self.c_list = ListColumns.new{width=halfwidth, height=self.ih - 10, sortable=true, scrollbar=true, columns={ - {name="", width={20,"fixed"}, display_prop="char", sort="id"}, - {name="Talent Name", width=72, display_prop="name", sort="name"}, - {name="Weight", width=20, display_prop="multiplier", sort="multiplier"}, + {name=_t"", width={20,"fixed"}, display_prop="char", sort="id"}, + {name=_t"Talent Name", width=72, display_prop="name", sort="name"}, + {name=_t"Weight", width=20, display_prop="multiplier", sort="multiplier"}, }, list={}, fct=function(item) self:use(item) end, select=function(item, sel) self:select(item) end} self:generateList() @@ -88,7 +88,7 @@ function _M:use(item) if not self.actor.ai_talents then self.actor.ai_talents = {} end - game:registerDialog(GetQuantity.new("Enter the talent weight multiplier", "0 is off, 1 is normal", item.multiplier, nil, function(qty) + game:registerDialog(GetQuantity.new(_t"Enter the talent weight multiplier", _t"0 is off, 1 is normal", item.multiplier, nil, function(qty) self.actor.ai_talents[item.tid] = qty self:generateList() end), 1) diff --git a/game/modules/tome/dialogs/shimmer/CommonData.lua b/game/modules/tome/dialogs/shimmer/CommonData.lua index 3fbcfeb37994ce77b93044b731b520e3fdd15046..456217548c3eb41527b08ae35ace7d293ed9a513 100644 --- a/game/modules/tome/dialogs/shimmer/CommonData.lua +++ b/game/modules/tome/dialogs/shimmer/CommonData.lua @@ -37,13 +37,13 @@ _M.slots_multiple = { } function _M:getShimmerName(actor, slot) - if slot == "SHIMMER_DOLL" then return "Character's Skin" - elseif slot == "SHIMMER_HAIR" then return "Character's Hair" - elseif slot == "SHIMMER_FACIAL" then return "Character's Facial Features" - elseif slot == "SHIMMER_AURA" then return "Character's Aura" + if slot == "SHIMMER_DOLL" then return _t"Character's Skin" + elseif slot == "SHIMMER_HAIR" then return _t"Character's Hair" + elseif slot == "SHIMMER_FACIAL" then return _t"Character's Facial Features" + elseif slot == "SHIMMER_AURA" then return _t"Character's Aura" else local object = actor:getInven(slot)[1] - if not object then return "unknown" end + if not object then return _t"unknown" end return object:getName{do_color=true, no_add_name=true} end end @@ -89,7 +89,7 @@ function _M:applyShimmers(actor, v1, v2) local object = actor:getInven(slot) if object then object = object[1] end if object then - object.shimmer_moddable = shimmer or {name="#GREY#Invisible#LAST#"} + object.shimmer_moddable = shimmer or {name=_t"#GREY#Invisible#LAST#"} end end end end diff --git a/game/modules/tome/dialogs/shimmer/Shimmer.lua b/game/modules/tome/dialogs/shimmer/Shimmer.lua index 22bcf591a0e88e6e098ed1ec114ab95c3a281870..6a2fff259e052dbc7c937f6a183335bbf753a5e2 100644 --- a/game/modules/tome/dialogs/shimmer/Shimmer.lua +++ b/game/modules/tome/dialogs/shimmer/Shimmer.lua @@ -38,16 +38,16 @@ function _M:init(player, slot) self.search_filter = nil local oname = self:getShimmerName(player, slot) - Dialog.init(self, "Shimmer object: "..oname, 680, 500) + Dialog.init(self, ("Shimmer object: %s"):tformat(oname), 680, 500) self:generateList() - self.c_search = Textbox.new{title="Search: ", text="", chars=20, max_len=60, fct=function() end, on_change=function(text) self:search(text) end} + self.c_search = Textbox.new{title=_t"Search: ", text="", chars=20, max_len=60, fct=function() end, on_change=function(text) self:search(text) end} - self.c_list = ListColumns.new{columns={{name="Name", width=100, display_prop="name", sort="sortname"}}, hide_columns=true, scrollbar=true, width=300, height=self.ih - 5 - self.c_search.h, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end} + self.c_list = ListColumns.new{columns={{name=_t"Name", width=100, display_prop="name", sort="sortname"}}, hide_columns=true, scrollbar=true, width=300, height=self.ih - 5 - self.c_search.h, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end} local donatortext = "" - if not profile:isDonator(1) then donatortext = "\n#{italic}##CRIMSON#This cosmetic feature is only available to donators/buyers. You can only preview.#WHITE##{normal}#" end - local help = Textzone.new{width=math.floor(self.iw - self.c_list.w - 20), height=self.ih, no_color_bleed=true, auto_height=true, text="You can alter "..oname.." to look like another item of the same type/slot.\n#{bold}#This is a purely cosmetic change.#{normal}#"..donatortext} + if not profile:isDonator(1) then donatortext = _t"\n#{italic}##CRIMSON#This cosmetic feature is only available to donators/buyers. You can only preview.#WHITE##{normal}#" end + local help = Textzone.new{width=math.floor(self.iw - self.c_list.w - 20), height=self.ih, no_color_bleed=true, auto_height=true, text=("You can alter %s to look like another item of the same type/slot.\n#{bold}#This is a purely cosmetic change.#{normal}#%s"):tformat(oname, donatortext)} local actorframe = ActorFrame.new{actor=self.actor, w=128, h=128} self:loadUI{ @@ -72,9 +72,9 @@ function _M:use(item) if profile:isDonator(1) then self:applyShimmers(self.true_actor, self.slot, item.id) else - Dialog:yesnoPopup("Donator Cosmetic Feature", "This cosmetic feature is only available to donators/buyers.", function(ret) if ret then - game:registerDialog(require("mod.dialogs.Donation").new("shimmer ingame")) - end end, "Donate", "Cancel") + Dialog:yesnoPopup(_t"Donator Cosmetic Feature", _t"This cosmetic feature is only available to donators/buyers.", function(ret) if ret then + game:registerDialog(require("mod.dialogs.Donation").new(_t"shimmer ingame")) + end end, _t"Donate", _t"Cancel") end end @@ -102,7 +102,7 @@ function _M:generateList() if self:matchSearch("invisible") then list[#list+1] = { moddables = {}, - name = "#GREY#[Invisible]", + name = _t"#GREY#[Invisible]", id = "invisible", sortname = "--", } diff --git a/game/modules/tome/dialogs/shimmer/ShimmerDemo.lua b/game/modules/tome/dialogs/shimmer/ShimmerDemo.lua index b07fc21e1ee124466441e5ac3a761b5942e24910..1096281526456278d09eee12aeba2ce2e914c1fc 100644 --- a/game/modules/tome/dialogs/shimmer/ShimmerDemo.lua +++ b/game/modules/tome/dialogs/shimmer/ShimmerDemo.lua @@ -44,7 +44,7 @@ function _M:init(player, what) self.allowed_types[o.type] = true end - Dialog.init(self, "Shimmer Demo", 680, 500) + Dialog.init(self, _t"Shimmer Demo", 680, 500) self:generateList() @@ -79,7 +79,7 @@ function _M:generateList() if def.slot ~= "BODY" then list[#list+1] = { moddables = {}, - name = "#GREY#[Invisible]", + name = _t"#GREY#[Invisible]", sortname = "--", slot = def.slot, object = def.o, diff --git a/game/modules/tome/dialogs/shimmer/ShimmerOther.lua b/game/modules/tome/dialogs/shimmer/ShimmerOther.lua index dde5346998655a1e766209b7f3fc31204aa633de..35029be199fad0198165dff5f995927fa079dd29 100644 --- a/game/modules/tome/dialogs/shimmer/ShimmerOther.lua +++ b/game/modules/tome/dialogs/shimmer/ShimmerOther.lua @@ -34,16 +34,16 @@ function _M:init(player, slot) self.actor.x, self.actor.y = nil, nil self.actor:removeAllMOs() - Dialog.init(self, "Shimmer: "..self:getShimmerName(player, slot), 680, 500) + Dialog.init(self, ("Shimmer: %s"):tformat(self:getShimmerName(player, slot)), 680, 500) self:generateList() - self.c_search = Textbox.new{title="Search: ", text="", chars=20, max_len=60, fct=function() end, on_change=function(text) self:search(text) end} + self.c_search = Textbox.new{title=_t"Search: ", text="", chars=20, max_len=60, fct=function() end, on_change=function(text) self:search(text) end} - self.c_list = ListColumns.new{columns={{name="Name", width=100, display_prop="name", sort="sortname"}}, hide_columns=true, scrollbar=true, width=300, height=self.ih - 5 - self.c_search.h, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end} + self.c_list = ListColumns.new{columns={{name=_t"Name", width=100, display_prop="name", sort="sortname"}}, hide_columns=true, scrollbar=true, width=300, height=self.ih - 5 - self.c_search.h, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end} local donatortext = "" - if not profile:isDonator(1) then donatortext = "\n#{italic}##CRIMSON#This cosmetic feature is only available to donators/buyers. You can only preview.#WHITE##{normal}#" end - local help = Textzone.new{width=math.floor(self.iw - self.c_list.w - 20), height=self.ih, no_color_bleed=true, auto_height=true, text="You can alter your look.\n#{bold}#This is a purely cosmetic change.#{normal}#"..donatortext} + if not profile:isDonator(1) then donatortext = _t"\n#{italic}##CRIMSON#This cosmetic feature is only available to donators/buyers. You can only preview.#WHITE##{normal}#" end + local help = Textzone.new{width=math.floor(self.iw - self.c_list.w - 20), height=self.ih, no_color_bleed=true, auto_height=true, text=("You can alter your look.\n#{bold}#This is a purely cosmetic change.#{normal}#%s"):tformat(donatortext)} local actorframe = ActorFrame.new{actor=self.actor, w=128, h=128} self:loadUI{ @@ -96,9 +96,9 @@ function _M:use(item) if profile:isDonator(1) then self:applyShimmers(self.true_actor, self.slot, item.id) else - Dialog:yesnoPopup("Donator Cosmetic Feature", "This cosmetic feature is only available to donators/buyers.", function(ret) if ret then - game:registerDialog(require("mod.dialogs.Donation").new("shimmer ingame")) - end end, "Donate", "Cancel") + Dialog:yesnoPopup(_t"Donator Cosmetic Feature", _t"This cosmetic feature is only available to donators/buyers.", function(ret) if ret then + game:registerDialog(require("mod.dialogs.Donation").new(_t"shimmer ingame")) + end end, _t"Donate", _t"Cancel") end end @@ -125,7 +125,7 @@ function _M:generateList() list[#list+1] = { moddables = nil, - name = "#GREY#[Default]", + name = _t"#GREY#[Default]", id = "invisible", sortname = "--", } diff --git a/game/modules/tome/dialogs/shimmer/ShimmerOutfits.lua b/game/modules/tome/dialogs/shimmer/ShimmerOutfits.lua index 25c7e0acbac8cfaf72ed8803a13177230b663819..152ddc9b35850f3ce0874ef58ae355a02458b6f3 100644 --- a/game/modules/tome/dialogs/shimmer/ShimmerOutfits.lua +++ b/game/modules/tome/dialogs/shimmer/ShimmerOutfits.lua @@ -36,16 +36,16 @@ function _M:init(player) self.actor:removeAllMOs() self.search_filter = nil - Dialog.init(self, "Shimmer Sets: "..player.name, 680, 500) + Dialog.init(self, ("Shimmer Sets: %s"):tformat(player.name), 680, 500) self:generateList() - self.c_search = Textbox.new{title="Search: ", text="", chars=20, max_len=60, fct=function() end, on_change=function(text) self:search(text) end} + self.c_search = Textbox.new{title=_t"Search: ", text="", chars=20, max_len=60, fct=function() end, on_change=function(text) self:search(text) end} - self.c_list = ListColumns.new{columns={{name="Name", width=100, display_prop="name", sort="sortname"}}, hide_columns=true, scrollbar=true, width=300, height=self.ih - 5 - self.c_search.h, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end} + self.c_list = ListColumns.new{columns={{name=_t"Name", width=100, display_prop="name", sort="sortname"}}, hide_columns=true, scrollbar=true, width=300, height=self.ih - 5 - self.c_search.h, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end} local donatortext = "" if not profile:isDonator(1) then donatortext = "\n#{italic}##CRIMSON#This cosmetic feature is only available to donators/buyers. You can only preview.#WHITE##{normal}#" end - local help = Textzone.new{width=math.floor(self.iw - self.c_list.w - 20), height=self.ih, no_color_bleed=true, auto_height=true, text="You can switch your appearance to a saved set of shimmers.\n#{bold}#This is a purely cosmetic change.#{normal}#"..donatortext} + local help = Textzone.new{width=math.floor(self.iw - self.c_list.w - 20), height=self.ih, no_color_bleed=true, auto_height=true, text=_t"You can switch your appearance to a saved set of shimmers.\n#{bold}#This is a purely cosmetic change.#{normal}#"..donatortext} local actorframe = ActorFrame.new{actor=self.actor, w=128, h=128} self:loadUI{ @@ -70,7 +70,7 @@ function _M:use(item) if profile:isDonator(1) then if item.id == "current" then local set = table.clone(self.true_actor.shimmer_current_outfit, true) - local d = GetText.new("Save Outfit", "Outfit name?", 1, 100, function(text) + local d = GetText.new(_t"Save Outfit", _t"Outfit name?", 1, 100, function(text) set.name = text world.shimmer_sets[set.name] = set self:generateList() @@ -81,9 +81,9 @@ function _M:use(item) self:applyShimmers(self.true_actor, item.set) end else - Dialog:yesnoPopup("Donator Cosmetic Feature", "This cosmetic feature is only available to donators/buyers.", function(ret) if ret then - game:registerDialog(require("mod.dialogs.Donation").new("shimmer ingame")) - end end, "Donate", "Cancel") + Dialog:yesnoPopup(_t"Donator Cosmetic Feature", _t"This cosmetic feature is only available to donators/buyers.", function(ret) if ret then + game:registerDialog(require("mod.dialogs.Donation").new(_t"shimmer ingame")) + end end, _t"Donate", _t"Cancel") end end @@ -114,7 +114,7 @@ function _M:generateList() if self:matchSearch("current") then list[#list+1] = { - name = "#GOLD#[save current outfit]", + name = _t"#GOLD#[save current outfit]", id = "current", sortname = "--", } diff --git a/game/modules/tome/dialogs/shimmer/ShimmerRemoveSustains.lua b/game/modules/tome/dialogs/shimmer/ShimmerRemoveSustains.lua index 390292718d5e790ccb74fa85c7d27a1a8ee1a9f3..d356ce8731fae2be9773cb292a3bcd2165f369d6 100644 --- a/game/modules/tome/dialogs/shimmer/ShimmerRemoveSustains.lua +++ b/game/modules/tome/dialogs/shimmer/ShimmerRemoveSustains.lua @@ -31,17 +31,17 @@ function _M:init(player) self.actor = player self.actor.shimmer_sustains_hide = self.actor.shimmer_sustains_hide or {} - Dialog.init(self, "Shimmer: Remove Sustains Effects", 680, 500) + Dialog.init(self, _t"Shimmer: Remove Sustains Effects", 680, 500) self:generateList() self.c_list = ListColumns.new{columns={ - {name="Name", width=80, display_prop="name", sort="sortname"}, - {name="Active", width=20, display_prop="active", sort="active"}, + {name=_t"Name", width=80, display_prop="name", sort="sortname"}, + {name=_t"Active", width=20, display_prop="active", sort="active"}, }, hide_columns=true, scrollbar=true, width=300, height=self.ih - 5, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end} local donatortext = "" - if not profile:isDonator(1) then donatortext = "\n#{italic}##CRIMSON#This cosmetic feature is only available to donators/buyers. You can only preview.#WHITE##{normal}#" end - local help = Textzone.new{width=math.floor(self.iw - self.c_list.w - 20), height=self.ih, no_color_bleed=true, auto_height=true, text=[[#{bold}##CRIMSON#WARNING: this is an EXPERIMENTAL feature. It may explode!#LAST##{normal}# + if not profile:isDonator(1) then donatortext = _t"\n#{italic}##CRIMSON#This cosmetic feature is only available to donators/buyers. You can only preview.#WHITE##{normal}#" end + local help = Textzone.new{width=math.floor(self.iw - self.c_list.w - 20), height=self.ih, no_color_bleed=true, auto_height=true, text=_t[[#{bold}##CRIMSON#WARNING: this is an EXPERIMENTAL feature. It may explode!#LAST##{normal}# Sustains auras with name in #YELLOW#yellow#LAST# can not be automatically turned back on if disabled. After turning them on here, you need to unsustain and resustain them manually. #{bold}#This is a purely cosmetic change.#{normal}#]]..donatortext} @@ -134,9 +134,9 @@ function _M:use(item) if profile:isDonator(1) then self:toggleAura(item.tid) else - Dialog:yesnoPopup("Donator Cosmetic Feature", "This cosmetic feature is only available to donators/buyers.", function(ret) if ret then - game:registerDialog(require("mod.dialogs.Donation").new("shimmer ingame")) - end end, "Donate", "Cancel") + Dialog:yesnoPopup(_t"Donator Cosmetic Feature", _t"This cosmetic feature is only available to donators/buyers.", function(ret) if ret then + game:registerDialog(require("mod.dialogs.Donation").new(_t"shimmer ingame")) + end end, _t"Donate", _t"Cancel") end end @@ -154,7 +154,7 @@ function _M:generateList() tid = tid, name = (t.no_sustain_autoreset and "#YELLOW#" or "")..self.actor:getTalentFromId(tid).name, sortname = self.actor:getTalentFromId(tid).name, - active = self.actor.shimmer_sustains_hide[tid] and "#LIGHT_RED#no" or "#LIGHT_GREEN#yes", + active = self.actor.shimmer_sustains_hide[tid] and _t"#LIGHT_RED#no" or _t"#LIGHT_GREEN#yes", } list[#list+1] = d end diff --git a/game/modules/tome/dialogs/talents/ChronomancyContingency.lua b/game/modules/tome/dialogs/talents/ChronomancyContingency.lua index 28284fdaa6059b5e64cbfcdb54571ff87fb19c6f..295841a0928008837c93a6348ad78c634de44898 100644 --- a/game/modules/tome/dialogs/talents/ChronomancyContingency.lua +++ b/game/modules/tome/dialogs/talents/ChronomancyContingency.lua @@ -40,10 +40,10 @@ end function _M:init(actor) self.actor = actor actor.hotkey = actor.hotkey or {} - Dialog.init(self, "Contingency", game.w * 0.6, game.h * 0.8) + Dialog.init(self, _t"Contingency", game.w * 0.6, game.h * 0.8) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=[[ + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=_t[[ You may select a spell for Contingency to automatically use when your life falls below a percentage. Only active spells that do not require a target may be chosen. ]]} self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - self.c_tut.h - 20, scrollbar=true, no_color_bleed=true} @@ -51,8 +51,8 @@ You may select a spell for Contingency to automatically use when your life falls self:generateList() local cols = { - {name="", width={40,"fixed"}, display_prop="char"}, - {name="Talent", width=80, display_prop="name"}, + {name=_t"", width={40,"fixed"}, display_prop="char"}, + {name=_t"Talent", width=80, display_prop="name"}, } self.c_list = TreeList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - 10, all_clicks=true, scrollbar=true, columns=cols, tree=self.list, fct=function(item, sel, button) self:use(item, button) end, select=function(item, sel) self:select(item) end} self.c_list.cur_col = 2 @@ -137,7 +137,7 @@ function _M:generateList() for i, node in ipairs(talents) do node.char = self:makeKeyChar(letter) chars[node.char] = node letter = letter + 1 end list = { - { char='', name=('#{bold}#Choose a talent#{normal}#'):toTString(), status='', hotkey='', desc="All talents that can be used with Contingency.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, + { char='', name=(_t'#{bold}#Choose a talent#{normal}#'):toTString(), status='', hotkey='', desc=_t"All talents that can be used with Contingency.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, chars = chars, } self.list = list diff --git a/game/modules/tome/dialogs/talents/ChronomancyEmpower.lua b/game/modules/tome/dialogs/talents/ChronomancyEmpower.lua index c26cb69fa479d2a8127689b989b4abf93f07b062..0c923631e1a767dcfbe97725bc953363a5f1a654 100644 --- a/game/modules/tome/dialogs/talents/ChronomancyEmpower.lua +++ b/game/modules/tome/dialogs/talents/ChronomancyEmpower.lua @@ -54,10 +54,10 @@ end function _M:init(actor) self.actor = actor actor.hotkey = actor.hotkey or {} - Dialog.init(self, "Empower", game.w * 0.6, game.h * 0.8) + Dialog.init(self, _t"Empower", game.w * 0.6, game.h * 0.8) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=[[ + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=_t[[ You may select a chronomancy spell to Empower, increasing your effective spellpower when casting that spell. ]]} self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - self.c_tut.h - 20, scrollbar=true, no_color_bleed=true} @@ -65,8 +65,8 @@ You may select a chronomancy spell to Empower, increasing your effective spellpo self:generateList() local cols = { - {name="", width={40,"fixed"}, display_prop="char"}, - {name="Talent", width=80, display_prop="name"}, + {name=_t"", width={40,"fixed"}, display_prop="char"}, + {name=_t"Talent", width=80, display_prop="name"}, } self.c_list = TreeList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - 10, all_clicks=true, scrollbar=true, columns=cols, tree=self.list, fct=function(item, sel, button) self:use(item, button) end, select=function(item, sel) self:select(item) end} self.c_list.cur_col = 2 @@ -151,7 +151,7 @@ function _M:generateList() for i, node in ipairs(talents) do node.char = self:makeKeyChar(letter) chars[node.char] = node letter = letter + 1 end list = { - { char='', name=('#{bold}#Choose a talent#{normal}#'):toTString(), status='', hotkey='', desc="All talents that can be used with Empower.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, + { char='', name=(_t'#{bold}#Choose a talent#{normal}#'):toTString(), status='', hotkey='', desc=_t"All talents that can be used with Empower.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, chars = chars, } self.list = list diff --git a/game/modules/tome/dialogs/talents/ChronomancyExtension.lua b/game/modules/tome/dialogs/talents/ChronomancyExtension.lua index dec79b25606f4849c908bbe8fc11d8f6f31574d1..ed5edbd6d71d59ed99dc95669077fb13f994b818 100644 --- a/game/modules/tome/dialogs/talents/ChronomancyExtension.lua +++ b/game/modules/tome/dialogs/talents/ChronomancyExtension.lua @@ -54,10 +54,10 @@ end function _M:init(actor) self.actor = actor actor.hotkey = actor.hotkey or {} - Dialog.init(self, "Extension", game.w * 0.6, game.h * 0.8) + Dialog.init(self, _t"Extension", game.w * 0.6, game.h * 0.8) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=[[ + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=_t[[ You may select a chronomancy spell to Extend, increasing the duration of that spell. ]]} self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - self.c_tut.h - 20, scrollbar=true, no_color_bleed=true} @@ -65,8 +65,8 @@ You may select a chronomancy spell to Extend, increasing the duration of that sp self:generateList() local cols = { - {name="", width={40,"fixed"}, display_prop="char"}, - {name="Talent", width=80, display_prop="name"}, + {name=_t"", width={40,"fixed"}, display_prop="char"}, + {name=_t"Talent", width=80, display_prop="name"}, } self.c_list = TreeList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - 10, all_clicks=true, scrollbar=true, columns=cols, tree=self.list, fct=function(item, sel, button) self:use(item, button) end, select=function(item, sel) self:select(item) end} self.c_list.cur_col = 2 @@ -151,7 +151,7 @@ function _M:generateList() for i, node in ipairs(talents) do node.char = self:makeKeyChar(letter) chars[node.char] = node letter = letter + 1 end list = { - { char='', name=('#{bold}#Choose a talent#{normal}#'):toTString(), status='', hotkey='', desc="All talents that can be used with Extension.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, + { char='', name=(_t'#{bold}#Choose a talent#{normal}#'):toTString(), status='', hotkey='', desc=_t"All talents that can be used with Extension.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, chars = chars, } self.list = list diff --git a/game/modules/tome/dialogs/talents/ChronomancyMatrix.lua b/game/modules/tome/dialogs/talents/ChronomancyMatrix.lua index d32d573a4f47e8299d49249b524de373456cc4ea..644018057f1856b8cbda7daa844a4a8d331e9ac7 100644 --- a/game/modules/tome/dialogs/talents/ChronomancyMatrix.lua +++ b/game/modules/tome/dialogs/talents/ChronomancyMatrix.lua @@ -54,10 +54,10 @@ end function _M:init(actor) self.actor = actor actor.hotkey = actor.hotkey or {} - Dialog.init(self, "Matrix", game.w * 0.6, game.h * 0.8) + Dialog.init(self, _t"Matrix", game.w * 0.6, game.h * 0.8) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=[[ + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=_t[[ You may select a chronomancy spell to Matrix, reducing the cooldown of that spell. ]]} self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - self.c_tut.h - 20, scrollbar=true, no_color_bleed=true} @@ -65,8 +65,8 @@ You may select a chronomancy spell to Matrix, reducing the cooldown of that spel self:generateList() local cols = { - {name="", width={40,"fixed"}, display_prop="char"}, - {name="Talent", width=80, display_prop="name"}, + {name=_t"", width={40,"fixed"}, display_prop="char"}, + {name=_t"Talent", width=80, display_prop="name"}, } self.c_list = TreeList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - 10, all_clicks=true, scrollbar=true, columns=cols, tree=self.list, fct=function(item, sel, button) self:use(item, button) end, select=function(item, sel) self:select(item) end} self.c_list.cur_col = 2 @@ -151,7 +151,7 @@ function _M:generateList() for i, node in ipairs(talents) do node.char = self:makeKeyChar(letter) chars[node.char] = node letter = letter + 1 end list = { - { char='', name=('#{bold}#Choose a talent#{normal}#'):toTString(), status='', hotkey='', desc="All talents that can be used with Matrix.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, + { char='', name=(_t'#{bold}#Choose a talent#{normal}#'):toTString(), status='', hotkey='', desc=_t"All talents that can be used with Matrix.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, chars = chars, } self.list = list diff --git a/game/modules/tome/dialogs/talents/ChronomancyQuicken.lua b/game/modules/tome/dialogs/talents/ChronomancyQuicken.lua index 478b0cc70687500a97a99b71feb981f152d4b331..a772704bdf2e32dc752a514bb999280a68ab318f 100644 --- a/game/modules/tome/dialogs/talents/ChronomancyQuicken.lua +++ b/game/modules/tome/dialogs/talents/ChronomancyQuicken.lua @@ -54,10 +54,10 @@ end function _M:init(actor) self.actor = actor actor.hotkey = actor.hotkey or {} - Dialog.init(self, "Quicken", game.w * 0.6, game.h * 0.8) + Dialog.init(self, _t"Quicken", game.w * 0.6, game.h * 0.8) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=[[ + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=_t[[ You may select a chronomancy spell to Quicken, reducing the time it takes you to cast that spell. ]]} self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - self.c_tut.h - 20, scrollbar=true, no_color_bleed=true} @@ -65,8 +65,8 @@ You may select a chronomancy spell to Quicken, reducing the time it takes you to self:generateList() local cols = { - {name="", width={40,"fixed"}, display_prop="char"}, - {name="Talent", width=80, display_prop="name"}, + {name=_t"", width={40,"fixed"}, display_prop="char"}, + {name=_t"Talent", width=80, display_prop="name"}, } self.c_list = TreeList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - 10, all_clicks=true, scrollbar=true, columns=cols, tree=self.list, fct=function(item, sel, button) self:use(item, button) end, select=function(item, sel) self:select(item) end} self.c_list.cur_col = 2 @@ -151,7 +151,7 @@ function _M:generateList() for i, node in ipairs(talents) do node.char = self:makeKeyChar(letter) chars[node.char] = node letter = letter + 1 end list = { - { char='', name=('#{bold}#Choose a talent#{normal}#'):toTString(), status='', hotkey='', desc="All talents that can be used with Quicken.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, + { char='', name=(_t'#{bold}#Choose a talent#{normal}#'):toTString(), status='', hotkey='', desc=_t"All talents that can be used with Quicken.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, chars = chars, } self.list = list diff --git a/game/modules/tome/dialogs/talents/MagicalCombatArcaneCombat.lua b/game/modules/tome/dialogs/talents/MagicalCombatArcaneCombat.lua index 4df72c2c9520d91fb6907c482bc0abdf867d2df9..b36dc383d032a5b994dd1e7ef4659330bebb8a0d 100644 --- a/game/modules/tome/dialogs/talents/MagicalCombatArcaneCombat.lua +++ b/game/modules/tome/dialogs/talents/MagicalCombatArcaneCombat.lua @@ -37,10 +37,10 @@ end function _M:init(actor) self.actor = actor actor.hotkey = actor.hotkey or {} - Dialog.init(self, "Arcane Combat", game.w * 0.6, game.h * 0.8) + Dialog.init(self, _t"Arcane Combat", game.w * 0.6, game.h * 0.8) local vsep = Separator.new{dir="horizontal", size=self.ih - 10} - self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=[[ + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=1, auto_height=true, no_color_bleed=true, text=_t[[ You may select a spell for Arcane Combat to automatically trigger with melee attacks. Otherwise, select 'Random spells' to have a spell selected automatically with each attack. ]]} self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - self.c_tut.h - 20, scrollbar=true, no_color_bleed=true} @@ -48,8 +48,8 @@ You may select a spell for Arcane Combat to automatically trigger with melee att self:generateList() local cols = { - {name="", width={40,"fixed"}, display_prop="char"}, - {name="Talent", width=80, display_prop="name"}, + {name=_t"", width={40,"fixed"}, display_prop="char"}, + {name=_t"Talent", width=80, display_prop="name"}, } self.c_list = TreeList.new{width=math.floor(self.iw / 2 - vsep.w / 2), height=self.ih - 10, all_clicks=true, scrollbar=true, columns=cols, tree=self.list, fct=function(item, sel, button) self:use(item, button) end, select=function(item, sel) self:select(item) end} self.c_list.cur_col = 2 @@ -134,9 +134,9 @@ function _M:generateList() table.sort(talents, function(a,b) return a.cname < b.cname end) talents[#talents+1] = { - name = "Random spells", + name = _t"Random spells", use_random = true, - desc = "Each time Arcane Combat is triggered, a random allowed spell will be used." + desc = _t"Each time Arcane Combat is triggered, a random allowed spell will be used." } for _, node in ipairs(talents) do @@ -146,7 +146,7 @@ function _M:generateList() end list = { - { char='', name=('#{bold}#Choose a spell#{normal}#'):toTString(), status='', hotkey='', desc="All known spells that can be used with Arcane Combat.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, + { char='', name=(_t'#{bold}#Choose a spell#{normal}#'):toTString(), status='', hotkey='', desc=_t"All known spells that can be used with Arcane Combat.", color=function() return colors.simple(colors.LIGHT_GREEN) end, nodes=talents, shown=true }, chars = chars, } self.list = list diff --git a/game/modules/tome/init.lua b/game/modules/tome/init.lua index 971234f3a8d057c7b5222677076aa3745470cf41..46ae2bad68ab5d2cf5db60355a8f35f16babd76d 100644 --- a/game/modules/tome/init.lua +++ b/game/modules/tome/init.lua @@ -59,6 +59,7 @@ teams = { { "#name#-gfx.team", "optional", "/" }, } +i18n_support = true show_funfacts = true loading_wait_ticks = 260 profile_stats_fields = {"artifacts", "characters", "deaths", "uniques", "scores", "lore", "escorts"} diff --git a/game/modules/tome/load.lua b/game/modules/tome/load.lua index 44f1c3734495b57234dfed10ef3fff2abc4a6837..1e1671d6463d87d937dea33f4a0100725e703b24 100644 --- a/game/modules/tome/load.lua +++ b/game/modules/tome/load.lua @@ -117,25 +117,25 @@ KeyBind:load("move,hotkeys,inventory,actions,interface,tome,debug,mtxn") dofile("/mod/resolvers.lua") -- Body parts -ActorInventory:defineInventory("MAINHAND", "In main hand", true, "Most weapons are wielded in the main hand.", nil, {equipdoll_back="ui/equipdoll/mainhand_inv.png", shimmerable=true}) -ActorInventory:defineInventory("OFFHAND", "In off hand", true, "You can use shields or a second weapon in your off-hand, if you have the talents for it.", nil, {equipdoll_back="ui/equipdoll/offhand_inv.png", shimmerable=true}) -ActorInventory:defineInventory("PSIONIC_FOCUS", "Psionic focus", true, "Object held in your telekinetic grasp. It can be a weapon or some other item to provide a benefit to your psionic powers.", nil, {equipdoll_back="ui/equipdoll/psionic_inv.png", etheral=true}) -ActorInventory:defineInventory("FINGER", "On fingers", true, "Rings are worn on fingers.", nil, {equipdoll_back="ui/equipdoll/ring_inv.png"}) -ActorInventory:defineInventory("NECK", "Around neck", true, "Amulets are worn around the neck.", nil, {equipdoll_back="ui/equipdoll/amulet_inv.png"}) -ActorInventory:defineInventory("LITE", "Light source", true, "A light source allows you to see in the dark places of the world.", nil, {equipdoll_back="ui/equipdoll/light_inv.png"}) -ActorInventory:defineInventory("BODY", "Main armor", true, "Armor protects you from physical attacks. The heavier the armor the more it hinders the use of talents and spells.", nil, {equipdoll_back="ui/equipdoll/body_inv.png", shimmerable=true}) -ActorInventory:defineInventory("CLOAK", "Cloak", true, "A cloak can simply keep you warm or grant you wondrous powers should you find a magical one.", nil, {equipdoll_back="ui/equipdoll/cloak_inv.png", shimmerable=true}) -ActorInventory:defineInventory("HEAD", "On head", true, "You can wear helmets or crowns on your head.", nil, {equipdoll_back="ui/equipdoll/head_inv.png", shimmerable=true}) -ActorInventory:defineInventory("BELT", "Around waist", true, "Belts are worn around your waist.", nil, {equipdoll_back="ui/equipdoll/belt_inv.png"}) -ActorInventory:defineInventory("HANDS", "On hands", true, "Various gloves can be worn on your hands.", nil, {equipdoll_back="ui/equipdoll/hands_inv.png", shimmerable=true}) -ActorInventory:defineInventory("FEET", "On feet", true, "Sandals or boots can be worn on your feet.", nil, {equipdoll_back="ui/equipdoll/boots_inv.png", shimmerable=true}) -ActorInventory:defineInventory("TOOL", "Tool", true, "This is your readied tool, always available immediately.", nil, {equipdoll_back="ui/equipdoll/tool_inv.png"}) -ActorInventory:defineInventory("QUIVER", "Quiver", true, "Your readied ammo.", nil, {equipdoll_back="ui/equipdoll/ammo_inv.png", shimmerable=true}) -ActorInventory:defineInventory("GEM", "Socketed Gems", true, "Gems worn in/on the body, providing their worn bonuses.", nil, {equipdoll_back="ui/equipdoll/gem_inv.png", stack_limit = 1}) -ActorInventory:defineInventory("QS_MAINHAND", "Second weapon set: In main hand", false, "Weapon Set 2: Most weapons are wielded in the main hand. Press 'x' to switch weapon sets.", true) -ActorInventory:defineInventory("QS_OFFHAND", "Second weapon set: In off hand", false, "Weapon Set 2: You can use shields or a second weapon in your off-hand, if you have the talents for it. Press 'x' to switch weapon sets.", true) -ActorInventory:defineInventory("QS_PSIONIC_FOCUS", "Second weapon set: psionic focus", false, "Weapon Set 2: Object held in your telekinetic grasp. It can be a weapon or some other item to provide a benefit to your psionic powers. Press 'x' to switch weapon sets.", true) -ActorInventory:defineInventory("QS_QUIVER", "Second weapon set: Quiver", false, "Weapon Set 2: Your readied ammo.", true) +ActorInventory:defineInventory("MAINHAND", _t"In main hand", true, _t"Most weapons are wielded in the main hand.", nil, {equipdoll_back="ui/equipdoll/mainhand_inv.png", shimmerable=true}) +ActorInventory:defineInventory("OFFHAND", _t"In off hand", true, _t"You can use shields or a second weapon in your off-hand, if you have the talents for it.", nil, {equipdoll_back="ui/equipdoll/offhand_inv.png", shimmerable=true}) +ActorInventory:defineInventory("PSIONIC_FOCUS", _t"Psionic focus", true, _t"Object held in your telekinetic grasp. It can be a weapon or some other item to provide a benefit to your psionic powers.", nil, {equipdoll_back="ui/equipdoll/psionic_inv.png", etheral=true}) +ActorInventory:defineInventory("FINGER", _t"On fingers", true, _t"Rings are worn on fingers.", nil, {equipdoll_back="ui/equipdoll/ring_inv.png"}) +ActorInventory:defineInventory("NECK", _t"Around neck", true, _t"Amulets are worn around the neck.", nil, {equipdoll_back="ui/equipdoll/amulet_inv.png"}) +ActorInventory:defineInventory("LITE", _t"Light source", true, _t"A light source allows you to see in the dark places of the world.", nil, {equipdoll_back="ui/equipdoll/light_inv.png"}) +ActorInventory:defineInventory("BODY", _t"Main armor", true, _t"Armor protects you from physical attacks. The heavier the armor the more it hinders the use of talents and spells.", nil, {equipdoll_back="ui/equipdoll/body_inv.png", shimmerable=true}) +ActorInventory:defineInventory("CLOAK", _t"Cloak", true, _t"A cloak can simply keep you warm or grant you wondrous powers should you find a magical one.", nil, {equipdoll_back="ui/equipdoll/cloak_inv.png", shimmerable=true}) +ActorInventory:defineInventory("HEAD", _t"On head", true, _t"You can wear helmets or crowns on your head.", nil, {equipdoll_back="ui/equipdoll/head_inv.png", shimmerable=true}) +ActorInventory:defineInventory("BELT", _t"Around waist", true, _t"Belts are worn around your waist.", nil, {equipdoll_back="ui/equipdoll/belt_inv.png"}) +ActorInventory:defineInventory("HANDS", _t"On hands", true, _t"Various gloves can be worn on your hands.", nil, {equipdoll_back="ui/equipdoll/hands_inv.png", shimmerable=true}) +ActorInventory:defineInventory("FEET", _t"On feet", true, _t"Sandals or boots can be worn on your feet.", nil, {equipdoll_back="ui/equipdoll/boots_inv.png", shimmerable=true}) +ActorInventory:defineInventory("TOOL", _t"Tool", true, _t"This is your readied tool, always available immediately.", nil, {equipdoll_back="ui/equipdoll/tool_inv.png"}) +ActorInventory:defineInventory("QUIVER", _t"Quiver", true, _t"Your readied ammo.", nil, {equipdoll_back="ui/equipdoll/ammo_inv.png", shimmerable=true}) +ActorInventory:defineInventory("GEM", _t"Socketed Gems", true, _t"Gems worn in/on the body, providing their worn bonuses.", nil, {equipdoll_back="ui/equipdoll/gem_inv.png", stack_limit = 1}) +ActorInventory:defineInventory("QS_MAINHAND", _t"Second weapon set: In main hand", false, _t"Weapon Set 2: Most weapons are wielded in the main hand. Press 'x' to switch weapon sets.", true) +ActorInventory:defineInventory("QS_OFFHAND", _t"Second weapon set: In off hand", false, _t"Weapon Set 2: You can use shields or a second weapon in your off-hand, if you have the talents for it. Press 'x' to switch weapon sets.", true) +ActorInventory:defineInventory("QS_PSIONIC_FOCUS", _t"Second weapon set: psionic focus", false, _t"Weapon Set 2: Object held in your telekinetic grasp. It can be a weapon or some other item to provide a benefit to your psionic powers. Press 'x' to switch weapon sets.", true) +ActorInventory:defineInventory("QS_QUIVER", _t"Second weapon set: Quiver", false, _t"Weapon Set 2: Your readied ammo.", true) ActorInventory.equipdolls = { default = { w=48, h=48, itemframe="ui/equipdoll/itemframe48.png", itemframe_sel="ui/equipdoll/itemframe-sel48.png", ix=3, iy=3, iw=42, ih=42, doll_x=116, doll_y=168+64, doll_w=128, doll_h=128, list={ @@ -179,14 +179,14 @@ ActorTemporaryEffects:loadDefinition("/data/timed_effects.lua") dofile("/data/resources.lua") -- Actor stats -ActorStats:defineStat("Strength", "str", 10, 1, 100, "Strength defines your character's ability to apply physical force. It increases your melee damage, damage done with heavy weapons, your chance to resist physical effects, and carrying capacity.") -ActorStats:defineStat("Dexterity", "dex", 10, 1, 100, "Dexterity defines your character's ability to be agile and alert. It increases your chance to hit, your ability to avoid attacks, and your damage with light or ranged weapons.") -ActorStats:defineStat("Magic", "mag", 10, 1, 100, "Magic defines your character's ability to manipulate the magical energy of the world. It increases your spell power, and the effect of spells and other magic items.") -ActorStats:defineStat("Willpower", "wil", 10, 1, 100, "Willpower defines your character's ability to concentrate. It increases your mana, stamina and PSI capacity, and your chance to resist mental attacks.") -ActorStats:defineStat("Cunning", "cun", 10, 1, 100, "Cunning defines your character's ability to learn, think, and react. It allows you to learn many worldly abilities, and increases your mental capabilities and chance of critical hits.") -ActorStats:defineStat("Constitution", "con", 10, 1, 100, "Constitution defines your character's ability to withstand and resist damage. It increases your maximum life and physical resistance.") +ActorStats:defineStat("Strength", "str", 10, 1, 100, _t"Strength defines your character's ability to apply physical force. It increases your melee damage, damage done with heavy weapons, your chance to resist physical effects, and carrying capacity.") +ActorStats:defineStat("Dexterity", "dex", 10, 1, 100, _t"Dexterity defines your character's ability to be agile and alert. It increases your chance to hit, your ability to avoid attacks, and your damage with light or ranged weapons.") +ActorStats:defineStat("Magic", "mag", 10, 1, 100, _t"Magic defines your character's ability to manipulate the magical energy of the world. It increases your spell power, and the effect of spells and other magic items.") +ActorStats:defineStat("Willpower", "wil", 10, 1, 100, _t"Willpower defines your character's ability to concentrate. It increases your mana, stamina and PSI capacity, and your chance to resist mental attacks.") +ActorStats:defineStat("Cunning", "cun", 10, 1, 100, _t"Cunning defines your character's ability to learn, think, and react. It allows you to learn many worldly abilities, and increases your mental capabilities and chance of critical hits.") +ActorStats:defineStat("Constitution", "con", 10, 1, 100, _t"Constitution defines your character's ability to withstand and resist damage. It increases your maximum life and physical resistance.") -- Luck is hidden and starts at half max value (50) which is considered the standard -ActorStats:defineStat("Luck", "lck", 50, 1, 100, "Luck defines your character's fortune when dealing with unknown events. It increases your critical strike chance, your chance of random encounters, ...") +ActorStats:defineStat("Luck", "lck", 50, 1, 100, _t"Luck defines your character's fortune when dealing with unknown events. It increases your critical strike chance, your chance of random encounters, ...") -- Actor leveling, player is restricted to 50 but npcs can go higher ActorLevel:defineMaxLevel(nil) @@ -246,18 +246,18 @@ require("engine.dialogs.Chat").show_portraits = true -- Inventory tabs InventoryUI.default_tabslist = function(self) local tabslist = {} - tabslist[#tabslist+1] = {image="inven_tabs/weapons.png", kind="weapons", desc="All kinds of weapons", filter=function(o) return not o.__transmo and (o.type == "weapon") end} - tabslist[#tabslist+1] = {image="inven_tabs/armors.png", kind="armors", desc="All kinds of armours", filter=function(o) return not o.__transmo and (o.type == "armor") end} - tabslist[#tabslist+1] = {image="inven_tabs/jewelry.png", kind="jewelry", desc="Rings and Amulets", filter=function(o) return not o.__transmo and (o.type == "jewelry") end} - tabslist[#tabslist+1] = {image="inven_tabs/gems.png", kind="gems", desc="Gems" , filter=function(o) return not o.__transmo and (o.type == "gem" or o.type == "alchemist-gem") end} - tabslist[#tabslist+1] = {image="inven_tabs/inscriptions.png", kind="inscriptions", desc="Infusions, Runes, ...", filter=function(o) return not o.__transmo and (o.type == "scroll") end} - if self.actor.can_tinker then tabslist[#tabslist+1] = {image="inven_tabs/tinkers.png", kind="tinker", desc="Tinkers", filter=function(o) return o.is_tinker end} end - tabslist[#tabslist+1] = {image="inven_tabs/misc.png", kind="misc", desc="Miscellaneous", filter="others"} - tabslist[#tabslist+1] = {image="inven_tabs/quests.png", kind="quests", desc="Quest and plot related items", filter=function(o) return not o.__transmo and (o.plot or o.quest) end} - if self.actor:attr("has_transmo") then tabslist[#tabslist+1] = {image="inven_tabs/chest.png", kind="transmo", desc="Transmogrification Chest", filter=function(o) return o.__transmo end} end + tabslist[#tabslist+1] = {image="inven_tabs/weapons.png", kind="weapons", desc=_t"All kinds of weapons", filter=function(o) return not o.__transmo and (o.type == "weapon") end} + tabslist[#tabslist+1] = {image="inven_tabs/armors.png", kind="armors", desc=_t"All kinds of armours", filter=function(o) return not o.__transmo and (o.type == "armor") end} + tabslist[#tabslist+1] = {image="inven_tabs/jewelry.png", kind="jewelry", desc=_t"Rings and Amulets", filter=function(o) return not o.__transmo and (o.type == "jewelry") end} + tabslist[#tabslist+1] = {image="inven_tabs/gems.png", kind="gems", desc=_t"Gems" , filter=function(o) return not o.__transmo and (o.type == "gem" or o.type == "alchemist-gem") end} + tabslist[#tabslist+1] = {image="inven_tabs/inscriptions.png", kind="inscriptions", desc=_t"Infusions, Runes, ...", filter=function(o) return not o.__transmo and (o.type == "scroll") end} + if self.actor.can_tinker then tabslist[#tabslist+1] = {image="inven_tabs/tinkers.png", kind="tinker", desc=_t"Tinkers", filter=function(o) return o.is_tinker end} end + tabslist[#tabslist+1] = {image="inven_tabs/misc.png", kind="misc", desc=_t"Miscellaneous", filter="others"} + tabslist[#tabslist+1] = {image="inven_tabs/quests.png", kind="quests", desc=_t"Quest and plot related items", filter=function(o) return not o.__transmo and (o.plot or o.quest) end} + if self.actor:attr("has_transmo") then tabslist[#tabslist+1] = {image="inven_tabs/chest.png", kind="transmo", desc=_t"Transmogrification Chest", filter=function(o) return o.__transmo end} end self:triggerHook{"Inventory:makeTabs", tabslist=tabslist} - tabslist[#tabslist+1] = {image="inven_tabs/all.png", kind="all", desc="All", filter="all"} + tabslist[#tabslist+1] = {image="inven_tabs/all.png", kind="all", desc=_t"All", filter="all"} for _, t in ipairs(tabslist) do if fs.exists("/data/gfx/"..UIBase.ui.."-ui/"..t.image) then t.image = UIBase.ui.."-ui/"..t.image else t.image = "metal-ui/"..t.image end end return tabslist end diff --git a/game/modules/tome/resolvers.lua b/game/modules/tome/resolvers.lua index a7ddbc20a0e2d84b83849d2c87c55e3664fca854..47a0f713469c715b689d3804202136a93aa66cdb 100644 --- a/game/modules/tome/resolvers.lua +++ b/game/modules/tome/resolvers.lua @@ -543,7 +543,7 @@ function resolvers.calc.store(t, e) if who and who.player and act then if self.store_faction and who:reactionToward({faction=self.store_faction}) < 0 then return true end self.store:loadup(game.level, game.zone) - self.store:interact(who, self.name) + self.store:interact(who, self:getName()) end return true end diff --git a/i18n_tools/ansicolors.lua b/i18n_tools/ansicolors.lua new file mode 100644 index 0000000000000000000000000000000000000000..f47495284fc45566299e3d0f1538206a8150bba7 --- /dev/null +++ b/i18n_tools/ansicolors.lua @@ -0,0 +1,100 @@ +-- ansicolors.lua v1.0.2 (2012-08) + +-- Copyright (c) 2009 Rob Hoelz <rob@hoelzro.net> +-- Copyright (c) 2011 Enrique GarcÃÂa Cota <enrique.garcia.cota@gmail.com> +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the "Software"), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +-- copies of the Software, and to permit persons to whom the Software is +-- furnished to do so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in +-- all copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +-- THE SOFTWARE. + + +-- support detection +local function isWindows() + return type(package) == 'table' and type(package.config) == 'string' and package.config:sub(1,1) == '\\' +end + +local supported = not isWindows() +if isWindows() then supported = os.getenv("ANSICON") end + +local keys = { + -- reset + reset = 0, + + -- misc + bright = 1, + dim = 2, + underline = 4, + blink = 5, + reverse = 7, + hidden = 8, + + -- foreground colors + black = 30, + red = 31, + green = 32, + yellow = 33, + blue = 34, + magenta = 35, + cyan = 36, + white = 37, + + -- background colors + blackbg = 40, + redbg = 41, + greenbg = 42, + yellowbg = 43, + bluebg = 44, + magentabg = 45, + cyanbg = 46, + whitebg = 47 +} + +local escapeString = string.char(27) .. '[%dm' +local function escapeNumber(number) + return escapeString:format(number) +end + +local function escapeKeys(str) + + if not supported then return "" end + + local buffer = {} + local number + for word in str:gmatch("%w+") do + number = keys[word] + assert(number, "Unknown key: " .. word) + table.insert(buffer, escapeNumber(number) ) + end + + return table.concat(buffer) +end + +local function replaceCodes(str) + str = string.gsub(str,"(%%{(.-)})", function(_, str) return escapeKeys(str) end ) + return str +end + +-- public + +local function ansicolors( str ) + str = tostring(str or '') + + return replaceCodes('%{reset}' .. str .. '%{reset}') +end + + +return setmetatable({noReset = replaceCodes}, {__call = function (_, str) return ansicolors (str) end}) diff --git a/i18n_tools/i18n_extractor.lua b/i18n_tools/i18n_extractor.lua new file mode 100644 index 0000000000000000000000000000000000000000..7e7693e28b56b597aa18edf688fc5e0458ed33b0 --- /dev/null +++ b/i18n_tools/i18n_extractor.lua @@ -0,0 +1,375 @@ +local lfs = require 'lfs' +local colors = require 'ansicolors' +local Parser = require 'luafish.parser' +local p = Parser() + +local locales = {} +function string.capitalize(str) + if #str > 1 then + return string.upper(str:sub(1, 1))..str:sub(2) + elseif #str == 1 then + return str:upper() + else + return str + end +end + +function table.keys(t) + local tt = {} + for k, e in pairs(t) do tt[#tt+1] = k end + return tt +end + +function table.print(src, offset, ret) + if type(src) ~= "table" then print("table.print has no table:", src) return end + offset = offset or "" + for k, e in pairs(src) do + -- Deep copy subtables, but not objects! + if type(e) == "table" and not e.__ATOMIC and not e.__CLASSNAME then + print(("%s[%s] = {"):format(offset, tostring(k))) + table.print(e, offset.."\t") + print(("%s}"):format(offset)) + else + print(("%s[%s] = %s"):format(offset, tostring(k), tostring(e))) + end + end +end + +local log_alias = { + log = {1}, + logSeen = {2, 3}, + logCombat = {2, 3}, + logPlayer = {2}, + logMessage = {5}, + delayedLogMessage = {4}, + say = {2}, + saySimple = {2}, + easing = {3}, + easingSimple = {3}, +} +local newTalent_alias = { + newTalent = true, + newInscription = true, + uberTalent = true, +} +local function explore(file, ast) + --table.print(ast) + for i, e in ipairs(ast) do + if type(e) == "table" then + if e.tag == "Id" and e[1] == "_t" then + local en = ast[i+1] + if en and type(en) == "table" and en.tag == "ExpList" and type(en[1]) == "table" and en[1].tag == "String" then + local tag = "_t" + if en[2] and type(en[2]) == "table" and en[2].tag == "String" then + tag = en[2][1] + end + print(colors("%{bright cyan}_t"), en[1][1]) + locales[file] = locales[file] or {} + locales[file][en[1][1]] = {line=en[1].nline, type=tag} + end + elseif e.tag == "String" and e[1] == "tformat" and i == 2 then + local en = ast[i-1] + if en and type(en) == "table" and en.tag == "Paren" and type(en[1]) == "table" then + local sn = en[1] + if sn.tag == "String" and sn[1] then + print(colors("%{bright yellow}tformat"), sn[1]) + locales[file] = locales[file] or {} + locales[file][sn[1]] = {line=sn.nline, type="tformat"} + end + end + elseif e.tag == "Id" and newTalent_alias[e[1]] then + local en = ast[i+1] + if en then for j, p in ipairs(en[1]) do + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then + print(colors("%{bright green}".. e[1]), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="talent name"} + end + end end + elseif e.tag == "Id" and e[1] == "newTalentType" then + local en = ast[i+1] + if en then for j, p in ipairs(en[1]) do + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "type" then + local cat = p[2][1]:gsub("/.*", "") + print(colors("%{bright green}newTalentType"), cat) + locales[file] = locales[file] or {} + locales[file][cat] = {line=p[2].nline, type="talent category"} + end + end end + elseif e.tag == "Id" and e[1] == "newEntity" then + local en = ast[i+1] + if en then for j, p in ipairs(en[1]) do + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then + print(colors("%{green}newEntity"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="entity name"} + elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "short_name" then + print(colors("%{green}newEntity"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="entity short_name"} + elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "type" then + print(colors("%{green}newEntity"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="entity type"} + elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "subtype" then + print(colors("%{green}newEntity"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="entity subtype"} + elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "keywords" then + for _, q in ipairs(p[2]) do + if q[1].tag == "String" then + print(colors("%{green}newEntity"), q[1][1]) + locales[file] = locales[file] or {} + locales[file][q[1][1]] = {line=p[2].nline, type="entity keyword"} + end + end + elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "combat" then + for _, q in ipairs(p[2]) do + if q.tag == "Field" and q[1].tag == "String" and q[1][1] == "talented" then + print(colors("%{green}newEntity"), q[2][1]) + locales[file] = locales[file] or {} + locales[file][q[2][1]] = {line=p[2].nline, type="entity combat talented"} + end + end + elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "on_slot" then + if(p[2].tag == "String") then + print(colors("%{green}newEntity"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="entity on slot"} + end + end + end end + elseif e.tag == "Id" and e[1] == "newIngredient" then + local en = ast[i+1] + if en then for j, p in ipairs(en[1]) do + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then + print(colors("%{green}newIngredient"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="ingredient name"} + elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "type" then + print(colors("%{green}newIngredient"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="ingredient type"} + end + end end + elseif e.tag == "Id" and e[1] == "newAchievement" then + local en = ast[i+1] + if en then for j, p in ipairs(en[1]) do + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then + print(colors("%{bright red}newAchievement"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="achievement name"} + end + end end + elseif e.tag == "Id" and e[1] == "newBirthDescriptor" then + local en = ast[i+1] + local dname, name = nil, nil + if en then for j, p in ipairs(en[1]) do + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then + name = p[2] + end + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "display_name" then + dname = p[2] + end + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "cosmetic_options" then + for _, q in ipairs(p[2]) do + if q[1].tag == "String" then + local name = q[1][1]:gsub("_", " "):capitalize() + print(colors("%{bright cyan}newBirthDescriptor"), name) + locales[file] = locales[file] or {} + locales[file][name] = {line=p[2].nline, type="birth facial category"} + end + end + end + end end + if dname then + print(colors("%{bright cyan}newBirthDescriptor"), dname[1]) + locales[file] = locales[file] or {} + locales[file][dname[1]] = {line=dname.nline, type="birth descriptor name"} + elseif name then + print(colors("%{bright cyan}newBirthDescriptor"), name[1]) + locales[file] = locales[file] or {} + locales[file][name[1]] = {line=name.nline, type="birth descriptor name"} + end + elseif e.tag == "Id" and e[1] == "newGem" then + local en = ast[i+1] + if en[1].tag == "String" then + local name = en[1][1]:lower() + local a_name = "alchemist "..en[1][1]:lower() + local subtype = en[5][1] + locales[file] = locales[file] or {} + print(colors("%{cyan}newGem"), name) + locales[file][name] = {line=en.nline, type="gem name"} + print(colors("%{cyan}newGem"), a_name) + locales[file][a_name] = {line=en.nline, type="alchemist gem"} + print(colors("%{cyan}newGem"), subtype) + locales[file][subtype] = {line=en.nline, type="gem subtype"} + end + elseif e.tag == "Id" and e[1] == "newEffect" then + local en = ast[i+1] + if en then for j, p in ipairs(en[1]) do + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "subtype" then + for _, q in ipairs(p[2]) do + if q[1].tag == "String" then + print(colors("%{yellow}newEffect"), q[1][1]) + locales[file] = locales[file] or {} + locales[file][q[1][1]] = {line=p[2].nline, type="effect subtype"} + end + end + end + end end + elseif e.tag == "Id" and e[1] == "floorEffect" then + local en = ast[i+1] + if en then for j, p in ipairs(en[1]) do + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "desc" then + print(colors("%{yellow}floorEffect"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="floorEffect desc"} + end + end end + elseif e.tag == "Id" and e[1] == "newLore" then + local en = ast[i+1] + if en then for j, p in ipairs(en[1]) do + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "category" then + print(colors("%{red}newLore"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="newLore category"} + end + end end + elseif e.tag == "VarList" and e[1].tag == "Id" and e[1][1] == "load_tips" then + if file:find("init.lua$") then + local en = ast[i+1][1] + if en then for _, v in ipairs(en) do + for _, p in ipairs(v[2]) do if p.tag == "Field" and p[1][1]=="text" then + local text = p[2][1] + print(colors("%{bright red}load_tips"), text) + locales[file] = locales[file] or {} + locales[file][text] = {line=p[2].nline, type="init.lua load_tips"} + end end + end end + end + elseif e.tag == "VarList" and e[1].tag == "Id" and e[1][1] == "description" then + if file:find("init.lua$") then + local en = ast[i+1][1] + local text = en[1] + print(colors("%{bright red}init.lua description"), text) + locales[file] = locales[file] or {} + locales[file][text] = {line=en.nline, type="init.lua description"} + end + elseif e.tag == "VarList" and e[1].tag == "Id" and e[1][1] == "long_name" then + if file:find("init.lua$") then + local en = ast[i+1][1] + local text = en[1] + print(colors("%{bright red}init.lua long_name"), text) + locales[file] = locales[file] or {} + locales[file][text] = {line=en.nline, type="init.lua long_name"} + end + elseif e.tag == "Invoke" and e[1].tag == "Id" and e[1][1] == "ActorStats" and e[2].tag == "String" and e[2][1] == "defineStat" then + local en = e[3] + if en and type(en) == "table" and en.tag == "ExpList" and en[1].tag == "String" and en[2].tag == "String" then + print(colors("%{blue}defineStat"), en[1][1]) + locales[file] = locales[file] or {} + locales[file][en[1][1]] = {line=e.nline, type="stat name"} + print(colors("%{blue}defineStat"), en[2][1]) + locales[file] = locales[file] or {} + locales[file][en[2][1]] = {line=e.nline, type="stat short_name"} + end + elseif e.tag == "Invoke" and log_alias[e[2][1] ] then + local en = e[3] + local log_type = e[2][1] + local orders = log_alias[log_type] + for _, order in ipairs(orders) do + if en and type(en) == "table" and en.tag == "ExpList" and type(en[order]) == "table" and en[order].tag == "String" then + print(colors("%{bright blue}"..log_type), en[order][1]) + locales[file] = locales[file] or {} + locales[file][en[order][1]] = {line=en[order].nline, type=log_type} + end + end + elseif e.tag == "Call" and e[1][2] and log_alias[e[1][2][1] ] then + local en = e[2] + local log_type = e[1][2][1] + local orders = log_alias[log_type] + for _, order in ipairs(orders) do + if en and type(en) == "table" and en.tag == "ExpList" and type(en[order]) == "table" and en[order].tag == "String" then + print(colors("%{bright blue}"..log_type), en[order][1]) + locales[file] = locales[file] or {} + locales[file][en[order][1]] = {line=en[order].nline, type=log_type} + end + end + elseif e.tag == "Invoke" and + e[1] and e[1].tag == "Index" and e[1][1] and e[1][1][1] == "engine" and e[1][1].tag == "Id" and e[1][2][1] == "Faction" and e[1][2].tag == "String" and + e[2] and e[2].tag == "String" and e[2][1] == "add" then + local en = e[3] + if en then for j, p in ipairs(en[1]) do + if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then + print(colors("%{blue}newFaction"), p[2][1]) + locales[file] = locales[file] or {} + locales[file][p[2][1]] = {line=p[2].nline, type="faction name"} + end + end end + end + explore(file, e) + end + end +end + +local function dofolder(dir) + local function handle_file(file) + if file:find("/locales/") then + return + end + print(colors("%{bright}-------------------------------------")) + print(colors("%{bright}-- "..file)) + print(colors("%{bright}-------------------------------------")) + explore(file:gsub("%.%./", ""), p:parse{file}) + end + + if lfs.attributes(dir, "mode") == "file" then + handle_file(dir) + return + end + + for sfile in lfs.dir(dir) do + local file = dir.."/"..sfile + if lfs.attributes(file, "mode") == "directory" and sfile ~= ".." and sfile ~= "." then + dofolder(file) + elseif sfile:find("%.lua$") then + handle_file(file) + end + end +end + +for _, dir in ipairs{...} do + dofolder(dir) +end + +local f = io.open("i18n_list.lua", "w") +local slist = table.keys(locales) +table.sort(slist) +for _, section in ipairs(slist) do + f:write('------------------------------------------------\n') + f:write(('section %q\n\n'):format(section)) + + local list = {} + for k, v in pairs(locales[section]) do + if type(k) == "string" then + list[#list+1] = {text=k, line=v.line, type=v.type} + end + end + table.sort(list, function(a,b) + if a.line ~= b.line then + return a.line < b.line + else + return a.text < b.text + end + end) + + -- local list = table.keys(locales[section]) + -- table.sort(list) + + for _, s in ipairs(list) do + f:write(('tDef(%s, %q, %q) -- \n'):format(s.line, s.text, s.type)) + end + f:write('\n\n') +end +f:close() diff --git a/i18n_tools/i18n_helper.lua b/i18n_tools/i18n_helper.lua new file mode 100644 index 0000000000000000000000000000000000000000..9ed28ad253bd3230fa106285ed3f65f654c268fc --- /dev/null +++ b/i18n_tools/i18n_helper.lua @@ -0,0 +1,318 @@ +local lfs = require 'lfs' +local locales_trans = {} +local locales_args = {} +local locales_special = {} +local locales_sections ={} +local sections = {} +local current_section = "" +local tcs = {} +local locale = "zh_hans" +local function runfile(file, env) + -- Base loader + local prev, err = loadfile(file) + if err then error(err) end + setfenv(prev, env) + print("running "..file) + prev() + return +end +local function count_string(str, pattern) + count = 0 + for i in string.gfind(str, pattern) do + count = count + 1 + end + return count +end + +local function suitable_string(string) + if string == nil or string == "nil" then + return "nil" + end + if string:find("\n") and string:sub(1, 1) ~= "\n" then + return "[[" .. string .. "]]" + else + return ("%q"):format(string) + end +end + +local function rev_kv(a) + local aa = {} + for k, v in pairs(a) do + if v ~= nil then + aa[v] = k + end + end + return aa +end +function table.val_to_str ( v ) + if "string" == type( v ) then + v = string.gsub( v, "\n", "\\n" ) + if string.match( string.gsub(v,"[^'\"]",""), '^"+$' ) then + return "'" .. v .. "'" + end + return '"' .. string.gsub(v,'"', '\\"' ) .. '"' + else + return "table" == type( v ) and table.tostring( v ) or + tostring( v ) + end + end + + function table.key_to_str ( k ) + if "string" == type( k ) and string.match( k, "^[_%a][_%a%d]*$" ) then + return k + else + return "[" .. table.val_to_str( k ) .. "]" + end + end + +function table.tostring( tbl ) + local result, done = {}, {} + for k, v in ipairs( tbl ) do + table.insert( result, table.val_to_str( v ) ) + done[ k ] = true + end + for k, v in pairs( tbl ) do + if not done[ k ] then + table.insert( result, + table.key_to_str( k ) .. "=" .. table.val_to_str( v ) ) + end + end + return "{" .. table.concat( result, "," ) .. "}" +end + +local function get(table, key, tag, value) + tag = tag or "nil" + table["nil"] = table["nil"] or {} + table[tag] = table[tag] or {} + if value == nil then + if table[tag][key] then + return table[tag][key] + else + return table["nil"][key] + end + else + table[tag][key] = value + table["nil"][key] = value + end +end + +local function introduce_file(file_in) + local env = setmetatable({ + locale = function(s) end, + section = function(s) + current_section = s + sections[#sections+1] = current_section + locales_sections[current_section] = locales_sections[current_section] or {} + end, + tDef = function(line, src, tag) + locales_sections[current_section][src] = { + line = line, + src = src, + tag = tag, + } + end, + }, {__index=getfenv(2)}) + runfile(file_in, env) +end + +local function check_src_dst(src, dst, args_order) + local rex = require 'rex_pcre' + local pattern = [[(%[+-]?\d*(\.\d*)?[dsfi])]] + local src_s = {} + local dst_s = {} + for k in (rex.gmatch(src, pattern)) do + src_s[#src_s+1] = k + end + for k in (rex.gmatch(dst, pattern)) do + dst_s[#dst_s+1] = k + end + local checked = true + if args_order then + for k, v in ipairs(dst_s) do + if src_s[args_order[k]] ~= v then + checked = false + end + end + else + for k, v in ipairs(dst_s) do + if src_s[k] ~= v then + checked = false + end + end + end + if #src_s ~= #dst_s then + checked = false + end + if not checked then + print("% MISMATCH:") + print(src) + print(table.tostring(src_s)) + print(dst) + print(table.tostring(dst_s)) + end +end +local function merge_file_t(src, dst, tag, args_order, special) + if not dst or dst == "" then + return + end + if tcs[src:lower()] then + dst = tcs[src:lower()] + end + if src == dst and current_section ~= "always_merge" then + return + end + -- check_src_dst(src, dst, args_order) + if false and count_string(src, "#") ~= count_string(dst, "#") then + print("# MISMATCH:") + print(src) + print(dst) + end + if not locales_sections[current_section][src] then + locales_sections[current_section][src] = { + line = 999, + src = src, + bogus = true, + tag = tag, + } + end + get(locales_trans, src, tag, dst) + get(locales_args, src, tag, args_order) + get(locales_special, src, tag, special) +end +local function merge_file_tt(src, dst, args_order, special) + return merge_file_t(src, dst, nil, args_order, special) +end +local function merge_file(file_merge) + local env = setmetatable({ + locale = function(s) end, + section = function(s) + current_section = s + if not locales_sections[current_section] then + sections[#sections+1] = current_section + locales_sections[current_section] = locales_sections[current_section] or {} + end + end, + t = merge_file_t, + t_old = merge_file_t, + tc = function(src, dst) + tcs[src] = dst + end, + }, {__index=getfenv(2)}) + runfile(file_merge, env) +end +local merged_src = {} +local translated = 0 +local all_entry = 0 +local not_merged = 0 +local function write_section(f, f2, f3, section) + local f2_count = 0 + t = locales_sections[section] + f:write("------------------------------------------------\n") + f:write(('section "%s"\n\n'):format(section)) + f3:write("------------------------------------------------\n") + f3:write(('section "%s"\n\n'):format(section)) + local f2_text = "" + local list = {} + for _, e in pairs(t) do + list[#list+1] = e + end + if section ~= "not_merged" then + table.sort(list, function(a, b) + if a.line ~= b.line then + return a.line < b.line + else + return a.src < b.src + end + end) + else + table.sort(list, function(a, b) return a.src < b.src end) + end + for _, e in ipairs(list) do + local src = e.src + local tag = e.tag or nil + + if section ~= "not_merged" then + merged_src[src] = true + end + + local print_str = "" + local locale_tran = get(locales_trans, src, tag) + if locale_tran then + if section ~= "always_merge" and e.bogus then + print_str = "t_old" + else + print_str = "t" + end + print_str = print_str .. "(" .. suitable_string(src) .. ", " .. suitable_string(locale_tran) .. ", " .. suitable_string(tag) + local locale_special = get(locales_special, src, tag) + local locale_arg = get(locales_args, src, tag) + if locale_special then + if locale_arg then + print_str = print_str .. ", " .. table.tostring(locale_arg) + else + print_str = print_str .. ", nil" + end + print_str = print_str .. ", " .. table.tostring(locale_special) .. ")" + elseif locale_arg then + print_str = print_str .. ", " .. table.tostring(locale_arg) .. ")" + else + print_str = print_str .. ")" + end + if not (section ~= "always_merge" and e.bogus) then + f3:write(print_str .. "\n") + end + else + print_str = "t(" .. suitable_string(src) .. ", " .. suitable_string(src) .. ", " .. suitable_string(tag) .. ")" + -- f2:write(print_str .. "\n") + f2_text = f2_text .. print_str .. "\n" + f2_count = f2_count + 1 + end + if section ~= "not_merged" or not merged_src[src] then + f:write(print_str .. '\n') + end + if section ~= "not_merged" then + all_entry = all_entry + 1 + if locale_tran then + translated = translated + 1 + end + end + end + f:write("\n\n") + f3:write("\n\n") + if f2_text ~= "" then + f2:write("------------------------------------------------\n") + f2:write(('section "%s"\n'):format(section)) + f2:write(("-- %d entries\n"):format(f2_count)) + f2:write(f2_text) + f2:write("\n\n") + end +end +local function print_file(file_out, file_out_2, file_out_3, file_copy) + local f = io.open(file_out, "w") + local f2 = io.open(file_out_2, "w") + local f3 = io.open(file_out_3, "w") + local fc = io.open(file_copy, "rb") + f3:write("locale \"" .. locale .. "\"\n") + while true do + local l = fc:read() + if not l then break end + f3:write(l) + end + table.sort(sections) + for _, section in ipairs(sections) do + write_section(f, f2, f3, section) + end + print(("%d / %d entries translated"):format(translated, all_entry)) +end +local function extract(file_in, file_merge, file_out, file_out_2, file_out_3, file_copy) + local file_in = file_in or "i18n_list.lua" + local file_merge = file_merge or "merge_translation.lua" + local file_out = file_out or "output_translation.lua" + local file_out_2 = file_out_2 or "untranslated.lua" + local file_out_3 = file_out_3 or "../game/engines/default/data/locales/" .. locale .. ".lua" + local file_copy = file_copy or locale .. ".copy.lua" + introduce_file(file_in) + merge_file(file_merge) + print_file(file_out, file_out_2, file_out_3, file_copy) +end +extract(...) \ No newline at end of file diff --git a/i18n_tools/luafish/lua2c.lua b/i18n_tools/luafish/lua2c.lua new file mode 100644 index 0000000000000000000000000000000000000000..5729d7e1a8f4eb26afef3c334a77f4160a805470 --- /dev/null +++ b/i18n_tools/luafish/lua2c.lua @@ -0,0 +1,153 @@ +local M = {} + +local f = {} + +local c_from_opid = {} +c_from_opid['*'] = '*' +c_from_opid['/'] = '/' +c_from_opid['+'] = '+' +c_from_opid['-'] = '-' +--FIX: define more ops. + +local function to_c(ast) + local handler = assert(f[ast.tag], ast.tag) + return handler(ast) +end + +function f.Op(ast) + local id,a,b = ast[1],ast[2],ast[3] + return to_c(a) .. ' ' .. c_from_opid[id] .. ' ' .. to_c(b) +end + +function f.Number(ast) + return tostring(ast[1]) +end + +function f.ExpList(ast) + assert(#ast == 1) + return to_c(ast[1]) +end + +function f.Set(ast) + local s = '' + local names_ast,vals_ast = ast[1],ast[2] + for i=1,#names_ast do + s = s .. to_c(names_ast[i]) .. ' = ' .. to_c(vals_ast[i]) + end + return s +end + +function f.Id(ast) + return ast[1] +end + +function f.Local(ast) + local names_ast,vals_ast = ast[1],ast[2] + local ts = {} + for i=1,#names_ast do + ts[#ts+1] = 'double ' .. to_c(names_ast[i]) .. ' = ' .. to_c(vals_ast[i]) + end + local s = table.concat(ts, ';\n') + return s +end + +function f.LocalFunctionDef(ast) + local id_ast,args_ast,block_ast = ast[1],ast[2],ast[3] + + local ts = {} + for i=1,#args_ast do + ts[#ts+1] = 'double ' .. to_c(args_ast[i]) + end + local args_c = table.concat(ts, ', ') + + local block_cobj = to_c(block_ast) + local block_c = block_cobj[1] + assert(not block_cobj.toplevel, 'not impl') + + + local s = 'double ' .. to_c(id_ast) .. '(' .. args_c .. ') {\n' .. + block_c .. '}\n' + return {'', toplevel=s} +end + +function f.Return(ast) + local s = 'return ' .. to_c(ast[1]) + return s +end + +function f.Call(ast) + local id_ast,args_ast = ast[1],ast[2] + + if id_ast[1] == 'print' then + assert(#args_ast == 1) + local s = 'printf("%f\\n", ' .. to_c(args_ast[1]) .. ')' + return s + end + + local ts = {} + for i=1,#args_ast do + ts[#ts+1] = to_c(args_ast[i]) + end + local args_c = table.concat(ts, ', ') + + local s = to_c(id_ast) .. '(' .. args_c .. ')' + return s +end + +function f.Block(ast) + local stop + + local s = '' + for i=1,#ast do + local c = to_c(ast[i]) + if type(c) == 'table' and c.toplevel then + stop = stop or '' + stop = stop .. c.toplevel + else + s = s .. c .. ';\n' + end + end + return {s, toplevel = stop} +end + +function M.c_from_ast(ast) + assert(ast.tag == 'Block') + local cobj = to_c(ast) + + return [[ +#include <stdio.h> +]] .. (cobj.toplevel and cobj.toplevel or '') .. [[ +int main() { +]] .. cobj[1] .. +[[ +return 0; +} +]] +end + +function M.c_from_lua(input) + local Parser = require 'luafish.parser' + local p = Parser() + local ast = p:parse(input) + return M.c_from_ast(ast) +end + +if ... ~= 'luafish.parser' then + local input = assert( (...) ) + + local result = M.c_from_lua({input}) + + print(result) +end + +return M + +-- Lua-To-C compiler. +-- WARNING: this is very-very preliminary. It's more of a prototype. +-- It makes many assumptions. +-- +-- example usage: +-- lua lib/luafish/lua2c.lua examples/1.lua | gcc -xc - +-- +--FIX:MORE DOCS + diff --git a/i18n_tools/luafish/macro.lua b/i18n_tools/luafish/macro.lua new file mode 100644 index 0000000000000000000000000000000000000000..1553f50758c548f9c94fcac12c97e2e246356f91 --- /dev/null +++ b/i18n_tools/luafish/macro.lua @@ -0,0 +1,898 @@ +-- luafish/macro.lua + +local LuaFishParser = require "luafish.parser" +local LuaFishSerializer = require "luafish.serializer" +local ASTNode = LuaFishParser.ASTNode + +local M = {} + +-- number type +local TNumber = {} +M.TNumber = TNumber +local TNumberMT = {} +setmetatable(TNumber, TNumberMT) +function TNumberMT:__tostring() + return 'Number[' .. tostring(self.value) .. ']' +end +function TNumber.create(ast) + local self = setmetatable({}, {__index = TNumber}) + if ast == nil then -- do nothing + elseif type(ast) == 'number' then + self.value = ast + elseif TNumber.isa(ast.stype) then + return ast.stype + elseif ast.tag == 'Number' then + local value = ast[1] + self.value = value + elseif ast.tag == 'Id' then + -- self.value not set + else + -- nothing + end + return self +end +function TNumber.bind(ast) + local mtype = TNumber.create(ast) + ast.stype = mtype + ast.typed = true + return ast +end +function TNumber.isa(obj) + local mt = getmetatable(obj) + return (mt and mt.__index == TNumber) and true or false +end +function TNumber:__neg() + --print 'neg' + local value = self.value + if value then value = - value end + --print('nv', value) + return TNumber.create(value) +end +function TNumber:__add(other) + local value1, value2 = self and self.value, other and other.value + local value; if value1 and value2 then value = value1 + value2 end + return TNumber.create(value) +end +function TNumber:__sub(other) + local value1, value2 = self and self.value, other and other.value + local value; if value1 and value2 then value = value1 - value2 end + return TNumber.create(value) +end +function TNumber:__mul(other) + local value1, value2 = self and self.value, other and other.value + local value; if value1 and value2 then value = value1 * value2 end + return TNumber.create(value) +end +function TNumber:__div(other) + local value1, value2 = self and self.value, other and other.value + local value; if value1 and value2 then value = value1 / value2 end + return TNumber.create(value) +end +function TNumber:__mod(other) + local value1, value2 = self and self.value, other and other.value + local value; if value1 and value2 then value = value1 % value2 end + return TNumber.create(value) +end +function TNumber:__pow(other) + local value1, value2 = self and self.value, other and other.value + local value; if value1 and value2 then value = value1 ^ value2 end + return TNumber.create(value) +end + +-- string type +local TString = {} +M.TString = TString +local TStringMT = {} +setmetatable(TString, TStringMT) +function TStringMT:__tostring() + return 'String[' .. tostring(self.value) .. ']' +end +function TString.create(ast) + local self = setmetatable({}, {__index = TString}) + if ast == nil then -- do nothing + elseif type(ast) == 'string' then + self.value = ast + elseif TString.isa(ast.stype) then + return ast.stype + elseif ast.tag == 'String' then + local value = ast[1] + self.value = value + elseif ast.tag == 'Id' then + -- self.value not set + else + -- nothing + end + return self +end +function TString.bind(ast) + local mtype = TString.create(ast) + ast.stype = mtype + ast.typed = true + return ast +end +function TString.isa(obj) + local mt = getmetatable(obj) + return (mt and mt.__index == TString) and true or false +end +function TString:__concat(other) + local value1, value2 = self and self.value, other and other.value + local value; if value1 and value2 then value = value1 .. value2 end + return TString.create(value) +end +--FIX-more + + +-- function type +local TFunction = {} +M.TFunction = TFunction +local TFunctionMT = {} +setmetatable(TFunction, TFunctionMT) +function TFunctionMT:__tostring() + return 'Function[' .. tostring(self.value) .. ']' +end +function TFunction.create(ast) + local self = setmetatable({}, {__index = TFunction}) + if ast == nil then -- do nothing + elseif type(ast) == 'string' then + self.value = ast + elseif TFunction.isa(ast.stype) then + return ast.stype + elseif ast.tag == 'String' then + local value = ast[1] + self.value = value + elseif ast.tag == 'Id' then + -- self.value not set + else + -- nothing + end + return self +end +function TFunction.bind(ast) + local mtype = TFunction.create(ast) + ast.stype = mtype + ast.typed = true + return ast +end +function TFunction.isa(obj) + local mt = getmetatable(obj) + return (mt and mt.__index == TFunction) and true or false +end +function TFunction.__call(obj) + --improve +end +--FIX-more + + +-- Searches for module C<name> in C<packagepath>, +-- where C<packagepath> is of the format in C<package.path>. +-- Based on search in Lua Compat. +local function locate(packagepath, name) + for pattern in packagepath:gfind("[^;]+") do + local filename = pattern:gsub("%?", name) + local f = io.open(filename) + if f then + f:close() + return filename + end + end + return nil +end + + +-- Converts a Lua value C<o> to an AST C<ast>. +-- +-- ast = object_to_ast(o) +-- +-- Note: this is only partly implemented and will assert +-- if the type of C<o> is not supported. +function M.object_to_ast(o) + if type(o) == 'string' then + return ASTNode {'String', o} + elseif type(o) == 'number' then + return ASTNode {'Number', o} + elseif o == nil then + return ASTNode {'Nil'} + elseif o == false then + return ASTNode {'False'} + elseif o == true then + return ASTNode {'True'} + elseif type(o) == 'table' then + --LIMITATION: only does numeric keys + tag since non-numeric keys can + -- be recursive + local elements = {} + elements[#elements+1] = 'Table' + if o.tag ~= nil then + elements[#elements+1] = ASTNode {'Field', M.object_to_ast 'tag', M.object_to_ast(o.tag)} + end + for k,v in ipairs(o) do + elements[#elements+1] = ASTNode {'Field', + M.object_to_ast(k), M.object_to_ast(v)} + end + return ASTNode(elements) + else + assert(false, "NOT IMPLEMENTED for " .. tostring(o)) + end +end + +--TODO-doc +function M.ast_to_object(ast) + if ast.tag == 'String' or ast.tag == 'Number' then + return ast[1] + elseif ast.tag == 'Nil' then return nil + elseif ast.tag == 'False' then return false + elseif ast.tag == 'True' then return true + else + local code = LuaFishSerializer.ast_to_code(ast) + local func = assert(loadstring('return ' .. code)) + return func() + end +end + +local is_numeric_binop = { + ['+'] = true, + ['-'] = true, + ['*'] = true, + ['/'] = true, + ['%'] = true +} +-- more? OLD? + +local binop_to_mt = { + ['+'] = '__add', + ['-'] = '__sub', + ['*'] = '__mul', + ['/'] = '__div', + ['^'] = '__pow', + ['%'] = '__mod', + ['..'] = '__concat', + ['<'] = '__lt', + ['<='] = '__le', + ['>'] = '', -- negated __le + ['>='] = '', -- negated __lt + ['=='] = '__eq', + ['~='] = '', -- negated __eq +} + +local unop_to_mt = { + ['Neg'] = '__neg', + ['#'] = '__len', +} + +local is_bool_binop = { + ['<'] = true, + ['<='] = true, + ['>'] = true, + ['>='] = true, + ['=='] = true, + ['~='] = true, +} + +-- Macro handler function for C<TYPE> macro. +-- +-- The C<TYPE> macro returns the static type of the lexical +-- C<id> as a string C<s>: +-- +-- s = TYPE(id) +-- +-- Example: +-- +-- local function f() end +-- assert(TYPE(f) == 'function') +-- +-- Note that the static type is bound to the variable +-- not the current value: +-- +-- ... +-- f = 123 -- change value of f to a number +-- assert(TYPE(f) == 'function') -- unchanged +-- +--[[UNUSED +local function macro_TYPE(ast) + assert(ast.tag == 'ExpList') + if #ast ~= 1 then error("expected one argument", 2) end + local exp_ast = ast[1] + + if exp_ast.tag == 'Id' then + local name = exp_ast[1] + local var_ast = ast.scope[name] + + if not var_ast then + error("lexical " .. tostring(name) .. " not in scope", 2) + end + + --print('TYPE', name, var_ast, var_ast.stype) + return M.object_to_ast(exp_ast.stype) + else + return M.object_to_ast(exp_ast.stype) + end +end +--]] + +local function create_compile_environment() + local env = setmetatable({}, {__index = _G}) + env.mdofile = M.dofile + env.mloadstring = M.loadstring + env.mrequire = M.require + env.MACRO = {} + return env +end + + +-- Macro handler function for C<SETTYPE> macro. +-- +-- The C<SETTYPE> macro sets the static type of the lexical +-- C<id> to the string C<s>: +-- +-- s = TYPE(id) +-- +-- Example: +-- +-- local x = 2 +-- SETTYPE(x, 'integer') +-- assert(TYPE(x) == 'integer') +-- +--[[UNUSED +local function macro_SETTYPE(ast) + --print("Set", ast) + if #ast ~= 2 then error("expected two arguments", 2) end + local id_ast, type_ast = ast[1], ast[2] + + if id_ast.tag ~= 'Id' then error("not identifier", 2) end + + local name, type = id_ast[1], type_ast[1] + --print('r', name, ast.scope[name]) + local var_ast = ast.scope[name] + if not var_ast then + error("lexical " .. name .. " not in scope", 2) + end + + --print("DEBUG:SETTYPE", name,type, var_ast) + var_ast.stype = type + return ASTNode{'Block'} -- no nothing +end +--]] + +-- Macro handler function for C<AST> macro. +-- +-- The C<AST> macro returns the AST of its argument expression C<exp>. +-- +-- ast = TOAST(<exp>) +-- +-- Example: +-- +-- local ast = TOAST(1 + 2*x) +-- assert(ast.tag == '+') +-- assert(ast[2].tag == '*') +-- +-- NOTE: possiblyu should be improved. It retuns a B<copy> +-- of the AST, without metatables set. +--[[UNUSED +local function macro_TOAST(ast) + if #ast ~= 1 then error("expected one argument", 2) end + local exp_ast = ast[1] + return 'value', M.object_to_ast(exp_ast) +end +--]] + +local function resolve(env, id_ast) + local obj_ast = id_ast + if id_ast.tag == 'Id' then + local obj_name = id_ast[1] + obj_ast = id_ast.scope[obj_name] + if not obj_ast then + if env.ONGLOBAL then + env.ONGLOBAL(obj_name) + end + end + end + if obj_ast then + return obj_ast + end +end + +local function resolve_args(env, arg_ast) + local args = {unpack(arg_ast)} + for i,v in ipairs(args) do + args[i] = resolve(env, v) + end + return args +end + +-- similar to getbinhandler in Lua Reference Manual. +local function getbinhandler (op1, op2, event) + return op1.stype and op1.stype[event] or + op2.stype and op2.stype[event] +end + +-- similar to getbinhandler but for unary op. +local function getunhandler (op1, event) + return op1.stype and op1.stype[event] +end + +local function context(ast) + return string.format("At line %d column %d", ast.nline, ast.ncol) +end + +local function mypcall(ast, caller, ...) + local status, message = pcall(caller, ...) + if not status then + error(context(ast) .. ": " .. message) + end + return message -- result value +end + +-- Walks the AST C<ast>, processing macros using macro definitions +-- C<macros>. C<macros> is a table mapping macro names to macro +-- handler functions. +-- +-- A macro handler function recieves as input an AST of the +-- expression list passed as arguments. It returns +-- an AST representing the code that replaces the macro. +-- +-- Note: the order of macro calls is depth-first search, +-- evaluating children then parents. +function M.process_macros(ast, env) + local macros = env.MACRO + + -- evaluate children + for i,v in ipairs(ast) do + if type(v) == "table" then + local is_replace, replaced = M.process_macros(v, env) + if is_replace then + ast[i] = replaced + end + end + end + + -- Evaluate compile-time expressions. + -- The order is to evalute children then parents. + + if ast.tag == 'Index' then + local obj_ast, key_ast = resolve(env, ast[1]), ast[2] + if obj_ast and obj_ast.stype and obj_ast.stype.__index then + local result_type = + mypcall(ast, obj_ast.stype.__index, obj_ast.stype, M.ast_to_object(key_ast)) + ast.stype = result_type -- may be nil + end + elseif ast.tag == 'Id' then + local macro_name = ast[1] + --print(macros.SETSQUARE,rawget(macros, 'SETSQUARE'),'ss', macro_name) + + local macro = macros[macro_name] + if macro then + local obj = {tag='Macro', macro} + obj.scope = ast.scope -- copy + obj.last = ast.last + return true, obj + end + -- otherwise, non-macro Id + elseif ast.tag == 'Call' then + local macro = ast[1] + if macro.tag == 'Macro' then -- a macro + macro = macro[1] + local arg_ast = ast[2] + local args = resolve_args(env, arg_ast) + local a,b = macro(unpack(args)) + if a == 'value' then a = M.object_to_ast(b) + elseif a == nil then a = ASTNode{'Block'}end + local res_ast = a + --print ("M", macro, macro_name, arg_ast, res_ast) + return true, res_ast + end + -- otherwise, non-macro call + + local obj_ast = resolve(env, ast[1]) + if obj_ast and obj_ast.stype then + if obj_ast.stype then + local caller = TFunction.isa(obj_ast.stype) and obj_ast.stype.__call or + type(obj_ast.stype) == 'function' and obj_ast.stype + if caller then + local args = resolve_args(env, ast[2]) + ast.stype = mypcall(ast, caller, unpack(args)) -- may be nil + else + error("not callable " .. tostring(obj_ast) .. " " .. tostring(obj_ast.stype)) + end + end + end + elseif ast.tag == 'Invoke' then + -- note: this is like an Index followed by a Call with "self" + local obj_ast = resolve(env, ast[1]) + + if obj_ast and obj_ast.stype and obj_ast.stype.__index then + local key_ast = ast[2] + local caller = + obj_ast.stype.__index(obj_ast.stype, M.ast_to_object(key_ast)) -- may be il + if caller then + local args = resolve_args(env, ast[3]) + table.insert(args, 1, obj_ast) -- self + ast.stype = mypcall(ast, caller, unpack(args)) -- may be nil + end + end + elseif ast.tag == 'String' then + ast.stype = TString.create(ast) + elseif ast.tag == 'Number' then + ast.stype = TNumber.create(ast) + elseif ast.tag == 'Nil' then + ast.stype = 'nil' -- note: 'nil' different from nil. + elseif ast.tag == 'True' or ast.tag == 'False' then + ast.stype = 'boolean' + elseif ast.tag == 'Op' then + if #ast == 2 then -- unary op + local a_ast = resolve(env, ast[2]) + local event = unop_to_mt[ast[1]] + local h = getunhandler(a_ast, event) + if h then + ast.stype = h(a_ast.stype) + else -- unknown type + if a_ast.stype then + error(tostring(ast) .. ' - operation not defined') + end + end + else -- binary op + local a_ast, b_ast = resolve(env, ast[2]), resolve(env, ast[3]) + if not a_ast or not b_ast then + if not a_ast then + print(context(ast) .. ": non-lexical ") + end + if not b_ast then + print(context(ast) .. ": non-lexical ") + end + else + if is_bool_binop[ast[1]] then + ast.stype = 'boolean' + else + local event = binop_to_mt[ast[1]] + local h = getbinhandler(a_ast, b_ast, event) + if h then + ast.stype = h(a_ast.stype, b_ast.stype) + elseif ast[1] == 'And' or ast[1] == 'Or' and + a_ast.stype == b_ast.stype then + ast.stype = a_ast.stype + elseif a_ast.stype == 'number' or b_ast.stype == 'number' then + ast.stype = 'number' + else -- unknown type + if a_ast.stype and b_ast.stype then + error(tostring(ast) .. ' - operation not defined') + end + end + end + end + end + elseif ast.tag == 'Paren' then + ast.stype = ast[1].stype + elseif ast.tag == 'Local' then + local vals_ast = ast[2] + if vals_ast then + for i=1,#vals_ast do + local val_ast = vals_ast[i] + --print(val_ast.stype) + if ast[1][i] then + ast[1][i].stype = val_ast.stype + ast[1][i].typed = val_ast.typed + end + end + end + elseif ast.tag == 'Set' then + local names_ast, vals_ast = ast[1], ast[2] + for i=1,#vals_ast do + local name_ast = resolve(env, names_ast[i]) + local val_ast = resolve(env, vals_ast[i]) + if name_ast and val_ast then + if not name_ast.typed then + name_ast.stype = val_ast.stype + -- unused: name_ast.typed = val_ast.typed + end + end + end + end +end + +-- Return a shallow copy of table t. +-- A helper function. +local function shallowcopytable(t) + local t2 = {} + for k,v in pairs(t) do t2[k] = v end + return t2 +end + +-- helper for resolve_lexical_scope. +local function helper(ast, scope, last_local) + -- note: unless this statement creates lexicals, the lexicals + -- of the next sibling will be identical to that in the current statement. + + local childscope = scope + local child_last_local = last_local + + if ast.tag == 'Local' then + local names_ast = ast[1] + scope = shallowcopytable(scope) + for i=1,#names_ast do -- new lexicals + local name_ast = names_ast[i] + local name = name_ast[1] + --print('Local', name, scope) + scope[name] = name_ast + last_local = name_ast + end + elseif ast.tag == 'Function' or ast.tag == 'FunctionDef' or ast.tag == 'LocalFunctionDef' then + local params_ast = ast.tag == 'Function' and ast[1] or ast[2] + + -- lexical function + if ast.tag == 'LocalFunctionDef' then + local funcname_ast = ast[1] + local funcname = funcname_ast[1] + scope = shallowcopytable(scope) -- new lexical + scope[funcname] = funcname_ast + last_local = funcname_ast + funcname_ast.stype = TFunction.create() + + -- link variable name of lexical function + -- to its lexical parameters (for param argument type checking) + --OLD? + funcname_ast.params_ast = params_ast + end + + -- process params + if #params_ast > 0 then + local names_ast = params_ast + childscope = shallowcopytable(scope) + for i=1,#names_ast do -- new lexicals + local name_ast = names_ast[i] + if name_ast.tag ~= 'VARARG' then + local name = name_ast[1] + childscope[name] = name_ast + child_last_local = name_ast + end + end + end + elseif ast.tag == 'Fornum' or ast.tag == 'Forin' then + local var_ast = ast[1] + local var_name = var_ast[1] + childscope = shallowcopytable(scope) + childscope[var_name] = var_ast + child_last_local = var_ast + end + + ast.scope = scope -- store scope information in AST node. + ast.last = last_local -- store last defined local in AST node. + + --print("s",scope, scope.x) + + -- handle children + local last_local = last_local + for i,v in ipairs(ast) do + if type(v) == "table" then + childscope, child_last_local + = helper(v, childscope, child_last_local) + end + end + + return scope, last_local +end + +-- Walks the AST C<ast>, setting the field "scope" on each node +-- to contain a table of visible lexicals at that point. +-- This table maps a variable name to the AST node of the identifier +-- in the variable's declaration. +-- These tables may be shared amoung AST nodes (for efficiency). +function M.resolve_lexical_scope(ast) + local scope = {} + local last_local = nil + helper(ast, scope, last_local) +end + +--[[OLD +local function check_call(args_ast, params_ast) + for i=1,#params_ast do + local param_ast = params_ast[i] + local param_name = param_ast[1] + if param_ast.stype then + --print("expectarg", param_ast.stype) + local arg_ast = args_ast[i] + if not arg_ast then + error("missing argument " .. param_name, 2) + end + if arg_ast.stype ~= param_ast.stype then + error("argument " .. param_name .. " type is " .. + tostring(arg_ast.stype) .. " but expecting " .. + param_ast.stype, 2) + end + end + end +end +--]] + +-- A replacement for C<loadstring> that processes macros. +-- +-- f, msg = loadstring(code, [, chunkname [, is_debug]]) +-- +-- This has the same form as C<loadstring> but with an +-- additional optional C<is_debug> Boolean argument +-- that if true results in a debug debug of the AST +-- and code to be printed (default false). +function M.loadstring(code, chunkname, is_debug) + local parser = LuaFishParser() + + local t = parser:parse(code) + + if is_debug then print('DEBUG[AST.IN][', t, ']') end + + local env = create_compile_environment() + + local function macro_ONCOMPILE(func_ast) + assert(func_ast.tag == 'Function') + + local func_code = LuaFishSerializer.ast_to_code(func_ast) + + local func = assert(loadstring('return ' .. func_code, + (chunkname or '') .. '(ONCOMPILE)', + is_debug)) + setfenv(func, getfenv(1)) + + func()(func_ast.scope) + + return ASTNode{'Block'} -- no nothing + end + setfenv(macro_ONCOMPILE, env) + env.MACRO.ONCOMPILE = macro_ONCOMPILE + + local function macro_REQUIRE(name_ast) + assert(name_ast.tag == 'String') + local name = name_ast[1] + + --print(name_ast.last, 'L') + + --hack + local stype + if name == 'math' then + stype = require 'luafish.math' + elseif name == 'string' then + stype = require 'luafish.string' + elseif name == '_G' then + stype = _G + else + local m = require(name) + return m.init(env) --ok? + end + + + + local result_ast = ASTNode{'Call', ASTNode{'Id', 'require'}, + ASTNode{'ExpList', ASTNode{'String', name}}} + result_ast.stype = stype + result_ast.typed = true + return result_ast + end + env.MACRO.REQUIRE = macro_REQUIRE + + local function macro_NOGLOBALS() + function env.ONGLOBAL(name) + error('global "' .. name .. '" used when globals are disabled') + end + end + env.MACRO.NOGLOBALS = macro_NOGLOBALS + + env.M = M + + M.resolve_lexical_scope(t) + + M.process_macros(t, env) + + if is_debug then print('DEBUG[AST.OUT][', t, ']') end + + -- FIX- this should return nil and error message not raise an error + local code = LuaFishSerializer.ast_to_code(t) + + if is_debug then print('DEBUG[CODE.OUT][', code, ']') end + local fh = io.open("out1", 'w') + fh:write(code) + fh:close() + return loadstring(code, chunkname, is_debug) +end + + +-- A replacement for C<dofile> that processes macros. +-- +-- ... = dofile(filename [, is_debug]) +-- +-- - filename is the file name. Type is string. +-- - is_debug is an optional Boolean indicating whether +-- debug dumps of the AST and code are printed (default false). +function M.dofile(name, is_debug) + local fh = assert(io.open(name)) + local code = fh:read'*a' + fh:close() + + local f, message = assert(M.loadstring(code, name, is_debug)) + if not f then error(message, 2) end + + return f() +end + +-- A replacement for C<loadfile> that processes macros. +-- - is_debug is an optional Boolean indicating whether +-- debug dumps of the AST and code are printed (default false). +function M.loadfile(name, is_debug) + local fh = assert(io.open(name)) + local code = fh:read'*a' + fh:close() + + local f, message = M.loadstring(code, name, is_debug) + return f, message +end + +-- A replacement for C<require> that processes macros. +-- +-- res = require(modname [, is_debug]) +-- +-- - modname is the module name. Type is string. +-- - is_debug is an optional Boolean indicating whether +-- debug dumps of the AST and code are printed (default false). +local sentinel = function() end +function M.require(name, is_debug) + local pkg = package.loaded[name] + if pkg then return pkg end + + local path = locate(package.path, name) + if path then -- macro-enabled loaded + package.loaded[name] = sentinel + local old_arg = _G.arg; _G.arg = {name} -- localize + pkg = M.dofile(path, is_debug) + _G.arg = old_arg -- restore + if pkg then + package.loaded[name] = pkg + end + if package.loaded[name] == sentinel then + package.loaded[name] = true + end + return package.loaded[name] + else + return require(name) -- fallback + end +end + +function M.loader(name) + local path = locate(package.path, name) + if path then -- macro-enabled loaded + return M.loadfile(path) + end +end + +function M.addloader() + table.insert(package.loaders, 1, M.loader) + return true +end + +return M + +--[=[ + +=NAME + +luafish.macro - macro processing support + +=SYNOPSIS + + See examples. + +=DESCRIPTION + +This module includes various utility for macro processing +on abstract syntax trees (ASTs). Built-in macros are included +for static type checking. + +=INTERFACE + +See source code. + +=STATUS + +WARNING: This is only a prototype. I am exploring various +design options. The code is not complete. + +=AUTHOR/CREDITS + +David Manura. Licensed under the same terms as Lua itself. + +--]=] + + diff --git a/i18n_tools/luafish/math.lua b/i18n_tools/luafish/math.lua new file mode 100644 index 0000000000000000000000000000000000000000..2272156e16426aca98f938ab689d9ddecb1c7937 --- /dev/null +++ b/i18n_tools/luafish/math.lua @@ -0,0 +1,137 @@ +local Macro = require "luafish.macro" +local TNumber = Macro.TNumber + +-- static type for "math" object. +local tmath = {} + +-- check range of arg a against param p +local function check_range(a, p) + if type(p) == 'table' and a.value then + local min, max = p[2], p[3] + if min == 0 and a.value < min then + return false, 'must be non-negative' + elseif min and a.value < min then + return false, 'must be no less than ' .. min + end + if max == 0 and a.value > max then + return false, 'must be non-positive' + elseif max and a.value > max then + return false, 'must be no greater than ' .. max + end + end + return true +end + +-- check range of arg a against param p +local function checkvar(a, p) + if a == nil then return true end -- unknown + if p == 'N' or type(p) == 'table' and p[1] == 'N' then + if not TNumber.isa(a) then + return false, 'must be a number' + end + local status, message = check_range(a, p) + if not status then return status, message end + elseif p == 'I' or type(p) == 'table' and p[1] == 'I' then + if not TNumber.isa(a) then + return false, 'must be an integer' + end + local status, message = check_range(a, p) + if not status then return status, message end + else + assert(false) + end + return true +end + +local function functioncheck(...) + local name = ... + local t = {select(2, ...)} -- arg types + + -- improve? + local obj = assert(loadstring('return ' .. name))() + + local nparams = 0 + for i=1,#t do + if t[i] == '->' then break end + nparams = nparams + 1 + end + + return function(...) + local n = select('#', ...) + assert(n == nparams, name .. ' expects ' .. nparams .. ' argument(s)') + local is_return = false + for i=1,n do + local a_ast = select(i, ...) + local p = t[i] + local status,message = checkvar(a_ast.stype,p) + if not status then error(name .. ' arg ' .. i .. ' ' .. message) end + -- FIX:improve to make more specific, including ranges + end + + if nparams < #t then + assert(nparams+1+1 == #t, 'NOT IMPL') + --FIX: handle multiple returns? + --print(obj, ...) + local args = {} + local is_defined = true + for i=1,n do + local a_ast = select(i, ...) + args[i] = a_ast.stype and a_ast.stype.value + if args[i] == nil then is_defined = false; break end + end + if is_defined then + return TNumber.create(obj(unpack(args))) -- fix:assumes no side effect like randomseed + end + end + end +end + +local funcs = {} + +--FIX check all these +funcs.abs = functioncheck('math.abs', 'N', '->', {'N',0,math.huge}) +funcs.acos = functioncheck('math.acos', {'N',-1,1}, '->', {'N',0,math.pi/2}) +funcs.asin = functioncheck('math.asin', {'N',-1,1}, '->', {'N',-math.pi/2,math.pi/2}) +funcs.atan = functioncheck('math.atan', {'N',-math.huge,math.huge}, '->', + {'N',-math.pi/2,math.pi/2}) +--FIX funcs.atan2 +funcs.ceil = functioncheck('math.ceil', 'N','->','I') +funcs.cos = functioncheck('math.cos', 'N','->',{'N',-1,1}) +funcs.cosh = functioncheck('math.cosh', 'N','->',{'N',1,math.huge}) +funcs.deg = functioncheck('math.deg', 'N','->','N') +funcs.exp = functioncheck('math.exp', 'N','->',{'N',0,math.huge}) +funcs.floor = functioncheck('math.floor', 'N','->','I') +funcs.fmod = functioncheck('math.fmod', 'N','N','->','N') +funcs.frexp = functioncheck('math.frexp', 'N','->',{'N',-1,1},'->','I') +funcs.huge = TNumber.create(math.huge) +funcs.ldexp = functioncheck('math.ldexp', {'N','I'},'->','N') +funcs.log = functioncheck('math.log', {'N',0,math.huge},'->','N') +funcs.log10 = functioncheck('math.log10', {'N',0,math.huge},'->','N') +function max(...) + print 'NOT IMPL' +end +function min(...) + print 'NOT IMPL' +end +funcs.modf = functioncheck('math.modf', 'N','->','I',{'N',-1,1}) +funcs.pi = TNumber.create(math.pi) +funcs.pow = functioncheck('math.pow', 'N','N','->','N') -- improve? +funcs.rad = functioncheck('math.rad', 'N','->','N') +funcs.random = function() + print 'NOT IMPL' +end +funcs.randomseed = functioncheck('math.randomseed', 'N') +funcs.sin = functioncheck('math.sin', 'N','->',{'N',-1,1}) +funcs.sinh = functioncheck('math.sinh', 'N','->','N') +funcs.sqrt = functioncheck('math.sqrt', {'N',0,math.huge},'->',math.huge) +funcs.tan = functioncheck('math.tan', 'N','->','N') -- improve? +funcs.tanh = functioncheck('math.tanh', 'N','->',{'N',-1,1}) + + +function tmath.__index(t, k) + assert(math[k], 'key ' .. tostring(k) .. ' not defined in math') + + return funcs[k] +end + +return tmath diff --git a/i18n_tools/luafish/parser.lua b/i18n_tools/luafish/parser.lua new file mode 100644 index 0000000000000000000000000000000000000000..32ff258a17a1bcf6ba86b355a059bb035bf3186a --- /dev/null +++ b/i18n_tools/luafish/parser.lua @@ -0,0 +1,633 @@ +-- luafish/parser.lua + +local lpeg = require 'lpeg' + +local C = lpeg.C +local Cc = lpeg.Cc +local Cf = lpeg.Cf +local Cg = lpeg.Cg +local Cp = lpeg.Cp +local Ct = lpeg.Ct +local P = lpeg.P +local R = lpeg.R +local S = lpeg.S +local V = lpeg.V + +local M = {}; M.__index = M + +-- AST node type. +local ASTNode = {} +function ASTNode:__tostring() + local ts = {} + ts[#ts+1] = 'tag=' .. string.format("%q", self.tag) + for i,v in ipairs(self) do + if type(v) == "string" then + ts[#ts+1] = string.format("%q", v) + else + ts[#ts+1] = tostring(v) + end + end + return '{' .. table.concat(ts, ',') .. '}' +end +setmetatable(ASTNode, {__call = function(class, t) -- constructor + if not t.tag then + t.tag = table.remove(t, 1) + end + return setmetatable(t, ASTNode) +end}) +M.ASTNode = ASTNode + + +--debug +local function short(s,i) + local small = s:sub(i, i+40) + if i+40 < #s then small = small .. "..." end + return small +end +local debug = P(function(s,i)print("DEBUG", short(s,i)) return i end) + + +--## parser handlers + +-- convert value to string, handling nested tables +local function rtostring(t) + if type(t) == "table" then + local ts = {} + for i,v in ipairs(t) do + ts[i] = rtostring(v) + end + return "{" .. table.concat(ts, ",") .. "}" + else + return string.format("%q", t) + end +end + +--## parser + +-- callback for [=[ long strings ]=] +local longstring = #(P '[[' + (P '[' * P '=' ^ 0 * P '[')) +local longstring = longstring * P(function(input, index) + local level = input:match('^%[(=*)%[', index) + if level then + local _, stop = input:find(']' .. level .. ']', index, true) + if stop then return stop + 1 end + end +end) +-- strings +local singlequoted_string = P "'" * ((1 - S "'\r\n\f\\") + (P '\\' * 1)) ^ 0 * "'" +local doublequoted_string = P '"' * ((1 - S '"\r\n\f\\') + (P '\\' * 1)) ^ 0 * '"' +local luastring = singlequoted_string + + doublequoted_string + + longstring + +-- comments +local singleline_comment = P'--' * (1 - S'\r\n\f')^0 +local multiline_comment = P'--' * longstring +local comment = multiline_comment + singleline_comment + +-- whitespace +local ws = (S('\r\n\f\t ') + comment)^1 + +local idsafe = R('AZ', 'az', '\127\255') + P '_' + +local digit = R('09') + +--TODO-check that this is ok. +local number_sign = S'+-'^-1 +local number_decimal = digit^1 +local number_hexadecimal = P'0' * S'xX' * R('09', 'AF', 'af')^1 +local number_float = (P'.' * digit^1 + + digit^1 * (P'.' * digit^0)^-1 ) * + (S'eE' * number_sign * digit^1)^-1 +local number = number_hexadecimal + number_float + number_decimal + +-- capture value and current position +local function C2(value) + return Cp() * Cc(value) +end + +local anykeyword = + P'and' + + P'break' + + P'do' + + P'elseif' + + P'else' + + P'end' + + P'false' + + P'for' + + P'function' + + P'if' + + P'in' + + P'local' + + P'nil' + + P'not' + + P'or' + + P'repeat' + + P'return' + + P'then' + + P'true' + + P'until' + + P'while' + +-- get line and column numbers from position i (1-based) in string s. +function M.get_linecol(s, i) + local nline, ncol = 1, 0 + local was_nl = false + for k=1,i do + if was_nl then + nline = nline + 1 + ncol = 0 + was_nl = false + end + if s:match('^\n', k) then + was_nl = true + end + ncol = ncol + 1 + end + return nline, ncol +end + +function M.update_linecol(s, i, i_last, nline, ncol) + i_last = i_last or 0 + nline = nline or 0 + ncol = ncol or 0 + + while i_last > i do -- reverse, go to start of previous line + repeat + i_last = i_last - 1 + until i_last == 1 or s:match('^\n',i_last) + nline = nline - 1 + ncol = 0 + end + + for k=i_last+1,i do + if k == 1 or s:match('^\n',k-1) then + nline = nline + 1 + ncol = 0 + end + ncol = ncol + 1 + end + return i, nline, ncol +end + +local function emptyfunction() end +local function Cz(p) return p / emptyfunction end -- ignore captures of pattern p + +local function build_grammar(self) + local grammar = {'chunk'} + + local name_simple = + ws^-1 * C(idsafe * (idsafe + digit)^0 - anykeyword * -idsafe) + + local name = + (C2'Id' * name_simple) + / self.handle_identifier + + local function keyword(name) return ws^-1 * P(name) * -idsafe end + + local function op(name) return ws^-1 * P(name) end + + -- capture op + local function cop(name) return ws^-1 * C(P(name)) end + + local function binop_helper(a, pos, op, b) + return self.handle_binop(pos, op, a, b) + end + + local handle = { + Index = self.handle_index, + IndexShort = self.handle_indexshort, + Call = self.handle_call, + Invoke = self.handle_invoke + } + local function accum(a, pos, op, b, ...) + if op == nil then + return a + elseif op == "Invoke" then + return accum(handle[op](pos, op, a, b, select(1, ...)), select(2, ...)) + else + return accum((handle[op] or self.handle_binop)(pos, op, a, b), ...) + end + end + + local function postfix_helper(a, pos, op, ...) + return handle[op](pos, op, a, ...) + end + + -- right associative accumulate + local function raccum(a, pos, op, b, ...) + if op == nil then + return a + else + return self.handle_binop(pos, op, a, raccum(b, ...)) + end + end + + local function handle_unrecognized(i) + error(function(s) + local nline, ncol = M.get_linecol(s, i) + return string.format("At line %d col %d unrecognized [%s]", nline, ncol, short(s,i)) + end) + end + + -- modified + grammar.chunk = ( + V'block' * ws^-1 * ((Cp() * P(1)) / handle_unrecognized)^-1 + ) / function(t) return ASTNode(t) end + + -- modified + grammar.block = ( + -- P(function(s,i) print(s:sub(i)) end) + + C2'Block' * (V'stat' * op';'^-1)^0 * (V'laststat' * op';'^-1)^-1 + ) / self.handle_block + + grammar.stat = ( + (C2'Set' * V'varlist' * op'=' * V'explist') + / self.handle_set + + V'functioncall' + + (C2'Do' * keyword'do' * V'block' * keyword'end') + / self.handle_do + + (C2'While' * keyword'while' * V'exp' * keyword'do' * + V'block' * keyword'end') + / self.handle_while + + (C2'Repeat' * keyword'repeat' * V'block' * keyword'until' * V'exp') + / self.handle_repeat + + (C2'If' * keyword'if' * V'exp' * keyword'then' * V'block' * + (keyword'elseif' * V'exp' * keyword'then' * V'block')^0 * + (keyword'else' * V'block')^-1 * + keyword'end') + / self.handle_if + + (C2'Fornum' * keyword'for' * name * op'=' * V'exp' * op',' * V'exp' * + (op',' * V'exp')^-1 * keyword'do' * V'block' * keyword'end') + / self.handle_fornum + + (C2'Forin' * keyword'for' * V'namelist' * keyword'in' * V'explist' * + keyword'do' * V'block' * keyword'end') + / self.handle_forin + + (C2'FunctionDef' * keyword'function' * V'funcname' * V'funcbody') + / self.handle_functiondef + + (C2'LocalFunctionDef' * keyword'local' * keyword'function' * name * + V'funcbody') + / self.handle_localfunctiondef + + (C2'Local' * keyword'local' * V'namelist' * (op'=' * V'explist')^-1) + / self.handle_local + ) / self.handle_stat + + grammar.laststat = + (C2'Return' * keyword'return' * V'explist'^-1) / self.handle_return + + (C2'Break' * keyword'break') / self.handle_break + + grammar.funcname = + (C2'FuncName' * name * (op'.' * name)^0 * (cop':' * name)^-1) + / self.handle_funcname + + grammar.varlist = + (C2'VarList' * V'var' * (op',' * V'var')^0) / self.handle_varlist + + -- modified. note: was left-recursive + grammar.var = + (V'prefixexp' * V'endindex') / accum + + name + + grammar.namelist = + (C2'NameList' * name * (',' * name)^0) / self.handle_namelist + + grammar.explist = + (C2'ExpList' * (V'exp' * op',')^0 * V'exp') / self.handle_explist + + --modified + -- note: exp was left-recursive in binop. + grammar.exp = + Cf(Cg(V'orfactor') * Cg(C2'Or' * keyword'or' * V'orfactor')^0, binop_helper) + + grammar.orfactor = + Cf(Cg(V'andfactor') * Cg(C2'And' * keyword'and' * V'andfactor')^0, binop_helper) + + grammar.andfactor = + Cf(Cg(V'comparefactor') * Cg(V'compareop' * V'comparefactor')^0, binop_helper) + + grammar.comparefactor = + (V'concatfactor' * (Cp() * cop'..' * V'concatfactor')^0) / raccum + + grammar.concatfactor = + Cf(Cg(V'sumfactor') * Cg(V'sumop' * V'sumfactor')^-0, binop_helper) + + grammar.sumfactor = + Cf(Cg(V'productfactor') * Cg(V'productop' * V'productfactor')^0, binop_helper) + + grammar.productfactor = + (V'unaryop' * V'productfactor') / self.handle_unop + + V'unaryfactor' + + --ok? productfactor usage allows x^-y^z + grammar.unaryfactor = + (V'term' * (Cp() * cop'^' * V'productfactor')^0) / raccum + + grammar.compareop = Cp() * ( + cop'<=' + + cop'<' + -- order important + cop'>=' + + cop'>' + -- order important + cop'~=' + + cop'==' + ) + + grammar.sumop = Cp() * ( + cop'+' + + cop'-' + ) + + grammar.productop = Cp() * ( + cop'*' + + cop'/' + + cop'%' + ) + + grammar.unaryop = Cp() * ( + Cc'Not' * keyword'not' + + cop'#' + + Cc'Neg' * op'-' + ) + + -- modified + grammar.term = + (C2'Nil' * keyword'nil') / self.handle_nil + + (C2'False' * keyword'false') / self.handle_false + + (C2'True' * keyword'true') / self.handle_true + + (C2'Number' * ws^-1 * C(number)) / self.handle_number + + (C2'String' * ws^-1 * C(luastring)) / self.handle_string + + (C2'Dots' * op'...') / self.handle_dots + + V'function' + + Cf(Cg(V'prefixexp') * Cg(V'postfix')^0, postfix_helper) + -- modified + V'tableconstructor' + + --modified + grammar.prefixexp = + name + + (C2'Paren' * op'(' * V'exp' * op')') / self.handle_paren + + --modified + grammar.postfixcall = + C2'Call' * V'args' + + C2'Invoke' * op':' * + ((C2'String' * name_simple) / self.handle_string) * V'args' + + -- modified + grammar.postfixindex = + C2'Index' * op'[' * V'exp' * op']' + + C2'IndexShort' * op'.' * ((C2'String' * name_simple) / self.handle_string) + + --modified + grammar.postfix = + V'postfixcall' + + V'postfixindex' + + --modified + grammar.endcall = + (V'postfix' * Cz(#V'postfix'))^0 * V'postfixcall' + + --modified + grammar.endindex = + (V'postfix' * Cz(#V'postfix'))^0 * V'postfixindex' + + -- modified (note: was left recusive) + grammar.functioncall = + (Cf(Cg(V'prefixexp') * Cg(V'postfix' * Cz(#V'postfix'))^0, postfix_helper) * V'postfixcall') / postfix_helper + + grammar.args = ( + op'(' * (grammar.explist + C2'ExpList' / self.handle_explist) * op')' + -- improve style? + (C2'ExpList' * V'tableconstructor') / self.handle_explist + -- improve style? + -- improve style? + (C2'ExpList' * (C2'String' * ws^-1 * C(luastring) / self.handle_string)) / + self.handle_explist + ) / self.handle_args + + grammar['function'] = ( + C2'Function' * keyword'function' * V'funcbody' + ) / self.handle_function + + grammar.funcbody = -- improve style? + op'(' * (V'parlist' + C2'NameList' / self.handle_namelist) * op')' + * V'block' * keyword'end' + + grammar.parlist = (C2'NameList' * ( + name * (',' * name)^0 + * (op',' * (C2'VARARG' * op'...') / self.handle_vararg)^-1 + + (C2'VARARG' * op'...') / self.handle_vararg + )) / self.handle_namelist + + grammar.tableconstructor = + (C2'Table' * op'{' * V'fieldlist'^-1 * op'}') / self.handle_table + + grammar.fieldlist = + V'field' * (V'fieldsep' * V'field')^0 * V'fieldsep'^-1 + + --FIX: handler call? + grammar.field = Cp() * ( + op'[' * V'exp' * op']' * op'=' * V'exp' + + ((C2'String' * name_simple) / self.handle_string * op'=' * V'exp') + + Cc(true) * V'exp' + ) + + grammar.fieldsep = + op',' + op';' + + self.grammar = grammar +end + +-- constructor +setmetatable(M, {__call = function() + local self = setmetatable({}, M) + + local function generic_handle(pos, ...) + return ASTNode {pos=pos, ...} + end + local function identity_handle(...) return ... end + local function eval_handle(pos, op, o) + if o:match("[%[%\"%\']") then + o = assert(loadstring('return ' .. o))() + end + return generic_handle(pos, op, o) + end + + self.handle_stat = function(t) + --print(rtostring(t)) + return t + end + self.handle_table = function(pos, id, ...) + local t = {pos=pos,id} + local i = 0 + local n = select('#', ...) + for k=1,n,3 do + local pos2,k,v = select(k, ...) + if k == true then + i = i + 1 + k = ASTNode{pos=pos2, 'Number', i} -- call handle_number? + end + t[#t+1] = ASTNode{pos=pos2, 'Field', k, v} + end + return ASTNode(t) + end + self.handle_number = function(pos, id, o) + return generic_handle(pos, id, tonumber(o)) + end + self.handle_string = eval_handle + self.handle_nil = generic_handle + self.handle_true = generic_handle + self.handle_false = generic_handle + self.handle_dots = generic_handle + self.handle_binop = function(pos, ...) return generic_handle(pos, 'Op', ...) end + self.handle_unop = function(pos, ...) return generic_handle(pos, 'Op', ...) end + self.handle_paren = generic_handle + self.handle_function = generic_handle + self.handle_index = generic_handle + self.handle_indexshort = + function(pos, op, ...) return generic_handle(pos, "Index", ...) end + self.handle_call = generic_handle + self.handle_invoke = generic_handle + self.handle_identifier = generic_handle + self.handle_block = generic_handle + self.handle_local = generic_handle + self.handle_localfunctiondef = generic_handle + self.handle_functiondef = generic_handle + self.handle_set = generic_handle + self.handle_do = generic_handle + self.handle_while = generic_handle + self.handle_repeat = generic_handle + self.handle_if = generic_handle + self.handle_fornum = generic_handle + self.handle_forin = generic_handle + self.handle_explist = generic_handle + self.handle_varlist = generic_handle + self.handle_namelist = generic_handle + self.handle_break = generic_handle + self.handle_return = generic_handle + self.handle_funcname = generic_handle + self.handle_vararg = generic_handle + + self.handle_args = identity_handle + + build_grammar(self) + + return self +end}) + +-- convert "pos" attribute (character position) to +-- "nline"/"ncols" attributes (line and column numbers) +-- in AST nodes. +local function mark_linecols(ast, s, linecol) + if type(ast) == "table" then + ast.nline, ast.ncol = linecol(s, ast.pos) + for i,ast2 in ipairs(ast) do + mark_linecols(ast2, s, linecol) + end + end +end + +function M:parse(o) + local text + if io.type(o) then + text = o:read"*a" + elseif o == nil then + text = io.read"*a" + elseif type(o) == "table" then + local filename = assert(o[1], "table must contain filename") + local fh = assert(io.open(filename)) + text = fh:read"*a" + fh:close() + elseif type(o) == "string" then + text = o + else + error(tostring(o) .. " not a recognized type", 2) + end + + text = text:gsub("^#[^\n]*\n", "", 1) -- remove any shebang line + --FIX: and increase line number + + self.s = text + + local ok, result = pcall(lpeg.match, self.grammar, text) + if not ok then + if type(result) == 'function' then + error(result(text)) + else + error(result) + end + end + + -- add line numbers/columns + local ipos, nline, ncol = 0 + local function linecol(s, i) + ipos, nline, ncol = M.update_linecol(s, i, ipos, nline, ncol) + return nline, ncol + end + mark_linecols(result, text, linecol) + + + return result +end + + +if ... ~= 'luafish.parser' then + + local p = M() + local result = p:parse(...) -- note: currently raises error on fail + + print('return ' .. tostring(result)) +end + + +return M + +--[=[ +=NAME + +luafish.parser - Lua 5.1 parser using LPeg. + +=SYNOPSIS + + -- command line + echo 'x=2+3*4; print(x)' | lua lib/luafish/parser.lua + (the above prints an abstract syntax tree (AST) of the given code) + + -- module usage + local Parser = require 'luafish.parser' + local p = Parser() + print(p:parse('x=2+3*4; print(x)')) + +=DESCRIPTION + +This parses Lua 5.1 source code using the Lpeg library. + +During parsing, it calls call-back functions. Those can be +overridden, but they currently build an abstract syntax tree (AST). + +=DEPENDENCIES + +This depends on + * LPeg http://www.inf.puc-rio.br/~roberto/lpeg.html + (version >= 0.9) + +=STATUS + +WARNING! This code is not fully tested. +It's complete enough to parse itself, Kepler, and the Lua 5.1 test +suite ( http://lua-users.org/lists/lua-l/2006-03/msg00716.html ). +The test suite for whether it builds correct ASTs is incomplete. +The AST nodes may change, possibly to make even more consistent with +Metalua. + +TODO: report line numbers in error messages. + +=INTERFACE + +TODO - all the AST node types should be documented. +See source code. + +=AUTHOR/CREDITS + +David Manura. Licensed under the same terms as Lua itself. + +A few of the lexing parts are based on Peter Odding's +Lua 5.1 Lpeg lexing code in http://lua-users.org/wiki/LuaGrammar . + +--]=] diff --git a/i18n_tools/luafish/run.lua b/i18n_tools/luafish/run.lua new file mode 100644 index 0000000000000000000000000000000000000000..c784aeaaf70cb5e4e9260269d7cdf1bcf8c2bd4c --- /dev/null +++ b/i18n_tools/luafish/run.lua @@ -0,0 +1,3 @@ +local macro = require 'luafish.macro' + +macro.addloader() diff --git a/i18n_tools/luafish/serializer.lua b/i18n_tools/luafish/serializer.lua new file mode 100644 index 0000000000000000000000000000000000000000..d0274cb99eb69bd1ca3666787a6e6dcacc4f91cb --- /dev/null +++ b/i18n_tools/luafish/serializer.lua @@ -0,0 +1,279 @@ +local M = {} + +local funcs = {} + +-- Convert AST into a string. +local function convert(ast) + --print(ast.tag) + return funcs[ast.tag](ast) +end + +function funcs.Block(ast) + local ts = {} + for i=1,#ast do + ts[#ts+1] = convert(ast[i]) + end + return table.concat(ts, '\n') +end + +function funcs.Set(ast) + local cnames = {} + local cvalues = {} + local names, values = ast[1], ast[2] + for i=1,#names do + cnames[#cnames+1] = convert(names[i]) + end + for i=1,#values do + cvalues[#cvalues+1] = convert(values[i]) + end + + return table.concat(cnames, ',') .. '=' .. table.concat(cvalues, ',') +end + +function funcs.Do(ast) + return 'do ' .. convert(ast[1]) .. ' end' +end + +function funcs.While(ast) + return 'while ' .. convert(ast[1]) .. ' do ' .. convert(ast[2]) .. ' end' +end + +function funcs.Repeat(ast) + return 'repeat ' .. convert(ast[1]) .. ' until ' .. convert(ast[2]) +end + +function funcs.If(ast) + local ts = {} + ts[#ts+1] = 'if ' + ts[#ts+1] = convert(ast[1]) + ts[#ts+1] = ' then ' + ts[#ts+1] = convert(ast[2]) + local i=3; while i <= #ast do + if i < #ast then + ts[#ts+1] = ' elseif ' + ts[#ts+1] = convert(ast[i]) + ts[#ts+1] = ' then ' + ts[#ts+1] = convert(ast[i+1]) + i = i + 2 + else + ts[#ts+1] = ' else ' + ts[#ts+1] = convert(ast[i]) + i = i + 1 + end + end + ts[#ts+1] = ' end' + return table.concat(ts, '') +end + +function funcs.Fornum(ast) + return 'for ' .. convert(ast[1]) .. ' = ' .. + convert(ast[2]) .. ',' .. convert(ast[3]) .. + (#ast == 5 and convert(ast[4]) or '') .. + ' do ' .. convert(ast[#ast]) .. ' end' +end + +function funcs.Forin(ast) + return 'for ' .. convert(ast[1]) .. ' in ' .. convert(ast[2]) .. + ' do ' .. convert(ast[3]) .. ' end' +end + +function funcs.FunctionDef(ast) + return 'function ' .. convert(ast[1]) .. '(' .. convert(ast[2]) .. ') ' .. + convert(ast[3]) .. ' end' +end + +function funcs.LocalFunctionDef(ast) + return 'local ' .. funcs.FunctionDef(ast) +end + +function funcs.Local(ast) + local cnames = {} + local cvalues = {} + + local names, values = ast[1], ast[2] + for i=1,#names do + cnames[#cnames+1] = convert(names[i]) + end + if values then + for i=1,#values do + cvalues[#cvalues+1] = convert(values[i]) + end + end + + return 'local ' .. table.concat(cnames, ',') .. + (values and '=' .. table.concat(cvalues, ',') or '') +end + +function funcs.Id(ast) + return ast[1] +end + +function funcs.Nil(ast) + return 'nil' +end + +function funcs.False(ast) + return 'false' +end + +function funcs.True(ast) + return 'true' +end + +function funcs.Dots(ast) + return '...' +end + +funcs.VARARG = funcs.Dots --fix: make same in parser? + +function funcs.Number(ast) + -- TODO? NaN and +-INF? + return tostring(ast[1]) +end + +function funcs.String(ast) + return string.format("%q", ast[1]) +end + + + +function funcs.Return(ast) + return 'return' .. (ast[1] and ' ' .. convert(ast[1]) or '') --FIX? if no list +end + +function funcs.Break(ast) + return 'break' +end + +function funcs.ExpList(ast) + local ts = {} + for i=1,#ast do + ts[#ts+1] = convert(ast[i]) + end + return table.concat(ts, ',') +end + +funcs.VarList = funcs.ExpList +funcs.NameList = funcs.ExpList + +local tocode = {} +tocode.Or = 'or' +tocode.And = 'and' +tocode['..'] = '..' +tocode['^'] = '^' +tocode['<='] = '<=' +tocode['<'] = '<' +tocode['>='] = '>=' +tocode['>'] = '>' +tocode['~='] = '~=' +tocode['=='] = '==' +tocode['+'] = '+' +tocode['-'] = '-' +tocode['*'] = '*' +tocode['/'] = '/' +tocode['%'] = '%' +tocode.Not = 'not' +tocode['#'] = '#' +tocode['Neg'] = '-' + +function funcs.Op(ast) + local id = ast[1] + local code = tocode[id] + if #ast == 3 then + return convert(ast[2]) .. ' ' .. code .. ' ' .. convert(ast[3]) + elseif #ast == 2 then + return code .. ' ' .. convert(ast[2]) + else assert(false) end +end + +function funcs.Paren(ast) + return '(' .. convert(ast[1]) .. ')' +end + +function funcs.Call(ast) + return convert(ast[1]) .. '(' .. convert(ast[2]) .. ')' +end + +function funcs.Invoke(ast) + return convert(ast[1]) .. ':' .. ast[2][1] .. + '(' .. convert(ast[3]) .. ')' +end + +function funcs.Index(ast) + return convert(ast[1]) .. '[' .. convert(ast[2]) .. ']' +end + +function funcs.IndexShort(ast) + return convert(ast[1]) .. '.' .. convert(ast[2]) +end + +function funcs.Function(ast) + return 'function(' .. convert(ast[1]) .. ') ' .. convert(ast[2]) .. ' end' +end + +function funcs.FuncName(ast) + local ts = {} + local has_colon = false + for i=1,#ast do + local part_ast = ast[i] + if part_ast == ':' then -- colon part follows + has_colon = true + break + end + ts[#ts+1] = convert(part_ast) + end + return table.concat(ts, '.') .. + (has_colon and ':' .. convert(ast[#ast]) or '') +end + +function funcs.Table(ast) + -- improve output style? + local ts = {} + for i=1,#ast do + local ele_ast = ast[i] + local key_ast, value_ast = ele_ast[1], ele_ast[2] + local key, value = convert(key_ast), convert(value_ast) + ts[#ts+1] = '[' .. key .. ']=' .. value + end + return '{' .. table.concat(ts,',') .. '}' +end + +function M.ast_to_code(ast) + return convert(ast) +end + +return M + +--[=[ + +=NAME + +luafish.serializer - serializes an AST to string + +=SYNOPSIS + + local S = require "luafish.serializer" + + -- execute an AST + local code = S.ast_to_code(ast) + local f = assert(loadstring(code)) + return f() + +=DESCRIPTION + +This serializes an AST to a string. This is useful if you +want to execute the AST in Lua via loadstring. + +=STATUS + +WARNING: This is not well tested. Results may be wrong. + +=INTERFACE + +See source code. + +=AUTHOR/CREDITS + +David Manura. Licensed under the same terms as Lua itself. + +--]=] diff --git a/i18n_tools/luafish/staticmodule.lua b/i18n_tools/luafish/staticmodule.lua new file mode 100644 index 0000000000000000000000000000000000000000..52a69cffe14dc6f375f137cb6fedbeb4f7a743e2 --- /dev/null +++ b/i18n_tools/luafish/staticmodule.lua @@ -0,0 +1,33 @@ +-- luafish/staticmodule.lua + +local LuaFishParser = require "luafish.parser" +local LuaFishMacro = require "luafish.macro" +local LuaFishSerializer = require "luafish.serializer" + +local function runtime(vars) + return function(code) + local ast = LuaFishParser():parse(code) + LuaFishMacro.resolve_lexical_scope(ast) + LuaFishMacro.process_macros(ast, {MACRO = vars}) + local f = assert(loadstring(LuaFishSerializer.ast_to_code(ast))) + return f() + end +end + +return runtime + +--[=[ +=NAME + +luafish.staticmodule - Supports implementing modules that + define both compile-time static types and run-time behavior. + +=DESCRIPTION + +See examples and code. + +=AUTHOR/CREDITS + +David Manura. Licensed under the same terms as Lua itsel + +--]=] \ No newline at end of file diff --git a/i18n_tools/luafish/string.lua b/i18n_tools/luafish/string.lua new file mode 100644 index 0000000000000000000000000000000000000000..3e41a9b1882dce32e086aeb95efa7bf7c89f7123 --- /dev/null +++ b/i18n_tools/luafish/string.lua @@ -0,0 +1,9 @@ +local Macro = require "luafish.macro" +local TNumber = Macro.TNumber + +-- static type for "string" object. +local tstring = {} + +--TODO + +return tstring diff --git a/i18n_tools/luafish/type.lua b/i18n_tools/luafish/type.lua new file mode 100644 index 0000000000000000000000000000000000000000..03fe35b75ae93eb913a17134db567d317696e6c0 --- /dev/null +++ b/i18n_tools/luafish/type.lua @@ -0,0 +1,26 @@ +local Parser = require "luafish.parser" +local ASTNode = assert(Parser.ASTNode) +local Macro = require "luafish.macro" + +local TNumber = Macro.TNumber +local TString = Macro.TString + +local M = {} + +function M.init(env) + function env.MACRO.TYPE(type_ast) + assert(type_ast.last) + local mtype = type_ast[1] + type_ast.last.stype = mtype + end + + function env.MACRO.TYPED(obj_ast) + obj_ast.typed = true + return obj_ast + end + + env.MACRO.NUMBER = TNumber.bind + env.MACRO.STRING = TString.bind +end + +return M