This commit is contained in:
Zughy 2024-12-22 16:00:27 +00:00
parent fcce1394d7
commit b4472ac791
26 changed files with 315 additions and 19 deletions

View File

@ -2,7 +2,7 @@
## Mechanics ## Mechanics
### Critical hits ### Critical hits
Hitting players to their head with a raycast attack results in a critical hit (it can't be done with e.g. melee attacks for now, due to MT limitations). Hitting players to their head with a raycast attack results in a critical hit (it can't be done with e.g. melee attacks for now, due to LT limitations).
The formula is The formula is
``` ```
@ -25,14 +25,44 @@ As a general rule, every player metadata is set to `0` when entering the arena a
* set to `0` when successfully shooting (+ general rule) * set to `0` when successfully shooting (+ general rule)
* set to `1` when dying and when the celebration phase starts * set to `1` when dying and when the celebration phase starts
## Custom entity properties ## Custom Properties
Block League entities use specific fields, which are all `nil` by default Block League weapons, actions and entities use specific fields, which are all `nil` by default
### Weapon properties
* `_profile_description`: (string) the description that appears when selecting the weapon in the Block League profile
#### Action properties
* `_description`: (string) describes the action when selecting the weapon in the Block League profile
* `_friendly_fire`: (boolean) whether it should hurt your team (including yourself) as well
* `_friendly_dmg_perc`: (float) how much damage should deal in percentage, in case `_friendly_fire` is `true`. Range `0-1`
### Entity properties
Shared:
* `_teamID`: (int) the ID of the team the entity belongs to
#### Stand-alone weapons
(As for now, sentry guns)
* `_name`: (string) the name of the entity. Used to display it in the kill log
* `_loggable`: (boolean) whether the entity, once destroyed, shall appear in the kill log
* `_owner`: (string) who owns the entity, e.g. sentry guns
* `_can_be_targeted`: (boolean) whether the entity can be hit by stand-alone weapons such as sentries
* `_no_knockback`: (boolean) whether the weapon is subject to weapons' knocback. It requires `_can_be_targeted`
* `_dmg_received`: (table) tracks the damage dealt by every player and targettable entity, same as in the arena player property with the same name. Format `[p_name/p_name@ent._name] = {dmg, timestamp}`
* `_kill`: (function(self, killer)) custom actions to run when the entity is killed
* `_is_dying`: (boolean) whether the entity is dying. Used by `_kill`, hp are set to 1 in meanwhile
Each entity can then feature its unique fields
* Sentry guns: `_is_spawning`, `_arena`
#### Bullets
Unique fields
* Bombs: `_collided`, `_ignited`
* `_name`: the name of the entity. Used to display it in the kill log
* `_loggable`: whether the entity, once destroyed, shall appear in the kill log
* `_is_targettable`: whether the entity can be hit by stand-alone weapons such as sentries
* `_no_knockback`: whether the weapon is subject to weapons' knocback. It requires `_is_targettable`
* `_dmg_received`: table tracking the damage dealt by every player and targettable entity, same as in the arena player property with the same name. Format `[p_name/p_name@ent._name] = {dmg, timestamp}`
* `_kill(self, killer)`: custom actions to run when the entity is killed
* `_is_dying`: whether the entity is dying. Used by `_kill`, hp are set to 1 in meanwhile

View File

@ -5,6 +5,8 @@ CC BY-SA 4.0
bl_tutorial_sentry_explosion by Giov4 bl_tutorial_sentry_explosion by Giov4
all the rest by Zughy all the rest by Zughy
CC0
bl_bomb_smoke.png by Giov4
------------ ------------
@ -23,6 +25,7 @@ Sounds
(most audio files have been tweaked by Zughy) (most audio files have been tweaked by Zughy)
CC BY 3.0 CC BY 3.0
bl_bomb_ignite.ogg by THE_bizniss
bl_sentrygun_shoot.ogg by GreenFireSound, Francesco Corrado bl_sentrygun_shoot.ogg by GreenFireSound, Francesco Corrado
bl_hmg_shoot.ogg by tcpp (currently unused) bl_hmg_shoot.ogg by tcpp (currently unused)
bl_peacifier_shoot_ifitonlyworkedproperly.ogg by Michael Klier (currently unused, MT ruins the quality) bl_peacifier_shoot_ifitonlyworkedproperly.ogg by Michael Klier (currently unused, MT ruins the quality)
@ -34,6 +37,7 @@ bl_voice_critical.ogg by EFlexMusic
bl_voice_fight.ogg by EFlexMusic bl_voice_fight.ogg by EFlexMusic
CC BY 4.0 CC BY 4.0
bl_bomb_explosion.ogg by timgormly
bl_crowd_ohno.ogg by dobroide bl_crowd_ohno.ogg by dobroide
bl_kunai_swing.* by Glaneur de sons bl_kunai_swing.* by Glaneur de sons
bl_kunai_teleport.ogg by EminYILDIRIM bl_kunai_teleport.ogg by EminYILDIRIM
@ -46,6 +50,7 @@ CC BY-SA 4.0
bl_pixelgun_shoot.ogg by Francesco Corrado bl_pixelgun_shoot.ogg by Francesco Corrado
CC0 CC0
bl_bomb_throw.ogg by bay_area_bob
bl_crowd_cheer.ogg by wangzhuokun bl_crowd_cheer.ogg by wangzhuokun
bl_gui_equip_confirm.ogg by EminYILDIRIM bl_gui_equip_confirm.ogg by EminYILDIRIM
bl_hit.ogg by cabled_mess bl_hit.ogg by cabled_mess

