Commit a795c645 authored by POLYMER's avatar POLYMER

fix

parent e1b4f765
...@@ -245,6 +245,7 @@ end ...@@ -245,6 +245,7 @@ end
function cm.costop(e,tp,eg,ep,ev,re,r,rp) function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local te=e:GetLabelObject() local te=e:GetLabelObject()
te:GetHandler():RegisterFlagEffect(11451031,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local tp=te:GetHandlerPlayer() local tp=te:GetHandlerPlayer()
local loc=te:GetHandler():GetLocation() local loc=te:GetHandler():GetLocation()
if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsFaceup() and te:GetHandler():IsOnField() then loc=te:GetHandler():GetPreviousLocation() end if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsFaceup() and te:GetHandler():IsOnField() then loc=te:GetHandler():GetPreviousLocation() end
...@@ -382,7 +383,7 @@ function cm.sptg(e,te,tp) ...@@ -382,7 +383,7 @@ function cm.sptg(e,te,tp)
return te:GetHandler()==e:GetHandler() return te:GetHandler()==e:GetHandler()
end end
function cm.sfilter(c,tp) function cm.sfilter(c,tp)
return c:IsFaceup() or c:IsControler(tp) or c:IsStatus(STATUS_CHAINING) return c:IsFaceup() or c:IsControler(tp) or c:GetFlagEffect(11451031)>0
end end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp) function cm.spcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -273,6 +273,7 @@ end ...@@ -273,6 +273,7 @@ end
function cm.costop(e,tp,eg,ep,ev,re,r,rp) function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local te=e:GetLabelObject() local te=e:GetLabelObject()
te:GetHandler():RegisterFlagEffect(11451031,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local tp=te:GetHandlerPlayer() local tp=te:GetHandlerPlayer()
local loc=te:GetHandler():GetLocation() local loc=te:GetHandler():GetLocation()
if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsFaceup() and te:GetHandler():IsOnField() then loc=te:GetHandler():GetPreviousLocation() end if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsFaceup() and te:GetHandler():IsOnField() then loc=te:GetHandler():GetPreviousLocation() end
...@@ -411,7 +412,7 @@ function cm.sptg(e,c,tp) ...@@ -411,7 +412,7 @@ function cm.sptg(e,c,tp)
return c==e:GetHandler() return c==e:GetHandler()
end end
function cm.sfilter(c,tp) function cm.sfilter(c,tp)
return c:IsFaceup() or c:IsControler(tp) or c:IsStatus(STATUS_CHAINING) return c:IsFaceup() or c:IsControler(tp) or c:GetFlagEffect(11451031)>0
end end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c)
local c=c or e:GetHandler() local c=c or e:GetHandler()
......
...@@ -271,6 +271,7 @@ end ...@@ -271,6 +271,7 @@ end
function cm.costop(e,tp,eg,ep,ev,re,r,rp) function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local te=e:GetLabelObject() local te=e:GetLabelObject()
te:GetHandler():RegisterFlagEffect(11451031,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local tp=te:GetHandlerPlayer() local tp=te:GetHandlerPlayer()
local loc=te:GetHandler():GetLocation() local loc=te:GetHandler():GetLocation()
if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsFaceup() and te:GetHandler():IsOnField() then loc=te:GetHandler():GetPreviousLocation() end if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsFaceup() and te:GetHandler():IsOnField() then loc=te:GetHandler():GetPreviousLocation() end
...@@ -409,7 +410,7 @@ function cm.sptg(e,c,tp) ...@@ -409,7 +410,7 @@ function cm.sptg(e,c,tp)
return c==e:GetHandler() return c==e:GetHandler()
end end
function cm.sfilter(c,tp) function cm.sfilter(c,tp)
return c:IsFaceup() or c:IsControler(tp) or c:IsStatus(STATUS_CHAINING) return c:IsFaceup() or c:IsControler(tp) or c:GetFlagEffect(11451031)>0
end end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c)
local c=c or e:GetHandler() local c=c or e:GetHandler()
......
...@@ -240,6 +240,7 @@ end ...@@ -240,6 +240,7 @@ end
function cm.costop(e,tp,eg,ep,ev,re,r,rp) function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local te=e:GetLabelObject() local te=e:GetLabelObject()
te:GetHandler():RegisterFlagEffect(11451031,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local tp=te:GetHandlerPlayer() local tp=te:GetHandlerPlayer()
local loc=te:GetHandler():GetLocation() local loc=te:GetHandler():GetLocation()
if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsFaceup() and te:GetHandler():IsOnField() then loc=te:GetHandler():GetPreviousLocation() end if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsFaceup() and te:GetHandler():IsOnField() then loc=te:GetHandler():GetPreviousLocation() end
...@@ -378,7 +379,7 @@ function cm.sptg(e,c,tp) ...@@ -378,7 +379,7 @@ function cm.sptg(e,c,tp)
return c==e:GetHandler() return c==e:GetHandler()
end end
function cm.sfilter(c,tp) function cm.sfilter(c,tp)
return c:IsFaceup() or c:IsControler(tp) or c:IsStatus(STATUS_CHAINING) return c:IsFaceup() or c:IsControler(tp) or c:GetFlagEffect(11451031)>0
end end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c)
local c=c or e:GetHandler() local c=c or e:GetHandler()
......
...@@ -261,7 +261,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp) ...@@ -261,7 +261,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.chop(e,tp,eg,ep,ev,re,r,rp)
--re:SetCategory(re:GetCategory()|CATEGORY_NEGATE) --re:SetCategory(re:GetCategory()|CATEGORY_NEGATE)
if re:GetLabel()&0x49421~=0 then re:SetLabel(re:GetLabel()+0x1) return end if re:GetLabel()&0x49249~=0 then re:SetLabel(re:GetLabel()+0x1) return end
re:SetLabel(re:GetLabel()+0x1) re:SetLabel(re:GetLabel()+0x1)
local op=re:GetOperation() local op=re:GetOperation()
local repop=function(e,tp,eg,ep,ev,re,r,rp) local repop=function(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -276,7 +276,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp) ...@@ -276,7 +276,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.chop(e,tp,eg,ep,ev,re,r,rp)
--re:SetCategory(re:GetCategory()|CATEGORY_TOHAND) --re:SetCategory(re:GetCategory()|CATEGORY_TOHAND)
if re:GetLabel()&0x49421~=0 then re:SetLabel(re:GetLabel()+0x8) return end if re:GetLabel()&0x49249~=0 then re:SetLabel(re:GetLabel()+0x8) return end
re:SetLabel(re:GetLabel()+0x8) re:SetLabel(re:GetLabel()+0x8)
local op=re:GetOperation() local op=re:GetOperation()
local repop=function(e,tp,eg,ep,ev,re,r,rp) local repop=function(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -295,7 +295,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp) ...@@ -295,7 +295,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.chop(e,tp,eg,ep,ev,re,r,rp)
--re:SetCategory(re:GetCategory()|CATEGORY_REMOVE) --re:SetCategory(re:GetCategory()|CATEGORY_REMOVE)
if re:GetLabel()&0x49421~=0 then re:SetLabel(re:GetLabel()+0x40) return end if re:GetLabel()&0x49249~=0 then re:SetLabel(re:GetLabel()+0x40) return end
re:SetLabel(re:GetLabel()+0x40) re:SetLabel(re:GetLabel()+0x40)
local op=re:GetOperation() local op=re:GetOperation()
local repop=function(e,tp,eg,ep,ev,re,r,rp) local repop=function(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -262,7 +262,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp) ...@@ -262,7 +262,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.chop(e,tp,eg,ep,ev,re,r,rp)
--re:SetCategory(re:GetCategory()|CATEGORY_DAMAGE) --re:SetCategory(re:GetCategory()|CATEGORY_DAMAGE)
if re:GetLabel()&0x49421~=0 then re:SetLabel(re:GetLabel()+0x200) return end if re:GetLabel()&0x49249~=0 then re:SetLabel(re:GetLabel()+0x200) return end
re:SetLabel(re:GetLabel()+0x200) re:SetLabel(re:GetLabel()+0x200)
local op=re:GetOperation() local op=re:GetOperation()
local repop=function(e,tp,eg,ep,ev,re,r,rp) local repop=function(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -293,7 +293,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp) ...@@ -293,7 +293,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.chop(e,tp,eg,ep,ev,re,r,rp)
--re:SetCategory(re:GetCategory()|CATEGORY_DRAW) --re:SetCategory(re:GetCategory()|CATEGORY_DRAW)
if re:GetLabel()&0x49421~=0 then re:SetLabel(re:GetLabel()+0x1000) return end if re:GetLabel()&0x49249~=0 then re:SetLabel(re:GetLabel()+0x1000) return end
re:SetLabel(re:GetLabel()+0x1000) re:SetLabel(re:GetLabel()+0x1000)
local op=re:GetOperation() local op=re:GetOperation()
local repop=function(e,tp,eg,ep,ev,re,r,rp) local repop=function(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -373,7 +373,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp) ...@@ -373,7 +373,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.chop(e,tp,eg,ep,ev,re,r,rp)
--re:SetCategory(re:GetCategory()|CATEGORY_HANDES) --re:SetCategory(re:GetCategory()|CATEGORY_HANDES)
if re:GetLabel()&0x49421~=0 then re:SetLabel(re:GetLabel()+0x8000) return end if re:GetLabel()&0x49249~=0 then re:SetLabel(re:GetLabel()+0x8000) return end
re:SetLabel(re:GetLabel()+0x8000) re:SetLabel(re:GetLabel()+0x8000)
local op=re:GetOperation() local op=re:GetOperation()
local repop=function(e,tp,eg,ep,ev,re,r,rp) local repop=function(e,tp,eg,ep,ev,re,r,rp)
......
--蒹葭苍苍 --蒹葭苍苍
local cm, m, ofs = GetID() local cm, m, ofs = GetID()
local yr = 13020010 local yr = 13020010
Duel.LoadScript("c16670000.lua") xpcall(function() dofile("expansions/script/c16670000.lua") end, function() dofile("script/c16670000.lua") end)
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
--Activate --Activate
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1, m) e1:SetCountLimit(1, m)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m, 2)) e3:SetDescription(aux.Stringid(m, 2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(QY_mx) e3:SetRange(QY_mx)
e3:SetCountLimit(1, m + 1) e3:SetCountLimit(1, m + 1)
e3:SetCondition(cm.spcon2) e3:SetCondition(cm.spcon2)
e3:SetCost(cm.spcost2) e3:SetCost(cm.spcost2)
e3:SetTarget(cm.sptg2) e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2) e3:SetOperation(cm.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.filter(c) function cm.filter(c)
return aux.IsCodeListed(c, yr) and c:IsAbleToHand() return aux.IsCodeListed(c, yr) and c:IsAbleToHand()
end end
function cm.filter2(c, e, tp) function cm.filter2(c, e, tp)
return c:IsType(TYPE_EQUIP) and c:IsCanBeSpecialSummoned(e, 0, tp, true, false) return c:IsType(TYPE_EQUIP) and c:IsCanBeSpecialSummoned(e, 0, tp, true, false)
end end
function cm.target(e, tp, eg, ep, ev, re, r, rp, chk) function cm.target(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return Duel.IsExistingMatchingCard(cm.filter, tp, LOCATION_DECK, 0, 1, nil) end if chk == 0 then return Duel.IsExistingMatchingCard(cm.filter, tp, LOCATION_DECK, 0, 1, nil) end
Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK) Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
end end
function cm.activate(e, tp, eg, ep, ev, re, r, rp) function cm.activate(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
local g = Duel.SelectMatchingCard(tp, cm.filter, tp, LOCATION_DECK, 0, 1, 1, nil) local g = Duel.SelectMatchingCard(tp, cm.filter, tp, LOCATION_DECK, 0, 1, 1, nil)
if g:GetCount() > 0 then if g:GetCount() > 0 then
Duel.SendtoHand(g, nil, REASON_EFFECT) Duel.SendtoHand(g, nil, REASON_EFFECT)
Duel.ConfirmCards(1 - tp, g) Duel.ConfirmCards(1 - tp, g)
end end
end end
function cm.cfilter(c, tp) function cm.cfilter(c, tp)
return c:IsType(TYPE_NORMAL) return c:IsType(TYPE_NORMAL)
end end
function cm.spcon2(e, tp, eg, ep, ev, re, r, rp) function cm.spcon2(e, tp, eg, ep, ev, re, r, rp)
return eg:IsExists(cm.cfilter, 1, nil, tp) return eg:IsExists(cm.cfilter, 1, nil, tp)
end end
function cm.spcost2(e, tp, eg, ep, ev, re, r, rp, chk) function cm.spcost2(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable, tp, LOCATION_HAND, 0, 1, nil) end if chk == 0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable, tp, LOCATION_HAND, 0, 1, nil) end
Duel.DiscardHand(tp, Card.IsDiscardable, 1, 1, REASON_COST + REASON_DISCARD) Duel.DiscardHand(tp, Card.IsDiscardable, 1, 1, REASON_COST + REASON_DISCARD)
end end
function cm.sptg2(e, tp, eg, ep, ev, re, r, rp, chk, chkc) function cm.sptg2(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_SPELL + TYPE_EQUIP) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_SPELL + TYPE_EQUIP) end
local kx, zzx, sxx, zzjc, sxjc, zzl = it.sxbl() local kx, zzx, sxx, zzjc, sxjc, zzl = it.sxbl()
if chk == 0 then return Duel.IsExistingTarget(cm.filter2, tp, LOCATION_GRAVE, 0, 1, nil, e, tp) and zzx > 0 end if chk == 0 then return Duel.IsExistingTarget(cm.filter2, tp, LOCATION_GRAVE, 0, 1, nil, e, tp) and zzx > 0 end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g = Duel.SelectTarget(tp, cm.filter2, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp) local g = Duel.SelectTarget(tp, cm.filter2, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
local zz, sx, lv = it.sxblx(tp, kx, zzx, sxx, zzl) local zz, sx, lv = it.sxblx(tp, kx, zzx, sxx, zzl)
e:SetLabel(zz, sx, lv) e:SetLabel(zz, sx, lv)
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, 1, 0, 0)
end end
function cm.spop2(e, tp, eg, ep, ev, re, r, rp) function cm.spop2(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
local tc = Duel.GetFirstTarget() local tc = Duel.GetFirstTarget()
local zz, sx, lv = e:GetLabel() local zz, sx, lv = e:GetLabel()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if not Duel.IsPlayerCanSpecialSummonMonster(tp, tc:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER, 0, 0, lv, zz, sx) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp, tc:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER, 0, 0, lv, zz, sx) then return end
tc:AddMonsterAttribute(TYPE_NORMAL + TYPE_MONSTER, sx, zz, lv, 0, 0) it.AddMonsterate(tc, TYPE_NORMAL + TYPE_MONSTER, sx, zz, lv, 0, 0)
Duel.SpecialSummonStep(tc, 0, tp, tp, true, false, POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(tc, 0, tp, tp, true, false, POS_FACEUP_DEFENSE)
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT + RESETS_REDIRECT) e3:SetReset(RESET_EVENT + RESETS_REDIRECT)
e3:SetValue(LOCATION_REMOVED) e3:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e3, true) tc:RegisterEffect(e3, true)
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT + RESETS_REDIRECT) e2:SetReset(RESET_EVENT + RESETS_REDIRECT)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(cm.atkval) e2:SetValue(cm.atkval)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
function cm.atkval(e, c) function cm.atkval(e, c)
return Duel.GetMatchingGroupCount(cm.atkfilter, e:GetHandlerPlayer(), LOCATION_GRAVE + LOCATION_REMOVED, 0, nil) * return Duel.GetMatchingGroupCount(cm.atkfilter, e:GetHandlerPlayer(), LOCATION_GRAVE + LOCATION_REMOVED, 0, nil) *
500 500
end end
function cm.atkfilter(c) function cm.atkfilter(c)
return aux.IsCodeListed(c, yr) and c:IsType(TYPE_EQUIP) return aux.IsCodeListed(c, yr) and c:IsType(TYPE_EQUIP)
end end
...@@ -19,12 +19,12 @@ function cm.initial_effect(c) ...@@ -19,12 +19,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13000766, 1)) e3:SetDescription(aux.Stringid(m, 1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_GRAVE + LOCATION_REMOVED) e3:SetRange(LOCATION_REMOVED)
e3:SetCondition(cm.descon) e3:SetCondition(cm.descon)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.desop2) e3:SetOperation(cm.desop2)
...@@ -106,7 +106,7 @@ function cm.desop(e, tp, eg, ep, ev, re, r, rp) ...@@ -106,7 +106,7 @@ function cm.desop(e, tp, eg, ep, ev, re, r, rp)
end end
function cm.cfilter(c, tp) function cm.cfilter(c, tp)
return c:IsPreviousControler(tp) return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and c:GetReasonPlayer() == 1 - tp and c:GetReasonPlayer() == 1 - tp
end end
......
--所谓伊人 --所谓伊人
local cm, m, ofs = GetID() local cm, m, ofs = GetID()
local yr = 13020010 local yr = 13020010
Duel.LoadScript("c16670000.lua") --引用库 xpcall(function() dofile("expansions/script/c16670000.lua") end, function() dofile("script/c16670000.lua") end) --引用库
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
-- local e1 = xg.epp2(c, m, 1, nil, 3, QY_sp, cm.setcon2, cm.cost, cm.target, cm.operation, true) --使用库内函数进行便捷注册 -- local e1 = xg.epp2(c, m, 1, nil, 3, QY_sp, cm.setcon2, cm.cost, cm.target, cm.operation, true) --使用库内函数进行便捷注册
...@@ -92,7 +92,7 @@ end ...@@ -92,7 +92,7 @@ end
function cm.operation(e, tp, eg, ep, ev, re, r, rp) function cm.operation(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
local tc = Duel.GetFirstTarget() local tc = Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local oc = LOCATION_HAND + LOCATION_GRAVE + LOCATION_DECK local oc = LOCATION_HAND + LOCATION_GRAVE + LOCATION_DECK
if Duel.GetTurnPlayer() ~= e:GetHandlerPlayer() then if Duel.GetTurnPlayer() ~= e:GetHandlerPlayer() then
oc = QY_sk oc = QY_sk
...@@ -136,7 +136,7 @@ function cm.operation2(e, tp, eg, ep, ev, re, r, rp) ...@@ -136,7 +136,7 @@ function cm.operation2(e, tp, eg, ep, ev, re, r, rp)
local tc = Duel.SelectMatchingCard(tp, cm.filter6, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp):GetFirst() local tc = Duel.SelectMatchingCard(tp, cm.filter6, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp):GetFirst()
local zz, sx, lv = it.sxblx(tp, kx, zzx, sxx, zzl) local zz, sx, lv = it.sxblx(tp, kx, zzx, sxx, zzl)
if tc and Duel.IsPlayerCanSpecialSummonMonster(tp, tc:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER, 0, 0, lv, zz, sx) then if tc and Duel.IsPlayerCanSpecialSummonMonster(tp, tc:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER, 0, 0, lv, zz, sx) then
tc:AddMonsterAttribute(TYPE_NORMAL + TYPE_MONSTER, sx, zz, lv, 0, 0) it.AddMonsterate(tc, TYPE_NORMAL + TYPE_MONSTER, sx, zz, lv, 0, 0)
Duel.SpecialSummonStep(tc, 0, tp, tp, true, false, POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(tc, 0, tp, tp, true, false, POS_FACEUP_DEFENSE)
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
......
--在水一方 --在水一方
local cm, m, ofs = GetID() local cm, m, ofs = GetID()
local yr = 13020010 local yr = 13020010
Duel.LoadScript("c16670000.lua") --引用库 xpcall(function() dofile("expansions/script/c16670000.lua") end, function() dofile("script/c16670000.lua") end) --引用库
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
--aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil) --aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil)
...@@ -9,11 +9,10 @@ function cm.initial_effect(c) ...@@ -9,11 +9,10 @@ function cm.initial_effect(c)
local e1 = xg.epp2(c, m, 4, EVENT_EQUIP, EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY, QY_mx, nil, nil, cm.target, local e1 = xg.epp2(c, m, 4, EVENT_EQUIP, EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY, QY_mx, nil, nil, cm.target,
cm.operation, true) cm.operation, true)
e1:SetCountLimit(1, m) e1:SetCountLimit(1, m)
local e4 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetCode(EFFECT_CANNOT_DISABLE)
e4:SetValue(cm.efilter1) c:RegisterEffect(e2)
c:RegisterEffect(e4)
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
...@@ -27,12 +26,7 @@ function cm.initial_effect(c) ...@@ -27,12 +26,7 @@ function cm.initial_effect(c)
e3:SetOperation(cm.desop) e3:SetOperation(cm.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.efilter1(e, te)
local ec = e:GetHandler():GetEquipTarget()
local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
return te:GetOwnerPlayer() ~= e:GetHandlerPlayer() and (g ~= nil and g:IsContains(ec))
--return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end
function cm.AddEquipSpellEffect(c, is_self, is_opponent, filter, eqlimit, pause, skip_target) function cm.AddEquipSpellEffect(c, is_self, is_opponent, filter, eqlimit, pause, skip_target)
local value = (type(eqlimit) == "function") and eqlimit or 1 local value = (type(eqlimit) == "function") and eqlimit or 1
if pause == nil then pause = false end if pause == nil then pause = false end
......
--在水之泗 --在水之泗
local cm, m, ofs = GetID() local cm, m, ofs = GetID()
local yr = 13020010 local yr = 13020010
Duel.LoadScript("c16670000.lua") --引用库 xpcall(function() dofile("expansions/script/c16670000.lua") end, function() dofile("script/c16670000.lua") end) --引用库
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil) aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil)
local e1 = xg.epp2(c, m, 4, EVENT_EQUIP, EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY, QY_mx, nil, nil, cm.target, local e1 = xg.epp2(c, m, 4, EVENT_EQUIP, EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY, QY_mx, nil, nil, cm.target,
cm.operation, true) cm.operation, true)
e1:SetCountLimit(1, m) e1:SetCountLimit(1, m)
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_REMOVED) e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1, m + 1) e3:SetCountLimit(1, m + 1)
e3:SetCondition(cm.descon) e3:SetCondition(cm.descon)
--e3:SetCost(cm.cost) --e3:SetCost(cm.cost)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.desop) e3:SetOperation(cm.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
-- --
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(cm.atkcon) e2:SetCondition(cm.atkcon)
e2:SetValue(cm.atkval) e2:SetValue(cm.atkval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4 = Effect.CreateEffect(c) local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P) e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetOperation(function(e, tp, eg, ep, ev, re, r, rp) e4:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
local c2 = e:GetHandler() local c2 = e:GetHandler()
local ec = c2:GetEquipGroup() local ec = c2:GetEquipGroup()
if #ec == 0 then if #ec == 0 then
e:SetLabel(0) e:SetLabel(0)
return return
end end
local ct = ec:Filter(cm.cfilter2, nil, tp) local ct = ec:Filter(cm.cfilter2, nil, tp)
local ot = #ct local ot = #ct
e:SetLabel(ot) e:SetLabel(ot)
end) end)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e13 = Effect.CreateEffect(c) local e13 = Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O) e13:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e13:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY) e13:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
e13:SetCode(EVENT_LEAVE_FIELD) e13:SetCode(EVENT_LEAVE_FIELD)
e13:SetCountLimit(1, m + 1) e13:SetCountLimit(1, m + 1)
e13:SetLabelObject(e4) e13:SetLabelObject(e4)
e13:SetCondition(cm.descon2) e13:SetCondition(cm.descon2)
e13:SetTarget(cm.sptg) e13:SetTarget(cm.sptg)
e13:SetOperation(cm.desop) e13:SetOperation(cm.desop)
c:RegisterEffect(e13) c:RegisterEffect(e13)
end end
function cm.filter(c) function cm.filter(c)
return c:IsCode(yr) and c:IsAbleToHand() return c:IsCode(yr) and c:IsAbleToHand()
end end
function cm.atkcon(e) function cm.atkcon(e)
return Duel.GetCurrentPhase() == PHASE_DAMAGE_CAL and e:GetHandler():GetBattleTarget() return Duel.GetCurrentPhase() == PHASE_DAMAGE_CAL and e:GetHandler():GetBattleTarget()
end end
function cm.atkval(e, c) function cm.atkval(e, c)
local tc = e:GetHandler():GetBattleTarget() local tc = e:GetHandler():GetBattleTarget()
return math.max(tc:GetAttack(), tc:GetDefense()) return math.max(tc:GetAttack(), tc:GetDefense())
end end
function cm.filter1(c, ec, c2) function cm.filter1(c, ec, c2)
return c:GetEquipTarget() == ec and c == c2 return c:GetEquipTarget() == ec and c == c2
end end
function cm.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc) function cm.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
local c = e:GetHandler() local c = e:GetHandler()
local tc = e:GetHandler():GetEquipTarget() local tc = e:GetHandler():GetEquipTarget()
--local dg = eg:Filter(cm.filter1, nil, tc, c) --local dg = eg:Filter(cm.filter1, nil, tc, c)
local kx, zzx, sxx, zzjc, sxjc, zzl = it.sxbl() local kx, zzx, sxx, zzjc, sxjc, zzl = it.sxbl()
--if chk == 0 then return #dg > 0 and tc and zzx > 0 end --if chk == 0 then return #dg > 0 and tc and zzx > 0 end
if chk == 0 then return tc and zzx > 0 end if chk == 0 then return tc and zzx > 0 end
local zz, sx, lv = it.sxblx(tp, kx, zzx, sxx, zzl) local zz, sx, lv = it.sxblx(tp, kx, zzx, sxx, zzl)
e:SetLabel(zz, sx, lv) e:SetLabel(zz, sx, lv)
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
end end
function cm.operation(e, tp, eg, ep, ev, re, r, rp) function cm.operation(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
local tc = c:GetEquipTarget() local tc = c:GetEquipTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local zz, sx, lv = e:GetLabel() local zz, sx, lv = e:GetLabel()
if not Duel.IsPlayerCanSpecialSummonMonster(tp, c:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER + TYPE_TUNER, 0, 0, lv, zz, sx) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp, c:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER + TYPE_TUNER, 0, 0, lv, zz, sx) then return end
c:AddMonsterAttribute(TYPE_NORMAL + TYPE_MONSTER + TYPE_TUNER, sx, zz, lv, 0, 0) it.AddMonsterate(c, TYPE_NORMAL + TYPE_MONSTER + TYPE_TUNER, sx, zz, lv, 0, 0)
Duel.SpecialSummonStep(c, 0, tp, tp, true, false, POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(c, 0, tp, tp, true, false, POS_FACEUP_DEFENSE)
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT + RESETS_REDIRECT) e3:SetReset(RESET_EVENT + RESETS_REDIRECT)
e3:SetValue(LOCATION_REMOVED) e3:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e3, true) c:RegisterEffect(e3, true)
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetReset(RESET_EVENT + RESETS_REDIRECT) e2:SetReset(RESET_EVENT + RESETS_REDIRECT)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetValue(function(e1, c1) e2:SetValue(function(e1, c1)
return Duel.GetMatchingGroupCount(cm.vfilter, tp, LOCATION_GRAVE + QY_cw, 0, nil) * 500 return Duel.GetMatchingGroupCount(cm.vfilter, tp, LOCATION_GRAVE + QY_cw, 0, nil) * 500
end) end)
c:RegisterEffect(e2, true) c:RegisterEffect(e2, true)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
if not tc:IsImmuneToEffect(e) then if not tc:IsImmuneToEffect(e) then
Duel.Equip(tp, tc, c) Duel.Equip(tp, tc, c)
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT + RESETS_STANDARD) e1:SetReset(RESET_EVENT + RESETS_STANDARD)
e1:SetValue(cm.eqlimit) e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function cm.vfilter(c) function cm.vfilter(c)
return aux.IsCodeListed(c, yr) and c:IsType(TYPE_EQUIP) return aux.IsCodeListed(c, yr) and c:IsType(TYPE_EQUIP)
end end
function cm.eqlimit(e, c) function cm.eqlimit(e, c)
return e:GetOwner() == c return e:GetOwner() == c
end end
function cm.cfilter(c, tp, rp) function cm.cfilter(c, tp, rp)
return c:IsType(TYPE_EQUIP) return c:IsType(TYPE_EQUIP)
end end
function cm.cfilter2(c, tp) function cm.cfilter2(c, tp)
return c:GetOwner() == tp return c:GetOwner() == tp
end end
function cm.descon(e, tp, eg, ep, ev, re, r, rp) function cm.descon(e, tp, eg, ep, ev, re, r, rp)
return eg:IsExists(cm.cfilter, 1, nil, tp, rp) and not eg:IsContains(e:GetHandler()) return eg:IsExists(cm.cfilter, 1, nil, tp, rp) and not eg:IsContains(e:GetHandler())
end end
function cm.descon2(e, tp, eg, ep, ev, re, r, rp) function cm.descon2(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
local ec = e:GetLabelObject():GetLabel() local ec = e:GetLabelObject():GetLabel()
return ec ~= 0 return ec ~= 0
end end
function cm.filter6(c, e, tp, id, g) function cm.filter6(c, e, tp, id, g)
return c:IsCanBeEffectTarget(e) and #g:Filter(cm.filter4, nil, c, id) ~= 0 return c:IsCanBeEffectTarget(e) and #g:Filter(cm.filter4, nil, c, id) ~= 0
end end
function cm.filter5(c, e, tp, tc) function cm.filter5(c, e, tp, tc)
local o = true local o = true
if tc ~= nil then if tc ~= nil then
o = c:CheckEquipTarget(tc) o = c:CheckEquipTarget(tc)
end end
return c:IsType(TYPE_EQUIP) and not c:IsCode(m) and aux.IsCodeListed(c, yr) and o return c:IsType(TYPE_EQUIP) and not c:IsCode(m) and aux.IsCodeListed(c, yr) and o
end end
function cm.filter4(c, c2, id) function cm.filter4(c, c2, id)
return c:CheckEquipTarget(c2) and not c:IsCode(m) and aux.IsCodeListed(c, yr) return c:CheckEquipTarget(c2) and not c:IsCode(m) and aux.IsCodeListed(c, yr)
end end
function cm.cost(e, tp, eg, ep, ev, re, r, rp, chk) function cm.cost(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler() local c = e:GetHandler()
if chk == 0 then return c:IsLocation(QY_cw) end if chk == 0 then return c:IsLocation(QY_cw) end
Duel.SendtoGrave(c, REASON_EFFECT + REASON_RETURN) Duel.SendtoGrave(c, REASON_EFFECT + REASON_RETURN)
end end
function cm.sptg(e, tp, eg, ep, ev, re, r, rp, chk) function cm.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
local g2 = Duel.GetMatchingGroup(cm.filter5, tp, QY_kz, 0, nil, e, tp) local g2 = Duel.GetMatchingGroup(cm.filter5, tp, QY_kz, 0, nil, e, tp)
local g1 = Duel.GetMatchingGroup(cm.filter6, tp, QY_gs, QY_gs, nil, e, tp, m, g2) local g1 = Duel.GetMatchingGroup(cm.filter6, tp, QY_gs, QY_gs, nil, e, tp, m, g2)
-- local g3 = g2:Filter(aux.TRUE, nil) -- local g3 = g2:Filter(aux.TRUE, nil)
if chk == 0 then return Duel.GetLocationCount(tp, QY_mx) > 0 and #g1 > 0 end if chk == 0 then return Duel.GetLocationCount(tp, QY_mx) > 0 and #g1 > 0 end
local c = e:GetHandler() local c = e:GetHandler()
Duel.SelectTarget(tp, Card.IsFaceup, tp, QY_gs, QY_gs, 1, 1, nil) Duel.SelectTarget(tp, Card.IsFaceup, tp, QY_gs, QY_gs, 1, 1, nil)
end end
function cm.desop(e, tp, eg, ep, ev, re, r, rp) function cm.desop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
local tc = Duel.GetFirstTarget() local tc = Duel.GetFirstTarget()
local g2 = Duel.GetMatchingGroup(cm.filter5, tp, QY_kz, 0, nil, e, tp, tc) local g2 = Duel.GetMatchingGroup(cm.filter5, tp, QY_kz, 0, nil, e, tp, tc)
g2 = g2:Select(tp, 1, 1, nil):GetFirst() g2 = g2:Select(tp, 1, 1, nil):GetFirst()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Equip(tp, g2, tc) Duel.Equip(tp, g2, tc)
end end
Duel.BreakEffect() Duel.BreakEffect()
if c:IsLocation(QY_cw) and c:IsRelateToEffect(e) then if c:IsLocation(QY_cw) and c:IsRelateToEffect(e) then
Duel.SendtoGrave(c, REASON_EFFECT + REASON_RETURN) Duel.SendtoGrave(c, REASON_EFFECT + REASON_RETURN)
end end
end end
--在水之湄 --在水之湄
local cm, m, ofs = GetID() local cm, m, ofs = GetID()
local yr = 13020010 local yr = 13020010
Duel.LoadScript("c16670000.lua") --引用库 xpcall(function() dofile("expansions/script/c16670000.lua") end, function() dofile("script/c16670000.lua") end) --引用库
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil) aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil)
local e1 = xg.epp2(c, m, 4, EVENT_EQUIP, EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY, QY_mx, nil, nil, cm.target, local e1 = xg.epp2(c, m, 4, EVENT_EQUIP, EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY, QY_mx, nil, nil, cm.target,
cm.operation, true) cm.operation, true)
e1:SetCountLimit(1, m) e1:SetCountLimit(1, m)
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1, m + 1) e3:SetCountLimit(1, m + 1)
e3:SetCost(cm.cost1) e3:SetCost(cm.cost1)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.desop) e3:SetOperation(cm.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4 = Effect.CreateEffect(c) local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP) e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT) e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(cm.efilter1) e4:SetValue(cm.efilter1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.efilter1(e, te) function cm.efilter1(e, te)
local ec = e:GetHandler():GetEquipTarget() local ec = e:GetHandler():GetEquipTarget()
local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS) local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
return te:GetOwnerPlayer() ~= e:GetHandlerPlayer() and not (g ~= nil and g:IsContains(ec)) return te:GetOwnerPlayer() ~= e:GetHandlerPlayer() and not (g ~= nil and g:IsContains(ec))
--return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) --return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end end
function cm.cost1(e, tp, eg, ep, ev, re, r, rp, chk) function cm.cost1(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost, tp, LOCATION_HAND, 0, 1, nil) end if chk == 0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost, tp, LOCATION_HAND, 0, 1, nil) end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
local g = Duel.SelectMatchingCard(tp, Card.IsAbleToDeckAsCost, tp, LOCATION_HAND, 0, 1, 1, nil) local g = Duel.SelectMatchingCard(tp, Card.IsAbleToDeckAsCost, tp, LOCATION_HAND, 0, 1, 1, nil)
Duel.SendtoDeck(g, nil, SEQ_DECKTOP, REASON_COST) Duel.SendtoDeck(g, nil, SEQ_DECKTOP, REASON_COST)
end end
function cm.filter(c) function cm.filter(c)
return c:IsCode(yr) and c:IsAbleToHand() return c:IsCode(yr) and c:IsAbleToHand()
end end
function cm.filter1(c, ec, c2) function cm.filter1(c, ec, c2)
return c:GetEquipTarget() == ec and c == c2 return c:GetEquipTarget() == ec and c == c2
end end
function cm.filter2(c, ec, c2) function cm.filter2(c, ec, c2)
return c:IsAbleToRemove() -- and c:IsType(TYPE_MONSTER) return c:IsAbleToRemove() -- and c:IsType(TYPE_MONSTER)
end end
function cm.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc) function cm.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
local c = e:GetHandler() local c = e:GetHandler()
local tc = e:GetHandler():GetEquipTarget() local tc = e:GetHandler():GetEquipTarget()
--local dg = eg:Filter(cm.filter1, nil, tc, c) --local dg = eg:Filter(cm.filter1, nil, tc, c)
-- local g1 = Duel.GetMatchingGroup(cm.filter2, tp, QY_gs, QY_gs, nil) -- local g1 = Duel.GetMatchingGroup(cm.filter2, tp, QY_gs, QY_gs, nil)
-- if chk == 0 then return #dg > 0 and tc and #g1 > 0 and c:IsAbleToRemove() end -- if chk == 0 then return #dg > 0 and tc and #g1 > 0 and c:IsAbleToRemove() end
local g1 = Duel.GetMatchingGroup(cm.filter2, tp, LOCATION_ONFIELD + LOCATION_GRAVE, LOCATION_ONFIELD + LOCATION_GRAVE, local g1 = Duel.GetMatchingGroup(cm.filter2, tp, LOCATION_ONFIELD + LOCATION_GRAVE, LOCATION_ONFIELD + LOCATION_GRAVE,
nil) nil)
if chk == 0 then return tc and #g1 > 0 and c:IsAbleToRemove() end if chk == 0 then return tc and #g1 > 0 and c:IsAbleToRemove() end
Duel.SetOperationInfo(0, CATEGORY_REMOVE, c, 2, 0, 0) Duel.SetOperationInfo(0, CATEGORY_REMOVE, c, 2, 0, 0)
end end
function cm.operation(e, tp, eg, ep, ev, re, r, rp) function cm.operation(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
local tc = c:GetEquipTarget() local tc = c:GetEquipTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local g = Group.CreateGroup() local g = Group.CreateGroup()
--local g1 = Duel.SelectMatchingCard(tp, cm.filter2, tp, QY_gs, QY_gs, 1, 1, nil):GetFirst() --local g1 = Duel.SelectMatchingCard(tp, cm.filter2, tp, QY_gs, QY_gs, 1, 1, nil):GetFirst()
local g1 = Duel.SelectMatchingCard(tp, cm.filter2, tp, LOCATION_ONFIELD + LOCATION_GRAVE, local g1 = Duel.SelectMatchingCard(tp, cm.filter2, tp, LOCATION_ONFIELD + LOCATION_GRAVE,
LOCATION_ONFIELD + LOCATION_GRAVE, 1, 1, nil):GetFirst() LOCATION_ONFIELD + LOCATION_GRAVE, 1, 1, nil):GetFirst()
g:AddCard(g1) g:AddCard(g1)
g:AddCard(c) g:AddCard(c)
Duel.Remove(g, POS_FACEUP, REASON_EFFECT) Duel.Remove(g, POS_FACEUP, REASON_EFFECT)
-- if g1:IsLocation(QY_cw) then -- if g1:IsLocation(QY_cw) then
if g1:IsLocation(QY_cw) and g1:IsType(TYPE_MONSTER) then if g1:IsLocation(QY_cw) and g1:IsType(TYPE_MONSTER) then
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE + PHASE_STANDBY) e1:SetCode(EVENT_PHASE + PHASE_STANDBY)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(cm.spcon) e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
e1:SetRange(LOCATION_REMOVED) e1:SetRange(LOCATION_REMOVED)
if Duel.GetCurrentPhase() <= PHASE_STANDBY then if Duel.GetCurrentPhase() <= PHASE_STANDBY then
e1:SetReset(RESET_PHASE + PHASE_STANDBY, 2) e1:SetReset(RESET_PHASE + PHASE_STANDBY, 2)
else else
e1:SetReset(RESET_PHASE + PHASE_STANDBY) e1:SetReset(RESET_PHASE + PHASE_STANDBY)
end end
g1:RegisterEffect(e1, true) g1:RegisterEffect(e1, true)
end end
if g1:IsLocation(QY_cw) and not g1:IsType(TYPE_MONSTER) then if g1:IsLocation(QY_cw) and not g1:IsType(TYPE_MONSTER) then
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE + PHASE_STANDBY) e1:SetCode(EVENT_PHASE + PHASE_STANDBY)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(cm.spcon2) e1:SetCondition(cm.spcon2)
e1:SetOperation(cm.spop2) e1:SetOperation(cm.spop2)
e1:SetRange(LOCATION_REMOVED) e1:SetRange(LOCATION_REMOVED)
if Duel.GetCurrentPhase() <= PHASE_STANDBY then if Duel.GetCurrentPhase() <= PHASE_STANDBY then
e1:SetReset(RESET_PHASE + PHASE_STANDBY, 2) e1:SetReset(RESET_PHASE + PHASE_STANDBY, 2)
else else
e1:SetReset(RESET_PHASE + PHASE_STANDBY) e1:SetReset(RESET_PHASE + PHASE_STANDBY)
end end
g1:RegisterEffect(e1, true) g1:RegisterEffect(e1, true)
end end
end end
function cm.spcon2(e, tp, eg, ep, ev, re, r, rp) function cm.spcon2(e, tp, eg, ep, ev, re, r, rp)
return Duel.GetTurnCount() ~= e:GetLabel() and tp == Duel.GetTurnPlayer() return Duel.GetTurnCount() ~= e:GetLabel() and tp == Duel.GetTurnPlayer()
end end
function cm.spop2(e, tp, eg, ep, ev, re, r, rp) function cm.spop2(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
Duel.SendtoHand(c, nil, REASON_EFFECT) Duel.SendtoHand(c, nil, REASON_EFFECT)
end end
function cm.spcon(e, tp, eg, ep, ev, re, r, rp) function cm.spcon(e, tp, eg, ep, ev, re, r, rp)
return Duel.GetTurnCount() ~= e:GetLabel() and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and return Duel.GetTurnCount() ~= e:GetLabel() and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and
tp == Duel.GetTurnPlayer() tp == Duel.GetTurnPlayer()
end end
-- function cm.spcon(e, tp, eg, ep, ev, re, r, rp) -- function cm.spcon(e, tp, eg, ep, ev, re, r, rp)
-- return Duel.GetTurnCount() ~= e:GetLabel() and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 -- return Duel.GetTurnCount() ~= e:GetLabel() and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
-- end -- end
function cm.spop(e, tp, eg, ep, ev, re, r, rp) function cm.spop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
end end
function cm.cfilter(c, tp, rp) function cm.cfilter(c, tp, rp)
return c:IsPreviousControler(tp) return c:IsPreviousControler(tp)
and rp == 1 - tp and c:IsType(TYPE_EQUIP) and rp == 1 - tp and c:IsType(TYPE_EQUIP)
end end
function cm.descon(e, tp, eg, ep, ev, re, r, rp) function cm.descon(e, tp, eg, ep, ev, re, r, rp)
return eg:IsExists(cm.cfilter, 1, nil, tp, rp) and not eg:IsContains(e:GetHandler()) return eg:IsExists(cm.cfilter, 1, nil, tp, rp) and not eg:IsContains(e:GetHandler())
end end
function cm.filter6(c, e, tp, id, g) function cm.filter6(c, e, tp, id, g)
return c:IsCanBeEffectTarget(e) and #g:Filter(cm.filter4, nil, c) ~= 0 return c:IsCanBeEffectTarget(e) and #g:Filter(cm.filter4, nil, c) ~= 0
end end
function cm.filter5(c, e, tp, tc) function cm.filter5(c, e, tp, tc)
return c:IsType(TYPE_SPELL + TYPE_TRAP) and not c:IsCode(m) and aux.IsCodeListed(c, yr) and c:IsSSetable() return c:IsType(TYPE_SPELL + TYPE_TRAP) and not c:IsCode(m) and aux.IsCodeListed(c, yr) and c:IsSSetable()
end end
function cm.filter4(c, c2) function cm.filter4(c, c2)
return c2:CheckEquipTarget(c) and not c:IsCode(m) and aux.IsCodeListed(c, yr) return c2:CheckEquipTarget(c) and not c:IsCode(m) and aux.IsCodeListed(c, yr)
end end
function cm.sptg(e, tp, eg, ep, ev, re, r, rp, chk) function cm.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
local g2 = Duel.GetMatchingGroup(cm.filter5, tp, QY_kz, 0, nil, e, tp) local g2 = Duel.GetMatchingGroup(cm.filter5, tp, QY_kz, 0, nil, e, tp)
if chk == 0 then return Duel.GetLocationCount(tp, QY_mx) > 0 and #g2 > 0 end if chk == 0 then return Duel.GetLocationCount(tp, QY_mx) > 0 and #g2 > 0 end
end end
function cm.con4_4(e, tp, eg, ep, ev, re, r, rp) function cm.con4_4(e, tp, eg, ep, ev, re, r, rp)
return Duel.GetCurrentChain() == 0 return Duel.GetCurrentChain() == 0
end end
function cm.op4_5(e, tp, eg, ep, ev, re, r, rp) function cm.op4_5(e, tp, eg, ep, ev, re, r, rp)
local tc = e:GetLabelObject() local tc = e:GetLabelObject()
if tc:GetFlagEffect(m) ~= 0 then return end if tc:GetFlagEffect(m) ~= 0 then return end
local e4_5_1 = tc:GetActivateEffect() local e4_5_1 = tc:GetActivateEffect()
e4_5_1:SetProperty(nil) e4_5_1:SetProperty(nil)
e4_5_1:SetHintTiming(0) e4_5_1:SetHintTiming(0)
e4_5_1:SetCondition(aux.TRUE) e4_5_1:SetCondition(aux.TRUE)
e:Reset() e:Reset()
end end
function cm.desop(e, tp, eg, ep, ev, re, r, rp) function cm.desop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
local g2 = Duel.SelectMatchingCard(tp, cm.filter5, tp, QY_kz, 0, 1, 1, nil, e, tp):GetFirst() local g2 = Duel.SelectMatchingCard(tp, cm.filter5, tp, QY_kz, 0, 1, 1, nil, e, tp):GetFirst()
if Duel.SSet(tp, g2, tp) ~= 0 then if Duel.SSet(tp, g2, tp) ~= 0 then
if c:IsType(TYPE_TRAP + TYPE_QUICKPLAY) then if c:IsType(TYPE_TRAP + TYPE_QUICKPLAY) then
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT + RESETS_STANDARD) e1:SetReset(RESET_EVENT + RESETS_STANDARD)
g2:RegisterEffect(e1) g2:RegisterEffect(e1)
local e2 = e1:Clone() local e2 = e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN) e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
g2:RegisterEffect(e2) g2:RegisterEffect(e2)
else else
local tc = g2 local tc = g2
local e4_4 = g2:GetActivateEffect() local e4_4 = g2:GetActivateEffect()
if e4_4 ~= nil then if e4_4 ~= nil then
local oq = e4_4:GetCondition() local oq = e4_4:GetCondition()
local ow = e4_4:GetProperty() local ow = e4_4:GetProperty()
e4_4:SetProperty(e4_4:GetProperty(), EFFECT_FLAG2_COF) e4_4:SetProperty(e4_4:GetProperty(), EFFECT_FLAG2_COF)
e4_4:SetHintTiming(0, 0x1e0 + TIMING_CHAIN_END) e4_4:SetHintTiming(0, 0x1e0 + TIMING_CHAIN_END)
e4_4:SetCondition(function(e, tp, eg, ep, ev, re, r, rp) e4_4:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
return Duel.GetCurrentChain() == 0 and (not oq or oq(e, tp, eg, ep, ev, re, r, rp)) return Duel.GetCurrentChain() == 0 and (not oq or oq(e, tp, eg, ep, ev, re, r, rp))
end) end)
tc:RegisterFlagEffect(m, RESET_EVENT + 0x1fe0000, 0, 1) tc:RegisterFlagEffect(m, RESET_EVENT + 0x1fe0000, 0, 1)
local e4_5 = Effect.CreateEffect(c) local e4_5 = Effect.CreateEffect(c)
e4_5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS) e4_5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e4_5:SetCode(EVENT_ADJUST) e4_5:SetCode(EVENT_ADJUST)
e4_5:SetOperation(function(e, tp, eg, ep, ev, re, r, rp) e4_5:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
if tc:GetFlagEffect(m) ~= 0 then return end if tc:GetFlagEffect(m) ~= 0 then return end
-- local e4_5_1 = tc:GetActivateEffect() -- local e4_5_1 = tc:GetActivateEffect()
if ow ~= nil then if ow ~= nil then
e4_4:SetProperty(ow) e4_4:SetProperty(ow)
end end
-- e4_4:SetHintTiming(table.unpack(ow)) -- e4_4:SetHintTiming(table.unpack(ow))
if oq ~= nil then if oq ~= nil then
e4_4:SetCondition(oq) e4_4:SetCondition(oq)
end end
e:Reset() e:Reset()
end) end)
e4_5:SetLabelObject(g2) e4_5:SetLabelObject(g2)
Duel.RegisterEffect(e4_5, tp) Duel.RegisterEffect(e4_5, tp)
end end
end end
end end
end end
...@@ -171,7 +171,7 @@ function cm.operation(e, tp, eg, ep, ev, re, r, rp) ...@@ -171,7 +171,7 @@ function cm.operation(e, tp, eg, ep, ev, re, r, rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local zz, sx, lv = e:GetLabel() local zz, sx, lv = e:GetLabel()
if not Duel.IsPlayerCanSpecialSummonMonster(tp, c:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER + TYPE_TUNER, 0, 0, lv, zz, sx) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp, c:GetCode(), 0, TYPE_NORMAL + TYPE_MONSTER + TYPE_TUNER, 0, 0, lv, zz, sx) then return end
c:AddMonsterAttribute(TYPE_NORMAL + TYPE_MONSTER, sx, zz, lv, 0, 0) it.AddMonsterate(c, TYPE_NORMAL + TYPE_MONSTER, sx, zz, lv, 0, 0)
Duel.SpecialSummonStep(c, 0, tp, tp, true, false, POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(c, 0, tp, tp, true, false, POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
......
--OneInAMillion --白露未已
local s,id,o=GetID() local cm, m, o = GetID()
function s.initial_effect(c) local yr = 13020010
aux.AddCodeList(c,13020032) xpcall(function() dofile("expansions/script/c16670000.lua") end, function() dofile("script/c16670000.lua") end)
--Activate function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) c:EnableReviveLimit()
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTarget(s.target) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetCountLimit(1,id) e1:SetValue(aux.FALSE)
e1:SetOperation(s.activate) c:RegisterEffect(e1)
c:RegisterEffect(e1)
--back local e2 = Effect.CreateEffect(c)
local e3=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD)
e3:SetDescription(aux.Stringid(id,0)) e2:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_EXTRA)
e3:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1, m)
e3:SetRange(0x30) e2:SetCondition(cm.condition)
e3:SetCountLimit(1,id) e2:SetOperation(cm.operation)
e3:SetCost(s.spcost) c:RegisterEffect(e2)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop) local e11 = Effect.CreateEffect(c)
c:RegisterEffect(e3) -- e11:SetDescription(aux.Stringid(m, 0))
e11:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
e11:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e11:SetProperty(EFFECT_FLAG_DELAY)
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetCost(cm.cost)
e11:SetTarget(cm.drtg)
e11:SetOperation(cm.drop)
c:RegisterEffect(e11)
if not cm.global_check then
cm.global_check = true
local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS + EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_ADJUST)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetOperation(cm.adop)
Duel.RegisterEffect(e4, tp)
end
end end
function s.ckfi1ter(c)
return c:GetSequence()==0 function cm.cfilter(c, e, tp, sc)
return c:IsAbleToDeckAsCost() and aux.IsCodeListed(c, yr) and (c:IsLocation(QY_sk) or
Duel.GetLocationCountFromEx(tp, tp, c, sc) > 0)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0x01,0)>0 end function cm.cfilter2(c, e, tp, sc)
return c:IsAbleToExtraAsCost() and Duel.GetLocationCountFromEx(tp, tp, c, sc) > 0
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() function cm.condition(e, tp, eg, ep, ev, re, r, rp)
local g=Duel.GetMatchingGroup(s.ckfi1ter,tp,0x01,0,nil) local c = e:GetHandler()
if #g>0 then local g = Duel.GetMatchingGroup(cm.cfilter, tp, LOCATION_HAND + LOCATION_ONFIELD, 0, nil, e, tp, c)
local tc=g:GetFirst() local g2 = Duel.GetMatchingGroup(cm.cfilter2, tp, LOCATION_ONFIELD, 0, nil, e, tp, c)
Duel.MoveSequence(tc,SEQ_DECKTOP) return #g > 0 and #g2 > 0
Duel.ConfirmDecktop(tp,1)
local ThCheck=false
local LockCheck=true
if tc:IsType(TYPE_RITUAL) then
LockCheck=false
if tc:IsAbleToHand() and Duel.SendtoHand(tc,nil,0x40)>0 then
Duel.ConfirmCards(1-tp,tc)
ThCheck=true
end
end
if not ThCheck then
Duel.MoveSequence(tc,SEQ_DECKBOTTOM)
end
if LockCheck then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(s.aclimit)
e1:SetLabel(13020040)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end end
function s.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) function cm.operation(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SELECT)
local g1 = Duel.SelectMatchingCard(tp, cm.cfilter, tp, LOCATION_HAND + LOCATION_ONFIELD, 0, 1, 1, nil, e, tp, c)
local g2 = Duel.SelectMatchingCard(tp, cm.cfilter2, tp, LOCATION_ONFIELD, 0, 1, 1, g1, e, tp, c)
g2:Merge(g1)
c:SetMaterial(g2)
Duel.SendtoDeck(g2, tp, SEQ_DECKSHUFFLE, REASON_COST + REASON_MATERIAL)
end end
function s.rlfil(c)
return c:IsReleasable() and c:GetOriginalType()&TYPE_MONSTER>0 function cm.cfilter3(c, e, tp, sc)
return (c:IsAbleToRemove() or c:IsAbleToGrave()) and aux.IsCodeListed(c, yr)
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rlfil,tp,0x06,0,1,nil) function cm.cost(e, tp, eg, ep, ev, re, r, rp, chk)
and e:GetHandler():IsAbleToHandAsCost() end local g = Duel.GetMatchingGroup(cm.cfilter3, tp, QY_kz, 0, nil)
Duel.Hint(3,tp,500) if chk == 0 then return #g > 0 end
local g=Duel.SelectMatchingCard(tp,s.rlfil,tp,0x0e,0,1,1,e:GetHandler()) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SELECT)
Duel.Release(g,REASON_COST) if #g == 0 then return end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST) local sg = g:Select(tp, 1, 1, nil):GetFirst()
local off = 1
local ops = {}
local opval = {}
if sg:IsAbleToRemove() then
ops[off] = aux.Stringid(m, 0)
opval[off - 1] = 1
off = off + 1
end
if sg:IsAbleToGrave() then
ops[off] = aux.Stringid(m, 1)
opval[off - 1] = 2
off = off + 1
end
local op = Duel.SelectOption(tp, table.unpack(ops))
if opval[op] == 1 then
Duel.SendtoGrave(sg, REASON_EFFECT)
elseif opval[op] == 2 then
Duel.Remove(sg, POS_FACEUP, REASON_EFFECT)
end
e:SetLabel(sg:GetCode())
end end
function s.rlgck(g,sc,tp)
Duel.SetSelectedCard(g) function cm.cfilter4(c, code)
return g:CheckWithSumGreater(Card.GetLevel,sc:GetLevel()) return c:IsAbleToHand() and aux.IsCodeListed(c, yr) and not c:IsCode(code)
and g:FilterCount(Card.IsLocation,nil,0x04)<=1
and Duel.GetMZoneCount(tp,g)>0
end
function s.rspfi1ter(c,e,tp)
local g=Duel.GetMatchingGroup(s.matfilter,c:GetControler(),0x36,0,c)
return c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
and g:CheckSubGroup(s.rlgck,1,1,c,tp)
end
function s.matfilter(c)
return ((c:IsLocation(0x32) and c:IsAbleToDeck())
or (c:IsLocation(0x04) and c:IsReleasableByEffect()))
and c:IsType(TYPE_RITUAL) and c:IsLevelAbove(1)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rspfi1ter,tp,0x70,0,1,c,e,tp) end function cm.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x02) local c = e:GetHandler()
local code = e:GetLabel()
local g = Duel.GetMatchingGroup(cm.cfilter4, tp, QY_kz + QY_md + QY_cw, 0, nil, code)
if chk == 0 then return #g > 0 end
Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, QY_kz + QY_md + QY_cw)
end
function cm.drop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local code = e:GetLabel()
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SELECT)
local g = Duel.GetMatchingGroup(cm.cfilter4, tp, QY_kz + QY_md + QY_cw, 0, nil, code)
local sg = g:Select(tp, 1, 1, nil)
Duel.SendtoHand(sg, tp, REASON_EFFECT)
if Duel.SelectYesNo(tp, aux.Stringid(m, 2)) then
local g = Duel.GetFieldGroup(tp, LOCATION_HAND, 0):Select(tp, 1, 1, nil)
if g:GetCount() > 0 then
Duel.BreakEffect()
if Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT) ~= 0 then
Duel.RegisterFlagEffect(tp, m, RESET_PHASE + PHASE_END, 0, 2)
end
end
end
end
function cm.adop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local ng = Duel.GetMatchingGroup(cm.filsn, tp, LOCATION_HAND + LOCATION_ONFIELD + LOCATION_GRAVE + QY_kz, 0, nil)
local nc = ng:GetFirst()
while nc do
if not cm.reg then
cm.reg = Card.RegisterEffect
Card.RegisterEffect = cm.reg2
end
nc:RegisterFlagEffect(m, 0, 0, 1)
nc:ReplaceEffect(nc:GetOriginalCodeRule(), 0)
nc = ng:GetNext()
end
end
function cm.filsn(c)
return aux.IsCodeListed(c, yr) and c:GetFlagEffect(m) == 0
end
function cm.reg2(c, ie, ob)
local b = ob or false
local p = ie:GetCode()
local id, ida = ie:GetCountLimit()
if not aux.IsCodeListed(c, yr) or not ie:IsActivated() or (not id and not ida and
bit.band(ie:GetProperty(), EFFECT_FLAG_CARD_TARGET) == 0) then
return cm.reg(c, ie, b)
end
-- Debug.Message(id, ida)
local co = ie:GetCondition()
local ie2 = ie:Clone()
if id or ida then
ie2:SetCountLimit(id + 1, ida)
end
ie2:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
local code = Duel.GetFlagEffect(tp, m)
return (not co or co(e, tp, eg, ep, ev, re, r, rp)) and code > 0
end)
if bit.band(ie2:GetProperty(), EFFECT_FLAG_CARD_TARGET) ~= 0 then
local tn = ie:GetTarget()
ie2:SetProperty(ie2:GetProperty() - EFFECT_FLAG_CARD_TARGET)
ie2:SetTarget(function(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
local exis = Duel.IsExistingTarget
local exis2 = Duel.SelectTarget
local operat = Duel.SetOperationInfo
Duel.IsExistingTarget = function(fun, tp2, s1, o1, num, cg, ...)
-- cm[ie2] = { tp, fun, tp2, s1, o1, num, cg, ... }
return Duel.IsExistingMatchingCard(fun, tp2, s1, o1, num, cg, ...)
end
Duel.SelectTarget = function(tp1, fun, tp2, s1, o1, min, max, cg, ...)
local t = { ... }
for _, va in ipairs(t) do
if aux.GetValueType(va) == "Group" then
Group.KeepAlive(va)
end
end
cm[ie2] = { tp1, fun, tp2, s1, o1, min, max, cg, { ... } }
-- Duel.ConfirmCards(tp, table.unpack({ ... }))
return Group.CreateGroup()
end
Duel.SetOperationInfo = function(chainc, category, targets, count, target_player, target_param)
return operat(chainc, category, nil, count, target_player, target_param)
end
local jg = tn(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
Duel.IsExistingTarget = exis
Duel.SelectTarget = exis2
Duel.SetOperationInfo = operat
return jg
end)
local op = ie:GetOperation()
ie2:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
local ma = cm[ie2]
-- Debug.Message(ma[0])
-- Debug.Message(ma[1])
-- Debug.Message(ma[2])
-- Debug.Message(ma[3])
-- Debug.Message(ma[4])
-- Debug.Message(ma[5])
-- Debug.Message(ma[6])
-- Debug.Message(table.unpack(ma[8]))
-- Duel.ConfirmCards(tp, table.unpack(ma[9]))
local g = Duel.SelectMatchingCard(ma[1], ma[2], ma[3], ma[4], ma[5], ma[6], ma[7], ma[8],
table.unpack(ma[9]))
--ma[0], ma[1], ma[2], ma[3], ma[4], 1, ma[5],ma[6], table.unpack(ma[7])
-- local g = Group.CreateGroup()
local xta = Duel.GetFirstTarget
Duel.GetFirstTarget = function() return g:GetFirst(), g:GetNext(), g:GetNext(), g:GetNext() end
for tc in aux.Next(g) do
tc:CreateEffectRelation(e)
end
op(e, tp, eg, ep, ev, re, r, rp)
Duel.GetFirstTarget = xta
end)
end
ie:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
local code = Duel.GetFlagEffect(tp, m)
return (not co or co(e, tp, eg, ep, ev, re, r, rp)) and code == 0
end)
return cm.reg(c, ie, b), cm.reg(c, ie2, b)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(id,1)) then return end
::cancel::
local mg=Duel.GetMatchingGroup(s.matfilter,tp,0x36,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,s.rspfi1ter,tp,0x70,0,1,1,nil,e,tp,mg)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
mg:RemoveCard(tc)
local lv=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local mat=mg:SelectSubGroup(tp,s.rlgck,false,1,1,tc,tp)
if not mat then goto cancel end
tc:SetMaterial(mat)
local check=false
local matg=mat:Filter(Card.IsCode,nil,13020032)
if mat:FilterCount(Card.IsLocation,nil,0x0c)>0 then
check=true
elseif #matg>0 then
local ctc=matg:GetFirst()
if ctc:IsLocation(0x02) then Duel.ConfirmCards(1-tp,ctc) end
if ctc:IsLocation(0x10) then Duel.HintSelection(matg) end
check=true
end
local mg1=mat:Filter(Card.IsLocation,nil,0x32)
local mg2=mat:Filter(Card.IsLocation,nil,0x04)
if #mg1>0 then Duel.SendtoDeck(mg1,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) end
if #mg2>0 then Duel.Release(mg2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
if check then
local g=Duel.GetFieldGroup(tp,0x1c,0x1c):Filter(Card.IsAbleToHand,nil)
if #g>0 then
Duel.Hint(3,tp,505)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,0x40)
end
end
end
end
\ No newline at end of file
...@@ -51,7 +51,7 @@ function cm.disfilter(c) ...@@ -51,7 +51,7 @@ function cm.disfilter(c)
return c:IsFaceup() and c:IsAbleToHand() and not c:IsCode(m) return c:IsFaceup() and c:IsAbleToHand() and not c:IsCode(m)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -69,7 +69,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +69,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.disfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.disfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
if not re:GetHandler():IsStatus(STATUS_CHAINING) then return end
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
end end
end end
...@@ -259,7 +258,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp) ...@@ -259,7 +258,7 @@ function cm.dissop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.chop(e,tp,eg,ep,ev,re,r,rp)
--re:SetCategory(re:GetCategory()|CATEGORY_TODECK|CATEGORY_GRAVE_ACTION) --re:SetCategory(re:GetCategory()|CATEGORY_TODECK|CATEGORY_GRAVE_ACTION)
if re:GetLabel()&0x49421~=0 then re:SetLabel(re:GetLabel()+0x40000) return end if re:GetLabel()&0x49249~=0 then re:SetLabel(re:GetLabel()+0x40000) return end
re:SetLabel(re:GetLabel()+0x40000) re:SetLabel(re:GetLabel()+0x40000)
local op=re:GetOperation() local op=re:GetOperation()
local repop=function(e,tp,eg,ep,ev,re,r,rp) local repop=function(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,7 @@ function c95101043.initial_effect(c) ...@@ -28,7 +28,7 @@ function c95101043.initial_effect(c)
e2:SetCountLimit(1,95101043+1) e2:SetCountLimit(1,95101043+1)
e2:SetCondition(c95101043.setcon) e2:SetCondition(c95101043.setcon)
e2:SetCost(c95101043.setcost) e2:SetCost(c95101043.setcost)
e2:SetTarget(c95101043.seteg) e2:SetTarget(c95101043.settg)
e2:SetOperation(c95101043.setop) e2:SetOperation(c95101043.setop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
...@@ -78,7 +78,7 @@ function c95101049.ovop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +78,7 @@ function c95101049.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tc=Duel.SelectMatchingCard(aux.NecroValleyFilter(Card.IsCanOverlay),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanOverlay),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil):GetFirst()
if not tc then return end if not tc then return end
Duel.HintSelection(Group.FromCards(tc)) Duel.HintSelection(Group.FromCards(tc))
if not tc:IsImmuneToEffect(e) then if not tc:IsImmuneToEffect(e) then
......
...@@ -58,7 +58,7 @@ function c95101051.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function c95101051.drop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c95101051.spcon(e,tp,eg,ep,ev,re,r,rp) function c95101051.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end end
function c95101051.spfilter(c,e,tp) function c95101051.spfilter(c,e,tp)
return aux.IsCodeListed(c,95101001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return aux.IsCodeListed(c,95101001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -37,7 +37,7 @@ function c95101068.initial_effect(c) ...@@ -37,7 +37,7 @@ function c95101068.initial_effect(c)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetOperation(c95101068.damop) e3:SetOperation(c95101068.ovop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c95101068.ovfilter(c) function c95101068.ovfilter(c)
......
...@@ -34,7 +34,7 @@ function cm.initial_effect(c) ...@@ -34,7 +34,7 @@ function cm.initial_effect(c)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
-- --赋予神之进化
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
...@@ -59,7 +59,7 @@ function cm.tgfilter2(c) ...@@ -59,7 +59,7 @@ function cm.tgfilter2(c)
return c:IsAbleToGrave() and c:IsRace(RACE_DIVINE) and c:IsReleasable() return c:IsAbleToGrave() and c:IsRace(RACE_DIVINE) and c:IsReleasable()
end end
function cm.srfilter(c) function cm.srfilter(c)
return (aux.IsCodeListed(c,10000000) or aux.IsCodeListed(c,10000010) or aux.IsCodeListed(c,10000020) or c:IsCode(5253985,7373632,59094601,39913299,79339613,42469671,85758066,85182315,79868386,32247099,269012,10000000,10000010,10000020)) and c:IsAbleToHand() return (aux.IsCodeListed(c,10000000) or aux.IsCodeListed(c,10000010) or aux.IsCodeListed(c,10000020) or c:IsCode(5253985,7373632,59094601,39913299,79339613,42469671,85758066,85182315,79868386,32247099,269012,10000000,10000010,10000020,79387392)) and c:IsAbleToHand()
end end
function cm.srtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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