Commit 907c1210 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent ed6dced3
No preview for this file type
...@@ -2,164 +2,168 @@ ...@@ -2,164 +2,168 @@
local m=66915031 local m=66915031
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddXyzProcedure(c,nil,12,20) aux.AddXyzProcedure(c,nil,12,20)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--reset atk --reset atk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0)) e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_CONFIRM) e3:SetCode(EVENT_BATTLE_CONFIRM)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.atkcon2) e3:SetCondition(cm.atkcon2)
e3:SetOperation(cm.atkop2) e3:SetOperation(cm.atkop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--place --place
local e11=Effect.CreateEffect(c) local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(m,1)) e11:SetDescription(aux.Stringid(m,1))
e11:SetType(EFFECT_TYPE_QUICK_O) e11:SetType(EFFECT_TYPE_QUICK_O)
e11:SetRange(LOCATION_MZONE) e11:SetRange(LOCATION_MZONE)
e11:SetCode(EVENT_FREE_CHAIN) e11:SetCode(EVENT_FREE_CHAIN)
e11:SetCountLimit(1) e11:SetCountLimit(1)
e11:SetCondition(cm.atkcon3) e11:SetCondition(cm.atkcon3)
e11:SetCost(cm.tfcost) e11:SetCost(cm.tfcost)
e11:SetTarget(cm.tftg) e11:SetTarget(cm.tftg)
e11:SetOperation(cm.tfop) e11:SetOperation(cm.tfop)
c:RegisterEffect(e11) c:RegisterEffect(e11)
--search --search
local e111=Effect.CreateEffect(c) local e111=Effect.CreateEffect(c)
e111:SetDescription(aux.Stringid(m,2)) e111:SetDescription(aux.Stringid(m,2))
e111:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e111:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e111:SetType(EFFECT_TYPE_IGNITION) e111:SetType(EFFECT_TYPE_IGNITION)
e111:SetCountLimit(1) e111:SetCountLimit(1)
e111:SetRange(LOCATION_MZONE) e111:SetRange(LOCATION_MZONE)
e111:SetCondition(cm.atkcon4) e111:SetCondition(cm.atkcon4)
e111:SetCost(cm.cost) e111:SetCost(cm.cost)
e111:SetTarget(cm.target) e111:SetTarget(cm.target)
e111:SetOperation(cm.operation) e111:SetOperation(cm.operation)
c:RegisterEffect(e111) c:RegisterEffect(e111)
--negate --negate
local e1111=Effect.CreateEffect(c) local e1111=Effect.CreateEffect(c)
e1111:SetDescription(aux.Stringid(m,3)) e1111:SetDescription(aux.Stringid(m,3))
e1111:SetCategory(CATEGORY_DISABLE) e1111:SetCategory(CATEGORY_DISABLE)
e1111:SetType(EFFECT_TYPE_QUICK_O) e1111:SetType(EFFECT_TYPE_QUICK_O)
e1111:SetCode(EVENT_CHAINING) e1111:SetCode(EVENT_CHAINING)
e1111:SetCountLimit(1,m) e1111:SetCountLimit(1,m)
e1111:SetRange(LOCATION_MZONE) e1111:SetRange(LOCATION_MZONE)
e1111:SetCost(cm.discost) e1111:SetCost(cm.discost)
e1111:SetCondition(cm.discon) e1111:SetCondition(cm.discon)
e1111:SetTarget(cm.distg) e1111:SetTarget(cm.distg)
e1111:SetOperation(cm.disop) e1111:SetOperation(cm.disop)
c:RegisterEffect(e1111) c:RegisterEffect(e1111)
end end
function cm.filter1(c) function cm.filter1(c)
return c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS+TYPE_TRAP) return c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS+TYPE_TRAP)
end end
function cm.filter2(c) function cm.filter2(c)
return c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS+TYPE_SPELL) return c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS+TYPE_SPELL)
end end
function cm.filter3(c) function cm.filter3(c)
return c:IsSetCard(0x374) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x374) and c:IsType(TYPE_MONSTER)
end end
function cm.atkcon2(e,tp,eg,ep,ev,re,r,rp) function cm.atkcon2(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=a:GetBattleTarget() local d=a:GetBattleTarget()
local g=e:GetHandler():GetOverlayGroup() local g=e:GetHandler():GetOverlayGroup()
if a:IsControler(tp) then a,d=d,a end if a:IsControler(tp) then a,d=d,a end
return a and a:IsControler(1-tp) and not a:IsAttack(a:GetBaseAttack()) and g:IsExists(cm.filter1,1,nil) return a and a:IsControler(1-tp) and not a:IsAttack(a:GetBaseAttack()) and g:IsExists(cm.filter1,1,nil)
end end
function cm.atkcon3(e,tp,eg,ep,ev,re,r,rp) function cm.atkcon3(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetOverlayGroup() local g=e:GetHandler():GetOverlayGroup()
return g:IsExists(cm.filter2,1,nil) return g:IsExists(cm.filter2,1,nil)
end end
function cm.atkcon4(e,tp,eg,ep,ev,re,r,rp) function cm.atkcon4(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetOverlayGroup() local g=e:GetHandler():GetOverlayGroup()
return g:IsExists(cm.filter3,1,nil) return g:IsExists(cm.filter3,1,nil)
end end
function cm.atkop2(e,tp,eg,ep,ev,re,r,rp) function cm.atkop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if tc:IsControler(tp) then tc=tc:GetBattleTarget() end if tc:IsControler(tp) then tc=tc:GetBattleTarget() end
if tc and tc:IsFaceup() and not tc:IsAttack(tc:GetBaseAttack()) then if tc and tc:IsFaceup() and not tc:IsAttack(tc:GetBaseAttack()) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetBaseAttack()) e1:SetValue(tc:GetBaseAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function cm.tfcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetHandler():GetOverlayGroup() local og=e:GetHandler():GetOverlayGroup()
if chk==0 then return og:GetCount()>0 and og:IsExists(Card.IsType,1,nil,TYPE_SPELL) end if chk==0 then return og:GetCount()>0 and og:IsExists(Card.IsType,1,nil,TYPE_SPELL) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=og:FilterSelect(tp,Card.IsType,1,1,nil,TYPE_SPELL) local g=og:FilterSelect(tp,Card.IsType,1,1,nil,TYPE_SPELL)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function cm.tffilter(c,cc,tp) function cm.tffilter(c,cc,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x374) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x374)
and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc) and c:IsType(TYPE_CONTINUOUS)
end end
function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1 end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function cm.tfop(e,tp,eg,ep,ev,re,r,rp) function cm.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,cm.tffilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.tffilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,nil,tp):GetFirst()
if tc then if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
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)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function cm.filter(c) function cm.filter(c)
return c:IsCode(66915001) and c:IsAbleToHand() return c:IsCode(66915001) and c:IsAbleToHand()
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+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,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,type) function cm.cfilter(c,type)
return c:IsType(type) return c:IsType(type)
end end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetHandler():GetOverlayGroup() local og=e:GetHandler():GetOverlayGroup()
local type=bit.band(re:GetActiveType(),0x7) local type=bit.band(re:GetActiveType(),0x7)
if chk==0 then return og:GetCount()>0 and og:IsExists(Card.IsType,1,nil,type) end if chk==0 then return og:GetCount()>0 and og:IsExists(Card.IsType,1,nil,type) end
local g=og:FilterSelect(tp,Card.IsType,1,1,nil,type) local g=og:FilterSelect(tp,Card.IsType,1,1,nil,type)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function cm.discon(e,tp,eg,ep,ev,re,r,rp) function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp
end end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end end
function cm.disop(e,tp,eg,ep,ev,re,r,rp) function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.NegateEffect(ev) and c:IsRelateToEffect(e) and c:IsType(TYPE_XYZ) then if Duel.NegateEffect(ev) and c:IsRelateToEffect(e) and c:IsType(TYPE_XYZ) then
rc:CancelToGrave() rc:CancelToGrave()
Duel.Overlay(c,Group.FromCards(rc)) local og=rc:GetOverlayGroup()
end if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(rc))
end
end end
...@@ -5,7 +5,7 @@ Duel.LoadScript("c81000000.lua") ...@@ -5,7 +5,7 @@ Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c) function cm.initial_effect(c)
-- --
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(nil),1,1) aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(nil),1,1)
--immune --immune
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
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