View File

@ -150,6 +150,7 @@ dofile(srcpath .. "/skills/sp+.lua")
-- abstract weapons -- abstract weapons
dofile(srcpath .. "/weapons/weapons_utils.lua") dofile(srcpath .. "/weapons/weapons_utils.lua")
-- weapons -- weapons
dofile(srcpath .. "/weapons/bomb.lua")
dofile(srcpath .. "/weapons/peacifier.lua") dofile(srcpath .. "/weapons/peacifier.lua")
dofile(srcpath .. "/weapons/pixelgun.lua") dofile(srcpath .. "/weapons/pixelgun.lua")
dofile(srcpath .. "/weapons/propulsor.lua") dofile(srcpath .. "/weapons/propulsor.lua")

View File

@ -38,6 +38,9 @@ Spectators: @1=Zuschauer: @1
##[ src/_load.lua ]## ##[ src/_load.lua ]##
Voices=Stimmen Voices=Stimmen
Bomb ignites=
Bomb explodes=
Bomb thrown=
Crowd cheering=Publikum jubelt Crowd cheering=Publikum jubelt
Sad crowd=Trauriges Publikum Sad crowd=Trauriges Publikum
Confirmation sound=Bestätigungston Confirmation sound=Bestätigungston
@ -150,6 +153,11 @@ Expose yourself without any risk=Zeigen Sie sich ohne Risiko
Increases your stamina points by 25 @1(100>125)=Erhöht ihre Ausdauerpunkte um 25 @1(100>125) Increases your stamina points by 25 @1(100>125)=Erhöht ihre Ausdauerpunkte um 25 @1(100>125)
Great choice for strikers, as it allows players to run more and perform tricks more often.=Gute Wahl für Stürmer, da dies Spielern erlaubt, mehr zu rennen und mehr Tricks durchzuführen. Great choice for strikers, as it allows players to run more and perform tricks more often.=Gute Wahl für Stürmer, da dies Spielern erlaubt, mehr zu rennen und mehr Tricks durchzuführen.
##[ src/weapons/bomb.lua ]##
Bomb=
K A B O O M !=
Throw, AoE damage. It dies with you, @1♥=
##[ src/weapons/entities/sentrygun_entity.lua ]## ##[ src/weapons/entities/sentrygun_entity.lua ]##
@1's Sentry Gun=Wachkanone von @1 @1's Sentry Gun=Wachkanone von @1

View File

@ -38,6 +38,9 @@ Spectators: @1=Espectadores: @1
##[ src/_load.lua ]## ##[ src/_load.lua ]##
Voices=Voces Voices=Voces
Bomb ignites=
Bomb explodes=
Bomb thrown=
Crowd cheering=Aplausos de la multitud Crowd cheering=Aplausos de la multitud
Sad crowd=Multitud triste Sad crowd=Multitud triste
Confirmation sound=Sonido de confirmación Confirmation sound=Sonido de confirmación
@ -150,6 +153,11 @@ Expose yourself without any risk=Exponerte a ti mismo sin ningún riesgo
Increases your stamina points by 25 @1(100>125)=Aumenta tu puntos de estamina en 25 @1(100>125) Increases your stamina points by 25 @1(100>125)=Aumenta tu puntos de estamina en 25 @1(100>125)
Great choice for strikers, as it allows players to run more and perform tricks more often.=Excelente para delanteros, ya que permite a los jugadores correr más y hacer más acrobacias. Great choice for strikers, as it allows players to run more and perform tricks more often.=Excelente para delanteros, ya que permite a los jugadores correr más y hacer más acrobacias.
##[ src/weapons/bomb.lua ]##
Bomb=
K A B O O M !=
Throw, AoE damage. It dies with you, @1♥=
##[ src/weapons/entities/sentrygun_entity.lua ]## ##[ src/weapons/entities/sentrygun_entity.lua ]##
@1's Sentry Gun=Torreta de @1 @1's Sentry Gun=Torreta de @1

