From 77c76a9d9f427e684245b346421990723420ecbe Mon Sep 17 00:00:00 2001 From: DeliveryService <64985255+sandipratamaputra@users.noreply.github.com> Date: Sun, 7 Jun 2020 12:31:55 +0700 Subject: [PATCH 1/9] Fix pathing for hidden castle door, addressing #1592 Change pathing behaviour for the furniture HIDDEN_CASTLE_DOOR, it now forbid pathing, unless forced by walking through it in direct control mode. Fix addressed for #1592 --- data_free/game_config/furniture.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/data_free/game_config/furniture.txt b/data_free/game_config/furniture.txt index cdf9f8487..00dbda5a4 100644 --- a/data_free/game_config/furniture.txt +++ b/data_free/game_config/furniture.txt @@ -1188,6 +1188,19 @@ Fx { TELEPORT_OUT } DestroyWalls BASH } + overrideMovement = true + movementSet = { + forcibleTraits = { FLY SWIM WADE WALK } + } + itemDrop = {{{{Simple "Rock"} 1 { 3 }}}} + strength2 = { + 300 BOULDER + 100 DIG + 1900 HOSTILE_DIG + 2000 HOSTILE_DIG_NO_SKILL + } + #destroyFX = { ROCK_CLOUD Rgb 200 200 200 255 } + #tryDestroyFX = { DESTROY_FURNITURE Rgb 200 200 200 255 } } "SNOW_WALL" inherit "CASTLE_WALL" { From 770bc7d18fd136a314b7be335029b7c8ee285234 Mon Sep 17 00:00:00 2001 From: DeliveryService <64985255+sandipratamaputra@users.noreply.github.com> Date: Sun, 7 Jun 2020 13:55:40 +0700 Subject: [PATCH 2/9] Changed the down stairs description, it now says "Build to go down in the z-levels." instead "Build to pass over water of lava." --- data_free/game_config/build_menu.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_free/game_config/build_menu.txt b/data_free/game_config/build_menu.txt index fdbfb09dc..fc2d81ba6 100644 --- a/data_free/game_config/build_menu.txt +++ b/data_free/game_config/build_menu.txt @@ -34,7 +34,7 @@ "Build to pass over water or lava." } { Furniture {{ "DOWN_STAIRS" } } "Down stairs" "Structure" - "Build to pass over water of lava." } + "Build to go down in the z-levels." } } "doors" From ef08d04cae477ef87669e227c91ad03f6ec497db Mon Sep 17 00:00:00 2001 From: DeliveryService <64985255+sandipratamaputra@users.noreply.github.com> Date: Sun, 7 Jun 2020 21:22:27 +0700 Subject: [PATCH 3/9] Fix addressed to #1650 Death of Evil God Adoxie has been changed to "Evil God Adoxie is put into slumber by *creature.name" added this new string after that: "Evil God Adoxie has been vanquished. May he never rise again." --- data_free/game_config/creatures.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data_free/game_config/creatures.txt b/data_free/game_config/creatures.txt index 13e989447..1e0380d79 100644 --- a/data_free/game_config/creatures.txt +++ b/data_free/game_config/creatures.txt @@ -3816,8 +3816,11 @@ } chatReactionFriendly = "\"Gaze upon my magnificence and tremble, mortal!\"" chatReactionHostile = "\"How dare you defy a GOD!\"" - deathDescription = "vanquished. May he never rise again" + deathDescription = "put into slumber" gender = IT + deathEffect = Chain { + SetFlag "EvilGodAdoxieIsKilled" true + Message "\"Evil God Adoxie has been vanquished. May he never rise again.\"" } "ADOXIE_FOOT_LEFT" { From 890632f83c341635c22f0db4a301e0e511aa3f03 Mon Sep 17 00:00:00 2001 From: DeliveryService <64985255+sandipratamaputra@users.noreply.github.com> Date: Sun, 7 Jun 2020 21:24:16 +0700 Subject: [PATCH 4/9] added missing bracket --- data_free/game_config/creatures.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/data_free/game_config/creatures.txt b/data_free/game_config/creatures.txt index 1e0380d79..0bc823bb2 100644 --- a/data_free/game_config/creatures.txt +++ b/data_free/game_config/creatures.txt @@ -3821,6 +3821,7 @@ deathEffect = Chain { SetFlag "EvilGodAdoxieIsKilled" true Message "\"Evil God Adoxie has been vanquished. May he never rise again.\"" + } } "ADOXIE_FOOT_LEFT" { From 570cc90dae2b15e6b6ea5697e3f191f199eea959 Mon Sep 17 00:00:00 2001 From: DeliveryService <64985255+sandipratamaputra@users.noreply.github.com> Date: Mon, 8 Jun 2020 23:38:21 +0700 Subject: [PATCH 5/9] Fix for death by suicide If creature name is identical to wha killed it show it has committed suicide instead of "A slayer of A killed by A slayer of A." --- message_generator.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/message_generator.cpp b/message_generator.cpp index 7f09cdabc..01da5f382 100644 --- a/message_generator.cpp +++ b/message_generator.cpp @@ -64,8 +64,14 @@ static void addThird(const Creature* c, MsgType type, const string& param) { case MsgType::BURN: msg = c->getName().the() + " burns in the " + param; unseenMsg = "You hear a horrible scream"; break; case MsgType::DROWN: msg = c->getName().the() + " drowns in the " + param; unseenMsg = "You hear a loud splash" ;break; case MsgType::SET_UP_TRAP: msg = c->getName().the() + " sets up the trap"; break; - case MsgType::KILLED_BY: msg = c->getName().the() + " is "+ - c->getAttributes().getDeathDescription() + " by " + param; break; + case MsgType::KILLED_BY: + if ((c->getName().the())compare(param) = 0) + // If creature name compared to what killed it, + // has zero difference, perform the code below. + msg = c->getName().the() + " has committed suicide."; + else + msg = c->getName().the() + " is "+ + c->getAttributes().getDeathDescription() + " by " + param; break; case MsgType::TURN: msg = c->getName().the() + " turns " + param; break; case MsgType::BECOME: msg = c->getName().the() + " becomes " + param; break; case MsgType::COPULATE: msg = c->getName().the() + " copulates " + param; break; From c0e074935a6e715d8110fd318011c2e8eb2df00a Mon Sep 17 00:00:00 2001 From: DeliveryService <64985255+sandipratamaputra@users.noreply.github.com> Date: Tue, 9 Jun 2020 00:06:14 +0700 Subject: [PATCH 6/9] Made key gui shows a bit... so players notice locking mechanism. Need new viewID called key_semi_highlight. Addressing #1646 --- gui_builder.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui_builder.cpp b/gui_builder.cpp index 5c5122a75..2bad81ca4 100644 --- a/gui_builder.cpp +++ b/gui_builder.cpp @@ -3213,7 +3213,10 @@ SGuiElem GuiBuilder::drawEquipmentAndConsumables(const PlayerInfo& minion, bool WL(button, getButtonCallback({UserInputId::CREATURE_EQUIPMENT_ACTION, EquipmentActionInfo{minion.creatureId, items[i].ids, items[i].slot, ItemAction::LOCK}})), - items[i].locked ? WL(viewObject, ViewId("key")) : WL(mouseHighlight2, WL(viewObject, ViewId("key_highlight"))), + items[i].locked ? + WL(viewObject, ViewId("key")) : + WL(viewObject, ViewId("key_semi_higlight")) : //if not locked and hovered show this ViewId instead. Else, perform code below. + WL(mouseHighlight2, WL(viewObject, ViewId("key_highlight"))), getTooltip({"Locked items won't be automatically swapped by minion."}, THIS_LINE + i) ); } From 9daf9cc8cd36db7b18791eccfb6080c8c3c8e39c Mon Sep 17 00:00:00 2001 From: DeliveryService <64985255+sandipratamaputra@users.noreply.github.com> Date: Tue, 9 Jun 2020 00:28:38 +0700 Subject: [PATCH 7/9] [Needs recheck] Changed ViewId for equipment locking mechanism. To support future graphical changes (including mod). It is now using separated viewId from other locking mechanism like doors for example. --- gui_builder.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui_builder.cpp b/gui_builder.cpp index 2bad81ca4..902f2887f 100644 --- a/gui_builder.cpp +++ b/gui_builder.cpp @@ -3214,9 +3214,11 @@ SGuiElem GuiBuilder::drawEquipmentAndConsumables(const PlayerInfo& minion, bool getButtonCallback({UserInputId::CREATURE_EQUIPMENT_ACTION, EquipmentActionInfo{minion.creatureId, items[i].ids, items[i].slot, ItemAction::LOCK}})), items[i].locked ? - WL(viewObject, ViewId("key")) : - WL(viewObject, ViewId("key_semi_higlight")) : //if not locked and hovered show this ViewId instead. Else, perform code below. - WL(mouseHighlight2, WL(viewObject, ViewId("key_highlight"))), + WL(viewObject, ViewId("gui_inventory_locked")) : + WL(mouseHighlight2, WL(viewObject, ViewId("gui_inventory_locked_highlighted")) : + !items[i].locked ? + WL(viewObject, ViewId("gui_inventory_unlocked")) : //if not locked and hovered show this ViewId instead. Else, perform code below. + WL(mouseHighlight2, WL(viewObject, ViewId("gui_inventory_unlocked_highlighted"))), getTooltip({"Locked items won't be automatically swapped by minion."}, THIS_LINE + i) ); } From 307e3335fdd6b571e588cbcf2d57369165f3f89b Mon Sep 17 00:00:00 2001 From: DeliveryService <64985255+sandipratamaputra@users.noreply.github.com> Date: Tue, 9 Jun 2020 00:42:03 +0700 Subject: [PATCH 8/9] [need test] Support view changes in equipment lock mechanism. Related issue: #1646 Equipment lock now has 4 states (supposedly). --- data_free/game_config/tiles.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data_free/game_config/tiles.txt b/data_free/game_config/tiles.txt index 2d6247a65..e83834e16 100644 --- a/data_free/game_config/tiles.txt +++ b/data_free/game_config/tiles.txt @@ -617,3 +617,8 @@ isSymbolFont = true wallShadow = true mountainSides = "mountain" background = "mountain2" } +#added for gui purposes - DeliveryService +{ "gui_equipment_locked" "*" ColorId YELLOW } +{ "gui_equipment_locked_highlighted" "*" ColorId WHITE } +{ "gui_equipment_unlocked" "*" ColorId DARK_GRAY } +{ "gui_equipment_unlocked_highlighted" "*" ColorId ALMOST_WHITE } From a927b9ed01da1b985ac091623189bec240e666d9 Mon Sep 17 00:00:00 2001 From: DeliveryService <64985255+sandipratamaputra@users.noreply.github.com> Date: Tue, 9 Jun 2020 00:57:51 +0700 Subject: [PATCH 9/9] Make tooltip displays difference in locked, and unlocked Instead of displaying the same tooltip for both making players think that they're locked, while it isn't. Since now it also shows unlocked symbol, in case they can't differentiate it. --- gui_builder.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui_builder.cpp b/gui_builder.cpp index 902f2887f..c95f8bdcd 100644 --- a/gui_builder.cpp +++ b/gui_builder.cpp @@ -3215,11 +3215,13 @@ SGuiElem GuiBuilder::drawEquipmentAndConsumables(const PlayerInfo& minion, bool EquipmentActionInfo{minion.creatureId, items[i].ids, items[i].slot, ItemAction::LOCK}})), items[i].locked ? WL(viewObject, ViewId("gui_inventory_locked")) : - WL(mouseHighlight2, WL(viewObject, ViewId("gui_inventory_locked_highlighted")) : + WL(mouseHighlight2, WL(viewObject, ViewId("gui_inventory_locked_highlighted")): !items[i].locked ? - WL(viewObject, ViewId("gui_inventory_unlocked")) : //if not locked and hovered show this ViewId instead. Else, perform code below. + WL(viewObject, ViewId("gui_inventory_unlocked")) : WL(mouseHighlight2, WL(viewObject, ViewId("gui_inventory_unlocked_highlighted"))), - getTooltip({"Locked items won't be automatically swapped by minion."}, THIS_LINE + i) + items[i].locked ? + getTooltip({"Item Locked. Locked items won't be automatically swapped by minion."}, THIS_LINE + i): + getTooltip({"Item Not Locked. Allows minions to automatically swap it."}, THIS_LINE + i) ); } itemElems.push_back(