The pirate treasure: each player's own mound at their X, dug with a pickaxe; the drowned crew rise at night or when the chest comes up; the ship's compass, a spyglass, a cutlass and pirate gold; online too
This commit is contained in:
@@ -60,6 +60,12 @@ const KINDS := {
|
||||
"notice": 0.0, "notice_loud": 0.0, "calm": 30.0,
|
||||
"damage": 20.0, "attack_range": 2.0, "attack_cd": 2.0, "bone": true,
|
||||
"drops": {"iron_nugget": [1, 2]}},
|
||||
# 0.6.0: the drowned crew (guard.gd, at a treasure dig: treasure.gd). The
|
||||
# Cove's barrow guards: slow, hard-hitting, unafraid of fire.
|
||||
"drowned": {"name": "Drowned Sailor", "hp": 70.0, "walk": 1.3, "run": 3.1, "turn": 4.0,
|
||||
"notice": 0.0, "notice_loud": 0.0, "calm": 30.0,
|
||||
"damage": 16.0, "attack_range": 2.0, "attack_cd": 1.8, "bone": true,
|
||||
"drops": {"salt": [0, 1]}},
|
||||
# P5: the Old Stag (old_stag.gd), called by the standing stones, and the
|
||||
# spirit wolves it summons (they just run at you: the base "charge").
|
||||
"old_stag": {"name": "Old Stag", "hp": 900.0, "walk": 2.0, "run": 13.0, "turn": 3.0,
|
||||
@@ -140,7 +146,7 @@ func setup(k: String, w: Node3D, pos: Vector3, seed: int) -> void:
|
||||
var eyes := MeshInstance3D.new()
|
||||
eyes.mesh = parts.eyes
|
||||
var em := StandardMaterial3D.new()
|
||||
var eye: Color = {"alpha": Color(1.0, 0.18, 0.1), "guard": Color(0.45, 0.8, 1.0), "old_stag": Color(0.55, 0.95, 1.0),
|
||||
var eye: Color = {"alpha": Color(1.0, 0.18, 0.1), "guard": Color(0.45, 0.8, 1.0), "drowned": Color(0.5, 1.0, 0.6), "old_stag": Color(0.55, 0.95, 1.0),
|
||||
"spirit_wolf": Color(0.55, 0.95, 1.0)}.get(k, Color(1.0, 0.75, 0.3))
|
||||
em.albedo_color = eye.lerp(Color.WHITE, 0.2)
|
||||
em.emission_enabled = true
|
||||
@@ -164,7 +170,7 @@ func setup(k: String, w: Node3D, pos: Vector3, seed: int) -> void:
|
||||
cap.height = maxf(parts.height, parts.radius * 2.0 + 0.01)
|
||||
cs.shape = cap
|
||||
cs.position = Vector3(0, parts.height * 0.5, 0)
|
||||
if k != "rabbit" and k != "guard": # (rabbits are round, guards stand upright)
|
||||
if not k in ["rabbit", "guard", "drowned"]: # (rabbits are round, guards stand upright)
|
||||
# Long bodies: lay the capsule along the spine.
|
||||
cap.height = {"deer": 1.5, "boar": 1.4, "wolf": 1.25, "alpha": 1.65, "bear": 2.0, "fox": 0.8, "crow": 0.3, "old_stag": 3.3, "spirit_wolf": 1.25}.get(k, 1.4)
|
||||
cs.rotation.x = PI * 0.5
|
||||
@@ -516,6 +522,7 @@ const VOICES := {
|
||||
"boar": {"alert": "boar_grunt", "angry": "boar_grunt", "attack": "boar_grunt", "hurt": "boar_squeal", "idle": "boar_grunt"},
|
||||
"old_stag": {"alert": "stag_bellow", "angry": "stag_bellow", "attack": "stag_snort", "hurt": "stag_snort"},
|
||||
"guard": {"alert": "guard_rattle", "angry": "guard_rattle", "attack": "guard_rattle"},
|
||||
"drowned": {"alert": "guard_rattle", "angry": "guard_rattle", "attack": "guard_rattle"},
|
||||
"crow": {"alert": "crow_caw", "hurt": "crow_caw", "idle": "crow_caw"},
|
||||
"fox": {"alert": "fox_yip", "hurt": "fox_yip"},
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ static func build(kind: String) -> Dictionary:
|
||||
"fox": d = _scaled(_wolf_parts(Color(0.78, 0.4, 0.15), Color(0.92, 0.88, 0.8), 281), 0.6)
|
||||
"crow": d = _crow()
|
||||
"guard": d = _guard()
|
||||
"drowned": d = _drowned()
|
||||
"old_stag": d = _scaled(_stag(), 2.1)
|
||||
"spirit_wolf": d = _wolf_parts(Color(0.62, 0.72, 0.78), Color(0.85, 0.92, 0.95), 351)
|
||||
_: d = _boar()
|
||||
@@ -253,6 +254,53 @@ static func _guard() -> Dictionary:
|
||||
"hips": [Vector3(-0.1, 0.93, 0), Vector3(0.1, 0.93, 0)],
|
||||
"radius": 0.3, "height": 1.85}
|
||||
|
||||
## A drowned sailor (0.6.0): the barrow guard's bones, sea-greyed and hung
|
||||
## with weed, a rag of a shirt, a bandana, and a cutlass; no shield or helm.
|
||||
static func _drowned() -> Dictionary:
|
||||
var bone := Color(0.62, 0.66, 0.58)
|
||||
var old := Color(0.44, 0.5, 0.42)
|
||||
var weed := Color(0.16, 0.32, 0.18)
|
||||
var rag := Color(0.36, 0.33, 0.27)
|
||||
var red := Color(0.45, 0.12, 0.1)
|
||||
var steel := Color(0.5, 0.52, 0.55)
|
||||
var dark := Color(0.05, 0.07, 0.06)
|
||||
var st := P._begin()
|
||||
var r := _rng(331)
|
||||
var n := _noise(331, 2.2)
|
||||
P._blob(st, Vector3(0, 0.95, 0), Vector3(0.17, 0.07, 0.1), n, 0.2, old, r, 0) # pelvis
|
||||
P._cylinder(st, Vector3(0, 0.97, 0.02), Vector3(0, 1.45, 0.0), 0.035, 0.03, 5, bone, r) # spine
|
||||
for i in range(4): # ribs
|
||||
var y := 1.18 + 0.075 * i
|
||||
P._cylinder(st, Vector3(-0.15 + 0.01 * i, y, -0.02), Vector3(0.15 - 0.01 * i, y, -0.02), 0.018, 0.018, 4, bone, r)
|
||||
P._blob(st, Vector3(0.02, 1.3, 0.0), Vector3(0.19, 0.17, 0.12), n, 0.45, rag, r, 0) # shirt, in tatters
|
||||
P._cylinder(st, Vector3(-0.22, 1.47, 0), Vector3(0.22, 1.47, 0), 0.025, 0.025, 4, bone, r) # shoulders
|
||||
P._blob(st, Vector3(0, 1.66, -0.02), Vector3(0.11, 0.13, 0.12), n, 0.12, bone, r, 1) # skull
|
||||
P._blob(st, Vector3(0, 1.56, -0.08), Vector3(0.07, 0.04, 0.06), n, 0.1, old, r, 0) # jaw
|
||||
P._blob(st, Vector3(0, 1.75, 0.0), Vector3(0.12, 0.05, 0.13), n, 0.15, red, r, 0) # bandana
|
||||
for s in [-1.0, 1.0]:
|
||||
P._blob(st, Vector3(s * 0.045, 1.67, -0.115), Vector3(0.03, 0.025, 0.012), n, 0.0, dark, r, 0) # sockets
|
||||
for i in range(5): # weed hanging off
|
||||
var x := -0.16 + i * 0.08
|
||||
P._cylinder(st, Vector3(x, 1.45, -0.04), Vector3(x + 0.02, 1.05 - 0.05 * (i % 2), -0.06), 0.012, 0.004, 3, weed, r)
|
||||
# Right arm forward with the cutlass, left hanging.
|
||||
P._cylinder(st, Vector3(0.22, 1.47, 0), Vector3(0.28, 1.2, -0.12), 0.025, 0.022, 4, bone, r)
|
||||
P._cylinder(st, Vector3(0.28, 1.2, -0.12), Vector3(0.27, 1.08, -0.38), 0.022, 0.02, 4, bone, r)
|
||||
P._cylinder(st, Vector3(0.27, 1.08, -0.4), Vector3(0.33, 1.42, -0.85), 0.035, 0.008, 4, steel, r) # curved blade
|
||||
P._cylinder(st, Vector3(0.21, 1.06, -0.38), Vector3(0.33, 1.1, -0.4), 0.02, 0.02, 4, steel, r) # guard
|
||||
P._cylinder(st, Vector3(-0.22, 1.47, 0), Vector3(-0.27, 1.15, 0.02), 0.025, 0.022, 4, bone, r)
|
||||
P._cylinder(st, Vector3(-0.27, 1.15, 0.02), Vector3(-0.26, 0.9, -0.02), 0.022, 0.02, 4, bone, r)
|
||||
var est := P._begin()
|
||||
for s in [-1.0, 1.0]:
|
||||
P._blob(est, Vector3(s * 0.045, 1.67, -0.125), Vector3.ONE * 0.012, n, 0.0, Color(0.5, 1.0, 0.6), r, 0)
|
||||
var lst := P._begin()
|
||||
P._cylinder(lst, Vector3(0, 0, 0), Vector3(0, -0.45, 0.02), 0.03, 0.025, 4, bone, r)
|
||||
P._cylinder(lst, Vector3(0, -0.45, 0.02), Vector3(0, -0.9, 0), 0.025, 0.022, 4, bone, r)
|
||||
P._blob(lst, Vector3(0, -0.2, 0), Vector3(0.07, 0.18, 0.07), n, 0.4, rag, r, 0) # breeches
|
||||
P._blob(lst, Vector3(0, -0.9, -0.05), Vector3(0.04, 0.025, 0.08), n, 0.1, old, r, 0)
|
||||
return {"body": P._commit(st), "eyes": P._commit(est), "leg": P._commit(lst),
|
||||
"hips": [Vector3(-0.1, 0.93, 0), Vector3(0.1, 0.93, 0)],
|
||||
"radius": 0.3, "height": 1.85}
|
||||
|
||||
## The Old Stag (before scaling up): a pale, moss-hung spirit deer with a
|
||||
## huge crown of antlers.
|
||||
static func _stag() -> Dictionary:
|
||||
|
||||
@@ -18,11 +18,12 @@ func display_name() -> String:
|
||||
func interact_prompt(p: Node) -> String:
|
||||
if is_dead():
|
||||
return "Bones [E] Search"
|
||||
var s := "Barrow guard"
|
||||
# (A barrow guard, or a drowned sailor at a treasure dig: treasure.gd.)
|
||||
var s: String = def.name
|
||||
match state:
|
||||
"rest": s = "Barrow guard (still... for now)"
|
||||
"charge": s = "Barrow guard (coming for you!)"
|
||||
"home": s = "Barrow guard (going back to its post)"
|
||||
"rest": s += " (still... for now)"
|
||||
"charge": s += " (coming for you!)"
|
||||
"home": s += " (going back to its post)"
|
||||
if not Actions.melee_stats(p).armed and not ItemDB.get_item(p.held_item_id()).has("bow"):
|
||||
s += " (you need a weapon: a club cracks bone)"
|
||||
return s
|
||||
@@ -46,7 +47,7 @@ func _think(dt: float) -> void:
|
||||
_goal_d = d
|
||||
if d < def.attack_range and _attack_cd <= 0.0 and _can_reach(player):
|
||||
_attack_cd = def.attack_cd
|
||||
player.survival.damage(def.damage * world.difficulty_mult("damage"), global_position, "a barrow guard")
|
||||
player.survival.damage(def.damage * world.difficulty_mult("damage"), global_position, "a %s" % String(def.name).to_lower())
|
||||
"home":
|
||||
if barrow.wakes_for(player) and barrow.center().distance_to(pp) < barrow.LEASH:
|
||||
state = "charge"
|
||||
|
||||
Reference in New Issue
Block a user