View File

@ -38,6 +38,9 @@ Spectators: @1=
##[ src/_load.lua ]## ##[ src/_load.lua ]##
Voices= Voices=
Bomb ignites=
Bomb explodes=
Bomb thrown=
Crowd cheering= Crowd cheering=
Sad crowd= Sad crowd=
Confirmation sound= Confirmation sound=
@ -150,6 +153,11 @@ Expose yourself without any risk=
Increases your stamina points by 25 @1(100>125)=Hozzáad az állóképességed 25-tel @1(100>125) Increases your stamina points by 25 @1(100>125)=Hozzáad az állóképességed 25-tel @1(100>125)
Great choice for strikers, as it allows players to run more and perform tricks more often.=Nagyszerű választás csatároknak, mivel így a játékosok többet futhatnak és gyakrabban hajthatnak végre trükköket. Great choice for strikers, as it allows players to run more and perform tricks more often.=Nagyszerű választás csatároknak, mivel így a játékosok többet futhatnak és gyakrabban hajthatnak végre trükköket.
##[ src/weapons/bomb.lua ]##
Bomb=
K A B O O M !=
Throw, AoE damage. It dies with you, @1♥=
##[ src/weapons/entities/sentrygun_entity.lua ]## ##[ src/weapons/entities/sentrygun_entity.lua ]##
@1's Sentry Gun= @1's Sentry Gun=

View File

@ -38,6 +38,9 @@ Spectators: @1=Spettanti: @1
##[ src/_load.lua ]## ##[ src/_load.lua ]##
Voices=Voci Voices=Voci
Bomb ignites=Bomba si innesca
Bomb explodes=Bomba esplode
Bomb thrown=Lancio bomba
Crowd cheering=Folla esulta Crowd cheering=Folla esulta
Sad crowd=Folla si abbatte Sad crowd=Folla si abbatte
Confirmation sound=Suono di conferma Confirmation sound=Suono di conferma
@ -150,6 +153,11 @@ Expose yourself without any risk=Esponiti senza alcun rischio
Increases your stamina points by 25 @1(100>125)=Aumenta i tuoi punti stamina di 25 @1(100>125) Increases your stamina points by 25 @1(100>125)=Aumenta i tuoi punti stamina di 25 @1(100>125)
Great choice for strikers, as it allows players to run more and perform tricks more often.=Ottima scelta per le punte, poiché permette di correre di più ed eseguire più acrobazie. Great choice for strikers, as it allows players to run more and perform tricks more often.=Ottima scelta per le punte, poiché permette di correre di più ed eseguire più acrobazie.
##[ src/weapons/bomb.lua ]##
Bomb=Bomba
K A B O O M !=K A B U M !
Throw, AoE damage. It dies with you, @1♥=Lancia, danno ad area. Muore con te, @1♥
##[ src/weapons/entities/sentrygun_entity.lua ]## ##[ src/weapons/entities/sentrygun_entity.lua ]##
@1's Sentry Gun=Torretta Autom. di @1 @1's Sentry Gun=Torretta Autom. di @1

View File

@ -38,6 +38,9 @@ Spectators: @1=Obserwatorzy: @1
##[ src/_load.lua ]## ##[ src/_load.lua ]##
Voices=Głosy Voices=Głosy
Bomb ignites=
Bomb explodes=
Bomb thrown=
Crowd cheering=Tłum wiwatuje Crowd cheering=Tłum wiwatuje
Sad crowd=Smutny tłum Sad crowd=Smutny tłum
Confirmation sound=Dźwięk potwierdzenia Confirmation sound=Dźwięk potwierdzenia
@ -150,6 +153,11 @@ Expose yourself without any risk=
Increases your stamina points by 25 @1(100>125)=Zwiększa punkty kondycji o 25 @1(100>125) Increases your stamina points by 25 @1(100>125)=Zwiększa punkty kondycji o 25 @1(100>125)
Great choice for strikers, as it allows players to run more and perform tricks more often.=Dobry wybór dla napastników, ponieważ pozwala graczom biegać dłużej i częściej wykonywać sztuczki. Great choice for strikers, as it allows players to run more and perform tricks more often.=Dobry wybór dla napastników, ponieważ pozwala graczom biegać dłużej i częściej wykonywać sztuczki.
##[ src/weapons/bomb.lua ]##
Bomb=
K A B O O M !=
Throw, AoE damage. It dies with you, @1♥=
##[ src/weapons/entities/sentrygun_entity.lua ]## ##[ src/weapons/entities/sentrygun_entity.lua ]##
@1's Sentry Gun= @1's Sentry Gun=

