EffForceAttack Damage Entity By Amount
Problem
No support for having an entity damage another entity by a specific amount.
Solution
Updates EffForceAttack by adding 2 new patterns to add this support
Testing Completed
CODE
command /emptyhand:
trigger:
spawn a zombie at test-location:
set {_attacker} to entity
spawn a villager at test-location:
set {_victim} to entity
make {_attacker} attack {_victim}
clear entity within {_attacker}
clear entity within {_victim}
command /swordhand:
trigger:
spawn a zombie at test-location:
set {_attacker} to entity
set the tool of {_attacker} to a netherite sword
spawn a villager at test-location:
set {_victim} to entity
make {_attacker} attack {_victim}
clear entity within {_attacker}
clear entity within {_victim}
command /damage [<num: number = 1>]:
trigger:
spawn a zombie at test-location:
set {_attacker} to entity
spawn a villager at test-location:
set {_victim} to entity
make {_attacker} damage {_victim} by {_num}
clear entity within {_attacker}
clear entity within {_victim}
on damage:
broadcast "Damage %damage%"
broadcast "Final: %final damage%"
broadcast "Attacker: %attacker%"
Completes: #1729 Related: none
should have some test scripts
I did attempt making a test script but there seemed to be some discrepancies for the test (quickTest) versus a started up server (skriptTestDev) Such as, having a zombie equipped with a netherite sword was still dealing the same amount of damage as with no sword, on the test. But actually starting it up and testing manually it worked fine.
So I took advantage of your new PR template to provide the code I used to test manually.
I did attempt making a test script but there seemed to be some discrepancies for the test (quickTest) versus a started up server (skriptTestDev) Such as, having a zombie equipped with a netherite sword was still dealing the same amount of damage as with no sword, on the test. But actually starting it up and testing manually it worked fine.
Test what does work, though. It's understandable that it might not update items but you should be able to test the newly added syntax just fine.
tests failing
I know -> https://github.com/SkriptLang/Skript/issues/7921