mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-15 16:16:10 +09:00
larger tree takes double time to chop down
This commit is contained in:
@@ -124,6 +124,8 @@ object AxeCore {
|
|||||||
else if (tileprop.hasAllTag(listOf("TREE", "TREETRUNK") + additionalCheckTags)) {
|
else if (tileprop.hasAllTag(listOf("TREE", "TREETRUNK") + additionalCheckTags)) {
|
||||||
val actionInterval = actorvalue.getAsDouble(AVKey.ACTION_INTERVAL)!!
|
val actionInterval = actorvalue.getAsDouble(AVKey.ACTION_INTERVAL)!!
|
||||||
val swingDmgToFrameDmg = delta.toDouble() / actionInterval
|
val swingDmgToFrameDmg = delta.toDouble() / actionInterval
|
||||||
|
val isLargeTree = tileprop.hasTag("TREELARGE")
|
||||||
|
val axePowerMult = if (isLargeTree) 0.5f else 1f
|
||||||
|
|
||||||
if (INGAME.WORLD_UPDATE_TIMER % 11 == (Math.random() * 3).toInt()) {
|
if (INGAME.WORLD_UPDATE_TIMER % 11 == (Math.random() * 3).toInt()) {
|
||||||
PickaxeCore.makeNoiseTileTouching(actor, tile)
|
PickaxeCore.makeNoiseTileTouching(actor, tile)
|
||||||
@@ -131,7 +133,7 @@ object AxeCore {
|
|||||||
|
|
||||||
INGAME.world.inflictTerrainDamage(
|
INGAME.world.inflictTerrainDamage(
|
||||||
x, y,
|
x, y,
|
||||||
Calculate.hatchetPower(actor, item?.material) * swingDmgToFrameDmg,
|
Calculate.hatchetPower(actor, item?.material) * swingDmgToFrameDmg * axePowerMult,
|
||||||
false
|
false
|
||||||
).let { (tileBroken, _) ->
|
).let { (tileBroken, _) ->
|
||||||
// tile busted
|
// tile busted
|
||||||
|
|||||||
Reference in New Issue
Block a user