Commit 410931b4 authored by GuGu's avatar GuGu

Update c25096.lua 赋予效果重写

parent f5009fe4
Pipeline #26280 passed with stage
in 8 seconds
......@@ -22,14 +22,19 @@ function c25096.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_EQUIP)
e4:SetRange(LOCATION_SZONE)
--e4:SetReset(RESET_EVENT+0xde0000)
e4:SetOperation(c25096.op)
c:RegisterEffect(e4)
--add type_effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCode(EFFECT_ADD_TYPE)
e4:SetCondition(c25096.efcon1)
e4:SetValue(TYPE_EFFECT)
c:RegisterEffect(e4)
local e41=e4:Clone()
e41:SetCode(EFFECT_REMOVE_TYPE)
e41:SetCondition(c25096.efcon2)
e41:SetValue(TYPE_NORMAL)
c:RegisterEffect(e41)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -43,6 +48,24 @@ function c25096.initial_effect(c)
e6:SetCondition(c25096.recon)
e6:SetValue(LOCATION_REMOVED)
--c:RegisterEffect(e6)
--draw
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(25096,0))
e7:SetCategory(CATEGORY_DRAW)
e7:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetTarget(c25096.thtg)
e7:SetOperation(c25096.thop)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e8:SetRange(LOCATION_SZONE)
e8:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e8:SetTarget(c25096.eftg)
e8:SetLabelObject(e7)
c:RegisterEffect(e8)
end
function c25096.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
......@@ -61,47 +84,26 @@ function c25096.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c25096.op(e,tp,eg,ep,ev,re,r,rp)
if eg:GetFirst()~=e:GetHandler() then return end
local tc=e:GetHandler():GetEquipTarget()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(25096,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
--e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetLabelObject(e:GetHandler())
e1:SetCondition(c25096.thcon)
e1:SetTarget(c25096.thtg)
e1:SetOperation(c25096.thop)
tc:RegisterEffect(e1)
if e1:GetHandler()==nil then return end
--reset
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCondition(c25096.thcon2)
e0:SetOperation(c25096.dsop2)
e0:SetLabelObject(e1)
Duel.RegisterEffect(e0,tp)
function c25096.efcon1(e)
local eqc=e:GetHandler():GetEquipTarget()
return eqc:GetOriginalType()&TYPE_EFFECT==0
end
function c25096.thcon(e)
local g=e:GetHandler():GetEquipGroup()
if g:IsContains(e:GetLabelObject()) then
return not e:GetLabelObject():IsDisabled()
else return false
end
function c25096.efcon2(e)
local eqc=e:GetHandler():GetEquipTarget()
return eqc:GetOriginalType()&TYPE_NORMAL~=0
end
function c25096.eftg(e,c)
return e:GetHandler():GetEquipTarget()==c
end
function c25096.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c25096.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c25096.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -119,17 +121,6 @@ function c25096.dsop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2)
end
end
function c25096.thcon2(e)
local e1=e:GetLabelObject()
local g=e1:GetHandler():GetEquipGroup()
return not e1:GetHandler():IsImmuneToEffect(e) and g and not g:IsContains(e1:GetLabelObject())
end
function c25096.dsop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject() then
e:GetLabelObject():Reset()
e:Reset()
end
end
function c25096.recon(e)
return e:GetHandler():IsFaceup()
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment