Damage Calculation

User avatar
SegFault22
Member
 
Posts: 870
Joined: Mon May 21, 2012 03:17

Damage Calculation

by SegFault22 » Tue Apr 15, 2014 22:25

How is damage dealt with a weapon calculated?
Resources are abundant; only money is scarce. People should not have to work hard and remain poor just to pay for the needs of survival.
Society can thrive without money - but only if productive members of society are rewarded for being productive.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Tue Apr 15, 2014 22:31

SegFault22 wrote:How is damage dealt with a weapon calculated?
I'll explain in the code tags;

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_tool("tools:sword_stone", {
    description = "Stone Sword",
    inventory_image = "tool_stonesword.png",
    tool_capabilities = {
        full_punch_interval = 4.1,
        max_drop_level = 0,
        groupcaps = {
            snappy={times={[1]=1.2, [2]=0.6, [3]=0.3}, uses=17, maxlevel=1},
        },
        damage_groups = {fleshy=5}, --this is how many hearts (to other players) the sword will do, and only until
                -- the sword has moved itself back into it's resting position, it will do full damage again, while waiting 2.05
                -- seconds means it will only do half the damage, while having to wait again to use it.
                -- i belive fleshy = 3 is the full damage, fleshy = 2 does 75%, and so on. immortal = 0 disables damage.
    }
})

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
SegFault22
Member
 
Posts: 870
Joined: Mon May 21, 2012 03:17

by SegFault22 » Tue Apr 15, 2014 23:30

Jordach wrote:
SegFault22 wrote:How is damage dealt with a weapon calculated?
I'll explain in the code tags;

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_tool("tools:sword_stone", {
    description = "Stone Sword",
    inventory_image = "tool_stonesword.png",
    tool_capabilities = {
        full_punch_interval = 4.1,
        max_drop_level = 0,
        groupcaps = {
            snappy={times={[1]=1.2, [2]=0.6, [3]=0.3}, uses=17, maxlevel=1},
        },
        damage_groups = {fleshy=5}, --this is how many hearts (to other players) the sword will do, and only until
                -- the sword has moved itself back into it's resting position, it will do full damage again, while waiting 2.05
                -- seconds means it will only do half the damage, while having to wait again to use it.
                -- i belive fleshy = 3 is the full damage, fleshy = 2 does 75%, and so on. immortal = 0 disables damage.
    }
})

Thank you. I didn't know that the proposal for damage was already implemented.
Resources are abundant; only money is scarce. People should not have to work hard and remain poor just to pay for the needs of survival.
Society can thrive without money - but only if productive members of society are rewarded for being productive.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 12 guests

cron