Skip to content

Commit

Permalink
Medical: Tweaks to scalpel.
Browse files Browse the repository at this point in the history
No longer opens wounds 100% with a single slice.
Also causes some small amount of tissue damage.
Amount opened / damaged depends on painkiller in wound. Less painkiller = sloppier cut.
  • Loading branch information
caligari87 committed Sep 18, 2020
1 parent f63cc8a commit 6501a3b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions modules/items/traumakit/traumakit_scalpel.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@ extend class UaS_TraumaKit {
void HandleScalpel() {
statusMessage = statusmessage.."\cjScalpel\n";
statusMessage = statusmessage.."\cuFor re-opening wounds.\n\n\n";
if (!currentWound) { return; }

// Handle actions
if (weaponstatus[TK_HOLD] > 0) { weaponstatus[TK_HOLD]--; }
if ((owner.player.cmd.buttons & BT_ATTACK) && !(owner.player.oldbuttons & BT_ATTACK) && (weaponstatus[TK_HOLD] <= 0)){
owner.A_StartSound("bandage/rip",CHAN_WEAPON);

// CRAWWWWWWWWLLLLING INNNNNNNN MMMMYYYYYY SSSKKKKKIIIIIINNNNN
// THEEEESSSSEE WOOOOUUUNNNDS THHHEEEEYYY WIILLL NOOOOTTTTT HEEEAAAAALLL
if (!currentWound) {
owner.A_StartSound("bandage/rip",CHAN_WEAPON);
patient.damagemobj(owner,owner,5,"staples");
patient.woundcount += 1;
return;
}

if (currentWound.inpain(75)) {
patient.damagemobj(owner,owner,1,"staples");
weaponstatus[TK_HOLD] = 50;
Expand All @@ -22,7 +31,8 @@ extend class UaS_TraumaKit {
(frandom[uas_tk](-1,1),frandom[uas_tk](1,2)),
(frandom[uas_tk](-1,1),frandom[uas_tk](1,1))
);
currentWound.open = max(currentWound.open + random[uas_tk](5,10), 100);
currentWound.open = min(currentWound.open + random[uas_tk](5,100-currentWound.painkiller), 100);
currentWound.cavity = min(currentWound.cavity + random[uas_tk](0,25-(currentWound.painkiller/4)), 100);
return;
}
}
Expand Down

0 comments on commit 6501a3b

Please sign in to comment.