Skip to content

Commit

Permalink
New random mission (#44999)
Browse files Browse the repository at this point in the history
  • Loading branch information
El-Jekozo authored and ZhilkinSerg committed Mar 21, 2021
1 parent d88b323 commit 5f2ef4b
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
14 changes: 14 additions & 0 deletions data/json/npcs/TALK_COMMON_MISSION.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,5 +324,19 @@
{ "text": "Thank you.", "topic": "TALK_NONE", "effect": "clear_mission" },
{ "text": "Thanks, bye.", "topic": "TALK_DONE", "effect": "clear_mission" }
]
},
{
"//": "MISSION_PYROMANIAC mission set this topic as starting topic for mission giver.",
"type": "talk_topic",
"id": "MISSION_PYROMANIAC",
"dynamic_line": "Are we there yet, <name_g>? I can't wait to burn that building!",
"responses": [
{
"text": "We're here. Let's do it!",
"topic": "TALK_MISSION_INQUIRE",
"condition": { "and": [ "mission_complete", { "u_has_items": { "item": "gasoline", "count": 200 } } ] }
},
{ "text": "Be patient, <name_g>, we're getting there soon.", "topic": "TALK_DONE" }
]
}
]
48 changes: 48 additions & 0 deletions data/json/npcs/missiondef.json
Original file line number Diff line number Diff line change
Expand Up @@ -817,5 +817,53 @@
"success_lie": "OK, then hand them over.",
"failure": "Well, that's a shame."
}
},
{
"id": "MISSION_PYROMANIAC",
"type": "mission_definition",
"name": { "str": "Angry pyromaniac" },
"goal": "MGOAL_GO_TO",
"difficulty": 0,
"value": 0,
"//": "NPC will ask player to burn tagged house. Will follow player after accepting mission.",
"//2": "Change first topic to do proper checks. MGOAL_GO_TO to check if player stands on tagged tile.",
"//3": "At the end of the mission, will place fire on tagged tile and NPC will join player faction.",
"has_generic_rewards": false,
"start": {
"effect": [ "follow_only", { "npc_first_topic": "MISSION_PYROMANIAC" } ],
"assign_mission_target": {
"om_terrain": "house",
"om_terrain_replace": "forest",
"om_terrain_match_type": "PREFIX",
"search_range": 75,
"random": true,
"z": 0
}
},
"end": {
"effect": [ "follow", { "u_consume_item": "gasoline", "count": 200 }, { "mapgen_update": "MISSION_PYROMANIAC_BURN" } ]
},
"origins": [ "ORIGIN_OPENER_NPC" ],
"dialogue": {
"describe": "Oh man, I want to <swear> burn it so bad…",
"offer": "I'm so <swear> infuriated! I've got an enemy that ruined my life, and now I want to get revenge! I don't care about <the_cataclysm>, I just want to burn his house! Would you help me, <name_g>?",
"accepted": "Good. Let's go to his house and <swear> burn it down! Oh, by the way, could you bring gasoline with you, <name_g>? I was so angry I forgot to bring it with me…",
"rejected": "Seriously? It's such an easy job…",
"advice": "Maybe we can find some gasoline at gas station.",
"inquire": "Are you ready, <name_g>?",
"success": "Sweet, sweet revenge! Ah, smells so nice! Feels like the smell of napalm in the morning! All his stuff, and probably even that <name_b>, will burn to ashes in a matter of minutes. You helped me get my revenge, so I'll follow you to the end, <name_g>!",
"success_lie": "What?! You liar!",
"failure": "Wow, you failed? How…"
}
},
{
"//": "For MISSION_PYROMANIAC. Will spawn fire on tile where PC is standing.",
"type": "mapgen",
"update_mapgen_id": "MISSION_PYROMANIAC_BURN",
"method": "json",
"object": {
"place_liquids": [ { "liquid": "gasoline", "x": [ 5, 20 ], "y": [ 5, 20 ], "amount": 5, "repeat": 40 } ],
"place_fields": [ { "field": "fd_fire", "x": [ 5, 20 ], "y": [ 5, 20 ], "repeat": 40 } ]
}
}
]

0 comments on commit 5f2ef4b

Please sign in to comment.