Skip to content

Commit

Permalink
feat: add moar prefabs!
Browse files Browse the repository at this point in the history
HLD_armor, HLD_s_items
  • Loading branch information
kiedtl committed Jun 13, 2024
1 parent b9aff86 commit 33202e4
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 2 deletions.
18 changes: 18 additions & 0 deletions data/des/des-main.des
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ The sparsely-woven fibers composing this eldritch clothing seem be absorbing all
light and color nearby, appearing only as criss-crossing web of pitch-black
lines.

% vozgum_armor
The nickel mail shirt serves as the backing for silver plates of some weighty
metal that the goblins name Vozgum, and the surrounding human population
Tantalum. Its brittleness and bulk hinders its effectiveness in repelling
blows, though it might serve well for its intended purpose.

% revgen_armor
The scaly skin of a dead Revgenunhelkim has been stripped of fur, treated, and
tanned into lightweight armor. Strangely, the processing does not seem to have
hardened the leather in any way, and it remains incredibly supple and yet
immensely strong while retaining its corrosion and heat resistant properties.

% cloak_silus
A cloak of woven silus and reflective metal threads, of the finest cave-goblin
craft.
Expand Down Expand Up @@ -353,6 +365,12 @@ causes ringing ears.
This potion is composed of dissolved gold in some kind of solution. Drinking it
will increase your ability to absorb the Necromancer's power.

% potion_corrode
A very heavy and thick container, with labeling indicating that it contains
some kind of caustic sludge. The labeling, written in cursive Dremos, is
hastily scrawled over the container's silver surface and repeatedly references
the Revgenunhelkim. A symbol of a goblin's skull adorns the lid.

% t_default

% t_carpet
Expand Down
43 changes: 43 additions & 0 deletions data/prefabs/HLD_armor.fab
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
:g_tunneler
:g_restriction 1
:priority 50
:notraps
:noguards
:noitems
:nostairs

@@a i revgen_armor

% FABEDIT_REPLACE

:tunneler_orientation east

@0 p steel_spt_e2w2
@1 p steel_spt_s1e2w2
@2 p steel_spt_n1e2w2
@3 p steel_spt_n2s2w1
@4 p steel_spt_n2w2
@5 p steel_spt_s2w2
@6 M iron_spire
@7 M armored_guard

6#015
...a3
7#024

\
:tunneler_orientation west

@0 p steel_spt_e2w2
@1 p steel_spt_n1e2w2
@2 p steel_spt_n2e2
@3 p steel_spt_n2s2e1
@4 p steel_spt_s1e2w2
@5 p steel_spt_s2e2
@6 M iron_spire
@7 M armored_guard
@a i revgen_armor

540#6
3a...
210#7
23 changes: 23 additions & 0 deletions data/prefabs/HLD_s_items.fab
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
:g_subroom
:g_restriction 1
:priority 30
:noitems
:notraps

@@p i potion_corrode

% FABEDIT_REPLACE

@0 p alch_frame_s1e1
@1 p alch_frame_e1w1
@2 p alch_frame_n1w1
@3 p steel_spt_s2w1
@4 p chamber_s1w1
@5 p steel_spt_n2e1
@6 p steel_spt_n2s2
@p i potion_corrode

0113
6pp6
6pp6
5112
3 changes: 2 additions & 1 deletion src/gas.zig
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ pub const Corrosive = Gas{
.noun = "The caustic gas",
.strs = &[_]DamageStr{
items._dmgstr(10, "BUG", "burns", ""),
items._dmgstr(30, "BUG", "eats away at", ""),
items._dmgstr(20, "BUG", "eats away at", ""),
items._dmgstr(30, "BUG", "melts", ""),
items._dmgstr(99, "BUG", "dissolves", ""),
},
});
Expand Down
31 changes: 30 additions & 1 deletion src/items.zig
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ pub const ALL_ITEMS = [_]ItemTemplate{
.{ .w = 0, .i = .{ .X = &Earthen2ShieldAux } },
.{ .w = 0, .i = .{ .r = DisintegrationRing } },
.{ .w = 0, .i = .{ .r = DecelerationRing } },
.{ .w = 0, .i = .{ .P = &CorrodePotion } },
.{ .w = 0, .i = .{ .A = VozgumArmor } },
.{ .w = 0, .i = .{ .A = RevgenArmor } },
};

pub const Key = struct {
Expand Down Expand Up @@ -448,7 +451,7 @@ pub const Earthen2ShieldAux = Aux{
};

// Reminder via comptime :)
// Glory to comptime, hail zig. (hmm... zig hail?)
// Glory to comptime, hail zig.
// comptime {
// if (@hasField(types.Resistance, "rAcid"))
// @compileError("TODO: Add rAcid to earth shields and remove this error");
Expand Down Expand Up @@ -1406,6 +1409,17 @@ pub const MineKit = Consumable{
.hated_by_nc = true,
};

pub const CorrodePotion = Consumable{
.id = "potion_corrode",
.name = "potion of corrosion",
.effects = &[_]Consumable.Effect{.{ .Gas = gas.Corrosive.id }},
.is_potion = true,
.color = 0xa7e234, // Same color as gas
.verbs_player = Consumable.VERBS_PLAYER_POTION,
.verbs_other = Consumable.VERBS_OTHER_POTION,
.throwable = true,
};

pub const DistractPotion = Consumable{
.id = "potion_distract",
.name = "potion of distraction",
Expand Down Expand Up @@ -1755,6 +1769,21 @@ pub const SpectralVestArmor = Armor{
.stats = .{ .Melee = 10, .Conjuration = 1 },
};

pub const VozgumArmor = Armor{
.id = "vozgum_armor",
.name = "vozgum armor",

.stats = .{ .Melee = -5, .Martial = -1 },
.resists = .{ .Armor = 20, .rAcid = 20 },
};

pub const RevgenArmor = Armor{
.id = "revgen_armor",
.name = "Revgenunhelkim leather armor",

.resists = .{ .Armor = 30, .rAcid = 35, .rFire = 25 },
};

// }}}

pub fn _dmgstr(p: usize, vself: []const u8, vother: []const u8, vdeg: []const u8) DamageStr {
Expand Down

0 comments on commit 33202e4

Please sign in to comment.