larger tree takes double time to chop down

This commit is contained in:
minjaesong
2024-03-03 02:11:18 +09:00
parent f07a6f6430
commit 39fca59ea7

View File

@@ -124,6 +124,8 @@ object AxeCore {
else if (tileprop.hasAllTag(listOf("TREE", "TREETRUNK") + additionalCheckTags)) {
val actionInterval = actorvalue.getAsDouble(AVKey.ACTION_INTERVAL)!!
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()) {
PickaxeCore.makeNoiseTileTouching(actor, tile)
@@ -131,7 +133,7 @@ object AxeCore {
INGAME.world.inflictTerrainDamage(
x, y,
Calculate.hatchetPower(actor, item?.material) * swingDmgToFrameDmg,
Calculate.hatchetPower(actor, item?.material) * swingDmgToFrameDmg * axePowerMult,
false
).let { (tileBroken, _) ->
// tile busted