Skip to content

Commit

Permalink
added Stomp Immunity Unnerf
Browse files Browse the repository at this point in the history
  • Loading branch information
KeinNiemand committed Jul 22, 2021
1 parent ae9c531 commit 932ce95
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Mods/Stomp Immunity Unnerf/main.lua
Original file line number Diff line number Diff line change
@@ -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)
11 changes: 11 additions & 0 deletions Mods/Stomp Immunity Unnerf/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<name>Stomp Immunity Unnerf</name>
<directory>stomp immunity unnerf</directory>
<id>2523246890</id>
<description>Host Head any Pyromaniac make you immune stomps from moms foot (or simmilar) again like they did in AB+</description>
<version>1.1</version>
<visibility>Public</visibility>
<tag id="Lua"/>
<tag id="Tweaks"/>
</metadata>
1 change: 1 addition & 0 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 932ce95

Please sign in to comment.