1 Star 0 Fork 0

Alanisia/ygopro-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
c1127737.lua 1.86 KB
一键复制 编辑 原始数据 按行查看 历史
mercury233 提交于 2017-06-12 20:58 . update
--異次元の古戦場-サルガッソ
function c1127737.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1127737,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c1127737.damcon1)
e2:SetTarget(c1127737.damtg1)
e2:SetOperation(c1127737.damop1)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c1127737.damcon2)
e2:SetOperation(c1127737.damop2)
c:RegisterEffect(e2)
end
function c1127737.damcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():IsSummonType(SUMMON_TYPE_XYZ)
end
function c1127737.damtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(eg:GetFirst():GetSummonPlayer())
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,eg:GetFirst():GetSummonPlayer(),500)
end
function c1127737.damop1(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if not Duel.IsPlayerAffectedByEffect(p,37511832) then
Duel.Damage(p,d,REASON_EFFECT)
end
end
end
function c1127737.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c1127737.damcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1127737.cfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,1,nil)
end
function c1127737.damop2(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer()
if not Duel.IsPlayerAffectedByEffect(p,37511832) then
Duel.Hint(HINT_CARD,0,1127737)
Duel.Damage(p,500,REASON_EFFECT)
end
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/alanisia/ygopro-scripts.git
git@gitee.com:alanisia/ygopro-scripts.git
alanisia
ygopro-scripts
ygopro-scripts
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385