More work on dialogue, portraits, customizer and intro

This commit is contained in:
2025-09-18 09:14:54 -04:00
parent 82c630d668
commit 023e88b84e
80 changed files with 2117 additions and 141 deletions

View File

@@ -1,15 +1,35 @@
extends Quest
func _init() -> void:
func setup() -> void:
name = "A Sticky Situation"
var event_weights = [1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,4,4,5]
var num_events = event_weights.pick_random()
var num_events = 3 # event_weights.pick_random()
#The first event is guaranteed to be at the 50% mark.
var first : bool = true
var pranges : Array = []
var margin : float = 0.1
for i in range(num_events):
var evt : Quest.Event = Quest.Event.new()
evt.type = Quest.Event.Type.COMBAT
evt.enemies = ["goo"]
evt.time = 5
if first:
#Make invisible
evt.progress_point = .5
pranges.append([margin, evt.progress_point-margin])
pranges.append([evt.progress_point+margin, 1 - margin])
first = false
else:
evt.hidden = true
pranges.shuffle()
var range = pranges.pop_back()
evt.progress_point = randf_range(range[0], range[1])
if evt.progress_point - range[0] >= 2 * margin:
pranges.append([range[0], evt.progress_point - margin])
if range[1] - evt.progress_point >= 2 * margin:
pranges.append([evt.progress_point + margin, range[1]])
events.append(evt)
events.sort_custom(func(a,b): return a.progress_point < b.progress_point)
desc = "Nestors Woods is facing a slime invasion and the farmers are getting nervous, send an adventurer to help squash that sticky situation!"
location = Quest.Locations.NESTORS_WOODS
rewards = {"exp":10, "gold":5}