Skip to content

Commit

Permalink
Merge pull request #555 from AntumDeluge/magic_city_chest
Browse files Browse the repository at this point in the history
Magic City Chest
  • Loading branch information
nhnb authored Oct 20, 2023
2 parents 1b8fef4 + 395b05e commit 68a10d7
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 58 deletions.
15 changes: 15 additions & 0 deletions data/conf/zones/fado.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,21 @@ Today I used an orb in the witch Jynath's house and arrived in a city of witches
<attribute name="move.continuous"/>
</portal>

<entity x="2" y="4">
<implementation
class-name="games.stendhal.server.entity.mapstuff.area.OnePlayerArea">
<parameter name="width">4</parameter>
<parameter name="height">2</parameter>
</implementation>
</entity>

<entity x="2" y="5">
<implementation
class-name="games.stendhal.server.entity.mapstuff.chest.PersonalChest">
<parameter name="slot">bank_magic</parameter>
</implementation>
</entity>

<entity x="2" y="8">
<implementation
class-name="games.stendhal.server.entity.mapstuff.area.OnePlayerArea">
Expand Down
1 change: 1 addition & 0 deletions doc/sources/graphics-tileset.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ blue_green.* Kimmo Rundelin (kiheru); CC BY-SA 3.0; Stendhal
blue_green_2.png Katie Russell (kymara); GPL 2.0+; Stendhal
caldron_sign.png Dungeon Crawl Stone Soup; CC0; https://opengameart.org/node/12210, https://crawl.develz.org/wordpress/, https://github.com/crawl/tiles
chests_banner.* Kimmo Rundelin (kiheru), Dungeon Crawl Stone Soup, Jordan Irwin (AntumDeluge); CC BY-SA 3.0; Stendhal, https://opengameart.org/node/12210, https://opengameart.org/node/79098
chests_signpost.* Kimmo Rundelin (kiheru), Dungeon Crawl Stone Soup, Jordan Irwin (AntumDeluge); CC BY-SA 3.0; Stendhal, https://opengameart.org/node/12210, https://opengameart.org/node/79098
chimney.png Kimmo Rundelin (kiheru); CC BY-SA 3.0; Stendhal
chimney_big.png Kimmo Rundelin (kiheru); CC BY-SA 3.0; Stendhal
chimney_brown_stacks.png Lanea Zimmerman (Sharm); CC BY-SA 3.0; https://lpc.opengameart.org/static/lpc-style-guide/assets.html#outdoors
Expand Down
3 changes: 2 additions & 1 deletion src/games/stendhal/server/entity/player/PlayerRPClass.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003 - Marauroa *
* (C) Copyright 2003-2023 - Marauroa *
***************************************************************************
***************************************************************************
* *
Expand Down Expand Up @@ -84,6 +84,7 @@ static void generateRPClass() {
player.addRPSlot("bank_ados", 30, Definition.HIDDEN);
player.addRPSlot("bank_deniran", 30, Definition.HIDDEN);
player.addRPSlot("bank_fado", 30, Definition.HIDDEN);
player.addRPSlot("bank_magic", 30, Definition.HIDDEN);
player.addRPSlot("bank_nalwor", 30, Definition.HIDDEN);
player.addRPSlot("zaras_chest_ados", 30, Definition.HIDDEN);

Expand Down
3 changes: 2 additions & 1 deletion src/games/stendhal/server/entity/player/UpdateConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public static Item updateItem(String name) {
public static void updatePlayerRPObject(final RPObject object) {
final String[] slotsNormal = { "bag", "rhand", "lhand", "head", "armor",
"legs", "feet", "finger", "cloak", "bank", "bank_ados", "bank_deniran",
"zaras_chest_ados", "bank_fado", "bank_nalwor", "spells",
"zaras_chest_ados", "bank_fado", "bank_magic", "bank_nalwor", "spells",
"keyring", /*"portfolio", */ "trade", "pouch" };

final String[] slotsSpecial = { "!quests", "!kills", "!buddy", "!ignore",
Expand All @@ -280,6 +280,7 @@ public static void updatePlayerRPObject(final RPObject object) {
// Port from 0.57 to 0.58: bank_ados, bank_fado
// Port from 0.58 to ?: bank_nalwor, keyring, finger
// Port from 1.29 to 1.30: bank_deniran
// Port from 1.44 to 1.45: bank_magic
for (final String slotName : slotsNormal) {
if (!object.hasSlot(slotName)) {
object.addSlot(new PlayerSlot(slotName));
Expand Down
4 changes: 3 additions & 1 deletion src/games/stendhal/server/entity/slot/Banks.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* (C) Copyright 2003-2019 - Stendhal *
* (C) Copyright 2003-2023 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -25,6 +25,8 @@ public enum Banks {
DENIRAN("bank_deniran"),
/** bank in Fado. */
FADO("bank_fado"),
/** bank in Magic City */
MAGIC("bank_magic"),
/** bank in Nalwor. */
NALWOR("bank_nalwor"),
/** mini-bank in zaras house. */
Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/maps/quests/WizardBank.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* (C) Copyright 2003-2022 - Stendhal *
* (C) Copyright 2003-2023 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand Down Expand Up @@ -255,7 +255,7 @@ protected void createDialog() {
new PlayerHasItemWithHimCondition("money", COST),
new QuestNotActiveCondition(QUEST_SLOT)),
ConversationStates.IDLE,
"Semos, Nalwor and Fado bank chests are to my right. The chests owned by Deniran and Ados Bank Merchants and your friend Zara are to my left. If you are finished before your time here is done, please say #leave.",
"Semos, Nalwor, Fado and Magic City bank chests are to my right. The chests owned by Deniran and Ados Bank Merchants and your friend Zara are to my left. If you are finished before your time here is done, please say #leave.",
new MultipleActions(
new DropItemAction("money", COST),
new TeleportAction(ZONE_NAME, 10, 10, Direction.DOWN),
Expand Down
13 changes: 12 additions & 1 deletion src/games/stendhal/server/script/DumpDeletionCandidates.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/***************************************************************************
* (C) Copyright 2012-2023 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* 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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.script;

import java.io.IOException;
Expand Down Expand Up @@ -44,7 +55,7 @@ private void dumpObject(RPObject object) {
StringBuilder items = new StringBuilder();
final String[] slotsItems = { "bag", "rhand", "lhand", "head", "armor",
"legs", "feet", "finger", "cloak", "keyring", "trade",
"bank", "bank_ados", "bank_deniran", "bank_fado", "bank_nalwor", "zaras_chest_ados"};
"bank", "bank_ados", "bank_deniran", "bank_fado", "bank_magic", "bank_nalwor", "zaras_chest_ados"};

for (final String slotName : slotsItems) {
final RPSlot slot = object.getSlot(slotName);
Expand Down
6 changes: 3 additions & 3 deletions tests/games/stendhal/server/maps/quests/WizardBankTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
* (C) Copyright 2003-2023 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand Down Expand Up @@ -138,7 +138,7 @@ public void testHiAndBye() {

assertTrue(en.step(player, "yes"));
assertEquals(ConversationStates.IDLE, en.getCurrentState());
assertEquals("Semos, Nalwor and Fado bank chests are to my right. The chests owned by Deniran and Ados Bank Merchants and your friend Zara are to my left. If you are finished before your time here is done, please say #leave.", getReply(npc));
assertEquals("Semos, Nalwor, Fado and Magic City bank chests are to my right. The chests owned by Deniran and Ados Bank Merchants and your friend Zara are to my left. If you are finished before your time here is done, please say #leave.", getReply(npc));
}

/**
Expand Down Expand Up @@ -237,7 +237,7 @@ public void testDoQuest() {
assertTrue(npc.isTalking());

assertTrue(en.step(player, "yes"));
assertEquals("Semos, Nalwor and Fado bank chests are to my right. The chests owned by Deniran and Ados Bank Merchants and your friend Zara are to my left. If you are finished before your time here is done, please say #leave.", getReply(npc));
assertEquals("Semos, Nalwor, Fado and Magic City bank chests are to my right. The chests owned by Deniran and Ados Bank Merchants and your friend Zara are to my left. If you are finished before your time here is done, please say #leave.", getReply(npc));
assertEquals(ConversationStates.IDLE, en.getCurrentState());
assertTrue(player.hasQuest(QUEST_SLOT));

Expand Down
93 changes: 44 additions & 49 deletions tiled/interiors/magic/bank.tmx
Original file line number Diff line number Diff line change
@@ -1,85 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map SYSTEM "http://mapeditor.org/dtd/1.0/map.dtd">
<map version="1.0" orientation="orthogonal" width="30" height="20" tilewidth="32" tileheight="32">
<tileset firstgid="1" name="int_wall_pale.png" tilewidth="32" tileheight="32">
<image source="../../tileset/building/wall/int_wall_pale.png" trans="ff00ff"/>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="30" height="20" tilewidth="32" tileheight="32" infinite="0" nextlayerid="8" nextobjectid="1">
<tileset firstgid="1" name="int_wall_pale.png" tilewidth="32" tileheight="32" tilecount="16" columns="2">
<image source="../../tileset/building/wall/int_wall_pale.png" trans="ff00ff" width="64" height="256"/>
</tileset>
<tileset firstgid="17" name="int_wall_purple.png" tilewidth="32" tileheight="32">
<image source="../../tileset/building/wall/int_wall_purple.png" trans="ff00ff"/>
<tileset firstgid="17" name="int_wall_purple.png" tilewidth="32" tileheight="32" tilecount="20" columns="2">
<image source="../../tileset/building/wall/int_wall_purple.png" trans="ff00ff" width="64" height="320"/>
</tileset>
<tileset firstgid="37" name="carpets_2.png" tilewidth="32" tileheight="32">
<image source="../../tileset/furniture/carpet/carpets_2.png" trans="ff00ff"/>
<tileset firstgid="37" name="carpets_2.png" tilewidth="32" tileheight="32" tilecount="20" columns="4">
<image source="../../tileset/furniture/carpet/carpets_2.png" trans="ff00ff" width="128" height="160"/>
</tileset>
<tileset firstgid="49" name="pale_red_ns.png" tilewidth="32" tileheight="32">
<image source="../../tileset/building/entrance/pale_red_ns.png" trans="ff00ff"/>
<tileset firstgid="57" name="pale_red_ns.png" tilewidth="32" tileheight="32" tilecount="36" columns="9">
<image source="../../tileset/building/entrance/pale_red_ns.png" trans="ff00ff" width="288" height="128"/>
</tileset>
<tileset firstgid="85" name="fence_wooden.png" tilewidth="32" tileheight="32">
<image source="../../tileset/building/fence/fence_wooden.png"/>
<tileset firstgid="93" name="fence_wooden.png" tilewidth="32" tileheight="32" tilecount="12" columns="3">
<image source="../../tileset/building/fence/fence_wooden.png" width="96" height="128"/>
</tileset>
<tileset firstgid="97" name="small.png" tilewidth="32" tileheight="32">
<image source="../../tileset/item/chest/small.png" trans="ff00ff"/>
<tileset firstgid="105" name="small.png" tilewidth="32" tileheight="32" tilecount="2" columns="1">
<image source="../../tileset/item/chest/small.png" trans="ff00ff" width="32" height="64"/>
</tileset>
<tileset firstgid="99" name="painted.png" tilewidth="32" tileheight="32">
<image source="../../tileset/building/window/painted.png"/>
<tileset firstgid="107" name="painted.png" tilewidth="32" tileheight="32" tilecount="1" columns="1">
<image source="../../tileset/building/window/painted.png" width="32" height="32"/>
</tileset>
<tileset firstgid="100" name="book.png" tilewidth="32" tileheight="32">
<image source="../../tileset/item/documents/book.png"/>
<tileset firstgid="108" name="book.png" tilewidth="32" tileheight="32" tilecount="4" columns="2">
<image source="../../tileset/item/documents/book.png" width="64" height="64"/>
</tileset>
<tileset firstgid="104" name="collision.png" tilewidth="32" tileheight="32">
<image source="../../tileset/logic/collision.png"/>
<tileset firstgid="112" name="collision.png" tilewidth="32" tileheight="32" tilecount="1" columns="1">
<image source="../../tileset/logic/collision.png" width="32" height="32"/>
</tileset>
<tileset firstgid="105" name="protection.png" tilewidth="32" tileheight="32">
<image source="../../tileset/logic/protection.png"/>
<tileset firstgid="113" name="protection.png" tilewidth="32" tileheight="32" tilecount="2" columns="2">
<image source="../../tileset/logic/protection.png" width="64" height="32"/>
</tileset>
<tileset firstgid="107" name="table" tilewidth="32" tileheight="32">
<image source="../../tileset/furniture/table/wooden_rectangular.png"/>
<tileset firstgid="115" name="table" tilewidth="32" tileheight="32" tilecount="9" columns="3">
<image source="../../tileset/furniture/table/wooden_rectangular.png" width="96" height="96"/>
</tileset>
<tileset firstgid="116" name="chest" tilewidth="32" tileheight="32">
<image source="../../tileset/item/chest/large.png"/>
<tileset firstgid="124" name="chest" tilewidth="32" tileheight="32" tilecount="8" columns="4">
<image source="../../tileset/item/chest/large.png" width="128" height="64"/>
</tileset>
<tileset firstgid="124" name="banners" tilewidth="32" tileheight="32">
<image source="../../tileset/building/decoration/chests_banner.png"/>
<tileset firstgid="132" name="banners" tilewidth="32" tileheight="32" tilecount="7" columns="1">
<image source="../../tileset/building/decoration/chests_banner.png" width="32" height="224"/>
</tileset>
<layer name="0_floor" width="30" height="20">
<tileset firstgid="139" name="chests_signpost" tilewidth="32" tileheight="32" tilecount="7" columns="1">
<image source="../../tileset/building/decoration/chests_signpost.png" width="32" height="224"/>
</tileset>
<layer id="1" name="0_floor" width="30" height="20">
<data encoding="base64" compression="gzip">
H4sIAAAAAAAAAONhYGBgojPmBmIWIJYBYgk6YWkgZobaKwbEBnTCoqP20t1eKSAWR8JKVLRHEc1s
SSR70dOzChXtVWYYTc+j8Tsav6PxO/zilxhsCMRGQGxMoj5Y/HIBMSMZ2AqIrYHYhgy9nEAMANgK
7JRgCQAA
H4sIAAAAAAAAA+NhYGBgojPmBmIWIJYBYgk6YWkgZobaKwbEBnTCoqP20t1eKSAWR8JKVLRHEc1sSSR70dOzChXtVWYYTc+j8Tsav6PxO/zilxhsCcRWQGxNoj5Y/HIBMSMZ2AmInYHYhQy9nEAMAC7tlSRgCQAA
</data>
</layer>
<layer name="1_terrain" width="30" height="20">
<layer id="2" name="1_terrain" width="30" height="20">
<data encoding="base64" compression="gzip">
H4sIAAAAAAAAAGNgGAX0BBVAXAllVwFxNRY12UCcgwfnoqlHNgfZfFJBHhDn48EFZJpLiZsGwtxR
MAqoAdDzMXq+pTZIAuJEBsx8XAAVT6KRvaFAHIYHh9PI3ggC8rGj9lIFxBOQT6CRvcMBAACoG9yL
YAkAAA==
H4sIAAAAAAAAA2NgGAX0BA1A3AjEPUDcBMTNWNQUA3EJHlyKph7ZHJj55IAyIC7HgyvINJdWoIGBfL+OglFAa4Cej9HzLbVBFhBnMmDm4wqoeBaN7I0F4jg8OJ5G9iYQkE8dtZcqIJ2AfAaN7B0OAACP+/h0YAkAAA==
</data>
</layer>
<layer name="2_object" width="30" height="20">
<layer id="3" name="2_object" width="30" height="20">
<data encoding="base64" compression="gzip">
H4sIAAAAAAAAAGNggIBkBlRAiI8LUMuckQ5SgDiVCLFRMDhBDQ3MbKKBmaOAPFBHAzPraWDmKCAP
NNDAzEYamDkKBjcAAMDyFP5gCQAA
H4sIAAAAAAAAA2NggIBsBlRAiI8LUMuckQ5ygDiXCLFRMDhBCw3M7KKBmaOAPNBGAzPbaWDmKCAPdNDAzE4amDkKBjcAAJj1mGtgCQAA
</data>
</layer>
<layer name="3_roof" width="30" height="20">
<layer id="4" name="3_roof" width="30" height="20">
<data encoding="base64" compression="gzip">
H4sIAAAAAAAAAGNgGJmgBIhLoewyIC6ngpnI5iCbP1gArdw0GP06CkbBKBgFo2AUDCQAAIAG+Nxg
CQAA
H4sIAAAAAAAAA2NgGJmgBohroew6IK6ngpnI5iCbP9zBSPLrKBgFo2AUjIJRQAwAAMEsxgdgCQAA
</data>
</layer>
<layer name="objects" width="30" height="20">
<layer id="5" name="objects" width="30" height="20">
<data encoding="base64" compression="gzip">
H4sIAAAAAAAAAO3BMQEAAADCoPVPbQlPoAAAeBoqs0udYAkAAA==
H4sIAAAAAAAAA+3BMQEAAADCoPVPbQlPoAAAeBoqs0udYAkAAA==
</data>
</layer>
<layer name="collision" width="30" height="20" visible="0" opacity="0.22">
<layer id="6" name="collision" width="30" height="20" opacity="0.22">
<data encoding="base64" compression="gzip">
H4sIAAAAAAAAAMtgYGDIGIGYXgCf/bjcQqr7sZlJjn+pEW6k+JNSQIy/qW33QKWzwZqeB8reoRC/
pKinhv9olX8Hwl5i9BMT/uS4dSDsJQaQYy8hdwyUveRgaplDTwwAiETSYWAJAAA=
H4sIAAAAAAAAAytgYGAoGIGYXoAct5CqB1mMEv9SI9zoGc7E+Jva7hiodDZY0/NA2TsU4pcU9dTw30DlX1rYS4x+YsKfHLcOhL3EAHLsJeSOgbKXHEwtc+iJAdsBG0tgCQAA
</data>
</layer>
<layer name="protection" width="30" height="20" visible="0" opacity="0.2">
<layer id="7" name="protection" width="30" height="20" visible="0" opacity="0.2">
<data encoding="base64" compression="gzip">
H4sIAAAAAAAAAMtkYGDIHMWjeBSP4lE8ikfxKB7FVMMAbLXyOWAJAAA=
H4sIAAAAAAAAAytkYGAoHMWjeBSP4lE8ikfxKB7FVMMAZM7wa2AJAAA=
</data>
</layer>
</map>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit 68a10d7

Please sign in to comment.