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
......
This diff is collapsed.
This diff is collapsed.
...@@ -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()
......
This diff is collapsed.
...@@ -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