View File

@ -40,6 +40,9 @@ Spectators: @1=Наблюдатели: @1
##[ src/_load.lua ]## ##[ src/_load.lua ]##
Voices=Голоса Voices=Голоса
Bomb ignites=
Bomb explodes=
Bomb thrown=
Crowd cheering=Аплодирует толпа Crowd cheering=Аплодирует толпа
Sad crowd=Грустит толпа Sad crowd=Грустит толпа
Confirmation sound=Звук подтверждения Confirmation sound=Звук подтверждения
@ -152,6 +155,11 @@ Expose yourself without any risk=Откройся без какого-либо
Increases your stamina points by 25 @1(100>125)=Восстанавливает твою выносливость на 25 очков @1(100>125) Increases your stamina points by 25 @1(100>125)=Восстанавливает твою выносливость на 25 очков @1(100>125)
Great choice for strikers, as it allows players to run more and perform tricks more often.=Хороший выбор для нападения, так как он позволяет игрокам бежать больше и делать трюки гораздо чаще. Great choice for strikers, as it allows players to run more and perform tricks more often.=Хороший выбор для нападения, так как он позволяет игрокам бежать больше и делать трюки гораздо чаще.
##[ src/weapons/bomb.lua ]##
Bomb=
K A B O O M !=
Throw, AoE damage. It dies with you, @1♥=
##[ src/weapons/entities/sentrygun_entity.lua ]## ##[ src/weapons/entities/sentrygun_entity.lua ]##
@1's Sentry Gun=Турель @1 @1's Sentry Gun=Турель @1

View File

@ -38,6 +38,9 @@ Spectators: @1=
##[ src/_load.lua ]## ##[ src/_load.lua ]##
Voices= Voices=
Bomb ignites=
Bomb explodes=
Bomb thrown=
Crowd cheering= Crowd cheering=
Sad crowd= Sad crowd=
Confirmation sound= Confirmation sound=
@ -150,6 +153,11 @@ Expose yourself without any risk=
Increases your stamina points by 25 @1(100>125)= Increases your stamina points by 25 @1(100>125)=
Great choice for strikers, as it allows players to run more and perform tricks more often.= Great choice for strikers, as it allows players to run more and perform tricks more often.=
##[ src/weapons/bomb.lua ]##
Bomb=
K A B O O M !=
Throw, AoE damage. It dies with you, @1♥=
##[ src/weapons/entities/sentrygun_entity.lua ]## ##[ src/weapons/entities/sentrygun_entity.lua ]##
@1's Sentry Gun= @1's Sentry Gun=

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -89,7 +89,9 @@ function get_formspec(p_name)
local right_elem = table.concat(info_section, "") local right_elem = table.concat(info_section, "")
local curr_achvmt_amnt = #achvmt_lib.get_player_achievements(p_name, {mod = "block_league"}) local curr_achvmt_amnt = #achvmt_lib.get_player_achievements(p_name, {mod = "block_league"})
local all_achvmt_amnt = achvmt_lib.get_amount({mod = "block_league"}) local all_achvmt_amnt = achvmt_lib.get_amount({mod = "block_league"})
local soon = minetest.check_player_privs(p_name, "blockleague_admin") and "image_button[6.35.10,1.11;0.85,0.85;bl_sentrygun.png;wslot;sentry_gun]" or local soon = minetest.check_player_privs(p_name, "blockleague_admin") and "image_button[6.35.10,1.11;0.85,0.85;bl_sentrygun.png;wslot;sentry_gun]" ..
"image[0,2.2;1.05,1.05;bl_gui_profile_inv_weapon_unlocked.png]" .. "image_button[0.1,2.3;0.85,0.85;bl_bomb.png;wslot;bomb]"
or
"image[6.35,1.11;0.85,0.85;blank.png^[multiply:#777777]" .. "image[6.35,1.11;0.85,0.85;blank.png^[multiply:#777777]" ..
"hypertext[6.28,1.05;0.95,0.95;soon_tm;<global size=13 halign=center valign=middle><style color=#abc0c0><b>" .. S("Soon") .. "</b>]" "hypertext[6.28,1.05;0.95,0.95;soon_tm;<global size=13 halign=center valign=middle><style color=#abc0c0><b>" .. S("Soon") .. "</b>]"

