Skip to content

Commit

Permalink
refactoring branch event
Browse files Browse the repository at this point in the history
  • Loading branch information
jjppof committed May 24, 2023
1 parent a4ed048 commit 75f64f2
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 69 deletions.
4 changes: 2 additions & 2 deletions assets/maps/forest/forest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2286,7 +2286,7 @@
"interactable_object\/05":"{\n\"key_name\": \"tree_log_vertical\",\n\"x\": 3,\n\"y\": 18,\n\"base_collision_layer\": 0,\n\"pillar_direction\": \"vertical\",\n\"contact_points\": [{\n \"x\": 3,\n \"y\": 18\n}],\n\"falling_pos\": {\n \"x\": 4,\n \"y\": 18\n}\n}",
"interactable_object\/06":"{\n\"key_name\": \"tree_log_horizontal\",\n\"x\": 50,\n\"y\": 2,\n\"base_collision_layer\": 1,\n\"dest_collision_layer\": 0,\n\"pillar_direction\": \"horizontal\",\n\"contact_points\": [{\n \"x\": 50,\n \"y\": 2\n}],\n\"falling_pos\": {\n \"x\": 50,\n \"y\": 4\n},\n\"dest_pos_after_fall\": {\n \"x\": 50,\n \"y\": 7\n}\n}",
"interactable_object\/07":"{\n\"key_name\": \"push_pillar\",\n\"storage_keys\": {\n \"position\": \"forest_pillar_position\",\n \"base_collision_layer\": \"forest_pillar_collision_layer\",\n \"animation\": \"forest_pillar_animation\"\n},\n\"allowed_tiles\": [\n {\"x\":24, \"y\":9, \"collision_layer\": 0},\n {\"x\":23, \"y\":9, \"collision_layer\": 0},\n {\"x\":22, \"y\":9, \"collision_layer\": 0}\n],\n\"dock_tile_position\": {\n \"x\": 22,\n \"y\": 11,\n \"collision_layer\": -1\n},\n\"object_drop_tiles\": [{\n \"x\":22,\n \"y\":9,\n \"destination_collision_layer\": -1,\n \"animation_duration\": 200,\n \"dest_y\": 11,\n \"water_animation\": true\n}],\n\"events_info\": {\n \"0\": {\n \"collision_layer_shift\": 1\n }\n}\n}",
"npc\/01":"{\n \"key_name\": \"chest\",\n \"storage_keys\":{\n \"animation\": \"lifting_gem_chest\"\n },\n \"x\": 66,\n \"y\": 2,\n \"npc_type\": \"normal\",\n \"movement_type\": \"idle\",\n \"base_collision_layer\": 0,\n \"events\": [\n {\n \"type\": \"branch\",\n \"condition\": \"=\",\n \"left_comparator_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"lifting_gem_chest\"\n }\n },\n \"right_comparator_value\": {\n \"type\": \"value\",\n \"value\": \"closed\"\n },\n \"events\": [{\n \"type\": \"chest\",\n \"item\": \"lifting_gem\",\n \"finish_events\": [{\n \"type\": \"set_value\",\n \"event_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"lifting_gem_chest\",\n \"value\": \"empty\"\n }\n }\n }]\n }],\n \"else_events\": [{\n \"type\": \"dialog\",\n \"dialog_info\": {\n \"text\": \"${HERO} checked the chest...${BREAK}but the chest was empty.\"\n }\n }]\n }\n ]\n}",
"npc\/01":"{\n \"key_name\": \"chest\",\n \"storage_keys\":{\n \"animation\": \"lifting_gem_chest\"\n },\n \"x\": 66,\n \"y\": 2,\n \"npc_type\": \"normal\",\n \"movement_type\": \"idle\",\n \"base_collision_layer\": 0,\n \"events\": [\n {\n \"type\": \"branch\",\n \"comparator_pairs\": [{\n \"condition\": \"=\",\n \"left_comparator_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"lifting_gem_chest\"\n }\n },\n \"right_comparator_value\": {\n \"type\": \"value\",\n \"value\": \"closed\"\n }\n }],\n \"events\": [{\n \"type\": \"chest\",\n \"item\": \"lifting_gem\",\n \"finish_events\": [{\n \"type\": \"set_value\",\n \"event_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"lifting_gem_chest\",\n \"value\": \"empty\"\n }\n }\n }]\n }],\n \"else_events\": [{\n \"type\": \"dialog\",\n \"dialog_info\": {\n \"text\": \"${HERO} checked the chest...${BREAK}but the chest was empty.\"\n }\n }]\n }\n ]\n}",
"real_tile_height":16,
"real_tile_width":16,
"retreat_data":"[\n {\"x\": 10, \"y\": 20, \"collision_layer\": 0, \"direction\": \"up\"}\n]",
Expand Down Expand Up @@ -2398,7 +2398,7 @@
"tile_event\/46":"string"
},
"renderorder":"right-down",
"tiledversion":"1.9.1",
"tiledversion":"1.9.2",
"tileheight":8,
"tilesets":[
{
Expand Down
10 changes: 5 additions & 5 deletions assets/maps/madra/madra.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/maps/madra/madra_cave.json
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@
"orientation":"orthogonal",
"properties":
{
"npc\/01":"{\n \"key_name\": \"chest\",\n \"storage_keys\":{\n \"animation\": \"frost_jewel_chest\"\n },\n \"x\": 15,\n \"y\": 11,\n \"npc_type\": \"normal\",\n \"movement_type\": \"idle\",\n \"base_collision_layer\": 0,\n \"events\": [\n {\n \"type\": \"branch\",\n \"condition\": \"=\",\n \"left_comparator_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"frost_jewel_chest\"\n }\n },\n \"right_comparator_value\": {\n \"type\": \"value\",\n \"value\": \"closed\"\n },\n \"events\": [{\n \"type\": \"chest\",\n \"item\": \"frost_jewel\",\n \"finish_events\": [{\n \"type\": \"set_value\",\n \"event_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"frost_jewel_chest\",\n \"value\": \"empty\"\n }\n }\n }]\n }],\n \"else_events\": [{\n \"type\": \"dialog\",\n \"dialog_info\": {\n \"text\": \"${HERO} checked the chest...${BREAK}but the chest was empty.\"\n }\n }]\n }\n ]\n}",
"npc\/01":"{\n \"key_name\": \"chest\",\n \"storage_keys\":{\n \"animation\": \"frost_jewel_chest\"\n },\n \"x\": 15,\n \"y\": 11,\n \"npc_type\": \"normal\",\n \"movement_type\": \"idle\",\n \"base_collision_layer\": 0,\n \"events\": [\n {\n \"type\": \"branch\",\n \"comparator_pairs\": [{\n \"condition\": \"=\",\n \"left_comparator_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"frost_jewel_chest\"\n }\n },\n \"right_comparator_value\": {\n \"type\": \"value\",\n \"value\": \"closed\"\n }\n }],\n \"events\": [{\n \"type\": \"chest\",\n \"item\": \"frost_jewel\",\n \"finish_events\": [{\n \"type\": \"set_value\",\n \"event_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"frost_jewel_chest\",\n \"value\": \"empty\"\n }\n }\n }]\n }],\n \"else_events\": [{\n \"type\": \"dialog\",\n \"dialog_info\": {\n \"text\": \"${HERO} checked the chest...${BREAK}but the chest was empty.\"\n }\n }]\n }\n ]\n}",
"real_tile_height":16,
"real_tile_width":16,
"tile_event\/01":"{\n\"type\": \"teleport\",\n\"x_target\": 33,\n\"y_target\": 11,\n\"target\": \"madra\",\n\"activation_directions\": \"up\",\n\"x\": 9,\n\"y\": 0,\n\"stop_climbing\": true,\n\"dest_collision_layer\": 0,\n\"activation_collision_layers\": 1\n}",
Expand All @@ -625,7 +625,7 @@
"tile_event\/08":"string"
},
"renderorder":"right-down",
"tiledversion":"1.9.1",
"tiledversion":"1.9.2",
"tileheight":8,
"tilesets":[
{
Expand Down
4 changes: 2 additions & 2 deletions assets/maps/madra/madra_corner.json
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@
"interactable_object\/07":"{\n\"key_name\": \"rope_dock\",\n\"x\": 8,\n\"y\": 13,\n\"base_collision_layer\": 0,\n\"dest_x\": 5,\n\"dest_y\": 15,\n\"starting_dock\": false,\n\"events_info\": {\n \"0\": {\n \"activation_directions\": [\"down\",\"left\"],\n \"walk_over_rope\": false,\n \"rope_collision_layer\": 2,\n \"dock_exit_collision_layer\": 0\n }\n}\n}",
"interactable_object\/08":"{\n\"key_name\": \"rope_dock\",\n\"x\": 15,\n\"y\": 13,\n\"base_collision_layer\": 0,\n\"dest_x\": 18,\n\"dest_y\": 15,\n\"starting_dock\": true,\n\"tied\": false,\n\"events_info\": {\n \"0\": {\n \"activation_directions\": [\"down\",\"right\"],\n \"walk_over_rope\": false,\n \"rope_collision_layer\": 2,\n \"dock_exit_collision_layer\": 0\n }\n}\n}",
"interactable_object\/09":"{\n\"key_name\": \"rope_dock\",\n\"x\": 18,\n\"y\": 15,\n\"base_collision_layer\": 0,\n\"dest_x\": 15,\n\"dest_y\": 13,\n\"starting_dock\": false,\n\"tied\": false,\n\"events_info\": {\n \"0\": {\n \"activation_directions\": [\"down\",\"right\",\"up\"],\n \"walk_over_rope\": false,\n \"rope_collision_layer\": 2,\n \"dock_exit_collision_layer\": 0\n }\n}\n}",
"npc\/01":"{\n \"key_name\": \"chest\",\n \"storage_keys\":{\n \"animation\": \"aura_gloves_chest\"\n },\n \"x\": 15,\n \"y\": 2,\n \"npc_type\": \"normal\",\n \"movement_type\": \"idle\",\n \"base_collision_layer\": 1,\n \"events\": [\n {\n \"type\": \"branch\",\n \"condition\": \"=\",\n \"left_comparator_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"aura_gloves_chest\"\n }\n },\n \"right_comparator_value\": {\n \"type\": \"value\",\n \"value\": \"closed\"\n },\n \"events\": [{\n \"type\": \"chest\",\n \"item\": \"aura_gloves\",\n \"finish_events\": [{\n \"type\": \"set_value\",\n \"event_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"aura_gloves_chest\",\n \"value\": \"empty\"\n }\n }\n }]\n }],\n \"else_events\": [{\n \"type\": \"dialog\",\n \"dialog_info\": {\n \"text\": \"${HERO} checked the chest...${BREAK}but the chest was empty.\"\n }\n }]\n }\n ]\n}",
"npc\/01":"{\n \"key_name\": \"chest\",\n \"storage_keys\":{\n \"animation\": \"aura_gloves_chest\"\n },\n \"x\": 15,\n \"y\": 2,\n \"npc_type\": \"normal\",\n \"movement_type\": \"idle\",\n \"base_collision_layer\": 1,\n \"events\": [\n {\n \"type\": \"branch\",\n \"comparator_pairs\": [{\n \"condition\": \"=\",\n \"left_comparator_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"aura_gloves_chest\"\n }\n },\n \"right_comparator_value\": {\n \"type\": \"value\",\n \"value\": \"closed\"\n }\n }],\n \"events\": [{\n \"type\": \"chest\",\n \"item\": \"aura_gloves\",\n \"finish_events\": [{\n \"type\": \"set_value\",\n \"event_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"aura_gloves_chest\",\n \"value\": \"empty\"\n }\n }\n }]\n }],\n \"else_events\": [{\n \"type\": \"dialog\",\n \"dialog_info\": {\n \"text\": \"${HERO} checked the chest...${BREAK}but the chest was empty.\"\n }\n }]\n }\n ]\n}",
"tile_event\/00":"{\n\"type\": \"teleport\",\n\"x\": 19,\n\"y\": 9,\n\"target\": \"madra\",\n\"activation_directions\": \"right\",\n\"x_target\": 1,\n\"y_target\": 20,\n\"dest_collision_layer\": 0,\n\"activation_collision_layers\": 0\n}",
"tile_event\/01":"{\n\"type\": \"teleport\",\n\"x\": 19,\n\"y\": 10,\n\"target\": \"madra\",\n\"activation_directions\": \"right\",\n\"x_target\": 1,\n\"y_target\": 20,\n\"dest_collision_layer\": 0,\n\"activation_collision_layers\": 0\n}",
"tile_event\/02":"{\n\"type\": \"teleport\",\n\"x\": 19,\n\"y\": 11,\n\"target\": \"madra\",\n\"activation_directions\": \"right\",\n\"x_target\": 1,\n\"y_target\": 20,\n\"dest_collision_layer\": 0,\n\"activation_collision_layers\": 0\n}",
Expand Down Expand Up @@ -933,7 +933,7 @@
"tile_event\/23":"string"
},
"renderorder":"right-down",
"tiledversion":"1.9.1",
"tiledversion":"1.9.2",
"tileheight":16,
"tilesets":[
{
Expand Down
4 changes: 2 additions & 2 deletions assets/maps/madra/madra_side.json
Original file line number Diff line number Diff line change
Expand Up @@ -2071,7 +2071,7 @@
"interactable_object\/15":"{\n\"key_name\": \"lift_rock\",\n\"x\": 22,\n\"y\": 15,\n\"base_collision_layer\": 0,\n\"psynergies_info\": {\n \"lift\": {\"destination_collision_layer\": 2}\n}\n}",
"npc\/01":"{\n \"key_name\": \"village_1\",\n \"x\": 16,\n \"y\": 10,\n \"npc_type\": \"normal\",\n \"movement_type\": \"idle\",\n \"message\": \"Still searching for corner cases... The pillars, jump and layers systems are very tricky... Can you find a bug?\",\n \"thought_message\": \"Nothing to think about.\",\n \"avatar\": \"potion_shopkeeper\",\n \"base_collision_layer\": 0\n}",
"npc\/02":"{\n\"key_name\": \"briggs\",\n\"x\": 14,\n\"y\": 4,\n\"npc_type\": \"normal\",\n\"movement_type\": \"idle\",\n\"message\": \"Battle system is still under development. Some builtin animations will be done, but now we only have animations for Ice and Plasma. Check it out...\",\n\"thought_message\": \"Nothing to think about.\",\n\"avatar\": \"\",\n\"base_collision_layer\": 0,\n\"events\": [{\n \"type\": \"battle\",\n \"background_key\": \"bg_cliffs\",\n \"bgm\": \"battle_non_adept\",\n \"enemy_party_key\": \"briggs_party\"\n}]\n}",
"npc\/03":"{\n \"key_name\": \"chest\",\n \"storage_keys\":{\n \"animation\": \"pound_cube_chest\"\n },\n \"x\": 28,\n \"y\": 10,\n \"npc_type\": \"normal\",\n \"movement_type\": \"idle\",\n \"base_collision_layer\": 2,\n \"events\": [\n {\n \"type\": \"branch\",\n \"condition\": \"=\",\n \"left_comparator_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"pound_cube_chest\"\n }\n },\n \"right_comparator_value\": {\n \"type\": \"value\",\n \"value\": \"closed\"\n },\n \"events\": [{\n \"type\": \"chest\",\n \"item\": \"pound_cube\",\n \"finish_events\": [{\n \"type\": \"set_value\",\n \"event_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"pound_cube_chest\",\n \"value\": \"empty\"\n }\n }\n }]\n }],\n \"else_events\": [{\n \"type\": \"dialog\",\n \"dialog_info\": {\n \"text\": \"${HERO} checked the chest...${BREAK}but the chest was empty.\"\n }\n }]\n }\n ]\n}",
"npc\/03":"{\n \"key_name\": \"chest\",\n \"storage_keys\":{\n \"animation\": \"pound_cube_chest\"\n },\n \"x\": 28,\n \"y\": 10,\n \"npc_type\": \"normal\",\n \"movement_type\": \"idle\",\n \"base_collision_layer\": 2,\n \"events\": [\n {\n \"type\": \"branch\",\n \"comparator_pairs\": [{\n \"condition\": \"=\",\n \"left_comparator_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"pound_cube_chest\"\n }\n },\n \"right_comparator_value\": {\n \"type\": \"value\",\n \"value\": \"closed\"\n }\n }],\n \"events\": [{\n \"type\": \"chest\",\n \"item\": \"pound_cube\",\n \"finish_events\": [{\n \"type\": \"set_value\",\n \"event_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"pound_cube_chest\",\n \"value\": \"empty\"\n }\n }\n }]\n }],\n \"else_events\": [{\n \"type\": \"dialog\",\n \"dialog_info\": {\n \"text\": \"${HERO} checked the chest...${BREAK}but the chest was empty.\"\n }\n }]\n }\n ]\n}",
"npc\/04":"{\n \"key_name\": \"venus_djinn\",\n \"storage_keys\":{\n \"active\": \"ground_djinn\"\n },\n \"x\": 20,\n \"y\": 25,\n \"npc_type\": \"normal\",\n \"action\": \"idle\",\n \"movement_type\": \"idle\",\n \"base_collision_layer\": 0,\n \"events\": [{\n \"type\": \"djinn_get\",\n \"djinn_key\": \"ground\",\n \"has_fight\": true,\n \"enemy_party_key\": \"venus_djinn_ground_party\",\n \"custom_battle_bg\": \"bg_cliffs\",\n \"finish_events\": [{\n \"type\": \"set_value\",\n \"event_value\": {\n \"type\": \"storage\",\n \"value\": {\n \"key_name\": \"ground_djinn\",\n \"value\": false\n }\n }\n }]\n }]\n}",
"retreat_data":"[{\"x\": 1, \"y\": 17, \"collision_layer\": 0, \"direction\": \"right\"}]",
"tile_event\/01":"{\n\"type\": \"climb\",\n\"x\": 11,\n\"y\": 10,\n \"activation_directions\": \"up\",\n\"activation_collision_layers\": [0],\n\"change_to_collision_layer\": 1\n}",
Expand Down Expand Up @@ -2198,7 +2198,7 @@
"tile_event\/50":"string"
},
"renderorder":"right-down",
"tiledversion":"1.9.1",
"tiledversion":"1.9.2",
"tileheight":16,
"tilesets":[
{
Expand Down
Loading

0 comments on commit 75f64f2

Please sign in to comment.