diff --git a/ChangeLog b/ChangeLog index 1eb68a81a..e0d790c1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-02-12 Nicolas Weeger + * darcap/darcap/manor.ground: Add gates, make Politos dialog Python-based. + * darcap/darcap/manor.treasure: Shrink map, add more rewards. + * darcap/darcap/manor.white: Use less evil monsters. + * python/maps/darcap/manor.py: Complete the script for the reward and Politos's dialog. + 2021-02-11 Nicolas Weeger * styles/monsterstyles/nethack/nethack_13, * styles/monsterstyles/nethack/nethack_14, diff --git a/darcap/darcap/manor.ground b/darcap/darcap/manor.ground index dc8ca94f3..a7b71430c 100644 --- a/darcap/darcap/manor.ground +++ b/darcap/darcap/manor.ground @@ -3,9 +3,11 @@ name Darcap's Manor region darcap width 20 height 20 +enter_x 9 +enter_y 17 msg Created: 2010-10-10 Nicolas Weeger -Modified: 2012-01-29 Rick Tanner +Modified: 2021-02-12 Nicolas Weeger endmsg end arch grass_only @@ -461,6 +463,11 @@ arch tile_shop x 4 y 6 end +arch igate_closed_1 +x 4 +y 6 +connected 1 +end arch tile_shop x 4 y 7 @@ -496,6 +503,10 @@ arch tile_shop x 4 y 13 end +arch igate_closed_1 +x 4 +y 13 +end arch tile_shop x 4 y 14 @@ -867,7 +878,7 @@ end arch stair_up_1 name manor.treasure slaying manor.treasure -hp 8 +hp 4 sp 1 x 8 y 3 @@ -888,6 +899,10 @@ arch tile_shop x 8 y 7 end +arch dungeon_magic +x 8 +y 8 +end arch tile_shop x 8 y 8 @@ -897,6 +912,10 @@ x 8 y 8 move_block all end +arch dungeon_magic +x 8 +y 9 +end arch tile_shop x 8 y 9 @@ -906,6 +925,10 @@ x 8 y 9 move_block all end +arch dungeon_magic +x 8 +y 10 +end arch tile_shop x 8 y 10 @@ -915,6 +938,10 @@ x 8 y 10 move_block all end +arch dungeon_magic +x 8 +y 11 +end arch tile_shop x 8 y 11 @@ -987,7 +1014,7 @@ end arch stair_up_1 name manor.treasure slaying manor.treasure -hp 9 +hp 5 sp 1 x 9 y 3 @@ -1008,6 +1035,10 @@ arch tile_shop x 9 y 7 end +arch dungeon_magic +x 9 +y 8 +end arch tile_shop x 9 y 8 @@ -1025,24 +1056,26 @@ arch a_townsman3 name Politos msg @match * -*************************** -Note: This is a work in progress. Only one reward for now, even though all keys are required. -*************************** - - Hello, welcome to Darcap's manor! -If you want to get a treasure from upstairs, you need to find three keys: blue, white, brown. - -You can get one from each of the corners of this room, provided you are strong or smart enough, of course. +Unfortunately, the manor is currently closed for maintenance. endmsg x 9 y 9 +arch event_say +name politos +title Python +slaying /python/maps/darcap/manor.py +end end arch tile_shop x 9 y 10 end +arch dungeon_magic +x 9 +y 11 +end arch tile_shop x 9 y 11 @@ -1119,7 +1152,7 @@ end arch stair_up_1 name manor.treasure slaying manor.treasure -hp 10 +hp 6 sp 1 x 10 y 3 @@ -1140,6 +1173,10 @@ arch tile_shop x 10 y 7 end +arch dungeon_magic +x 10 +y 8 +end arch tile_shop x 10 y 8 @@ -1157,6 +1194,15 @@ arch tile_shop x 10 y 10 end +arch button_lever +x 10 +y 10 +connected 1 +end +arch dungeon_magic +x 10 +y 11 +end arch tile_shop x 10 y 11 @@ -1233,7 +1279,7 @@ end arch stair_up_1 name manor.treasure slaying manor.treasure -hp 11 +hp 7 sp 1 x 11 y 3 @@ -1254,6 +1300,10 @@ arch tile_shop x 11 y 7 end +arch dungeon_magic +x 11 +y 8 +end arch tile_shop x 11 y 8 @@ -1263,6 +1313,10 @@ x 11 y 8 move_block all end +arch dungeon_magic +x 11 +y 9 +end arch tile_shop x 11 y 9 @@ -1272,6 +1326,10 @@ x 11 y 9 move_block all end +arch dungeon_magic +x 11 +y 10 +end arch tile_shop x 11 y 10 @@ -1281,6 +1339,10 @@ x 11 y 10 move_block all end +arch dungeon_magic +x 11 +y 11 +end arch tile_shop x 11 y 11 @@ -1682,6 +1744,11 @@ arch tile_shop x 15 y 6 end +arch igate_closed_1 +x 15 +y 6 +connected 1 +end arch tile_shop x 15 y 7 @@ -1717,6 +1784,11 @@ arch tile_shop x 15 y 13 end +arch igate_closed_1 +x 15 +y 13 +connected 1 +end arch tile_shop x 15 y 14 diff --git a/darcap/darcap/manor.treasure b/darcap/darcap/manor.treasure index c730b02bc..8637513e7 100644 --- a/darcap/darcap/manor.treasure +++ b/darcap/darcap/manor.treasure @@ -1,11 +1,13 @@ arch map name Darcap's Manor - treasure room region darcap -width 20 -height 22 +width 13 +height 21 +enter_x 4 +enter_y 1 msg Created: 2010-10-10 Nicolas Weeger -Modified: 2012-01-29 Rick Tanner +Modified: 2021-02-12 Nicolas Weeger endmsg end arch tile_shop @@ -129,14 +131,8 @@ end arch tile_shop y 20 end -arch flagstone_2_1_1 -y 20 -end -arch tile_shop -y 21 -end arch flagstone_2_2_1 -y 21 +y 20 end arch tile_shop x 1 @@ -212,50 +208,54 @@ arch tile_shop x 1 y 14 end +arch dwall_1_4 +x 1 +y 14 +end arch tile_shop x 1 y 15 end +arch amethyst +x 1 +y 15 +nrof 20 +end arch tile_shop x 1 y 16 end +arch dwall_1_4 +x 1 +y 16 +end arch tile_shop x 1 y 17 end +arch power_crystal +x 1 +y 17 +end arch tile_shop x 1 y 18 end +arch dwall_1_4 +x 1 +y 18 +end arch tile_shop x 1 y 19 end -arch swall_1_4 -x 1 -y 19 -end arch tile_shop x 1 y 20 end -arch igate_open_2 -x 1 -y 20 -connected 100 -end -arch boulder -x 1 -y 20 -end -arch tile_shop -x 1 -y 21 -end arch flagstone_2_1_2 x 1 -y 21 +y 20 end arch tile_shop x 2 @@ -331,845 +331,181 @@ arch tile_shop x 2 y 14 end -arch tile_shop +arch dwall_1_3 x 2 -y 15 -end -arch tile_shop -x 2 -y 16 -end -arch tile_shop -x 2 -y 17 -end -arch tile_shop -x 2 -y 18 -end -arch tile_shop -x 2 -y 19 -end -arch swall_2_1_2 -x 2 -y 19 -end -arch button_trigger -x 2 -y 20 -connected 101 -end -arch tile_shop -x 2 -y 20 -end -arch igate_open_2 -x 2 -y 20 -connected 101 -end -arch tile_shop -x 2 -y 21 -end -arch flagstone_2_1_2 -x 2 -y 21 -end -arch tile_shop -x 3 -end -arch flagstone_2_1_2 -x 3 -end -arch tile_shop -x 3 -y 1 -end -arch tile_shop -x 3 -y 2 -end -arch tile_shop -x 3 -y 3 -end -arch tile_shop -x 3 -y 4 -end -arch cwall_2_1_2 -x 3 -y 4 -end -arch tile_shop -x 3 -y 5 -end -arch tile_shop -x 3 -y 6 -end -arch tile_shop -x 3 -y 7 -end -arch tile_shop -x 3 -y 8 -end -arch cwall_2_1_2 -x 3 -y 8 -end -arch tile_shop -x 3 -y 9 -end -arch tile_shop -x 3 -y 10 -end -arch tile_shop -x 3 -y 11 -end -arch tile_shop -x 3 -y 12 -end -arch cwall_2_1_2 -x 3 -y 12 -end -arch tile_shop -x 3 -y 13 -end -arch swall_1_1 -x 3 -y 13 -end -arch tile_shop -x 3 y 14 end -arch swall_1_2 -x 3 -y 14 -end -arch tile_shop -x 3 -y 15 -end -arch grate_closed_2 -x 3 -y 15 -end arch dungeon_magic -x 3 +x 2 y 15 end arch tile_shop -x 3 -y 16 +x 2 +y 15 end -arch swall_1_1 -x 3 -y 16 -end -arch tile_shop -x 3 -y 17 -end -arch swall_2_1_1 -x 3 -y 17 -end -arch tile_shop -x 3 -y 18 -end -arch swall_3_2 -x 3 -y 18 -end -arch tile_shop -x 3 -y 19 -end -arch swall_3_1 -x 3 -y 19 -end -arch button_trigger -x 3 -y 20 -connected 102 -end -arch tile_shop -x 3 -y 20 -end -arch igate_open_2 -x 3 -y 20 -connected 102 -end -arch tile_shop -x 3 -y 21 -end -arch flagstone_2_1_2 -x 3 -y 21 -end -arch tile_shop -x 4 -end -arch flagstone_2_1_2 -x 4 -end -arch tile_shop -x 4 -y 1 -end -arch tile_shop -x 4 -y 2 -end -arch tile_shop -x 4 -y 3 -end -arch tile_shop -x 4 -y 4 -end -arch cwall_2_1_2 -x 4 -y 4 -end -arch tile_shop -x 4 -y 5 -end -arch tile_shop -x 4 -y 6 -end -arch tile_shop -x 4 -y 7 -end -arch tile_shop -x 4 -y 8 -end -arch cwall_2_1_2 -x 4 -y 8 -end -arch tile_shop -x 4 -y 9 -end -arch tile_shop -x 4 -y 10 -end -arch tile_shop -x 4 -y 11 -end -arch tile_shop -x 4 -y 12 -end -arch cwall_2_1_2 -x 4 -y 12 -end -arch tile_shop -x 4 -y 13 -end -arch tile_shop -x 4 -y 14 -end -arch tile_shop -x 4 +arch igate_closed_2 +x 2 y 15 end arch tile_shop -x 4 +x 2 y 16 end -arch grate_closed_1 -x 4 +arch dwall_1_3 +x 2 y 16 end arch dungeon_magic -x 4 -y 16 -end -arch tile_shop -x 4 +x 2 y 17 end arch tile_shop -x 4 +x 2 +y 17 +end +arch igate_closed_2 +x 2 +y 17 +end +arch tile_shop +x 2 y 18 end -arch swall_3_3 -x 4 +arch dwall_2_2_3 +x 2 y 18 end arch tile_shop -x 4 +x 2 y 19 end -arch swall_3_1 -x 4 +arch dwall_1_2 +x 2 y 19 end -arch button_trigger -x 4 -y 20 -connected 103 -end arch tile_shop -x 4 +x 2 y 20 end -arch igate_open_2 -x 4 -y 20 -connected 103 -end -arch tile_shop -x 4 -y 21 -end arch flagstone_2_1_2 -x 4 -y 21 +x 2 +y 20 end arch tile_shop -x 5 +x 3 end arch flagstone_2_1_2 -x 5 +x 3 end arch tile_shop -x 5 +x 3 y 1 end arch tile_shop -x 5 +x 3 y 2 end arch tile_shop -x 5 +x 3 y 3 end arch tile_shop -x 5 -y 4 -end -arch cwall_2_1_2 -x 5 -y 4 -end -arch tile_shop -x 5 -y 5 -end -arch tile_shop -x 5 -y 6 -end -arch tile_shop -x 5 -y 7 -end -arch tile_shop -x 5 -y 8 -end -arch cwall_2_1_2 -x 5 -y 8 -end -arch tile_shop -x 5 -y 9 -end -arch tile_shop -x 5 -y 10 -end -arch tile_shop -x 5 -y 11 -end -arch tile_shop -x 5 -y 12 -end -arch cwall_2_1_2 -x 5 -y 12 -end -arch tile_shop -x 5 -y 13 -end -arch tile_shop -x 5 -y 14 -end -arch tile_shop -x 5 -y 15 -end -arch tile_shop -x 5 -y 16 -end -arch swall_1_1 -x 5 -y 16 -end -arch tile_shop -x 5 -y 17 -end -arch swall_2_1_1 -x 5 -y 17 -end -arch tile_shop -x 5 -y 18 -end -arch swall_4 -x 5 -y 18 -end -arch tile_shop -x 5 -y 19 -end -arch swall_3_1 -x 5 -y 19 -end -arch button_trigger -x 5 -y 20 -connected 104 -end -arch tile_shop -x 5 -y 20 -end -arch igate_open_2 -x 5 -y 20 -connected 104 -end -arch tile_shop -x 5 -y 21 -end -arch flagstone_2_1_2 -x 5 -y 21 -end -arch tile_shop -x 6 -end -arch flagstone_2_1_2 -x 6 -end -arch tile_shop -x 6 -y 1 -end -arch tile_shop -x 6 -y 2 -end -arch tile_shop -x 6 -y 3 -end -arch tile_shop -x 6 -y 4 -end -arch cwall_2_1_2 -x 6 -y 4 -end -arch tile_shop -x 6 -y 5 -end -arch tile_shop -x 6 -y 6 -end -arch tile_shop -x 6 -y 7 -end -arch tile_shop -x 6 -y 8 -end -arch cwall_2_1_2 -x 6 -y 8 -end -arch tile_shop -x 6 -y 9 -end -arch tile_shop -x 6 -y 10 -end -arch tile_shop -x 6 -y 11 -end -arch tile_shop -x 6 -y 12 -end -arch cwall_2_1_2 -x 6 -y 12 -end -arch tile_shop -x 6 -y 13 -end -arch tile_shop -x 6 -y 14 -end -arch tile_shop -x 6 -y 15 -end -arch tile_shop -x 6 -y 16 -end -arch grate_closed_1 -x 6 -y 16 -end -arch dungeon_magic -x 6 -y 16 -end -arch tile_shop -x 6 -y 17 -end -arch tile_shop -x 6 -y 18 -end -arch swall_3_3 -x 6 -y 18 -end -arch tile_shop -x 6 -y 19 -end -arch swall_3_1 -x 6 -y 19 -end -arch button_trigger -x 6 -y 20 -connected 105 -end -arch tile_shop -x 6 -y 20 -end -arch igate_open_2 -x 6 -y 20 -connected 105 -end -arch tile_shop -x 6 -y 21 -end -arch flagstone_2_1_2 -x 6 -y 21 -end -arch tile_shop -x 7 -end -arch flagstone_2_1_2 -x 7 -end -arch tile_shop -x 7 -y 1 -end -arch tile_shop -x 7 -y 2 -end -arch tile_shop -x 7 -y 3 -end -arch tile_shop -x 7 -y 4 -end -arch cwall_2_1_2 -x 7 -y 4 -end -arch tile_shop -x 7 -y 5 -end -arch tile_shop -x 7 -y 6 -end -arch tile_shop -x 7 -y 7 -end -arch tile_shop -x 7 -y 8 -end -arch cwall_2_1_2 -x 7 -y 8 -end -arch tile_shop -x 7 -y 9 -end -arch tile_shop -x 7 -y 10 -end -arch tile_shop -x 7 -y 11 -end -arch tile_shop -x 7 -y 12 -end -arch cwall_2_1_2 -x 7 -y 12 -end -arch tile_shop -x 7 -y 13 -end -arch tile_shop -x 7 -y 14 -end -arch button_lever -name get your reward! -x 7 -y 14 -connected 100 -end -arch tile_shop -x 7 -y 15 -end -arch tile_shop -x 7 -y 16 -end -arch swall_1_1 -x 7 -y 16 -end -arch tile_shop -x 7 -y 17 -end -arch swall_2_1_1 -x 7 -y 17 -end -arch tile_shop -x 7 -y 18 -end -arch swall_4 -x 7 -y 18 -end -arch tile_shop -x 7 -y 19 -end -arch swall_3_1 -x 7 -y 19 -end -arch button_trigger -x 7 -y 20 -connected 106 -end -arch tile_shop -x 7 -y 20 -end -arch igate_open_2 -x 7 -y 20 -connected 106 -end -arch tile_shop -x 7 -y 21 -end -arch flagstone_2_1_2 -x 7 -y 21 -end -arch tile_shop -x 8 -end -arch flagstone_2_1_2 -x 8 -end -arch tile_shop -x 8 -y 1 -end -arch stair_down_1 -name down -slaying manor.ground -hp 8 -sp 3 -x 8 -y 1 -end -arch tile_shop -x 8 -y 2 -end -arch tile_shop -x 8 -y 3 -end -arch tile_shop -x 8 +x 3 y 4 end arch cwall_mural_end_1_1 -x 8 +x 3 y 4 end arch tile_shop -x 8 +x 3 y 5 end arch tile_shop -x 8 +x 3 y 6 end arch tile_shop -x 8 +x 3 y 7 end arch tile_shop -x 8 +x 3 y 8 end arch cwall_mural_end_1_1 -x 8 +x 3 y 8 end arch tile_shop -x 8 +x 3 y 9 end arch tile_shop -x 8 +x 3 y 10 end arch tile_shop -x 8 +x 3 y 11 end arch tile_shop -x 8 +x 3 y 12 end arch cwall_mural_end_1_1 -x 8 +x 3 y 12 end arch tile_shop -x 8 +x 3 y 13 end arch tile_shop -x 8 +x 3 y 14 end -arch tile_shop -x 8 +arch dungeon_magic +x 3 y 15 end arch tile_shop -x 8 -y 16 +x 3 +y 15 end -arch grate_closed_1 -x 8 -y 16 -end -arch dungeon_magic -x 8 +arch tile_shop +x 3 y 16 end arch tile_shop -x 8 +x 3 y 17 end +arch dungeon_magic +x 3 +y 18 +end +arch tile_shop +x 3 +y 18 +end +arch igate_closed_1 +x 3 +y 18 +end +arch tile_shop +x 3 +y 19 +end arch lead -name strange potion -name_pl strange potions +name potion from Darcap's Manor +name_pl strange potions from Darcap's Manor msg -This potion is from Darcap's Manor. You wonder what it is used for. +This potion is from Darcap's Manor. You wonder what it is used for. Maybe you can ask Politos about it. endmsg face potionwis.111 -x 8 -y 17 +x 3 +y 19 material 0 identified 1 arch event_stop @@ -1179,51 +515,143 @@ slaying /python/maps/darcap/manor.py end end arch tile_shop -x 8 +x 3 +y 20 +end +arch flagstone_2_1_2 +x 3 +y 20 +end +arch tile_shop +x 4 +end +arch flagstone_2_1_2 +x 4 +end +arch tile_shop +x 4 +y 1 +end +arch stair_down_1 +name down +slaying manor.ground +hp 8 +sp 3 +x 4 +y 1 +end +arch tile_shop +x 4 +y 2 +end +arch tile_shop +x 4 +y 3 +end +arch tile_shop +x 4 +y 4 +end +arch cwall_mural_1_1 +x 4 +y 4 +end +arch tile_shop +x 4 +y 5 +end +arch tile_shop +x 4 +y 6 +end +arch tile_shop +x 4 +y 7 +end +arch tile_shop +x 4 +y 8 +end +arch cwall_mural_1_1 +x 4 +y 8 +end +arch tile_shop +x 4 +y 9 +end +arch tile_shop +x 4 +y 10 +end +arch tile_shop +x 4 +y 11 +end +arch tile_shop +x 4 +y 12 +end +arch cwall_mural_1_1 +x 4 +y 12 +end +arch tile_shop +x 4 +y 13 +end +arch tile_shop +x 4 +y 14 +end +arch tile_shop +x 4 +y 15 +end +arch dungeon_magic +x 4 +y 16 +end +arch tile_shop +x 4 +y 16 +end +arch tile_shop +x 4 +y 17 +end +arch tile_shop +x 4 y 18 end -arch swall_3_3 -x 8 +arch dwall_1_1 +x 4 y 18 end arch tile_shop -x 8 +x 4 y 19 end -arch swall_3_1 -x 8 +arch dwall_1_2 +x 4 y 19 end -arch button_trigger -x 8 -y 20 -connected 107 -end arch tile_shop -x 8 +x 4 y 20 end -arch igate_open_2 -x 8 -y 20 -connected 107 -end -arch tile_shop -x 8 -y 21 -end arch flagstone_2_1_2 -x 8 -y 21 +x 4 +y 20 end arch tile_shop -x 9 +x 5 end arch flagstone_2_1_2 -x 9 +x 5 end arch tile_shop -x 9 +x 5 y 1 end arch stair_down_1 @@ -1231,139 +659,127 @@ name down slaying manor.ground hp 9 sp 3 -x 9 +x 5 y 1 end arch tile_shop -x 9 +x 5 y 2 end arch tile_shop -x 9 +x 5 y 3 end arch tile_shop -x 9 +x 5 y 4 end -arch cwall_mural_1_1 -x 9 +arch cwall_mural_1_2 +x 5 y 4 end arch tile_shop -x 9 +x 5 y 5 end arch tile_shop -x 9 +x 5 y 6 end arch tile_shop -x 9 +x 5 y 7 end arch tile_shop -x 9 +x 5 y 8 end -arch cwall_mural_1_1 -x 9 +arch cwall_mural_1_2 +x 5 y 8 end arch tile_shop -x 9 +x 5 y 9 end arch tile_shop -x 9 +x 5 y 10 end arch tile_shop -x 9 +x 5 y 11 end arch tile_shop -x 9 +x 5 y 12 end -arch cwall_mural_1_1 -x 9 +arch cwall_mural_1_2 +x 5 y 12 end arch tile_shop -x 9 +x 5 y 13 end arch tile_shop -x 9 +x 5 y 14 end arch tile_shop -x 9 +x 5 y 15 end arch tile_shop -x 9 -y 16 -end -arch swall_1_1 -x 9 +x 5 y 16 end arch tile_shop -x 9 +x 5 y 17 end -arch swall_2_1_1 -x 9 -y 17 -end -arch tile_shop -x 9 -y 18 -end -arch swall_4 -x 9 +arch dungeon_magic +x 5 y 18 end arch tile_shop -x 9 +x 5 +y 18 +end +arch igate_closed_1 +x 5 +y 18 +end +arch tile_shop +x 5 y 19 end -arch swall_2_2_4 -x 9 +arch scroll_new +x 5 y 19 +nrof 10 +level 1 +identified 1 +startequip 1 +arch spell_town_portal end -arch button_trigger -x 9 -y 20 -connected 108 end arch tile_shop -x 9 +x 5 y 20 end -arch igate_open_2 -x 9 -y 20 -connected 108 -end -arch tile_shop -x 9 -y 21 -end arch flagstone_2_1_2 -x 9 -y 21 +x 5 +y 20 end arch tile_shop -x 10 +x 6 end arch flagstone_2_1_2 -x 10 +x 6 end arch tile_shop -x 10 +x 6 y 1 end arch stair_down_1 @@ -1371,150 +787,136 @@ name down slaying manor.ground hp 10 sp 3 -x 10 +x 6 y 1 end arch tile_shop -x 10 +x 6 y 2 end arch tile_shop -x 10 +x 6 y 3 end arch tile_shop -x 10 +x 6 y 4 end -arch cwall_mural_1_2 -x 10 +arch cwall_mural_end_1_2 +x 6 y 4 end arch tile_shop -x 10 +x 6 y 5 end arch tile_shop -x 10 +x 6 y 6 end arch tile_shop -x 10 +x 6 y 7 end arch tile_shop -x 10 +x 6 y 8 end -arch cwall_mural_1_2 -x 10 +arch cwall_mural_end_1_2 +x 6 y 8 end arch tile_shop -x 10 +x 6 y 9 end arch tile_shop -x 10 +x 6 y 10 end arch tile_shop -x 10 +x 6 y 11 end arch tile_shop -x 10 +x 6 y 12 end -arch cwall_mural_1_2 -x 10 +arch cwall_mural_end_1_2 +x 6 y 12 end arch tile_shop -x 10 +x 6 y 13 end arch tile_shop -x 10 +x 6 y 14 end arch tile_shop -x 10 +x 6 y 15 end -arch tile_shop -x 10 -y 16 +arch button_lever +name get your reward! +x 6 +y 15 +arch event_apply +name reward +title Python +slaying /python/maps/darcap/manor.py +end +arch event_timer +name reward +title Python +slaying /python/maps/darcap/manor.py end -arch grate_closed_1 -x 10 -y 16 -connected 204 end arch dungeon_magic -x 10 +x 6 y 16 end arch tile_shop -x 10 +x 6 +y 16 +end +arch tile_shop +x 6 y 17 end -arch scroll_new -x 10 -y 17 -nrof 10 -level 1 -arch spell_town_portal -end -end arch tile_shop -x 10 +x 6 y 18 end -arch swall_2_1_2 -x 10 +arch dwall_1_1 +x 6 y 18 end -arch button_plate -x 10 -y 19 -weight 1 -connected 204 -end arch tile_shop -x 10 +x 6 y 19 end -arch button_trigger -x 10 -y 20 -connected 109 +arch dwall_1_2 +x 6 +y 19 end arch tile_shop -x 10 +x 6 y 20 end -arch igate_open_2 -x 10 -y 20 -connected 109 -end -arch tile_shop -x 10 -y 21 -end arch flagstone_2_1_2 -x 10 -y 21 +x 6 +y 20 end arch tile_shop -x 11 +x 7 end arch flagstone_2_1_2 -x 11 +x 7 end arch tile_shop -x 11 +x 7 y 1 end arch stair_down_1 @@ -1522,1140 +924,782 @@ name down slaying manor.ground hp 11 sp 3 -x 11 +x 7 y 1 end arch tile_shop -x 11 +x 7 y 2 end arch tile_shop -x 11 +x 7 y 3 end arch tile_shop -x 11 +x 7 y 4 end -arch cwall_mural_end_1_2 -x 11 +arch cwall_1_3 +x 7 y 4 end arch tile_shop -x 11 +x 7 y 5 end arch tile_shop -x 11 +x 7 y 6 end arch tile_shop -x 11 +x 7 y 7 end arch tile_shop -x 11 +x 7 y 8 end -arch cwall_mural_end_1_2 -x 11 +arch cwall_1_3 +x 7 y 8 end arch tile_shop -x 11 +x 7 y 9 end arch tile_shop -x 11 +x 7 y 10 end arch tile_shop -x 11 +x 7 y 11 end arch tile_shop -x 11 +x 7 y 12 end -arch cwall_mural_end_1_2 -x 11 +arch cwall_1_3 +x 7 y 12 end arch tile_shop -x 11 +x 7 y 13 end arch tile_shop -x 11 +x 7 y 14 end arch tile_shop -x 11 +x 7 y 15 end arch tile_shop -x 11 -y 16 -end -arch swall_1_1 -x 11 +x 7 y 16 end arch tile_shop -x 11 +x 7 y 17 end -arch swall_2_1_1 -x 11 -y 17 -end -arch tile_shop -x 11 -y 18 -end -arch swall_4 -x 11 -y 18 -end -arch tile_shop -x 11 -y 19 -end -arch swall_2_1_1 -x 11 -y 19 -end -arch tile_shop -x 11 -y 20 -end -arch swall_1_2 -x 11 -y 20 -end -arch tile_shop -x 11 -y 21 -end -arch flagstone_2_1_2 -x 11 -y 21 -end -arch tile_shop -x 12 -end -arch flagstone_2_1_2 -x 12 -end -arch tile_shop -x 12 -y 1 -end -arch tile_shop -x 12 -y 2 -end -arch tile_shop -x 12 -y 3 -end -arch tile_shop -x 12 -y 4 -end -arch cwall_2_1_2 -x 12 -y 4 -end -arch tile_shop -x 12 -y 5 -end -arch tile_shop -x 12 -y 6 -end -arch tile_shop -x 12 -y 7 -end -arch tile_shop -x 12 -y 8 -end -arch cwall_2_1_2 -x 12 -y 8 -end -arch tile_shop -x 12 -y 9 -end -arch tile_shop -x 12 -y 10 -end -arch tile_shop -x 12 -y 11 -end -arch tile_shop -x 12 -y 12 -end -arch cwall_2_1_2 -x 12 -y 12 -end -arch tile_shop -x 12 -y 13 -end -arch tile_shop -x 12 -y 14 -end -arch tile_shop -x 12 -y 15 -end -arch tile_shop -x 12 -y 16 -end -arch grate_closed_1 -x 12 -y 16 -end arch dungeon_magic -x 12 -y 16 -end -arch tile_shop -x 12 -y 17 -end -arch tile_shop -x 12 -y 18 -end -arch swall_2_1_2 -x 12 +x 7 y 18 end arch tile_shop -x 12 +x 7 +y 18 +end +arch igate_closed_1 +x 7 +y 18 +end +arch tile_shop +x 7 +y 19 +end +arch lunar_shield +x 7 y 19 end arch tile_shop -x 12 +x 7 +y 20 +end +arch flagstone_2_1_2 +x 7 y 20 end arch tile_shop -x 12 -y 21 +x 8 end arch flagstone_2_1_2 -x 12 -y 21 +x 8 end arch tile_shop -x 13 -end -arch flagstone_2_1_2 -x 13 -end -arch tile_shop -x 13 +x 8 y 1 end arch tile_shop -x 13 +x 8 y 2 end arch tile_shop -x 13 +x 8 y 3 end arch tile_shop -x 13 -y 4 -end -arch cwall_2_1_2 -x 13 -y 4 -end -arch tile_shop -x 13 -y 5 -end -arch tile_shop -x 13 -y 6 -end -arch tile_shop -x 13 -y 7 -end -arch tile_shop -x 13 -y 8 -end -arch cwall_2_1_2 -x 13 -y 8 -end -arch tile_shop -x 13 -y 9 -end -arch tile_shop -x 13 -y 10 -end -arch tile_shop -x 13 -y 11 -end -arch tile_shop -x 13 -y 12 -end -arch cwall_2_1_2 -x 13 -y 12 -end -arch tile_shop -x 13 -y 13 -end -arch tile_shop -x 13 -y 14 -end -arch tile_shop -x 13 -y 15 -end -arch tile_shop -x 13 -y 16 -end -arch swall_1_1 -x 13 -y 16 -end -arch tile_shop -x 13 -y 17 -end -arch swall_2_1_1 -x 13 -y 17 -end -arch tile_shop -x 13 -y 18 -end -arch swall_2_2_4 -x 13 -y 18 -end -arch tile_shop -x 13 -y 19 -end -arch tile_shop -x 13 -y 20 -end -arch tile_shop -x 13 -y 21 -end -arch flagstone_2_1_2 -x 13 -y 21 -end -arch tile_shop -x 14 -end -arch flagstone_2_1_2 -x 14 -end -arch tile_shop -x 14 -y 1 -end -arch tile_shop -x 14 -y 2 -end -arch tile_shop -x 14 -y 3 -end -arch tile_shop -x 14 -y 4 -end -arch cwall_1_3 -x 14 -y 4 -end -arch tile_shop -x 14 -y 5 -end -arch tile_shop -x 14 -y 6 -end -arch tile_shop -x 14 -y 7 -end -arch tile_shop -x 14 -y 8 -end -arch cwall_1_3 -x 14 -y 8 -end -arch tile_shop -x 14 -y 9 -end -arch tile_shop -x 14 -y 10 -end -arch tile_shop -x 14 -y 11 -end -arch tile_shop -x 14 -y 12 -end -arch cwall_1_3 -x 14 -y 12 -end -arch tile_shop -x 14 -y 13 -end -arch tile_shop -x 14 -y 14 -end -arch tile_shop -x 14 -y 15 -end -arch tile_shop -x 14 -y 16 -end -arch grate_closed_1 -x 14 -y 16 -end -arch dungeon_magic -x 14 -y 16 -end -arch tile_shop -x 14 -y 17 -end -arch tile_shop -x 14 -y 18 -end -arch tile_shop -x 14 -y 19 -end -arch tile_shop -x 14 -y 20 -end -arch tile_shop -x 14 -y 21 -end -arch flagstone_2_1_2 -x 14 -y 21 -end -arch tile_shop -x 15 -end -arch flagstone_2_1_2 -x 15 -end -arch tile_shop -x 15 -y 1 -end -arch tile_shop -x 15 -y 2 -end -arch tile_shop -x 15 -y 3 -end -arch tile_shop -x 15 +x 8 y 4 end arch locked_blue_door1 slaying darcap_manor_blue -x 15 +x 8 y 4 end arch dungeon_magic -x 15 +x 8 y 4 end arch tile_shop -x 15 +x 8 y 5 end arch tile_shop -x 15 +x 8 y 6 end arch tile_shop -x 15 +x 8 y 7 end arch tile_shop -x 15 +x 8 y 8 end arch locked_door1 slaying darcap_manor_brown -x 15 +x 8 y 8 end arch dungeon_magic -x 15 +x 8 y 8 end arch tile_shop -x 15 +x 8 y 9 end arch tile_shop -x 15 +x 8 y 10 end arch tile_shop -x 15 +x 8 y 11 end arch tile_shop -x 15 +x 8 y 12 end arch locked_white_door1 slaying darcap_manor_white -x 15 +x 8 y 12 end arch dungeon_magic -x 15 +x 8 y 12 end arch tile_shop -x 15 +x 8 y 13 end arch tile_shop -x 15 +x 8 y 14 end arch tile_shop -x 15 +x 8 y 15 end -arch tile_shop -x 15 -y 16 -end -arch swall_1_1 -x 15 +arch dungeon_magic +x 8 y 16 end arch tile_shop -x 15 -y 17 +x 8 +y 16 end -arch swall_2_1_1 -x 15 +arch tile_shop +x 8 y 17 end arch tile_shop -x 15 +x 8 y 18 end -arch swall_1_2 -x 15 +arch dwall_1_1 +x 8 y 18 end arch tile_shop -x 15 +x 8 +y 19 +end +arch dwall_1_2 +x 8 y 19 end arch tile_shop -x 15 +x 8 +y 20 +end +arch flagstone_2_1_2 +x 8 y 20 end arch tile_shop -x 15 -y 21 +x 9 end arch flagstone_2_1_2 -x 15 -y 21 +x 9 end arch tile_shop -x 16 -end -arch flagstone_2_1_2 -x 16 -end -arch tile_shop -x 16 +x 9 y 1 end arch tile_shop -x 16 +x 9 y 2 end arch tile_shop -x 16 +x 9 y 3 end arch tile_shop -x 16 +x 9 y 4 end arch locked_blue_door1 slaying darcap_manor_blue -x 16 +x 9 y 4 end arch dungeon_magic -x 16 +x 9 y 4 end arch tile_shop -x 16 +x 9 y 5 end arch tile_shop -x 16 +x 9 y 6 end arch tile_shop -x 16 +x 9 y 7 end arch tile_shop -x 16 +x 9 y 8 end arch locked_door1 slaying darcap_manor_brown -x 16 +x 9 y 8 end arch dungeon_magic -x 16 +x 9 y 8 end arch tile_shop -x 16 +x 9 y 9 end arch tile_shop -x 16 +x 9 y 10 end arch tile_shop -x 16 +x 9 y 11 end arch tile_shop -x 16 +x 9 y 12 end arch locked_white_door1 slaying darcap_manor_white -x 16 +x 9 y 12 end arch dungeon_magic -x 16 +x 9 y 12 end arch tile_shop -x 16 +x 9 y 13 end arch tile_shop -x 16 +x 9 y 14 end arch tile_shop -x 16 +x 9 y 15 end arch tile_shop -x 16 -y 16 -end -arch grate_closed_1 -x 16 -y 16 -end -arch dungeon_magic -x 16 +x 9 y 16 end arch tile_shop -x 16 +x 9 y 17 end arch tile_shop -x 16 +x 9 y 18 end arch tile_shop -x 16 +x 9 y 19 end arch tile_shop -x 16 +x 9 +y 20 +end +arch flagstone_2_1_2 +x 9 y 20 end arch tile_shop -x 16 -y 21 +x 10 end arch flagstone_2_1_2 -x 16 -y 21 +x 10 end arch tile_shop -x 17 -end -arch flagstone_2_1_2 -x 17 -end -arch tile_shop -x 17 +x 10 y 1 end arch tile_shop -x 17 +x 10 y 2 end arch tile_shop -x 17 +x 10 y 3 end arch tile_shop -x 17 +x 10 y 4 end arch cwall_1_4 -x 17 +x 10 y 4 end arch tile_shop -x 17 +x 10 y 5 end arch tile_shop -x 17 +x 10 y 6 end arch tile_shop -x 17 +x 10 y 7 end arch tile_shop -x 17 +x 10 y 8 end arch cwall_1_4 -x 17 +x 10 y 8 end arch tile_shop -x 17 +x 10 y 9 end arch tile_shop -x 17 +x 10 y 10 end arch tile_shop -x 17 +x 10 y 11 end arch tile_shop -x 17 +x 10 y 12 end arch cwall_1_4 -x 17 +x 10 y 12 end arch tile_shop -x 17 +x 10 y 13 end arch tile_shop -x 17 +x 10 y 14 end -arch tile_shop -x 17 +arch dwall_1_4 +x 10 +y 14 +end +arch dungeon_magic +x 10 y 15 end arch tile_shop -x 17 -y 16 -end -arch swall_1_1 -x 17 -y 16 -end -arch tile_shop -x 17 -y 17 -end -arch swall_2_1_1 -x 17 -y 17 -end -arch tile_shop -x 17 -y 18 -end -arch swall_1_2 -x 17 -y 18 -end -arch tile_shop -x 17 -y 19 -end -arch tile_shop -x 17 -y 20 -end -arch tile_shop -x 17 -y 21 -end -arch flagstone_2_1_2 -x 17 -y 21 -end -arch tile_shop -x 18 -end -arch flagstone_2_1_2 -x 18 -end -arch tile_shop -x 18 -y 1 -end -arch tile_shop -x 18 -y 2 -end -arch tile_shop -x 18 -y 3 -end -arch tile_shop -x 18 -y 4 -end -arch cwall_1_3 -x 18 -y 4 -end -arch tile_shop -x 18 -y 5 -end -arch tile_shop -x 18 -y 6 -end -arch tile_shop -x 18 -y 7 -end -arch tile_shop -x 18 -y 8 -end -arch cwall_1_3 -x 18 -y 8 -end -arch tile_shop -x 18 -y 9 -end -arch tile_shop -x 18 -y 10 -end -arch tile_shop -x 18 -y 11 -end -arch tile_shop -x 18 -y 12 -end -arch cwall_1_3 -x 18 -y 12 -end -arch tile_shop -x 18 -y 13 -end -arch tile_shop -x 18 -y 14 -end -arch tile_shop -x 18 +x 10 y 15 end -arch tile_shop -x 18 +arch igate_closed_2 +x 10 +y 15 +end +arch dungeon_magic +x 10 y 16 end -arch grate_closed_1 -x 18 +arch tile_shop +x 10 +y 16 +end +arch dwall_1_4 +x 10 y 16 end arch dungeon_magic -x 18 -y 16 -end -arch tile_shop -x 18 +x 10 y 17 end arch tile_shop -x 18 +x 10 +y 17 +end +arch igate_closed_2 +x 10 +y 17 +end +arch tile_shop +x 10 +y 18 +end +arch dwall_2_2_2 +x 10 y 18 end arch tile_shop -x 18 +x 10 +y 19 +end +arch dwall_1_2 +x 10 y 19 end arch tile_shop -x 18 +x 10 +y 20 +end +arch flagstone_2_1_2 +x 10 y 20 end arch tile_shop -x 18 -y 21 +x 11 end arch flagstone_2_1_2 -x 18 -y 21 +x 11 end arch tile_shop -x 19 +x 11 +y 1 +end +arch tile_shop +x 11 +y 2 +end +arch tile_shop +x 11 +y 3 +end +arch tile_shop +x 11 +y 4 +end +arch cwall_1_3 +x 11 +y 4 +end +arch tile_shop +x 11 +y 5 +end +arch tile_shop +x 11 +y 6 +end +arch tile_shop +x 11 +y 7 +end +arch tile_shop +x 11 +y 8 +end +arch cwall_1_3 +x 11 +y 8 +end +arch tile_shop +x 11 +y 9 +end +arch tile_shop +x 11 +y 10 +end +arch tile_shop +x 11 +y 11 +end +arch tile_shop +x 11 +y 12 +end +arch cwall_1_3 +x 11 +y 12 +end +arch tile_shop +x 11 +y 13 +end +arch tile_shop +x 11 +y 14 +end +arch dwall_1_3 +x 11 +y 14 +end +arch tile_shop +x 11 +y 15 +end +arch wizard_gloves +x 11 +y 15 +end +arch tile_shop +x 11 +y 16 +end +arch dwall_1_3 +x 11 +y 16 +end +arch tile_shop +x 11 +y 17 +end +arch black_dragon_mail +x 11 +y 17 +end +arch tile_shop +x 11 +y 18 +end +arch dwall_1_3 +x 11 +y 18 +end +arch tile_shop +x 11 +y 19 +end +arch tile_shop +x 11 +y 20 +end +arch flagstone_2_1_2 +x 11 +y 20 +end +arch tile_shop +x 12 end arch flagstone_2_2_3 -x 19 +x 12 end arch tile_shop -x 19 +x 12 y 1 end arch flagstone_2_1_1 -x 19 +x 12 y 1 end arch tile_shop -x 19 +x 12 y 2 end arch flagstone_2_1_1 -x 19 +x 12 y 2 end arch tile_shop -x 19 +x 12 y 3 end arch flagstone_2_1_1 -x 19 +x 12 y 3 end arch tile_shop -x 19 +x 12 y 4 end arch flagstone_2_1_1 -x 19 +x 12 y 4 end arch tile_shop -x 19 +x 12 y 5 end arch flagstone_2_1_1 -x 19 +x 12 y 5 end arch tile_shop -x 19 +x 12 y 6 end arch flagstone_2_1_1 -x 19 +x 12 y 6 end arch tile_shop -x 19 +x 12 y 7 end arch flagstone_2_1_1 -x 19 +x 12 y 7 end arch tile_shop -x 19 +x 12 y 8 end arch flagstone_2_1_1 -x 19 +x 12 y 8 end arch tile_shop -x 19 +x 12 y 9 end arch flagstone_2_1_1 -x 19 +x 12 y 9 end arch tile_shop -x 19 +x 12 y 10 end arch flagstone_2_1_1 -x 19 +x 12 y 10 end arch tile_shop -x 19 +x 12 y 11 end arch flagstone_2_1_1 -x 19 +x 12 y 11 end arch tile_shop -x 19 +x 12 y 12 end arch flagstone_2_1_1 -x 19 +x 12 y 12 end arch tile_shop -x 19 +x 12 y 13 end arch flagstone_2_1_1 -x 19 +x 12 y 13 end arch tile_shop -x 19 +x 12 y 14 end arch flagstone_2_1_1 -x 19 +x 12 y 14 end arch tile_shop -x 19 +x 12 y 15 end arch flagstone_2_1_1 -x 19 +x 12 y 15 end arch tile_shop -x 19 +x 12 y 16 end arch flagstone_2_1_1 -x 19 +x 12 y 16 end arch tile_shop -x 19 +x 12 y 17 end arch flagstone_2_1_1 -x 19 +x 12 y 17 end arch tile_shop -x 19 +x 12 y 18 end arch flagstone_2_1_1 -x 19 +x 12 y 18 end arch tile_shop -x 19 +x 12 y 19 end arch flagstone_2_1_1 -x 19 +x 12 y 19 end arch tile_shop -x 19 +x 12 y 20 end -arch flagstone_2_1_1 -x 19 -y 20 -end -arch tile_shop -x 19 -y 21 -end arch flagstone_2_2_4 -x 19 -y 21 +x 12 +y 20 end diff --git a/darcap/darcap/manor.white b/darcap/darcap/manor.white index a41759100..dd71501e4 100644 --- a/darcap/darcap/manor.white +++ b/darcap/darcap/manor.white @@ -4,9 +4,11 @@ difficulty 40 region darcap width 40 height 30 +enter_x 28 +enter_y 28 msg Created: 2010-10-17 Nicolas Weeger -Modified: 2012-03-21 Rick Tanner +Modified: 2021-02-12 Nicolas Weeger endmsg end arch tile_shop @@ -593,6 +595,10 @@ arch tile_shop x 3 y 7 end +arch g_worm +x 3 +y 7 +end arch tile_shop x 3 y 8 @@ -784,10 +790,6 @@ arch tile_shop x 4 y 9 end -arch gryphon -x 4 -y 9 -end arch tile_shop x 4 y 10 @@ -1087,10 +1089,6 @@ arch tile_shop x 6 y 7 end -arch archon -x 6 -y 7 -end arch tile_shop x 6 y 8 @@ -1099,6 +1097,10 @@ arch tile_shop x 6 y 9 end +arch g_worm +x 6 +y 9 +end arch tile_shop x 6 y 10 @@ -2115,6 +2117,10 @@ arch tile_shop x 12 y 2 end +arch living_chaos +x 12 +y 2 +end arch tile_shop x 12 y 3 @@ -2266,22 +2272,18 @@ arch tile_shop x 13 y 3 end -arch s_mastif -x 13 -y 3 -end arch tile_shop x 13 y 4 end -arch s_mastif -x 13 -y 4 -end arch tile_shop x 13 y 5 end +arch living_chaos +x 13 +y 5 +end arch tile_shop x 13 y 6 @@ -2563,10 +2565,6 @@ arch tile_shop x 15 y 1 end -arch s_mastif -x 15 -y 1 -end arch tile_shop x 15 y 2 @@ -2733,6 +2731,10 @@ arch tile_shop x 16 y 3 end +arch living_chaos +x 16 +y 3 +end arch tile_shop x 16 y 4 @@ -2902,10 +2904,6 @@ arch tile_shop x 17 y 4 end -arch s_mastif -x 17 -y 4 -end arch tile_shop x 17 y 5 @@ -2914,10 +2912,6 @@ arch tile_shop x 17 y 6 end -arch s_mastif -x 17 -y 6 -end arch tile_shop x 17 y 7 @@ -3678,6 +3672,10 @@ arch tile_shop x 21 y 5 end +arch leech +x 21 +y 5 +end arch tile_shop x 21 y 6 @@ -4010,6 +4008,10 @@ arch tile_shop x 23 y 3 end +arch leech +x 23 +y 3 +end arch tile_shop x 23 y 4 @@ -4050,10 +4052,6 @@ arch tile_shop x 23 y 9 end -arch s_wyvern -x 23 -y 9 -end arch tile_shop x 23 y 10 @@ -4220,6 +4218,10 @@ arch tile_shop x 24 y 9 end +arch leech +x 24 +y 9 +end arch tile_shop x 24 y 10 @@ -4737,10 +4739,6 @@ arch tile_shop x 27 y 4 end -arch s_wyvern -x 27 -y 4 -end arch tile_shop x 27 y 5 diff --git a/python/maps/darcap/manor.py b/python/maps/darcap/manor.py index b21109f7c..3f76f64a2 100644 --- a/python/maps/darcap/manor.py +++ b/python/maps/darcap/manor.py @@ -1,16 +1,18 @@ -import random # -*- coding: utf-8 -*- # Script handling various things for Darcap Manor. # # It is used: # - in the blue zone, to count how many kobolds are on the map -# - for the potion, to explode walls in the treasure room # - in the brown zone, to prevent Kaptel's death or trigger the opening of the exit # - in the white zone, to check if the player knows how many of a certain jewel there are +# - for the potion, to explode walls in the treasure room +# - in the treasure room, to select the reward +import random import Crossfire def blue_count_kobolds(): + '''Count the number of kobolds on the map for the blue zone.''' map = Crossfire.WhoAmI().Map count = 0 for x in range(map.Width): @@ -25,28 +27,18 @@ def blue_count_kobolds(): return count def blue_check(): - '''Player triggered the lever, check if correct number of kobolds. ''' + '''Player triggered the lever, check if correct number of kobolds.''' if blue_count_kobolds() != 4: Crossfire.SetReturnValue(1) Crossfire.WhoIsActivator().Message('The level will only activate if there are exactly 4 kobolds on the map') return -def potion_find_wall(map, x, y, name): - '''Find the wall of a given archetype at the specified location.''' - item = map.ObjectAt(x, y) - while item: - if item.ArchName == name: - return item - item = item.Above - - return None - def potion_check(): """Handle the Darcap Manor's potion being thrown. Check if walls to destroy in the treasure room.""" # note: duplication with /CFMove.py, should be factorised at some point - dir_x = [ 0, 0, 1, 1, 1, 0, -1, -1, -1 ] + dir_x = [ 0, 0, 1, 1, 1, 0, -1, -1, -1 ] dir_y = [ 0, -1, -1, 0, 1, 1, 1, 0, -1 ] env = Crossfire.WhoAmI().Env @@ -60,11 +52,11 @@ def potion_check(): if y != 4 and y != 8 and y != 12: return - if x != 9 and x != 10: + if x != 4 and x != 5: return - left = potion_find_wall(env.Map, 9, y, 'cwall_mural_1_1') - right = potion_find_wall(env.Map, 10, y, 'cwall_mural_1_2') + left = env.Map.Check('cwall_mural_1_1', (4, y)) + right = env.Map.Check('cwall_mural_1_2', (5, y)) if left == None or right == None: # hu? @@ -73,8 +65,10 @@ def potion_check(): left.Remove() right.Remove() - env.Map.CreateObject('rubble', 9, y) - env.Map.CreateObject('rubble', 10, y) + env.Map.CreateObject('rubble', 4, y) + env.Map.CreateObject('rubble', 5, y) + env.Map.CreateObject('explosion2', 4, y) + env.Map.CreateObject('explosion2', 5, y) Crossfire.WhoAmI().Remove() @@ -101,6 +95,7 @@ def kaptel_death(): Crossfire.SetReturnValue(1) def challenge_correct_reply(count, msg): + '''Check if the reply to the challenge is correct.''' if count == 0: return msg == '0' or msg == 'none' return count == int(msg) @@ -170,11 +165,144 @@ def white_challenge(): else: ear.Say('Sorry, that is not the correct reply. Please try again later.') -if Crossfire.ScriptParameters() == 'blue': +def claim_reward(): + '''Handle the player applying the lever to get her reward.''' + rewards = { # Gate positions for the rewards + 'amethysts': [2, 15], + 'glowing_crystal': [2, 17], + 'potion': [3, 18], + 'townportal': [5, 18], + 'lunar_shield': [7, 18], + 'wizard_gloves': [10, 15], + 'black_dragon_mail': [10, 17], + } + chances = [ # Possible rewards, one is selected in the list so some items are repeated to make them more probably + 'amethysts', + 'amethysts', + 'amethysts', + 'amethysts', + 'glowing_crystal', + 'glowing_crystal', + 'glowing_crystal', + 'potion', + 'potion', + 'townportal', + 'townportal', + 'lunar_shield', + 'wizard_gloves', + 'black_dragon_mail', + ] + + def swap_gate(item, delete = False): + # lever.Map.Print('item = %d'%(item)) + x = rewards[chances[item]][0] + y = rewards[chances[item]][1] + gate = lever.Map.ObjectAt(x, y).Above.Above + replace = '' + glow = 0 + if gate.ArchName == 'grate_closed_1': + replace = 'igate_closed_1' + elif gate.ArchName == 'grate_closed_2': + replace = 'igate_closed_2' + elif gate.ArchName == 'igate_closed_1': + replace = 'grate_closed_1' + glow = 5 + elif gate.ArchName == 'igate_closed_2': + replace = 'grate_closed_2' + glow = 5 + else: + # lever.Map.Print('found %s'%(gate.ArchName)) + return + # lever.Map.Print('%d %d %s => %s'%(x, y, gate.ArchName, replace)) + gate.Remove() + if delete: + return + ob = lever.Map.CreateObject(replace, x, y) + if glow != 0: + ob.GlowRadius = glow + + + Crossfire.SetReturnValue(1) + lever = Crossfire.WhoAmI() + event = Crossfire.WhatIsEvent() + status = lever.ReadKey('status') + if event.Subtype == Crossfire.EventType.APPLY: + if status == '': + lever.Map.Print('And now you shall get your reward!') + lever.WriteKey('status', 'start', 1) + lever.WriteKey('reward', str(random.randint(0, len(chances))), 1) + lever.WriteKey('left', str(random.randint(1, 3) + random.randint(1, 3) + random.randint(1, 3)), 1) + lever.WriteKey('current', '-1', 1) + lever.CreateTimer(1 + random.randint(1, 3), 2) + return + elif event.Subtype == Crossfire.EventType.TIMER: + if lever.Map.Darkness < 5: + lever.Map.ChangeLight(1) + lever.CreateTimer(1 + random.randint(1, 3), 2) + return + + left = int(lever.ReadKey('left')) + current = int(lever.ReadKey('current')) + if left == 0: + lever.Map.Print("Yes! Congratulations!") + while lever.Map.Darkness > 0: + lever.Map.ChangeLight(-1) + swap_gate(current, True) + + else: + if current != -1: + lever.Map.Print('No!') + # lever.Map.Print('restoring') + swap_gate(current) + lever.WriteKey('current', '-1', 1) + lever.CreateTimer(1 + random.randint(1, 3), 2) + return + + left -= 1 + lever.WriteKey('left', str(left), 1) + + current = random.randint(0, len(chances) - 1) + swap_gate(current) + lever.WriteKey('current', str(current), 1) + lever.CreateTimer(1 + random.randint(1, 2), 1) + lever.Map.Print('Will it be this reward?') + +def politos(): + '''Handle Politos's dialog in the entrance.''' + msg = Crossfire.WhatIsMessage() + politos = Crossfire.WhoAmI() + pl = Crossfire.WhoIsActivator() + status = politos.ReadKey('opened') + + if msg == 'potion': + politos.Say("This potion will replace any of the three keys, but you have to figure out how to use it yourself.") + elif msg == 'yes' and status == '': + politos.Say('Ok, good luck') + politos.Map.TriggerConnected(1, 1) + politos.WriteKey('opened', 'yes', 1) + elif status != '': + politos.Say('Feel free to go try get the keys now.') + else: + politos.Say( + 'Welcome to Darcap Manor. Here you can attempt to find some exclusive rewards!\n' + 'To get a treasure from upstairs, you need to find three keys: blue, white, brown.\n' + 'You can get one from each of the corners of this room, provided you are strong or smart enough, of course.\n' + # 'If you go downstairs, you can attempt to get a random key, but you must be lucky.\n\n' + 'So do you wish to enter?' + ) + Crossfire.SetReturnValue(1) + +params = Crossfire.ScriptParameters() + +if params == 'blue': blue_check() -elif Crossfire.ScriptParameters() == 'potion': +elif params == 'potion': potion_check() -elif Crossfire.ScriptParameters() == 'kaptel': +elif params == 'kaptel': kaptel_death() -elif Crossfire.ScriptParameters() == 'white': +elif params == 'white': white_challenge() +elif params == 'reward': + claim_reward() +elif params == 'politos': + politos()