View File

@ -5,6 +5,9 @@ local S = minetest.get_translator("block_league")
---------------------------------------------- ----------------------------------------------
audio_lib.register_type("block_league", "voices", {mod = S("Block League"), type = S("Voices")}) audio_lib.register_type("block_league", "voices", {mod = S("Block League"), type = S("Voices")})
audio_lib.register_sound("sfx", "bl_bomb_ignite", S("Bomb ignites"), {ephemeral = false}, 1.89)
audio_lib.register_sound("sfx", "bl_bomb_explosion", S("Bomb explodes"), {gain = 2, pitch = 0.7})
audio_lib.register_sound("sfx", "bl_bomb_throw", S("Bomb thrown"), {pitch = 0.85})
audio_lib.register_sound("sfx", "bl_crowd_cheer", S("Crowd cheering"), nil, 2.95) audio_lib.register_sound("sfx", "bl_crowd_cheer", S("Crowd cheering"), nil, 2.95)
audio_lib.register_sound("sfx", "bl_crowd_ohno", S("Sad crowd"), nil, 2.12) audio_lib.register_sound("sfx", "bl_crowd_ohno", S("Sad crowd"), nil, 2.12)
audio_lib.register_sound("sfx", "bl_gui_equip_confirm", S("Confirmation sound")) audio_lib.register_sound("sfx", "bl_gui_equip_confirm", S("Confirmation sound"))

View File

@ -0,0 +1,188 @@
local S = minetest.get_translator("block_league")
local dmg = 24
local function ignite_animation() end
local bomb_bullet = {
initial_properties = {
name = "block_league:bomb",
visual = "mesh",
mesh = "bl_bomb.glb",
textures = {"bl_bomb_texture.png"},
collisionbox = {-0.35, -0.35, -0.35, 0.35, 0.35, 0.35},
visual_size = {x=5, y=5},
physical = true,
collide_with_objects = false
},
_collided = false,
_ignited = false,
_teamID = nil,
-- cambia texture a seconda del colore della squadra
on_activate = function(self, staticdata)
if not arena_lib.is_player_playing(self._p_name) then return end
self._teamID = arena_lib.get_teamID(self._p_name)
local col = self._teamID == 1 and "orange" or "blue"
local bomb = self.object
bomb:set_properties({textures = {bomb:get_properties().textures[1] .. "^[colorize:" .. col .. ":85"}})
end,
on_step = function(self, dtime, moveresult)
local owner = core.get_player_by_name(self._p_name)
-- distruggi se proprietariə muore
if owner and owner:get_hp() <= 0 then
for _, obj in ipairs(core.get_objects_inside_radius(self.object:get_pos(), 20)) do
if obj:is_player() then
audio_lib.stop_sound(obj:get_player_name(), "bl_bomb_ignite")
end
end
self:_destroy()
end
if moveresult.collides then
if not self._collided then
self._collided = true
ignite_animation(self)
end
end
if self._collided and not self._ignited then
core.after(2, function()
self:_destroy()
end)
self._ignited = true
end
end
}
weapons_lib.register_weapon("block_league:bomb", {
description = S("Bomb"),
_profile_description = S("K A B O O M !"),
mesh = "bl_bomb.glb",
tiles = {"bl_bomb_texture.png"},
wield_scale = {x=6.5, y=6.5, z=6.5},
inventory_image = "bl_bomb.png",
weapon_type = "ranged",
magazine = 1,
limited_magazine = true, -- TODO: sarebbe carino se potessi averne due in tutto, con capienza max 1
crosshair = "bl_bomb_crosshair.png",
can_use_weapon = function(player, action)
return block_league.util_weapon_use_check(player)
end,
can_alter_speed = function(player)
return block_league.util_on_can_alter_speed(player:get_player_name())
end,
on_after_hit = function(hitter, weapon, action, objects_hit, total_damage)
block_league.util_on_after_hit(hitter, weapon, objects_hit, total_damage)
end,
action1 = {
type = "bullet",
_description = S("Throw, AoE damage. It dies with you, @1♥", "<style color=#f66c77>" .. dmg),
damage = dmg,
delay = 1,
_friendly_fire = true,
_friendly_dmg_perc = 0.25,
sound = "bl_bomb_throw",
trail = {
image = "weaponslib_test1_trail2.png",
life = 1,
size = 2,
amount = 5,
},
bullet = {
entity = bomb_bullet,
speed = 25,
bounciness = 0,
weight = 50,
friction = 0.1,
lifetime = 20,
explosion = {
range = 5,
texture = "weaponslib_test1_trail2.png",
sound = "bl_bomb_explosion",
},
remove_on_contact = false,
has_gravity = true,
},
on_hit = function(hitter, target, weapon, action, hit_point, damage, knockback)
return block_league.util_on_hit(hitter, target, weapon, action, hit_point, damage, knockback)
end,
}
})
----------------------------------------------
---------------FUNZIONI LOCALI----------------
----------------------------------------------
---
function ignite_animation(self)
local bomb = self.object
core.add_particlespawner({
amount = 40,
time = 2,
attached = bomb,
minvel = {x = -0.5, y = 0.1, z = -0.5},
maxvel = {x = 0.5, y = 1, z = 0.5},
minsize = 5,
maxsize = 8,
texture = {
name = "bl_bomb_smoke.png",
alpha_tween = {1, 0},
scale_tween = {
{x = 0.2, y = 0.2},
{x = 1, y = 1},
}
},
})
audio_lib.play_sound("bl_bomb_ignite", {object = bomb, max_hear_distance = 8})
bomb:set_properties({textures = {"bl_bomb_texture_igniting1.png"}})
core.after(1, function()
if not self then return end
bomb:set_properties({textures = {"bl_bomb_texture_igniting1.png^[colorize:red:50"}})
core.after(0.8, function()
if not self then return end
bomb:set_properties({textures = {"bl_bomb_texture_igniting2.png^[colorize:orange:100"}})
core.after(0.1, function()
if not self then return end
bomb:set_properties({visual_size = {x=6, y=6}, textures = {"bl_bomb_texture_igniting3.png^[brighten"}})
-- questo non dovrebbe vedersi praticamente mai, ma giusto nel caso
core.after(0.1, function()
if not self then return end
bomb:set_properties({visual_size = {x=6.5, y=6.5}, textures = {"bl_bomb_texture_igniting4.png^[brighten"}})
end)
end)
end)
end)
end

