From 932ce95befaab7e573af0e49ae2568ddc390f835 Mon Sep 17 00:00:00 2001 From: Kein Niemand <18308201+KeinNiemand@users.noreply.github.com> Date: Thu, 22 Jul 2021 18:30:01 +0200 Subject: [PATCH] added Stomp Immunity Unnerf --- Mods/Stomp Immunity Unnerf/main.lua | 17 +++++++++++++++++ Mods/Stomp Immunity Unnerf/metadata.xml | 11 +++++++++++ main.lua | 1 + 3 files changed, 29 insertions(+) create mode 100644 Mods/Stomp Immunity Unnerf/main.lua create mode 100644 Mods/Stomp Immunity Unnerf/metadata.xml diff --git a/Mods/Stomp Immunity Unnerf/main.lua b/Mods/Stomp Immunity Unnerf/main.lua new file mode 100644 index 0000000..738336e --- /dev/null +++ b/Mods/Stomp Immunity Unnerf/main.lua @@ -0,0 +1,17 @@ +local pyromaniacunnerf = RegisterMod("pyromaniacunnerf",1) + +function pyromaniacunnerf:takeDamage(target, amount, flags) + local isCrush = (flags & DamageFlag.DAMAGE_CRUSH) ~= 0 + if (target.Type == EntityType.ENTITY_PLAYER and (isCrush)) then + player = target:ToPlayer() + if (player:HasCollectible(CollectibleType.COLLECTIBLE_PYROMANIAC) or player:HasCollectible(CollectibleType.COLLECTIBLE_HOST_HAT)) then + if (player:HasCollectible(CollectibleType.COLLECTIBLE_PYROMANIAC)) then --heal 1/2 heart when taking explosive/crush damage + player:AddHearts(2) + end + return false + end + + end +end + +pyromaniacunnerf:AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, pyromaniacunnerf.takeDamage) \ No newline at end of file diff --git a/Mods/Stomp Immunity Unnerf/metadata.xml b/Mods/Stomp Immunity Unnerf/metadata.xml new file mode 100644 index 0000000..e75d235 --- /dev/null +++ b/Mods/Stomp Immunity Unnerf/metadata.xml @@ -0,0 +1,11 @@ + + + Stomp Immunity Unnerf + stomp immunity unnerf + 2523246890 + Host Head any Pyromaniac make you immune stomps from moms foot (or simmilar) again like they did in AB+ + 1.1 + Public + + + diff --git a/main.lua b/main.lua index 8e95333..608852c 100644 --- a/main.lua +++ b/main.lua @@ -4,3 +4,4 @@ openUnnerfPack = RegisterMod("Open Unnerf Pack",1) require("Mods/MawOfVoidUnnerf/main") require("Mods/Orbital Unnerf/main") require("Mods/Soul Heart Generator Unnerf/main") +require("Mods/Stomp Immunity Unnerf/main") \ No newline at end of file