Skriptで与えたダメージのdamage causeを変更したい

TCT

(damage cause)
SkRageのdamagesource
damage loop-entity by 50 with damagesource {_TNTdmg}



{_TNTdmg}、set {_TNTdmg} to new damage source with type "ENTITY_EXPLOSION"


、damage causeがattack

:
on place:
    if {Chosen_wolf::*} contains player:
        if player's tool is creeper head item:
            send "{@prefix} &a地雷を設置しました。"
            set {_TNTdmg} to new damage source with type "ENTITY_EXPLOSION"
            set damage source attacker of {_TNTdmg} to player
            loop 1000 times:
                wait 5 tick
                if "%block at location of event-block%" is "SKULL":
                    loop all entities in radius 2 around location of event-block:
                        loop-entity is set
                        loop-entity is not arrow
                        {Chosen_wolf::*} does not contain loop-entity
                        {Chosen_mad::*} does not contain loop-entity
                        {Chosen_fan::*} does not contain loop-entity
                        damage loop-entity by 50 with damage source {_TNTdmg}
                        send "{@prefix} &c地雷が発動しました。"
                        set block at location of event-block to air
                        stop loop
                else:
                    stop loop


with type "ENTITY_EXPLOSION"
https://github.com/akon1248/SkRage/blob/2.2/src/main/java/com/akon/skrage/skript/syntaxes/expressions/ExprDamageSources.java
、typeをLIGHTNING
on damage
if damage source is 1:

局attack
GitHub
Skript Addon. Contribute to akon1248/SkRage development by creating an account on GitHub.
SkRage/src/main/java/com/akon/skrage/skript/syntaxes/expressions/Ex...
Solution
typeはdamage cause


使
ExprDamageSourceExplosion:
    ID: ExprDamageSourceExplosion
    Description:
        爆発のダメージかどうか
    Return type: Boolean
    Changers:
        set
    Patterns:
        %damagesource%'s damage[ ]source explosion
        damage[ ]source explosion of %damagesource%
Was this page helpful?