View File

@ -48,12 +48,27 @@ function block_league.util_on_hit(hitter, target, weapon, action, hit_point, dam
then return 0 end then return 0 end
local arena = arena_lib.get_arena_by_player(p_name) local arena = arena_lib.get_arena_by_player(p_name)
local self_hit = p_name == t_name
if is_target_player then -- se non c'è fuoco amico, non fare danno allɜ componenti della stessa squadra..
if arena_lib.is_player_in_same_team(arena, p_name, t_name) and not self_hit then return 0 end -- TODO: in futuro per bomba usa proprietà personalizzata arma tipo _can_dmg_team if not action._friendly_fire then
local self_hit = p_name == t_name
if is_target_player then
if arena_lib.is_player_in_same_team(arena, p_name, t_name) and not self_hit then return 0 end
else
if block_league.is_entity_in_player_team(p_name, target:get_luaentity()) then return 0 end
end
-- ..sennò riduci a seconda della percentuale specificata
else else
if block_league.is_entity_in_player_team(p_name, target:get_luaentity()) then return 0 end if is_target_player then
if arena_lib.is_player_in_same_team(arena, p_name, t_name) then
damage = damage * action._friendly_dmg_perc
end
else
if block_league.is_entity_in_player_team(p_name, target:get_luaentity()) then
damage = damage * action._friendly_dmg_perc
end
end
end end
local is_critical = hit_point and hit_point.y - target:get_pos().y > 1.275 -- TODO: la spada non lo passa local is_critical = hit_point and hit_point.y - target:get_pos().y > 1.275 -- TODO: la spada non lo passa
@ -64,10 +79,6 @@ function block_league.util_on_hit(hitter, target, weapon, action, hit_point, dam
audio_lib.play_sound("bl_voice_critical", {to_player = p_name}) audio_lib.play_sound("bl_voice_critical", {to_player = p_name})
end end
if self_hit then
damage = damage / 2
end
if not is_target_player and target:get_luaentity()._no_knockback then if not is_target_player and target:get_luaentity()._no_knockback then
knockback = 0 knockback = 0
end end

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B