Arena - buffed hammer and fire flower

This commit is contained in:
MysterD 2023-06-02 21:59:07 -07:00
parent 84c978e141
commit 44df9f864c
2 changed files with 15 additions and 12 deletions

View file

@ -29,7 +29,7 @@ function bhv_arena_bobomb_intersects_player(obj, m, pos, radius)
return ret return ret
end end
function bhv_arena_bobomb_expode(obj) function bhv_arena_bobomb_expode(obj, directHitLocal)
obj.oAction = 1 obj.oAction = 1
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
obj_set_billboard(obj) obj_set_billboard(obj)
@ -48,7 +48,10 @@ function bhv_arena_bobomb_expode(obj)
local radius = 500 local radius = 500
if np.globalIndex == obj.oArenaBobombGlobalOwner then radius = 300 end if np.globalIndex == obj.oArenaBobombGlobalOwner then radius = 300 end
if validAttack and bhv_arena_bobomb_intersects_player(obj, m, a, radius) and mario_health_float(m) > 0 then if validAttack and bhv_arena_bobomb_intersects_player(obj, m, a, radius) and mario_health_float(m) > 0 then
obj.oDamageOrCoinValue = 2
if directHitLocal then
obj.oDamageOrCoinValue = 3 obj.oDamageOrCoinValue = 3
end
interact_damage(m, INTERACT_DAMAGE, obj) interact_damage(m, INTERACT_DAMAGE, obj)
e.lastDamagedByGlobal = obj.oArenaBobombGlobalOwner e.lastDamagedByGlobal = obj.oArenaBobombGlobalOwner
@ -90,7 +93,7 @@ function bhv_arena_bobomb_thrown_loop(obj)
local m = gMarioStates[i] local m = gMarioStates[i]
if active_player(m) and global_index_hurts_mario_state(obj.oArenaBobombGlobalOwner, m) and not is_invuln_or_intang(m) then if active_player(m) and global_index_hurts_mario_state(obj.oArenaBobombGlobalOwner, m) and not is_invuln_or_intang(m) then
if bhv_arena_bobomb_intersects_player(obj, m, a, 100) then if bhv_arena_bobomb_intersects_player(obj, m, a, 100) then
bhv_arena_bobomb_expode(obj) bhv_arena_bobomb_expode(obj, (i == 0))
return return
end end
end end
@ -105,7 +108,7 @@ function bhv_arena_bobomb_thrown_loop(obj)
local floorHeight = find_floor_height(obj.oPosX, obj.oPosY + 100, obj.oPosZ) local floorHeight = find_floor_height(obj.oPosX, obj.oPosY + 100, obj.oPosZ)
if obj.oTimer > 30 * 1 or info.surface ~= nil or obj.oPosY < floorHeight then if obj.oTimer > 30 * 1 or info.surface ~= nil or obj.oPosY < floorHeight then
bhv_arena_bobomb_expode(obj) bhv_arena_bobomb_expode(obj, false)
return return
else else
obj.oPosX = obj.oPosX + dir.x obj.oPosX = obj.oPosX + dir.x

View file

@ -2,7 +2,7 @@ define_custom_obj_fields({
oArenaFlameGlobalOwner = 'u32', oArenaFlameGlobalOwner = 'u32',
}) })
local sArenaChildFlameLife = 30 * 1.5 local sArenaChildFlameLife = 30 * 1.8
function bhv_arena_child_flame_init(obj) function bhv_arena_child_flame_init(obj)
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
@ -14,11 +14,11 @@ function bhv_arena_child_flame_init(obj)
obj.oGraphYOffset = 30 obj.oGraphYOffset = 30
obj.hitboxRadius = 30 obj.hitboxRadius = 30
obj.hitboxHeight = 10 obj.hitboxHeight = 30
obj.hitboxDownOffset = 0 obj.hitboxDownOffset = 0
obj.hurtboxRadius = 30 obj.hurtboxRadius = 30
obj.hurtboxHeight = 10 obj.hurtboxHeight = 30
obj.oWallHitboxRadius = 50 obj.oWallHitboxRadius = 50
obj.oGravity = -400 / 100 obj.oGravity = -400 / 100
@ -48,7 +48,7 @@ function bhv_arena_child_flame_loop(obj)
local lifeRemain = (sArenaChildFlameLife - obj.oTimer) / sArenaChildFlameLife local lifeRemain = (sArenaChildFlameLife - obj.oTimer) / sArenaChildFlameLife
local size = 3 * (1 - (1 - lifeRemain) ^ 3) local size = 3 * (1 - (1 - lifeRemain) ^ 3)
obj_scale(obj, size) obj_scale(obj, size)
if size < 1.5 then if size < 0.5 then
obj.oInteractType = 0 obj.oInteractType = 0
end end
@ -77,12 +77,12 @@ function bhv_arena_flame_init(obj)
end end
obj.oGraphYOffset = 30 obj.oGraphYOffset = 30
obj.hitboxRadius = 75 obj.hitboxRadius = 100
obj.hitboxHeight = 30 obj.hitboxHeight = 50
obj.hitboxDownOffset = 25 obj.hitboxDownOffset = 25
obj.hurtboxRadius = 75 obj.hurtboxRadius = 100
obj.hurtboxHeight = 30 obj.hurtboxHeight = 50
obj.oWallHitboxRadius = 100 obj.oWallHitboxRadius = 100
obj.oGravity = -400 / 100 obj.oGravity = -400 / 100