Commit 41b2adee authored by mercury233's avatar mercury233

fix

parent 4291fdb3
...@@ -57,7 +57,7 @@ function c100257036.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c100257036.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local loc=LOCATION_ONFIELD+LOCATION_GRAVE local loc=LOCATION_ONFIELD+LOCATION_GRAVE
local g=Duel.GetMatchingGroup(c100257036.ctfilter,tp,loc,loc,nil) local g=Duel.GetMatchingGroup(c100257036.ctfilter,tp,loc,loc,nil)
if g:GetCount()>0 then if c:IsRelateToEffect(e) and c:IsFaceup() and g:GetCount()>0 then
c:AddCounter(0x1,g:GetCount()) c:AddCounter(0x1,g:GetCount())
end end
end end
...@@ -68,8 +68,8 @@ function c100257036.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,8 +68,8 @@ function c100257036.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
function c100257036.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100257036.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1,3,REASON_COST) end if chk==0 then return Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x1,3,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1,3,REASON_COST) Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x1,3,REASON_COST)
end end
function c100257036.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c100257036.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f) local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
--Scripted by mallu11 --Scripted by mallu11
function c100259001.initial_effect(c) function c100259001.initial_effect(c)
--fusion material
aux.AddFusionProcCodeFun(c,46986414,c100259001.mfilter,1,true,true) aux.AddFusionProcCodeFun(c,46986414,c100259001.mfilter,1,true,true)
c:EnableReviveLimit() c:EnableReviveLimit()
--immune --immune
...@@ -39,22 +40,32 @@ function c100259001.initial_effect(c) ...@@ -39,22 +40,32 @@ function c100259001.initial_effect(c)
e4:SetTarget(c100259001.distg) e4:SetTarget(c100259001.distg)
e4:SetOperation(c100259001.disop) e4:SetOperation(c100259001.disop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--material check
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(c100259001.matcon)
e5:SetOperation(c100259001.matop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_MATERIAL_CHECK)
e6:SetValue(c100259001.valcheck)
e6:SetLabelObject(e5)
c:RegisterEffect(e6)
end end
c100259001.material_setcode=0x3b c100259001.material_setcode=0x3b
function c100259001.mfilter(c) function c100259001.mfilter(c)
return c:IsFusionCode(74677422) or (c:IsRace(RACE_DRAGON) and c:IsFusionType(TYPE_EFFECT)) return c:IsFusionCode(74677422) or (c:IsRace(RACE_DRAGON) and c:IsFusionType(TYPE_EFFECT))
end end
function c100259001.descon(e,tp,eg,ep,ev,re,r,rp) function c100259001.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetHandler():GetFlagEffectLabel(100259101)>0
local g=c:GetMaterial()
local ct=g:FilterCount(Card.IsFusionType,nil,TYPE_NORMAL)
e:SetLabel(ct)
return ct>0
end end
function c100259001.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c100259001.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local ct=e:GetLabel() if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and c:GetFlagEffect(100259001)~=ct end and c:GetFlagEffect(100259001)<c:GetFlagEffectLabel(100259101) end
c:RegisterFlagEffect(100259001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(100259001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
...@@ -89,7 +100,8 @@ function c100259001.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,7 +100,8 @@ function c100259001.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c100259001.disop(e,tp,eg,ep,ev,re,r,rp) function c100259001.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0
and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
...@@ -98,3 +110,14 @@ function c100259001.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,3 +110,14 @@ function c100259001.disop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c100259001.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabel()>0
end
function c100259001.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(100259101,RESET_EVENT+RESETS_STANDARD,0,1,e:GetLabel())
end
function c100259001.valcheck(e,c)
local g=c:GetMaterial()
local ct=g:FilterCount(Card.IsFusionType,nil,TYPE_NORMAL)
e:GetLabelObject():SetLabel(ct)
end
...@@ -18,7 +18,6 @@ function c100259009.initial_effect(c) ...@@ -18,7 +18,6 @@ function c100259009.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_CONFIRM) e1:SetCode(EVENT_BATTLE_CONFIRM)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c100259009.damcon) e1:SetCondition(c100259009.damcon)
e1:SetTarget(c100259009.damtg) e1:SetTarget(c100259009.damtg)
e1:SetOperation(c100259009.damop) e1:SetOperation(c100259009.damop)
......
...@@ -41,6 +41,7 @@ function c100259017.initial_effect(c) ...@@ -41,6 +41,7 @@ function c100259017.initial_effect(c)
e3:SetOperation(c100259017.spop) e3:SetOperation(c100259017.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c100259017.synmat_syn=true
function c100259017.tfilter(c,tp) function c100259017.tfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end end
......
...@@ -12,7 +12,7 @@ function c101010081.initial_effect(c) ...@@ -12,7 +12,7 @@ function c101010081.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c101010081.regcon) e2:SetCondition(c101010081.regcon)
e2:SetOperation(c101010081.regop) e2:SetOperation(c101010081.regop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -30,7 +30,8 @@ function c101010081.initial_effect(c) ...@@ -30,7 +30,8 @@ function c101010081.initial_effect(c)
end end
function c101010081.regcon(e,tp,eg,ep,ev,re,r,rp) function c101010081.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp and rp==1-tp return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp and rp==1-tp
end end
function c101010081.regop(e,tp,eg,ep,ev,re,r,rp) function c101010081.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -30,7 +30,8 @@ function c101011019.initial_effect(c) ...@@ -30,7 +30,8 @@ function c101011019.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c101011019.regcon1)
e3:SetOperation(c101011019.regop1) e3:SetOperation(c101011019.regop1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -53,6 +54,10 @@ function c101011019.initial_effect(c) ...@@ -53,6 +54,10 @@ function c101011019.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function c101011019.regcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c101011019.regop1(e,tp,eg,ep,ev,re,r,rp) function c101011019.regop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
c:RegisterFlagEffect(101011019,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(101011019,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
...@@ -104,7 +109,7 @@ function c101011019.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,7 +109,7 @@ function c101011019.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101011019.spcon2(e,tp,eg,ep,ev,re,r,rp) function c101011019.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(101011019)>0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():GetFlagEffect(101011019)>0
end end
function c101011019.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c101011019.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
...@@ -21,6 +21,7 @@ function c101011032.initial_effect(c) ...@@ -21,6 +21,7 @@ function c101011032.initial_effect(c)
e2:SetCondition(c101011032.regcon) e2:SetCondition(c101011032.regcon)
e2:SetOperation(c101011032.regop) e2:SetOperation(c101011032.regop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
e1:SetLabelObject(e2)
end end
function c101011032.regcon(e,tp,eg,ep,ev,re,r,rp) function c101011032.regcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
...@@ -28,6 +29,16 @@ end ...@@ -28,6 +29,16 @@ end
function c101011032.regop(e,tp,eg,ep,ev,re,r,rp) function c101011032.regop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(Card.IsControler,1,nil,tp) then if eg:IsExists(Card.IsControler,1,nil,tp) then
local g=eg:Filter(Card.IsControler,nil,tp) local g=eg:Filter(Card.IsControler,nil,tp)
local ng=Group.CreateGroup()
ng:KeepAlive()
ng=e:GetLabelObject()
if ng then
ng:Merge(g)
e:SetLabelObject(ng)
else
g:KeepAlive()
e:SetLabelObject(g)
end
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
tc:RegisterFlagEffect(101011032,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1) tc:RegisterFlagEffect(101011032,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
...@@ -39,12 +50,15 @@ function c101011032.thfilter(c) ...@@ -39,12 +50,15 @@ function c101011032.thfilter(c)
return c:GetFlagEffect(101011032)~=0 and c:IsAbleToHand() and not c:IsCode(101011032) return c:GetFlagEffect(101011032)~=0 and c:IsAbleToHand() and not c:IsCode(101011032)
end end
function c101011032.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101011032.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101011032.thfilter,tp,LOCATION_GRAVE,0,1,nil) end local ng=e:GetLabelObject():GetLabelObject()
if chk==0 then return ng and ng:IsExists(c101011032.thfilter,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
function c101011032.thop(e,tp,eg,ep,ev,re,r,rp) function c101011032.thop(e,tp,eg,ep,ev,re,r,rp)
local ng=e:GetLabelObject():GetLabelObject()
if not ng then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101011032.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=ng:FilterSelect(tp,aux.NecroValleyFilter(c101011032.thfilter),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)
......
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